Dale,
Thanks so much for your prompt reply.
Using the same data, I have run through several regressions, which included Poisson, negative binomial, zero-inflated Poisson, zero-inflated negative binomial, binomial, beta binomial, and zero-inflated beta binomial. After that, I have the zero-inflated negative binomial with random effects, but like I said in the first thread, I cannot add the random effects with zero-inflated beta binomial and not even beta binomial.
I have two beta binomial parameterizations. (Without random, they work well).
BB1:
proc nlmixed data=dsn tech=newrap qpoints=50 maxiter=5000 maxfunc=20000;
parms b0=-2.612 b1=0.037 b2=0.669 b3=0.214 b24=-0.056 b25=0.012 b26=0.045 b27=-0.008
rho=0.035 varRin=0.5099 VarRslp=0.003 cov=-0.0164;
eta=(b0+b1*group_0+b2*group_1+b3*group_2+(b24+Rslp)*nqt+Rin+b25*groupnqt_0+b26*groupnqt_1+b27*groupnqt_2);
expeta=exp(eta);
p=expeta/(1+expeta);
N=totdenom; r=R_totnum;
A=p*(1-rho)/rho;
B=(1-p)*(1-rho)/rho;
loglike=(lgamma(n+1) - lgamma(r+1) - lgamma(n-r+1))+lgamma(A+r)+
lgamma(n+B-r)+lgamma(A+B) - lgamma(A+B+n) - lgamma(A) -lgamma(B);
model r~general(loglike);
random Rin Rslp ~ nomal([0,0], [varRin, Cov, VarRslp]) subject=hsp_ID;
run;
BB2:
proc nlmixed data=ami1_04Q1 tech=newrap maxiter=5000 maxfunc=20000;
parms b0=-2.544 b1=0.183 b2=0.66 b3=0.097 b24=-0.065 b25=0.011 b26=0.052 b27=-0.0007
A=4.27 VarRin=0.5099 VarRslp=0.002163 cov =-0.01644;
eta=(b0+b1*group_0+b2*group_1+b3*group_2+(b24+Rslp)*nqt+Rin+b25*groupnqt_0+b26*groupnqt_1+b27*groupnqt_2);
expeta=exp(eta);
p=expeta/(1+expeta);
N=totdenom; r=R_totnum;
B=A*(1-p)/p);
loglike=(lgamma(n+1)-lgamma(r+1) -lgamma(n-r+1))+lgamma(A+r)+lgamma(n+B-r)+lgamma(A+B)
- lgamma(A+B+n) - lgamma(A) -lgamma(B);
model r~general(loglike);
random Rin Rslp~ normal([0,0], [varRin, Cov, varRslp]) subject=hsp_ID;
run;
I appreciate your comment and suggestions!
Kui
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.