This function sets globally the default arguments of fixest estimations.

setFixest_estimation( data = NULL, panel.id = NULL, fixef.rm = "perfect", fixef.tol = 1e-06, fixef.iter = 10000, collin.tol = 1e-10, lean = FALSE, verbose = 0, warn = TRUE, combine.quick = NULL, demeaned = FALSE, mem.clean = FALSE, glm.iter = 25, glm.tol = 1e-08, reset = FALSE ) getFixest_estimation()

data | A data.frame containing the necessary variables to run the model. The variables of the non-linear right hand side of the formula are identified with this |
---|---|

panel.id | The panel identifiers. Can either be: i) a one sided formula (e.g. |

fixef.rm | Can be equal to "perfect" (default), "singleton", "both" or "none". Controls which observations are to be removed. If "perfect", then observations having a fixed-effect with perfect fit (e.g. only 0 outcomes in Poisson estimations) will be removed. If "singleton", all observations for which a fixed-effect appears only once will be removed. The meaning of "both" and "none" is direct. |

fixef.tol | Precision used to obtain the fixed-effects. Defaults to |

fixef.iter | Maximum number of iterations in fixed-effects algorithm (only in use for 2+ fixed-effects). Default is 10000. |

collin.tol | Numeric scalar, default is |

lean | Logical, default is |

verbose | Integer. Higher values give more information. In particular, it can detail the number of iterations in the demeaning algorithm (the first number is the left-hand-side, the other numbers are the right-hand-side variables). |

warn | Logical, default is |

combine.quick | Logical. When you combine different variables to transform them into a single fixed-effects you can do e.g. |

demeaned | Logical, default is |

mem.clean | Logical, default is |

glm.iter | Number of iterations of the glm algorithm. Default is 25. |

glm.tol | Tolerance level for the glm algorithm. Default is |

reset | Logical, default to |

The function `getFixest_estimation`

returns the currently set global defaults.

# # Example: removing singletons is FALSE by default # # => changing this default # Let's create data with singletons base = iris names(base) = c("y", "x1", "x2", "x3", "species") base$fe_singletons = as.character(base$species) base$fe_singletons[1:5] = letters[1:5] res = feols(y ~ x1 + x2 | fe_singletons, base) res_noSingle = feols(y ~ x1 + x2 | fe_singletons, base, fixef.rm = "single") #> NOTE: 5 fixed-effect singletons were removed (5 observations). # New defaults setFixest_estimation(fixef.rm = "single") res_newDefault = feols(y ~ x1 + x2 | fe_singletons, base) #> NOTE: 5 fixed-effect singletons were removed (5 observations). etable(res, res_noSingle, res_newDefault) #> res res_noSingle res_newDefault #> Dependent Var.: y y y #> #> x1 0.4274* (0.1409) 0.4274 (0.1615) 0.4274 (0.1615) #> x2 0.7774*** (0.1099) 0.7774* (0.1260) 0.7774* (0.1260) #> Fixed-Effects: ------------------ ---------------- ---------------- #> fe_singletons Yes Yes Yes #> _______________ __________________ ________________ ________________ #> S.E.: Clustered by: fe_singletons by: fe_singlet.. by: fe_singlet.. #> Observations 150 145 145 #> R2 0.86452 0.85729 0.85729 #> Within R2 0.64201 0.64201 0.64201 #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 # Resetting the defaults setFixest_estimation(reset = TRUE)