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 [hidden email] (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 |
Administrator
|
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
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Free forum by Nabble | Edit this page |