Announcement

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

  • Weights for XTREG

    How do I include frequency weights in my xtreg model? There are 5 years of data and 41 states in this panel data set. The dependent variable diff is the difference in a US state's pass rate for a US standardized test and the pass rate of international candidates that sat for the test but claim residency outside of the USA. intpgm is 1 if there is no international program that administers the exam. abroad and lngdp_cap is self explanatory. The only issue I have with using this model is that the number of candidates (including international and domestic) differs from state to state and year to year. I would like to include a weight to account for this but the command xtreg does not permit differential weights in different years. Any thought? I am considering simply averaging the number of exam papers written across years in a jurisdiction and using that amount. How does that sound?

    . xtreg diff i.intpgm lngdp_cap , fe

    Fixed-effects (within) regression Number of obs = 194
    Group variable: id Number of groups = 41

    R-squared: Obs per group:
    Within = 0.0745 min = 2
    Between = 0.0026 avg = 4.7
    Overall = 0.0057 max = 5

    F(2, 151) = 6.08
    corr(u_i, Xb) = -0.9308 Prob > F = 0.0029

    ------------------------------------------------------------------------------
    diff | Coefficient Std. err. t P>|t| [95% conf. interval]
    -------------+----------------------------------------------------------------
    1.intpgm | .3263159 .1144976 2.85 0.005 .1000917 .5525401
    lngdp_cap | 1.05048 .4762249 2.21 0.029 .1095555 1.991405
    _cons | -11.42409 5.200199 -2.20 0.030 -21.69864 -1.149543
    -------------+----------------------------------------------------------------
    sigma_u | .32598064
    sigma_e | .16152085
    rho | .80288237 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(40, 151) = 2.31 Prob > F = 0.0002
    Last edited by tlo9966; 20 Jul 2023, 14:39.

  • #2
    The argument for weighting in such cases is based on efficiency. But using what are effectively population sizes with fixed effects is not guaranteed to be efficient, and so the argument for weighting is not a strong one. You're better off putting in year dummies and using the vce(cluster id) option (and no weights). Without this option, your standard errors can't be trusted. Moreover, you really need year fixed effects to be convincing.

    Comment


    • #3
      Thanks (again)!

      Comment

      Working...
      X