ercomp  R Documentation 
This function enables the estimation of the variance components of a panel model.
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), ...)
object 
a 
... 
further arguments. 
effect 
the effects introduced in the model, see 
method 
method of estimation for the variance components, see

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 
x 
an 
digits 
digits, 
An object of class "ercomp"
: a list containing
sigma2
a named numeric with estimates of the variance
components,
theta
contains the parameter(s) used for
the transformation of the variables: For a oneway model, a
numeric corresponding to the selected effect (individual or
time); for a twoways model a list of length 3 with the
parameters. In case of a balanced model, the numeric has length
1 while for an unbalanced model, the numerics' length equal the
number of observations.
Yves Croissant
AMEM:71plm
\insertRefNERLO:71plm
\insertRefSWAM:AROR:72plm
\insertRefWALL:HUSS:69plm
plm()
where the estimates of the variance components are
used if a random effects model is estimated
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 twoways model
ercomp(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc,
method = "amemiya", effect = "twoways")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.