Date: Wed, 11 May 2011 08:21:18 -0700
Reply-To: Bruce Weaver <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Bruce Weaver <firstname.lastname@example.org>
Subject: Re: odds ratios after logistic regression
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.
DATASET DECLARE PairWise.
/IF COMMANDS=['Generalized Linear Models'] SUBTYPES=['Pairwise
/DESTINATION FORMAT=SAV NUMBERED=TableNumber_
GENLIN HSgrad (REFERENCE=FIRST) BY male white (ORDER=DESCENDING)
/MODEL male white male*white INTERCEPT=YES
/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
/PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).
dataset activate PairWise window = front.
* Mean difference is on the log-scale, so exponentiate it to get an odds
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.
Ann Fitzmaurice wrote:
> i run the following model , logistic regression dependent vara varb varc
> 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
> does anyone know how to do this , and if so do they have an example
> 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
"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
For a list of commands to manage subscriptions, send the command