<?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 Box Cox transformation for multiple variables in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Box-Cox-transformation-for-multiple-variables/m-p/290787#M19852</link>
    <description>&lt;P&gt;I'm new to the SAS world and have been trying to figure this problem out. I have a list of variables in my data tables that could change (# included, or the names). I've been trying to make a dynamic code that runs the following code for any number of Variables (A, B, C, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   proc transreg data=WORK.'MY_DATA'n;
      model boxcox(Var_A Var_B ...) = identity(DEP_VAR);
   run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been researching and found something along these lines. But I can't seem to figure out how to take the variable output below and use it in the function above. Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC CONTENTS DATA = WORK.'MY_DATA'n
OUT=VAR_NAMES(KEEP = NAME) NOPRINT;
RUN; 

DATA PARSE;
SET VAR_NAMES;
WHERE (NAME NOT IN ('DEP_VAR','ID_VAR'));
RUN; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2016 18:32:59 GMT</pubDate>
    <dc:creator>jbencina</dc:creator>
    <dc:date>2016-08-10T18:32:59Z</dc:date>
    <item>
      <title>Box Cox transformation for multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Box-Cox-transformation-for-multiple-variables/m-p/290787#M19852</link>
      <description>&lt;P&gt;I'm new to the SAS world and have been trying to figure this problem out. I have a list of variables in my data tables that could change (# included, or the names). I've been trying to make a dynamic code that runs the following code for any number of Variables (A, B, C, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   proc transreg data=WORK.'MY_DATA'n;
      model boxcox(Var_A Var_B ...) = identity(DEP_VAR);
   run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been researching and found something along these lines. But I can't seem to figure out how to take the variable output below and use it in the function above. Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC CONTENTS DATA = WORK.'MY_DATA'n
OUT=VAR_NAMES(KEEP = NAME) NOPRINT;
RUN; 

DATA PARSE;
SET VAR_NAMES;
WHERE (NAME NOT IN ('DEP_VAR','ID_VAR'));
RUN; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 18:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Box-Cox-transformation-for-multiple-variables/m-p/290787#M19852</guid>
      <dc:creator>jbencina</dc:creator>
      <dc:date>2016-08-10T18:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Box Cox transformation for multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Box-Cox-transformation-for-multiple-variables/m-p/290802#M19854</link>
      <description>&lt;P&gt;You need to create a macro variable and then pass that to the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#n1y2jszlvs4hugn14nooftfrxhp3.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#n1y2jszlvs4hugn14nooftfrxhp3.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC CONTENTS DATA = WORK.'MY_DATA'n
OUT=VAR_NAMES(KEEP = NAME) NOPRINT;
RUN; 


Proc SQL;
select name into :var_list separated  by " "
from var_names
WHERE (NAME NOT IN ('DEP_VAR','ID_VAR'));
quit;

*Display the variable list in the log for verification;
%put &amp;amp;var_list;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then apply that to your data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   proc transreg data=WORK.'MY_DATA'n;
      model boxcox( &amp;amp;var_list. ) = identity(DEP_VAR);
   run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Aug 2016 19:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Box-Cox-transformation-for-multiple-variables/m-p/290802#M19854</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-10T19:35:30Z</dc:date>
    </item>
  </channel>
</rss>

