Announcement

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

  • Normalizig Data

    Hi everyone,

    I am trying to normalize my data to run panel regression. So far I have tried to:

    1. transform the data to log form

    2. normalize data as a panel country using the following commands
    egen min_x1=min(x1)
    egen max_x1=max(x1)
    gen normalx1= (x1-min_x1)/(max_x1-min_x1)

    3. normalize data by country and by variable using
    su x1, meanonly
    gen normal_x1=(x1-r(min))/(r(max)-r(min))

    3. smoothing the data using tssmooth and also HP filter

    However my data for all variablea is still skewed no matter what i tried. I have checked it using histogram frequency graphs, density plots etc.

    I would appreciate some help on this.

    Thank you
    Last edited by Bezi Nyem; 07 Nov 2016, 02:16. Reason: I forgot to mention that I am using macroeconomic variables

  • #2
    Bezi:
    I'm not clear with what you're after.
    Why "normalizing" data to perform a panel data regression?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      I have provided two examples of how most of my data looks when I check for normality of data (please see poverty and gdp graphs). My problem is that no matter what I do to the data (ie whether I keep it in its original (raw) form, transform to log, use sqrt, or standardizing the data etc), I can't seem to correct the problems below (i get the same distribution with no changes whatsoever) I had hoped that by employing one of the methods, I would be able to normalize my data. I would appreciate your help.


      Attached Files
      Last edited by Bezi Nyem; 07 Nov 2016, 04:08.

      Comment


      • #4
        Bezi:
        assuming that you're going to use -xtreg-,it is not mandatory to normalize variables (as it is not a prerequisite for regression procedures)..
        If you are concerned about heteroskedasticity and/or autocorrelation in residual distribution, simply -cluster()- the standard errors of your predictors.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thank you Carlo

          Comment

          Working...
          X