Forecasting using SAS Forecast Server, SAS/ETS, and more

Predicted values for a binary endogenous variable using PROC QLIM

Reply
Highlighted
Contributor
Posts: 20

Predicted values for a binary endogenous variable using PROC QLIM

As I understand the documentation for PROC QLIM, it should produce predicted values and probabilities for a binary dependent variable (single equation model) where the dependent variable is missing and non-missing values are available for all predictors. The attached code produces predicted values under PROC LOGIST (stored in TEMP.PredictedL), but only missing values from PROC QLIM where ELP5 = . (ELP5 is 0 or 1 in all other cases). Is there a way for me to get the predicted probabilities from PROC QLIM where ELP5=.?

 

*
* Start with logistic regression for model development;
PROC LOGISTIC DATA=ELP.Estimation ;
  MODEL ELP5(EVENT='1') = delay inactive /*inactive2*/ LPrior
			   /*TotDays TDDays*/ LTD TPDDays 
			   /*VRDays*/ VR01Days /*VR02Days*/ VR04Days /*VR05Days*/
			   /*MedCost MedCost2*/ LMed
			   interpreter psych 
			   gender age age2 Lwage /*rural urban*/ OOP		/* rural and urban coefficients almost the same	*/
			   UER /*earnings*/ LEarnings pc PcOnly /*SI*/ RelRate /*RelRank*/
			   IndAcc IndAdm IndAgr IndArt IndCon /*IndEdu*/ IndFor IndHea IndInf /*IndMfg IndMin IndSrv*/ IndPro IndPub IndRea IndRet IndTrn IndUti /*IndWho IndOth */
			   surgeries s15 s16 /*s17 s21 s22 s25 s26*/ s27 s28 s33 /*s43*/ s50 /*s51 s57 s58 s65 s88 s89*/ s90 /*s91*/ s92 s93 s94 s95 /*s96 s98 s99 s_other*/
			   /*MEQ*/ ClassA /*ClassC ClassD Benzo*/ drugs / LINK=LOGIT RSQUARE;
			  OUTPUT OUT=TEMP.PredictedL PRED=P;
 		  TITLE 'Sample logistic analysis with output of predicted values and probabilities';
RUN;
*
* Probit analysis;
PROC QLIM DATA=ELP.Estimation METHOD=QUANEW;
  MODEL ELP5 = delay inactive /*inactive2*/ LPrior
			   /*TotDays TDDays*/ LTD TPDDays 
			   /*VRDays*/ VR01Days /*VR02Days*/ VR04Days /*VR05Days*/
			   /*MedCost MedCost2*/ LMed
			   interpreter psych 
			   gender age age2 Lwage /*rural urban*/ OOP		/* rural and urban coefficients almost the same	*/
			   UER /*earnings*/ LEarnings pc PcOnly /*SI*/ RelRate /*RelRank*/
			   IndAcc IndAdm IndAgr IndArt IndCon /*IndEdu*/ IndFor IndHea IndInf /*IndMfg IndMin IndSrv*/ IndPro IndPub IndRea IndRet IndTrn IndUti /*IndWho IndOth */
			   surgeries s15 s16 /*s17 s21 s22 s25 s26*/ s27 s28 s33 /*s43*/ s50 /*s51 s57 s58 s65 s88 s89*/ s90 /*s91*/ s92 s93 s94 s95 /*s96 s98 s99 s_other*/
			   /*MEQ*/ ClassA /*ClassC ClassD Benzo*/ drugs / DISCRETE;
			  NLOPTIONS MAXITER=800 MAXFUNC=4000;
			  OUTPUT OUT=TEMP.PPredicted PREDICTED PROB;
 		  TITLE 'Sample probit analysis with output of predicted values and probabilities';
RUN;
Ask a Question
Discussion stats
  • 0 replies
  • 161 views
  • 0 likes
  • 1 in conversation