- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try using its original value like : 1 , 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try using its original value like : 1 , 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.