Hi all,
I am attempting to perform a multinomial logistic regression to predict a 3-level ordinal DV (Y = {0,1,2}) with a 3-level nominal IV (Y = {2,3,4}, but non-ordered). I would like to produce the following output:
Odds of "Yes vs. No" in being in category 2 in DV, when in category 2 in IV
Odds of "Yes vs. No" in being in category 2 in DV, when in category 3 in IV
Odds of "Yes vs. No" in being in category 2 in DV, when in category 4 in IV
Ditto for above, but for category 1 in DV
Ditto for above, but for category 0 in DV
Using PROC Surveylogistic, I have the following two blocks of code:
Block 1:
proc surveylogistic data=A
weight weight;
class X (ref = '4') / param = ref;
model Y(descending) = X;
estimate 'Odds of Y = 1 OR 2 due to X = 2' intercept 1 X 2 / CL EXP Category = '1';
estimate 'Odds of Y = 2 due to X = 2' intercept 1 X 2 / CL EXP Category = '2';
estimate 'Odds of Y = 1 OR 2 due to X = 3' intercept 1 X 3 / CL EXP Category = '1';
estimate 'Odds of Y = 2 due to X = 3' intercept 1 X 3 / CL EXP Category = '2';
estimate 'Odds of Y = 1 OR 2 due to X = 4' intercept 1 X 4 / CL EXP Category = '1';
estimate 'Odds of Y = 2 due to X = 4' intercept 1 X 4 / CL EXP Category = '2';
run;
Block 2:
proc surveylogistic data=A
weight weight;
class X (ref = '4') / param = ref;
model Y= X;
estimate 'Odds of Y = 0 due to X = 2' intercept 1 X 2 / CL EXP Category = '0';
estimate 'Odds of Y = 0 due to X = 3' intercept 1 X 2 / CL EXP Category = '0';
estimate 'Odds of Y = 0 due to X = 4' intercept 1 X 3 / CL EXP Category = '0';
run;
To my understanding, the above two procs give me the following:
1. Odds of "Yes vs. No" in being in category 2 in DV, when in category {2,3,4} in IV <- Block 1
2. Odds of "Yes vs. No" in being in AT LEAST category 2 in DV (category 1 OR 2), when in category {2,3,4} in IV <- Block 1
3. Odds of "Yes vs. No" in being in category 0 in DV, when in category {2,3,4} in IV <- Block 2
Question: How can I use Estimate statements to extract "Odds of 'Yes vs. No' in being in category 1 in DV when in category {2,3,4} in IV?" I am confused about how to obtain Odds Ratios for the middle category, given my understanding on how ordinal logistic regression custom hypothesis testing works using PROC Surveylogistic Estimate statements.
The odds of Y=2 given X=2 means Pr(Y=2)/Pr(Y=1 or 3) when X=2. I suspect this is not really what you want. I'm guessing what you want is an estimate of Pr(Y=2) given X=2 and similarly for the probabilities of the other Y levels at each X level. You could get that easily by using the PREDPROBS=INDIVIDUAL option in the OUTPUT statement. It provides the estimated probability of each response level for each observation. ESTIMATE statements with EXP will give you cumulative odds (such as Pr(Y=0)/Pr(Y=1 or 2) and Pr(Y=0 or 1)/Pr(Y=2)). In any case, the coefficients that you have following X in the ESTIMATE statements should be a list like 1 0 to select level 2 of X since X is categorical and has two estimated parameters. Add the E option so see the coefficients that are used to multiply the model parameters.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.