Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rSamplePair

Sample a pair (with replacement)


Description

For given K, the function samples with replacement from a uniform distribution on a set of pairs (1,2), (1,3), …, (1,K), (2,3), …, (2,K), …, (K-1,K).

Usage

rSamplePair(n, K)

Arguments

n

number of pairs to sample.

K

a numeric value which determines K (see above).

Value

A two-component numeric vector for n=2 or a matrix with 2 columns with sampled pairs in rows for n>2.

Author(s)

Examples

rSamplePair(n=1, K=2)
rSamplePair(n=10, K=2)

rSamplePair(n=1, K=3)
rSamplePair(n=10, K=3)

rSamplePair(n=1, K=4)
rSamplePair(n=10, K=4)

mixAK

Multivariate Normal Mixture Models and Mixtures of Generalized Linear Mixed Models Including Model Based Clustering

v5.3
GPL (>= 3)
Authors
Arnošt Komárek <arnost.komarek@mff.cuni.cz>
Initial release
2020-06-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.