ndex)%in%row.names(X))]
>>
>> ## within transf.
>> MX<-matrix(NA,ncol=dim(X)[[2]],nrow=dim(X)[[1]])
>> for(i in 1:dim(X)[[2]]) {
>> MX[,i]<-demean(X[,i],index=ind,lambda=1)
>> }
>> My<-demean(y,index=ind,lambda=1)
>>
>>
,i],index=ind,lambda=1)
> Â Â }
> Â My<-demean(y,index=ind,lambda=1)
>
> Â ## estimate within model
> Â femod<-lm(My~MX-1)
>
> Â return(femod)
> }
> ### end test function
>
>
> Best,
> Giovanni
>
> ### original message #
Best,
Giovanni
### original message #
----------
Message: 28
Date: Tue, 07 Feb 2012 15:35:07 +0100
From: caribou...@gmx.fr
To: r-help@r-project.org
Subject: [R] fixed effects with clustered standard errors
Message-ID: <20120207143507.142...@gmx.com>
C
Dear R-helpers,
I have a very simple question and I really hope that someone could help me
I would like to estimate a simple fixed effect regression model with clustered
standard errors by individuals.
For those using Stata, the counterpart would be xtreg with the "fe" option, or
areg with the
4 matches
Mail list logo