Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Logit with FW vs Logit PA
From
Simone Peart Boyce <[email protected]>
To
Stata <[email protected]>
Subject
st: Logit with FW vs Logit PA
Date
Wed, 31 Jul 2013 06:08:40 -0700 (PDT)
Hi,
I have an unbalanced panel data set of 256 observations comprised of medical practices. I am trying to calculate adjusted and unadjusted odds ratios of the probability of a practice achieving special recognition contingent on the number of educational sessions attended. My data are arranged such that once a practice achieves recognition, it is no longer in the sample.
Practice n_mnths Recognition educ_session
1 1 0 0
1 2 0 1
1 3 0 1
1 4 1 2
2 1 0 1
...
2 10 1 3
....
I dichotomized educ_session into educ_session<=1 or educ_session>1 (deduc).
I have tried different methods of calculating the unadjusted OR, with differing outcomes.
For the first, I collapsed the dataset and then calculated the OR. My code is below:
collapse (count) n_mnths (max) recognition deduc, by(OrganizationName)
cc recog deduc [fw=n_mnths]
I get the following result
Proportion
| Exposed Unexposed | Total Exposed
-----------------+------------------------+------------------------
Cases | 82 80 | 162 0.5062
Controls | 40 54 | 94 0.4255
-----------------+------------------------+------------------------
Total | 122 134 | 256 0.4766
| |
| Point estimate | [95% Conf. Interval]
|------------------------+------------------------
Odds ratio | 1.38375 | .8039282 2.387452 (exact)
Attr. frac. ex. | .2773261 | -.2438922 .5811434 (exact)
Attr. frac. pop | .1403749 |
+-------------------------------------------------
1-sided Fisher's exact P = 0.1323
2-sided Fisher's exact P = 0.2433
When I do something similar but maintaining the longitudinal structure, I get
xtlogit dpcmh dLLS if ProjectName =="RPC", pa or
GEE population-averaged model Number of obs = 256
Group variable: practice Number of groups = 24
Link: logit Obs per group: min = 1
Family: binomial avg = 10.7
Correlation: exchangeable max = 32
Wald chi2(1) = 5.46
Scale parameter: 1 Prob > chi2 = 0.0195
------------------------------------------------------------------------------
dpcmh | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
dLLS | 3.253334 1.642671 2.34 0.019 1.209318 8.75219
_cons | .0631542 .019269 -9.05 0.000 .034729 .1148453
------------------------------------------------------------------------------
Why are these results different?
Thanks in advance,
Simone
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/