make_wb_data | R Documentation |
This function allows users to make the changes to their data
that occur in wbm()
without having to fit the model.
make_wb_data(
formula,
data,
id = NULL,
wave = NULL,
model = "w-b",
detrend = FALSE,
use.wave = FALSE,
wave.factor = FALSE,
min.waves = 2,
balance.correction = FALSE,
dt.random = TRUE,
dt.order = 1,
weights = NULL,
offset = NULL,
interaction.style = c("double-demean", "demean", "raw"),
...
)
formula |
Model formula. See details for crucial
info on |
data |
The data, either a |
id |
If |
wave |
If |
model |
One of |
detrend |
Adjust within-subject effects for trends in the predictors? Default is FALSE, but some research suggests this is a better idea (see Curran and Bauer (2011) reference). |
use.wave |
Should the wave be included as a predictor? Default is FALSE. |
wave.factor |
Should the wave variable be treated as an unordered factor instead of continuous? Default is FALSE. |
min.waves |
What is the minimum number of waves an individual must
have participated in to be included in the analysis? Default is |
balance.correction |
Correct between-subject effects for unbalanced panels following the procedure in Curran and Bauer (2011)? Default is FALSE. |
dt.random |
Should the detrending procedure be performed with a random slope for each entity? Default is TRUE but for short panels FALSE may be better, fitting a trend for all entities. |
dt.order |
If detrending using |
weights |
If using weights, either the name of the column in the data that contains the weights or a vector of the weights. |
offset |
this can be used to specify an a priori known
component to be included in the linear predictor during
fitting. This should be |
interaction.style |
The best way to calculate interactions in within
models is in some dispute. The conventional way ( |
... |
Additional arguments provided to |
A panel_data
object with the requested specification.
data("WageData")
wages <- panel_data(WageData, id = id, wave = t)
make_wb_data(lwage ~ wks + union | fem, data = wages)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.