## Use the example dataset
data(asmbPLSDA.example)
X.matrix = asmbPLSDA.example$X.matrix
Y.matrix.binary = asmbPLSDA.example$Y.matrix.binary
Y.matrix.multiclass = asmbPLSDA.example$Y.matrix.morethan2levels
X.dim = asmbPLSDA.example$X.dim
PLS.comp = asmbPLSDA.example$PLS.comp
quantile.comb = asmbPLSDA.example$quantile.comb
## asmbPLSDA fit for binary outcome
asmbPLSDA.fit.binary <- asmbPLSDA.fit(X.matrix = X.matrix,
Y.matrix = Y.matrix.binary,
PLS.comp = PLS.comp,
X.dim = X.dim,
quantile.comb = quantile.comb,
outcome.type = "binary")
## asmbPLSDA fit for categorical outcome with more than 2 levels
asmbPLSDA.fit.multiclass <- asmbPLSDA.fit(X.matrix = X.matrix,
Y.matrix = Y.matrix.multiclass,
PLS.comp = PLS.comp,
X.dim = X.dim,
quantile.comb = quantile.comb,
outcome.type = "multiclass")
## visualization with default block.name and group.name using the first PLS component
plotCor(asmbPLSDA.fit.binary, 1)
plotCor(asmbPLSDA.fit.multiclass, 1)
## custom block.name and group.name
plotCor(asmbPLSDA.fit.binary,
ncomp = 1,
block.name = c("mRNA", "protein"),
group.name = c("control", "case"))
plotCor(asmbPLSDA.fit.multiclass,
ncomp = 1,
block.name = c("mRNA", "protein"),
group.name = c("healthy", "mild", "severe"))
Run the code above in your browser using DataLab