
Last chance! 50% off unlimited learning
Sale ends in
Last chance! 50% off unlimited learning
Sale ends in
Returns the formula(s) for the different parts of a model (like fixed or random effects, zero-inflated component, ...).
find_formula(x, ...)
A fitted model.
Currently not used.
A list of formulas that describe the model. For simple models,
only one list-element, conditional
, is returned. For more complex
models, the returned list may have following elements:
conditional
, the "fixed effects" part from the model. One exception are DirichletRegModel
models from DirichletReg, which has two or three components, depending on model
.
random
, the "random effects" part from the model (or the id
for gee-models and similar)
zero_inflated
, the "fixed effects" part from the zero-inflation component of the model
zero_inflated_random
, the "random effects" part from the zero-inflation component of the model
dispersion
, the dispersion formula
instruments
, for fixed-effects regressions like ivreg
, felm
or plm
, the instrumental variables
cluster
, for fixed-effects regressions like felm
, the cluster specification
correlation
, for models with correlation-component like gls
, the formula that describes the correlation structure
slopes
, for fixed-effects individual-slope models like feis
, the formula for the slope parameters
precision
, for DirichletRegModel
models from DirichletReg, when parametrization (i.e. model
) is "alternative"
.
# NOT RUN {
data(mtcars)
m <- lm(mpg ~ wt + cyl + vs, data = mtcars)
find_formula(m)
# }
Run the code above in your browser using DataLab