data("WageData", package = "panelr")
wages <- panel_data(WageData, id = id, wave = t)
fit <- dpm(wks ~ pre(lag(union)) + lag(lwage), data = wages)
# Re-run model without `lag(lwage)` term
update(fit, . ~ . - lag(lwage))
Run the code above in your browser using DataLab