So the endogenous statement in proc qlim is to specify that dependent variable on the left hand side of the equation is endogenous;
proc qlim data = mydata itprint;
title "enrolled logit regression model results";
class race gender;
model curr_enrolled = age race gender;
endogenous curr_enrolled ~ discrete (distribution = logit);
output out =logit marginal proball;
run;
how else can we accomplish the same results?
Hello,
The ENDOGENOUS statement in PROC QLIM is for specifying the type of dependent variables that appear on the left-hand side of the equation. In other words, endogenous variables listed after each ENDOGENOUS statement refer to the dependent variables that appear on the left-hand side of the equation. You can also use the options of the MODEL statement to achieve the same result. For example, in the SAS code you wrote, you may as well accomplish the same results by the commands below:
proc qlim data = mydata itprint;
title "enrolled logit regression model results";
class race gender;
model curr_enrolled = age race gender / discrete (distribution = logit);
output out =logit marginal proball;
run;
Note that if you have the endogeneity problem in your model, that is, if one or more of your regressors are correlated with your model errors, the ENDOGENOUS statement is not how you can take into account this problem in your estimations. In the case of endogeneity, you should estimate your model of interest (the structural equation) and the reduced form equation(s) simultaneously. Of course, to be able to do this, you need to find proper instruments to form your reduced form model(s). To see if you have endogeneity of not, you can use the ENDOTEST option of the MODEL statement. For more information please see the Endogeneity and Instrumental Variables subsection of the PROC QLIM documentation.
Best regards,
Gunce
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.