Greetings,
Anyone knows how to write the syntax to combine the results from "Proc qlim' for the imputed data sets. Just as the ones that we did for "proc reg" or " proc logistic".
Thank you!!
QLIM does not necessarily provide an output data set that MIANALYZE can use readily so the approach would depend on type of model you have. What kind of model is it?
Here is an example that you can use for a Heckman model.
data a;
keep y1 y2 x1 x2;
do i = 1 to 500;
if ranuni(214)> .9 then x1=.;else x1 = rannor( 19283 );
x2 = rannor( 19283 );
u1 = rannor( 19283 );
u2 = rannor( 19283 );
y1l = 1 + 2 * x1 + 3 * x2 + u1;
y2l = 3 + 4 * x1 - 2 * x2 + u1*.2 + u2;
if ( y1l > 0 ) then y1 = 1;
else y1 = 0;
if ( y2l > 0 ) then y2 = 1;
else y2 = 0;
output;
end;
run;ods trace on;
proc mi data=a out=aa seed=1;
var y1 y2 x1 x2;
run;
/*-- Bivariate Probit --*/
proc qlim data=aa;
by _imputation_;
model y1 = x1 x2/discrete;
model y2 = x1 x2/select(y1=1);
ods output parameterestimates=parms;
run;
/*Because QLIM labels the parameters with a . in their name and MIANALYZE will not accept this*/
/*It is necessary to change these . to _*/
data parms;
set parms;
parameter=translate(parameter,'_','.');
run;
proc mianalyze parms=parms;
modeleffects y1_Intercept y1_x1 y1_x2 y2_Intercept y2_x1 y2_x2 _Rho _Sigma_y2;
run;
Which variable is the ERROR message pointing to? I would check the actual QLIM model output to see if there are issues with convergence.
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.
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.