Skip to contents

Formula: p_ic = F(gamma_c + eta_i) - F(gamma_{c-1} + eta_i), gamma_0 = -inf, gamma_C = +inf

Usage

Ordprobs(eta, thresholds, link = "probit")

Arguments

eta

Linear predictor x_i'beta for each record.

thresholds

The C - 1 finite thresholds gamma_1 < ... < gamma_{C-1}.

'probit' for the standard normal CDF or 'logistic' for the standard logistic CDF.

Value

List with probabilities, n, C.

References

Montesinos Lopez, Montesinos Lopez and Crossa (2022), Multivariate Statistical Machine Learning Methods for Genomic Prediction, Springer, doi:10.1007/978-3-030-89010-0. Chapter 7, Eq. (7.1) p. 210, which gives both the ordinal probit and the ordinal logistic link on the same page.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ordprobs(V, V)
#> $probabilities
#>           [,1]         [,2]         [,3]         [,4]         [,5]         [,6]
#> [1,] 0.9772499 2.140023e-02 1.318227e-03 3.138459e-05 2.856650e-07 9.853078e-10
#> [2,] 0.9986501 1.318227e-03 3.138459e-05 2.856650e-07 9.853078e-10 1.279199e-12
#> [3,] 0.9999683 3.138459e-05 2.856650e-07 9.853078e-10 1.279199e-12 6.661338e-16
#> [4,] 0.9999997 2.856650e-07 9.853078e-10 1.279199e-12 6.661338e-16 0.000000e+00
#> [5,] 1.0000000 9.853078e-10 1.279199e-12 6.661338e-16 0.000000e+00 0.000000e+00
#> [6,] 1.0000000 1.279199e-12 6.661338e-16 0.000000e+00 0.000000e+00 0.000000e+00
#> [7,] 1.0000000 6.661338e-16 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#> [8,] 1.0000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>              [,7]         [,8] [,9]
#> [1,] 1.279199e-12 6.661338e-16    0
#> [2,] 6.661338e-16 0.000000e+00    0
#> [3,] 0.000000e+00 0.000000e+00    0
#> [4,] 0.000000e+00 0.000000e+00    0
#> [5,] 0.000000e+00 0.000000e+00    0
#> [6,] 0.000000e+00 0.000000e+00    0
#> [7,] 0.000000e+00 0.000000e+00    0
#> [8,] 0.000000e+00 0.000000e+00    0
#> 
#> $n
#> [1] 8
#> 
#> $C
#> [1] 9
#> 
#> $method
#> [1] "Ordinal threshold model probabilities, MVSML Eq. (7.1)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"