dpm objects support the broom package's tidy method.

tidy.dpm(x, conf.int = FALSE, conf.level = 0.95, ...)

Arguments

x

A dpm object.

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 conf.int is TRUE. Default is .95, corresponding to a 95 interval.

...

Other arguments passed to summary.dpm.

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) }
#> Loading required namespace: broom
#> # A tibble: 4 x 5 #> term estimate std.error statistic p.value #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 union (t - 1) -1.19 0.513 -2.32 0.0203 #> 2 lwage (t - 1) 0.642 0.484 1.33 0.185 #> 3 ed -0.112 0.0558 -2.01 0.0443 #> 4 wks (t - 1) 0.187 0.0202 9.28 0