Announcement

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

  • Linear regression

    I have squared root the dependent variable to deal with the non-normally distributed residuals. The dependent variable is measured in centimetres, so the values for the dependent variable are greater than 0. All the independent variables are dummy variables. My sample size is 1000. After running the linear regression and estimating the margins, I transformed the margins back to the original values. I have used this command:

    generate generate sqrtindep1=sqrt(indep1)
    repress dependent i.sqrtindep1 i.indep2 i.indep3 i.indep4
    margins sqrtindep1, expression(predict(xb)^2)"

    I have read also instead of transforming the dependent variable I can use glm with link power and then estimate margins. However, the estimated margins from glm are different from the liner regression. Any advice why the margins are different and which model is more appropriate?

    glm dependent i.indep1 i.indep2 i.indep3 i.indep4 , link(power 0.5)
    margins indep1

  • #2
    Sonia:
    if the only issue is the heteroskedasticity of residuals distribution, why not considering -robust()- option for SE and avoid all this transforming and back-transforming?
    Things might be trickier if heteroskedasticity is coupled with model misspecification (but you don't give any detail about this issue in your post).
    Last edited by Carlo Lazzaro; 26 Feb 2019, 01:30.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Many thanks for your response Carlo! . Yes, I transformed the dependent variable due heteroskedasticity of residuals distribution. I have done the ovtest after linear regression without transforming the dependent variable and the p-value is greater then 0.05. Does this mean I have well specified model?

      Comment


      • #4
        Sonia:
        yes.
        If you detect heteroskedasticity in the residuals distribution, simply go -robust-.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X