R/survival.mle.R

Defines functions survival.mle

Documented in survival.mle

survival.mle <-
function(x,fit,param.vec,censoring,censor.type="right"){

a<-sum(log(dgl(x[which(censoring==1)],fit,param=param.vec)))

if(censor.type=="right"){
b<-sum(log(1-pgl(x[which(censoring==0)],fit,param=param.vec)))}

if(censor.type=="left"){
b<-sum(log(pgl(x[which(censoring==0)],fit,param=param.vec)))}

return(a+b)
}

Try the GLDreg package in your browser

Any scripts or data that you put into this service are public.

GLDreg documentation built on May 13, 2022, 9:06 a.m.