Compute and test the share of discrepancy (defined from a dissimilarity matrix) explained by a categorical variable.

1 2 |

`diss` |
A dissimilarity matrix or a dist object (see |

`group` |
A categorical variable. For a numerical variable use |

`weights` |
optional numerical vector containing weights. |

`R` |
Number of permutations for computing the p-value. If equal to 1, no permutation test is performed. |

`weight.permutation` |
Weighted permutation method: |

`squared` |
Logical. If |

The `dissassoc`

function assesses the association
between objects characterized by their dissimilarity matrix and a
discrete covariate. It provides a generalization of the ANOVA
principle to any kind of distance metric. The function returns a
pseudo R-square that can be interpreted as a usual R-square. The
statistical significance of the association is computed by means of
permutation tests. The function performs also a test of discrepancy
homogeneity (equality of within variances) using a generalization of
the Levene statistic and Bartlett's statistics.

There are
`print`

and `hist`

methods (the latter producing an
histogram of the permuted values used for testing the significance).

If a numeric `group`

variable is provided, it will be treated as categorical, i.e., each different value will be considered as a different category. To measure the ‘linear’ effect of a numerical variable, use `dissmfacw`

.

An object of class `dissassoc`

with the
following components:

`groups` |
A data frame with the number of cases and the discrepancy of each group |

`anova.table` |
The pseudo ANOVA table |

`stat` |
The value of the statistics and their p-values |

`perms` |
The permutation object, containing the values computed for each permutation |

Matthias Studer (with Gilbert Ritschard for the help page)

Studer, M., G. Ritschard, A. Gabadinho and N. S. M<c3><bc>ller (2011). Discrepancy analysis of state sequences, *Sociological Methods and Research*, Vol. 40(3), 471-510.

Studer, M., G. Ritschard, A. Gabadinho and N. S. M<c3><bc>ller (2010)
Discrepancy analysis of complex objects using dissimilarities.
In F. Guillet, G. Ritschard, H. Briand, and D. A. Zighed (Eds.),
*Advances in Knowledge Discovery and Management*,
Studies in Computational Intelligence, Volume 292, pp. 3-19. Berlin: Springer.

Studer, M., G. Ritschard, A. Gabadinho and N. S. M<c3><bc>ller (2009).
Analyse de dissimilarit<c3><a9>s par arbre d'induction. In EGC 2009,
*Revue des Nouvelles Technologies de l'Information*, Vol. E-15, pp. 7–18.

Anderson, M. J. (2001) A new method for non-parametric multivariate analysis of variance.
*Austral Ecology* **26**, 32–46.

Batagelj, V. (1988) Generalized Ward and related clustering problems. In H. Bock (Ed.),
*Classification and related methods of data analysis*, Amsterdam: North-Holland, pp. 67–74.

`dissvar`

to compute the pseudo variance from dissimilarities and for a basic introduction to concepts of
pseudo variance analysis.

`disstree`

for an induction tree analyse of objects characterized by a dissimilarity matrix.

`disscenter`

to compute the distance of each object to its group center from pairwise dissimilarities.

`dissmfacw`

to perform multi-factor analysis of variance from pairwise dissimilarities.

1 2 3 4 5 6 7 8 9 10 11 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.