<?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 How to run a Box Cox transformation without an independent variable? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-run-a-Box-Cox-transformation-without-an-independent/m-p/566756#M159348</link>
    <description>&lt;P&gt;I am trying to figure out how to run a Box Cox transformation on a continuous response variable (Frond Length) when I do not have continuous explanatory variables (they all are categorical).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This link shows how to run a Box Cox transformation without an independent variable.(&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_transreg_sect015.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_transreg_sect015.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I cannot seem to run the code that will read my specific dataset that also includes a column of zeros. It will return errors saying that my 'Frond.Length'n and 'Zero" are not found. I am not sure how to include a line of codes that will read my dataset (the one I wrote below is definitely wrong). How do I modify the code to do that?&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;My code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;title&lt;/SPAN&gt; 'Univariate Box-Cox'&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; WORK.Data_Final_noAugust_SS_0001;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;&lt;STRONG&gt;transreg&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;maxiter=&lt;SPAN class="s4"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; nozeroconstant;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;model&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;BoxCox&lt;/SPAN&gt;(&lt;SPAN class="s5"&gt;'Frond.Length'n&lt;/SPAN&gt;) = &lt;SPAN class="s1"&gt;identity&lt;/SPAN&gt;(Zero);&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;output&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;univariate&lt;/STRONG&gt; &lt;SPAN class="s1"&gt;noprint&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;histogram&lt;/SPAN&gt; 'Frond.Length'n&lt;SPAN class="s2"&gt; t&lt;/SPAN&gt;'Frond.Length'n&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;ods graphics off&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2019 00:51:10 GMT</pubDate>
    <dc:creator>vitaaquaticus</dc:creator>
    <dc:date>2019-06-18T00:51:10Z</dc:date>
    <item>
      <title>How to run a Box Cox transformation without an independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-run-a-Box-Cox-transformation-without-an-independent/m-p/566756#M159348</link>
      <description>&lt;P&gt;I am trying to figure out how to run a Box Cox transformation on a continuous response variable (Frond Length) when I do not have continuous explanatory variables (they all are categorical).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This link shows how to run a Box Cox transformation without an independent variable.(&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_transreg_sect015.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_transreg_sect015.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I cannot seem to run the code that will read my specific dataset that also includes a column of zeros. It will return errors saying that my 'Frond.Length'n and 'Zero" are not found. I am not sure how to include a line of codes that will read my dataset (the one I wrote below is definitely wrong). How do I modify the code to do that?&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;My code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;title&lt;/SPAN&gt; 'Univariate Box-Cox'&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; WORK.Data_Final_noAugust_SS_0001;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;&lt;STRONG&gt;transreg&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;maxiter=&lt;SPAN class="s4"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; nozeroconstant;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;model&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;BoxCox&lt;/SPAN&gt;(&lt;SPAN class="s5"&gt;'Frond.Length'n&lt;/SPAN&gt;) = &lt;SPAN class="s1"&gt;identity&lt;/SPAN&gt;(Zero);&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;output&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;univariate&lt;/STRONG&gt; &lt;SPAN class="s1"&gt;noprint&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;histogram&lt;/SPAN&gt; 'Frond.Length'n&lt;SPAN class="s2"&gt; t&lt;/SPAN&gt;'Frond.Length'n&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;ods graphics off&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 00:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-run-a-Box-Cox-transformation-without-an-independent/m-p/566756#M159348</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2019-06-18T00:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a Box Cox transformation without an independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-run-a-Box-Cox-transformation-without-an-independent/m-p/566778#M159354</link>
      <description>&lt;P&gt;You should comment your code so we understand what you think is happening.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;*this actually destroys the data_final_no_augst data set - you will need to recreate it;
   data WORK.Data_Final_noAugust_SS_0001;
   run;
 
*you do not have a data= statement here so you are not using any dataset so you will get the wrong results.  will default to the last used data sets which will not be the above one because it's gone;

proc transreg maxiter=0 nozeroconstant;
      model BoxCox('Frond.Length'n) = identity(Zero);
      output;
   run;&lt;/PRE&gt;
&lt;P&gt;What you probably want:&lt;/P&gt;
&lt;P&gt;This assumes you input data set is in a library called mydata. If it's not or you're not familiar with the concept of a library, you can revisit some of the earlier tutorials or check video.sas.com and working with your own files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;   data WORK.Data_Final_noAugust_SS_0001;*newly created data set;
    &lt;FONT size="4" color="#FF6600"&gt;&lt;STRONG&gt; SET mydata.data_final_noAugust_ss_001;*refers to input data set;&lt;/STRONG&gt;&lt;/FONT&gt;
   run;
 
proc transreg &lt;FONT size="4" color="#FF6600"&gt;&lt;STRONG&gt;data = data_final_noAugust_ss_0001&lt;/STRONG&gt;&lt;/FONT&gt; maxiter=0 nozeroconstant;
      model BoxCox('Frond.Length'n) = identity(Zero);
      output;
   run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jun 2019 04:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-run-a-Box-Cox-transformation-without-an-independent/m-p/566778#M159354</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-18T04:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a Box Cox transformation without an independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-run-a-Box-Cox-transformation-without-an-independent/m-p/566832#M159367</link>
      <description>&lt;P&gt;You could check PROC MCMC 's documentation, One of its example is about Box-Cox transformation.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 12:31:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-run-a-Box-Cox-transformation-without-an-independent/m-p/566832#M159367</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-06-18T12:31:54Z</dc:date>
    </item>
  </channel>
</rss>

