Learn R Programming

plm (version 1.6-5)

pvcm: Variable Coefficients Models for Panel Data

Description

Estimators for random and fixed effects models with variable coefficients.

Usage

pvcm(formula, data, subset, na.action, effect = c("individual","time"), model = c("within","random"), index = NULL, ...) "summary"(object, ...) "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", "time",
model
one of "within", "random",
index
the indexes, see pdata.frame,
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 :pvcm objects have print, summary and print.summary methods.

Details

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.

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 = "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")

Run the code above in your browser using DataLab