Make a theta parameter

make_theta(diag_values, J, K)

Arguments

diag_values

The diagonal entries of each error matrix.

J

The number of raters (The umber matrices in 3D array).

K

The number of latent classes.

Value

A c(J, K, K) array; the theta parameter

Details

The diag_values argument can either be a numeric vector of length 1 or J. If it is length J, the jth element is the diagonal values of the error matrix for the jth rater. If it is length 1 all raters have the same diagonal values.

Examples


theta <- make_theta(0.7, 5, 4)
theta[1, , ]
#>      [,1] [,2] [,3] [,4]
#> [1,]  0.7  0.1  0.1  0.1
#> [2,]  0.1  0.7  0.1  0.1
#> [3,]  0.1  0.1  0.7  0.1
#> [4,]  0.1  0.1  0.1  0.7