tidy.dpm | R Documentation |
dpm
objects support the broom package's tidy
method.
## S3 method for class 'dpm'
tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
## S3 method for class 'dpm'
glance(x, ...)
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. |
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.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.