R/choiceofK.R

Defines functions choiceofK

Documented in choiceofK

choiceofK <- function(AIC, BIC, RSS, K, filename) {
    Kmax <- length(AIC)
    pdf(filename, width = 13, height = 4)
    par(mfrow = c(1, 3))
    plot(K, RSS, type = "b", xlab = "Number of latent variables")
    plot(K, AIC, type = "b", xlab = "Number of latent variables")
    plot(K, BIC, type = "b", xlab = "Number of latent variables")
    dev.off()
}

Try the CODEX package in your browser

Any scripts or data that you put into this service are public.

CODEX documentation built on Nov. 8, 2020, 8:22 p.m.