concept permutation in category R
appears as: Permutation, permutations

This is an excerpt from Manning's book R in Action, Second Edition: Data analysis and graphics with R.
Listing 12.2. Permutation tests for simple linear regression
> library(lmPerm) > set.seed(1234) > fit <- lmp(weight~height, data=women, perm="Prob") [1] "Settings: unique SS : numeric variables centered" > summary(fit) Call: lmp(formula = weight ~ height, data = women, perm = "Prob") Residuals: Min 1Q Median 3Q Max -1.733 -1.133 -0.383 0.742 3.117 Coefficients: Estimate Iter Pr(Prob) height 3.45 5000 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.5 on 13 degrees of freedom Multiple R-Squared: 0.991, Adjusted R-squared: 0.99 F-statistic: 1.43e+03 on 1 and 13 DF, p-value: 1.09e-14
Permutation tests, also called randomization or re-randomization tests, have been around for decades, but it took the advent of high-speed computers to make them practically available. To understand the logic of a permutation test, consider the following hypothetical problem. Ten subjects have been randomly assigned to one of two treatment conditions (A or B), and an outcome variable (score) has been recorded. The results of the experiment are presented in table 12.1.