similar to: fastest OLS w/ NA's and need for SE's

Displaying 20 results from an estimated 5000 matches similar to: "fastest OLS w/ NA's and need for SE's"

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
2004 Sep 15
1
adding observations to lm for fast recursive residuals?
dear R community: i have been looking but failed to find the following: is there a function in R that updates a plain OLS lm() model with one additional observation, so that I can write a function that computes recursive residuals *quickly*? PS: (I looked at package strucchange, but if I am not mistaken, the recresid function there takes longer than iterating over the models fresh from
2004 Jul 07
3
fast NA elimination ?
dear R wizards: an operation I execute often is the deletion of all observations (in a matrix or data set) that have at least one NA. (I now need this operation for kde2d, because its internal quantile call complains; could this be considered a buglet?) usually, my data sets are small enough for speed not to matter, and there I do not care whether my method is pretty inefficient (ok, I
2011 Jul 02
1
Speed Advice for R --- avoid data frames
This email is intended for R users that are not that familiar with R internals and are searching google about how to speed up R. Despite common misperception, R is not slow when it comes to iterative access. R is fast when it comes to matrices. R is very slow when it comes to iterative access into data frames. Such access occurs when a user uses "data$varname[index]", which is a very
2005 Aug 15
3
paste / system mystery
Dear R wizards: under R-2.1.0: eargs <- 3:5; line <- paste(c("echo A B", eargs)); cat("executing from R: '", line, "'\n"); system(line); Oddly, only "A" and "B" are echoed, not the eargs. I had hoped that line would be one string at this point, and for printing this seems to be true. However, unlist(line) still gives me the 4
2004 Nov 01
2
non-linear solve?
hi: could someone please point me to a function that allows me to solve general non-linear functions? > irr.in <- function(r, c1, c2, c3 ) { return(c1+c2/(1+r) + c3/(1+r)^2); } > solve.nonlinear( irr.in, -100, 60, 70 ); 0.189 If someone has written an irr function, this would be helpful, too---though not difficult to write, either. thanks for any pointers. Regards, /iaw
2004 Jun 20
4
if syntax
I ran into an interesting oddity of R, if (0) { print(1); } else { print(2); } is a syntax error, while if (0) { print(1); } else { print(2); } or if (0) { print(1); } else { print(2); } is not. I presume it has to do with the duality of the newline functioning as an end of command (;) character, though it still seems a bit odd, and it took me a while to figure out
2010 Jan 08
4
fast lm se?
dear R experts---I am using the coef() function to pick off the coefficients from an lm() object. alas, I also need the standard errors and I need them fast. I know I can do a "summary()" on the object and pick them off this way, but this computes other stuff I do not need. Or, I can compute (X' X)^(-1) s^2 myself. Has someone written a fast se() function? incidentally, I think
2004 Aug 21
4
loadhistory() in .Rprofile ?
dear wizards: my .Rprofile has just one command for testing, loadhistory("~/.Rhistory") but this gives me an error on R startup: Error: couldn't find function "loadhistory" Invoking loadhistory() as the first interactive command works fine; incidentally, I believe loadhistory() in the .Rprofile worked in earlier or other platform R releases, too. Is the .Rprofile
2010 Jun 11
3
lm without error
this is not an important question, but I wonder why lm returns an error, and whether this can be shut off. it would seem to me that returning NA's would make more sense in some cases---after all, the problem is clearly that coefficients cannot be computed. I know that I can trap the lm.fit() error---although I have always found this to be quite inconvenient---and this is easy if I have only
2009 Sep 14
4
Location of Packages?
Sorry, one more: on OSX, I deleted my old 2.9.2 R.app, and installed the 64 bit version of 2.9.0. I then did an "install.packages("car")" under my new 2.9.0. It seems to have worked, but alas, I still get an error that package 'car' was built under R version 2.9.2 . Where exactly does R under OSX install its packages? (is it a bug that another car is loaded?) PS:
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,
2009 Sep 16
2
cluster-lite
I am about to write a "cluster-lite" R solution for myself. I wanted to know whether it already exists. If not, I will probably write up how I do this, and I will make the code available. Background: we have various linux and OSX systems, which are networked, but not set up as a cluster. I have no one here to set up a cluster, so I need a "hack" that facilitates parallel
2010 Jan 22
2
sorted reshaping?
dear R wizards:? I am wrestling with reshape.? I have a long data set that I want to convert into a wide data set, in which rows are firms and columns are years. > summary(rin) firm fyear sim1 Min. :1004.00 Min. :1964.0 Min. : -1.00000 1st Qu.:1010.00 1st Qu.:1979.0 1st Qu.: -0.14334 Median :1016.00 Median :1986.0 Median : 0.00116 Mean
2005 Feb 02
3
postscript symbols?
dear R wizards: is it possible to use a postscript font symbol as a plot symbol? in particular, I want to use the four postscript symbols for playing cards (club, heart, spade, diamond) as points. In LaTeX, these four are \Pisymbol{psy}{"A7} \Pisymbol{psy}{"A8} \Pisymbol{psy}{"A9} \Pisymbol{psy}{"A10} and what I would love to do is place them, at say, (x=1,y=1),
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 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