03-31-2012 04:47 PM
I'm new to SAS programming and I need to improve my model which initially assumed all "voters" have the same theta. I need to set theta to a random value
I need to use the PROC NLMIXED function to run an MLE using the shifted Beta-Geometric model where each voter's theta is a random
draw from the Beta distribution. How can I adjust my code (see below) to use the Beta function and Alpha/Beta formula to accomplish this?
PROC NLMIXED DATA=Mainsam.v6;
IF voters>0 THEN = lost*log(theta*(1-theta)**(year-1));
ELSE = lost*log((1-theta)**(year-1));
MODEL lost ~ general (ll);