lifetime.mle {SPREDA}R Documentation

Calculate MLE for Lifetime Distribution

Description

Calculate MLE for samples from lifetime distribution, e.g., Weibull distribution. The observations can be complete or censored.

Usage

lifetime.mle(dat, minusloglik, starts, method = "BFGS", hessian = TRUE,...)

Arguments

dat

First column contains event times, second column contains event indicators.

minusloglik

-loglikelihood.

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.

Value

A list of

call

Called function.

coef

The best minimizer found.

vov

Variance-covariance matrix of coef.

min

-loglikelihood evaluated at coef.

dat

Dataset used.

minusloglik

-loglikelihood function.

Author(s)

Yili Hong

See Also

optim

Examples

#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)}

[Package SPREDA version 1.1 Index]