# computing n # let k1=sum(c2) # #computing S # let k2=sum(c1*c2) # let c2(1)=k5-1 # # set f0 # let k3=sum(c2) # # set N=n+f0 # let c3=LNGAMMA(c2+1) let k4=LNGAMMA(k3+1) # # computing the multinomial coefficient # via the log-gamma function # let k6=k4-sum(c3) # let k7=k2/k3 # # computing the Poisson mean # PDF 'y' c4; Poisson k7. # # computing the profile likelihood # let c10(k5)=k5-1 # # set f0 into column 10 let c11(k5)=k6+sum(c2*log(c4)) # # compute the profile log-likelihood # let k5=k5+1 # #increase f0 by 1