You don't need to change the type of the variable.
Depending on which procedure you're using, you can include your variable in the CLASS statement and SAS will treat it as categorical variable. You can recode it to a character but it's unnecessary, categorical, nominal, or ordinal variables can be numeric or character in SAS.
Ordinal logistic model example:
proc logistic data=sashelp.cars;
class cylinders / param=ref;
model origin = cylinders;
run;
@brush01 wrote:
I'm working with the MTCars data set in SAS Studio, and noticed the cylinder column is of numeric type. I feel that because the number of cylinders in a car is either 4, 6, or 8, a data-type of categorical would be more appropriate. (I have included a screenshot of my issue.)
https://prnt.sc/1woaj4u
How do I change a data-type when working with a data set?