Package 'orderstats'

Title: Efficiently Generates Random Order Statistic Variables
Description: All the methods in this package generate a vector of uniform order statistics using a beta distribution and use an inverse cumulative distribution function for some distribution to give a vector of random order statistic variables for some distribution. This is much more efficient than using a loop since it is directly sampling from the order statistic distribution.
Authors: Christian Sims <[email protected]>
Maintainer: Christian Sims <[email protected]>
License: GPL-2
Version: 0.1.0
Built: 2024-11-17 03:38:56 UTC
Source: https://github.com/cran/orderstats

Help Index


Gets order statistics from a 0-1 uniform distribution

Description

Gets order statistics from a 0-1 uniform distribution

Usage

order_probs(draw_size, k, n)

Arguments

draw_size

- The size of the output sample

k

- The Kth smallest value from a sample

n

- The size the sample to compute the order statistic from

Value

A vector of random order statistic variables from a 0-1 uniform distribution

References

Gentle, James E. (2009), Computational Statistics, Springer, p. 63, ISBN 9780387981444


Gets random order statistics from a cauchy distribution

Description

Gets random order statistics from a cauchy distribution

Usage

order_rcauchy(draw_size = 1, location = 0, scale = 1, k = 1, n = 1)

Arguments

draw_size

- The size of the output sample

location

- The location parameter in the cauchy distribution

scale

- The scale parameter in the cauchy distribution

k

- The Kth smallest value from a sample

n

- The size of the sample to compute the order statistic from

Value

A vector of random order statistic variables from a cauchy distribution

Examples

order_rcauchy(10, 0, 1, 100, 10000)

Gets random order statistics from a chi-square distribution

Description

Gets random order statistics from a chi-square distribution

Usage

order_rchisq(draw_size, df, k, n)

Arguments

draw_size

- The size of the output sample

df

- The degrees of the chi-square distribution

k

- The Kth smallest value from a sample

n

- The size of the sample to compute the order statistic from

Value

A vector of random order statistic variables from a chi-square distribution

Examples

order_rchisq(10, 1, 100, 10000)

Gets random order statistics from an exponential distribution

Description

Gets random order statistics from an exponential distribution

Usage

order_rexp(draw_size, rate, k, n)

Arguments

draw_size

- The size of the output sample

rate

- The shape parameter in the exponential distribution

k

- The Kth smallest value from a sample

n

- The size of the sample to compute the order statistic from

Value

A vector of random order statistic variables from an exponential distribution

Examples

order_rexp(10, 0.005, 100, 10000)

Gets random order statistics from a gamma distribution

Description

Gets random order statistics from a gamma distribution

Usage

order_rgamma(draw_size, shape, scale, k, n)

Arguments

draw_size

- The size of the output sample

shape

- The shape parameter in the gamma distribution

scale

- The scale parameter in the gamma distribution

k

- The Kth smallest value from a sample

n

- The size of the sample to compute the order statistic from

Value

A vector of random order statistic variables from a gamma distribution

Examples

order_rgamma(10, 20, 2, 100, 10000)

Gets random order statistics from a logistic distribution

Description

Gets random order statistics from a logistic distribution

Usage

order_rlogis(draw_size, location, scale, k, n)

Arguments

draw_size

- The size of the output sample

location

- The location parameter in the logistic distribution

scale

- The scale parameter in the logistic distribution

k

- The Kth smallest value from a sample

n

- The size of the sample to compute the order statistic from

Value

A vector of random order statistic variables from a logistic distribution

Examples

order_rlogis(10, 0, 1, 100, 10000)

Gets random order statistics from a normal distribution

Description

Gets random order statistics from a normal distribution

Usage

order_rnorm(draw_size = 1, mean = 0, sd = 1, k = 1, n = 1)

Arguments

draw_size

- The size of the output sample

mean

- The mean of the normal distribution

sd

- The standard deviation of the normal distribution

k

- The Kth smallest value from a sample

n

- The size of the sample to compute the order statistic from

Value

A vector of random order statistic variables from a normal distribution

Examples

order_rnorm(10, 0, 1, 100, 10000)