Learn R Programming

NSM3 (version 1.18)

RSS: Ranked-Set Sample

Description

Function to obtain a ranked-set sample of given set size and number of cycles based on a specified auxiliary variable.

Usage

RSS(k,m,ranker)

Value

Returns a vector of the indices corresponding to the observations selected to be in the RSS.

Arguments

k

set size

m

number of cycles

ranker

auxiliary variable used for judgment ranking

Author

Grant Schneider

Examples

Run this code
##Simulate 100 observations of a response variable we are interested in 
##and an auxiliary variable we use for ranking

set.seed(1)
response<-rnorm(100)
auxiliary<-rnorm(100)

##Get the indices for a ranked-set sample with set size 3 and 2 cycles
RSS(2,3,auxiliary) #Tells us to measure observations 2, 19, 32,..., 91

##Alternatively, get the responses for those observations. 
##In practice, response will not be available ahead of time.
response[RSS(2,3,auxiliary)]

Run the code above in your browser using DataLab