Announcement

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

  • How to fix heteroskedasticity by using stata?

    Hello everyone,

    I am trying to find the impact of myoinositol on triceps skin fold thickness in newborns using linear regression analysis. I used graph as well as statistical approaches to investigate the homoscedasticity of the model itself - residual vs fitted plot and Breusch - Pagan / cook - weinberg test for heteroskedasticity. The residual vs fitted plot of my model , personally, I think it looks fine even though some residuals kind of slightly diverting from the middle line as the fitted values increase. Yet, in general, those dots seem to equally distribute along the line.

    But the p value I obtained from Breusch- Pagen by typing estat hettest for this particular model is less than 0.001. Does it raise any concerns? And is the "robust" the only way to fix this?

    Or should I construct my model again in order to meet the assumption of homoscedasticity?



    Click image for larger version

Name:	graph_triceps residual vs fitted plot_270818.gif
Views:	1
Size:	38.4 KB
ID:	1459719


    Thank you for your comments and suggestaions in advance.

    BW
    Em


  • #2
    Well, the appearance of the plot suggests a very slight trend towards higher residual variance with higher predicted values. This pattern is sometimes seen when there is an omitted variable that the residual is, in part, proxying for. If you have other measured variables that might fix this when added to the model, you can do that. If not, using -vce(robust)- removes this problem. (N.B. It doesn't remove the heteroscedasticity, but it makes the inferences valid in spite of it.)

    That said, I agree with your initial appraisal of the graph: this degree of heteroscedsticity looks pretty minor to me. I would be very surprised if your estimation with -vce(robust)- differed much from what you already have. I think you just have a sample size large enough that this (probably unimportant) degree of heteroscedasticity turns out to be "statistically significant." This kind of thing happens fairly often and is one reason why I generally avoid using statistical tests like this to inform my modeling decisions.

    Comment


    • #3
      Clyde provided an excellent answer. I'd add one related link from the forum's own Richard Williams which discusses heteroskedasticity. I'd just draw your attention to the end of page 2 and beginning of page 3: if heteroskedasticity is present, point estimates are still unbiased; standard errors will be biased but heteroskedasticity has to be quite severe before it presents a problem in hypothesis testing. As mentioned, you can simply invoke the -vce(robust)- option, which will adjust the standard errors so that they are valid. Generally, you will see your standard errors increase (although, sometimes the difference is small).

      The Breusch-Pagan test relies on a chi-square statistic. It's commonly accepted knowledge among statisticians that chi-square statistics become overly sensitive in large samples.
      Last edited by Weiwen Ng; 27 Aug 2018, 09:31.
      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

      Comment

      Working...
      X