Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

obs

Extracts the observations used for the estimation


Description

This function extracts the observations used in fixest estimation.

Usage

obs(x)

Arguments

x

A fixest object.

Value

It returns a simple vector of integers.

Examples

base = iris
names(base) = c("y", "x1", "x2", "x3", "species")
base$y[1:5] = NA

# Split sample estimations
est_split = feols(y ~ x1, base, split = ~species)
(obs_setosa = obs(est_split$setosa))
(obs_versi = obs(est_split$versicolor))

est_versi = feols(y ~ x1, base, subset = obs_versi)

etable(est_split, est_versi)

fixest

Fast Fixed-Effects Estimations

v0.10.0
GPL-3
Authors
Laurent Berge [aut, cre], Sebastian Krantz [ctb], Grant McDermott [ctb] (<https://orcid.org/0000-0001-7883-8573>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.