Description Usage Arguments Value See Also Examples

Permutation tests for time series data, based on classic linear regression or ANOVA
This is a legacy function that is primarily provided for backward compatibility. You should probably use `permutelm`

or `permutelmer`

instead.
`permu.test`

is the only function to support multivariate responses, although multivariate data can trivially be recoded into a univariate model.
`permu.test`

does not support random effects or corrected p-values (e.g. the cluster mass test), which are supported by `permutelm`

.

1 2 3 4 5 6 7 8 9 |

`formula` |
A formula of the following form: |

`data` |
The dataset referencing these predictors. |

`subset` |
If specified, will only analyze the specified subset of the data. |

`type` |
A character string of either |

`parallel` |
Whether to parallelize the permutation testing using plyr's |

`progress` |
A plyr |

`...` |
Other arguments to be passed to |

A data frame.

`clusterperm.lm`

, `clusterperm.lmer`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
# EEG data example using the MMN dataset
# Run permutation tests on all electrodes and timepoints, reporting p-values for the three
# manipulated factors
perms <- permu.test(cbind(Fp1,AF3,F7,F3,FC1,FC5,C3,CP1,CP5,P7,P3,Pz,PO3,O1,Oz,O2,PO4,P4,
P8,CP6,CP2,C4,FC6,FC2,F4,F8,AF4,Fp2,Fz,Cz) ~ Deviant * Session | Time,data=MMN)
# Run the tests in parallel on two CPU threads
# first, set up the parallel backend
library(doParallel)
cl <- makeCluster(2)
registerDoParallel(cl)
perms <- permu.test(cbind(Fp1,AF3,F7,F3,FC1,FC5,C3,CP1,CP5,P7,P3,Pz,PO3,O1,Oz,O2,PO4,P4,
P8,CP6,CP2,C4,FC6,FC2,F4,F8,AF4,Fp2,Fz,Cz) ~ Deviant * Session | Time,data=MMN,
parallel=TRUE)
stopCluster(cl)
# Plot the results by F-value, removing points that were not significant in the
# permutation tests
plot(perms,sig='p')
# t-values instead of F-values
perms <- permu.test(cbind(Fp1,AF3,F7,F3,FC1,FC5,C3,CP1,CP5,P7,P3,Pz,PO3,O1,Oz,O2,PO4,P4,
P8,CP6,CP2,C4,FC6,FC2,F4,F8,AF4,Fp2,Fz,Cz) ~ Deviant * Session | Time,data=MMN,
type='regression')
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.