simmr | R Documentation |
simmr
fits a multimodal regression model using only distance matrices
computed on the original data. Permutation testing is used to obtain
p-values.
simmr(
D,
X,
variables,
tests = c("Dempster", "PC"),
D.scale = c("max", "trace", "dvar", "none"),
pc.pv = NULL,
pc.n = NULL,
n.perm = 999,
eigen.tol = 1e-10,
debug = FALSE
)
D |
List of distance matrices of class matrix or dist |
X |
Design matrix, either output of model.matrix or valid input to the function. |
variables |
Names of explanatory variables to regress on, must match
with column names of |
tests |
Chosen test statistics from "Dempster", "PC". For "PC", defaults
to using n-p-1 PCs, where |
D.scale |
Method for normalization of distance matrices |
pc.pv |
Optional, calculate additional PC-based test statistics for specified proportions of variation explained |
pc.n |
Optional, calculate additional PC-based test statistics for specific numbers of PCs. If 'all', tries every possible number of PCs. |
n.perm |
Number of permutations to perform |
eigen.tol |
Discard eigenvalues below this tolerance for both PCA and computing test statistics |
debug |
Include internal objects in output (from unpermuted analysis) |
A list with the following components:
stat |
Test statistics computed on original data. |
perms |
Test statistics after permutations. |
perm.p |
Permutation p-values for each test. |
D <- list(dist(rnorm(10)), dist(rnorm(10)), dist(rnorm(10)))
X <- list("var" = runif(10))
simmr(D, X, "var")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.