Can anyone explain the design variables to me? I want to use moderate severity_baseline as reference, treatment A as reference, and 0 or no steroid use as reference. If the design variables is 0, does that mean it's reference?
Hello @tarheel13,
Your design variable values look like you're using what is called reference cell coding (see documentation of the CLASS statement and section "REFERENCE | REF" in "Other Parameterizations"). Then PROC LOGISTIC creates one design variable with values 0 and 1 for each of the three dichotomous CLASS variables and, yes, the reference level is that where the design variable is 0. By default, the procedure would use the last ordered level (formatted value) as the reference level, so I assume that you (correctly) specified ref=first or individual reference levels, e.g., baseline_steroid(ref='0') in your code. The parameter estimate will then refer to the other level, meaning that, e.g., for a patient with treatment ...B the corresponding estimate is added to the remaining terms in the linear function modeling the logit. Hence, if the estimate is positive, the modeled probability is increased (compared to the reference level, treatment ...A), everything else being the same.
Hello @tarheel13,
Your design variable values look like you're using what is called reference cell coding (see documentation of the CLASS statement and section "REFERENCE | REF" in "Other Parameterizations"). Then PROC LOGISTIC creates one design variable with values 0 and 1 for each of the three dichotomous CLASS variables and, yes, the reference level is that where the design variable is 0. By default, the procedure would use the last ordered level (formatted value) as the reference level, so I assume that you (correctly) specified ref=first or individual reference levels, e.g., baseline_steroid(ref='0') in your code. The parameter estimate will then refer to the other level, meaning that, e.g., for a patient with treatment ...B the corresponding estimate is added to the remaining terms in the linear function modeling the logit. Hence, if the estimate is positive, the modeled probability is increased (compared to the reference level, treatment ...A), everything else being the same.
Thank you so much! I am newer to proc logistic. Yes, the values are 2 for moderate and 3 for severe in severity_baseline and I need moderate so I put ref=first as you said.
You're welcome. I think the output shown in your initial post doesn't match your code, though: The output indicates that ref=first was specified for all three CLASS variables (which can be done easily by putting ref=first to the end of the CLASS statement, i.e., after the slash), whereas your code specifies it for severity_baseline only (and leaves the default, ref=last, for the other two variables unchanged).
Yes, I actually left them alone because I don't know which drug is placebo and then in the specs I have, it did not say what ref to use for baseline steroid use. I just need the predicted probability plot from proc logistic. What is the best way to output that? I am trying to put it in an RTF and think I got it but it's still keeping "The Logistic Procedure" and I don't need that in there. I just need my title statements and the graph itself.
To suppress the unwanted "procedure title" just add
ods noproctitle;
before the PROC LOGISTIC step.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.