Announcement

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

  • #16
    Tessa:
    have you checked for a possible perfect prediction issue, as pointed out by Maarten at #6?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #17
      Carlo:

      I am not really understandig what you are asking?
      Maarten stated at #6 that I should start with just one explanatory variable and add one at a time. As mentioned in #8 I ran a logistic regression on only goingconcern and MarketShare, after which I added LOG_MKT. This worked out fine, but when I add another one (does not matter which one it is) Stata goes crazy.

      So, I do not really understand how to investigate a perfect prediction if nothing works in my Stata file?

      Comment


      • #18
        You have to declare that your data is a panel prior to running xt-regressions. I do not know what is causing Stata to stop working, but it may be a memory issue. Try this

        Code:
        clear
        set mem 200m
        use "D:\STATA analysis\Datasets\Originele Datasets\7 mei going concern.dta"
        xtset gvkey fyear
        xtlogit goingconcern MarketShare LOG_MKT LEV, fe
        ​

        Comment


        • #19
          Andrew:

          Thank you very much! This command actually worked! I needed to have year fixed effects and actually industry fixed effects as well..
          Is it a problem than that it is grouped by gvkey?

          I tried:
          xtset sic fyear, but that is not working (makes sence: lots of repeated time values)

          If I want to have year fixed effect, should I not have it grouped on fyear then? (If I try this, that does not work by the way, than again Stata stops working)

          Comment


          • #20
            gvkey in your data is the firm identifier and fyear is the time identifier. From the name of your dependent variable (goingconcern), I guess you are looking at what firms survive over the sample period (i.e. what firms remain a going concern). This is coded goingconcernit = 1 if firmi is still in business in yeart.

            To look at whether you have year fixed effects, run the regression adding year dummies

            Code:
            xtlogit goingconcern MarketShare LOG_MKT LEV i.fyear, fe
            The following notes by Richard Williams will guide you on how to interpret the results. There is an example where year dummies are included

            https://www3.nd.edu/~rwilliam/stats3...xedEffects.pdf

            Comment


            • #21
              Thank you very much Andrew!

              Than I have one last question.. I had a database of 39,653 observations
              I receive the following note when I run the regression you described:

              note: multiple positive outcomes within groups encountered.
              note: 5716 groups (32647 obs) dropped because of all positive or
              all negative outcomes.

              Is that a problem, because it droppes 32,647 observations?

              Comment


              • #22
                Not at all. Look at page 3 of the pdf link that I sent to you. I will try as briefly as possible to explain what this means and why it is not a problem.

                In your data, some firms never go out of business (they are always a going concern). So in your data, you will have goingconcern=1 for all years in the sample period for these firms. You can check this by typing the following - it will give you the total number of years for each firm that you have a positive outcome

                Code:
                bysort gvkey (fyear): count if goingconcern==1
                It is possible (but unlikely) that some firms are not going concerns in all years, in which case goingconcern=0 for all years (a negative outcome). Fixed effects only considers firms in which for some years, goingconcern=1 and other years, goingconcern=0 (i.e. there is variation in the outcome variable). It will drop all observations where there is no variation.

                The following from Richard William's notes summarizes the logic of fixed effects (replace "subject" with "firm")

                Fixed-effects models are looking at the determinants of within-subject variability. If there is no variability within a subject (in the outcome variable), there is nothing to examine.
                Last edited by Andrew Musau; 09 May 2015, 06:41.

                Comment


                • #23
                  Tessa: You should start by showing a short listing of your data, showing the cross section identifier, the year (or other time period variable), the binary response (goingconcern), and some of the key explanatory variables. As a general comment, it seems odd to start with a model where x and log(x) both appear. It's possible, but it's hard to believe both can be very important. JW

                  Comment

                  Working...
                  X