| LDA_Chart | R Documentation |
Performs a linear discriminant analysis (LDA) to project data into maximum-separation dimensions. Includes a comprehensive discrimination summary detailing variance explained, a leave-one-out cross-validation confusion matrix, and misclassification rates to rigorously assess source separability.
LDA_Chart(
data,
Plot3D = FALSE,
text = FALSE,
colors = NULL,
interactive = FALSE,
seed = NULL,
verbose = TRUE
)
LDA_plot(
data,
Plot3D = FALSE,
text = FALSE,
colors = NULL,
interactive = FALSE,
seed = NULL,
verbose = TRUE
)
LDAPlot(
data,
Plot3D = FALSE,
text = FALSE,
colors = NULL,
interactive = FALSE,
seed = NULL,
verbose = TRUE
)
data |
Data frame. Contains source and mixture data in standard format. |
Plot3D |
Logical. If |
text |
Logical. If |
colors |
Character vector. Custom colors for the source groups. Default is |
interactive |
Logical. If |
seed |
Integer. Random seed for reproducibility. Default is |
verbose |
Logical. Whether to print discrimination summaries and variance explained to the console. Default is |
Invisibly returns a named list containing:
lda |
An object of class |
confusion |
A cross-tabulation table of leave-one-out cross-validation predictions versus actual sources. |
prop_var |
A numeric vector indicating the percentage of variance explained by each discriminant axis. |
data <- data.frame(
ID = paste0("S", 1:12),
Group = rep(c("SourceA", "SourceB", "SourceC", "Mixture"), each = 3),
Tracer1 = c(10, 12, 11, 20, 22, 21, 30, 31, 32, 20, 21, 22),
Tracer2 = c(5, 6, 5, 15, 14, 16, 25, 26, 24, 15, 15, 16),
Tracer3 = c(1, 2, 1.5, 5, 6, 5.5, 9, 10, 9.5, 5, 5.5, 6)
)
LDA_Chart(data, seed = 123)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.