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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

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