Announcement

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

  • Weights in panel data

    Hi,
    I am working with a set of panel data where I am looking at students' school results in different counties. I am doing comparisons between different counties and therefor collapsing the observations to one value for each municipality. Since the data is only for public schools (and not private) am I trying to mitigating the problem by giving more weight to counties that have a relatively larger share of students going in to public schools, compared to counties where its more common for students going to private schools. For example, a municipality with only public schools will have a larger influence in the regression compared to a municipality where this figure is 10 %.I am using xtreg command and applying both fixed effects and random effects. I dont know exactly how I could solve the problem, my first idea was to use aweights but I understand that the coefficients are not being adjusted, only the standard errors. Does anyone know how I can solve this using weights or some other approach?


  • #2
    If your concern is legitimate, then add a control variable to the regression representing the proportion of students in public schools. I would expect that this variable varies over municipality and time.

    Comment


    • #3
      That's a good idea Andrew but my problem is that the variable is time-invariant. So if I guess I can only include it using the random effect. Do you know any other way I still could use it in the fixed effect model?

      Comment


      • #4
        I think, David, that for your problem analytic weights is exactly the way to go.

        And No, it is not true that analytic weights affect only the standard errors, here:

        Code:
        . sysuse auto, clear
        (1978 Automobile Data)
        
        . reg price mpg headroom [aw=rep], noheader
        (sum of wgt is 235)
        ------------------------------------------------------------------------------
               price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 mpg |  -217.2319   51.88086    -4.19   0.000    -320.8154   -113.6484
            headroom |  -331.9228   412.1356    -0.81   0.423    -1154.778    490.9325
               _cons |   11906.98   1996.536     5.96   0.000     7920.767    15893.19
        ------------------------------------------------------------------------------
        
        . reg price mpg headroom , noheader
        ------------------------------------------------------------------------------
               price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 mpg |  -259.1057   58.42485    -4.43   0.000    -375.6015   -142.6098
            headroom |  -334.0215   399.5499    -0.84   0.406    -1130.701    462.6585
               _cons |   12683.31   2074.497     6.11   0.000     8546.885    16819.74
        ------------------------------------------------------------------------------

        Comment


        • #5
          That's perfect Joro, thanks for your help. I was so sure of the person that mention it, so I didn't check it in stata.

          Thanks again for your help!

          Comment

          Working...
          X