Learn R Programming

HDANOVA (version 0.8.3)

apca: ANOVA Principal Component Analysis - APCA

Description

APCA function for fitting ANOVA Principal Component Analysis models.

Usage

apca(
  formula,
  data,
  add_error = TRUE,
  contrasts = "contr.sum",
  permute = FALSE,
  perm.type = c("approximate", "exact"),
  ...
)

Value

An object of class apca, inheriting from the general asca class. Further arguments and plots can be found in the asca documentation.

Arguments

formula

Model formula accepting a single response (block) and predictors.

data

The data set to analyse.

add_error

Add error to LS means (default = TRUE).

contrasts

Effect coding: "sum" (default = sum-coding), "weighted", "reference", "treatment".

permute

Number of permutations to perform (default = 1000).

perm.type

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

...

Additional parameters for the hdanova function.

References

Harrington, P.d.B., Vieira, N.E., Espinoza, J., Nien, J.K., Romero, R., and Yergey, A.L. (2005) Analysis of variance–principal component analysis: A soft tool for proteomic discovery. Analytica chimica acta, 544 (1-2), 118–127.

See Also

Main methods: asca, apca, limmpca, msca, pcanova, prc and permanova. Workhorse function underpinning most methods: hdanova. Extraction of results and plotting: asca_results, asca_plots, pcanova_results and pcanova_plots

Examples

Run this code
data(candies)
ap <- apca(assessment ~ candy, data=candies)
scoreplot(ap)

# Numeric effects
candies$num <- eff <- 1:165
mod <- apca(assessment ~ candy + assessor + num, data=candies)
summary(mod)
scoreplot(mod, factor=3, gr.col=rgb(eff/max(eff), 1-eff/max(eff),0), pch.scores="x")

Run the code above in your browser using DataLab