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