Hello All,
I would like to estimate a selection model where my dependent variable of interest is binary.
Is this a proper code?
proc qlim data=a;
model y1 = x1 x2 z1 z2 / discrete; where z1 and z2 are instrumental variables
model y2 = x1 x2 / select (y1 = 1) discrete;
run;
Additionally, one of the variables in my equation of interest is endogenous and I would like to add an instrument.
I would be very grateful for help with a code.
Best regards,
Aleksandra
Hi Alexandra,
With the developer's help...
You have the selection portion of the code correct. You need to add a third equation for the endogeneity. Try this....
proc qlim data=a;
model y1 = x1 x2 z1 z2 / discrete; where z1 and z2 are instrumental variables
model y2 = x1 x2 / select (y1 = 1) discrete;
model x1 = x2 z1 z2;
run;
Now, the consistency properties of this estimator, I can't comment on, but you should be able to estimate this thing.
Best-Ken
Hi Alexandra,
With the developer's help...
You have the selection portion of the code correct. You need to add a third equation for the endogeneity. Try this....
proc qlim data=a;
model y1 = x1 x2 z1 z2 / discrete; where z1 and z2 are instrumental variables
model y2 = x1 x2 / select (y1 = 1) discrete;
model x1 = x2 z1 z2;
run;
Now, the consistency properties of this estimator, I can't comment on, but you should be able to estimate this thing.
Best-Ken
Hi Ken,
Thank you very much for your help.
I have one more problem - a technical one this time. When I run a probit model with an endogenous variable and test for endogeneity, although there is no error, SAS prints only a description of variables and class level information, but no parameter estimates. Do you know how to fix it? I have no problems of this nature with other models.
Best regards,
Aleksandra
Aleksandra,
Verify for me that you are are one SAS/ETS 13.1 or higher by running
proc product_status; run;
and look at the output. If you are on an earlier edition then perhaps you want to give SAS Cloud Edition a shot here. SAS® Logon Manager
Let me know if you have any trouble. You should be able to create an account and log on. -Ken
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 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.