Statalist


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

Re: st: crude binary analysis


From   Steven Samuels <sjhsamuels@earthlink.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: crude binary analysis
Date   Sun, 24 Aug 2008 11:00:43 -0400

Sahid, -taboods- gives crude odds, not odds ratios.
Use -svy: logit- with -xi, noomit-; drop the constant, and add option "or".

Note: when referring to commands on Statalist, use hyphens around their names: -tabodds-

-Steve

/**************************************************/
sysuse auto, clear
gen rep= rep78<=3
tab rep
svyset _n

tabodds rep foreign
/* Now svy: logit */
xi, noomit : svy: logit rep i.foreign, nocons or
/*************************************************/

On Aug 24, 2008, at 10:29 AM, Sahid Hocine wrote:


Dear Stalister,

I have a question regarding Stata 10 being a newbee on the field.

I am analyzing a DHS data set *(survey) and for the bivariate crude
analysis I am used to tabodds however it is not supported by the
svy , so I guess I would have to use the logistic command for binary
analysis but the output is not what I want i.e a crude odd ratio by
category. Can I proceed with the svy or the stratification is the only
solution?

Waiting for your help

Sahid




. svy:logistic sd107 v130
(running logistic on estimation sample)

Survey: Logistic regression

Number of strata = 35 Number of obs = 5600
Number of PSUs = 4823 Population size = 5638.5227
Design df = 4788
F( 1, 4788) = 0.77
Prob > F = 0.3795

---------------------------------------------------------------------- --------
| Linearized
sd107 | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
------------- +----------------------------------------------------------------
v130 | .5262408 .3844291 -0.88 0.380 . 1256632 2.203743
---------------------------------------------------------------------- --------

. svy:tabodds sd107 v130
tabodds is not supported by svy with vce(linearized); see help svy
estimation for a list of Stata estimation commands
that are supported by svy
r(322);

. :tabodds sd107 v130
unrecognized command: : invalid command name
r(199);

. tabodds sd107 v130

---------------------------------------------------------------------- ----
v130 | cases controls odds [95% Conf. Interval]
------------ +-------------------------------------------------------------
muslim | 81 5218 0.01552 0.01246 0.01933
christian | 3 298 0.01007 0.00323 0.03139
---------------------------------------------------------------------- ----
Test of homogeneity (equal odds): chi2(1) = 0.55
Pr>chi2 = 0.4602

Score test for trend of odds: chi2(1) = 0.55
Pr>chi2 = 0.4602
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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