# NOT RUN {
# Load a list with 3 data sets
library(iSFun)
data("simData.cca")
x <- simData.cca$x
y <- simData.cca$y
L <- length(x)
mu1 <- mu3 <- 0.4
mu2 <- mu4 <- 2.5
prev_cca <- preview.cca(x = x, y = y, L = L, scale.x = TRUE, scale.y = TRUE)
res_homo_m <- iscca(x = x, y = y, L = L, mu1 = mu1, mu2 = mu2, mu3 = mu3, mu4 = mu4,
eps = 5e-2, maxstep = 50, submaxstep = 10, trace = TRUE, draw = TRUE)
# }
# NOT RUN {
res_homo_s <- iscca(x = x, y = y, L = L, mu1 = mu1, mu2 = mu2, mu3 = mu3, mu4 = mu4,
eps = 5e-2, pen1 = "homogeneity", pen2 = "sign", scale.x = TRUE,
scale.y = TRUE, maxstep = 50, submaxstep = 10, trace = FALSE, draw = FALSE)
mu1 <- mu3 <- 0.3
mu2 <- mu4 <- 2
res_hete_m <- iscca(x = x, y = y, L = L, mu1 = mu1, mu2 = mu2, mu3 = mu3, mu4 = mu4,
eps = 5e-2, pen1 = "heterogeneity", pen2 = "magnitude", scale.x = TRUE,
scale.y = TRUE, maxstep = 50, submaxstep = 10, trace = FALSE, draw = FALSE)
res_hete_s <- iscca(x = x, y = y, L = L, mu1 = mu1, mu2 = mu2, mu3 = mu3, mu4 = mu4,
eps = 5e-2, pen1 = "heterogeneity", pen2 = "sign", scale.x = TRUE,
scale.y = TRUE, maxstep = 50, submaxstep = 10, trace = FALSE, draw = FALSE)
# }
Run the code above in your browser using DataLab