<?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 do feasible generalized least square (FGLS) in SAS? in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/278718#M1793</link>
    <description>&lt;P&gt;In PROC MODEL you must specify the form of the heteroscedasticity to perform a FGLS estimation, and the parameters in the variance equation cannot be shared with the mean equation parameters.&amp;nbsp; In your code the variance model you are specifying is effectively&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;h.y=(y-(b0+b1*x1+b2*x2))**2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which shares all the parameters in the mean equation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the case when the variance structure is unknown the estimation can be performed using the generalized method of moments (GMM).&amp;nbsp; The code to do that is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;CODE class=" language-sas"&gt;proc model data=temp ;
   y = b0+b1*x1+b2*x2;
   h.y = resid.y**2;
   fit y / gmm;
run;
&lt;/CODE&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Jun 2016 15:38:31 GMT</pubDate>
    <dc:creator>kessler</dc:creator>
    <dc:date>2016-06-20T15:38:31Z</dc:date>
    <item>
      <title>How to do feasible generalized least square (FGLS) in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/278261#M1786</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am re-posting this question to a&amp;nbsp;the SAS Forecasting and Econometrics board&amp;nbsp;as suggested by another user. I was trying to do a feasible generalized least square (FGLS) in SAS 9.2 to adjust for heteroscedasticity. The form of the variance is unknown. I am just trying to use the residuals to estimate the variance and then&amp;nbsp;do an iterative reweighting (I think this is&amp;nbsp;what FGLS is).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I googled it and found the SAS documentation &lt;A href="http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/viewer.htm#etsug_model_sect046.htm" target="_self"&gt;here&lt;/A&gt;. But the documentation didn't explain very clearly how to implement FGLS in proc model. It only says using H.var. I tried the following code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc model data=temp ;
y=b0+b1*x1+b2*x2;
h.y=resid.y**2;
fit y /itprint ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but&amp;nbsp;SAS says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;WARNING: Can only do FIML or GMM estimation when parameters are shared by the mean model and the variance model. The estimation&amp;nbsp;requested will ignore the variance model.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I believe the code is not doing FGLS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is:&lt;/P&gt;&lt;P&gt;Can anyone provide an example code&amp;nbsp;that will do a FGLS? I am OK with either proc model or any other procedures that will do the job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all so much.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 18:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/278261#M1786</guid>
      <dc:creator>grtlzy163</dc:creator>
      <dc:date>2016-06-17T18:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to do feasible generalized least square (FGLS) in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/278718#M1793</link>
      <description>&lt;P&gt;In PROC MODEL you must specify the form of the heteroscedasticity to perform a FGLS estimation, and the parameters in the variance equation cannot be shared with the mean equation parameters.&amp;nbsp; In your code the variance model you are specifying is effectively&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;h.y=(y-(b0+b1*x1+b2*x2))**2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which shares all the parameters in the mean equation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the case when the variance structure is unknown the estimation can be performed using the generalized method of moments (GMM).&amp;nbsp; The code to do that is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;CODE class=" language-sas"&gt;proc model data=temp ;
   y = b0+b1*x1+b2*x2;
   h.y = resid.y**2;
   fit y / gmm;
run;
&lt;/CODE&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jun 2016 15:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/278718#M1793</guid>
      <dc:creator>kessler</dc:creator>
      <dc:date>2016-06-20T15:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to do feasible generalized least square (FGLS) in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/279911#M1803</link>
      <description>&lt;P&gt;I see. So for unknown variance form, it can only be done through GMM and full likelihood, but not iterative reweighting?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 06:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/279911#M1803</guid>
      <dc:creator>grtlzy163</dc:creator>
      <dc:date>2016-06-24T06:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to do feasible generalized least square (FGLS) in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/279967#M1804</link>
      <description>&lt;P&gt;PROC MODEL does not have a built in option to do the reweighting; however, you could specify two FIT statements to perform the reweighting yourself:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc model data=temp;
   fit y / outactual out=o;
   y = b0+b1*x1+b2*x2;
   outvar resid.y;

   fit y / data=o;
   h.y = resid_y**2;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 14:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-do-feasible-generalized-least-square-FGLS-in-SAS/m-p/279967#M1804</guid>
      <dc:creator>kessler</dc:creator>
      <dc:date>2016-06-24T14:53:37Z</dc:date>
    </item>
  </channel>
</rss>

