Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed Aug 12, 2024
1 parent 243a368 commit f2d346a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vignettes/permutations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ library("permute")

# Introduction

In classical frequentist statistics, the significance of a relationship or model is determined by reference to a null distribution for the test statistic. This distribution is derived mathematically and the probability of achieving a test statistic as large or larger if the null hypothesis were true is looked-up from this null distribution. In deriving this probability, some assumptions about the data or the errors are made. If these assumptions are violated, then the validity of the derived $p$-value may be questioned.
In classical frequentist statistics, the significance of a relationship or model is determined by reference to a null distribution for the test statistic. This distribution is derived mathematically and the probability of achieving a test statistic as large or larger than the observed statistic *if* the null hypothesis were true is looked-up from this null distribution. In deriving this probability, some assumptions about the data or the errors are made. If these assumptions are violated, then the validity of the derived $p$-value may be questioned.

An alternative to deriving the null distribution from theory is to generate a null distribution of the test statistic by randomly shuffling the data in some manner, refitting the model and deriving values for the test statistic for the permuted data. The level of significance of the test can be computed as the proportion of values of the test statistic from the null distribution that are equal to or larger than the observed value.

In many data sets, simply shuffling the data at random is inappropriate; under the null hypothesis, that data are not freely exchangeable, for example if there is temporal or spatial correlation, or the samples are clustered in some way, such as multiple samples collected from each of a number of fields. The *permute* package was designed to provide facilities for generating these restricted permutations for use in randomisation tests. *permute* takes as its motivation the permutation schemes originally available in *Canoco* version 3.1 [@canoco31], which employed the cyclic- or toroidal-shifts suggested by @besagclifford.
In many data sets, simply shuffling the data at random is inappropriate; under the null hypothesis, the data may not ne freely exchangeable, for example if there is temporal or spatial correlation, or the samples are clustered in some way, such as multiple samples collected from each of a number of fields. The *permute* package was designed to provide facilities for generating these restricted permutations for use in randomisation tests. *permute* takes as its motivation the permutation schemes originally available in *Canoco* version 3.1 [@canoco31], which employed the cyclic- or toroidal-shifts suggested by @besagclifford.

# Simple randomisation {#sec:simple}
As an illustration of both randomisation and simple usage of the *permute* package we consider a small data set of mandible length measurements on specimens of the golden jackal (*Canis aureus*) from the British Museum of Natural History, London, UK. These data were collected as part of a study comparing prehistoric and modern canids [@higham80], and were analysed by @manly07. There are ten measurements of mandible length on both male and female specimens. The data are available in the `jackal` data frame supplied with *permute*.
Expand Down

0 comments on commit f2d346a

Please sign in to comment.