similar to: Hurwicz Bias Correction

Displaying 20 results from an estimated 11000 matches similar to: "Hurwicz Bias Correction"

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
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
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
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
2010 May 11
3
Revolution R and the R Community?
As an end-user, I wonder about Revolution R. Is the relationship between Revolution R and the R community at-large a positive one? Do the former contribute to the development efforts of the latter? Is there a competitive aspect? is their forum competitive with r-help? any other thoughts? (most of all, I simply hope that they help some of the many helpful experts on this forum, who have
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
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
2009 Sep 15
2
why is nrow() so slow?
dear R wizards: here is the strange question for the day. It seems to me that nrow() is very slow. Let me explain what I mean: ds= data.frame( NA, x=rnorm(10000) ) ## a sample data set > system.time( { for (i in 1:10000) NA } ) ## doing nothing takes virtually no time user system elapsed 0.000 0.000 0.001 ## this is something that should take time; we need to add 10,000
2013 Feb 06
5
First R Package --- Advice?
Dear R experts--- after many years, I am planning to give in and write my first R package. I want to combine my collection of collected useful utility routines. as my guide, I am planning to use Friedrich Leisch's "Creating R Packages: A Tutorial" from Sep 2009. Is there a newer or better tutorial? this one is 4 years old. I also plan on one change---given that the
2011 Mar 01
3
inefficient ifelse() ?
dear R experts--- t <- 1:30 f <- function(t) { cat("f for", t, "\n"); return(2*t) } g <- function(t) { cat("g for", t, "\n"); return(3*t) } s <- ifelse( t%%2==0, g(t), f(t)) shows that the ifelse function actually evaluates both f() and g() for all values first, and presumably then just picks left or right results based on t%%2.
2009 Apr 16
2
static variable?
dear R experts: does R have "static" variables that are local to functions? I know that they are usually better avoided (although they are better than globals). However, I would like to have a function print how often it was invoked when it is invoked, or at least print its name only once to STDOUT when it is invoked many times. possible without <<- ? sincerely, /iaw
2007 Apr 20
2
cat() to STDERR
Dear R wizards---I read Brian Ripley's post from 2004 which said that it was not possible to print to STDERR. Alas, I have more modest needs. I was wondering if it was possible to just send a string to STDERR with cat() while in CMD BATCH mode. Is it not possible to open STDERR in R? (Or does R use STDERR for itself and redirect it into the output stream?) This would be on a standard Unix
2010 May 24
1
Fixed Effects Estimations (in Panel Data)
dear readers---I struggled with how to do nice fixed-effects regressions in large economic samples for a while. Eventually, I realized that nlme is not really what I needed (too complex), and all I really wanted is the plm package. so, I thought I would share a quick example. ################ sample code to show fixed-effects models? in R # create a sample panel data set with firms and years
2006 Feb 06
2
appeal --- add sd to summary for univariates
just a short beg for the next R 2.3 version: I know it is easy to add the sd into summary() in the source bowels of R---but everytime R is updated, my change disappears. :-(. I do not believe that R has an easy extension mechanism for univariate summaries, short of a function rewrite here. Could this please be added into R 2.3? Aside, a logical ordering might also be: mean sd min q1 med q3
2009 Mar 11
0
Bias correction for random forests?
Hi, Way back in 2004, an update to randomForest added an option 'corr.bias'. The explanation was a bit vague, but it turns out it improves RF's predictive fit with my data substantially. But I am having trouble understanding it. Does anyone know what this 'bias correction' actually does? Or what the justification for it is? Or when it would be necessary? Is there a paper
2006 Jan 12
1
Firths bias correction for log-linear models
Dear R-Help List, I'm trying to implement Firth's (1993) bias correction for log-linear models. Firth (1993) states that such a correction can be implemented by supplementing the data with a function of h_i, the diagonals from the hat matrix, but doesn't provide further details. I can see that for a saturated log-linear model, h_i=1 for all i, hence one just adds 1/2 to each count,
2012 Oct 26
1
Gini with bias correction
Hey there, I was wondering if someone could tell me if there's a package or command that allows me to compute a GINI coefficient using a vector of weights. Also the coefficient should be bias corrected. Diego Rojas [[alternative HTML version deleted]]
2013 Feb 26
1
Light Libraries
Dear R-Help group: I have been tinkering with how I want my personal standard library functions to look like. They are not designed to be professional and heavyweight, but lightweight. There are probably dozens of little bugs, because I don't know or have not properly taken care of a variety of internal R code issues. still, I like how this ended up, and there is no learning curve, so I
2009 Mar 26
1
pgmm (Blundell-Bond) sample needed
Dear R Experts--- Sorry for all the questions yesterday and today. I am trying to use Yves Croissant's pgmm function in the plm package with Blundell-Bond moments. I have read the Blundell-Bond paper, and want to run the simplest model first, d[i,t] = a*d[i,t-1] + fixed[i] + u[i,t] . no third conditioning variables yet. the full set of moment conditions recommended for system-GMM,
2007 Jan 01
1
advice on semi-serious attempt to extend summary
Dear R wizards: I am trying (finally) to build a function that might be useful to others. In particular, I want to create a summary.lme (extended lm) method that [a] adds normalized coefficients and [b] white heteroskedasticity adjusted se's and T's. I believe I already know how to do the programming to do these two, at least in simple unweighted cases. Now my challenges are just [1]