Learn R Programming

fixest (version 0.7.1)

fitstat: Computes fit statistics of fixest objects

Description

Computes various fit statistics for fixest estimations.

Usage

fitstat(x, type, as.list = FALSE, ...)

Arguments

x

A fixest estimation.

type

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.

as.list

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").

Value

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.

Examples

Run this code
# 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