<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to perform Box-cox back transformation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949398#M47477</link>
    <description>&lt;P&gt;It worked! Thank you so much Rick_SAS!! I only had 3 missing values in total so I didn't think it was going to be so problematic.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I am puzzled after realizing that the distribution of the residuals doesn't improve after the transformation.&lt;/P&gt;
&lt;P&gt;Before:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palolix_8-1730227117237.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101857i4FC0E12F27376A73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="palolix_8-1730227117237.png" alt="palolix_8-1730227117237.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;After fitting the linear reg model using the new response var:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_5" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palolix_9-1730227173052.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101858iFB253708979A1E75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="palolix_9-1730227173052.png" alt="palolix_9-1730227173052.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_7" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_6" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_4" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 29 Oct 2024 18:44:11 GMT</pubDate>
    <dc:creator>palolix</dc:creator>
    <dc:date>2024-10-29T18:44:11Z</dc:date>
    <item>
      <title>How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949072#M47450</link>
      <description>&lt;P&gt;Dear SAS Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you back-transform a dependent variable in SAS when using box-cox?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps I did in order to do a box-cox transformation of my dependent continuous variable.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc transreg data=one;&lt;BR /&gt;Where Variety='BL516' and Season=2021;&lt;BR /&gt;model boxcox(AvgFirm) = identity(Wks);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data new_one;&lt;BR /&gt;set one;&lt;BR /&gt;new_AvgFirm = (AvgFirm**(1.5) - 1) / 1.5;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc reg data=new_one;&lt;BR /&gt;model new_AvgFirm = Wks;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would greatly appreciate your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Caroline&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 21:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949072#M47450</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-25T21:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949125#M47460</link>
      <description>&lt;P&gt;You are using a transformation of the form&lt;/P&gt;
&lt;P&gt;Z = (Y^p - 1) / p.&lt;/P&gt;
&lt;P&gt;You can invert this transformation by solving for Y. You get&lt;/P&gt;
&lt;P&gt;Y = (p*Z + 1)^(1/p).&lt;/P&gt;
&lt;P&gt;So, if you want to know how the regression model for Z relates to Y, use PROC REG to output the predicted values for Z, then use a DATA step to apply the inverse transformation. For example, here is some code that uses the Sashelp.class data:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data new_one;
set sashelp.class;
new_weight = (weight**(1.5) - 1) / 1.5;
run;

proc reg data=new_one;
model new_weight = Height;
output out=RegOut P=new_pred;
run;

data pred;
set RegOut;
pred = (1.5*new_pred + 1)**(1/1.5);
run;

/* visualize the back-transformed model */
proc sort data=pred; by height; run;
 
proc sgplot data=pred;
scatter x=Height y=weight;
series x=Height y=pred;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Oct 2024 09:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949125#M47460</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-27T09:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949287#M47461</link>
      <description>&lt;P&gt;That was a big help, thank you so much Rick_SAS!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the second data step, P=new_pred would be P=new_weight?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 18:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949287#M47461</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-28T18:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949291#M47462</link>
      <description>&lt;P&gt;Yes. I was back-transforming the predicted values, but the same formula applies to the observed responses.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 18:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949291#M47462</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-28T18:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949294#M47463</link>
      <description>&lt;P&gt;Thank you. So If I want to get my parameter estimates for the back-transformed outcome variable then I can run a new regression model using the back-transformed predicted values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case:&lt;/P&gt;
&lt;P&gt;proc reg data=pred;&lt;BR /&gt;model pred = height;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 19:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949294#M47463</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-28T19:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949296#M47464</link>
      <description>&lt;P&gt;Perhaps I am not understanding your question. "Parameter estimates for the back-transformed outcome variable" are not defined. The Box-Cox transformation is nonlinear, so you can't invert the transformation without destroying the linearity of the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose the original response is Y, and Z is the result of the Box-Cox transformation, Then you fit the linear model&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Z = b0 + b1*X.&lt;/P&gt;
&lt;P&gt;But if you try to invert the transformation, you no longer get a linear model.&amp;nbsp; You get&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Y^p = (p*b0 +1) + (p*b1)*X&lt;/P&gt;
&lt;P&gt;If you take the p_th root, you do not get a linear model for Y.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 19:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949296#M47464</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-28T19:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949306#M47465</link>
      <description>&lt;P&gt;Thanks again for your reply Rick_SAS. Sorry for the confusion, right, in order to make predictions I will need to fit a linear&amp;nbsp; model using the new response variable in this equation&amp;nbsp;&lt;SPAN&gt;Z = b0 + b1*X, and the backtransformation will give me the geometric means I suppose.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 23:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949306#M47465</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-28T23:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949335#M47466</link>
      <description>&lt;P&gt;I have written about the Box-Cox transformation at&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2022/08/17/box-cox-regression.html" target="_blank"&gt;The Box-Cox transformation for a dependent variable in a regression - The DO Loop (sas.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As I state there, "&lt;SPAN&gt;the Box-Cox [model] can be hard to interpret" because you want to predict a variable Y, but the B-C transformation provides a linear model for Z.&amp;nbsp; You can use back-transformation on the predicted values, but not on the model except for special cases such as lambda=0, which corresponds to a log transformation.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 09:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949335#M47466</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-29T09:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949392#M47475</link>
      <description>&lt;P&gt;Thank you very much for sharing that blog, very valuable information.&lt;/P&gt;
&lt;P&gt;I tried the box-cox transformation suggested there but I am getting this warning:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: Ordinary missing values were found or an UNTIE transformation or the UNTIE= option was&lt;BR /&gt;specified. The utility of the hypothesis tests are dubious since one parameter must be&lt;BR /&gt;estimated for each of these values. If you really want to do this, ensure that no&lt;BR /&gt;observations are duplicated -- combine duplicate observations and use a FREQ statement.&lt;BR /&gt;If you do not, the parameter count may be too large and the tests overly conservative.&lt;BR /&gt;However, it is best to avoid this situation altogether.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the code I am using:&lt;/P&gt;
&lt;P&gt;proc transreg data=one ss2 details plots=(boxcox);&lt;BR /&gt;Where Variety='BL516';&lt;BR /&gt;model boxcox(AvgFirm/convenient lambda=-2 to 2 by 0.1) = identity(Weeks);&lt;BR /&gt;output out=TransOut residual;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may be due to unbalanced data (dep var was not measured at all months every season), not enough observations for the dependent variable (only 5 obs at each level of Weeks), and levels of the indep var Weeks are not spaced equally (week 0, 1, 3, and 6).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 17:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949392#M47475</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-29T17:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949395#M47476</link>
      <description>&lt;P&gt;The error message indicates that the problem might be related to missing responses for duplicate explanatory variables.&amp;nbsp; Study the following example.&amp;nbsp; I don't have your data, but if they look like the following, delete the observations that have missing responses. These obs don't affect the model fit in any case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input AvgFirm Weeks;
datalines;
1 1
2 3
3 4
. 4
;

proc transreg data=test ss2 details plots=(boxcox);
model boxcox(AvgFirm/convenient lambda=-2 to 2 by 0.1) = identity(Weeks);
output out=TransOut residual;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Oct 2024 18:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949395#M47476</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-29T18:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949398#M47477</link>
      <description>&lt;P&gt;It worked! Thank you so much Rick_SAS!! I only had 3 missing values in total so I didn't think it was going to be so problematic.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I am puzzled after realizing that the distribution of the residuals doesn't improve after the transformation.&lt;/P&gt;
&lt;P&gt;Before:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palolix_8-1730227117237.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101857i4FC0E12F27376A73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="palolix_8-1730227117237.png" alt="palolix_8-1730227117237.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;After fitting the linear reg model using the new response var:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_5" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palolix_9-1730227173052.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101858iFB253708979A1E75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="palolix_9-1730227173052.png" alt="palolix_9-1730227173052.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_7" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_6" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_4" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="c"&gt;
&lt;DIV id="tinyMceEditorpalolix_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Oct 2024 18:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949398#M47477</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-29T18:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949399#M47478</link>
      <description>&lt;P&gt;Those diagnostic panels look like PROC REG. Please post your complete SAS program, including calls to PROC REG, PROC TRANSREG, and DATA steps.&amp;nbsp; Remember to use the "Running Man icon" (Insert SAS Code) so that the SAS code is nicely formatted.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 18:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949399#M47478</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-29T18:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949407#M47480</link>
      <description>&lt;P&gt;Ok, sure. Here are the data steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*Original Linear reg model for BL516&amp;nbsp; */&lt;BR /&gt;proc reg data=one;&lt;BR /&gt;Where Variety='BL516';&lt;BR /&gt;model AvgFirm=Weeks/dw clb;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;*If residuals not normally distributed perform box-cox transformation;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;proc transreg data=one ss2 details plots=(boxcox);&lt;/DIV&gt;
&lt;DIV&gt;Where Variety='BL516';&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; model boxcox(AvgFirm/convenient lambda=-2 to 2 by 0.1) = identity(Weeks);&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; output out=TransOut residual;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;*create new dataset that uses box-cox transformation to create new y;&lt;/P&gt;
&lt;P&gt;data new_one;&lt;BR /&gt;set one;&lt;BR /&gt;Where Variety='BL516';&lt;BR /&gt;new_AvgFirm = (AvgFirm**(1.4) - 1) / 1.4; /*The output from previous step tells me that the selected value to use for lambda is 1.4*/&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;*fit simple linear regression model using new response variable;&lt;BR /&gt;proc reg data=new_one;&lt;BR /&gt;Where Variety='BL516';&lt;BR /&gt;model new_AvgFirm = Weeks;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Oct 2024 20:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949407#M47480</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-29T20:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949459#M47481</link>
      <description>&lt;P&gt;Just a few last remarks:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The R-square and adjusted R-square values are better for the new_AvgFirm variable, so the B-C transform did improve the fit, but only by a little.&lt;/LI&gt;
&lt;LI&gt;The original residuals indicate homoscedasticity (compare the range of the residuals for each week) and an extreme outlier. You might want to double-check the response value for the obs that has a high Cook's D value.&lt;/LI&gt;
&lt;LI&gt;You are treating WEEKS as continuous. The Residual-by-predicted-value plot indicates that there is a trend that you are not capturing in the model. You might want to add a WEEKS**2 term or treat WEEKS as categorical (see below).&lt;/LI&gt;
&lt;LI&gt;The diagnostics plots indicate that WEEKS might be better modeled as a CLASS variable. That will give you more parameters but should result in a better model. You probably don't need to use B-C at all if you change from PROC REG to PROC GLM and treat WEEKS as categorical.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;In summary, I don't think your problem is the B-C transformation. I think you have other modeling issues. Good luck with your project.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 10:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949459#M47481</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-30T10:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Box-cox back transformation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949486#M47484</link>
      <description>&lt;P&gt;Thank you so much for your great support on this! That makes a lot of sense so I will remove that outlier and switch to proc glm to treat weeks as a categorical variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 15:13:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-perform-Box-cox-back-transformation/m-p/949486#M47484</guid>
      <dc:creator>palolix</dc:creator>
      <dc:date>2024-10-30T15:13:50Z</dc:date>
    </item>
  </channel>
</rss>

