lda.functions: LDA Two groups

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Functions for linear discriminant analysis between two groups of observations for a set of variables.

Usage

1
 lda2(X1,X2) 

Arguments

X1

Group 1 data matrix

X2

Group 2 data matrix

Details

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.

Value

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

Note

Input files are in 'datafiles.zip' in directory 'datafiles' and organized by chapters of Acevedo (2013). The example below requires an input file.

Author(s)

Miguel F. Acevedo Acevedo@unt.edu

References

Acevedo M.F. 2013. "Data Analysis and Statistics for Geography, Environmental Science, and Engineering", CRC Press.

See Also

mda package lda

Examples

1
2
3
4
5
6
## Not run: 
X1X2 <- read.csv("lab10/X1X2.csv",header=T)
X1 <- as.matrix(X1X2[,1:3]); X2 <- as.matrix(X1X2[,4:6])
X.lda2 <- lda2(X1,X2)

## End(Not run)

seeg documentation built on May 30, 2017, 7:09 a.m.