Description Usage Arguments Value Examples
View source: R/independence_test.R
Implements the loss function based permutation test as described in Fiksel et al. (2020) for a test of linear independence between compositional outcomes and predictors.
1 2 3 4 5 6 7 8 9 10 |
y |
A matrix of compositional outcomes. Each row is an observation, and must sum to 1. If any rows do not sum to 1, they will be renormalized |
x |
A matrix of compositional predictors. Each row is an observation, and must sum to 1. If any rows do not sum to 1, they will be renormalized |
nperms |
The number of permutations. Default is 500. |
accelerate |
A logical variable, indicating whether or not to use the Squarem algorithm for acceleration of the EM algorithm. Default is TRUE. |
parallel |
A logical variable, indicating whether or not to use a parallel operation for computing the permutation statistics |
ncpus |
Optional argument. When provided, is an integer giving the number of clusters to be used in parallelization. Defaults to the number of cores, minus 1. |
strategy |
Optional argument. When provided, this will be the evaluation function
(or name of it) to use for parallel computation (if parallel = TRUE). Otherwise,
if parallel = TRUE, then this will default to multisession. See |
init.seed |
The initial seed for the permutations. Default is 123. |
The p-value for the independence test
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.