knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
To install this github version type (in R):
#if devtools is not installed yet: # install.packages("devtools") library(devtools) install_github("livioivil/flip")
library(flip)
A univariate analysis
Testing the symmetry around 0 in a one sample (i.e. equivalent to one sample t-test)
set.seed(1) y=rnorm(10)+.5 res=flip(y) summary(res)
and ploting
plot(res) # same ad hist(res)
A multivarite analysis
set.seed(1) df=data.frame(y1=rnorm(10)+.5,y2=rnorm(10)) res=flip(~.,data=df) summary(res) plot(res)
Which is different from ploting
##set the following if you get an error (mostly using Rstudio) #par(mar=c(1,1,1,1)) hist(res)
For the general framework of univariate and multivariate permutation tests see:
Pesarin, F. (2001) Multivariate Permutation Tests with Applications in Biostatistics. Wiley, New York.
For analysis of mixed-models see:
L. Finos and D. Basso (2014) Permutation Tests for Between-Unit Fixed Effectsin Multivariate Generalized Linear Mixed Models. Statistics and Computing. Volume 24, Issue 6, pp 941-952. DOI: 10.1007/s11222-013-9412-6
D. Basso, L. Finos (2011) Exact Multivariate Permutation Tests for Fixed Effects in Mixed-Models. Communications in Statistics - Theory and Methods. DOI 10.1080/03610926.2011.627103
For Rotation tests see:
Langsrud, O. (2005) Rotation tests, Statistics and Computing, 15, 1, 53-60
A. Solari, L. Finos, J.J. Goeman (2014) Rotation-based multiple testing in the multivariate linear model. Biometrics. Accepted
The colors of the plots of library flip are mostly taken from display.wes.palette(5, "Darjeeling")
of library(wesanderson).
If you encounter a bug, please file a reprex (minimal reproducible example) on github.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.