<?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: Ouput coefficients from GLS regression without ODS in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352946#M18500</link>
    <description>&lt;P&gt;When I started to write this program, I indeed outputted all the parameter estimates in one call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc reg data=Work.Rwin outest=Work.Coeff1 tableout noprint;
	by grp;
	model Y1 = X1 X2 X3 X4 X5 X6 / noint;
	output out=Work.Res1 p=predicted1 r=residus1;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;using "tableout" to get additional information, notably standard errors. But this is an OLS regression and I have substantial first-order autocorrelation in the error that I would like to adjust by estimating coefficients with the GLS method. That's why I use PROC GLM instead of PROC REG. Am I mistaken?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Apr 2017 17:12:32 GMT</pubDate>
    <dc:creator>Alain38</dc:creator>
    <dc:date>2017-04-24T17:12:32Z</dc:date>
    <item>
      <title>Ouput coefficients from GLS regression without ODS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352930#M18494</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to output the coefficients and their standard errors from a GLS regression, as well as the residuals and predicted values.&lt;/P&gt;&lt;P&gt;The following code does the job:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=Work.Rwin;
	by grp;
	model Y1 = X1 X2 X3 X4 X5 X6 / noint;
	ods output ParameterEstimates=Work.Coeff1;  /* output coeff and their standard errors */
run;
quit;

proc glm data=Work.Rwin noprint;  
	by grp;
	model Y1 = X1 X2 X3 X4 X5 X6 / noint;
	output out=Work.Res1 p=predicted1 r=residus1; /* output residuals and predicted values */
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After searching on the forum and Internet, ODS is the only way I found to output the coefficients. The problem is that ODS requires to print, which is a an extremely long process given that I have thousands of rolling-windows regressions like this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have any suggestion to improve this code and make it faster to process I would be very grateful. The best solution would be not to use ODS I think, and if it's not possible maybe to output everything with ODS instead of doing the regressions 2 times like this (with ODS first then with output out).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help,&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352930#M18494</guid>
      <dc:creator>Alain38</dc:creator>
      <dc:date>2017-04-24T16:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ouput coefficients from GLS regression without ODS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352934#M18495</link>
      <description>&lt;P&gt;Perhaps ODS Exclude or %ODS off/on may assist:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2015/05/26/suppress-ods.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2015/05/26/suppress-ods.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352934#M18495</guid>
      <dc:creator>thomp7050</dc:creator>
      <dc:date>2017-04-24T16:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ouput coefficients from GLS regression without ODS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352940#M18497</link>
      <description>&lt;P&gt;I will look deeper into ODS EXCLUDE if it allows printing only coefficients and their standard errors, throwing away everything else. In this case it may be faster indeed, thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352940#M18497</guid>
      <dc:creator>Alain38</dc:creator>
      <dc:date>2017-04-24T16:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ouput coefficients from GLS regression without ODS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352943#M18498</link>
      <description>&lt;P&gt;In your example, you have only main effects. There4fore you can use PROC REG instead of PROC GLM and use the OUTEST= option to write the parameter estimates. By the way, you can output all statistics in one call; no need to run the PROC twice:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc reg data=Work.Rwin noprint outest=PE;
	by grp;
	model Y1 = X1 X2 X3 X4 X5 X6 / noint;
        output out=Res1 p=predicted1 r=residus1;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For a summary of other ways to output statistics in SAS, see &lt;A href="http://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_self"&gt;"ODS OUTPUT: Store any statistic create by any SAS procedure."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352943#M18498</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-04-24T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ouput coefficients from GLS regression without ODS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352946#M18500</link>
      <description>&lt;P&gt;When I started to write this program, I indeed outputted all the parameter estimates in one call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc reg data=Work.Rwin outest=Work.Coeff1 tableout noprint;
	by grp;
	model Y1 = X1 X2 X3 X4 X5 X6 / noint;
	output out=Work.Res1 p=predicted1 r=residus1;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;using "tableout" to get additional information, notably standard errors. But this is an OLS regression and I have substantial first-order autocorrelation in the error that I would like to adjust by estimating coefficients with the GLS method. That's why I use PROC GLM instead of PROC REG. Am I mistaken?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 17:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352946#M18500</guid>
      <dc:creator>Alain38</dc:creator>
      <dc:date>2017-04-24T17:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ouput coefficients from GLS regression without ODS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352949#M18501</link>
      <description>&lt;P&gt;I think you are mistaken. PROC GLM performs OLS for general linear models. It differs from PROC REG in that it supports a CLASS statement that internally generates dummy variables for categorical covariates. &amp;nbsp;It also supports ANOVA, MANOVA, and various hypothesis testing methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you have autocorrelated data, you might want to look into the SAS/ETS procedures such as &lt;A href="https://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_autoreg_details02.htm" target="_self"&gt;PROC AUTOREG, which provides Yule-Walker estimates.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 17:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Ouput-coefficients-from-GLS-regression-without-ODS/m-p/352949#M18501</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-04-24T17:33:42Z</dc:date>
    </item>
  </channel>
</rss>

