Forecasting using SAS Forecast Server, SAS/ETS, and more

What is SAS equivalent of ivprovit in STATA?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

What is SAS equivalent of ivprovit in STATA?

***Apologies for cross-posting***

Hi,

I am interested in running the SAS equivalent of ivprobit in STATA. Let’s say I want to run a model with a binary outcome (Y), two continuous endogenous explanatory variables (p1 p2), and one continuous exogenous explanatory variable (p3). I have three instruments (z1 z2 z3).

   proc qlim data=a;

      model Y = p1 p2 p3 / discrete (dist=logit);

      model p1 p2 = p3 z1 z2 z3;

   run;

  • Are the SAS codes above correct?
  • I want to test the null hypothesis that the two endogenous explanatory variables (EEV) are in fact exogenous.  I understand that when there are two or more EEVs, the test becomes the joint likelihood ratio test of whether corresponding correlations are 0 or not. How do I modify the SAS codes above to run this test?
  • Recall I have three instruments (z1 z2 z3). I want to test the validity of all three of my instruments by specifying the OVERID option. How do I modify the SAS codes above to incorporate the OVERID option?
  • I want to test the strength of all three instruments used. I understand that in 2SLS one can use the F statistic based on the Stock-Yogo recommendation. Can the F statistic be applied in this case (with binary outcome) as a test of weak instruments? If so, how do I modify the SAS codes above?

Thanks in advance for any help you can render!

Best,

Elizabeth


Accepted Solutions
Solution
‎08-09-2017 03:15 PM
SAS Employee
Posts: 12

Re: What is SAS equivalent of ivprovit in STATA?

Posted in reply to SASNovice2014

Hi Elizabeth,

If you want to use a probit model you should specify the DIST= option as NORMAL (not LOGIT ) or just leave this option out as the default is DIST=NORMAL.

Other than that your code looks correct.

If you would like to test if p1 and p2 are in fact exogenous, you can modify your code as

proc qlim data=a;

      model Y = p1 p2 p3 / discrete  ENDOTEST(p1 p2);

      model p1 p2 = p3 z1 z2 z3;

run;

 

If you’d like to test the validity of p1 and p2, you can replace the ENDOTEST(p1 p2) with OVERID(p1.z3 p2.z3) in the above code. The choice of which overidentifying instrument to put in the test should not change your result.

About your last point, recall that Stock-Yogo‘s recommendation of using the F statistic to test the strength of the instruments is based on a linear model. Your model is nonlinear; therefore, I am not sure if you can apply an F test (or an equivalent test) to your model to test the strength of the instruments in a straight forward way.

As Ken mentioned, there is no weak instrument test for your model in SAS.

I hope this helps,

Gunce

View solution in original post


All Replies
SAS Employee
Posts: 89

Re: What is SAS equivalent of ivprovit in STATA?

Posted in reply to SASNovice2014

Hi Elizabeth,

Very close.  Please see this link in the documentation.

SAS/ETS(R) 13.2 User's Guide

You will need a third model statement for p2.

There is a section called "Endogeneity" tests on the same page.

proc qlim data=a;

  model y1 = y2 z1 z2 / discrete endotest(y2);

  model y2 = z1 z2 z3 z4 / discrete;

  run;

For overid, use something similar to:

proc qlim data=a;

  model y1 = y2 z1 z2 / discrete overid(y2.z4);

  model y2 = z1 z2 z3 z4;

  run;

in your case, overid(p1.z1) . I am not sure it makes any sense to test them simultaneously as compared to one at a time.  You could run the proc 3 times and get your answer.

At this time there is no "weak instrument" test in SAS. I will forward this thread to the developer and ask for a recommendation.

Regards-Ken

Occasional Contributor
Posts: 9

Re: What is SAS equivalent of ivprovit in STATA?

Gunce and Ken,

Thank you so very much for your helpful response! I really appreciate your guidance. Thanks, Ken, for forwarding and asking the developer for a recommendation. It would be really valuable if SAS incorporates the "test of weak instruments" in its future releases.

Best,

Elizabeth

Solution
‎08-09-2017 03:15 PM
SAS Employee
Posts: 12

Re: What is SAS equivalent of ivprovit in STATA?

Posted in reply to SASNovice2014

Hi Elizabeth,

If you want to use a probit model you should specify the DIST= option as NORMAL (not LOGIT ) or just leave this option out as the default is DIST=NORMAL.

Other than that your code looks correct.

If you would like to test if p1 and p2 are in fact exogenous, you can modify your code as

proc qlim data=a;

      model Y = p1 p2 p3 / discrete  ENDOTEST(p1 p2);

      model p1 p2 = p3 z1 z2 z3;

run;

 

If you’d like to test the validity of p1 and p2, you can replace the ENDOTEST(p1 p2) with OVERID(p1.z3 p2.z3) in the above code. The choice of which overidentifying instrument to put in the test should not change your result.

About your last point, recall that Stock-Yogo‘s recommendation of using the F statistic to test the strength of the instruments is based on a linear model. Your model is nonlinear; therefore, I am not sure if you can apply an F test (or an equivalent test) to your model to test the strength of the instruments in a straight forward way.

As Ken mentioned, there is no weak instrument test for your model in SAS.

I hope this helps,

Gunce

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 1495 views
  • 0 likes
  • 4 in conversation