Commit 3ae4ee82 by Eric Coissac

rename parameter p.adjust.method p_adjust_method

parent 6de2ec12
...@@ -56,8 +56,8 @@ NULL ...@@ -56,8 +56,8 @@ NULL
#' @param permutations a list of control values for the permutations as returned #' @param permutations a list of control values for the permutations as returned
#' by the function \code{\link[permute]{how}}, or the number of #' by the function \code{\link[permute]{how}}, or the number of
#' permutations required. #' permutations required.
#' @param p.adjust.method the multiple test correction method used #' @param p_adjust_method the multiple test correction method used
#' to adjust p values. \code{p.adjust.method} #' to adjust p values. \code{p_adjust_method}
#' belongs one of the folowing values: \code{"holm"}, #' belongs one of the folowing values: \code{"holm"},
#' \code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"}, #' \code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"},
#' \code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}. #' \code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}.
...@@ -74,7 +74,7 @@ NULL ...@@ -74,7 +74,7 @@ NULL
#' @export #' @export
corls_test <- function(..., corls_test <- function(...,
permutations = permute::how(nperm = 999), permutations = permute::how(nperm = 999),
p.adjust.method="holm") { p_adjust_method="holm") {
eps <- sqrt(sqrt(.Machine$double.eps)) eps <- sqrt(sqrt(.Machine$double.eps))
xs <- list(...) xs <- list(...)
...@@ -133,7 +133,7 @@ corls_test <- function(..., ...@@ -133,7 +133,7 @@ corls_test <- function(...,
diag(p_values) <- 0 diag(p_values) <- 0
c_p_values <- p.adjust(p_values[upper.tri(p_values,diag = FALSE)], c_p_values <- p.adjust(p_values[upper.tri(p_values,diag = FALSE)],
method = p.adjust.method, method = p_adjust_method,
n = (nx - 1) * nx / 2) n = (nx - 1) * nx / 2)
p_values[upper.tri(p_values,diag = FALSE)] <- c_p_values p_values[upper.tri(p_values,diag = FALSE)] <- c_p_values
......
...@@ -95,8 +95,8 @@ registerDoParallel(1) ...@@ -95,8 +95,8 @@ registerDoParallel(1)
#' If rand is \code{NULL} or equal to \code{0}, no correction #' If rand is \code{NULL} or equal to \code{0}, no correction
#' is estimated and the raw procrustean covariances are #' is estimated and the raw procrustean covariances are
#' estimated. #' estimated.
#' @param p.adjust.method the multiple test correction method used #' @param p_adjust_method the multiple test correction method used
#' to adjust p values. \code{p.adjust.method} #' to adjust p values. \code{p_adjust_method}
#' belongsone of the folowing values: \code{"holm"}, #' belongsone of the folowing values: \code{"holm"},
#' \code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"}, #' \code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"},
#' \code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}. #' \code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}.
...@@ -121,7 +121,7 @@ registerDoParallel(1) ...@@ -121,7 +121,7 @@ registerDoParallel(1)
#' of the p.values of tests checking that the observed #' of the p.values of tests checking that the observed
#' covariance is larger than the mean of the random covariance. #' covariance is larger than the mean of the random covariance.
#' p.values are corrected for multiple tests according to the #' p.values are corrected for multiple tests according to the
#' method specified by the \code{p.adjust.method} parameter. #' method specified by the \code{p_adjust_method} parameter.
#' #'
#' @examples #' @examples
#' # Build Three matrices of 3 rows. #' # Build Three matrices of 3 rows.
...@@ -147,7 +147,7 @@ registerDoParallel(1) ...@@ -147,7 +147,7 @@ registerDoParallel(1)
#' @export #' @export
varls <- function(..., varls <- function(...,
nrand = 100, nrand = 100,
p.adjust.method = "holm") { p_adjust_method = "holm") {
if (!is.null(nrand) && length(nrand) > 1) { if (!is.null(nrand) && length(nrand) > 1) {
stop("nrand must be a single numeric value or the NULL value") stop("nrand must be a single numeric value or the NULL value")
} }
...@@ -240,7 +240,7 @@ varls <- function(..., ...@@ -240,7 +240,7 @@ varls <- function(...,
p_values <- n_r_greater / nrand p_values <- n_r_greater / nrand
c_p_values <- p.adjust(p_values[upper.tri(p_values, diag = FALSE)], c_p_values <- p.adjust(p_values[upper.tri(p_values, diag = FALSE)],
method = p.adjust.method method = p_adjust_method
) )
p_values[upper.tri(p_values, diag = FALSE)] <- c_p_values p_values[upper.tri(p_values, diag = FALSE)] <- c_p_values
...@@ -264,10 +264,10 @@ varls <- function(..., ...@@ -264,10 +264,10 @@ varls <- function(...,
#' @rdname varls #' @rdname varls
#' @export #' @export
corls <- function(..., nrand = 100, corls <- function(..., nrand = 100,
p.adjust.method = "holm") { p_adjust_method = "holm") {
cov <- varls(..., cov <- varls(...,
nrand = nrand, nrand = nrand,
p.adjust.method = p.adjust.method p_adjust_method = p_adjust_method
) )
s <- sqrt(diag(cov)) s <- sqrt(diag(cov))
vv <- s %o% s vv <- s %o% s
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\title{Monte-Carlo Test on the sum of the singular values of a procustean rotation.} \title{Monte-Carlo Test on the sum of the singular values of a procustean rotation.}
\usage{ \usage{
corls_test(..., permutations = permute::how(nperm = 999), corls_test(..., permutations = permute::how(nperm = 999),
p.adjust.method = "holm") p_adjust_method = "holm")
} }
\arguments{ \arguments{
\item{...}{the set of matrices or a \code{\link[ProcMod]{procmod_frame}} \item{...}{the set of matrices or a \code{\link[ProcMod]{procmod_frame}}
...@@ -15,8 +15,8 @@ object.} ...@@ -15,8 +15,8 @@ object.}
by the function \code{\link[permute]{how}}, or the number of by the function \code{\link[permute]{how}}, or the number of
permutations required.} permutations required.}
\item{p.adjust.method}{the multiple test correction method used \item{p_adjust_method}{the multiple test correction method used
to adjust p values. \code{p.adjust.method} to adjust p values. \code{p_adjust_method}
belongs one of the folowing values: \code{"holm"}, belongs one of the folowing values: \code{"holm"},
\code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"}, \code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"},
\code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}. \code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}.
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
\alias{corls_partial} \alias{corls_partial}
\title{Procrustean Correlation, and Variance / Covariance Matrices.} \title{Procrustean Correlation, and Variance / Covariance Matrices.}
\usage{ \usage{
varls(..., nrand = 100, p.adjust.method = "holm") varls(..., nrand = 100, p_adjust_method = "holm")
corls(..., nrand = 100, p.adjust.method = "holm") corls(..., nrand = 100, p_adjust_method = "holm")
corls_partial(..., nrand = 100) corls_partial(..., nrand = 100)
} }
...@@ -22,8 +22,8 @@ If rand is \code{NULL} or equal to \code{0}, no correction ...@@ -22,8 +22,8 @@ If rand is \code{NULL} or equal to \code{0}, no correction
is estimated and the raw procrustean covariances are is estimated and the raw procrustean covariances are
estimated.} estimated.}
\item{p.adjust.method}{the multiple test correction method used \item{p_adjust_method}{the multiple test correction method used
to adjust p values. \code{p.adjust.method} to adjust p values. \code{p_adjust_method}
belongsone of the folowing values: \code{"holm"}, belongsone of the folowing values: \code{"holm"},
\code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"}, \code{"hochberg"}, \code{"hommel"}, \code{"bonferroni"},
\code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}. \code{"BH"}, \code{"BY"}, \code{"fdr"}, \code{"none"}.
...@@ -49,7 +49,7 @@ a \code{procmod_varls} object which corresponds to a numeric ...@@ -49,7 +49,7 @@ a \code{procmod_varls} object which corresponds to a numeric
of the p.values of tests checking that the observed of the p.values of tests checking that the observed
covariance is larger than the mean of the random covariance. covariance is larger than the mean of the random covariance.
p.values are corrected for multiple tests according to the p.values are corrected for multiple tests according to the
method specified by the \code{p.adjust.method} parameter. method specified by the \code{p_adjust_method} parameter.
} }
\description{ \description{
\code{varls}, \code{corls}, \code{corls_partial} compute the procrustean \code{varls}, \code{corls}, \code{corls_partial} compute the procrustean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment