This function uses piecewise linear regression to divide the data into subgroups. See 'Details'.

# S3 method for default
mixmod_regression(
  x,
  y,
  status,
  distribution = c("weibull", "lognormal", "loglogistic"),
  conf_level = 0.95,
  k = 2,
  control = segmented::seg.control(),
  ...
)

Arguments

x

A numeric vector which consists of lifetime data. Lifetime data could be every characteristic influencing the reliability of a product, e.g. operating time (days/months in service), mileage (km, miles), load cycles.

y

A numeric vector which consists of estimated failure probabilities regarding the lifetime data in x.

status

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

distribution

Supposed distribution of the random variable.

conf_level

Confidence level of the interval.

k

Number of mixture components. If the data should be split in an automated fashion, k must be set to NULL. The argument fix.psi of control is then set to FALSE.

control

Output of the call to seg.control, which is passed to segmented.lm. See 'Examples' for usage.

...

Further arguments passed to or from other methods. Currently not used.

Value

A list with classes wt_model and wt_rank_regression if no breakpoint was detected. See rank_regression. The returned tibble data is of class wt_cdf_estimation and contains the dummy columns cdf_estimation_method and id. The former is filled with NA_character, due to internal usage and the latter is filled with "XXXXXX" to point out that unit identification is not possible when using the vector-based approach. A list with classes wt_model and wt_mixmod_regression if at least one breakpoint was determined. The length of the list depends on the number of identified subgroups. Each list contains the information provided by rank_regression. The returned tibble data of each list element only retains information on the failed units and has modified and additional columns:

  • id : Modified id, overwritten with "XXXXXX" to point out that unit identification is not possible when using the vector-based approach.

  • cdf_estimation_method : A character that is always NA_character. Only needed for internal use.

  • q : Quantiles of the standard distribution calculated from column prob.

  • group : Membership to the respective segment.

Details

The segmentation process is based on the lifetime realizations of failed units and their corresponding estimated failure probabilities for which intact items are taken into account. It is performed with the support of segmented.lm.

Segmentation can be done with a specified number of subgroups or in an automated fashion (see argument k). The algorithm tends to overestimate the number of breakpoints when the separation is done automatically (see 'Warning' in segmented.lm).

In the context of reliability analysis it is important that the main types of failures can be identified and analyzed separately. These are

  • early failures,

  • random failures and

  • wear-out failures.

In order to reduce the risk of overestimation as well as being able to consider the main types of failures, a maximum of three subgroups (k = 3) is recommended.

References

Doganaksoy, N.; Hahn, G.; Meeker, W. Q., Reliability Analysis by Failure Mode, Quality Progress, 35(6), 47-52, 2002

Examples

# Vectors:
## Data for mixture model:
hours <- voltage$hours
status <- voltage$status

## Data for simple unimodal distribution:
distance <- shock$distance
status_2 <- shock$status

# Probability estimation with one method:
prob_mix <- estimate_cdf(
  x = hours,
  status = status,
  method = "johnson"
)

prob <- estimate_cdf(
  x = distance,
  status = status_2,
  method = "johnson"
)

 # Example 1 - Mixture identification using k = 2 two-parametric Weibull models:
mix_mod_weibull <- mixmod_regression(
   x = prob_mix$x,
   y = prob_mix$prob,
   status = prob_mix$status,
   distribution = "weibull",
   conf_level = 0.99,
   k = 2
)

# Example 2 - Mixture identification using k = 3 two-parametric lognormal models:
mix_mod_lognorm <- mixmod_regression(
   x = prob_mix$x,
   y = prob_mix$prob,
   status = prob_mix$status,
   distribution = "lognormal",
   k = 3
)

# Example 3 - Mixture identification using control argument:
mix_mod_control <- mixmod_regression(
  x = prob_mix$x,
  y = prob_mix$prob,
  status = prob_mix$status,
  distribution = "weibull",
  k = 2,
  control = segmented::seg.control(display = TRUE)
)
#> boot sample =  1  opt.dev = 1.42543  n.psi = 1  est.psi = -0.948 
#> boot sample =  2  opt.dev = 1.42543  n.psi = 1  est.psi = -0.948 
#> boot sample =  3  opt.dev = 1.42543  n.psi = 1  est.psi = -0.948 
#> boot sample =  4  opt.dev = 1.42543  n.psi = 1  est.psi = -0.948 
#> boot sample =  5  opt.dev = 1.42543  n.psi = 1  est.psi = -0.948 
#> boot sample =  6  opt.dev = 1.42543  n.psi = 1  est.psi = -0.948 

# Example 4 - Mixture identification performs rank_regression for k = 1:
mod <- mixmod_regression(
  x = prob$x,
  y = prob$prob,
  status = prob$status,
  distribution = "weibull",
  k = 1
)