Learn R Programming

lbiassurv (version 1.0)

lbfit.par: Fits parametric models

Description

Will be combined with nonpar version soon.

Usage

lbfit.par(time, censor, family, initial = list(shape, rate, meanlog, sdlog))

Arguments

time
The observed time as a vector.
censor
The survival indicator, 1 if censored, 0 otherwise.
family
A string indicating the parametric family to fit. Options are weibull, gamma, exponential, lognormal , and loglogistic.
initial
A list of initial parameters for optimization, meanlog, and sdlog for lognormal and the shape and rate for the rest.

Value

  • The list returned by the optim function.

Details

See the master thesis of Pjerome student.

References

The thesis or an article here.

See Also

lbfit.nonpar,lbsample.

Examples

Run this code
mydata=lbsample(500,family="exponential",par=list(rate=1))
lbfit.par(time=mydata$data,censor=mydata$censor,family="exponential",initial=list(shape=3,rate=3))

Run the code above in your browser using DataLab