Displaying 1 result from an estimated 1 matches for "plmr2".
Did you mean:
plmr
2010 May 17
0
plm(..., model="within", effect="twoways") is very slow on unablanaced data (was: Re: Regressions with fixed-effect in R)
...ely I get the same slow behaviour when using
pmodel.response(x, model="within", effect="twoways") to compute teh
within R-sq. Below is an example that approximates the structure of my
data.
### define fun to compute the within R-sq
pmodel.response<-plm:::pmodel.response.plm
plmr2 <-
function(x, adj=TRUE, effect="individual")
{
## fetch response and residuals
y <- pmodel.response(x, model="within", effect=effect)
myres <- resid(x)
n <- length(myres)
if(adj) {
adjssr <- x$df.residual
adjtss <- n-1
} else {
adjssr <...