Announcement

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

  • Which test is better to use with categorical variables?

    Good afternoon!

    I regress the model:

    GDP = β0 + β1ERR1 + β2ERR2 + ơ1Pop+ ơ2Surf + ơ3ExGS + ơ4ExpEd + ơ5RIR + u

    My main focus is ERR variable which is categorical (exchange rate regime of the country). The base level is floating regime, ERR1 is pegged regime and ERR2 is residual regime.
    Thus, I need to test significance of these variable (ERR). I try to use command ttest, but Stata shows me mistake.

    ttest GDP, by(ERR)

    more than 2 groups found, only 2 allowed

    I tried to understand more appropriate test on https://stats.idre.ucla.edu/other/mult-pkg/whatstat/, but the table is not clear.

    Could you recommend which test to use for whole model to asses it and test separately for categorical variable?
    I need to understand significance of the model and of the variables. So I more lean to F test for whole model and t and p tests for variables. Thank you!

  • #2
    As long as GDP is a continuous variable, just use an OLS regression.
    Code:
    regress GDP i.ERR
    This is a very simple model, you can easily recreate the equation from above using regress and get the results under control of all independent variables in the model.
    Best wishes

    (Stata 16.1 MP)

    Comment


    • #3
      Than you, Felix! But my question is not about how to run regression. I did it.
      I need to test whole model and variables.

      Comment


      • #4
        You need to read the documentation for regress much more carefully. You also probably need to read an introduction to regression. The regression F tests the hypothesis that all the parameters are zero. The regression output has T statistics and probabilities beside each parameter.

        If you need to test the equality of specific parameters with in the regression, then just use the test command.

        Comment


        • #5
          Thank you for your answer, Phil!
          Yes, I understand these moments of regression analysis.
          But now I have found answer.
          Thank you again!

          Comment

          Working...
          X