ã«ã¸ã¥ã¢ã«ã«ã³ã¬ãã³ã使ã
ã³ã¬ã¹ãã³ãã³ã¹åæã¯ã¯ãã¹éè¨ã®å¯è¦åã«ä¾¿å©ã§ããã
æ£å¸å³ãããã«ã¸ã¥ã¢ã«ã«ä½¿ããããã«ãªã£ã¦ããã¨è¯ãã¨ã®è©±ãèããã®ã§ãæ§å¹´ä»£å¥ã«ã³ã¬ã¹ãã³ãã³ã¹åæãè¡ãããããããé¢æ°ãæ¸ããã
ææããªã®ã§ãã¼ã¿ã§sexã«æ§å¥ãage10ã«10æ³å»ã¿ã®å¹´ä»£ãå
¥ã£ã¦ããåæã§æ¸ãã¦ãããã¨ã«æ³¨æã
dataã¯ãã¼ã¿å
¨ä½ãqnameãã³ã¬ãã³ã®å¯¾è±¡ã¨ãããååï¼ä¾ãã°"Q1"ã¨ãï¼ãæãã
cav <- function(data, qname){ require(ca) ds <- data.frame(data$sex, data$age10, data[, qname]) name <- colnames(data[qname]) colnames(ds) <- c("sex", "age10", name) res <- mjca(ds, lambda="Burt", ps="_") resn <- length(unique(ds$sex)) + length(unique(ds$age10)) print(res$Burt[1:resn, -(1:resn)]) plot(res, what = c("none", "all"), arrows = c(FALSE, TRUE), main=name) }