[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Garrard, Wendy M." <wendy.garrard@Vanderbilt.Edu> |

To |
"StataList" <statalist@hsphsun2.harvard.edu> |

Subject |
st: -xtmelogit- question |

Date |
Mon, 24 Sep 2007 08:35:45 -0500 |

I am using -xtmelogit- to estimate a crossed-effects random intercept model. The data represents responses from individuals who use services at different agencies; those agencies operate in multiple counties. I want to identify the county-specific effects and the agency-specific effects. There are 95 total counties in TN, but only 70 have respondents; There are 20 agencies in the data. (-tab- confirms this.) PROBLEM -- when I run the first command below , the groupings section of the output show 70 counties but 93 agencies and the RE estimates for the var output are puzzling (see the example output below my signature): xtmelogit outcome varlist || tncounty: || agencynum: , options Yet, when I run this second version of the command, mimicking the new Stata10 manual for treating the agencies as if nested in counties, it gives me the correct number of agencies in the groupings section of the output and the RE estimates for the var/std are sensible. xtmelogit outcome varlist || _all:R.tncounty || agencynum: , options MY THOUGHTS -- judging from the missing value in the RE table, I wonder if there is some sort of problem maximizing/estimating, but I'm not sure how or why. What exactly does the -_all:R.- trick actually do? I see from the documentation that it's reducing the size of the matrix being manipulating, but is this simply a way to tell Stata not to waste effort estimating the 70 different county effects? It's not clear to me how this should affect its counting of agencies, unless there is something extremely complicated about the nesting structure of the data. For example, every respondent has a county and an agency, but there are a few "one-agency counties" that are anomalous; so maybe the _all trick fixes things reducing the complexity of having the individual counties, freeing it act properly with the agencies. Thanks in advance for your suggestions. See example output below. Regards, Wendy ******************** . xtmelogit vsat black || tncounty: || agencynum: , or variance cov(un) Note: single-variable random-effects specification; covariance structure set to identity Refining starting values: Iteration 0: log likelihood = -1721.4209 (not concave) Iteration 1: log likelihood = -1702.8252 Iteration 2: log likelihood = -1697.1018 Performing gradient-based optimization: Iteration 0: log likelihood = -1697.1018 Iteration 1: log likelihood = -1696.955 Iteration 2: log likelihood = -1696.9098 Iteration 3: log likelihood = -1696.8852 Iteration 4: log likelihood = -1696.8833 Iteration 5: log likelihood = -1696.8832 Mixed-effects logistic regression Number of obs = 2467 ------------------------------------------------------------------------ -- | No. of Observations per Group Integration Group Variable | Groups Minimum Average Maximum Points ----------------+------------------------------------------------------- -- tncounty | 70 1 35.2 411 7 agencynum | 93 1 26.5 245 7 ------------------------------------------------------------------------ -- Wald chi2(1) = 1.84 Log likelihood = -1696.8832 Prob > chi2 = 0.1751 ------------------------------------------------------------------------ ------ vsat | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------- ------ black | .8621235 .0943249 -1.36 0.175 .6957282 1.068315 ------------------------------------------------------------------------ ------ ------------------------------------------------------------------------ ------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------ ------ tncounty: Identity | var(_cons) | 2.30e-12 1.34e-06 0 . -----------------------------+------------------------------------------ ------ agencynum: Identity | var(_cons) | .1637944 .0756035 .0662835 .4047555 ------------------------------------------------------------------------ ------ LR test vs. logistic regression: chi2(2) = 16.75 Prob > chi2 = 0.0002 Note: LR test is conservative and provided only for reference. * * 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/

**Follow-Ups**:**st: WCSUG program announcement***From:*Sophia Rabe-Hesketh <sophiarh@berkeley.edu>

- Prev by Date:
**Re: st: Re: memory size 7 data merging** - Next by Date:
**st: -estout- and ebsd** - Previous by thread:
**Re: st: Re: memory size 7 data merging** - Next by thread:
**st: WCSUG program announcement** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |