Announcement

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

  • xtgee with IPW

    Hi. I am looking at the effect of non-employer based health insurance on self-employment on panel data. I'm running a difference-in-difference GEE model using inverse probability weights that I created. The insurance policy was enacted in 2007 and in the calculation of my weights I only consider the data for 2006 on the assumption that that year probably had the most influence on decisions made post the policy. However, despite restricting the data to 2006, it appears that I get different weights for the same individual across years, which results in the error "weight must be constant within idind" when I run the xtgee command. I've pasted my code for the ipw and xtgee below. Any guidance will be much appreciated.


    probit treatment_group $X if year==2006 & urban == 1
    predict phat
    gen uipw=1/phat if treatment_group == 1
    replace uipw=1/(1-phat) if treatment_group == 0
    drop phat
    label var uipw "Urban Inverse Propensity Weight"

    xtgee $F post post#urban_hukou $X2 i.year [pw=uipw], family(binomial) link(logit) corr(independent)
    note: 1.post#0.urban_hukou omitted because of collinearity
    note: 1.post#1.urban_hukou omitted because of collinearity
    note: 0.army omitted because of collinearity
    note: 1.otherprof omitted because of collinearity
    note: 2011.year omitted because of collinearity
    weight must be constant within idind
    r(199);


    Thanks,
    Karishma
Working...
X