
Last chance! 50% off unlimited learning
Sale ends in
Plotting, printing and summary functions for SMI, plus significance testing.
# S3 method for 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 SMI
print(x, ...)
# S3 method for SMI
summary(object, ...)
is.signif(x, signif = 0.05, B = 10000, ...)
object of class SMI
.
not used.
optional label for first matrix.
optional label for second matrix.
optional heading (default = SMI).
significance level for testing (default=0.05).
optional plotting limits.
optional plotting limits.
number of permutations (for significant, default=10000).
optional text scaling (default = 1)
optional scaling for significance symbols (default = 1)
two element integer vector indicating framed components.
color for framed components.
line width for framed components.
vector of replicates for significance testing.
additional arguments for plot
.
object of class SMI
.
plot
silently returns NULL. print
and summary
return the printed matrix.
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.
Similarity of Matrices Index - Ulf G. Indahl, Tormod N<U+00E6>s, Kristian Hovde Liland
# NOT RUN {
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
# }
Run the code above in your browser using DataLab