<?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 combine similar output tabels in SAS output ? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91274#M3383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, This is how I do this sort of thing (with example data from PROC MIXED doc) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Example data */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data rc;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; input Batch Month @@;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; Monthc = Month;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; do i = 1 to 6;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input Y @@;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; datalines;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 101.2 103.3 103.3 102.1 104.4 102.4&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 98.8&amp;nbsp; 99.4&amp;nbsp; 99.7&amp;nbsp; 99.5&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp; 98.4&amp;nbsp; 99.0&amp;nbsp; 97.3&amp;nbsp; 99.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.5 100.2 101.7 102.7&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp; 96.3&amp;nbsp; 97.2&amp;nbsp; 97.2&amp;nbsp; 96.3&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 97.3&amp;nbsp; 97.9&amp;nbsp; 96.8&amp;nbsp; 97.7&amp;nbsp; 97.7&amp;nbsp; 96.7&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 102.6 102.7 102.4 102.1 102.9 102.6&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 99.1&amp;nbsp; 99.0&amp;nbsp; 99.9 100.6&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 3&amp;nbsp; 105.7 103.3 103.4 104.0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.3 101.5 100.9 101.4&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp; 94.1&amp;nbsp; 96.5&amp;nbsp; 97.2 95.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 93.1&amp;nbsp; 92.8&amp;nbsp; 95.4 92.2&amp;nbsp;&amp;nbsp; 92.2&amp;nbsp; 93.0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 105.1 103.9 106.1 104.1 103.7 104.6&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 1&amp;nbsp; 102.2 102.0 100.8&amp;nbsp; 99.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 3&amp;nbsp; 101.2 101.8 100.8 102.6&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.1 102.0 100.1 100.2&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 9&amp;nbsp; 100.9&amp;nbsp; 99.5 102.2 100.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 97.8&amp;nbsp; 98.3&amp;nbsp; 96.9&amp;nbsp; 98.4&amp;nbsp; 96.9&amp;nbsp; 96.5&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Create an empty table to gather stats */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table fits (covStruct character(100), descr character(25), value numeric);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Define a macro to append stats */ &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%macro fits(fs=fs,mi=mi);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;delete from fits where covStruct=(select value from &amp;amp;mi where descr="Covariance Structure");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;insert into fits (covStruct, descr, value) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; select &amp;amp;mi..value, &amp;amp;fs..descr, &amp;amp;fs..value&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; from &amp;amp;fs., &amp;amp;mi. where &amp;amp;mi..descr="Covariance Structure";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%mend fits;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Do an analysis, get stats in ODS tables */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc mixed data=rc;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; class Batch;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; model Y = Month / s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; random Int Month / type=un sub=Batch s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; ods output FitStatistics=fs ModelInfo=mi;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Call the macro */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%fits;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Another covariance structure */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc mixed data=rc;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; class Batch;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; model Y = Month / s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; random Int Month / type=cs sub=Batch s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; ods output FitStatistics=fs ModelInfo=mi;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Gather more stats */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%fits;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* And so on ... */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Reshape the stats table */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sort data=fits; by descr covStruct; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc transpose data=fits out=want(drop=_name_);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;by descr;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;id covStruct;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Jun 2012 17:36:26 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2012-06-24T17:36:26Z</dc:date>
    <item>
      <title>How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91273#M3382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to compare types of different covariance structures in PROC MIXED. But I get a lot of similar tables in the output and their analysis is inconvenient. For example, Fit Statistics, Estimated R Matrix, Estimated R Correlation Matrix, and others. It would be nice to know how to combine them in a concise and readable manner. For instance, for the Fit Statistics tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="126" style="border: 1px solid rgb(0, 0, 0); width: 271px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FIT SATISTICS&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;UN&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;CS&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;AR(1)&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;-2 Res Log Likelihood&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AIC (smaller is better)&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AICC (smaller is better)&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;BIC (smaller is better)&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2012 09:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91273#M3382</guid>
      <dc:creator>stan</dc:creator>
      <dc:date>2012-06-24T09:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91274#M3383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, This is how I do this sort of thing (with example data from PROC MIXED doc) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Example data */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data rc;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; input Batch Month @@;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; Monthc = Month;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; do i = 1 to 6;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input Y @@;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp; datalines;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 101.2 103.3 103.3 102.1 104.4 102.4&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 98.8&amp;nbsp; 99.4&amp;nbsp; 99.7&amp;nbsp; 99.5&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp; 98.4&amp;nbsp; 99.0&amp;nbsp; 97.3&amp;nbsp; 99.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.5 100.2 101.7 102.7&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp; 96.3&amp;nbsp; 97.2&amp;nbsp; 97.2&amp;nbsp; 96.3&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 1&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 97.3&amp;nbsp; 97.9&amp;nbsp; 96.8&amp;nbsp; 97.7&amp;nbsp; 97.7&amp;nbsp; 96.7&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 102.6 102.7 102.4 102.1 102.9 102.6&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 99.1&amp;nbsp; 99.0&amp;nbsp; 99.9 100.6&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 3&amp;nbsp; 105.7 103.3 103.4 104.0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.3 101.5 100.9 101.4&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp; 94.1&amp;nbsp; 96.5&amp;nbsp; 97.2 95.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 2&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 93.1&amp;nbsp; 92.8&amp;nbsp; 95.4 92.2&amp;nbsp;&amp;nbsp; 92.2&amp;nbsp; 93.0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 105.1 103.9 106.1 104.1 103.7 104.6&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 1&amp;nbsp; 102.2 102.0 100.8&amp;nbsp; 99.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 3&amp;nbsp; 101.2 101.8 100.8 102.6&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.1 102.0 100.1 100.2&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp;&amp;nbsp; 9&amp;nbsp; 100.9&amp;nbsp; 99.5 102.2 100.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; 3&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 97.8&amp;nbsp; 98.3&amp;nbsp; 96.9&amp;nbsp; 98.4&amp;nbsp; 96.9&amp;nbsp; 96.5&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Create an empty table to gather stats */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table fits (covStruct character(100), descr character(25), value numeric);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Define a macro to append stats */ &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%macro fits(fs=fs,mi=mi);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;delete from fits where covStruct=(select value from &amp;amp;mi where descr="Covariance Structure");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;insert into fits (covStruct, descr, value) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; select &amp;amp;mi..value, &amp;amp;fs..descr, &amp;amp;fs..value&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; from &amp;amp;fs., &amp;amp;mi. where &amp;amp;mi..descr="Covariance Structure";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%mend fits;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Do an analysis, get stats in ODS tables */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc mixed data=rc;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; class Batch;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; model Y = Month / s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; random Int Month / type=un sub=Batch s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; ods output FitStatistics=fs ModelInfo=mi;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Call the macro */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%fits;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Another covariance structure */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc mixed data=rc;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; class Batch;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; model Y = Month / s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; random Int Month / type=cs sub=Batch s;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; ods output FitStatistics=fs ModelInfo=mi;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Gather more stats */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;%fits;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* And so on ... */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;/* Reshape the stats table */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sort data=fits; by descr covStruct; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc transpose data=fits out=want(drop=_name_);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;by descr;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;id covStruct;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2012 17:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91274#M3383</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-06-24T17:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91275#M3384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear PG, thanks for your reply. I tried to implement the lines but failed...&lt;/P&gt;&lt;P&gt;Could you please provide a link for a general paper(s) on macros in SAS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Aug 2012 20:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91275#M3384</guid>
      <dc:creator>stan</dc:creator>
      <dc:date>2012-08-18T20:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91276#M3385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Please! Somebody help Stan&lt;/SPAN&gt;. The little I know about SAS macros, I learned by reading the doc. I avoid using macros as much as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Aug 2012 21:41:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91276#M3385</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-18T21:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91277#M3386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if I can help, as PG knows stats a lot more than I do and I can only guess what he was recommending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code wouldn't run as both proc sql calls were missing quit; statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Example data */&lt;/P&gt;&lt;P&gt;data rc;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Batch Month @@;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Monthc = Month;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i = 1 to 6;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input Y @@;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 101.2 103.3 103.3 102.1 104.4 102.4&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 98.8&amp;nbsp; 99.4&amp;nbsp; 99.7&amp;nbsp; 99.5&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp; 98.4&amp;nbsp; 99.0&amp;nbsp; 97.3&amp;nbsp; 99.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.5 100.2 101.7 102.7&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp; 96.3&amp;nbsp; 97.2&amp;nbsp; 97.2&amp;nbsp; 96.3&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;1&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 97.3&amp;nbsp; 97.9&amp;nbsp; 96.8&amp;nbsp; 97.7&amp;nbsp; 97.7&amp;nbsp; 96.7&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 102.6 102.7 102.4 102.1 102.9 102.6&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 99.1&amp;nbsp; 99.0&amp;nbsp; 99.9 100.6&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; 3&amp;nbsp; 105.7 103.3 103.4 104.0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.3 101.5 100.9 101.4&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp; 94.1&amp;nbsp; 96.5&amp;nbsp; 97.2 95.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;2&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 93.1&amp;nbsp; 92.8&amp;nbsp; 95.4 92.2&amp;nbsp;&amp;nbsp; 92.2&amp;nbsp; 93.0&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 105.1 103.9 106.1 104.1 103.7 104.6&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 1&amp;nbsp; 102.2 102.0 100.8&amp;nbsp; 99.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 3&amp;nbsp; 101.2 101.8 100.8 102.6&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 101.1 102.0 100.1 100.2&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 9&amp;nbsp; 100.9&amp;nbsp; 99.5 102.2 100.8&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;3&amp;nbsp; 12&amp;nbsp;&amp;nbsp; 97.8&amp;nbsp; 98.3&amp;nbsp; 96.9&amp;nbsp; 98.4&amp;nbsp; 96.9&amp;nbsp; 96.5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Create an empty table to gather stats */&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table fits (covStruct character(100), descr character(25), value numeric);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;/* Define a macro to append stats */&lt;/P&gt;&lt;P&gt;%macro fits(fs=fs,mi=mi);&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;delete from fits where covStruct=(select value from &amp;amp;mi where descr="Covariance Structure");&lt;/P&gt;&lt;P&gt;insert into fits (covStruct, descr, value)&lt;/P&gt;&lt;P&gt;select &amp;amp;mi..value, &amp;amp;fs..descr, &amp;amp;fs..value&lt;/P&gt;&lt;P&gt;from &amp;amp;fs., &amp;amp;mi. where &amp;amp;mi..descr="Covariance Structure";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;%mend fits;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Do an analysis, get stats in ODS tables */&lt;/P&gt;&lt;P&gt;proc mixed data=rc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class Batch;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model Y = Month / s;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; random Int Month / type=un sub=Batch s;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ods output FitStatistics=fs ModelInfo=mi;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;/* Call the macro */&lt;/P&gt;&lt;P&gt;%fits;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Another covariance structure */&lt;/P&gt;&lt;P&gt;proc mixed data=rc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class Batch;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model Y = Month / s;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; random Int Month / type=cs sub=Batch s;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ods output FitStatistics=fs ModelInfo=mi;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;/* Gather more stats */&lt;/P&gt;&lt;P&gt;%fits;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* And so on ... */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Reshape the stats table */&lt;/P&gt;&lt;P&gt;proc sort data=fits; by descr covStruct; run;&lt;/P&gt;&lt;P&gt;proc transpose data=fits out=want(drop=_name_);&lt;/P&gt;&lt;P&gt;by descr;&lt;/P&gt;&lt;P&gt;id covStruct;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Aug 2012 22:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91277#M3386</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-18T22:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91278#M3387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art. why the double ampersands in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select &amp;amp;&amp;amp;mi..value, &amp;amp;&amp;amp;fs..descr, &amp;amp;&amp;amp;fs..value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the single ampersands on the next line &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from &amp;amp;fs., &amp;amp;mi. where &amp;amp;mi..descr="Covariance Structure";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2012 02:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91278#M3387</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-19T02:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91279#M3388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Early guessing on my part but one that doesn't affect anything.&amp;nbsp; I've seen the quality of your code thus, when you said help was needed, I assumed something was wrong.&amp;nbsp; Of course, I didn't stop to think that nothing might be wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I first ran the initial datastep, the first proc sql, and then compiled the macro.&amp;nbsp; When I saw that proc sql was still running at that point, I presumed that might be the locus of the non-existent problem.&amp;nbsp; From there, I started changing a number of things until I finally got to the point of deciding that the code appeared to be running as intended.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2012 02:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91279#M3388</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-19T02:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91280#M3389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about using Proc Append for data collection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Clean environment from leftovers of previous runs */&lt;/P&gt;&lt;P&gt;proc datasets lib=work nolist nowarn memtype=(view data);&lt;BR /&gt;&amp;nbsp; delete fits Vfits ;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Define a macro to append stats */&lt;BR /&gt;%macro fits(fs=fs,mi=mi);&lt;BR /&gt;&amp;nbsp; proc sql;&lt;BR /&gt;&amp;nbsp; /*&amp;nbsp; delete from fits where covStruct=(select value from &amp;amp;mi where descr="Covariance Structure");*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; create view Vfits as&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;mi..value as covStruct length=100 format=$100.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , &amp;amp;fs..descr as descr length=25 format=$25.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , &amp;amp;fs..value as value&amp;nbsp; length=8 format=8.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &amp;amp;fs., &amp;amp;mi.(where=(descr="Covariance Structure"));&lt;BR /&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc datasets lib=work nolist nowarn;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; append base=fits data=Vfits;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%mend fits;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand why you're using "&amp;nbsp; delete from fits where covStruct=(select value from &amp;amp;mi where descr="Covariance Structure");&amp;nbsp; " and looking at the log there was nothing to delete using the sample data.&lt;/P&gt;&lt;P&gt;...but then I don't understand Proc Mixed - so may be this deletion would need to be added again to above macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2012 03:09:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91280#M3389</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-08-19T03:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91281#M3390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Patrick The delete step is because, typically one will explore different models interactively and accumulate stats along the way. So it is likely that you will try the same covariance structure more than once. The delete step keeps the latest version of your exploration. An alternate approach is to include a timestamp with the accumulated stats data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Art I should have been clearer in my call for help. I think what was needed by OP is a good reference to learn macro programming. I might benefit from it too!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2012 12:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91281#M3390</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-19T12:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91282#M3391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;ADDRESS&gt;Then I will sit by the sidelines and wait for comments from those who have actually read the books .. which I haven't.&amp;nbsp; That said, I will guess that Art Carpenter's book will be in the group&amp;nbsp; ( &lt;A href="http://www.sascommunity.org/wiki/Carpenter%E2%80%99s_Complete_Guide_to_the_SAS%C2%AE_Macro_Language,_Second_Edition_by_Art_Carpenter" title="http://www.sascommunity.org/wiki/Carpenter%E2%80%99s_Complete_Guide_to_the_SAS%C2%AE_Macro_Language,_Second_Edition_by_Art_Carpenter"&gt;http://www.sascommunity.org/wiki/Carpenter%E2%80%99s_Complete_Guide_to_the_SAS%C2%AE_Macro_Language,_Second_Edition_by_Art_Carpenter&lt;/A&gt; )&lt;/ADDRESS&gt;&lt;ADDRESS&gt;&lt;/ADDRESS&gt;&lt;ADDRESS&gt;And, if one can find the time to read a LOT of historical SAS-L posts, just following the threads that Ian Whitlock has been involved in is an invaluable experience ( &lt;A href="http://www.lexjansen.com/sugi/search_sas-l.php" title="http://www.lexjansen.com/sugi/search_sas-l.php"&gt;Search the SAS-L Newsgroup&lt;/A&gt; ) searching for IW1&lt;/ADDRESS&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2012 13:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91282#M3391</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-19T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine similar output tabels in SAS output ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91283#M3392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Before diving into Carpenter or Whitlock (both excellent on the topic of macro). I always suggest a paper that touches on almost all the macro facility&amp;nbsp; can do without being overwhelming. The paper was written by one of our SAS instructors and is an excellent general overview (with very simple examples) that explains all the basics:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi28/056-28.pdf" title="http://www2.sas.com/proceedings/sugi28/056-28.pdf"&gt;http://www2.sas.com/proceedings/sugi28/056-28.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; In addition to the other books/papers mentioned, I really like Michele Burlew's book "SAS Macro Programming Made Easy" (&lt;A href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=60560" title="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=60560"&gt;https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=60560&lt;/A&gt;), too. It was the first book on SAS Macro programming that I read and between that and the Carpenter books and papers, I think you have perfect complements to the documentation on the SAS Macro Facility. But, if you don't want to buy books, there are a LOT of user group papers on the Macro Facility too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SAS Macro Programming is often misunderstood. I think of it as nothing more than a big, invisible typist, whose only purpose in life is to generate code for SAS compilation and execution. The SAS Macro facility is a tireless typist, so I can have the macro facility generate a list of 1000 variables over and over again. Or, I can have it generate the same program over and over again and have it change 1 thing for each iteration of code generation (or multiple things). The SAS Macro facility is also sort of like an specialized stenographer -- who uses a special "shorthand" to transcribe or translate my macro language instructions into working (compilable, executable) SAS code. I know that there are a lot of "canned" macro programs out in the world to do specialized things and a lot of times, they are like a "black box" and you don't have to worry about what they do or how they work. Hopefully, those canned macro programs come well documented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sometimes, however, someone designs a macro program and releases it into the wild without fully explaining the data structure that they assume or the parameters that the macro expects. In that case, understanding how macro programs and macro variables work will make the difference between understanding how to fix what's wrong and getting back to work or being stranded (as my Dad used to say) up the creek without a paddle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2012 15:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-combine-similar-output-tabels-in-SAS-output/m-p/91283#M3392</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-08-19T15:22:52Z</dc:date>
    </item>
  </channel>
</rss>

