Hi, this is data I have.
dependent var: outcome (1=cured 2=not cured)
independent var : treatment (1=A, 2=B, 3=C)
diagnosis (1=contaminated, 2= uncontaminated)
This is code for logistic regression
proc logistic data=test;
class outcome treatment diagnosis/ param=reference;
model outcome= treatment diagnosis;
run;
and I got this (ref variable treatment 3 and diagnosis 2)
If I have to write model, is this correct? I dont have to include reference variable in the full equation?
logit(cured)=1.42 +0.58(Treatment1)+1.56(Treatment2) - 0.96(diagnosis 1)
How can I find full model? Am I doing the right thing?
Except for the fact that you have rounded the regression coefficients to two decimal places (which I would not do), it appears that your equation is correct.
This is the "full model". SAS parameterizes models with class variables to have the last value alphabetically set to zero, that's why you don't see a treatment 3, because the coefficient is set to zero. You can request other parameterizations, but you still get the same fitted model and the same predictions.
Except for the fact that you have rounded the regression coefficients to two decimal places (which I would not do), it appears that your equation is correct.
This is the "full model". SAS parameterizes models with class variables to have the last value alphabetically set to zero, that's why you don't see a treatment 3, because the coefficient is set to zero. You can request other parameterizations, but you still get the same fitted model and the same predictions.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.