I have two char variables in a dataset. I want to compute the canonical correlation between the two. By that I mean I want to create some dummy variables from the two categorical variables and compute the canonical correlation that way. After looking through proc cancorr I can not find a way to do this without first manually converting the categorical variables to dummy variables first. Is there a way to do that without manually converting the ca开发者_JS百科tegorical variables to dummy variables first?
No need to do this manually. There are a few SAS macros which can do this for you. Here is one:
http://www.datavis.ca/sasmac/dummy.html
PROC GLMMOD will create a design matrix for you, which essentially means creating the dummy variables.
精彩评论