lm function on
transformed data.plm(formula, data, subset, na.action, effect = c("individual","time","twoways"),
model = c("within","random","ht","between","pooling","fd"),
instruments = NULL, random.method = c("swar","walhus","amemiya","nerlove"),
inst.method = c("bvk","baltagi"), index = NULL, pvar = TRUE, ...)
## S3 method for class 'plm':
summary(object, ...)
## S3 method for class 'summary.plm':
print(x, digits = max(3, getOption("digits") - 2),
width = getOption("width"), ...)"plm",data.frame,lm,lm,"individual", "time" or "twoways","pooling", "within",
"between", "random", "fd" and "ht","swar" (the default
value), "amemiya", "walhus" and "nerlove","bvk" and "baltagi",TRUE, the pvar function is called,c("plm","panelmodel").
A "plm" object has the following elements :print, summary and print.summary methods.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--difference ("fd") and
between ("between"). It supports unbalanced panels and two--ways
effects (although not with all methods).
For random effect models, 4 estimators of the transformation
parameter are available : swar (Swamy and Arora),
amemiya, walhus (Wallace and Hussain) and nerlove.
Instrumental variables estimation is obtained using different
syntaxes. If for example, the model is y~x1+x2+x3, x1,
x2 are endogenous and z1, z2 are external
instruments, the model can be estimated with :
formula=y~x1+x2+x3, instruments=~x3+z1+z2,formula=y~x1+x2+x3, instruments=~.-x1-x2+z1+z2,formula=y~x1+x2+x3 | x3+z1+z2,formula=y~x1+x2+x3 | .-x1-x2+z1+z2.inst.method="bvk" or if inst.method="baltagi".
The Hausman and Taylor estimator is computed if model="ht".data("Produc", package="Ecdat")
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