Hello everyone,
I want to fit this model using PROC MCMC but, it did not fit properly.
Please help me to find error of the program.
Thank You in Advance.
**********Constrained Log binomial Model****************
proc mcmc data=one seed=12345 nbi=200000 nmc=2000000 stats(percent=2.5 97.5);
parms beta0 0 beta1 0 beta2 0 beta3 0 s2 1;
prior s2 ~ igamma(0.01, s=0.01);
prior beta0 ~ normal(0,v=100);
prior beta1 ~ normal(0,v=100);
prior beta2 ~ normal(0,v=100);
prior beta3 ~ normal(0,v=100);
random delta ~ normal(beta0, var=s2) subject=cluss_co;
eta = delta + beta1*x + beta2*u_inc + beta3*rdveg;
px = exp(eta);
if(px=1) then px=0.9999999999999999;
lp = y * log(px) + (1-y)*log(1-px);
if(eta > 0) then lp=-10000000000000;
model general(lp);
ods output postsummaries=randsum geweke=rgew;
run;Proa
Can you specify more detail about what the problem is.
I see often problems with log-binomial models, due to the fact that there is no mechanism that ensure that all estimated probabilites is in the interval (0,1) at the maximum-likelihood value. I thiink an error will occur at the first iteration in the mcmc-algortitm where one of the probabilities is estimated outside the interval. So, maybe a change to logit-scale can solve the problem.
Thank you so much
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.