Hi everyone! Hopefully you guys can help me out! Below is the code I run! I was able to run this general code for other categories such as insurance status, smoking status, etc.
proc logistic data=HHS.EPDS; class EPDS_Cat (ref="No"); model guideline_levels (ref="None") = EPDS_Cat / link = glogit; run;But I get this error message: ERROR: Invalid reference value for EPDS_Cat. I'm trying to make the "No" as the reference group. Below is a table of the other categories.
EPDS_Cat | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
. | 179 | 3.82 | 179 | 3.82 |
No | 3896 | 83.19 | 4075 | 87.02 |
Yes | 608 | 12.98 | 4683 | 100.00 |
Thanks for your help!
I suggest that you check the formatted value itself. Likely there is a space after the o in "No". It has to match exactly. You could also just use the DESCENDING to get it to use that as the reference.
class EPDS_Cat (descending);
Thanks! I realized that SAS made this numeric, when it should've been categorical! I made a quick change and used the value "1" as the reference group!
Absolutely nothing wrong with numeric values for categorical variables. "Category" is a use, not a value.
Dichotomous 1/0 valued variables can be much easier to perform some tasks with than character valued (or some odd arbitrary other number pairs).
Consider the SUM of 1/0 valued variable is the number of values=1.
The Mean would be the percentage of 1.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.