Description Usage Arguments Details Value Author(s) References
R function "mvnpermute" for executing a permutation-based test with multivariate normally distributed data.
1 | mvnpermute(y, X, S, nr)
|
y |
vector of length n containing the observed trait data |
X |
n x m matrix or data frame, in which each row corresponds to a sample and each column corresponds to a covariate. If the model includes an intercept term, this should be included as one of the covariates of this matrix, as in
|
S |
known or estimated covariance matrix of the data. |
nr |
number of replicates to generate. |
This function takes multivariate normal data with known covariates and covariance matrix and generates "permutations" of this data that maintain the mean and covariance of the original data. The permutations are generated by finding the residuals of the data and mapping the residuals to an orthonormal space, then simulating random permutations within this orthonormal space. The permutations are then mapped back to the original space, and the expected values (given the covariates, and their estimated effect sizes) are added back in. The resulting "permuted" data can now be used exactly like the original data; for example, you could estimate the null distribution of some test statistic while observing the (known) covariance of the data.
The function returns a matrix with n rows and nr columns, in which each column is a "permuted" version of y.
Mark Abney
Abney M, Ober C, McPeek MS (2002). "Quantitative trait homozygosity and association mapping and empirical genome-wide significance in large complex pedigrees: Fasting serum insulin levels in the Hutterites." American Journal of Human Genetics 70: 920-934.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.