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

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

1 ACCEPTED SOLUTION

Accepted Solutions
ets_kps
SAS Employee

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

View solution in original post

3 REPLIES 3
ets_kps
SAS Employee

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

Alexandra22
Calcite | Level 5

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

ets_kps
SAS Employee

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 3 replies
  • 1460 views
  • 1 like
  • 2 in conversation