Hi all,
I found this topic was discussed before. I figured out how to use it for dichotomous or continuous variable, but I don't find any example in which time dependent covariate is categorical (0, 1,2,3).
Please share if you have coding example modeling categorical time dependent variable/covariate.
Thank you!
Hao
Categorical and ordinal variables should be converted to dichotomous variables. Why. There are more intricate explanations, so long story short: Grade level, e.g. in the US: K, 1 through 12, is an ordinal variable. It can't be used as a analysis variables because there is no sense in taking the difference in grade nor the mean of grade. K, 1 through 12 are categories, they would work equally well if they were labeled A,B..M. being ordinal, there is only the set mathematical relationships that begin grade K is less than grade 1 through 12, 1 less than grade 2, etc.
Look at page 13 of this pdf to see how Gender can be coded with a dichotomous variable scheme. Mind you this is not the only way to do it.
referring to: SD-29.pdf (lexjansen.com)
Thanks!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.