Remi.b
Remi.b

Reputation: 18239

Performing Linear Discriminant Analysis (LDA) with Morphological Data

I have a bunch of morphological data which I collected using the package geomorph. These data look like this:

259 matrices (one file per individual) with x and y coordinates (in columns) of 20 landmarks.

           [,1]         [,2]
 [1,] -0.2820496783 -0.003257662
 [2,] -0.2501083238  0.020960228
 [3,] -0.2250506399  0.049100368
 [4,] -0.2015860633  0.024673340
 [5,] -0.2246826220  0.001103431
 [6,] -0.0750488845  0.133714363
 [7,]  0.0006292017  0.133626261
 [8,]  0.0679419574  0.117149206
 [9,]  0.1239612670  0.097834963
[10,]  0.2008532330  0.063564419
[11,]  0.2763894852  0.026529132
[12,]  0.3606700636  0.038228394
[13,]  0.3665535317 -0.065490660
[14,]  0.2728682794 -0.086504965
[15,]  0.1113276708 -0.147876722
[16,] -0.0742222455 -0.158015857
[17,] -0.0746248649 -0.117267412
[18,] -0.0775485339 -0.055400903
[19,] -0.1122735300  0.041616289
[20,] -0.1839993037 -0.114286212

The package geomorph contain tools to perform Principal Componant Analysis (PCA) but I don't think it contains anything for a Linear Discriminant Analysis (LDA). Or is there something?

How can I perform a LDA on this kind of data?

The solution might come from the package geomorph or from another package. One might as well be good enough to modify the functions from the geomorph package (the function plotTangentSpace for example. The functions of this package are usually not very long!) in order to create the function I need. Or maybe it is just a matter of transforming the data so that it is feasible with MASS:::lda (see discussion in the comments)


Note:

I have 4 semi-landmarks (sliders) within the 20 landmarks listed above! Semi-landmarks are used to evaluate not a point position but a curve. Below is my matrix containing the informations for the semi-landmarks. This matrix is called semi$sliders and is used as an argument of the `gpagen function as shown below:

> gpagen(3D_Array_With_All_Individuals, curves = semi$sliders, ShowPlot = T)

> semi$sliders

     [,1] [,2] [,3]
[1,]    6    7    8
[2,]    7    8    9
[3,]    8    9   10
[4,]    9   10   11

3D_Array_With_All_Individuals is a 3D array where each layer is one of the 259 matrices.

Upvotes: 2

Views: 917

Answers (0)

Related Questions