Learn R Programming

plm (version 1.5-12)

plm: Panel Data Estimators

Description

Linear models for panel data estimated using the lm function on transformed data.

Usage

plm(formula, data, subset, na.action, effect = c("individual", "time", "twoways"), model = c("within", "random", "ht", "between", "pooling", "fd"), random.method = c("swar", "walhus", "amemiya", "nerlove", "kinla"), random.dfcor = NULL, inst.method = c("bvk", "baltagi", "am", "bmc"), restrict.matrix = NULL, restrict.rhs = NULL, index = NULL, ...) "summary"(object, .vcov = NULL, ...) "print"(x, digits = max(3, getOption("digits") - 2), width = getOption("width"), subset = NULL, ...) "plot"(x, dx = 0.2, N = NULL, seed = 1, within = TRUE, pooling = TRUE, between = FALSE, random = FALSE, ...)

Arguments

formula
a symbolic description for the model to be estimated,
object,x
an object of class "plm",
data
a data.frame,
subset
see lm for "plm", a character or numeric vector indicating a subset of the table of coefficients to be printed for "print.summary.plm",
na.action
see lm,
effect
the effects introduced in the model, one of "individual", "time", or "twoways",
model
one of "pooling", "within", "between", "random", "fd", or "ht",
random.method
method of estimation for the variance components in the random effects model, one of "swar" (default), "amemiya", "walhus", or "nerlove",
random.dfcor
a numeric vector of length 2 indicating which degree of freedom should be used,
inst.method
the instrumental variable transformation: one of "bvk", "baltagi", "am", or "bmc",
index
the indexes,
restrict.matrix
a matrix which defines linear restrictions on the coefficients,
restrict.rhs
the right hand side vector of the linear restrictions on the coefficients,
.vcov
a covariance matrix furnished by the user,
digits
number of digits for printed output,
width
the maximum length of the lines in the printed output,
dx
the half--length of the individual lines for the plot method (relative to x range),
N
the number of individual to plot,
seed
the seed which will lead to individual selection,
within
if TRUE, the within model is plotted,
pooling
if TRUE, the pooling model is plotted,
between
if TRUE, the between model is plotted,
random
if TRUE, the random effect model is plotted,
...
further arguments.

Value

An object of class c("plm","panelmodel").A "plm" object has the following elements :
coefficients
the vector of coefficients,
vcov
the covariance matrix of the coefficients,
residuals
the vector of residuals,
df.residual
degrees of freedom of the residuals,
formula
an object of class 'pFormula' describing the model,
model
a data.frame of class 'pdata.frame' containing the variables used for the estimation: the response is in first column and the two indexes in the two last columns,
ercomp
an object of class 'ercomp' providing the estimation of the components of the errors (for random effects models only),
call
the call.
It has print, summary and print.summary methods.

Details

plm is a general function for the estimation of linear panel models. It supports the following estimation methods: pooled OLS (model = "pooling"), fixed effects ("within"), random effects ("random"), first--differences ("fd"), and between ("between"). It supports unbalanced panels and two--way effects (although not with all methods).

For random effects models, four estimators of the transformation parameter are available by setting random.method to one of "swar" (Swamy and Arora (1972)) (default), "amemiya" (Amemiya (1971)), "walhus" (Wallace and Hussain (1969)), or "nerlove" (Nerlove (1971)).

Instrumental variables estimation is obtained using two--part formulas, the second part indicating the instrumental variables used. This can be a complete list of instrumental variables or an update of the first part. If, for example, the model is y ~ x1 + x2 + x3, with x1 and x2 endogenous and z1 and z2 external instruments, the model can be estimated with:

  • formula=y~x1+x2+x3 | x3+z1+z2,
  • formula=y~x1+x2+x3 | .-x1-x2+z1+z2.

Balestra and Varadharajan--Krishnakumar's or Baltagi's method is used if inst.method="bvk" or if inst.method="baltagi", respectively. The Hausman and Taylor estimator is computed if model = "ht".

References

Amemiya, T. (1971) The estimation of the variances in a variance--components model, International Economic Review, 12, pp. 1--13.

Balestra, P. and Varadharajan--Krishnakumar, J. (1987) Full information estimations of a system of simultaneous equations with error components structure, Econometric Theory, 3, pp. 223--246. Baltagi, B.H. (1981) Simultaneous equations with error components, Journal of Econometrics, 17, pp. 21--49. Baltagi, B.H. (2001) Econometric Analysis of Panel Data, 2nd ed., John Wiley and Sons.

Baltagi, B.H. (2013) Econometric Analysis of Panel Data, 5th ed., John Wiley and Sons.

Hausman, J.A. and Taylor W.E. (1981) Panel data and unobservable individual effects, Econometrica, 49, pp. 1377--1398. Nerlove, M. (1971) Further evidence on the estimation of dynamic economic relations from a time--series of cross--sections, Econometrica, 39, pp. 359--382.

Swamy, P.A.V.B. and Arora, S.S. (1972) The exact finite sample properties of the estimators of coefficients in the error components regression models, Econometrica, 40, pp. 261--275.

Wallace, T.D. and Hussain, A. (1969) The use of error components models in combining cross section with time series data, Econometrica, 37(1), pp. 55--72.

Examples

Run this code
data("Produc", package = "plm")
zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
          data = Produc, index = c("state","year"))
summary(zz)

Run the code above in your browser using DataLab