MLEw2p_cpp: Weibull 2-parameter MLE calculation.

Description Usage Arguments Details Value References Examples

View source: R/MLEw2p_cpp.r

Description

MLEw2p_cpp is a wrapper function to a fast C++ implementation optimizing parameters of the 2-parameter Weibull distribution for a set of data consisting of failures, or alternatively failures and suspensions.

Usage

1
 MLEw2p_cpp(x, s=NULL, MRRfit=NULL)

Arguments

x

A vector of failure data.

s

An optional vector of suspension data.

MRRfit

An optional vector such as produced by MRRw2pxy having parameter order [1] Eta, [2] Beta. If not provided, this function will calculate a suitable estimate of Beta to initiate the optimization.

Details

This function calls a C++ function that performs the root identification of the derivative of the likelihood function with respect to Beta, then given the optimal Beta calculate Eta from as the root of the derivative of the likelihood function with respect to Eta. The optimization algorithm employed is a discrete Newton, or secant, method as demonstrated in a FORTRAN program published by Tao Pang.

Value

A vector containing results in the following order: Eta (scale), Beta (shape), Log-Likelihood.

References

Dr. Robert B. Abernethy, (2008) "The New Weibull Handbook, Fifth Edition" Tao Pang,(1997) "An Introduction to Computational Physics"

Examples

1
2
3
failures<-c(90,96,30,49,82)
suspensions<-c(100,45,10)
fit_result<-MLEw2p_cpp(failures,suspensions)

debias documentation built on May 2, 2019, 4:49 p.m.