resid.fixest_multi | R Documentation |
fixest_multi
objectUtility to extract the residuals from multiple fixest
estimations. If possible,
all the residuals are coerced into a matrix.
## S3 method for class 'fixest_multi'
resid(
object,
type = c("response", "deviance", "pearson", "working"),
na.rm = FALSE,
...
)
## S3 method for class 'fixest_multi'
residuals(
object,
type = c("response", "deviance", "pearson", "working"),
na.rm = FALSE,
...
)
object |
A |
type |
A character scalar, either |
na.rm |
Logical, default is |
... |
Not currently used. |
If all the models return residuals of the same length, a matrix is returned. Otherwise,
a list
is returned.
base = iris
names(base) = c("y", "x1", "x2", "x3", "species")
# A multiple estimation
est = feols(y ~ x1 + csw0(x2, x3), base)
# We can get all the residuals at once,
# each column is a model
head(resid(est))
# We can select/order the model using fixest_multi extraction
head(resid(est[rhs = .N:1]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.