Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- What is SAS equivalent of ivprovit in STATA?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-08-2015 09:40 AM

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

a week ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-18-2015 03:15 PM

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

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-18-2015 01:42 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-19-2015 02:19 PM

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

a week ago

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-18-2015 03:15 PM

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