The summary method for plm objects generates some more information about estimated plm models.
# S3 method for class 'plm.list'
summary(object, ...)
# S3 method for class 'summary.plm.list'
coef(object, eq = NULL, ...)
# S3 method for class 'summary.plm.list'
print(
x,
digits = max(3, getOption("digits") - 2),
width = getOption("width"),
...
)
# S3 method for class 'plm'
summary(object, vcov = NULL, ...)
# S3 method for class 'summary.plm'
print(
x,
digits = max(3, getOption("digits") - 2),
width = getOption("width"),
subset = NULL,
...
)an object of class "plm",
further arguments.
the selected equation for list objects
an object of class "summary.plm",
number of digits for printed output,
the maximum length of the lines in the printed output,
a variance–covariance matrix furnished by the user or a function to calculate one (see Examples),
a character or numeric vector indicating a subset of
the table of coefficients to be printed for
"print.summary.plm",
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:
'htest' object: joint test of significance of
coefficients (F or Chi-square test) (robust statistic in case of
supplied argument vcov, see pwaldtest() for details),
a matrix with the estimated coefficients,
standard errors, t–values, and p–values, if argument vcov was
set to non-NULL the standard errors (and t– and p–values) in
their respective robust variant,
the "regular" variance–covariance matrix of the coefficients (class "matrix"),
only present if argument vcov was set to non-NULL:
the furnished variance–covariance matrix of the coefficients
(class "matrix"),
a named numeric containing the R-squared ("rsq") and the adjusted R-squared ("adjrsq") of the model,
an integer vector with 3 components, (p, n-p, p*), where p is the number of estimated (non-aliased) coefficients of the model, n-p are the residual degrees of freedom (n being number of observations), and p* is the total number of coefficients (incl. any aliased ones).
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).
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;
stats::print.power.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()
data("Produc", package = "plm")
zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, index = c("state","year"))
summary(zz)
#> Oneway (individual) effect Within Model
#>
#> Call:
#> plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
#> data = Produc, index = c("state", "year"))
#>
#> Balanced Panel: n = 48, T = 17, N = 816
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -0.120456 -0.023741 -0.002041 0.018144 0.174718
#>
#> Coefficients:
#> Estimate Std. Error t-value Pr(>|t|)
#> log(pcap) -0.02614965 0.02900158 -0.9017 0.3675
#> log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 ***
#> log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 ***
#> unemp -0.00529774 0.00098873 -5.3582 1.114e-07 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Total Sum of Squares: 18.941
#> Residual Sum of Squares: 1.1112
#> R-Squared: 0.94134
#> Adj. R-Squared: 0.93742
#> F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16
# summary with a furnished 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))
#> Oneway (individual) effect Within Model
#>
#> Note: Coefficient variance-covariance matrix supplied: vcovHC(wi)
#>
#> Call:
#> plm(formula = inv ~ value + capital, data = Grunfeld, effect = "individual",
#> model = "within")
#>
#> Balanced Panel: n = 10, T = 20, N = 200
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -184.00857 -17.64316 0.56337 19.19222 250.70974
#>
#> Coefficients:
#> Estimate Std. Error t-value Pr(>|t|)
#> value 0.110124 0.014342 7.6783 8.566e-13 ***
#> capital 0.310065 0.049793 6.2271 3.033e-09 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Total Sum of Squares: 2244400
#> Residual Sum of Squares: 523480
#> R-Squared: 0.76676
#> Adj. R-Squared: 0.75311
#> F-statistic: 31.7744 on 2 and 9 DF, p-value: 8.3417e-05
summary(wi, vcov = vcovHC)
#> Oneway (individual) effect Within Model
#>
#> Note: Coefficient variance-covariance matrix supplied: vcovHC
#>
#> Call:
#> plm(formula = inv ~ value + capital, data = Grunfeld, effect = "individual",
#> model = "within")
#>
#> Balanced Panel: n = 10, T = 20, N = 200
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -184.00857 -17.64316 0.56337 19.19222 250.70974
#>
#> Coefficients:
#> Estimate Std. Error t-value Pr(>|t|)
#> value 0.110124 0.014342 7.6783 8.566e-13 ***
#> capital 0.310065 0.049793 6.2271 3.033e-09 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Total Sum of Squares: 2244400
#> Residual Sum of Squares: 523480
#> R-Squared: 0.76676
#> Adj. R-Squared: 0.75311
#> F-statistic: 31.7744 on 2 and 9 DF, p-value: 8.3417e-05
summary(wi, vcov = function(x) vcovHC(x, method = "white2"))
#> Oneway (individual) effect Within Model
#>
#> Note: Coefficient variance-covariance matrix supplied: function(x) vcovHC(x, method = "white2")
#>
#> Call:
#> plm(formula = inv ~ value + capital, data = Grunfeld, effect = "individual",
#> model = "within")
#>
#> Balanced Panel: n = 10, T = 20, N = 200
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -184.00857 -17.64316 0.56337 19.19222 250.70974
#>
#> Coefficients:
#> Estimate Std. Error t-value Pr(>|t|)
#> value 0.110124 0.018925 5.8191 2.51e-08 ***
#> capital 0.310065 0.027787 11.1585 < 2.2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Total Sum of Squares: 2244400
#> Residual Sum of Squares: 523480
#> R-Squared: 0.76676
#> Adj. R-Squared: 0.75311
#> F-statistic: 117.915 on 2 and 9 DF, p-value: 3.5011e-07
# 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 coefficient "value"
print(wi_summary, subset = "value")
#> Oneway (individual) effect Within Model
#>
#> Call:
#> plm(formula = inv ~ value + capital, data = Grunfeld, effect = "individual",
#> model = "within")
#>
#> Balanced Panel: n = 10, T = 20, N = 200
#>
#> Residuals:
#> Min. 1st Qu. Median 3rd Qu. Max.
#> -184.00857 -17.64316 0.56337 19.19222 250.70974
#>
#> Coefficients:
#> Estimate Std. Error t-value Pr(>|t|)
#> value 0.110124 0.011857 9.2879 < 2.2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Total Sum of Squares: 2244400
#> Residual Sum of Squares: 523480
#> R-Squared: 0.76676
#> Adj. R-Squared: 0.75311
#> F-statistic: 309.014 on 2 and 188 DF, p-value: < 2.22e-16