Learn R Programming

plm (version 0.3-1)

pvcm: Variable Coefficients Models for Panel Data

Description

Estimators for random and fixed effect models with variable coefficients.

Usage

pvcm(formula, data, subset, na.action, effect = "individual", model,
    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"), ...)

Arguments

formula
a symbolic description for the model to be estimated,
object,x
an object of class "pvcm",
data
a data.frame,
subset
see lm,
na.action
see lm,
effect
the effects introduced in the model, one of "individual" or "time",
model
one of "within" or "random",
index
the indexes, see plm.data,
digits
digits,
width
the maximum length of the lines in the print output,
...
further arguments.

Value

  • an object of class c("pvcm","panelmodel"), which has the following elements :
  • coefficientsthe vector (or the list for fixed effects) of coefficients,
  • residualsthe vector of residuals,
  • fitted.valuesthe vector of fitted.values,
  • vcovthe covariance matrix of the coefficients,
  • df.residualdegrees of freedom of the residuals,
  • modela data.frame containing the variables used for the estimation,
  • callthe call,
  • Deltathe estimation of the covariance matrix of the coefficients (random effect models only),
  • std.errorthe standard errors for all the coefficients for each individual (within models only),
  • pvcm objects have print, summary and print.summary methods.

Details

The pvcm function enables the estimation of variable coefficients models. Time or individual effects are introduced if effect is fixed to "time" or "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 use the results of the previous model.

References

Swamy, P.A.V.B. (1970) Efficient Inference in a Random Coefficient Regression Model, Econometrica, 38(2), pp.311--323.

Examples

Run this code
data("Produc", package="Ecdat")
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")

Run the code above in your browser using DataLab