LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 11 May 2011 08:21:18 -0700
Reply-To:     Bruce Weaver <bruce.weaver@hotmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Bruce Weaver <bruce.weaver@hotmail.com>
Subject:      Re: odds ratios after logistic regression
In-Reply-To:  <201105111343.p4BAn8RZ026128@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=us-ascii

Hi Ann. I suggest you use GENLIN (with DISTRIBUTION=BINOMIAL LINK=LOGIT) rather than LOGISTIC REGRESSION, as it has the EMMEANS sub-command that will give you the kind of table you describe. Here's an example I worked out a while ago for a 2x2 situation, but it should be straightforward adapting it to your model. As you can see, I used OMS to send the Pairwise Comparison results to another dataset so that I could process them further.

* OMS. DATASET DECLARE PairWise. OMS /SELECT TABLES /IF COMMANDS=['Generalized Linear Models'] SUBTYPES=['Pairwise Comparisons'] /DESTINATION FORMAT=SAV NUMBERED=TableNumber_ OUTFILE='PairWise'.

GENLIN HSgrad (REFERENCE=FIRST) BY male white (ORDER=DESCENDING) /MODEL male white male*white INTERCEPT=YES DISTRIBUTION=BINOMIAL LINK=LOGIT /EMMEANS TABLES=male SCALE=TRANSFORMED /EMMEANS TABLES=white SCALE=TRANSFORMED /EMMEANS TABLES=male*white SCALE=TRANSFORMED compare=white /EMMEANS TABLES=male*white SCALE=TRANSFORMED compare=male /MISSING CLASSMISSING=EXCLUDE /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

OMSEND. dataset activate PairWise window = front.

* Mean difference is on the log-scale, so exponentiate it to get an odds ratio. compute OddsRatio = exp(MeanDifferenceIJ). compute LowerLimit = exp(lower). compute UpperLimit = exp(upper). format OddsRatio to UpperLimit (f5.3). list var1 to Std.Error Sig to UpperLimit.

* MeanDifferenceIJ = fitted value for VAR2 minus * fitted value for VAR3, within VAR1. * E.g., for row 1, MeanDifferenceIJ = White - Other * difference within MALES; on row 2, MeanDifferenceIJ = * Other - White difference within MALES . * So on row 1, the odds ratio is for White relative to Other; * whereas on row 2, it is for Other relative to White, both * within MALES only. I.e., rows 1 and 2 give the simple * main effects of White v Other, and Other v White.

If you want the full syntax file, drop me a line off-list (to the Lakehead U address in my signature file), and I'll send it to you.

HTH. Bruce

Ann Fitzmaurice wrote: > > hi > > i run the following model , logistic regression dependent vara varb varc > vara*varb > > what i need to do now is to calcuate the odds ratios to complete a table a > by b, where a has 4 levels and b has 3 levels including confidence > intervals > > does anyone know how to do this , and if so do they have an example > > thanks > ann > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD >

----- -- Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.

-- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/odds-ratios-after-logistic-regression-tp4387426p4387649.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


Back to: Top of message | Previous page | Main SPSSX-L page