Announcement

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

  • Heteroscedasticity


    Dear Stata Experts:
    I have two questions regarding regression analysis:

    1. What is the difference between a nested regression and hierarchical linear modeling? I ran both and got the same results
    The dependent variable is a continuous and normally distributed math score; the primary predictor is maternal education represented by 5 categories: less than high school, high school, some college, college and graduate school. In addition there are several other students and family traits added in steps

    2. After running a nested regression, I analyzed the residuals and the graphed results are shown below. Can I justify use of the OLS model despite the fact that the model is underestimating results for lower end students? Is there an alternative way to analyze the effect of maternal ed on math outcomes? I appreciate your help!



    Click image for larger version

Name:	sc_fivecats.png
Views:	2
Size:	154.9 KB
ID:	1526588




  • #2
    Perhaps anyone who has seen this post could advise as to how to word this question in a better way to deserve a response? Many thanks, Pat

    Comment


    • #3
      1)

      With - nestreg - the regression is done under "blocks" of predictors. This way, if you have two blocks, the first block is nested in the second, whereas in a mixed model the observations are nested, say, students are nested in schools. Under a - mixed - approach, we surely have predictors of, say, the first and the second level.



      Indeed, the best approach to demonstrate that Stata gave "the same results" is to provide both outputs.

      2)

      Under a mixed approach, you have already the LR test which compares OLS regression against a multilevel structure.


      I hope to have clarified the issues.
      Best regards,

      Marcos

      Comment


      • #4
        Pat:
        as an aside to Marcos' helpful explanation, your point #2 is at risk of remaining unreplied as you did not post what you typed and what Stata gave you back (as per FAQ).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          First, Marcos.. thank you so much. I believe I used the wrong terminology here. What I wanted to ask was, what is the difference between nested regression and hierarchical regression. I believe the two are the same?
          Second, Carlos.. thank you. I will resend with a new post or as a separate reply to this post?

          Comment


          • #6
            Carlos: This is what I typed into Stata and the three graphs represent the output. I am using OLS regression and testing the residuals for homogeneity. It appears from the graphs that the model is not necessarily a good predictor for lower end math i.e. the scores are actually worse than what is being predicted. My question is can I still justify using this model provided that I identify that the math scores are not linear at the low end? Thank you!


            . qui reg ZMATH ib3.MOMDEG IMPLICIT EXPLICIT PARNTG ib2.EXPECT c_AGEFRST NOWORK FEMALE c_AGEKENTRY ///
            i.CHILDRACE POVERTY NONENG SINGPAR

            . predict yhat, xb
            (2,375 missing values generated)

            . predict zresid, rstandard
            (2,375 missing values generated)

            . hist zresid, normal freq name(h_fivecats, replace)
            (bin=39, start=-5.8604188, width=.30907842)

            . qnorm zresid, msize(tiny) name(q_fivecats, replace)

            . graph twoway scatter zresid yhat, msize(tiny) yline(0) name(sc_fivecats, replace)

            . pnorm zresid, msize(tiny) name(q_fivecats, replace)

            Click image for larger version

Name:	h_fivecats.png
Views:	1
Size:	55.2 KB
ID:	1526680 Click image for larger version

Name:	sc_fivecats.png
Views:	2
Size:	154.9 KB
ID:	1526681 Click image for larger version

Name:	q_fivecats.png
Views:	1
Size:	56.4 KB
ID:	1526682

            Comment


            • #7
              Pat:
              thanks for providing further details.
              As far as heteroskedasticity is concerned you may want to try -robust- standard errors.
              It is not clear from your post whether or not you checked your model for misspecification (see -estat ovtest-).
              As an aside, -predict- highlights a remarkable number of missing values. This is an issue that you should deal with before -regress-.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Yes, the missing values are due to non-response to a parent interview. Since I used data from a nationally representative dataset, there is not much to do there. Other missing values were imputed via multiple imputation. I will check out the -estat oftest- as I am unfamiliar with it. Many thanks, Pat

                Comment


                • #9
                  Pat:
                  you should search for -estat ovtest-
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    To add to Carlos' posts, ovtest provides you with the result of the RESET test. It is not, as the output indicates, a general test for missing variables, but a test for mis-specification of the functional form used given the regressors in your model.

                    Comment


                    • #11
                      With regards to #5, multilevel, hierarchical and mixed represent the very same model.
                      Best regards,

                      Marcos

                      Comment


                      • #12
                        Thank you all for responses... you have been a major help!

                        Comment

                        Working...
                        X