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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5343 views
  • 1 like
  • 2 in conversation