<?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: Exporting Regression results to excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239663#M44121</link>
    <description>Capture the table using ODS output statements and append them using a model.&lt;BR /&gt;Or change my data structure so I can do all my regressions at once using a BY variable.&lt;BR /&gt;&lt;BR /&gt;In this case you would transpose all your variables into one variable and create a variable name field. Then run the regression with a BY statement. This works well if all predictors are numeric. If they're mixed (categorical/numeric) it won't work.</description>
    <pubDate>Wed, 16 Dec 2015 23:11:03 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-12-16T23:11:03Z</dc:date>
    <item>
      <title>Exporting Regression results to excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239654#M44114</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to export my regression results to an excel file after running all the regressions. I need all the results to be on a single sheet but the ODS statement that I have sends each table to a seperate sheet:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set ev.final2;&lt;/P&gt;
&lt;P&gt;if amval4wp ne 0 and amval4wp ne . then&lt;BR /&gt;ratio=tmval4wp/amval4wp;&lt;/P&gt;
&lt;P&gt;lnTEq=log(EqValAn);&lt;BR /&gt;lnTEn=log(EnValAn);&lt;BR /&gt;lnTMV=log(TMVal4wp);&lt;BR /&gt;lnAMV=log(amval4wp);&lt;BR /&gt;lnSIZE=log(HOSTATASS);&lt;BR /&gt;year = year(Andate);&lt;BR /&gt;Industry= TMaCode;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF6600"&gt;ODS TAGSETS.EXCELXP&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;file='C:\Users\esy\Desktop\niloofar\DePaul Research\M&amp;amp;AJAPAN\Majority\Results\regression.xls'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;STYLE=minimal&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;OPTIONS ( Orientation = 'landscape'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;FitToPage = 'yes'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;Pages_FitWidth = '1'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;Pages_FitHeight = '100' );&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = year / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = ratio / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = TobinQ/ noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;...&lt;FONT color="#339966"&gt;(more proc glm statements)&lt;/FONT&gt;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = ADebtratio ratio / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I need the exported excel to look like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1208i747CC24A1C3B5AE2/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="result.png" title="result.png" /&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 22:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239654#M44114</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-16T22:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting Regression results to excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239657#M44116</link>
      <description>That doesn't make sense to me...I would expect to see the h/v/c/ps variables in single column and all values in the other columns. For a specific request like this you'll have to create the output data set yourself.</description>
      <pubDate>Wed, 16 Dec 2015 22:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239657#M44116</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-16T22:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting Regression results to excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239661#M44119</link>
      <description>&lt;P&gt;If I want the results to be shown in the order you mentioned "&lt;SPAN&gt;I would expect to see the h/v/c/ps variables in single column and all values in the other columns", what should I do?(all in one sheet, my statements send each table to a different sheet)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 23:04:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239661#M44119</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-16T23:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting Regression results to excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239663#M44121</link>
      <description>Capture the table using ODS output statements and append them using a model.&lt;BR /&gt;Or change my data structure so I can do all my regressions at once using a BY variable.&lt;BR /&gt;&lt;BR /&gt;In this case you would transpose all your variables into one variable and create a variable name field. Then run the regression with a BY statement. This works well if all predictors are numeric. If they're mixed (categorical/numeric) it won't work.</description>
      <pubDate>Wed, 16 Dec 2015 23:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239663#M44121</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-16T23:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting Regression results to excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239670#M44126</link>
      <description>&lt;P&gt;This might help:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS TAGSETS.EXCELXP
file='C:\Users\esy\Desktop\niloofar\DePaul Research\M&amp;amp;AJAPAN\Majority\Results\regression.xls'
STYLE=minimal
OPTIONS ( Orientation = 'landscape'
FitToPage = 'yes'
Pages_FitWidth = '1'
Pages_FitHeight = '100' sheet_interval='NONE' );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;though the alignment won't be as you specified. The default for sheet_interval is 'Table' which would place table on a separate sheet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 23:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239670#M44126</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-12-16T23:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting Regression results to excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239706#M44144</link>
      <description>&lt;P&gt;It only worked the first time I ran it but after that it gave me this error:&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1209iE1D6374FD900DFAB/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="error.png" title="error.png" /&gt; error:&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 04:29:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239706#M44144</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-17T04:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting Regression results to excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239708#M44146</link>
      <description>Tagsets generates an XML file not a native XLSX file. There's usually another bug in the code when you get that error. Either the file wasn't closed or an incorrect option was used.</description>
      <pubDate>Thu, 17 Dec 2015 05:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-Regression-results-to-excel/m-p/239708#M44146</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-17T05:14:49Z</dc:date>
    </item>
  </channel>
</rss>

