rgp (version 0.4-1)

nondeterministicRanking: Create a nondeterministic ranking

Description

Create a permutation of the sequence s = 1:l representing a ranking. If p = 1, the ranking will be completely deterministic, i.e. equal to 1:l. If p = 0, the ranking will be completely random. If 0 < p < 1, the places in the ranking will be determined by iterative weighted sampling without replacement from the sequence s := 1:l. At each step of this iterated weighted sampling, the first remaining element of s will be selected with probability p, the second element with probability p * (1 - p), the third element with probability p * (1 - p) ^ 2, and so forth.

Usage

nondeterministicRanking(l, p = 1)

Arguments

l
The numer of elements in the ranking.
p
The "degree of determinism" of the ranking to create.

Value

A ranking permutation of the values 1:l.