<?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 Create dataset with common prefix from output ods in macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-with-common-prefix-from-output-ods-in-macro/m-p/646835#M193535</link>
    <description>&lt;P&gt;Hi Folks:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running many bi-variate models. I'd like to have all variables along with their parameter estimates and p-value in one dataset afterwards. The code posted works. However, if I could produce&amp;nbsp;&lt;CODE class=" language-sas"&gt;t.&amp;amp;var&lt;/CODE&gt;&amp;nbsp;in the last data step with a common prefix. I could simply concatenate data with common prefix.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions to come up with the datasets with a common prefix from output ods in macro?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t.commonprefix: ; set t.&amp;amp;var._par;
if _n_=2 then output; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on; 
ods output ParameterEstimates=t.&amp;amp;var._par(keep=Parameter Estimate Probt); 
proc countreg data=alldata Wmat=Wmatrix;
model n_covid = &amp;amp;var p55_64 p65_74 P75_84 p85/offset=ln dist=negbin;
spatialeffects db_trt_rate p55_64 p65_74 P75_84 p85;
run;
ods trace off; 

data t.&amp;amp;var; set t.&amp;amp;var._par;
if _n_=2 then output; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 May 2020 18:08:16 GMT</pubDate>
    <dc:creator>Cruise</dc:creator>
    <dc:date>2020-05-11T18:08:16Z</dc:date>
    <item>
      <title>Create dataset with common prefix from output ods in macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-with-common-prefix-from-output-ods-in-macro/m-p/646835#M193535</link>
      <description>&lt;P&gt;Hi Folks:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running many bi-variate models. I'd like to have all variables along with their parameter estimates and p-value in one dataset afterwards. The code posted works. However, if I could produce&amp;nbsp;&lt;CODE class=" language-sas"&gt;t.&amp;amp;var&lt;/CODE&gt;&amp;nbsp;in the last data step with a common prefix. I could simply concatenate data with common prefix.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions to come up with the datasets with a common prefix from output ods in macro?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t.commonprefix: ; set t.&amp;amp;var._par;
if _n_=2 then output; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on; 
ods output ParameterEstimates=t.&amp;amp;var._par(keep=Parameter Estimate Probt); 
proc countreg data=alldata Wmat=Wmatrix;
model n_covid = &amp;amp;var p55_64 p65_74 P75_84 p85/offset=ln dist=negbin;
spatialeffects db_trt_rate p55_64 p65_74 P75_84 p85;
run;
ods trace off; 

data t.&amp;amp;var; set t.&amp;amp;var._par;
if _n_=2 then output; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 May 2020 18:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-with-common-prefix-from-output-ods-in-macro/m-p/646835#M193535</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2020-05-11T18:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset with common prefix from output ods in macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-with-common-prefix-from-output-ods-in-macro/m-p/646844#M193538</link>
      <description>&lt;P&gt;You don't show how you plan to run the many models, is this a macro?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any event, you could just create a data set with the x and y variables for all of your bivariate models, with a "group" number, and then run PROC COUNTREG with a BY GROUP; statement, and then voila! all of the output is in one data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, your use of the word "bivariate" doesn't seem to match the code you show, where there are many x variables.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 18:20:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-with-common-prefix-from-output-ods-in-macro/m-p/646844#M193538</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-05-11T18:20:17Z</dc:date>
    </item>
  </channel>
</rss>

