pvcm {plm} | R Documentation |
Estimators for random and fixed effects models with variable coefficients.
pvcm(formula, data, subset, na.action, effect = c("individual","time"), model = c("within","random"), index = NULL, ...) ## S3 method for class 'pvcm' summary(object, ...) ## S3 method for class 'summary.pvcm' print(x, digits = max(3, getOption("digits") -2), width = getOption("width"), ...)
formula |
a symbolic description for the model to be estimated, |
object, x |
an object of class |
data |
a |
subset |
see |
na.action |
see |
effect |
the effects introduced in the model: one of
|
model |
one of |
index |
the indexes, see |
digits |
digits, |
width |
the maximum length of the lines in the print output, |
... |
further arguments. |
pvcm
estimates variable coefficients models. Time or individual effects are introduced, respectively, if effect="time"
or effect="individual"
(the default value).
Coefficients are assumed to be fixed if model="within"
and
random if model="random"
. In the first case, a different
model is estimated for each individual (or time period). In the second case, the Swamy (1970) model is estimated. It is a
generalized least squares model which uses the results of the previous model.
An object of class c("pvcm","panelmodel")
, which has the following elements :
coefficients |
the vector (or the list for fixed effects) of coefficients, |
residuals |
the vector of residuals, |
fitted.values |
the vector of fitted.values, |
vcov |
the covariance matrix of the coefficients, |
df.residual |
degrees of freedom of the residuals, |
model |
a |
call |
the call, |
Delta |
the estimation of the covariance matrix of the coefficients (random effect models only), |
std.error |
the standard errors for all the coefficients for each individual (within models only), |
pvcm
objects have print
, summary
and print.summary
methods.
Yves Croissant
Swamy, P.A.V.B. (1970). Efficient Inference in a Random Coefficient Regression Model, Econometrica, 38(2), pp.311–323.
data("Produc", package = "plm") zw <- pvcm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, model = "within") zr <- pvcm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, model = "random")