This function updates the class size vector.
Arguments
- C
The number (greater or equal 1) of latent classes of decision makers. Set to
NA
ifP_r = 0
. Otherwise,C = 1
per default.- z
The vector of the allocation variables of length
N
. Set toNA
ifP_r = 0
.- nozero
If
TRUE
, each element in the output vectorm
is at least one (for numerical stability).
Examples
update_m(C = 3, z = c(1,1,1,2,2,3), FALSE)
#> [,1]
#> [1,] 3
#> [2,] 2
#> [3,] 1