Description Usage Arguments Details Value Note Author(s) References See Also Examples
Functions for linear discriminant analysis between two groups of observations for a set of variables.
1 | lda2(X1,X2)
|
X1 |
Group 1 data matrix |
X2 |
Group 2 data matrix |
The centroid scores Z1c, Z2c and individual scores Z1s, Z2s have been centered on Z0, which is the midpoint or average of the centroids. Null hypothesis is that there are not significant differences between the two groups.
Using the individual scores and the centroid scores, the function also produces a plot, which displays the difference between the groups in two different manners. The one at the top panel uses markers and the two below use histograms. It indicates whther tere is overlap in observations along the score axis and potential differences between the centroids.
m.n1.n2 |
m.n1.n2 |
G1 |
sample mean of X1 |
G2 |
sample mean of X2 |
S1 |
covariance matrix of X1 |
S2 |
covariance matrix of X2 |
Sp |
pooled variance matrix |
Spinv |
inverse of pooled variance matrix |
A |
matrix of coefficients |
Z1c.Z2c |
scores of centroids for group 1 and group 2 |
D2.F.p.value |
Mahalanobis distance, F statistic, and p-value |
Z1s |
scores for individual observations of group 1 |
Z2s |
scores for individual observations of group 2 |
Input files are in 'datafiles.zip' in directory 'datafiles' and organized by chapters of Acevedo (2013). The example below requires an input file.
Miguel F. Acevedo Acevedo@unt.edu
Acevedo M.F. 2013. "Data Analysis and Statistics for Geography, Environmental Science, and Engineering", CRC Press.
mda package lda
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.