Skip to contents

This function extracts the terms of a fixest estimation, excluding the fixed-effects part.

Usage

# S3 method for fixest
terms(x, ...)

Arguments

x

A fixest object. Obtained using the functions femlm, feols or feglm.

...

Not currently used.

Value

An object of class c("terms", "formula") which contains the terms representation of a symbolic model.

Examples


# simple estimation on iris data, using "Species" fixed-effects
res = feols(Sepal.Length ~ Sepal.Width*Petal.Length +
            Petal.Width | Species, iris)

# Terms of the linear part
terms(res)
#> Sepal.Length ~ Sepal.Width * Petal.Length + Petal.Width
#> attr(,"variables")
#> list(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width)
#> attr(,"factors")
#>              Sepal.Width Petal.Length Petal.Width Sepal.Width:Petal.Length
#> Sepal.Length           0            0           0                        0
#> Sepal.Width            1            0           0                        1
#> Petal.Length           0            1           0                        1
#> Petal.Width            0            0           1                        0
#> attr(,"term.labels")
#> [1] "Sepal.Width"              "Petal.Length"            
#> [3] "Petal.Width"              "Sepal.Width:Petal.Length"
#> attr(,"order")
#> [1] 1 1 1 2
#> attr(,"intercept")
#> [1] 1
#> attr(,"response")
#> [1] 1
#> attr(,".Environment")
#> <environment: 0x000001cf443407d8>