Skip to contents

Permutation testing for HDANOVA. This function performes permutation testing for the effects in the HDANOVA model and adds them to the hdanova object.

Usage

permutation(object, permute = 1000, perm.type = c("approximate", "exact"))

Arguments

object

A hdanova object.

permute

Number of permutations to perform (default = 1000).

perm.type

Type of permutation to perform, either "approximate" or "exact" (default = "approximate").

Value

An updated hdanova object with permutation results.

Examples

# Load candies data
data(candies)

# Basic HDANOVA model with two factors
mod <- hdanova(assessment ~ candy + assessor, data=candies)
mod <- permutation(mod)
summary(mod)
#> High-Dimensional Analysis of Variance fitted using 'lm' (Linear Model) 
#> - SS type II,  coding, restricted model, least squares estimation, 1000 permutations 
#>            Sum.Sq. Expl.var.(%) p-value
#> candy     33416.66        74.48       0
#> assessor   1961.37         4.37       0
#> Residuals  9489.25        21.15      NA