broom (version 0.3.7)

plm_tidiers: Tidiers for panel regression linear models

Description

Tidiers for panel regression linear models

Usage

## S3 method for class 'plm':
tidy(x, conf.int = FALSE, conf.level = 0.95,
  exponentiate = FALSE, ...)

## S3 method for class 'plm': augment(x, data = as.data.frame(model.frame(x)), ...)

## S3 method for class 'plm': glance(x, ...)

Arguments

x
a "plm" object representing a panel object
conf.int
whether to include a confidence interval
conf.level
confidence level of the interval, used only if conf.int=TRUE
exponentiate
whether to exponentiate the coefficient estimates and confidence intervals
...
extra arguments, not used
data
original dataset

Value

  • All tidying methods return a data.frame without rownames, whose structure depends on the method chosen.

    tidy.plm returns a data frame with one row per coefficient, of the same form as tidy.lm.

    augment returns a data frame with one row for each initial observation, adding the columns

  • .fittedpredicted (fitted) values
  • .residresiduals
  • glance returns a one-row data frame with columns
  • r.squaredThe percent of variance explained by the model
  • adj.r.squaredr.squared adjusted based on the degrees of freedom
  • statisticF-statistic
  • p.valuep-value from the F test, describing whether the full regression is significant
  • deviancedeviance
  • df.residualresidual degrees of freedom

See Also

lm_tidiers

Examples

Run this code
if (require("plm", quietly = TRUE)) {
    data("Produc", package = "plm")
    zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
              data = Produc, index = c("state","year"))

    summary(zz)

    tidy(zz)
    tidy(zz, conf.int = TRUE)
    tidy(zz, conf.int = TRUE, conf.level = .9)

    head(augment(zz))

    glance(zz)
}

Run the code above in your browser using DataLab