plot.SMI | R Documentation |
Plotting, printing and summary functions for SMI, plus significance testing.
## S3 method for class 'SMI' plot( x, y = NULL, x1lab = attr(x, "mat.names")[[1]], x2lab = attr(x, "mat.names")[[2]], main = "SMI", signif = 0.05, xlim = c(-(pq[1] + 1)/2, (pq[2] + 1)/2), ylim = c(0.5, (sum(pq) + 3)/2), B = 10000, cex = 1, cex.sym = 1, frame = NULL, frame.col = "red", frame.lwd = 2, replicates = NULL, ... ) ## S3 method for class 'SMI' print(x, ...) ## S3 method for class 'SMI' summary(object, ...) is.signif(x, signif = 0.05, B = 10000, ...)
x |
object of class |
y |
not used. |
x1lab |
optional label for first matrix. |
x2lab |
optional label for second matrix. |
main |
optional heading (default = SMI). |
signif |
significance level for testing (default=0.05). |
xlim |
optional plotting limits. |
ylim |
optional plotting limits. |
B |
number of permutations (for significant, default=10000). |
cex |
optional text scaling (default = 1) |
cex.sym |
optional scaling for significance symbols (default = 1) |
frame |
two element integer vector indicating framed components. |
frame.col |
color for framed components. |
frame.lwd |
line width for framed components. |
replicates |
vector of replicates for significance testing. |
... |
additional arguments for |
object |
object of class |
For plotting a diamonad plot is used. High SMI values are light and low SMI values are dark. If orthogonal projections have been used for calculating SMIs, significance symbols are included in the plot unless signif=NULL.
plot
silently returns NULL. print
and summary
return the printed matrix.
Kristian Hovde Liland
Similarity of Matrices Index - Ulf G. Indahl, Tormod Næs, Kristian Hovde Liland
SMI
, PCAcv (cross-validated PCA)
.
X1 <- scale( matrix( rnorm(100*300), 100,300), scale = FALSE) usv <- svd(X1) X2 <- usv$u[,-3] %*% diag(usv$d[-3]) %*% t(usv$v[,-3]) smi <- SMI(X1,X2,5,5) plot(smi, B = 1000) # default B = 10000 print(smi) summary(smi) is.signif(smi, B = 1000) # default B = 10000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.