Learn R Programming

CUB (version 0.1)

kkk: Sequence of combinatorial coefficients

Description

Compute the sequence of binomial coefficients ${m-1}\choose{r-1}$, for $r= 1, \dots, m$, and then returns a vector of the same length as ordinal, whose i-th component is the corresponding binomial coefficient ${m-1}\choose{r_i-1}$

Usage

kkk(m, ordinal)

Arguments

m
Number of ordinal categories
Vector
of ordinal responses