10-29-2017 03:22 PM
I am a student trying to perform a proc univariate on my data, however I had to recode my data and now the variables are character variables instead of numeric. I keep getting the
ERROR: Variable Diabetes in list does not match type prescribed for this list.
I realize it is due to the fact that it is not in numerical form, but how else would I go about performing this procedure? Or is there a statement needed for SAS to assign the characters to numeric form.
Thank you so much!
10-29-2017 04:50 PM
How else would you go about performing this procedure?
It's really not clear what you mean, there is no logical way to do something like a PROC UNIVARIATE on character variables. So this is NOT a SAS issue in any way. And you haven't explained what the variable diabetes is, or why you recoded it to character.
10-29-2017 06:58 PM
If your variable is categorical you likely want count summaries instead and that lends itself to PROC FREQ, not PROC UNIVARIATE.
Statistical summaries, such as means/medians don't make sense for a categorical variable.
If you're trying to group your summaries by the categorical variable include it in your CLASS statement.