mrpp {vegan} | R Documentation

## Multi Response Permutation Procedure of Within- versus Among-Group Dissimilarities

### Description

Multiple Response Permutation Procedure (MRPP) provides a test of whether there is a significant difference between two or more groups of sampling units.

### Usage

    mrpp(dat, grouping, permutations = 1000, distance = "euclidean",
         weight.type = 1, strata)

### Arguments

`dat` | data matrix or data frame in which rows are samples and columns are response variable(s), or a dissimilarity object or a symmetric square matrix of dissimilarities.
`grouping` | Factor or numeric index for grouping observations.
`permutations` | Number of permutations to assess the significance of the MRPP statistic, delta.
`distance` | Choice of distance metric that measures the dissimilarity between two observations . See `vegdist` for options. This will be used if `dat` was not a dissimilarity structure of a symmetric square matrix.
`weight.type` | choice of group weights. See Details below for options.
`strata` | An integer vector or factor specifying the strata for permutation. If supplied, observations are permuted only within the specified strata.

### Details

Multiple Response Permutation Procedure (MRPP) provides a test of whether there is a significant difference between two or more groups of sampling units. This difference may be one of location (differences in mean) or one of spread (differences in within-group distance). Function `mrpp` operates on a `data.frame` matrix where rows are observations and responses data matrix. The response(s) may be uni- or multivariate. The method is philosophically and mathematically allied with analysis of variance, in that it compares dissimilarities within and among groups. If two groups of sampling units are really different (e.g. in their species composition), then average of the within-group compositional dissimilarities ought to be less than the average of the dissimilarities between two random collection of sampling units drawn from the entire population.

The mrpp statistic delta is simply the overall weighted mean of within-group means of the pairwise dissimilarities among sampling units. The correct choice of group weights is currently not clear. The `mrpp` function offers three choices: (1) group size (n), (2) a degrees-of-freedom analogue (n-1), and (3) a weight that is the number of unique distances calculated among n sampling units (n(n-1)/2).

The `mrpp` algorithm first calculates all pairwise distances in the entire dataset, then calculates delta. It then permutes the sampling units and their associated pairwise distances, and recalculates a delta based on the permuted data. It repeats the permutation step `permutations` times. The significance test is simply the fraction of permuted deltas that are less than the observed delta, with a small sample correction. The function also calculates the change-corrected within-group agreement A = 1 -delta/E(delta), where E(delta) is the expected delta assessed as the average of permutations.

If the first argument `dat` can be interpreted as dissimilarities, they will be used directly. In other cases the function treats `dat` as observations, and uses `vegdist` to find the dissimilarities. The default `distance` is Euclidean as in the traditional use of the method, but other dissimilarities in `vegdist` also are available.

### Value

The function returns a list of class mrpp with following items:

`call` | Function call.
`delta` | The overall weighted mean of group mean distances.
`E.delta` | expected delta, under the null hypothesis of no group structure. This is the mean of the permuted deltas.
`Pvalue` | Significance of the test.
`A` | A chance-corrected estimated of the distances explained by group identity; a value analogous to a coefficient of determination in a linear model.
`distance` | Choice of distance metric used; the "method" entry of the dist object.
`weight.type` | The choice of group weights used.
`boot.deltas` | The vector of "permuted deltas," the deltas calculated from each of the permuted datasets.
`permutations` | The number of permutations used.

### Note

This difference may be one of location (differences in mean) or one of spread (differences in within-group distance). That is, it may find a significant difference between two groups simply because one of those groups has a greater dissimilarities among its sampling units. Most `mrpp` models can be analysed with `adonis` which seems not suffer from the same problems as `mrpp` and is a more robust alternative.

### Author(s)

M. Herny H. Stevens HStevens@muohio.edu and Jari Oksanen.

### References

P. W. Mielke and K. J. Berry. 2001. Permutation Methods: A Distance Function Approach. Springer Series in Statistics. Springer.

B. McCune and J. B. Grace. 2002. Analysis of Ecological Communities. MjM Software Design, Gleneden Beach, Oregon, USA.

### See Also

`anosim` for a similar test based on ranks, and `mantel` for comparing dissimilarities against continuous variables, and `vegdist` for obtaining dissimilarities, `adonis` is a more robust alternative in most cases.

### Examples

    data(dune)
    data(dune.env)
    dune.mrpp <- mrpp(dune, dune.env$Management)
    dune.mrpp

    # Save and change plotting parameters
    def.par <- par(no.readonly = TRUE)
    layout(matrix(1:2,nr=1))

    plot(dune.ord <- metaMDS(dune), type="text", display="sites" )
    ordihull(dune.ord, dune.env$Management)

    with(dune.mrpp, {
      fig.dist <- hist(boot.deltas, xlim=range(c(delta,boot.deltas)),
                     main="Test of Differences Among Groups")
      abline(v=delta);
      text(delta, 2*mean(fig.dist$counts), adj = -0.5,
         expression(bold(delta)), cex=1.5 )  }
    )
    par(def.par)

[Package vegan version 1.8-8 Index]