get_wide_data {dpm} | R Documentation |
Retrieve wide-format data from fitted dpm model
Description
This helper function provides a simple way to retrieve the
widened data from a fitted dpm()
object.
Usage
get_wide_data(model)
Arguments
model |
A |
Value
A data.frame
with input data transformed from "long" to "wide"
format, with just one row per person/entity. Internally, this is
generated by calling panelr::widen_panel()
after some
preprocessing.
Examples
data("WageData", package = "panelr")
wages <- panel_data(WageData, id = id, wave = t)
fit <- dpm(wks ~ pre(lag(union)) + lag(lwage), data = wages)
get_wide_data(fit)
[Package dpm version 1.2.0 Index]