***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;
Thanks in advance for any help you can render!
Best,
Elizabeth
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
Hi Elizabeth,
Very close. Please see this link in the documentation.
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
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
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
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.