Skip to content

Commit

Permalink
now returns p-values
Browse files Browse the repository at this point in the history
  • Loading branch information
vbonhomme committed Sep 28, 2017
1 parent 4b0099b commit eb600d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions R/mult-Manova.R
Expand Up @@ -316,21 +316,23 @@ MANOVA_PW.PCA <- function(x,
stars <- as.character(stars)
nl <- nlevels(fac)
# bloody ugly
stars.tab <- matrix(NA, nrow = nl - 1, ncol = nl,
pvalue.tab <- stars.tab <- matrix(NA, nrow = nl - 1, ncol = nl,
dimnames = list(levels(fac)[-nl], levels(fac)))
stars.tab <- as.table(stars.tab)
k <- 1
for (i in 1:(nl - 1)) {
for (j in (i + 1):nl) {
stars.tab[i, j] <- stars[k]
pvalue.tab[i, j] <- res[, 6][k]
k <- k + 1
}
}
cat("$stars.tab\n")
print(stars.tab)
cat("\n$summary (see also $manovas)\n")
print(res, digits=4)
invisible(list(manovas = manovas, summary = res, stars.tab = stars.tab))
invisible(list(manovas = manovas, summary = res,
stars.tab = stars.tab, pvalue.tab = pvalue.tab))
}

# #' @rdname MANOVA_PW
Expand Down
2 changes: 1 addition & 1 deletion man/MANOVA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/MANOVA_PW.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eb600d0

Please sign in to comment.