EMRL_RSS: Estimation of Mean Residual Lifetime under RSS

Description Usage Arguments Value Examples

Description

Estimation of Mean Residual Lifetime Based on the Ranked Set Sampling Scheme (EMRL_RSS)

Usage

1
Mhat_RSS(t, RSSdata, k, m)

Arguments

t

A numeric vector

RSSdata

Data generated from Ranked Set Sampling Scheme

k

Collection size

m

Number of cycles

Value

The Estimation of MRL based on the RSS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
k <- 5
m <- 5
lambda <- 1
RSSdata <- matrix(0, nrow = k, ncol = m)
for (j in 1:m) {
  for (i in 1:k) {
    x <- rgamma(k, shape = 2, scale = 1)
    y <- lambda * ((x - mean(x)) / sd(x)) + sqrt((1 - lambda^2)) * rnorm(k, 0, 1)
    sy <- sort(y)
    syindex <- sort(y, index.return = TRUE)$ix
    RSSdata[i, j] <- x[syindex][i]
  }
}
Mhat_RSS(seq(0, 10, 0.1), RSSdata, k = 5, m = 5)

hosseinzadeh74/ReRSS documentation built on Dec. 20, 2021, 4:48 p.m.