diff --git a/R/simulate.R b/R/simulate.R index 4bac8fc..158668b 100644 --- a/R/simulate.R +++ b/R/simulate.R @@ -11,7 +11,7 @@ #' @param n an \code{int} value indicating the number of observations. #' @param p an \code{int} value indicating the number of dimensions (variables) #' simulated -#' @param equal.var a \code{logical} value indicating if the dimensions must be scaled +#' @param equal_var a \code{logical} value indicating if the dimensions must be scaled #' to force \code{sd=1}. \code{TRUE} by default. #' #' @return a numeric matrix of \code{n} rows and \code{p} columns @@ -24,11 +24,11 @@ #' @author Eric Coissac #' @author Christelle Gonindard-Melodelima #' @export -simulate_matrix <- function(n, p, equal.var = TRUE) { +simulate_matrix <- function(n, p, equal_var = TRUE) { new <- rnorm(n * p, mean = 0, sd = 1) dim(new) <- c(n, p) - new <- scale(new, center = TRUE, scale = equal.var) + new <- scale(new, center = TRUE, scale = equal_var) attributes(new)$scaled:center <- NULL attributes(new)$scaled:scale <- NULL @@ -57,7 +57,7 @@ simulate_matrix <- function(n, p, equal.var = TRUE) { #' simulated #' @param r2 the fraction of variation shared between the \code{reference} and the #' simulated data -#' @param equal.var a \code{logical} value indicating if the dimensions must be scaled +#' @param equal_var a \code{logical} value indicating if the dimensions must be scaled #' to force \code{sd=1}. \code{TRUE} by default. #' #' @return a numeric matrix of \code{nrow(reference)} rows and \code{p} columns @@ -73,11 +73,11 @@ simulate_matrix <- function(n, p, equal.var = TRUE) { #' @author Christelle Gonindard-Melodelima #' @export -simulate_correlation <- function(reference, p, r2, equal.var = TRUE) { +simulate_correlation <- function(reference, p, r2, equal_var = TRUE) { n <- nrow(reference) maxdim <- max(ncol(reference), p) - noise <- simulate_matrix(n, p, equal.var = equal.var) + noise <- simulate_matrix(n, p, equal_var = equal_var) if (maxdim == p && maxdim > ncol(reference)) { # noise is the largest matrix diff --git a/man/simulate_correlation.Rd b/man/simulate_correlation.Rd index 98f0283..4422644 100644 --- a/man/simulate_correlation.Rd +++ b/man/simulate_correlation.Rd @@ -4,7 +4,7 @@ \alias{simulate_correlation} \title{Simulate n points of dimension p correlated with a reference matrix.} \usage{ -simulate_correlation(reference, p, r2, equal.var = TRUE) +simulate_correlation(reference, p, r2, equal_var = TRUE) } \arguments{ \item{reference}{a numeric matrix to which the simulated data will be correlated} @@ -15,7 +15,7 @@ simulated} \item{r2}{the fraction of variation shared between the \code{reference} and the simulated data} -\item{equal.var}{a \code{logical} value indicating if the dimensions must be scaled +\item{equal_var}{a \code{logical} value indicating if the dimensions must be scaled to force \code{sd=1}. \code{TRUE} by default.} } \value{ diff --git a/man/simulate_matrix.Rd b/man/simulate_matrix.Rd index 5474f0a..566ad03 100644 --- a/man/simulate_matrix.Rd +++ b/man/simulate_matrix.Rd @@ -4,7 +4,7 @@ \alias{simulate_matrix} \title{Simulate n points of dimension p.} \usage{ -simulate_matrix(n, p, equal.var = TRUE) +simulate_matrix(n, p, equal_var = TRUE) } \arguments{ \item{n}{an \code{int} value indicating the number of observations.} @@ -12,7 +12,7 @@ simulate_matrix(n, p, equal.var = TRUE) \item{p}{an \code{int} value indicating the number of dimensions (variables) simulated} -\item{equal.var}{a \code{logical} value indicating if the dimensions must be scaled +\item{equal_var}{a \code{logical} value indicating if the dimensions must be scaled to force \code{sd=1}. \code{TRUE} by default.} } \value{ diff --git a/manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.RData b/manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.RData deleted file mode 100644 index fc7ed6d..0000000 Binary files a/manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.RData and /dev/null differ diff --git a/manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.RData b/manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.RData new file mode 100644 index 0000000..4085c0f Binary files /dev/null and b/manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.RData differ diff --git a/manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.rdb b/manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.rdb similarity index 100% rename from manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.rdb rename to manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.rdb diff --git a/manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.rdx b/manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.rdx similarity index 100% rename from manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.rdx rename to manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.rdx Binary files a/manuscript/cache/H1_overfit_7d6a8556420a51b82ddb46870895fff0.rdx and b/manuscript/cache/H1_overfit_8bf3a338463207d8490bb2c51fb5f598.rdx differ diff --git a/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.RData b/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.RData new file mode 100644 index 0000000..1562dcf Binary files /dev/null and b/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.RData differ diff --git a/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.rdb b/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.rdb new file mode 100644 index 0000000..bcd1a59 Binary files /dev/null and b/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.rdb differ diff --git a/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.rdx b/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.rdx new file mode 100644 index 0000000..572a0b4 Binary files /dev/null and b/manuscript/cache/Null_hypothesis_3c31a76292a5328ca8de92b3e74a849a.rdx differ diff --git a/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.RData b/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.RData deleted file mode 100644 index d04e206..0000000 Binary files a/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.RData and /dev/null differ diff --git a/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.rdb b/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.rdb deleted file mode 100644 index 904d82e..0000000 Binary files a/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.rdb and /dev/null differ diff --git a/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.rdx b/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.rdx deleted file mode 100644 index 8e2959f..0000000 Binary files a/manuscript/cache/Null_hypothesis_8193ade72a000bafd65fd5861117c1fd.rdx and /dev/null differ diff --git a/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.RData b/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.RData new file mode 100644 index 0000000..f13b2ab Binary files /dev/null and b/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.RData differ diff --git a/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.rdb b/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.rdb new file mode 100644 index 0000000..c18e2b9 Binary files /dev/null and b/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.rdb differ diff --git a/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.rdx b/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.rdx similarity index 50% rename from manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.rdx rename to manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.rdx index 894ab7a..3f899d4 100644 Binary files a/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.rdx and b/manuscript/cache/estimate_alpha_378e4b0948dd41e1dfcdef2c71fd41ac.rdx differ diff --git a/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.RData b/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.RData deleted file mode 100644 index 35a4eeb..0000000 Binary files a/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.RData and /dev/null differ diff --git a/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.rdb b/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.rdb deleted file mode 100644 index f0ab36e..0000000 Binary files a/manuscript/cache/estimate_alpha_39dae34029ad8413dab6225afaa60183.rdb and /dev/null differ diff --git a/manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.RData b/manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.RData new file mode 100644 index 0000000..b6db3a3 Binary files /dev/null and b/manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.RData differ diff --git a/manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.rdb b/manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.rdb similarity index 100% rename from manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.rdb rename to manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.rdb Binary files a/manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.rdb and b/manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.rdb differ diff --git a/manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.rdx b/manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.rdx similarity index 100% rename from manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.rdx rename to manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.rdx Binary files a/manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.rdx and b/manuscript/cache/estimate_partial_r2_85858bd9a883ec72c0a5b233ea998889.rdx differ diff --git a/manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.RData b/manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.RData deleted file mode 100644 index c1b313d..0000000 Binary files a/manuscript/cache/estimate_partial_r2_dac323509d3f5b255fc689f0596d2870.RData and /dev/null differ diff --git a/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.RData b/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.RData deleted file mode 100644 index 4593d63..0000000 Binary files a/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.RData and /dev/null differ diff --git a/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.rdx b/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.rdx deleted file mode 100644 index fc19e16..0000000 Binary files a/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.rdx and /dev/null differ diff --git a/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.RData b/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.RData new file mode 100644 index 0000000..e3fc622 Binary files /dev/null and b/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.RData differ diff --git a/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.rdb b/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.rdb similarity index 76% rename from manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.rdb rename to manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.rdb index 6e09ce1..cd9ce60 100644 Binary files a/manuscript/cache/estimate_power_4d7efadf419ddbcbda354078af2cc11e.rdb and b/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.rdb differ diff --git a/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.rdx b/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.rdx new file mode 100644 index 0000000..93b4d8b Binary files /dev/null and b/manuscript/cache/estimate_power_52537f634e5ff2d14f32fa06264f9e25.rdx differ diff --git a/manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.RData b/manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.RData deleted file mode 100644 index d26cefe..0000000 Binary files a/manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.RData and /dev/null differ diff --git a/manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.RData b/manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.RData new file mode 100644 index 0000000..43a13a8 Binary files /dev/null and b/manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.RData differ diff --git a/manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.rdb b/manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.rdb similarity index 100% rename from manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.rdb rename to manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.rdb Binary files a/manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.rdb and b/manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.rdb differ diff --git a/manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.rdx b/manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.rdx similarity index 100% rename from manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.rdx rename to manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.rdx Binary files a/manuscript/cache/estimate_r2_802e44482fcb528ceb9afbbfb8ad240e.rdx and b/manuscript/cache/estimate_r2_c28fcd8d6b3f064eb8b88f6d57d37dac.rdx differ diff --git a/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.rdb b/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.rdb deleted file mode 100644 index 8eb6d7a..0000000 Binary files a/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.rdb and /dev/null differ diff --git a/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.rdx b/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.rdx deleted file mode 100644 index d988409..0000000 Binary files a/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.rdx and /dev/null differ diff --git a/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.RData b/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.RData similarity index 93% rename from manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.RData rename to manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.RData index dd280f7..e23b423 100644 Binary files a/manuscript/cache/estimate_r2_vector_e29b03181b4d330873d35200202b976b.RData and b/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.RData differ diff --git a/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.rdb b/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.rdb new file mode 100644 index 0000000..03b6ca5 Binary files /dev/null and b/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.rdb differ diff --git a/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.rdx b/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.rdx new file mode 100644 index 0000000..cc74e24 Binary files /dev/null and b/manuscript/cache/estimate_r2_vector_f9d3429507f0382818741e194386a99d.rdx differ diff --git a/manuscript/figure/fig__r2-1.pdf b/manuscript/figure/fig__r2-1.pdf index 23915d6..e8ece96 100644 Binary files a/manuscript/figure/fig__r2-1.pdf and b/manuscript/figure/fig__r2-1.pdf differ diff --git a/manuscript/figure/fig__r2_vec-1.pdf b/manuscript/figure/fig__r2_vec-1.pdf index 6aa0ea4..7c4a54f 100644 Binary files a/manuscript/figure/fig__r2_vec-1.pdf and b/manuscript/figure/fig__r2_vec-1.pdf differ diff --git a/manuscript/figure/fig_h0-1.pdf b/manuscript/figure/fig_h0-1.pdf index 482841c..4117b36 100644 Binary files a/manuscript/figure/fig_h0-1.pdf and b/manuscript/figure/fig_h0-1.pdf differ diff --git a/manuscript/figure/fig_h0_11-1.pdf b/manuscript/figure/fig_h0_11-1.pdf index 6dd1c76..9f5fe1d 100644 Binary files a/manuscript/figure/fig_h0_11-1.pdf and b/manuscript/figure/fig_h0_11-1.pdf differ diff --git a/manuscript/figure/fig_nested_shared-1.pdf b/manuscript/figure/fig_nested_shared-1.pdf index 449f90d..57dd6e7 100644 Binary files a/manuscript/figure/fig_nested_shared-1.pdf and b/manuscript/figure/fig_nested_shared-1.pdf differ diff --git a/manuscript/figure/fig_nested_shared_variation-1.pdf b/manuscript/figure/fig_nested_shared_variation-1.pdf index e56fcab..ffda4f4 100644 Binary files a/manuscript/figure/fig_nested_shared_variation-1.pdf and b/manuscript/figure/fig_nested_shared_variation-1.pdf differ diff --git a/manuscript/main.Rnw b/manuscript/main.Rnw index d5ff050..4e493ec 100755 --- a/manuscript/main.Rnw +++ b/manuscript/main.Rnw @@ -301,8 +301,8 @@ h0_sims = array(0,dim = c(n_sim,length(p_qs),8)) for (k in seq_len(n_sim)) for (i in seq_along(p_qs)) { - X <- simulate_matrix(n_indivdual,p_qs[i],equal.var = TRUE) - Y <- simulate_matrix(n_indivdual,p_qs[i],equal.var = TRUE) + X <- simulate_matrix(n_indivdual,p_qs[i],equal_var = TRUE) + Y <- simulate_matrix(n_indivdual,p_qs[i],equal_var = TRUE) h0_sims[k,i,1] <- ProcMod::corls(X,Y,nrand = 0)[1,2] h0_sims[k,i,2] <- ProcMod::corls(X,Y,nrand = n_rand)[1,2] @@ -396,7 +396,7 @@ initial_var <- 3 n_indivdual <- 20 supplement_vars <- 0:50 -X = simulate_matrix(n = n_indivdual,p = initial_var,equal.var = TRUE) +X = simulate_matrix(n = n_indivdual,p = initial_var,equal_var = TRUE) Y = simulate_correlation(reference = X, p = initial_var, r2 = 0.4) h1_sims_over = array(0,dim = c(length(supplement_vars),8)) @@ -462,11 +462,11 @@ if (compute) { for (r in seq_along(r2s)) { X <- simulate_matrix(n_indivduals[i], p_qs[j], - equal.var = TRUE) + equal_var = TRUE) Y <- simulate_correlation(X, p_qs[j], r2 = r2s[r], - equal.var = TRUE) + equal_var = TRUE) r2_sims[k,i,j,r,1] <- corls(X,Y,nrand = n_rand)[1,2] r2_sims[k,i,j,r,2] <- corls(X,Y,nrand = 0)[1,2] @@ -566,11 +566,11 @@ for (k in seq_len(n_sim)) { for (r in seq_along(r2s)) { X <- simulate_matrix(n_indivduals[i], 1, - equal.var = TRUE) + equal_var = TRUE) Y <- simulate_correlation(X, 1, r2 = r2s[r], - equal.var = TRUE) + equal_var = TRUE) r2_sims_vec[k,i,r,1] <- corls(X,Y,nrand = n_rand)[1,2]^2 r2_sims_vec[k,i,r,2] <- corls(X,Y,nrand = 0)[1,2]^2 @@ -691,22 +691,22 @@ if (compute) { } else { A <- simulate_matrix(n_indivdual, p_q, - equal.var = TRUE) + equal_var = TRUE) B <- simulate_correlation(A, p_q, r2 = r2_AB, - equal.var = TRUE) + equal_var = TRUE) C <- simulate_correlation(B, p_q, r2 = r2_BC, - equal.var = TRUE) + equal_var = TRUE) D <- simulate_correlation(C, p_q, r2 = r2_CD, - equal.var = TRUE) + equal_var = TRUE) partial.data = procmod_frame(A=A,B=B,C=C,D=D) partial_r2_sims[k, , ,1] <- corls_partial(partial.data,nrand = n_rand) @@ -799,8 +799,8 @@ h0_alpha = array(0,dim = c(n_sim,length(p_qs),3)) for (k in seq_len(n_sim)) for (i in seq_along(p_qs)) { - X <- simulate_matrix(n_indivdual,p_qs[i],equal.var = TRUE) - Y <- simulate_matrix(n_indivdual,p_qs[i],equal.var = TRUE) + X <- simulate_matrix(n_indivdual,p_qs[i],equal_var = TRUE) + Y <- simulate_matrix(n_indivdual,p_qs[i],equal_var = TRUE) h0_alpha[k,i,1] <- attr(corls(X,Y,nrand = n_rand),"p.value")[1,2] h0_alpha[k,i,2] <- vegan::protest(X,Y,permutations = n_rand)$signif @@ -865,11 +865,11 @@ if (compute) { for (r in seq_along(r2s)) { X <- simulate_matrix(n_indivduals[i], p_qs[j], - equal.var = TRUE) + equal_var = TRUE) Y <- simulate_correlation(X, p_qs[j], r2 = r2s[r], - equal.var = TRUE) + equal_var = TRUE) h1_sims[k,i,j,r,1] <- attr(corls(X,Y,nrand = n_rand),"p.value")[1,2] h1_sims[k,i,j,r,2] <- suppressWarnings(vegan::protest(X,Y,permutations = n_rand)$signif) diff --git a/manuscript/main.pdf b/manuscript/main.pdf index 4f9d731..6b21e63 100644 Binary files a/manuscript/main.pdf and b/manuscript/main.pdf differ diff --git a/manuscript/main.tex b/manuscript/main.tex index f73971a..d83090d 100644 --- a/manuscript/main.tex +++ b/manuscript/main.tex @@ -373,7 +373,7 @@ To evaluate relative the power of the three considered tests, pairs of to random \begin{table}[!t] \processtable{Estimation of $\overline{\rcovls(\X,\Y)}$ according to the number of random matrices (k) aligned.\label{tab:mrcovls}}{ % latex table generated in R 3.5.2 by xtable 1.8-4 package -% Tue Oct 1 15:28:19 2019 +% Tue Oct 1 18:48:35 2019 \begin{tabular}{rrrrrrr} \hline & & \multicolumn{2}{c}{normal} & & \multicolumn{2}{c}{exponential}\\ \cline{3-4} \cline{6-7}p & k &\multicolumn{1}{c}{mean} & \multicolumn{1}{c}{sd} & \multicolumn{1}{c}{ } &\multicolumn{1}{c}{mean} & \multicolumn{1}{c}{sd}\\\hline\multirow{3}{*}{10} & 10 & 0.5746 & $1.3687 \times 10^{-2}$ & & 0.5705 & $1.1714 \times 10^{-2}$ \\ @@ -475,7 +475,7 @@ whatever the $p$ tested (Table~\ref{tab:alpha_pvalue}). This ensure that the pro of the distribution of $P_{values}$ correlation test to $\mathcal{U}(0,1)$ under the null hypothesis.\label{tab:alpha_pvalue}} { % latex table generated in R 3.5.2 by xtable 1.8-4 package -% Tue Oct 1 15:28:22 2019 +% Tue Oct 1 18:48:38 2019 \begin{tabular*}{0.98\linewidth}{@{\extracolsep{\fill}}crrr} \hline & \multicolumn{3}{c}{Cramer-Von Mises p.value} \\ @@ -497,7 +497,7 @@ Power of the $CovLs$ test based on the estimation of $\overline{RCovLs(X,Y)}$ is \begin{table}[!t] \processtable{Power estimation of the procruste tests for two low level of shared variations $5\%$ and $10\%$.\label{tab:power}} { % latex table generated in R 3.5.2 by xtable 1.8-4 package -% Tue Oct 1 15:28:22 2019 +% Tue Oct 1 18:48:38 2019 \begin{tabular}{lcrrrrrrrrr} \hline & $R^2$ & \multicolumn{4}{c}{5\%} & &\multicolumn{4}{c}{10\%} \\