开发者

In SAS is there a way to compute the "canonical correlation" between two categorical variables using just a proc?

开发者 https://www.devze.com 2023-03-09 20:57 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消