st: psmatch2/xtlogit fe/xtreg fe

 From "Claire Kamp Dush" To Subject st: psmatch2/xtlogit fe/xtreg fe Date Thu, 11 Oct 2007 11:37:31 -0400

```Dear Statalisters,
I am having a problem attempting to conduct fixed effects regression with a matched sample obtained from psmatch2.  Below is the detailed information about my problem.

Sample:  Large sample of mothers in married or cohabiting unions measured over three time points.  They must be married or cohabiting at the second time point.

Research question:  Is there a difference in the impact of marital vs. cohabiting dissolution on mental health?

Method:
I run several models that all have the same issues.  Below is an example.

First I use probit to obtain the predicted probability that an individual is in the group that dissolved their cohabiting union at Wave 3.  The sample here is all those who were cohabiting at wave 2.  Predictors include several Wave 1 observed variables that are related to union stability and Wave 2 depression.

Next, I use the predicted probability to do propensity score matching using psmatch2 (nearest neighbor with replacement, caliper 0.03) where the treated group is those that dissolve a cohabiting union by Wave 3 and the control group is those that are intact by Wave 3.  The outcome is depression at Wave 3.  I then create a dataset with just the treated and matched controls, the weight variable produced by psmatch2, and an indicator of union status at Waves 2 and 3.  I put into this dataset also a variety of observed variables measured at Wave 2 and Wave 3 that also change over time, including their child's age, mother and father's employment status (dummies), mothers school status and whether she completed her education (dummies), mother's welfare receipt (dummy), total family income, total num of adults working in the household, whether the dad has ever been in jail, days the dad saw the child, whether the mother obtains a new partner (dummy), the length of time since separa!
tion, and my outcome variable at Wave 2 and 3.  I then convert this dataset to long.

Note that I do this for each dependent variable separately - I have four measures of mental health- here I would like to discuss a continuous measure of depressive symptoms and a dichotomous measure of clinical depressed.

Finally, I am attempting to run a fixed effects regression on the matched sample, so that my final estimate accounts for observed characteristics that do not change over time but distinguish those in cohabiting unions that dissolve and do not dissolve, observed characteristics that do change over time and may also account for a decline in mental health following a cohabiting dissolution, and unobserved characteristics that do not change over time.

Here is where I run into the problems.

Problem 1:
When I attempt to run a fe xtlogit on the dummy of clinical depression, here is what I get an error "Multiple positive outcomes within groups encountered".  This is for the baseline model with just the dichotomous measure of depressive symptoms (deplib) and the indicator of union status at each wave (cohdis) entered in the equation.  I am getting this error because several groups do not experience a cohabitation dissolution?  My code and output is listed below.

Problem 2:
When I attempt to run a fe xtreg on the continuous measure of depressive symptoms, I am not allowed to have a weight, so I cannot weight my controls by how many treated they matched to.  I could try to re-run the analysis removing the "with replacement" option, or I could expand the data to have as many groups for each control as treated they match to.  But, my question is, would my standard errors then be wrong?  Is there a way to adjust my standard errors if I did this?  Code for this is also below.

Any help at all would be extremely appreciated, and if I am missing something huge as I am very new to fe regression and to propensity score matching, feel free to send me a reference.

Thank you for reading this long e-mail,
Claire Kamp Dush

PROBLEM 1 CODE AND OUTPUT:

foreach y in cohdis {
foreach x in deplib {
clear

use "C:\Documents and Settings\ckamp-dush\Desktop\ff data for ncfr_long_ms_`y'_`x'.dta"

xtset idnum wave

di "*************************"
di "`y'"
di "`x'"

xtlogit `x' `y' [iweight=_weight_`y'_`x'], fe or

outreg2 using table_`y'_`x', bdec(2) alpha(0.001, 0.01, 0.05) eform replace

xtlogit `x' `y' childage memployed mominschool momcompledu demployed djailever mdaysdadsawc mnewpart lengthseparated[iweight=_weight_`y'_`x'], fe or

outreg2 using table_`y'_`x', bdec(2) alpha(0.001, 0.01, 0.05) eform

xtlogit `x' `y' childage memployed mominschool momcompledu mwelfareusepastyr mtotinc mtotadultworking demployed djailever mdaysdadsawc mnewpart lengthseparated[iweight=_weight_`y'_`x'], fe or

outreg2 using table_`y'_`x', bdec(2) alpha(0.001, 0.01, 0.05) eform
}
}

panel variable:  idnum (strongly balanced)
time variable:  wave, 2 to 3
delta:  1 unit

note: multiple positive outcomes within groups encountered.
note: 622 groups (1244 obs) dropped because of all positive or
all negative outcomes.

Iteration 0:   log likelihood = -124.10619
Iteration 1:   log likelihood = -123.27992
Iteration 2:   log likelihood = -123.27585
Iteration 3:   log likelihood = -123.27585

Conditional fixed-effects logistic regression   Number of obs      =       308
Group variable: idnum                           Number of groups   =       154

Obs per group: min =         2
avg =       2.0
max =         2

LR chi2(1)         =     15.46
Log likelihood  = -123.27585                    Prob > chi2        =    0.0001

------------------------------------------------------------------------------
deplib |         OR   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
cohdis |   2.258065    .487155     3.78   0.000     1.479442    3.446471
------------------------------------------------------------------------------

note: multiple positive outcomes within groups encountered.
note: 674 groups (1044 obs) dropped because of all positive or
all negative outcomes.

Iteration 0:   log likelihood = -67.689595
Iteration 1:   log likelihood = -63.372241
Iteration 2:   log likelihood = -63.315018
Iteration 3:   log likelihood = -63.314907
Iteration 4:   log likelihood = -63.314907

Conditional fixed-effects logistic regression   Number of obs      =       186
Group variable: idnum                           Number of groups   =        93

Obs per group: min =         2
avg =       2.0
max =         2

LR chi2(10)        =     38.34
Log likelihood  = -63.314907                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
deplib |         OR   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
cohdis |   57.71542   92.04481     2.54   0.011     2.533913    1314.595
childage |   1.016448   .0143132     1.16   0.247     .9887784    1.044892
memployed |   .3803397   .1602152    -2.29   0.022     .1665749     .868428
mominschool |   .2570786    .130673    -2.67   0.008     .0949293    .6961958
momcompledu |   1.120824   .6749133     0.19   0.850     .3443339    3.648341
demployed |   .3515572   .1518083    -2.42   0.015     .1508109    .8195192
djailever |   .4047902    .226039    -1.62   0.105     .1354909    1.209344
mdaysdadsawc |   1.087415   .0485943     1.88   0.061     .9962238    1.186954
mnewpart |   .1073525   .0897959    -2.67   0.008     .0208362    .5531041
lengthsepa~d |   .9767578    .059858    -0.38   0.701     .8662101    1.101414
------------------------------------------------------------------------------

note: multiple positive outcomes within groups encountered.
note: 658 groups (987 obs) dropped because of all positive or
all negative outcomes.

Iteration 0:   log likelihood = -57.304129
Iteration 1:   log likelihood = -53.118765
Iteration 2:   log likelihood =  -53.02455
Iteration 3:   log likelihood = -53.024308
Iteration 4:   log likelihood = -53.024308

Conditional fixed-effects logistic regression   Number of obs      =       160
Group variable: idnum                           Number of groups   =        80

Obs per group: min =         2
avg =       2.0
max =         2

LR chi2(13)        =     39.51
Log likelihood  = -53.024308                    Prob > chi2        =    0.0002

------------------------------------------------------------------------------
deplib |         OR   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
cohdis |   48.82699   83.27831     2.28   0.023     1.725313    1381.821
childage |   1.014492   .0162299     0.90   0.368     .9831758    1.046806
memployed |   .2965949   .1438908    -2.51   0.012     .1146066    .7675694
mominschool |   .2140359    .135176    -2.44   0.015     .0620732    .7380221
momcompledu |    1.46982   .9910594     0.57   0.568     .3920328    5.510691
mwelfareus~r |   .5303944   .2423633    -1.39   0.165     .2165923    1.298837
mtotinc |   1.000015    .000013     1.13   0.257     .9999893     1.00004
mtotadultw~g |   .9618368   .3848976    -0.10   0.923     .4390122    2.107299
demployed |    .413399   .2286302    -1.60   0.110     .1398339    1.222155
djailever |   .2964741   .1805884    -2.00   0.046     .0898468    .9782972
mdaysdadsawc |   1.066868   .0503679     1.37   0.170     .9725787    1.170299
mnewpart |   .1997183    .188201    -1.71   0.087     .0314994    1.266288
lengthsepa~d |   .9477549   .0726007    -0.70   0.484     .8156271    1.101287
------------------------------------------------------------------------------

PROBLEM 2 CODE AND OUTPUT:

foreach y in cohdis {
foreach x in depc {
clear

use "C:\Documents and Settings\ckamp-dush\Desktop\ff data for ncfr_long_ms_`y'_`x'.dta"

xtset idnum wave
di "*************************"
di "`y'"
di "`x'"

xtreg `x' `y' [iweight=_weight_`y'_`x'], fe

outreg2 using table_`y'_`x', bdec(2) alpha(0.001, 0.01, 0.05) addstat (F, e(F))  replace

xtreg `x' `y' childage memployed mominschool momcompledu demployed djailever mdaysdadsawc mnewpart lengthseparated [iweight=_weight_`y'_`x'], fe

outreg2 using table_`y'_`x', bdec(2) alpha(0.001, 0.01, 0.05) addstat (F, e(F))

xtreg `x' `y' childage memployed mominschool momcompledu mwelfareusepastyr mtotinc mtotadultworking demployed djailever mdaysdadsawc mnewpart lengthseparated [iweight=_weight_`y'_`x'], fe

outreg2 using table_`y'_`x', bdec(2) alpha(0.001, 0.01, 0.05) addstat (F, e(F))
}
}

panel variable:  idnum (strongly balanced)
time variable:  wave, 2 to 3
delta:  1 unit
*************************
cohdis
depc
iweight not allowed
r(101);

Claire M. Kamp Dush
Assistant Professor
Department of Human Development and Family Science
The Ohio State University
171A Campbell Hall
Phone:  (614) 247-2126
http://ehe.osu.edu/#hd
http://ipr.osu.edu/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```