between {plm} | R Documentation |
Computes the between transformation.
Between(x, ...) ## S3 method for class 'pserie': Between(x,effect="individual", ...) ## S3 method for class 'matrix': Between(x,cond, ...) ## Default S3 method: Between(x,cond, ...) between(x, ...) ## S3 method for class 'pserie': between(x,effect="individual", ...) ## S3 method for class 'matrix': between(x,cond, ...) ## Default S3 method: between(x,cond, ...)
x |
a numeric vector or matrix, |
cond |
a vector containing the conditional variable, |
effect |
the effect for the Between transformation (one of
individual and time ), |
... |
further arguments. |
a vector (or a matrix) of the same length as x
containing the
between transformation (Between
) or of a length equal of the
number of modalities of the conditional variable (between
).
Yves Croissant
library(Ecdat) data(Grunfeld) pdata.frame(Grunfeld,"firm","year") Bi <- Between(Grunfeld$inv) X <- model.matrix(~value+capital-1,Grunfeld) BX <- Between(X,Grunfeld$firm) bi <- between(Grunfeld$inv) bX <- between(X,Grunfeld$firm) # computes the between estimator with the lm command blm <- lm(between(inv)~between(value)+between(capital),data=Grunfeld)