| obs | R Documentation |
This function extracts the observations used in fixest estimation.
The stats::case.names S3 method calls this function
obs(x)
## S3 method for class 'fixest'
case.names(object, ...)
x |
A |
object |
A |
... |
Ignored |
It returns a simple vector of integers.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.