plot_class_allocation | R Documentation |
P_r = 2
only)This function plots the allocation of decision-maker specific coefficient vectors
beta
given the allocation vector z
, the class means b
,
and the class covariance matrices Omega
.
plot_class_allocation(beta, z, b, Omega, ...)
beta |
The matrix of the decision-maker specific coefficient vectors of dimension
|
z |
The vector of the allocation variables of length |
b |
The matrix of class means as columns of dimension |
Omega |
The matrix of class covariance matrices as columns of dimension
|
... |
Optional visualization parameters:
|
Only applicable in the two-dimensional case, i.e. only if P_r = 2
.
No return value. Draws a plot to the current device.
b <- matrix(c(-1,1,1,1), ncol = 2) Omega <- matrix(c(0.8,0.5,0.5,1,0.5,-0.2,-0.2,0.3), ncol = 2) z <- rep(1:2, each = 10) beta <- sapply(z, function(z) rmvnorm(mu = b[,z], Sigma = matrix(Omega[,z], ncol = 2))) RprobitB:::plot_class_allocation(beta = beta, z = z, b = b, Omega = Omega, colors = c("red","blue"), perc = 0.5, r = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.