Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

permudist

performs permutation testing for group differences.


Description

This function compares the distance between two groupmeans to the distances obtained by random assignment of observations to this groups.

Usage

permudist(data, groups, rounds = 1000, which = NULL,
  p.adjust.method = "none")

Arguments

data

array or matrix containing data

groups

factors determining grouping.

rounds

number of permutations

which

integer (optional): in case the factor levels are > 2 this determins which factorlevels to use

p.adjust.method

method to adjust p-values for multiple comparisons see p.adjust.methods for options.

Value

dist

distance matrix with distances between actual group means

p.adjust.method

method used for p-value adjustion

p.value

distance matrix containing pairwise p-values obtained by comparing the actual distance to randomly acquired distances

Examples

data(boneData)
proc <- procSym(boneLM)
groups <- name2factor(boneLM,which=3)
perm <- permudist(proc$PCscores[,1:10], groups=groups, rounds=10000)

## now we concentrate only on sex dimorphism between Europeans
groups <- name2factor(boneLM,which=3:4)
levels(groups)
perm1 <- permudist(proc$PCscores, groups=groups,which=3:4, rounds=10000)

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.