if (rlang::is_installed("pls")) {
dists <- list(
rlnorm = list(meanlog = log(40), sdlog = 0.5),
rlnorm = list(meanlog = log(60), sdlog = 0.35)
)
mv <- mvSim(
dists = dists, n_samples = 100, counts = 1000,
min_bin = 1, max_bin = 180, wide = TRUE
)
sv <- growthSim("logistic",
n = 5, t = 20,
params = list("A" = c(200, 160), "B" = c(13, 11), "C" = c(3, 3.5))
)
d <- cbind(sv, mv[, -1])
x <- pcv.plsr(df = d, resps = "y", spectra = grepl("^sim_", colnames(d)))
plotVIP(x)
}
Run the code above in your browser using DataLab