General estimator useful for testing the within specification

piest(formula, data, subset, na.action, index = NULL, robust = TRUE, ...)

# S3 method for class 'piest'
print(x, ...)

# S3 method for class 'piest'
summary(object, ...)

# S3 method for class 'summary.piest'
print(
  x,
  digits = max(3, getOption("digits") - 2),
  width = getOption("width"),
  subset = NULL,
  ...
)

Arguments

formula

a symbolic description for the model to be estimated,

data

a data.frame,

subset

see lm(),

na.action

see lm(),

index

the indexes,

robust

logical, if FALSE, the error is assumed to be spherical, if TRUE, a robust estimation of the covariance matrix is computed,

...

further arguments.

object, x

an object of class "piest" and of class "summary.piest" for the print method of summary for piest objects,

digits

number of digits for printed output,

width

the maximum length of the lines in the printed output,

Value

An object of class "piest".

Details

The Chamberlain method consists in using the covariates of all the periods as regressors. It allows to test the within specification.

References

Chamberlain G (1982). “Multivariate regression models for panel data.” Journal of Econometrics, 18, 5–46.

See also

Author

Yves Croissant

Examples


data("RiceFarms", package = "plm")
pirice <- piest(log(goutput) ~ log(seed) + log(totlabor) + log(size), RiceFarms, index = "id")
summary(pirice)
#>                   Estimate Std. Error z-value  Pr(>|z|)    
#> log(seed)        0.1096449  0.0157087  6.9799 2.954e-12 ***
#> log(totlabor)    0.2261224  0.0168539 13.4166 < 2.2e-16 ***
#> log(size)        0.6575833  0.0226042 29.0912 < 2.2e-16 ***
#> log(seed).1      0.1168747  0.0282226  4.1412 3.455e-05 ***
#> log(totlabor).1  0.0440505  0.0352284  1.2504 0.2111448    
#> log(size).1     -0.2315263  0.0451630 -5.1265 2.952e-07 ***
#> log(seed).2     -0.0190152  0.0119321 -1.5936 0.1110215    
#> log(totlabor).2 -0.0261597  0.0290088 -0.9018 0.3671718    
#> log(size).2      0.0314256  0.0233416  1.3463 0.1781949    
#> log(seed).3     -0.0687868  0.0247259 -2.7820 0.0054030 ** 
#> log(totlabor).3  0.1221667  0.0294784  4.1443 3.409e-05 ***
#> log(size).3      0.0487253  0.0238871  2.0398 0.0413683 *  
#> log(seed).4      0.0132149  0.0285666  0.4626 0.6436509    
#> log(totlabor).4  0.0526304  0.0272371  1.9323 0.0533221 .  
#> log(size).4     -0.0046384  0.0443225 -0.1047 0.9166526    
#> log(seed).5     -0.1105456  0.0291603 -3.7910 0.0001501 ***
#> log(totlabor).5 -0.2277151  0.0390801 -5.8269 5.647e-09 ***
#> log(size).5      0.2376872  0.0437637  5.4311 5.599e-08 ***
#> log(seed).6      0.2556306  0.0364290  7.0172 2.263e-12 ***
#> log(totlabor).6  0.1535560  0.0354287  4.3342 1.463e-05 ***
#> log(size).6     -0.3550436  0.0422203 -8.4093 < 2.2e-16 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> 	Chamberlain's pi test
#> 
#> data:  log(goutput) ~ log(seed) + log(totlabor) + log(size)
#> chisq = 113.72, df = 87, p-value = 0.02882
#> alternative hypothesis: within specification does not apply
#>