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)
}
Run the code above in your browser using DataLab