Re: [R] Regressions with fixed-effect in R

2010-05-11 Thread Daniel Malter
if the plm function only puts out one r-squared, it should be the within r-squared, but I could be wrong. Stata, for example, gives you a within, a between, and an overall r-squared. Here is what they do. set.seed(1) x=rnorm(100) fe=rep(rnorm(10),each=10) id=rep(1:10,each=10) ti=rep(1:10,10) e=rn

Re: [R] Regressions with fixed-effect in R

2010-05-11 Thread chen jia
Thanks. I have the PDF document that you suggest. It is very brief on fixed-effect in panel regressions. I will look into plm package. Best, Jia On Tue, May 11, 2010 at 8:19 AM, Liviu Andronic wrote: > On 5/11/10, chen jia wrote: >>  Are there any functions that specifically deal with fixed-ef

Re: [R] Regressions with fixed-effect in R

2010-05-11 Thread Liviu Andronic
Dear Daniel On 5/11/10, Daniel Malter wrote: > R-squared of interest is typically the within R-squared, not the overall or > Could you point to an example on how to compute the within R-squared in R, either via lm() or plm()? Thank you Liviu __ R-help

Re: [R] Regressions with fixed-effect in R

2010-05-11 Thread Liviu Andronic
On 5/11/10, chen jia wrote: > Are there any functions that specifically deal with fixed-effects? > Other than plm and its vignette, you may want to check this document [1]. Liviu [1] http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf ___

Re: [R] Regressions with fixed-effect in R

2010-05-10 Thread Daniel Malter
There is the plm package for linear panel models. Further, since estimation of fixed effects models rests on the within-subject or -object variance, the R-squared of interest is typically the within R-squared, not the overall or between R-squared. Read up about it before you use it though. Daniel