<?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 show confidence interval value on Box Cox transformation? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324572#M17144</link>
    <description>&lt;P&gt;as far as I know, box cox transformation&amp;nbsp;for&amp;nbsp;univariate (ex: Ekspor variable), then&amp;nbsp;use zero variable for identity.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2017 14:49:32 GMT</pubDate>
    <dc:creator>rauzan</dc:creator>
    <dc:date>2017-01-13T14:49:32Z</dc:date>
    <item>
      <title>How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324252#M17127</link>
      <description>&lt;P&gt;Hei all.. I need help to show confidence interval value on Box Cox transformation.&amp;nbsp;&lt;BR /&gt;I dont know source code for do it. hope someone can help me.&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 14:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324252#M17127</guid>
      <dc:creator>rauzan</dc:creator>
      <dc:date>2017-01-12T14:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324256#M17128</link>
      <description>&lt;P&gt;If you use PROC TRANSREG, you get the interval and graph for free. See &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_transreg_examples02.htm" target="_self"&gt;the documentation for PROC TRANSREG.&lt;/A&gt;&amp;nbsp;For details, see the details section &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_transreg_details02.htm" target="_self"&gt;"Box-Cox Transformations."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 15:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324256#M17128</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-12T15:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324269#M17129</link>
      <description>&lt;P&gt;I have to use proc transreg, source code below:&lt;/P&gt;&lt;P&gt;proc transreg data=VARIMAX details;&lt;BR /&gt;title2 'Defaults';&lt;BR /&gt;model boxcox(Ekspor / lambda=-3 to 3 by 0.01) = identity(z);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please see my attach.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13317iB8733AFFD4278916/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="df.PNG" title="df.PNG" /&gt;</description>
      <pubDate>Thu, 12 Jan 2017 15:14:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324269#M17129</guid>
      <dc:creator>rauzan</dc:creator>
      <dc:date>2017-01-12T15:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324274#M17130</link>
      <description>&lt;P&gt;Can you post what you want it to look like? &amp;nbsp;For example, do you want an inset with the lower95 and upper95 values?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 15:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324274#M17130</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-12T15:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324280#M17131</link>
      <description>&lt;P&gt;yes, I want to&lt;SPAN&gt;&amp;nbsp;inset lower95 and upper95 values.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 15:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324280#M17131</guid>
      <dc:creator>rauzan</dc:creator>
      <dc:date>2017-01-12T15:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324375#M17134</link>
      <description>&lt;P&gt;Okay, the best way I can think of is to copy the&amp;nbsp;Stat.Transreg.Graphics.BoxCoxPlot2&lt;/P&gt;
&lt;P&gt;template and add a legend entry for the LOWER and UPPER bounds. The details are in the SAS/STAT documentation, in the chapter on &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_templt_sect001.htm" target="_self"&gt;"Statistical Graphics Using ODS"&lt;/A&gt;. &amp;nbsp;For even more details, see the chapter "Graph Template Modification" in Warren Kuhfeld's free e-book &lt;A href="http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsbasicg.pdf" target="_self"&gt;Basic ODS Graphics Examples.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll break the task into steps:&lt;/P&gt;
&lt;P&gt;1. Use PROC TEMPLATE to see the template used by the BoxCoxPlot:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
source Stat.Transreg.Graphics.BoxCoxPlot2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2. Copy that definition from the SAS log into a PROC TEMPLAE; ... RUN; block.&lt;/P&gt;
&lt;P&gt;3. Modify the GTL so that the DYNAMIC variables LOWER and UPPER appear in a legend. &amp;nbsp;In the following example, I moved the inset from the lower plot (where there isn't much room) into the upper plot where there is more room:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* for debugging:
ods path (prepend) work.template(update); */
proc template;
define statgraph Stat.Transreg.Graphics.BoxCoxPlot2;
   notes "Log Likelihood and t Square Plot";
   dynamic
      var 'Box-Cox variable name'
      lab 'Box-Cox variable label'
      varorlab 'label or name when no label'
      p05 't or t**2 at p=0.05'
      p01 't or t**2 at p=0.01'
      p001 't or t**2 at p=0.001'
      lower best upper yaxislabel ci head actuallambda legend
      footernote legendtitle _byline_ _bytitle_ _byfootnote_;
   begingraph;
      entrytitle HEAD;
      layout lattice / columndatarange=union rowgutter=0 rows=2
         shrinkfonts=true rowweights=(0.6 0.4);
         layout overlay / xaxisopts=(display=none) yaxisopts=(
            label=YAXISLABEL);
            bandplot y=TORF limitlower=LOWER limitupper=UPPER /
               legendlabel=CI fillattrs=GRAPHCONFIDENCE extend=
               true;
            seriesplot y=TORF x=UPPERLAMBDA / group=PARAMETER
               index=INDEXVAR includemissinggroup=false tip=(y
               x group) name="Parameter" primary=true;
            seriesplot y=TORF x=UPPERLAMBDA / group=EFFECT
               index=INDEXVAR includemissinggroup=false tip=(y
               x group);
            referenceline x=LOWER;
            referenceline x=BEST;
            referenceline x=UPPER;
            /* EDIT: Here is new GTL which adds an inset */
            layout gridded / autoalign=(topright topleft
               bottomright bottomleft right left top bottom)
               rows=4;
               entry "Selected " { Unicode LAMBDA } " = " ACTUALLAMBDA;
               entry "Lower " { Unicode LAMBDA } " = " LOWER;
               entry "Upper " { Unicode LAMBDA } " = " UPPER;
               discretelegend "band" / halign=right border=false;
            endlayout;
         endlayout;
         layout overlay / xaxisopts=(label="Lambda") yaxisopts=
            (label="Log Likelihood" shortlabel="Log Like");
            bandplot y=LOGLIKE limitlower=LOWER limitupper=
               UPPER / name="band" legendlabel=CI fillattrs=
               GRAPHCONFIDENCE extend=true;
            seriesplot y=LOGLIKE x=LAMBDA / primary=true tip=(y
               x);
            referenceline x=LOWER;
            referenceline x=BEST;
            referenceline x=UPPER;
            /* EDIT: Old inset used to be here */
            if (LEGEND)
               discretelegend "Parameter" / title=LEGENDTITLE;
            endif;
         endlayout;
      endlayout;
      if (^LEGEND)
         entryfootnote FOOTERNOTE;
      endif;
      if (_BYTITLE_)
         entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;
      else
         if (_BYFOOTNOTE_)
            entryfootnote halign=left _BYLINE_;
         endif;
      endif;
   endgraph;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;4. The previous steps only need to be completed one time. Now every time that you run PROC TRANSREG, the new template will be used to layout the graph:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Example from TRANSREG docuemtnation */
proc format;
   value a -1 =   8 0 =   9 1 =  10;
   value l -1 = 250 0 = 300 1 = 350;
   value o -1 =  40 0 =  45 1 =  50;
run;

data yarn;
   input Fail Amplitude Length Load @@;
   format amplitude a. length l. load o.;
   label fail = 'Time in Cycles until Failure';
   datalines;
 674 -1 -1 -1    370 -1 -1  0    292 -1 -1  1    338  0 -1 -1
 266  0 -1  0    210  0 -1  1    170  1 -1 -1    118  1 -1  0
  90  1 -1  1   1414 -1  0 -1   1198 -1  0  0    634 -1  0  1
1022  0  0 -1    620  0  0  0    438  0  0  1    442  1  0 -1
 332  1  0  0    220  1  0  1   3636 -1  1 -1   3184 -1  1  0
2000 -1  1  1   1568  0  1 -1   1070  0  1  0    566  0  1  1
1140  1  1 -1    884  1  1  0    360  1  1  1
;

ods graphics on;
proc transreg details data=yarn;
   model BoxCox(fail / convenient lambda=-2 to 2 by 0.05) = identity(length);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Jan 2017 19:26:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324375#M17134</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-12T19:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324549#M17141</link>
      <description>&lt;P&gt;thanks Sir. but when I use identity is variable z where z is zero, that can't show lower and upper tail. I use z is zero because my case is Box Cox transformation to time series data. Please correct me if i'm wrong.&lt;/P&gt;&lt;P&gt;my code,&lt;/P&gt;&lt;PRE&gt;proc transreg data=VARIMAX details; 
      title2 'Defaults'; 
      model boxcox(Ekspor / convenient lambda=-3 to 3 by 0.25) = identity(z);
      run;&lt;/PRE&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13325i4D99D8B2474AD7AA/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="1.PNG" title="1.PNG" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13326i4346FCC7DA2F3E69/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="124.png" title="124.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13327i93B62AE6024CFF20/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Untitled.png" title="Untitled.png" /&gt;</description>
      <pubDate>Fri, 13 Jan 2017 13:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324549#M17141</guid>
      <dc:creator>rauzan</dc:creator>
      <dc:date>2017-01-13T13:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324554#M17142</link>
      <description>&lt;P&gt;Sorry, but I do not understand what you are saying about the z variable. Is z always zero? Is Z discrete?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, from your image the CI is obviously [-0.25, 1].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have shown you how to create the plow you want.&amp;nbsp; If you are running an old version of SAS, your ODS template might have a different name or contents, but the process is the same.&amp;nbsp; I think I have answered your original question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 13:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324554#M17142</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-13T13:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324572#M17144</link>
      <description>&lt;P&gt;as far as I know, box cox transformation&amp;nbsp;for&amp;nbsp;univariate (ex: Ekspor variable), then&amp;nbsp;use zero variable for identity.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 14:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324572#M17144</guid>
      <dc:creator>rauzan</dc:creator>
      <dc:date>2017-01-13T14:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to show confidence interval value on Box Cox transformation?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324575#M17145</link>
      <description>&lt;P&gt;yes Sir. you have that.&amp;nbsp;&lt;SPAN&gt;thanks for your help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 14:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-show-confidence-interval-value-on-Box-Cox-transformation/m-p/324575#M17145</guid>
      <dc:creator>rauzan</dc:creator>
      <dc:date>2017-01-13T14:52:02Z</dc:date>
    </item>
  </channel>
</rss>

