Turn on suggestions

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

Showing results for

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

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-08-2015 09:40 AM
(2975 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 16. Read more here about **why** you should contribute and **what is in it** for you!

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.