check_conv_feols function

Check the fixed-effects convergence of a feols estimation

Check the fixed-effects convergence of a feols estimation

Checks the convergence of a feols estimation by computing the first-order conditions of all fixed-effects (all should be close to 0)

check_conv_feols(x) ## S3 method for class 'fixest_check_conv' summary(object, type = "short", ...)

Arguments

  • x: A feols estimation that should contain fixed-effects.

  • object: An object returned by check_conv_feols.

  • type: Either "short" (default) or "detail". If "short", only the maximum absolute FOC are displayed, otherwise the 2 smallest and the 2 largest FOC are reported for each fixed-effect and each variable.

  • ...: Not currently used.

    Note that this function first re-demeans the variables, thus possibly incurring some extra computation time.

Returns

It returns a list of N elements, N being the number of variables in the estimation (dependent variable + explanatory variables +, if IV, endogenous variables and instruments). For each variable, all the first-order conditions for each fixed-effect are returned.

Examples

base = setNames(iris, c("y", "x1", "x2", "x3", "species")) base$FE = rep(1:30, 5) # one estimation with fixed-effects + varying slopes est = feols(y ~ x1 | species[x2] + FE[x3], base) # Checking the convergence conv = check_conv_feols(est) # We can check that al values are close to 0 summary(conv) summary(conv, "detail")