03-22-2018 09:42 AM - edited 03-22-2018 12:15 PM
I have been working on generating regression models to fit collision data. The general model approach is to use Negative Binomial Regression, using a log link function. The model could have been fitted using PROC GENMOD, I understand that in that code using ODS Graphics it would be possible to CURE Plots. However, this would be at a cost of assuming a fixed dispersion parameter. As such NL MIXED was the way to go as seen below.
Is there a way I can use NL MIXED to get my cure plots, or do I need to set the model up in PROC GENMOD?
libname db 'V:\data';
/* General Model Form: TOT=exp(alpha1)(AADT)^beta1 (Length)^beta2 (IRI)^beta3
Dispersion (k)=exp(alpha2)(length)^beta4 */
proc nlmixed data=db.dir5lane2;
parms alpha1 1 beta1 1 beta2 1 beta3 1 alpha2 1 beta4 1 ; eta = alpha1 + beta1*logaadtn + beta2*loglength + beta3*logiri; lambda = exp(eta); eta_k = alpha2+beta4*loglength; k = exp(eta_k); loglike = (lgamma(TOT+(1/k)) - lgamma(TOT+1) - lgamma(1/k) + TOT*log(k*lambda) - (TOT+(1/k))*log(1+k*lambda)); model TOT ~ general(loglike); run;
Any suggestion are appreciated,