lifetime.mle: Calculate MLE for Lifetime Distribution

Description Usage Arguments Value Author(s) See Also Examples

View source: R/lifetime.mle.R

Description

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

Usage

1
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

1
2
3
4
#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)}

SPREDA documentation built on Nov. 26, 2018, 1:04 a.m.