Description Usage Arguments Author(s) Examples
concordance analysis
1 2 3 4 5 | concord(x, y, ncomp = 2, dmod = 1, center.x = TRUE, scale.x = FALSE,
center.y = TRUE, scale.y = FALSE, option = "uniform", kx = "all",
ky = "all", wx = 1, wy = 1, pos = FALSE, verbose = TRUE,
init = c("svd", "average")[2], maxiter = 1000, ncores = 1, fold = 5,
nstart = 1, seed = NULL, loorss = FALSE, scan = TRUE, nsd = 1)
|
x |
a list of predictive matrices. The columns are observations, rows are varaibles. The columns (observations) has to be matched. |
y |
a response matrix. Rows are variables, columns are observations. The columns should be matched with columns in x. |
ncomp |
the number of components want to retain |
dmod |
the deflation mode, dmod = 2 is the original publication of |
center.x |
logical values, whether the variables in x should be centered |
scale.x |
logical values, whether the variables in x should be scaled |
center.y |
logical values, whether the variables in y should be centered |
scale.y |
logical values, whether the variables in y should be scaled |
option |
the option for normalizing matrix |
kx |
the number (if it is an integer > 1) or the proportion (if 0 < ky < 1) of kept variables in x. It should be a numeric value. |
ky |
the number (if it is an integer > 1) or the proportion (if 0 < ky < 1) of kept variables in y. It should be a numeric value. |
wx |
weight for the rows of x |
wy |
weight for the rows of y |
pos |
logical value, whether only non-negative loadings retained |
verbose |
if the process of calculation should be printed |
init |
how to initialize the algorithm. if no sparsity, svd is fast. |
maxiter |
maximum number of iterations allowed |
ncores |
number of cores to be used, passed to |
fold |
the number of fold to be used in cross-validation, only used if kx or ky is a vector |
nstart |
how many time the k-fold cross validation should be done |
seed |
set seed for random number generation |
loorss |
if the Leave-one-out procedure should be used in matrix reconstruction |
scan |
If the PRESS plot should be shown and used to determine the optimal k in CV |
nsd |
the the n*sd for selecting k automatically |
Chen Meng
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(omic3plus)
data("NCI60_4arrays")
y <- as.matrix(NCI60_4arrays$agilent)
x <- lapply(NCI60_4arrays[2:4], as.matrix)
# no sparsity
con1 <- concord(x, y, ncomp = 3)
# sparsity on rows of x, select 10% genes
con <- concord(x, y, ncomp = 3, kx = 0.1)
# sparsity on rows of both x and y, select 10% genes
con <- concord(x, y, ncomp = 3, kx = 0.1, ky = 0.1, option = "nk")
plot(con$score.x[, 1], con$score.y[, 1])
abline(a = 0, b = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.