This is an interface to the internal functions that process data for
fdm()
, asym()
, and asym_gee()
.
make_diff_data(
formula,
data,
id = NULL,
wave = NULL,
use.wave = FALSE,
min.waves = 1,
weights = NULL,
offset = NULL,
asym = FALSE,
cumulative = FALSE,
escape.names = FALSE,
...
)
Model formula. See details for crucial
info on panelr
's formula syntax.
The data, either a panel_data
object or data.frame
.
If data
is not a panel_data
object, then the name of the
individual id column as a string. Otherwise, leave as NULL, the default.
If data
is not a panel_data
object, then the name of the
panel wave column as a string. Otherwise, leave as NULL, the default.
Should the wave be included as a predictor? Default is FALSE.
What is the minimum number of waves an individual must
have participated in to be included in the analysis? Default is 2
and
any valid number is accepted. "all"
is also acceptable if you want to
include only complete panelists.
If using weights, either the name of the column in the data that contains the weights or a vector of the weights.
this can be used to specify an a priori known
component to be included in the linear predictor during
fitting. This should be NULL
or a numeric vector of length
equal to the number of cases. One or more offset
terms can be included in the formula instead or as well, and if more
than one is specified their sum is used. See model.offset
.
Return asymmetric effects transformed data? Default is FALSE.
Return cumulative positive/negative differences, most useful for fixed effects estimation and/or generalized linear models? Default is FALSE.
Return only syntactically valid variable names? Default is FALSE.
Ignored.
data("WageData")
wages <- panel_data(WageData, id = id, wave = t)
make_diff_data(wks ~ lwage + union, data = wages)
Run the code above in your browser using DataLab