<?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: Making a publication quality table from regression results using proc report in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/672241#M79264</link>
    <description>cc are column header names from the ACROSS statement and are automatically created via PROC REPORT. &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 24 Jul 2020 22:48:25 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-07-24T22:48:25Z</dc:date>
    <item>
      <title>Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/396779#M66555</link>
      <description>&lt;P&gt;I am trying to report the results of my regression analysis in a Journal quality format, the usual format that is used to show the results of regressions should &amp;nbsp;something like this, with estimates for different models in separate columns, significance level reported by * and stddev&amp;nbsp;reported in the parentheses&amp;nbsp;below each estimation :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="regression.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15240i254B7F6F4F917A64/image-size/large?v=v2&amp;amp;px=999" role="button" title="regression.png" alt="regression.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The results of the regression are not reported like this the SAS output, so I combine my results from different output tables and get a dataset like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="procprint.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15242i4E0B4D772B326412/image-size/large?v=v2&amp;amp;px=999" role="button" title="procprint.png" alt="procprint.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I used proc report to put the output in publication quality format, that is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ODS ESCAPECHAR='^';
ods pdf file='inddind_drugNEW.pdf' style=journal2 notoc;
proc report data=combinedrugY( rename=(stderr=std1 ProbChiSq =pb1))  out=temptbl ;
column variable model ,(pb1 estimate std1);
define variable/group order=data ' ';
define model/ across ' ';
define pb1 /noprint   sum ;
define estimate /analysis sum ' ';
define std1 /analysis sum format=stderrf. ' ' ;
compute estimate ; 
array cc _c11_ _c8_ _c5_ _c2_;
do i= 1 to 4 ;
if ~missing(cc(i)) then do;
if 0.05&amp;lt;cc(i) &amp;lt;= 0.1  then call define(_col_, "style", "style=[ posttext='*']" ); 
else if 0.01 &amp;lt;cc(i) &amp;lt;=0.05 then call define(_col_, "style", "style=[ posttext='**']" ); 
else if cc(i) &amp;lt;= 0.01   then call define(_col_, "style", "style=[ posttext='***']" );
leave;end;
end;
endcomp; 
run;
ods text="^S={width=100% just=c } NOTE: Logit regression for probability of an individual diagnosed with abuse or addiction of different substances, all specifications control for year and  state  and fixed effects. ^{newline}
 ^S={just=l }*** Significant at the 1 percent level.  ^{newline}
** Significant at the 5 percent level. ^{newline}
* Significant at the 10 percent level. ^{newline} " ;
ods pdf close;title;footnote;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="procreport.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15248iDC6232A825D4C716/image-size/large?v=v2&amp;amp;px=999" role="button" title="procreport.png" alt="procreport.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, it is still is not in the format I was hopping. It would be great if someone would help me to fix the table so that:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) put the stdd1 under the estimate variable instead of beside it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Adjust the Note text such that it starts at the point that table starts instead of the start of the line. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 12:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/396779#M66555</guid>
      <dc:creator>zzecon</dc:creator>
      <dc:date>2017-09-18T12:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/396841#M66561</link>
      <description>&lt;P&gt;Can you provide some sample data to help work with this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also search lexjansen.com for 'clinical reporting' to see many samples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 15:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/396841#M66561</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-18T15:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406854#M67025</link>
      <description>&lt;P&gt;I am also very interested in automating the process of&amp;nbsp;reporting&amp;nbsp;a publication ready&amp;nbsp; table of regression results of the type described. I thank zzecon&amp;nbsp;for the code that helped&lt;SPAN class=""&gt;&amp;nbsp;me to start the process.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;I am getting closer, but still not there.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the table I start with (attached) is one that append&amp;nbsp; parameterestimates, fit and nobs tables from proc reg results .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT OUT= WORK.PARM &lt;BR /&gt; DATAFILE= "G:\temp\parm.xls" &lt;BR /&gt; DBMS=EXCEL REPLACE;&lt;BR /&gt; RANGE="parm"; &lt;BR /&gt; GETNAMES=YES;&lt;BR /&gt; MIXED=NO;&lt;BR /&gt; SCANTEXT=YES;&lt;BR /&gt; USEDATE=YES;&lt;BR /&gt; SCANTIME=YES;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/*write a dataset with standard error on the same column of coefficient*/&lt;BR /&gt;&lt;BR /&gt;data parm2;
set temp.parm;
if not missing(stderr) and variable not in ('R-square','Adj.R-sq','N. Obs.') then do; 
value=estimate; type='coefficient'; output; end;
if not missing(stderr) then do; value=stderr; type='stderr' ;output; end;
if variable in ('R-square','Adj.R-sq','N. Obs.') then do; value=estimate; type=variable ;output; end; 
run;


proc format;           
	picture stderrf (round)       
     	low-high=' 9.9999)' (prefix='(')                                
            .=' ';                                                  
run;



ods html close;
ods html;
title;
proc report data=parm2 nowd  out=temptbl;
*column model numord variable type dependent, value;
column numord variable type dependent, (value probt);
define numord /group order=data noprint;
define variable / group order=data ' ';
define type / group order=data noprint;
define dependent / across ' ';
define value /analysis sum;
define probt /analysis sum;

compute value;
  array cc _c5_ _c7_ _c9_ ;
      if type='stderr' then do;
         call define(_col_,'format','stderrf.');
      end;
	  else if type='coefficient' then do; 
		call define(_col_,'format','8.4');
        do i=1 to 3;
        if 0.05&amp;lt;cc(i) &amp;lt;= 0.1  then call define(_col_, "style", "style=[ posttext='*']" ); 
        else if 0.01 &amp;lt;cc(i) &amp;lt;=0.05 then call define(_col_, "style", "style=[ posttext='**']" ); 
        else if cc(i) &amp;lt;= 0.01   then call define(_col_, "style", "style=[ posttext='***']" );
		end;
		end;
   endcomp;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;&lt;A name="IDX" target="_blank"&gt;&lt;/A&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Report: Report di dettaglio e/o sommarizzato" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;Y1&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;Y2&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;Y3&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;value&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;Pr &amp;gt; |t|&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;value&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;Pr &amp;gt; |t|&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;value&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;Pr &amp;gt; |t|&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;Intercept&lt;/TD&gt;
&lt;TD class="r data"&gt;0.2788***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;0.7622***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;-1.4992***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0097)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0067)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0191)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X1&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0313***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0800***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.2424***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0009)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0006)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0018)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X2&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0137***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0172***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0048***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0003)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0002)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0006)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X3&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0001***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0002***&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0300&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0001***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0000)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0000)&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0300&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0000)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X4&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0190***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0219***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0892***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0009)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0006)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0018)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X5&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0228***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0590***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;0.2793***&lt;/TD&gt;
&lt;TD class="r data"&gt;0.1500&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0013)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0009)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0025)&lt;/TD&gt;
&lt;TD class="r data"&gt;0.1500&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;X6&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0942***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.0322***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0745***&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0021)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0014)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;TD class="r data"&gt;(0.0040)&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;R-square&lt;/TD&gt;
&lt;TD class="r data"&gt;0.2203&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;0.4373&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;0.3009&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;Adj.R-sq&lt;/TD&gt;
&lt;TD class="r data"&gt;0.2202&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;0.4373&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;0.3008&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;N. Obs.&lt;/TD&gt;
&lt;TD class="r data"&gt;132000&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;132000&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;132000&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the report I have left the probt column printed to show that stars close to the coefficient are not added correctly&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;What is wrong?&lt;/P&gt;
&lt;P&gt;Any help to solve this problem and clean the aspect of the table is appreciated.&lt;/P&gt;
&lt;P&gt;Thank you very much in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 09:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406854#M67025</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2017-10-24T09:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406855#M67026</link>
      <description>&lt;P&gt;attached file&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 09:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406855#M67026</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2017-10-24T09:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406960#M67030</link>
      <description>&lt;P&gt;I have already used whatever I could&amp;nbsp;find online to improve the table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 14:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406960#M67030</guid>
      <dc:creator>zzecon</dc:creator>
      <dc:date>2017-10-24T14:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406964#M67031</link>
      <description>&lt;P&gt;Thanks. In my code, the number of asterisks does not change depending on the pvalue. can you tell me where is the error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 14:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406964#M67031</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2017-10-24T14:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406968#M67033</link>
      <description>&lt;P&gt;I think the reason that you don't have correct stars is that proc report performs the calculations from left to right, so you need to have the column of p values first, then you need to make sure that you don't go through the loop&amp;nbsp; for all values of c(i) , that&amp;nbsp;is why I have the leave command at the end of the loop, and I do it from left to right.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 14:55:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406968#M67033</guid>
      <dc:creator>zzecon</dc:creator>
      <dc:date>2017-10-24T14:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406969#M67034</link>
      <description>&lt;P&gt;As you can see I start the loop of comparing from left to right, to make sure that I only compare with the most recent value printed, and then leave the loop. I guess it is not the most efficient way but it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;array cc _c11_ _c8_ _c5_ _c2_;
do i= 1 to 4 ;
if ~missing(cc(i)) then do;
if 0.05&amp;lt;cc(i) &amp;lt;= 0.1  then call define(_col_, "style", "style=[ posttext='*']" ); 
else if 0.01 &amp;lt;cc(i) &amp;lt;=0.05 then call define(_col_, "style", "style=[ posttext='**']" ); 
else if cc(i) &amp;lt;= 0.01   then call define(_col_, "style", "style=[ posttext='***']" );
leave;end;
end;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 14:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406969#M67034</guid>
      <dc:creator>zzecon</dc:creator>
      <dc:date>2017-10-24T14:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406980#M67036</link>
      <description>It works now. thank you very much!</description>
      <pubDate>Tue, 24 Oct 2017 15:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406980#M67036</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2017-10-24T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406999#M67039</link>
      <description>&lt;P&gt;Can you post your final code, so I can use it as well? Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 16:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/406999#M67039</guid>
      <dc:creator>zzecon</dc:creator>
      <dc:date>2017-10-24T16:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/407725#M67084</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;should be the following, hoping is the last example code.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
/*write a dataset with standard error on the same column of coefficient*/
data parm2;
set temp.parm;
if not missing(stderr) and variable not in ('R-square','Adj.R-sq','N. Obs.') then do; 
value=estimate; type='coefficient'; output; end;
if not missing(stderr) then do; value=stderr; type='stderr' ;output; end;
if variable in ('R-square','Adj.R-sq','N. Obs.') then do; value=estimate; type=variable ;output; end; 
run;

proc format; 
picture stderrf (round) 
low-high=' 9.9999)' (prefix='(') 
.=' '; 
run;
&amp;nbsp;
ods html close;
ods html;
title;
proc report data=parm2 nowd out=temptbl;
column numord variable type dependent, (probt value);
define numord /group order=data noprint;
define variable / group order=data ' ';
define type / group order=data noprint;
define dependent / across ' ';
define value /analysis sum;
define probt /analysis sum;
compute value;
array cc _c8_ _c6_ _c4_ ;
if type='stderr' then do;
call define(_col_,'format','stderrf.');
end;
else do;
call define(_col_,'format','8.4');
do i= 1 to 3 ;
if ~missing(cc(i)) then do;
if 0.05&amp;lt;cc(i) &amp;lt;= 0.1 then call define(_col_, "style", "style=[ posttext='*']" ); 
else if 0.01 &amp;lt;cc(i) &amp;lt;=0.05 then call define(_col_, "style", "style=[ posttext='**']" ); 
else if cc(i) &amp;lt;= 0.01 then call define(_col_, "style", "style=[ posttext='***']" );
leave;end;
end;
end;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/407725#M67084</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2017-10-26T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/607542#M76618</link>
      <description>&lt;P&gt;Vey interesting topic,&lt;/P&gt;&lt;P&gt;Thanks for sharing the code. I try to merge everything, but doesn't run properly. Is it possible to to post an acutal running code with the dataset ?&lt;/P&gt;&lt;P&gt;For example in the first proc impot, theres a "set temp.parm;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 03:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/607542#M76618</guid>
      <dc:creator>ptadgerv</dc:creator>
      <dc:date>2019-11-27T03:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/672219#M79263</link>
      <description>&lt;P&gt;This code is really helpful! Where do the variables specified in your array (_c11_ _c8_ _c5_ _c2) come from? I'm not clear how I should adapt those varnames for my parameter estimates dataset..&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 21:40:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/672219#M79263</guid>
      <dc:creator>jtobin</dc:creator>
      <dc:date>2020-07-24T21:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/672241#M79264</link>
      <description>cc are column header names from the ACROSS statement and are automatically created via PROC REPORT. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Jul 2020 22:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/672241#M79264</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-24T22:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/979700#M84078</link>
      <description>&lt;P&gt;Stata has dtable and etable procedure, respectively, to produce the demographic and regression outcome table. See the screenshot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if SAS has the similar syntaxes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-11-23 at 7.38.23 PM.png" style="width: 621px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/111643i271BC1D6B0572378/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-11-23 at 7.38.23 PM.png" alt="Screenshot 2025-11-23 at 7.38.23 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-11-23 at 8.36.22 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/111644i22D1C55699B52DDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-11-23 at 8.36.22 PM.png" alt="Screenshot 2025-11-23 at 8.36.22 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 10:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/979700#M84078</guid>
      <dc:creator>TomHsiung</dc:creator>
      <dc:date>2025-11-28T10:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Making a publication quality table from regression results using proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/979978#M84080</link>
      <description>&lt;P&gt;There is a macro %TABLEN that is located and documented at&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;that does what many of the demographic and similar tables ask for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 22:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/m-p/979978#M84080</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-12-03T22:56:33Z</dc:date>
    </item>
  </channel>
</rss>

