BookmarkSubscribeRSS Feed
SureshPadwal
Fluorite | Level 6

Hi,

I’m trying to transform variable using box-cox transformation for normality.

This variable is combination of negative, positive and missing values.

My SAS code:

proc transreg data=data ss2 details  plots=(transformation(dependent) scatter

                       observedbypredicted);

model BoxCox(change_tc_wk12 / lambda=-2 -1 -0.5 to 0.5 by 0.05 1 2

                       alpha=0.01) =  identity(x);run;

Log error message:

ERROR: 273 invalid values were encountered while attempting to transform variable change_tc_wk12.

WARNING: Ordinary missing values were found or an UNTIE transformation or the UNTIE= option was specified.  The utility of the

         hypothesis tests are dubious since one parameter must be estimated for each of these values.  If you really want to

         do this, ensure that no observations are duplicated -- combine duplicate observations and use a FREQ statement.  If

         you do not, the parameter count may be too large and the tests overly conservative. However, it is best to avoid

         this situation altogether.

NOTE: Plot requests DEPENDENTS SCATTER OBSERVEDBYPREDICTED are ignored.

NOTE: The SAS System stopped processing this step because of errors.

While same code works for another variable containing positive values.

Also is there any procedure to identify possible transformation for particular non normal variable similar to ‘ladder’ command in STATA software which provides all possible transformations.

Please help.

1 REPLY 1
Someone1
Calcite | Level 5

Try to remove 0 (or lower than 0 ) from the dataset.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 1 reply
  • 5519 views
  • 1 like
  • 2 in conversation