
Last chance! 50% off unlimited learning
Sale ends in
Computes various fit statistics for fixest
estimations.
fitstat(x, type, as.list = FALSE, ...)
A fixest
estimation.
Character vector. The type of fit statistic to be computed. So far, "G"
, the 'working' number of observations, and 'theta'
, the over-dispersion parameter in negative binomial estimation, are available.
Logical, default is FALSE
. Only used when one statistic is to be computed (i.e. arg. type
is of length 1). If TRUE
, then a list whose name is the type
is returned containing the statistic.
Other elements to be passed to other methods and may be used to compute the statistics (for example you can pass on arguments to compute the VCOV when using type = "G"
).
If two or more types are to be computed, then a list is returned whose names correstpond to the argument type
. If only one type is to be computed, then by default the result is simplified to a vector (or list, it depends on the type) containing the statistics; to return a list instead, as.list=TRUE
needs to be used.
# NOT RUN {
data(trade)
gravity = feols(log(Euros) ~ log(dist_km) | Destination + Origin, trade)
# Extracting the 'working' number of observations used to compute the pvalues
fitstat(gravity, "G")
# Idem, but when coimputing two-way SEs
fitstat(gravity, "G", se = "standard")
# }
Run the code above in your browser using DataLab