<?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: two stage least squares coding problem in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/two-stage-least-squares-coding-problem/m-p/645092#M3834</link>
    <description>&lt;P&gt;PROC MODEL requires that your model is specified using a mathematical expression including explicit parameters rather than just using a list of variables.&amp;nbsp; To do a two stage least squares estimation for your model you could use something like the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc model data=new;
	am = p_batie*batie + p_ln_ta*ln_ta + p_ROA*ROA + p_leverage*leverage + p_growth*growth + p_age*age 
           + p_CPA*CPA + p_big4*big4 + p_ibsize*ibsize + p_loss*loss + p_loss_lag*loss_lag 
           + p_liquidity*liquidity + p_INVplusAR_TA*INVplusAR_TA + p_btm*btm;
	fit  am / 2sls outv=vdata vardef=n kernel=(bart,0,);
	instruments _exog_ employ LD;
	title '2sls results';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 04 May 2020 20:22:11 GMT</pubDate>
    <dc:creator>kessler</dc:creator>
    <dc:date>2020-05-04T20:22:11Z</dc:date>
    <item>
      <title>two stage least squares coding problem</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/two-stage-least-squares-coding-problem/m-p/644800#M3833</link>
      <description>&lt;P&gt;Syntax error occurs when I run 2SLS, but the data should be fine as the file I attached. I think the problem might be the part of running regression, but I don't know where wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my first stage function is :&amp;nbsp;batie = ln_ta ROA leverage growth age CPA big4 ibsize loss loss_lag liquidity INVplusAR_TA btm employ LD&amp;nbsp;&lt;/P&gt;&lt;P&gt;where "batie" is an&amp;nbsp;&lt;SPAN&gt;endogenous variable,&lt;/SPAN&gt; "employ" and "LD" are Instrument Variables for batie, other variables are&amp;nbsp;&lt;SPAN&gt;exogenous variable ;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my second stage function is :&amp;nbsp;am = batie ln_ta ROA leverage growth age CPA big4 ibsize loss loss_lag liquidity INVplusAR_TA btm ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS code are as following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname ok 'd:\all\ipo';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc model data=ok.www;
instruments employ LD;
batie = ln_ta ROA leverage growth age CPA big4 ibsize loss loss_lag liquidity INVplusAR_TA btm employ LD;
am = batie ln_ta ROA leverage growth age CPA big4 ibsize loss loss_lag liquidity INVplusAR_TA btm ;
fit batie am / 2sls outv=vdata vardef=n kernel=(bart,0,);
title '2sls results';
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How can I fix this?&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 08:51:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/two-stage-least-squares-coding-problem/m-p/644800#M3833</guid>
      <dc:creator>spasico</dc:creator>
      <dc:date>2020-05-03T08:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: two stage least squares coding problem</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/two-stage-least-squares-coding-problem/m-p/645092#M3834</link>
      <description>&lt;P&gt;PROC MODEL requires that your model is specified using a mathematical expression including explicit parameters rather than just using a list of variables.&amp;nbsp; To do a two stage least squares estimation for your model you could use something like the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc model data=new;
	am = p_batie*batie + p_ln_ta*ln_ta + p_ROA*ROA + p_leverage*leverage + p_growth*growth + p_age*age 
           + p_CPA*CPA + p_big4*big4 + p_ibsize*ibsize + p_loss*loss + p_loss_lag*loss_lag 
           + p_liquidity*liquidity + p_INVplusAR_TA*INVplusAR_TA + p_btm*btm;
	fit  am / 2sls outv=vdata vardef=n kernel=(bart,0,);
	instruments _exog_ employ LD;
	title '2sls results';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 May 2020 20:22:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/two-stage-least-squares-coding-problem/m-p/645092#M3834</guid>
      <dc:creator>kessler</dc:creator>
      <dc:date>2020-05-04T20:22:11Z</dc:date>
    </item>
  </channel>
</rss>

