BookmarkSubscribeRSS Feed
haoduonge
Quartz | Level 8

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

 

 

 

https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_phreg_sect0... 

2 REPLIES 2
PhilC
Rhodochrosite | Level 12

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)

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1016 views
  • 0 likes
  • 2 in conversation