Package: fixest 0.14.2

fixest: Fast Fixed-Effects Estimations

Fast and user-friendly estimation of econometric models with multiple fixed-effects. Includes ordinary least squares (OLS), instrumental variables (IV), generalized linear models (GLM), maximum likelihood estimation (ML), and the negative binomial. The core of the package is based on optimized parallel C++ code, scaling especially well for large data sets. The method to obtain the fixed-effects coefficients is based on Bergé, Butts, McDermott (2026) <doi:10.48550/arXiv.2601.21749>. Further provides tools to export and view the results of several estimations with intuitive design to change the standard-errors.

Authors:Laurent Berge [aut, cre], Sebastian Krantz [ctb], Grant McDermott [ctb], Russell Lenth [ctb], Kyle Butts [ctb]

fixest_0.14.2.tar.gz
fixest_0.14.2.zip(r-4.7)fixest_0.14.2.zip(r-4.6)fixest_0.14.2.zip(r-4.5)
fixest_0.14.2.tgz(r-4.6-x86_64)fixest_0.14.2.tgz(r-4.6-arm64)fixest_0.14.2.tgz(r-4.5-x86_64)fixest_0.14.2.tgz(r-4.5-arm64)
fixest_0.14.2.tar.gz(r-4.7-arm64)fixest_0.14.2.tar.gz(r-4.7-x86_64)fixest_0.14.2.tar.gz(r-4.6-arm64)fixest_0.14.2.tar.gz(r-4.6-x86_64)
fixest_0.14.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
fixest/json (API)

# Install 'fixest' in R:
install.packages('fixest', repos = c('https://lrberge.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/lrberge/fixest/issues

Pkgdown/docs site:https://lrberge.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • base_did - Sample data for difference in difference
  • base_pub - Publication data sample
  • base_stagg - Sample data for staggered difference in difference
  • fulton - Fulton Fish Market data
  • trade - Trade data sample

On CRAN:

Conda:

cppopenmp

16.25 score 446 stars 33 packages 11k scripts 51k downloads 1 mentions 92 exports 9 dependencies

Last updated from:789f888416. Checks:11 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE253
linux-devel-x86_64NOTE247
source / vignettesOK359
linux-release-arm64NOTE240
linux-release-x86_64NOTE272
macos-release-arm64NOTE149
macos-release-x86_64NOTE354
macos-oldrel-arm64NOTE152
macos-oldrel-x86_64NOTE474
windows-develNOTE248
windows-releaseNOTE258
windows-oldrelNOTE293
wasm-releaseOK197

Exports:.las.dictbinbreadcheck_conv_feolscoefplotcoeftablecollinearityconleyddegrees_freedomdemeandemeaning_algodid_meansDKdriscoll_kraaydsbest_envestfunesttableesttexetableextralines_registerffdimfeglmfeglm.fitfemlmfenegbinfeNmlmfeolsfeols.fitfepoisfitstatfitstat_registerfixeffixest_datafixest_startup_msggetFixest_coefplotgetFixest_dictgetFixest_estimationgetFixest_etablegetFixest_fmlgetFixest_multigetFixest_notesgetFixest_nthreadsgetFixest_printgetFixest_sscgetFixest_vcoviiplotllag_fmllog_etablemodelsn_modelsn_uniknewey_westNWobsosizepanelpvaluer2refsample_dfsesetFixest_coefplotsetFixest_dictsetFixest_estimationsetFixest_etablesetFixest_fmlsetFixest_multisetFixest_notessetFixest_nthreadssetFixest_printsetFixest_sscsetFixest_vcovsparse_model_matrixsscstyle.dfstyle.texto_integertstatunpanelvcov_clustervcov_conleyvcov_DKvcov_heterovcov_NWwaldxpd

Dependencies:dreamerrFormulalatticenlmenumDerivRcppsandwichstringmagiczoo

Exporting estimation tables
Preliminaries | Displaying tables in the console | Styling console output with style.df | Postprocessing with postprocess.df | Setting default values | Exporting tables to LaTeX | Styling LaTeX output with style.tex | Postprocessing with postprocess.tex | Setting default values: LaTeX edition | Highlighting coefficients | Frame | Row colors | Style | LaTeX extras | threeparttable | adjustbox | makecell | Exporting tables to other formats | Exporting tables as PNGs | Quarto and Rmarkdown: argument markdown | CSS for custom HTML output | Monitoring the look of the tables: the argument page.width | RStudio and Positron (VS Code): argument view | Custom fit statistics | Other tabling software

Last update: 2026-06-26
Started: 2020-07-10

On Standard Errors
Review of theory | FWL for variance-covariance matrix | Generalized linear models | How standard-errors are computed in fixest | The argument vcov | Classical standard errors | Heteroskedasticity-robust standard errors | Cluster-robust standard errors | Heteroskedasticity and auto-corrleation robust standard errors | Spatial-correlation robust standard errors | Other options | Small sample correction | Yet more details | Replicating standard-errors from other methods | The data set and heteroskedasticity-robust SEs | "IID" SEs in the presence of fixed-effects | Clustered SEs | HAC SEs | Other multiple fixed-effects methods | Defining how to compute the standard-errors once and for all | Changelog | References & acknowledgments

Last update: 2026-06-26
Started: 2020-07-04

On collinearity
What collinearity is | This document's definitions | Why collinearity can be a problem | Technical reason | Substantial reason | When is collinearity a problem? | The model is misspecified | Example 1: Gender gap in publications | Example 2: Sneaky misspecification | Econometrics software and collinearity | Detecting collinearity: Automatic variable removal algorithms | Collinearity is a numerical problem | When automatic removal is good | When automatic removal bites

Last update: 2026-06-25
Started: 2024-08-27

Fast Fixed-Effects Estimation: Short Introduction
Simple example using trade data | Estimation | Clustering the standard-errors | Other standard-errors | Other estimation functions | Viewing the results in R | Multiple estimations | Exporting the results to Latex | An elaborate example | Extracting the fixed-effects coefficients | The vcov argument | Basics: main calls and shortcuts | Using dedicated functions | Small sample correction | Other types of VCOVs | Instrumental variables | Interaction terms | Interactions involving fixed-effects | Combining several fixed-effects (fe1^fe2^fe3...) | Varying slopes (fe[x]) | Interactions that don't involve fixed-effects | A compact syntax for factors and interactions: i() | Simple difference-in-differences (TWFE) | Staggered difference-in-differences (Sun and Abraham, 2020) | Additional features | Formula: macros and dot square brackets | Formula macros | The dot square bracket operator | Lagging variables | Lagging variables in an estimation | Setting up a panel data set | Creating lag/lead variables | Non-linear in parameters example | Adding fixed-effects to non-linear in parameters models | Multi-threading

Last update: 2026-05-27
Started: 2019-08-02

Multiple estimations
First illustration | Performing multiple estimations | Multiple LHS | Multiple RHS and fixed-effects: stepwise functions | Split sample estimations | Combining multiple estimations | Manipulation of multiple estimations | Basic access | Putting order | Some notes | Note on standard-errors | Note on IVs | Note on memory usage

Last update: 2026-05-27
Started: 2020-12-09

Readme and manuals

Help Manual

Help pageTopics
Subsets a fixest_multi object[.fixest_multi
Method to subselect from a 'fixest_panel'[.fixest_panel
Extracts one element from a 'fixest_multi' object[[.fixest_multi
Aggregates the values of DiD coefficients a la Sun and Abrahamaggregate.fixest
Akaike's an information criterionAIC.fixest
Transforms a character string into a dictionaryas.dict
Transforms a fixest_multi object into a listas.list.fixest_multi
Sample data for difference in differencebase_did
Publication data samplebase_pub
Sample data for staggered difference in differencebase_stagg
Bayesian information criterionBIC.fixest
Bins the values of a variable (typically a factor)bin
Extracts the bread matrix from fixest objectsbread.fixest
Check the fixed-effects convergence of a 'feols' estimationcheck_conv_feols summary.fixest_check_conv
Extracts the coefficients from a 'fixest' estimationcoef.fixest coefficients.fixest
Extracts the coefficients of fixest_multi objectscoef.fixest_multi coefficients.fixest_multi
Plots confidence intervals and point estimatescoefplot iplot
Extracts the coefficients table from an estimationcoeftable pvalue se tstat
Extracts the coefficients table from an estimationcoeftable.default pvalue.default se.default se.fixest_vcov se.matrix tstat.default
Obtain various statistics from an estimationcoeftable.fixest pvalue.fixest se.fixest tstat.fixest
Extracts the coefficients tables from 'fixest_multi' estimationscoeftable.fixest_multi pvalue.fixest_multi se.fixest_multi tstat.fixest_multi
Collinearity diagnostics for 'fixest' objectscollinearity
Confidence interval for parameters estimated with 'fixest'confint.fixest
Confidence intervals for 'fixest_multi' objectsconfint.fixest_multi
Gets the degrees of freedom of a 'fixest' estimationdegrees_freedom degrees_freedom_iid
Centers a set of variables around a set of factorsdemean
Controls the parameters of the demeaning proceduredemeaning_algo
Extracts the deviance of a fixest estimationdeviance.fixest
Residual degrees-of-freedom for 'fixest' objectsdf.residual.fixest
Treated and control sample descriptivesdid_means
Simple and powerful string manipulation with the dot square bracket operatordsb
Support for emmeans packageemmeans_support
Estimates a 'fixest' estimation from a 'fixest' environmentest_env
Extracts the scores from a fixest estimationestfun.fixest
Estimations table (export the results of multiples estimations to a DF or to Latex)esttable esttex etable getFixest_etable log_etable print.etable_df print.etable_tex setFixest_etable
Register 'extralines' macros to be used in 'etable'extralines_register
Lags a variable in a 'fixest' estimationd f l
Formatted dimensionfdim
Fixed-effects GLM estimationsfeglm feglm.fit fepois
Fixed-effects maximum likelihood modelsfemlm fenegbin
Fixed effects nonlinear maximum likelihood modelsfeNmlm
Fixed-effects OLS estimationfeols feols.fit
Computes fit statistics of fixest objectsfitstat
Register custom fit statisticsfitstat_register
Extracts fitted values from a 'fixest' fitfitted.fixest fitted.values.fixest
Extract the Fixed-Effects from a 'fixest' estimation.fixef.fixest
Retrieves the data set used for a 'fixest' estimationfixest_data
Permanently removes the fixest package startup messagefixest_startup_msg
Extract the formula of a 'fixest' fitformula.fixest formula.fixest_multi
Fulton Fish Market datafulton
Gets the default values for the small sample correctiongetFixest_ssc
Hat values for 'fixest' objectshatvalues.fixest
Create, or interact variables with, factorsi
Lags a variable using a formulalag.formula lag_fml
Extracts the log-likelihoodlogLik.fixest
Design matrix of a 'fixest' objectmodel.matrix.fixest
Extracts the models tree from a 'fixest_multi' objectmodels
Gets the dimension of 'fixest_multi' objectsn_models
Prints the number of unique elements in a data setn_unik print.list_n_unik print.vec_n_unik
Extracts the number of observations form a 'fixest' objectnobs.fixest
Extracts the observations used for the estimationcase.names.fixest obs
Formatted object sizeosize print.osize
Constructs a 'fixest' panel data basepanel
plot methods for 'fixest' and 'fixest_multi' objectsplot.fixest
Displaying the most notable fixed-effectsplot.fixest.fixef
Predict method for 'fixest' fitspredict.fixest
A print facility for 'fixest' objects.getFixest_print print.fixest setFixest_print
Print method for fit statistics of fixest estimationsprint.fixest_fitstat
Print method for fixest_multi objectsprint.fixest_multi
A print facility for the VCOVs from 'fixest' objects.print.fixest_vcov
Method to print the type of small sample correctionprint.ssc_type
R2s of 'fixest' modelsr2
Refactors a variableref
Replicates 'fixest' objects.l rep.fixest rep.fixest_list
Extracts residuals from a 'fixest' objectresid.fixest residuals.fixest
Extracts the residuals from a 'fixest_multi' objectresid.fixest_multi residuals.fixest_multi
Randomly draws observations from a data setsample_df
Sets the defaults of coefplotgetFixest_coefplot setFixest_coefplot
Sets/gets the dictionary relabeling the variablesgetFixest_dict setFixest_dict
Default arguments for fixest estimationsgetFixest_estimation setFixest_estimation
Sets/gets formula macrosgetFixest_fml setFixest_fml
Sets properties of 'fixest_multi' objectsgetFixest_multi setFixest_multi
Sets/gets whether to display notes in 'fixest' estimation functionsgetFixest_notes setFixest_notes
Sets/gets the number of threads to use in 'fixest' functionsgetFixest_nthreads setFixest_nthreads
Sets the default values for the small sample correctionsetFixest_ssc
Sets the default type of standard errors to be usedgetFixest_vcov setFixest_vcov
Residual standard deviation of 'fixest' estimationssigma.fixest
Design matrix of a 'fixest' object returned in sparse formatsparse_model_matrix
Governs the small sample correction in 'fixest' VCOVsssc
Stepwise estimation toolscsw csw0 mvsw stepwise sw sw0
Style of data.frames created by etablestyle.df
Style definitions for Latex tablesstyle.tex
Summary of a 'fixest' object. Computes different types of standard errors.summary.fixest summary.fixest_list
Summary for fixest_multi objectssummary.fixest_multi
Summary method for fixed-effects coefficientssummary.fixest.fixef
Sun and Abraham interactionssunab sunab_att
Extract the termsterms.fixest
Fast transform of any type of vector(s) into an integer vectorto_integer
Trade data sampletrade
Dissolves a 'fixest' panelunpanel
Updates a 'fixest' estimationupdate.fixest update.fixest_multi
Clustered VCOVvcov_cluster
Conley VCOVconley vcov_conley
HAC VCOVsDK driscoll_kraay newey_west NW vcov_DK vcov_hac vcov_NW
Heteroskedasticity-Robust VCOVvcov_hetero
Computes the variance/covariance of a 'fixest' objectvcov.fixest
Wald test of nullity of coefficientswald
Extracts the weights from a 'fixest' objectweights.fixest
Expands formula macrosxpd