mcs_mileage {weibulltools}R Documentation

Simulation of Unknown Covered Distances using a Monte Carlo Approach

Description

This function simulates distances for units where these are unknown.

First, random numbers of the annual mileage distribution, estimated by dist_mileage, are drawn. Second, the drawn annual distances are converted with respect to the actual operating times (in days) using a linear relationship. See 'Details'.

Usage

mcs_mileage(x, ...)

## S3 method for class 'wt_mcs_mileage_data'
mcs_mileage(x, distribution = c("lognormal", "exponential"), ...)

Arguments

x

A tibble of class wt_mcs_mileage_data returned by mcs_mileage_data.

...

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

distribution

Supposed distribution of the annual mileage.

Details

Assumption of linear relationship: Imagine the distance of the vehicle is unknown. A distance of 3500.25 kilometers (km) was drawn from the annual distribution and the known operating time is 200 days (d). So the resulting distance of this vehicle is

3500.25km(200d365d)=1917.945km3500.25 km \cdot (\frac{200 d} {365 d}) = 1917.945 km

Value

A list with class wt_mcs_mileage containing the following elements:

See Also

dist_mileage for the determination of a parametric annual mileage distribution and estimate_cdf for the estimation of failure probabilities.

Examples

# MCS data preparation:
mcs_tbl <- mcs_mileage_data(
  field_data,
  mileage = mileage,
  time = dis,
  status = status,
  id = vin
)

# Example 1 - Reproducibility of drawn random numbers:
set.seed(1234)
mcs_distances <- mcs_mileage(
  x = mcs_tbl,
  distribution = "lognormal"
)

# Example 2 - MCS for distances with exponential annual mileage distribution:
mcs_distances_2 <- mcs_mileage(
  x = mcs_tbl,
  distribution = "exponential"
)

# Example 3 - MCS for distances with downstream probability estimation:
## Apply 'estimate_cdf()' to *$data:
prob_estimation <- estimate_cdf(
  x = mcs_distances$data,
  methods = "kaplan"
)

## Apply 'plot_prob()':
plot_prob_estimation <- plot_prob(prob_estimation)


[Package weibulltools version 2.1.0 Index]