[Soft-deprecated]

plot_prob_mix() is no longer under active development, switching to plot_prob is recommended.

plot_prob_mix(
  x,
  status,
  id = rep("XXXXXX", length(x)),
  distribution = c("weibull", "lognormal", "loglogistic"),
  mix_output,
  title_main = "Probability Plot",
  title_x = "Characteristic",
  title_y = "Unreliability",
  title_trace = "Sample",
  plot_method = c("plotly", "ggplot2"),
  ...
)

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.

status

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

id

Identification for every unit.

distribution

Supposed distribution of the random variable.

mix_output

A list returned by mixmod_regression or mixmod_em, which consists of values necessary to visualize the subgroups.The default value of mix_output is NULL.

title_main

A character string which is assigned to the main title.

title_x

A character string which is assigned to the title of the x axis.

title_y

A character string which is assigned to the title of the y axis.

title_trace

A character string which is assigned to the legend trace.

plot_method

Package, which is used for generating the plot output.

...

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

Details

This function is used to apply the graphical technique of probability plotting to univariate mixture models that have been separated with functions mixmod_regression or mixmod_em.

If data has been split by mixmod_em the function johnson_method is applied to subgroup-specific data. The calculated plotting positions are shaped regarding the obtained split of the used splitting function.

In mixmod_regression a maximum of three subgroups can be determined and thus being plotted. The intention of this function is to give the user a hint for the existence of a mixture model. An in-depth analysis should be done afterwards.

The marker label for x and y are determined by the first word provided in the argument title_x and title_y respectively, i.e. if title_x = "Mileage in km" the x label of the marker is "Mileage".

The name of the legend entry is a combination of the title_trace and the number of determined subgroups (if any). If title_trace = "Group" and the data has been split in two groups, the legend entries are "Group: 1" and "Group: 2".

References

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

See also

Examples

# Vectors:
hours <- voltage$hours
status <- voltage$status

# Example 1 - Using result of mixmod_em:
mix_mod_em <- mixmod_em(
  x = hours,
  status = status
)

plot_weibull_em <- plot_prob_mix(
  x = hours,
  status = status,
  distribution = "weibull",
  mix_output = mix_mod_em
)
#> Warning: `plot_prob_mix()` was deprecated in weibulltools 2.0.0.
#> Please use `plot_prob()` instead.

# Example 2 - Using result of mixmod_regression:
john <- estimate_cdf(
  x = hours,
  status = status,
  method = "johnson"
)

mix_mod_reg <- mixmod_regression(
  x = john$x,
  y = john$prob,
  status = john$status,
  distribution = "weibull"
)

plot_weibull_reg <- plot_prob_mix(
  x = hours,
  status = status,
  distribution = "weibull",
  mix_output = mix_mod_reg
)
#> Warning: `plot_prob_mix()` was deprecated in weibulltools 2.0.0.
#> Please use `plot_prob()` instead.