genmodel {penppml} | R Documentation |
Generating Model Structure
Description
genmodel
transforms a data frame into the needed components for our main functions (a y vector,
a x matrix and a fes list).
Usage
genmodel(
data,
dep = NULL,
indep = NULL,
fixed = NULL,
cluster = NULL,
selectobs = NULL
)
Arguments
data |
A data frame containing all relevant variables. |
dep |
A string with the name of the independent variable or a column number. |
indep |
A vector with the names or column numbers of the regressors. If left unspecified, all remaining variables (excluding fixed effects) are included in the regressor matrix. |
fixed |
A vector with the names or column numbers of factor variables identifying the fixed effects,
or a list with the desired interactions between variables in |
cluster |
Optional. A string with the name of the clustering variable or a column number. It's also possible to input a vector with several variables, in which case the interaction of all of them is taken as the clustering variable. |
selectobs |
Optional. A vector indicating which observations to use. |
Value
A list with four elements:
-
y
: y vector. -
x
: x matrix. -
fes
: list of fixed effects. -
cluster
: cluster vector.