genmodel | R Documentation |
genmodel
transforms a data frame into the needed components for our main functions (a y vector,
a x matrix and a fes list).
genmodel(
data,
dep = NULL,
indep = NULL,
fixed = NULL,
cluster = NULL,
selectobs = NULL
)
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. |
A list with four elements:
y
: y vector.
x
: x matrix.
fes
: list of fixed effects.
cluster
: cluster vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.