fit_data.lifedata: Fit Distribution to lifedata Object

Description Usage Arguments Details Value See Also

View source: R/lifedata.R

Description

Fits a distribution to lifedata object using either MLE or rank regression. Only weibull and exponential distributions are available.

Usage

1
2
## S3 method for class 'lifedata'
fit_data(x, dist = "weibull", method = "mle")

Arguments

x

a lifedata object

dist

character indicating distribution. only exponential and weibull are available

method

which method to estimate parameters of distribution. can be mle, rrx, or rry. see details.

Details

When method = 'mle', uses optim function to find MLEs. The only exception is for the exponential distributions, which uses the analytic solution. For rank regression, 'rrx' and 'rry' mean rank regression with least-square distance in x and y, respectively. For rank regression, ranks are calculated by median_ranks.lifedata.

Standard errors are calculated based on Fisher matrix estimation. The matrix comes from the Hessian output from optim.

Value

A fitted_life_data object. Object includes original input lifedata object, the distribution fitted, log likelihood, parameter estimates. If all data points are complete, a chi-square goodness-of-fit output is included as well.

See Also

median_ranks.lifedata optim


lxy009/weibullpp documentation built on May 21, 2019, 9:16 a.m.