lifetime.mle | R Documentation |
Calculate MLE for samples from lifetime distribution, e.g., Weibull distribution. The observations can be complete or censored.
lifetime.mle(dat, minusloglik, starts, method = "BFGS", hessian = TRUE,...)
dat |
First column contains event times, second column contains event indicators. |
minusloglik |
|
starts |
Initial values for parameters. |
method |
Default is "BFGS". This function call optim to do optimation. Other options can be found in optim. |
hessian |
A logical value. If TRUE, hessian matrix will be returned. Default is TRUE. |
... |
Further arguments can be passed to optim. |
A list of
call |
Called function. |
coef |
The best minimizer found. |
vov |
Variance-covariance matrix of |
min |
|
dat |
Dataset used. |
minusloglik |
|
Yili Hong
optim
#censored samples from Weibull distribution
dat=cbind(c(1.1,2,3.6,4,5.3,7,7,7), c(1,1,1,1,1,0,0,0))
res=lifetime.mle(dat, minusloglik=miniusloglik.sev, starts=c(0,1))
res$coef #return \eqn{u, log(\sigma)}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.