ercomp {plm}R Documentation

Estimation of the error components

Description

This function enables the estimation of the variance components of a panel model.

Usage

ercomp(object, ...)

## S3 method for class 'plm'
ercomp(object, ...)

## S3 method for class 'pdata.frame'
ercomp(
  object,
  effect = c("individual", "time", "twoways", "nested"),
  method = NULL,
  models = NULL,
  dfcor = NULL,
  index = NULL,
  ...
)

## S3 method for class 'formula'
ercomp(
  object,
  data,
  effect = c("individual", "time", "twoways", "nested"),
  method = NULL,
  models = NULL,
  dfcor = NULL,
  index = NULL,
  ...
)

## S3 method for class 'ercomp'
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

object

a formula or a plm object,

...

further arguments.

effect

the effects introduced in the model, see plm() for details,

method

method of estimation for the variance components, see plm() for details,

models

the models used to estimate the variance components (an alternative to the previous argument),

dfcor

a numeric vector of length 2 indicating which degree of freedom should be used,

index

the indexes,

data

a data.frame,

x

an ercomp object,

digits

digits,

Value

An object of class "ercomp": a list containing

Author(s)

Yves Croissant

References

Amemiya T (1971). “The Estimation of the Variances in a Variance–Components Model.” International Economic Review, 12, 1–13.

Nerlove M (1971). “Further Evidence on the Estimation of Dynamic Economic Relations from a Time–Series of Cross–Sections.” Econometrica, 39, 359–382.

Swamy PAVB, Arora SS (1972). “The Exact Finite Sample Properties of the Estimators of Coefficients in the Error Components Regression Models.” Econometrica, 40, 261–275.

Wallace TD, Hussain A (1969). “The Use of Error Components Models in Combining Cross Section With Time Series Data.” Econometrica, 37(1), 55–72.

See Also

plm() where the estimates of the variance components are used if a random effects model is estimated

Examples


data("Produc", package = "plm")
# an example of the formula method
ercomp(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc,
       method = "walhus", effect = "time")
# same with the plm method
z <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
         data = Produc, random.method = "walhus",
         effect = "time", model = "random")
ercomp(z)
# a two-ways model
ercomp(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc,
       method = "amemiya", effect = "twoways")


[Package plm version 2.6-4 Index]