plot.mccca {mccca} | R Documentation |
plot mccca
object.
Description
plot mccca
object.
Usage
## S3 method for class 'mccca'
plot(
x,
main = "MCCCA result",
catelabel = NULL,
classlabel = NULL,
classlabel.legend = NULL,
xlim = NULL,
ylim = NULL,
sort.clssize = TRUE,
break.size = NULL,
output.coord = FALSE,
connect.cord = TRUE,
include.variname = TRUE,
scale.gamma = TRUE,
scatter.level = 2,
plot.setting = list(alp.point = 0.3, alp.seg = 0.8, txtsize = 3, txtsize.legend = 10),
...
)
Arguments
x |
An object of class |
main |
A character giving the title of biplot. |
catelabel |
A characteristic vector of length Q giving labels for all categories to be displayed on the biplot (Q= |
classlabel |
A characteristic vector of length C (C:the number of class) giving labels for all classes to be displayed on the biplot. If |
classlabel.legend |
A characteristic vector of length C giving labels for all classes to be used on the legend (this can be longer). If |
xlim |
A numeric vector of length 2 giving the range of plot on the x (horizontal) axis. If NULL, the range is automatically determined. |
ylim |
A numeric vector of length 2 for the y (vertical) axis (same role as |
sort.clssize |
If |
break.size |
An integer vector that adjusts the size of bubble displayed on the legend. |
output.coord |
If |
connect.cord |
If |
include.variname |
If |
scale.gamma |
If |
scatter.level |
A numeric value that adjusts the scatter of points in the biplot. The higher the value, the more scattered the points are. The default is 2. |
plot.setting |
A list of biplot settings. See details. |
... |
Additional arguments passed to |
Details
Parameters in plot.setting
are as follows:
-alp.point
:A numeric value from 0 to 1 which adjusts the transparency of the bubble point. The default is 0.3.
-alp.seg
:A numeric value from 0 to 1 which adjusts the transparency of the segments between texts and points. The default is 0.8.
-txtsize
:A numeric value which adjusts the textsize on the biplot. The default is 3.
-txtsize.legend
:A numeric value which adjusts the textsize of the legend on the biplot. The default is 10.
Value
If output.coord
is TRUE
, returns a list with the following elements.
Cocls.mat |
A (Kx4) coordinate matrix of clusters, where the last two columns are the coordinates estimated by MCCCA, and the first two columns are the coordinates moved from the estimated coordinates to prevent overlap. |
Cocate.mat |
A (Kx4) coordinate matrix of categories (each column plays the same role as |
References
Takagishi & Michel van de Velden (2022): Visualizing Class Specific Heterogeneous Tendencies in Categorical Data, Journal of Computational and Graphical Statistics, DOI: 10.1080/10618600.2022.2035737
See Also
Examples
#setting
N <- 100 ; J <- 5 ; Ktrue <- 2 ; q.vec <- rep(5,J) ; noise.prop <- 0.2
extcate.vec=c(2,3)#the number of categories for each external variable
#generate categorical variable data
catedata.list <- generate.onedata(N=N,J=J,Ktrue=Ktrue,q.vec=q.vec,noise.prop = noise.prop)
data.cate=catedata.list$data.mat
clstr0.vec=catedata.list$clstr0.vec
#generate external variable data
data.ext=generate.ext(N,extcate.vec=extcate.vec)
#create mccca.list to be applied to MCCCA function
mccca.data=create.MCCCAdata(data.cate,ext.mat=data.ext,clstr0.vec =clstr0.vec)
#specify the number of cluster for each of C classes
C=length(mccca.data$data.list)
K.vec=rep(2,C)
#apply MCCCA
mccca.res=MCCCA(mccca.data,K.vec=K.vec)
#plot MCCCA result
plot(mccca.res)