formula.fixest | R Documentation |
fixest
fitThis function extracts the formula from a fixest
estimation (obtained with femlm
,
feols
or feglm
). If the estimation was done with fixed-effects, they are added
in the formula after a pipe (“|”). If the estimation was done with a non
linear in parameters part, then this will be added in the formula in between I()
.
## S3 method for class 'fixest'
formula(x, type = c("full", "linear", "iv", "NL"), ...)
x |
An object of class |
type |
A character scalar. Default is |
... |
Not currently used. |
It returns a formula.
Laurent Berge
See also the main estimation functions femlm
, feols
or feglm
.
model.matrix.fixest
, update.fixest
, summary.fixest
, vcov.fixest
.
# simple estimation on iris data, using "Species" fixed-effects
res = femlm(Sepal.Length ~ Sepal.Width + Petal.Length +
Petal.Width | Species, iris)
# formula with the fixed-effect variable
formula(res)
# linear part without the fixed-effects
formula(res, "linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.