Help using Base SAS procedures

Help with simple code

Reply
New Contributor
Posts: 4

Help with simple code

Hi,

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;

RAMS theta=0.5;

IF voters>0 THEN  = lost*log(theta*(1-theta)**(year-1));

ELSE  = lost*log((1-theta)**(year-1));

MODEL lost ~ general (ll);

RUN;

Thanks.

Ask a Question
Discussion stats
  • 0 replies
  • 493 views
  • 0 likes
  • 1 in conversation