getANOVAStats: Utility Function for RRPP

View source: R/RRPP.utils.r

getANOVAStatsR Documentation

Utility Function for RRPP

Description

A function mostly for internal processing but can be used to extract ANOVA statistics for other uses, such as plotting histograms

Usage

getANOVAStats(fit, stat = c("SS", "MS", "Rsq", "F", "cohenf", "all"))

Arguments

fit

Object from lm.rrpp.

stat

The ANOVA statistic to extract. Returns every RRPP permutation of the statistic. If "all", a list of each statistic is returned.

Author(s)

Michael Collyer

Examples

## Not run: 
data(Pupfish)
fit <- lm.rrpp(coords ~ log(CS) + Sex*Pop, SS.type = "I", 
data = Pupfish, print.progress = FALSE, iter = 999) 
anova(fit)
Fstats <- getANOVAStats(fit, stat = "F")
par(mfrow = c(2, 2))
hist(Fstats$Fs[1,], breaks = 50, main = "log(CS)", xlab = "F")
abline(v = Fstats$Fs[1, 1])
hist(Fstats$Fs[2,], breaks = 50, main = "Sex", xlab = "F")
abline(v = Fstats$Fs[2, 1])
hist(Fstats$Fs[3,], breaks = 50, main = "Pop", xlab = "F")
abline(v = Fstats$Fs[3, 1])
hist(Fstats$Fs[4,], breaks = 50, main = "Sex:Pop", xlab = "F")
abline(v = Fstats$Fs[4, 1])

## End(Not run)

RRPP documentation built on June 22, 2024, 6:45 p.m.