03-06-2013 11:58 AM
I came across this question at work. I would like to have your input. I have never done monte carlo and i am a newbie. So, please excuse my dumbness!
I want the standard error from model , error estimate and confidence interval on predicted number of response variable. I want to do simulation (i was told multiply predicted probability by case weight and sum it all up and repeat 1000 times). I need 2.5th and 97.5th % confidence interval and errors on percent predictions. PROC SURVEYLOGISTIC was used for analysis. I then used xbeta and stdxbeta to get the linear predictors and standard error of linear predictor. I back transformed the values. I'm trying to use PROC MCMC here. So, I assume standard error is normally distributed and resample error 1000 times. Also, I need a confidence interval on full prediction and sample error on output.
I would like some help here as to use PROC MCMC for getting the desired output. These are just the notes I took from our meeting.
This is the surveylogistic code.
proc surveylogistic data=outboot;
where var1="abc" and var2 in ("abc") and var3 in (11, 13) and var4>15
and var6>1999 and 85>var7>15;
format var varfmt..;
class var var2 /param=ref;
model resp (desc)=vara varb varc vard
/ Rsquare ;
output out=outall predprobs=individual xbeta=predval stdxbeta=sepred;
How do I use PROC MCMC to get confidence intervals and standard errors. I need CI on full prediction and need to sample error on output. Please help.