BookmarkSubscribeRSS Feed
ngui
Calcite | Level 5

data box;

    set box;

TRL_new = TRL;

TRL_log = log(TRL_new+1);

 

PTRL_new = PTRL;

PTRL_log = log(PTRL_new+1);

run;

 

proc sort data=box;

  by TRL_log PTRL_log;

run;

 

proc reg;  

  model TRL_log = PTRL_log /p r cli clm;

run;

4 REPLIES 4
ballardw
Super User

Details. What exactly do you want "back transformed"?

I suspect part of the answer is going to be to create an output data set with the OUTPUT statement to have the values and then in a data step exponentiate the values (and subtract 1 for some) to get back to the original units.

 

Since you don't exactly use the variables TRL_new and PTRL_new in the model why bother to add them to the data?

 

I would typically expect to see something more like:

data box;
    set box;
   TRL_log = log(TRL+1);

   PTRL_log = log(PTRL+1);
run;
ngui
Calcite | Level 5

Hi Bailardw,

Thank you for your answer. I got two data outputs: one is variables did not transform and the other output did transform by log-log model (natural log). Based on the output from the log-log model, it does not make sense since, based on our expectation (Visualize our data set), TRL(y) must be higher than PTRL(x). I want to perform a log-log model since it fits the linear regression assumption.

This means a one percent increase of the log-transformed TRL (y) was estimated to increase by 0.96% in PTRL(x). (So it means x is higher than y. This conclusion doesn't make sense, but the data fits the linear regression assumption.)


This means 1 cm TRL (y) was estimated to increase by 2.1 cm in PTRL (x). (So it means y is higher than x.) (So it means y is higher than x. This conclusion makes sense, but the data does not fit the linear regression assumption.)

 

I want to back-transform the log-log model because I want to see the real number to decide whether the output result makes any sense. 

 

ngui_0-1695906486994.png

Both variables did not transform

 

ngui_1-1695906553626.png

Both variables did transform by natural log

 

 

ballardw
Super User

Let's try again. Which exact values do you expect to "back transform"? The slope parameter? The intercept? The predicted model results? The residuals (difference between predicted and measured dependent) The entire prediction curve equation (slope becomes an exponent)?

ngui
Calcite | Level 5
Everything if possible. But, the most important values that I want to back transform are slope, intercept and standard error.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 639 views
  • 0 likes
  • 2 in conversation