similar to: R-help Digest, Vol 87, Issue 5

Displaying 20 results from an estimated 14000 matches similar to: "R-help Digest, Vol 87, Issue 5"

2010 May 04
1
aregImpute (Hmisc package) : error in matxv(X, xcof)...
Dear r-help list, I'm trying to use multiple imputation for my MSc thesis. Having good exemples using the Hmisc package, I tried the aregImpute function. But with my own dataset, I have the following error : Erreur dans matxv(X, xcof) : columns in a (51) must be <= length of b (50) De plus : Warning message: In f$xcoef[, 1] * f$xcenter :   la taille d'un objet plus long n'est pas
2010 Aug 18
1
Fwd: \ell symbol (log-likelihood)
I sent this privately to ivo welch yesterday, and he thinks it might be useful to someone else as well. Since I'm on a Mac the screen device is quartz(): > quartz() > plot( c(0,1), c(0,1) ); > text( 0.5, 0.5, "\u2113" ) # and then File/Save As/ -- David. Begin forwarded message: > From: David Winsemius <dwinsemius at comcast.net> > Date: August 17,
2010 Aug 20
3
Date Inconsistencies? Buglets?
The treatment of dates seems to be a little inconsistent in R 2.11.1 (2010-05-31): [1] The choice of origins? > as.integer(as.Date("1970-01-01")) works and assumes as origin 1970-01-01. However, > as.Date(1) does not work. It requires an origin (as.Date(1, origin="1970-01-01")). If we set a default origin in the former, it should probably work when the input
2011 Sep 13
1
CMYK color space
dear R experts---I am struggling with the requirements to prepare my files for my printers. I am printing in 2/2 format, which means cyan and black for me, which they take from my color-separated pdf files. R comes into play, because it produces all the figures that are embedded in my book (pdflatex). now, TeX has no problems producing CMYK files. However, R produces RGB files (for
2012 Dec 24
2
parallelized version of "by" and "ave"
Dear R experts--- Has anyone written parallel versions of "by" (i.e., mcby) and "ave" (i.e. mcave) ? I did ask a question like this a year ago, and then the answer was no. for those who are googling the group for the answer to this question, in the meantime, the poor man's version of "by" is mclapply( split( ds, factor ), FUN ) I don't know the poor
2004 Feb 24
0
Suggestions ?!?!
For the question at the end, try barplot with the horiz=TRUE argument. Date: Tue, 24 Feb 2004 09:30:21 -0500 From: ivo welch <ivo.welch at yale.edu> To: <r-help at stat.math.ethz.ch> Cc: <r-help-owner at stat.math.ethz.ch>,ivo welch <ivo.welch at yale.edu> Subject: [R] Suggestions ?!?! hi chaps: * I have some suggestion, the first of which is about
2010 May 09
0
non-linear estimation with many firm-specific parameters
Dear R experts--- I doubt that someone has already solved my problem, but I thought I would ask quickly, just in case someone has. Let' say I start with a (flattened panel) model that says y[i] = x[i] + b*(T-x[i]) easy enough---this is just a linear model. I could also make this a fixed-effects model if I change T to T[fmid], where fmid is the firm's id. I know I can do this
2012 May 09
2
big quasi-fixed effects OLS model
dear R experts---now I have a case where I want to estimate very large regression models with many fixed effects---not just the mean type, but cross-fixed effects---years, months, locations, firms. Many millions of observations, a few thousand variables (most of these variables are interaction fixed effects). could someone please point me to packages, if any, that would help me estimate such
2010 Apr 29
1
lm() with non-linear coefficients constraints? --- nls?
dear R experts---quick question. I need to estimate a model that looks like y = (b*T+d*T^3) + (1-b-3*d*T^2)*x + (3*d*T)*x^2 + (-d)*x^3 I only have three parameters. Is nls() the right tool for the job, or is there something faster/better? /iaw ---- Ivo Welch (ivo.welch@brown.edu, ivo.welch@gmail.com) [[alternative HTML version deleted]]
2010 Aug 20
1
strange behavior of ifelse with factors
Dear R experts: this is probably correct behavior, but I do want to point out that it is unexpected to someone not too well versed: > test=factor("A","B","C","A") > ifelse(test=="A", as.factor("A"), test) [1] 1 2 3 1 ok, my factor was just coerced into integers, even though I have a logical vector as my condition and factors as
2010 Nov 03
1
Rd installation (not markup language) primer?
I have a set of functions that I always load on startup. for example, there is my now infamous "is.defined()" function. I would like to add some documentation for these functions, so that I can do a ?is.defined inside R. The documentation tells me how to mark up Rd files is very good, but I wonder how one installs them for access by the R executable (on OSX for me). Do I drop
2010 Dec 03
1
"Nash Equilibrium"
Dear R experts: I searched cran (and r-help) for "nash equilibrium" and "game" but nothing stuck out. has someone written a numerical nash optimizer for two players? player a has choices x1,x2,x3,... and cares about (maximizes) pa(x1,x2,x3,...,y1,y2,y3) player b has choices y1,y2,y3,..., and cares about (maximizes) pb(x1,x2,x3,...,y1,y2,y3) I can tune it to my problem, but
2019 Aug 02
2
Re: nbdkit random seek performance
On Thu, Aug 01, 2019 at 03:44:31PM -0700, ivo welch wrote: > hi richard---arthur and I are working with nbdkit v1.12.3 on qemu/kvm. > > we found that our linux (ubuntu 16.04 32-bit) boot time from a local .img > file went from about 10 seconds to about 3 minutes when using the nbdkit > file plugin instead of directly connecting qemu to the file. on further > inspection with
2009 Apr 22
1
Multiple imputations : wicked dataset ? Wicked computers ? Am I cursed ? (or stupid ?)
Dear list, I'd like to use multiple imputations to try and save a somewhat badly mangled dataset (lousy data collection, worse than lousy monitoring, you know that drill... especially when I am consulted for the first time about one year *after* data collection). My dataset has 231 observations of 53 variables, of which only a very few has no missing data. Most variables have 5-10% of
2010 Nov 03
2
programming questions
quick programming questions. I want to "turn on" more errors. there are two traps I occasionally fall into. * I wonder why R thinks that a variable is always defined in a data frame. > is.defined(d) [1] FALSE > d= data.frame( x=1:5, y=1:5 ) > is.defined(d$z) [1] TRUE > is.defined(nonexisting$garbage) [1] TRUE this is a bit unfortunate
2011 Feb 27
0
foreach() package for parallel computing
dear R experts---I have been experimenting with the foreach package (with doMC) for a while. my first impression is that it is a very easy way to acquire parallel processing capabilities. (thanks, revolution R.) the only two gotchas were about installation (it required an exit and restart), and the precedence order of the foreach (higher than '+', I think), but once I understood this,
2010 Nov 24
1
segfault interest?
in a long program, I ran into ?*** caught segfault *** address 0xdc3f9b48, cause 'memory not mapped' Traceback: ?1: rep.int(seq_len(nx), rep.int(rep.fac, nx)) ?2: rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) ?3: expand.grid(seq_len(nx), seq_len(ny)) ?4: merge.data.frame(d, ss) ?5: merge(d, ss) ?6: valid.range(opt) ?7: eval.with.vis(expr, envir, enclos) ?8: eval.with.vis(ei,
2010 Aug 22
1
small syntax suggestion
Dear R development Team: I really know very little, so you may ignore this post. I have found that my students often make the mistake of mixing up comparisons and assignments with negative numbers: if (x<-3) do_something; I parenthesize, but every once in a while, I forget and commit this mistake, too. so, I would suggest that R simply warn about an ambiguity. that is, it could suggest
2009 Sep 11
1
constrOptim parameters
Dear R wizards: I am playing (and struggling) with the example in the constrOptim function. simple example. let's say I want to constrain my variables to be within -1 and 1. I believe I want a whole lot of constraints where ci is -1 and ui is either -1 or 1. That is, I have 2*N constraints. Should the following work? N=10 x= rep(1:N) ci= rep(-1, 2*N) ui= c(rep(1, N), rep(-1, N))
2012 Mar 30
4
list assignment syntax?
Dear R wizards: is there a clean way to assign to elements in a list? what I would like to do, in pseudo R+perl notation is f <- function(a,b) list(a+b,a-b) (c,d) <- f(1,2) and have c be assigned 1+2 and d be assigned 1-2. right now, I use the clunky x <- f(1,2) c <- x[[1]] d <- x[[2]] rm(x) which seems awful. is there a nicer syntax? regards, /iaw ---- Ivo Welch