BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASNovice2014
Calcite | Level 5

***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

1 ACCEPTED SOLUTION

Accepted Solutions
gunce_sas
SAS Employee

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

3 REPLIES 3
ets_kps
SAS Employee

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

sasuser2011
Calcite | Level 5

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

gunce_sas
SAS Employee

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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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