D. Additional methods

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.width=6, 
  fig.height=4
)
# Legge denne i YAML på toppen for å skrive ut til tex
#output: 
#  pdf_document: 
#    keep_tex: true
# Original:
#  rmarkdown::html_vignette:
#    toc: true
# Start the HDANOVA R package
library(HDANOVA)

Additional methods of HD-ANOVA

The examples shown here are HD-ANOVA methods that share aspects with ASCA.

Principal Response Curves (PRC)

The PRC implementation we have wrapped is from the vegan package. A single treatment factor and a time factor are accepted together with a response matrix. The first level of the treatment factor is used as a reference level, effectively set to zero. As the vegan package is aimed at community ecology, the responses are called species. In our case, the responses are compounds from the Caldana data.

# Load Caldana data
data(caldana)

prc.cal <- prc(compounds ~ light * time, caldana)
summary(prc.cal)

The default plot for PRC is a plot of treatment + time:treatment. As we can see in the plot, the "Dark" level is the reference level from which the other levels are contrasted.

plot(prc.cal, species = FALSE, axis = 2, lwd = 4, legpos = "bottomright")

Permutation Based MANOVA (PERMANOVA)

The PERMANOVA implementation we have wrapped is from the vegan package. Our wrapper takes care of the specialised formatting needed for the inputs. By default, 999 permutations are performed for the factors, and a standard Multivariate ANOVA is returned with permutation-based p-values.

permanova.cal <- permanova(compounds ~ light * time, caldana)
permanova.cal


Try the HDANOVA package in your browser

Any scripts or data that you put into this service are public.

HDANOVA documentation built on April 12, 2025, 2:16 a.m.