fixest | Fixed-effects estimations

 by   lrberge R Version: v0.11.1 License: No License

kandi X-RAY | fixest Summary

kandi X-RAY | fixest Summary

fixest is a R library. fixest has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

The fixest package offers a family of functions to perform estimations with multiple fixed-effects in both an OLS and a GLM context. Please refer to the introduction for a walk-through. At the time of writing of this page (February 2020), fixest is the fastest existing method to perform fixed-effects estimations, often by orders of magnitude. See below for a benchmarking with the fastest alternative software.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fixest has a low active ecosystem.
              It has 300 star(s) with 54 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 80 open issues and 308 have been closed. On average issues are closed in 48 days. There are 6 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of fixest is v0.11.1

            kandi-Quality Quality

              fixest has no bugs reported.

            kandi-Security Security

              fixest has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              fixest does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              fixest releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fixest
            Get all kandi verified functions for this library.

            fixest Key Features

            No Key Features are available at this moment for fixest.

            fixest Examples and Code Snippets

            No Code Snippets are available at this moment for fixest.

            Community Discussions

            QUESTION

            R: Does fixest package support panel data analysis?
            Asked 2022-Apr-16 at 15:28

            I am working with fixest package. Great results so far.

            My data could be set as a panel. Is there any way for fixest to run run panel data analysis.

            My model looks something like this:

            ...

            ANSWER

            Answered 2022-Apr-16 at 15:28

            Yes. You can use the panel.id argument in your estimation function to get access to a bunch of panel methods.

            From the documentation:

            panel.id The panel identifiers. Can either be: i) a one sided formula (e.g. panel.id = ~id+time), ii) a character vector of length 2 (e.g. panel.id=c('id', 'time'), or iii) a character scalar of two variables separated by a comma (e.g. panel.id='id,time'). Note that you can combine variables with ^ only inside formulas (see the dedicated section in feols).

            See here for more details.

            Source https://stackoverflow.com/questions/71886417

            QUESTION

            How can I use a for loop to run regression?
            Asked 2022-Mar-31 at 16:20

            My current dataset looks like:

            ...

            ANSWER

            Answered 2022-Mar-29 at 13:04

            I can't replicate your example with the provided code. Neverthless, you can use a loop like this:

            Source https://stackoverflow.com/questions/71661565

            QUESTION

            Good packages for large panels with many 'fixed effects' / individual specific intercepts
            Asked 2022-Feb-23 at 06:19

            I have made very good experiences with plm() in small datasets like this one:

            ...

            ANSWER

            Answered 2022-Feb-23 at 06:19

            edit: plm version 2.6-0 has the fast mode enabled by default. A further speed up for plm is gained if package fixest (or lfe) is also installed. For the benchmarked example in ?plm.fast, this gives a speed up to a 28x speed-up.

            old answer Since version 2.4-0 of plm, there is an optional fast mode, see the NEWS entry for 2.4-0 and 2.4-2: https://cran.r-project.org/web/packages/plm/news/news.html

            To enable the fast mode, set this option:

            options("plm.fast" = TRUE)

            You can set this option manually, in your script, or in your .Rprofile file.

            You will need to have package collapse installed as well, optionally package fixest or lfe for further speed up for some cases, esp. two-ways fixed effects from plm 2.4-2 onwards.

            For a benchmarked example, see the help for ?plm.fast.

            In your example, much time is spent to create a pdata.frame (the data format plm uses), it happens implicitly in the call to plm if the data is not explicitly converted first. So, one could split out the formating to pdata.frame and the model estimation. So, the execution time of plm() is significantly smaller. Also, this would speed up any further model estimation after the first one on the data set.

            Source https://stackoverflow.com/questions/69344363

            QUESTION

            R: Fixest class models bloat in size when saved
            Asked 2022-Feb-20 at 21:06

            I am currently working with a big dataset (n>10 million). I found fixest package very helpful to run logit fixed-effects models fast (feglm).

            ...

            ANSWER

            Answered 2022-Feb-17 at 20:25

            Set family, fml and fml_all to NULL and it should work.

            The issue is that these items refer to environments even though they do not include the environments. However, when save is applied, the environments to which these values refer are also saved, leading to the large file size.

            This is an issue I'll try to solve in the package. Btw the items linear.predictors and working_residuals will be appropriately erased in the next version of the package (0.10.2).

            Source https://stackoverflow.com/questions/71119432

            QUESTION

            How to rename complicated variable name in fixest etable
            Asked 2022-Jan-25 at 20:57

            I'm wondering how to change a complex variable name with dict in etable in fixest package.

            For example, I have a regression Y ~ x1 + x2:abs(x3):x4 and I'd like to change the name of x2:abs(x3):x4.

            I have tried

            ...

            ANSWER

            Answered 2022-Jan-25 at 20:57

            It works. It's likely a version problem:

            Source https://stackoverflow.com/questions/70763150

            QUESTION

            Is there any way to cross-reference fixest::etable()?
            Asked 2022-Jan-18 at 13:35
            Question

            Is there any way to cross reference fixest::etable()? I know etable is a simple method, but it's actually very useful. If there is a way to do this, it would be very helpful.

            The environment is Windows 10, using R 4.1.2 and running bookdown::render_book() in RStudio. The following is the file structure and the contents of each file.

            • index.Rmd
            • _bookdown.yml
            • _output.yml
            Source code

            index.Rmd

            ...

            ANSWER

            Answered 2022-Jan-18 at 13:35

            UPDATE: I have no idea why I missed the label argument. Anyway, @laurent-bergé is more correct.

            NOTE: This answer is translated from my original post (in Japanese).

            I guess fixest package have no options for the cross references on Rmd. Although it may be a kind of kludge, I found that you can insert LaTeX command in the title argument like the following.

            Source https://stackoverflow.com/questions/70476985

            QUESTION

            Mapping broom::tidy to nested list of {fixest} models and keep name of list element
            Asked 2022-Jan-14 at 13:51

            I want to apply broom::tidy() to models nested in a fixest_multi object and extract the names of each list level as data frame columns. Here's an example of what I mean.

            ...

            ANSWER

            Answered 2022-Jan-14 at 13:51

            So, fixest_mult has a pretty strange setup as I delved deeper. As you noticed, mapping across it or using apply just accesses part of the data frames. In fact, it isn't just the data frames for "Ozone", but actually just the data frames for the first 6 data frames (those for c("Full sample", "5", "6").

            If you convert to a list, it access the data attribute, which is a sequential list of all 12 data frames, but dropping the relevant names you're looking for. So, as a workaround, could use pmap() and the names (found in the attributes of the object) to tidy() and then use mutate() for your desired columns.

            Source https://stackoverflow.com/questions/70710491

            QUESTION

            Extract degrees of freedom from a fixest feols object
            Asked 2021-Dec-21 at 14:45

            simple question: Can I extract the final degrees of freedom after a feols estimation using the fixest package?

            ...

            ANSWER

            Answered 2021-Dec-19 at 20:43

            There is a degrees_freedom

            Source https://stackoverflow.com/questions/70414996

            QUESTION

            Choose which dummy to drop in feols - fixest package
            Asked 2021-Nov-17 at 12:25

            I have two fixed effect variables and I'm interested in estimating coefficients of one fixed effect, but feols automatically drops the first one always.

            For example, in my toy data like below:

            ...

            ANSWER

            Answered 2021-Nov-17 at 12:25

            Response from the dev: there's no way to manually drop one.

            Source https://stackoverflow.com/questions/69745380

            QUESTION

            fixest vs lm - diffrent results? (difference in difference)
            Asked 2021-Nov-04 at 00:03

            I'm trying to do a 'classic' difference in difference with multiple time periods. The model I want to do is:

            ...

            ANSWER

            Answered 2021-Nov-03 at 23:58

            There are two issues, here.

            1. In the lm() model, the period variable is interacted, but treated as a continuous numeric variable. In contrast, calling i(period, treat) treats period as a factor (this is explained clearly in the documentation).
            2. The i() function only includes the interactions, and not the constitutive terms.

            Here are two models to illustrate the parallels:

            Source https://stackoverflow.com/questions/69832354

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fixest

            The benchmarking was performed as follows: In the OLS context, we estimate the following equation:. The same functional form (one variable, three fixed-effects) is estimated for the Poisson, the Negative Binomial and the Logit cases (with ad hoc modifications to fit each model). See Berge (2018) for more details on the setup. For the "difficult" benchmark (OLS only), the data is generated in a way that makes the convergence of the fixed-effects slow. The phenomenon of slow convergence is frequent for real micro-level data sets involving employee and firm fixed-effects for instance. Each estimation is replicated 10 times and the average computing time is reported in the figures.
            OLS: felm (R: package lfe), reghdfe (Stata) and FixedEffectModels (Julia)
            Poisson: glmmboot (R: package glmmML), feglm (R: package alpaca) and ppmlhdfe (Stata)
            Negative Binomial: glm.nb (R: package MASS) and nbreg (Stata)
            Logit: glmmboot (R: package glmmML), feglm (R: package alpaca) and logit (Stata)

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/lrberge/fixest.git

          • CLI

            gh repo clone lrberge/fixest

          • sshUrl

            git@github.com:lrberge/fixest.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link