theta_to_p: The probability matrix given latent parameters

Description Usage Arguments Value Examples

View source: R/basicfunction.R

Description

Compute the probability matrix given latent parameters from the cumulative model

Usage

1
theta_to_p(theta,omega)

Arguments

theta

a continuous-valued tensor (latent parameters)

omega

the cut-off points

Value

a probability matrix in which the number of columns is possible outcomes and each row vector is corresponding probabilities at an entry of the tensor

Examples

1
2
3
4
indices <- c(10,20,30)
arr <- array(runif(prod(indices),-2,2),dim = indices)
b <- c(-1.5,0,1.5)
probability <- theta_to_p(arr,b);probability

tensorordinal documentation built on Jan. 13, 2021, 9:17 p.m.