Announcement

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

  • Comparing predictions and regression fitted values between two regression models with an additional explanatory varaiable

    Dear Statalisters,

    I am struggling with a task in which I want to investigate how an additional variable (i.e., human rights) affects my regression results.

    My regression model is as follows:

    Code:
    regress DV IV HR
    where DV represents dependent variable; IV represents independent variables. Human rights is my key explanatory variable and I am interested in looking at how human rights affects the explanation of my results.

    Task:

    1. Generate a set of predictions for a model in which I use all the explanatory variables except human rights with the coefficients estimated over the whole sample.

    Code:
    regress DV IV
    Code:
    predict foreignaid
    2. Compare these predictions with the regressions fitted values (which take into account all the predictors including human rights)

    Code:
    regress DV IV HR


    3. Calculate the % difference between the first two measures to see how much of the dependent variable is explained by the human rights.

    Now, I am struggling with the second and third step in Stata. I am also wondering whether my codes for the first two steps are okay.

    Any help will be appreciated.

    Best regards,
    Shazmeen Maroof.





  • #2
    Edit: In step 3, it is perhaps comparing the % difference rather than actually calculating it.

    Comment


    • #3
      Shazmeen:
      see https://stats.idre.ucla.edu/stata/co...s-using-suest/
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        To add to Carlo's comment, it is not clear exactly how you want to compare the estimates. You mention predictions. Carlo has pointed you in the right direction if you want to compare parameters. You can certainly use predict after each regression to generate predicted values and residuals. You can compare explained variance based on the original results from the two regressions.

        Comment

        Working...
        X