Learn R Programming

weibulltools (version 1.0.1)

confint_fisher: Fisher Confidence Bounds for Quantiles and/or Probabilities

Description

This method computes normal-approximation confidence intervals for quantiles and/or failure probabilities using the delta_method. The required (log-)location-scale (and threshold) parameters and variance-covariance matrix of these need to be estimated by Maximum Likelihood.

Usage

confint_fisher(x, event, loc_sc_params, loc_sc_varcov,
  distribution = c("weibull", "lognormal", "loglogistic", "normal",
  "logistic", "sev", "weibull3", "lognormal3", "loglogistic3"),
  bounds = c("two_sided", "lower", "upper"), conf_level = 0.95,
  direction = c("y", "x"))

Arguments

x

a numeric vector which consists of lifetime data. x is used to specify the range of confidence region(s).

event

a vector of binary data (0 or 1) indicating whether unit i is a right censored observation (= 0) or a failure (= 1).

loc_sc_params

a (named) numeric vector of estimated (by Maximum Likelihood) location and scale parameters for a specified distribution. The order of elements is important. First entry needs to be the location parameter \(\mu\) and the second element needs to be the scale parameter \(\sigma\). If a three-parametric model is used the third element is the threshold parameter \(\gamma\).

loc_sc_varcov

a (named) numeric matrix of estimated (by Maximum Likelihood) location and scale variances and covariances for a specified distribution. The order of elements is important. First entry of the diagonal needs to be the variance of the location parameter Var(\(\mu\)) and the second element of the diagonal needs to be the variance of the scale parameter Var(\(\sigma\)). If a three-parametric model is used the third element of the diagonal needs to be the variance of the threshold parameter Var(\(\gamma\)).

distribution

supposed distribution of the random variable. The value can be "weibull", "lognormal", "loglogistic", "normal", "logistic", "sev" (smallest extreme value), "weibull3", "lognormal3" or "loglogistic3". Other distributions have not been implemented yet.

bounds

a character string specifying the interval(s) which has/have to be computed. Must be one of "two_sided" (default), "lower" or "upper".

conf_level

confidence level of the interval. The default value is conf_level = 0.95.

direction

a character string specifying the direction of the computed interval(s). Must be either "y" (failure probabilities) or "x" (quantiles).

Value

A data frame containing the lifetime characteristic, the probabilities, estimated standard errors by the delta method and computed values for the specified confidence bound(s).

Examples

Run this code
# NOT RUN {
obs   <- seq(10000, 100000, 10000)
state <- c(0, 1, 1, 0, 0, 0, 1, 0, 1, 0)
df_john <- johnson_method(x = obs, event = state)
mle <- ml_estimation(x = obs, event = state,
                     distribution = "weibull", conf_level = 0.95)
conf_fish <- confint_fisher(x = df_john$characteristic,
                            event = df_john$status,
                            loc_sc_params = mle$loc_sc_coefficients,
                            loc_sc_varcov = mle$loc_sc_vcov,
                            distribution = "weibull",
                            bounds = "two_sided",
                            conf_level = 0.95,
                            direction = "y")
# }

Run the code above in your browser using DataLab