function likeli=h1testraw(para, time, delta, lesi)

a   =para(1);
b   =para(2);

lamda =para(3);
gamma =para(4);

 
pi=1./(1+exp(a+b.*lesi));
likeli=sum((1-delta).*log(pi+(1-pi).*exp(-(lamda.*time).^gamma))...
    +(delta).*(log(1-pi)+log(lamda.*gamma)+(gamma-1).*log(lamda.*time)-(lamda.*time).^gamma));

  likeli=(-1)*likeli +(a<0)*1e10+(b<0)*1e10+(lamda<0)*1e10+(gamma<0)*1e10;