function ll=loglik(beta,y,x,c); ll=-sum(-(1-c).*(x*beta)-y.*exp(-x*beta));