Learn R Programming

svs (version 1.0.2)

fast_dca: Discriminant Correspondence Analysis

Description

A fast procedure for computing discriminant correspondence analysis.

Usage

fast_dca(dat, clusters1 = NULL, clusters2 = NULL, members = FALSE)

Arguments

dat
Input data: can be a table or a data frame (but the data frame must have only two columns).
clusters1
A clustering of the first set of levels: either a list or the output of kmeans.
clusters2
A clustering of the second set of levels: either a list or the output of kmeans.
members
Logical indicating whether the (supplementary) coordinates for the individual levels should also be computed.

Value

  • A list with components:
  • valThe eigenvalues or principal inertias, indicating how much each latent axis explains.
  • cen1The coordinates of the cluster centers for the first set of levels.
  • cen2The coordinates of the cluster centers for the second set of levels.
  • mem1If members = TRUE: The coordinates of the first set of individual levels.
  • mem2If members = TRUE: The coordinates of the second set of individual levels.

Examples

Run this code
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8")
sca.SndT_Fra <- fast_sca(SndT_Fra)
kcl.SndT_Fra <- kmeans(sca.SndT_Fra$pos1, centers = 7)
dca.SndT_Fra <- fast_dca(SndT_Fra, clusters1 = kcl.SndT_Fra)
dca.SndT_Fra
}
references{
Abdi, H. (2007) Discriminant correspondence analysis. In: N. Salkind (ed.) emph{Encyclopedia of measurement and statistics}. Thousand Oaks: SAGE.
}

Run the code above in your browser using DataLab