Almost all of the dedicated fixest methods that yield confidence intervals do so using a t-distribution. (See also https://github.com/lrberge/fixest/issues/362#issuecomment-1275200731.) A notable exception can be found in the coefplot/iplot functions, which currently use a normal distribution:
The importance of this difference obviously diminishes with the size of the dataset (since DoF -> Inf). But it does create an awkward situation where the figures from coefplot/iplot don't necessarily correspond to the results from, say, etable.
This PR brings the CIs from coefplot and iplot into alignment with the other fixest methods. I've tried to include some catches so that, if it can't extract the right DoF from the model object for some reason, it will default to Inf and thus effectively revert back to a normal distribution.
Almost all of the dedicated fixest methods that yield confidence intervals do so using a t-distribution. (See also https://github.com/lrberge/fixest/issues/362#issuecomment-1275200731.) A notable exception can be found in the
coefplot
/iplot
functions, which currently use a normal distribution:https://github.com/lrberge/fixest/blob/d8fb28abb9cca39da28697ec705a1a10169423d7/R/coefplot.R#L1660-L1661
The importance of this difference obviously diminishes with the size of the dataset (since DoF -> Inf). But it does create an awkward situation where the figures from
coefplot
/iplot
don't necessarily correspond to the results from, say,etable
.This PR brings the CIs from
coefplot
andiplot
into alignment with the other fixest methods. I've tried to include some catches so that, if it can't extract the right DoF from the model object for some reason, it will default to Inf and thus effectively revert back to a normal distribution.Here is the current behaviour (fixest 0.11.1):
Created on 2023-04-02 with reprex v2.0.2
And the same code following this PR:
Created on 2023-04-02 with reprex v2.0.2