Learn R Programming

xactonomial (version 1.0.3)

sspace_multinom: Enumerate the multinomial sample space

Description

Enumerate the multinomial sample space

Usage

sspace_multinom(d, n)

Value

A vector enumerating the sample space, to be converted to a matrix with d columns and choose(n + d - 1, d - 1) rows

Arguments

d

The dimension

n

The sample size

Examples

Run this code
matrix(sspace_multinom(3, 5), ncol = 3, byrow = TRUE)

Run the code above in your browser using DataLab