Announcement

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

  • Non-normally distributed residuals, advice on how to detrend data

    Code for fixed effect regression using Driscoll-Kraay standard errors and residual prediction :

    Code:
    xtscc realgvaperh lifesatisfaction anxiety logrealgfcfl2, re
    
    predict newREDK2, resid
    
    qnorm newREDK2
    Here is the qnrom :
    Click image for larger version

Name:	XnLwM4y.png
Views:	1
Size:	56.4 KB
ID:	1495545




    I think the lack of normal distribution is due to a variable I have that has an upward yearly trend

    Not a great graph, can't seem to get the colour coding right, but it's panel data and this is a scatter

    Code:
    scatter logrealgfcfl2 Year
    Here is the graph :

    Of the data against time, as you can see it sort of trends upwards for every panel variable individually. It's already put in real terms and it's already logged and it's still trending, I've tried taking the data away from a lagged version of itself (difference detrending I think it's called?) and that didn't help much.

    My dependant variable's qnorm looks similar, so there's a lack of normality there as well. Could this be causing it?

    Dep variable qnorm :
    Click image for larger version

Name:	Asgl4Im.png
Views:	1
Size:	64.0 KB
ID:	1495546

    Last edited by Ben Cunningham; 28 Apr 2019, 10:13.

  • #2
    Please post your images here, not somewhere else. If anyone clicks on one of your graphs, they can't easily see the question at the same time. Remember that many people read Statalist on phones, tablets, whatever. FAQ Advice explains how to attach image files.

    (Sorry, but I don't do this kind of analysis to address the question.)
    Last edited by Nick Cox; 28 Apr 2019, 10:03.

    Comment


    • #3
      Ben,

      What happens if you include the time variable in the equation:
      Code:
       
       xtscc realgvaperh lifesatisfaction anxiety logrealgfcfl2 Year, re

      Comment


      • #4
        @Luri

        It actually becomes slightly worse, surprisingly. I would have assumed it'd taper out at least somewhat.

        Click image for larger version

Name:	j1EVQsb.png
Views:	1
Size:	45.2 KB
ID:	1495592


        Comment


        • #5
          And with year dummies?
          Code:
          i.Year

          Comment

          Working...
          X