Skip to contents

This helper function transforms the threshold increments d to the thresholds gamma.

Usage

d_to_gamma(d)

Arguments

d

A numeric vector of threshold increments.

Value

A numeric vector of the thresholds.

Details

The threshold vector gamma is computed from the threshold increments d as c(-100,0,cumsum(exp(d)),100), where the bounds -100 and 100 exist for numerical reasons and the first threshold is fixed to 0 for identification.

Examples

d_to_gamma(c(0,0,0))
#>      [,1]
#> [1,] -100
#> [2,]    0
#> [3,]    1
#> [4,]    2
#> [5,]    3
#> [6,]  100