Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help needed with areg command

    Hello, I am new to STATA. I just discovered the areg command, which can be used to account for fixed effects.

    Some background:
    In my research assignment, I want to estimate the relationship between air pollution (haze) and air-conditioner use. The data set is from a survey. Both my independent variable and dependent variable are binary variables. I initially wanted to conduct a regression using the probit regression model. However, I realised that I have to account for survey respondent fixed effects too.

    If both my independent variable and dependent variable are binary variables, can I use the areg command to account for respondent fixed effects? Most examples that I have seen deal with continuous variables.

    Any help will be appreciated. Thank you.
    Last edited by Jin Woo; 23 Jan 2019, 02:01.

  • #2
    Jin:
    welcome to this forum.
    -areg- seems out of debate here, as your dependent variable is binary (whereas -areg- requires continuous regressand);
    - you may want to consider a logisti regression that takes the survey desing into account:
    Code:
    svy: logit
    or

    Code:
    svy: clogit
    .

    The latter code taked (conditional) fixed effects into account.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      In econometrics it is acceptable to use -areg- for your task, this is the Linear Probability Model (LPM). Different people will tell you different things, some people love the LPM, some people hate it. But it is an option.

      Then you are correct that there does not exist an -xtprobit- model, one just cannot eliminate the individual fixed effects in the probit model.

      Then the advice Carlo gave you is also very relevant (I am not sure why Carlo injected the "svy:" into the discussion...). But as Carlo pointed out, there is a fixed effect logit, also known as conditional logit and this model will condition on/eliminate your individual fixed effect. You can do this with -clogit- as in Carlo's suggestion, or with -xtlogit-.

      I would personally go for -xtlogit- simply because of symmetry and consistency across estimators, because similarly you can implement your -areg- through -xtreg-.

      In other words if you are dealing with panel data unobservable time invariant effects, it is good if you learn how to use the -xt- set of commands and stick with it.

      Comment


      • #4
        Joro:
        I mentioned -svy- as the original poster mentioned that the data came from a survey.
        The data set is from a survey.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo and Joro:

          Thank you very much for the help.

          The clogit/xtlogit command seems to be very applicable to my analysis. However, I have run into another problem. When I ran the clogit command, 232 out of 311 groups were dropped because of all positive or negative outcomes, leaving me with only 79 groups to work with - a rather small sample in my opinion.

          In such a case, can I conclude that within-group variation is low and hence, it will it be better if I run a normal probit/logit regression?
          Attached Files
          Last edited by Jin Woo; 23 Jan 2019, 23:22.

          Comment


          • #6
            Jin:
            I think that the problem you're experiencin is due to your dataset features; estimation method is nothing to do with it.
            Moreover, if by normal regression you mean ignoring the panel structure of your data, I would say that is not the way to go, as the observations belonging to the same panel ara actually not independent.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thank you. My dataset contains respondents with no variation, so I cannot change this.

              Joro mentioned that the use of the areg command is possible if I want to estimate a Linear Probability Model (with a binary dependent variable and binary independent variable).

              If I estimate using the areg command, no observations are dropped. Since no observations are dropped, would using the areg be an alternative solution to the problem?

              Comment


              • #8
                Jin:
                most of the advice rests on what you're going to do with the results of your research.
                If you're planning to write a research report with no external review, I think it would be enough to justify why you followed -areg- instead of more common approaches for binary regressand.
                Conversely, if you're planning to submit an article to a given target journal in your research fiels which adopts peer-review, things might be trickier, as you cannot avoid that reviewers ask you to go, say, -xtlogit- having a panel dataset.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  I agree with Carlo that what you encounter is a feature of your data. This feature of your data has no bearing whatsoever on whether you should use a fixed effects method such as -xtlogit, fe- or xtreg, fe/areg, versus random effects model such as -xtlogit, re- or -xtreg, re-.

                  You decide on fixed versus random effect by using a Hausman test.

                  If there is no variation within survey respondent in air-conditioner use (your X variable) areg/xtreg,fe is taking you nowhere. If there is no within variation for nobody, you simply cannot calculate the areg. If there is within variation only for some respondents, only those respondents contribute to the parameters estimated in areg.

                  In short, my recommendation is switch to the xt set of commands completely, and try parallelly
                  xtlogit, fe
                  xtlogit, re
                  xtreg, fe
                  xtreg, re

                  Do the Hausman tesest to compare the FE vs the RE specifications. And choose FE is Hausman rejects the null, RE otherwise.

                  Comment

                  Working...
                  X