lbfit.par: Fits length bias corrected survival curve, using parametric...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/lbiassurv.R

Description

The function arguments are time vector, and censoring indicator vector to compute the maximum liklihood estimator of a parametric model.

Usage

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

Arguments

time

A vector of positive integers, the survival time.

censor

The survival indicator, 0 if censored, 1 for event.

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 shape and rate for the rest.

Details

This function essentially returns the maximization of likelihood function according to the density function which is indicated by a user in the family item. The method uses the optim function with "BFGS" option. Every element in the time vector indicates the time that event occurs for one individual, and if the element in the censor vector is 1 indicates the individual is censored.

Value

shape.fit

The estimated value for the shape parameter.

rate.fit

The estimated value for the rate parameter.

scale.fit

If family is gamma, scale.fit=1/rate.fit.

meanlog.fit

If family is lognormal, it is the estimated mean of the logarithm of a lognormal random variable.

sdlog.fit

If family is lognormal, it is the estimated standard error of the logarithm of a lognormal random variable.

shape.sd

The estimated standard error for shape parameter.

rate.sd

The estimated standard error for rate parameter.

scale.sd

The estimated standard error for scale parameter.

meanlog.sd

The estimated standard error for meanlog parameter.

sdlog.sd

The estimated standard error for sdlog parameter.

loglike.maximum

The value of maximization of the likelihood function.

hessian

A symmetric matrix giving an estimation of the minus Hessian at the solution.

code

An integer code, 0 indicates successful completion. Other integers indicate possible error codes. See convergence in optim function.

iteration

A two-element integer vector giving the number of calls related to the optimizing function and its gradient. See optim function, counts value return.

model

The model for the fitting algorithm, the same as the family parameter.

Author(s)

Pierre-Jerome Bergeron and Vahid Partovi Nia.

References

Jaime Younger. (2011) Goodness-of-Fit for Length-Biased Survival Data with Right-Censoring.

See Also

lbfit.nonpar,lbsample.

Examples

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

lbiassurv documentation built on May 2, 2019, 4:50 p.m.