obs {fixest} | R Documentation |
Extracts the observations used for the estimation
Description
This function extracts the observations used in fixest
estimation.
Usage
obs(x)
Arguments
x |
A |
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[[1]]))
(obs_versi = obs(est_split[sample = "versi", drop = TRUE]))
est_versi = feols(y ~ x1, base, subset = obs_versi)
etable(est_split, est_versi)
[Package fixest version 0.12.1 Index]