BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
bhr-q
Pyrite | Level 9

Hello all,

Is it correct to use the code below to obtain the λ in a Box-Cox transformation?

I’m unsure because my model includes an independent categorical variable (pre_score) plus a few categorical and continuous confounders (age neuro_scale sex).

I was looking for a way to include a class statement to account for the categorical nature of these variables, but it seems that PROC TRANSREG does not support the class statement.

Is that necessary to include the categorical nature of these variable?

 

 

%let c = 1.45;
proc transreg data=tmp1 ss2 details plots=(boxcox); model BoxCox(fim / parameter=&c convenient lambda=-2 to 2 by 0.05) = identity(pre_score age neuro_scale sex); run;

Thanks,

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
If you really want include some category variables in PROC TRANSREG ,
You could try to transform them into 0-1 variables to form a Design Matrix(include continuous variables),
and feed this Design Matrix into PROC TRANSREG .
Check @Rick_SAS blogs:
https://blogs.sas.com/content/iml/2016/02/24/create-a-design-matrix-in-sas.html

View solution in original post

1 REPLY 1
Ksharp
Super User
If you really want include some category variables in PROC TRANSREG ,
You could try to transform them into 0-1 variables to form a Design Matrix(include continuous variables),
and feed this Design Matrix into PROC TRANSREG .
Check @Rick_SAS blogs:
https://blogs.sas.com/content/iml/2016/02/24/create-a-design-matrix-in-sas.html

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 757 views
  • 3 likes
  • 2 in conversation