confint.fixest {fixest} | R Documentation

## Confidence interval for parameters estimated with `fixest`

### Description

This function computes the confidence interval of parameter estimates obtained from a model estimated with `femlm`, `feols` or `feglm`.

### Usage

    ## S3 method for class 'fixest'
    confint(object, parm, level = 0.95, se, cluster,
      dof = TRUE, ...)

### Arguments

`object` | A `fixest` object. Obtained using the functions `femlm`, `feols` or `feglm`.
`parm` | The parameters for which to compute the confidence interval (either an integer vector OR a character vector with the parameter name). If missing, all parameters are used.
`level` | The confidence level. Default is 0.95.
`se` | Character scalar. Which kind of standard error should be computed: “standard”, “White”, “cluster”, “twoway”, “threeway” or “fourway”? By default if there are clusters in the estimation: `se = "cluster"`, otherwise `se = "standard"`. Note that this argument can be implicitly deduced from the argument `cluster`.

`cluster`

Tells how to cluster the standard-errors (if clustering is requested). Can be either a list of vectors, a character vector of variable names, a formula or an integer vector. Assume we want to perform 2-way clustering over `var1` and `var2` contained in the data.frame `base` used for the estimation. All the following `cluster` arguments are valid and do the same thing: `cluster = base[, c("var1, "var2")]}, \code{cluster = c("var1, "var2")`, `cluster = ~var1+var2`. If the two variables were used as clusters in the estimation, you could further use `cluster = 1:2` or leave it blank with `se = "twoway"` (assuming `var1` [resp. `var2`] was the 1st [res. 2nd] cluster).

`dof` | Logical, default is `TRUE`. Should there be a degree of freedom correction to the standard errors of the coefficients?
`...` | Not currently used.

### Value

Returns a data.frame with two columns giving respectively the lower and upper bound of the confidence interval. There is as many rows as parameters.

### Author(s)

Laurent Berge

### Examples

    # Load trade data
    data(trade)

    # We estimate the effect of distance on trade (with 3 cluster effects)
    est_pois = femlm(Euros ~ log(dist_km) + log(Year) | Origin + Destination +
                     Product, trade)

    # confidence interval with "normal" VCOV
    confint(est_pois)

    # confidence interval with "clustered" VCOV (w.r.t. the Origin factor)
    confint(est_pois, se = "cluster")

[Package fixest version 0.1.0 Index]