rxord: Simulate ordinal value

View source: R/rxrandom.R

rxordR Documentation

Simulate ordinal value

Description

Simulate ordinal value

Usage

rxord(...)

Arguments

...

the probabilities to be simulated. These should sum up to a number below one.

Details

The values entered into the 'rxord' simulation will simulate the probability of falling each group. If it falls outside of the specified probabilities, it will simulate the group (number of probabilities specified + 1)

Value

A number from 1 to the (number of probabilities specified + 1)

Author(s)

Matthew L. Fidler

Examples


# This will give values 1, and 2
rxord(0.5)
rxord(0.5)
rxord(0.5)
rxord(0.5)

# This will give values 1, 2 and 3
rxord(0.3, 0.3)
rxord(0.3, 0.3)
rxord(0.3, 0.3)


nlmixr2/rxode2 documentation built on Jan. 11, 2025, 8:48 a.m.