<?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 get residual when using SAS to do GMM in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/695814#M4007</link>
    <description>&lt;P&gt;Moved to &lt;EM&gt;stats&lt;/EM&gt; community.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Nov 2020 01:58:04 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-11-02T01:58:04Z</dc:date>
    <item>
      <title>How to get residual when using SAS to do GMM</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/694489#M4006</link>
      <description>&lt;P&gt;How to get residual when using SAS to do GMM?&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;sort&lt;/STRONG&gt;&amp;nbsp;data;by id ;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;model&lt;/STRONG&gt;&amp;nbsp;data;&lt;/P&gt;&lt;P&gt;endo&amp;nbsp;ri;&lt;/P&gt;&lt;P&gt;exog&amp;nbsp;mp smb hml;&lt;/P&gt;&lt;P&gt;instruments&amp;nbsp;_exog_;&lt;/P&gt;&lt;P&gt;parms&amp;nbsp;b0 b1 b2 b3;&lt;/P&gt;&lt;P&gt;ri= b0+b1*mp+b2*smb+b3*hml;&lt;/P&gt;&lt;P&gt;fit&amp;nbsp;ri/gmm&amp;nbsp;kernel=(bart,&lt;STRONG&gt;1&lt;/STRONG&gt;,&lt;STRONG&gt;0&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;by&amp;nbsp;sizeport0 btmport0 ciiport0 ;&lt;/P&gt;&lt;P&gt;ods&amp;nbsp;output&amp;nbsp;parameterestimates=parameterestimates;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;I want to get residual in the dataset, but I do not know how to get it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:55:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/694489#M4006</guid>
      <dc:creator>Yanni_C</dc:creator>
      <dc:date>2020-10-27T10:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get residual when using SAS to do GMM</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/695814#M4007</link>
      <description>&lt;P&gt;Moved to &lt;EM&gt;stats&lt;/EM&gt; community.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 01:58:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/695814#M4007</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-02T01:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get residual when using SAS to do GMM</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/695959#M4008</link>
      <description>&lt;P&gt;Moved again to Forecasting and Econometrics community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:24:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/695959#M4008</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-02T14:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get residual when using SAS to do GMM</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/695965#M4009</link>
      <description>&lt;P&gt;Add the out=resid outresid option to the FIT statement, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc model data;
endo ri;
exog mp smb hml;
instruments _exog_;
parms b0 b1 b2 b3;
ri= b0+b1*mp+b2*smb+b3*hml;
fit ri/gmm kernel=(bart,1,0 ) &lt;STRONG&gt;out=resids outresid outactual&lt;/STRONG&gt;;
by sizeport0 btmport0 ciiport0 ;
ods output parameterestimates=parameterestimates;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So long as there is no conflict between the GMM method, the kernel option and these additional options, you should get a dataset named resids containing the residuals and the actual values of the endogenous variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:35:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-residual-when-using-SAS-to-do-GMM/m-p/695965#M4009</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-02T14:35:40Z</dc:date>
    </item>
  </channel>
</rss>

