tidy.dpm {dpm} | R Documentation |
Tidy methods for dpm
Description
dpm
objects support the broom package's tidy
method.
Usage
## S3 method for class 'dpm'
tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
## S3 method for class 'dpm'
glance(x, ...)
Arguments
x |
A |
conf.int |
Logical indicating whether or not to include a confidence interval in the tidy data frame. |
conf.level |
The confidence level to use for the confidence interval
when |
... |
Other arguments passed to summary.dpm. |
Value
A tibble::tibble() with information about model components. These will be
coefficient estimates (for tidy()
) or model fit (for glance()
),
following the naming standards established by the broom package.
Examples
if (requireNamespace("broom")) {
library(broom)
# Load example data
data("WageData", package = "panelr")
# Convert data to panel_data format for ease of use
wages <- panel_data(WageData, id = id, wave = t)
fit <- dpm(wks ~ pre(lag(union)) + lag(lwage) | ed, data = wages)
tidy(fit)
}
[Package dpm version 1.2.0 Index]