Learn R Programming

plm (version 1.6-5)

summary.plm: Summary for plm objects

Description

The summary method for plm objects generates some more information about estimated plm models.

Usage

"summary"(object, vcov = NULL, ..., .vcov = NULL) "print"(x, digits = max(3, getOption("digits") - 2), width = getOption("width"), subset = NULL, ...)

Arguments

object
an object of class "plm",
x
an object of class "summary.plm",
subset
a character or numeric vector indicating a subset of the table of coefficients to be printed for "print.summary.plm",
vcov
a variance--covariance matrix furnished by the user or a function to calculate one (see Examples),
.vcov
deprecated, use argument vcov,
digits
number of digits for printed output,
width
the maximum length of the lines in the printed output,
...
further arguments.

Value

An object of class c("summary.plm", "plm", "panelmodel"). Some of its elements are carried over from the associated plm object and described there (plm). The following elements are new or changed relative to the elements of a plm object:

Details

The summary method for plm objects (summary.plm) creates an object of class c("summary.plm", "plm", "panelmodel") that extends the plm object it is run on with various information about the estimated model like (inferential) statistics, see Value. It has an associated print method (print.summary.plm).

See Also

plm for estimation of various models; vcovHC for an example of a robust estimation of variance--covariance matrix; r.squared for the function to calculate R-squared; print.htest for some information about class "htest"; fixef to compute the fixed effects for "within" (=fixed effects) models and within_intercept for an "overall intercept" for such models; pwaldtest

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)

# summary with a funished vcov, passed as matrix, as function, and
# as function with additional argument
data("Grunfeld", package = "plm")
wi <- plm(inv ~ value + capital,
          data = Grunfeld, model="within", effect = "individual")
summary(wi, vcov = vcovHC(wi))
summary(wi, vcov = vcovHC)
summary(wi, vcov = function(x) vcovHC(x, method = "white2"))

# extract F statistic
wi_summary <- summary(wi)
Fstat <- wi_summary[["fstatistic"]]

# extract estimates and p-values
est <- wi_summary[["coefficients"]][ , "Estimate"]
pval <- wi_summary[["coefficients"]][ , "Pr(>|t|)"]

# print summary only for coefficent "value"
print(wi_summary, subset = "value")

Run the code above in your browser using DataLab