Announcement

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

  • Dummy variable crisis

    I have a regress model the research about financial crisis. I have a plan to use three dummy. The first ones is before crisis (CR1), the second is crisis (CR2) and the last one is post crisis (CR3). Is it ok? Cuz my teacher said I should use 2 dummy, not nescessary to use three, it can lead to multicollinrearity. What should I do? I dunno how to use that with two dummy. My research I suppose to do like comparation before crisis, crisis and after. I need help!!!

  • #2
    Tommy:
    dummy trap is usually covered in any decent textbook on statistics but can be easily avoided in Stata (see -help fvvarlist-).
    As an aside, due to the scant details that you reported about your research project, I would assume that you have cross-sectional data.
    That said, as far as your predictor -crisis- is concerned, you may want to consider using a three-level single variable (before crisis; during crisis; after crisis), and choose one out of them as reference level, like in the following toy example:
    Code:
    set obs 100
    g income=runiform()*10000
    g crisis=1 in 1/30
    replace crisis=2 in 31/60
    replace crisis=3 if crisis==.
    label define crisis 1 before_crisis 2 during_crisis 3 post_crisis
    label val crisis crisis
    regress income i.crisis, baselevels
    As an acid test, you may also want to -summarize. -income- before, during and after crisis via the following code:
    Code:
    bysort crisis: sum income
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      LEV= α + β TAN + β2PR + β3FS + β4GR + β5INF + β6FA + β7CRI +β8CRI2 + β9CRI3 + ε
      CRI1 b4crisis, CRI2 during crisis, CRI3 after. Does it lead multicorlinear

      Comment


      • #4
        Tommy:
        your code (for me, at leat) is not that informative.
        Please, take a look at FAQ on how to post effectively.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Tommy,

          I second Carlo's advice. In addition, it appears that you seek answers to a class assignment. Although I do not see it explicitly in the forum FAQ, you should be aware that forum members are generally unwilling to do your homework for you.

          Devra Golbe
          Dept. of Economics
          Hunter College, CUNY
          Devra Golbe
          Professor Emerita, Dept. of Economics
          Hunter College, CUNY

          Comment


          • #6
            Tommy:
            if Devra got it right (and I think she had), please note that seeking for class assignment/homeworks solution is out of the scope of this forum.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              I want to Run an OLS regression with log wage (ln wage) as the dependent variable controlling for the dummy variable for college graduate and the continuous variable age. I'm confused, any help please?

              Comment


              • #8
                Enoch Ahuakesey
                Code:
                reg ln_wage i.college age

                Comment


                • #9
                  Thanks but , @Jared i used what you suggested but dont see any difference between that and reg ln_wage college age

                  Comment


                  • #10
                    I mean in their results

                    Comment


                    • #11
                      Enoch:
                      if you have a two-level categorical variable, prefixing it with -i.- or not does not make any difference (as per -fvvarlist- underlying machinery):
                      Code:
                      . use "C:\Program Files\Stata17\ado\base\a\auto.dta"
                      (1978 automobile data)
                      
                      . reg price foreign mpg
                      
                            Source |       SS           df       MS      Number of obs   =        74
                      -------------+----------------------------------   F(2, 71)        =     14.07
                             Model |   180261702         2  90130850.8   Prob > F        =    0.0000
                          Residual |   454803695        71  6405685.84   R-squared       =    0.2838
                      -------------+----------------------------------   Adj R-squared   =    0.2637
                             Total |   635065396        73  8699525.97   Root MSE        =    2530.9
                      
                      ------------------------------------------------------------------------------
                             price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                      -------------+----------------------------------------------------------------
                           foreign |   1767.292    700.158     2.52   0.014     371.2169    3163.368
                               mpg |  -294.1955   55.69172    -5.28   0.000    -405.2417   -183.1494
                             _cons |   11905.42   1158.634    10.28   0.000     9595.164    14215.67
                      ------------------------------------------------------------------------------
                      
                      . reg price i.foreign mpg
                      
                            Source |       SS           df       MS      Number of obs   =        74
                      -------------+----------------------------------   F(2, 71)        =     14.07
                             Model |   180261702         2  90130850.8   Prob > F        =    0.0000
                          Residual |   454803695        71  6405685.84   R-squared       =    0.2838
                      -------------+----------------------------------   Adj R-squared   =    0.2637
                             Total |   635065396        73  8699525.97   Root MSE        =    2530.9
                      
                      ------------------------------------------------------------------------------
                             price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                      -------------+----------------------------------------------------------------
                           foreign |
                          Foreign  |   1767.292    700.158     2.52   0.014     371.2169    3163.368
                               mpg |  -294.1955   55.69172    -5.28   0.000    -405.2417   -183.1494
                             _cons |   11905.42   1158.634    10.28   0.000     9595.164    14215.67
                      ------------------------------------------------------------------------------
                      
                      .
                      That said, as per FAQ:
                      1) you should be as informative as possible in your queries (in this case, you did not specify how many levels your categorical variable is composed of);
                      2) you should post what you typed and what Stata gave you back (via CODE delimiters, please). Thanks.
                      Kind regards,
                      Carlo
                      (StataNow 18.5)

                      Comment


                      • #12
                        Thanks @ Carlo, I am actually new to stata that's why. Im grateful for the help

                        Comment


                        • #13
                          Union has been classified as 0 and 1 and dots. How do i miss missing union status and use '' miss missing union status" as part of my independent variables?
                          Last edited by Enoch Ahuakesey; 24 Feb 2022, 11:12.

                          Comment


                          • #14
                            You need to use dataex to show us your data and show us the exact code you've used so far, using the code delimiters. Otherwise, we can't help you Enoch Ahuakesey I don't want you to describe your data to me, I want to see what it really looks like in your dataset, and we can't do that unless you show us your example data. As Carlo said, you have to read the FAQ in order for us to be of any use here.

                            Comment


                            • #15
                              Enoch:
                              we were totally newbies with Stata at the beginning (and as far as the many Stata commands that I do not know, I'm still feel as a beginner).
                              Unfortunately, this is not a waiver to skip the FAQ (that in the mid/long run will save your time, if followed), as Jared wisely highlighted.
                              Kind regards,
                              Carlo
                              (StataNow 18.5)

                              Comment

                              Working...
                              X