1

I am trying to understand flexible discriminant function analysis and specifically the "fda" command in the "mda" package in R. My understanding is that the default method is a simple linear discriminant function analysis and that I can get a sense of which of my original predictors contribute the most to each discriminant using the following code (from the example in the documentation):

data(iris)
irisfit <- fda(Species ~ ., data = iris)
coef(irisfit)
               [,1]        [,2]
Intercept    -2.1264786 -6.72910343
Sepal.Length -0.8377979  0.02434685
Sepal.Width  -1.5500519  2.18649663
Petal.Length  2.2235596 -0.94138258
Petal.Width   2.8389936  2.86801283

My understanding is that from the above we can interpret Petal.Width as having the greatest contribution to the discrimination of groups for DF1 (though in this example other variables have similar discrimination).

Now I'm trying to get analogous coefficients when the method is set to mars (e.g. when using flexible discriminate function analysis).

irisfit <- fda(Species ~ ., data = iris,method=mars)
coef(irisfit)
      [,1]      [,2]
[1,]  7.0488114 -2.107810
[2,] -1.6956574  5.520759
[3,] -4.6872316  2.640739
[4,] -2.7177875 -3.155109
[5,]  3.0196475 -2.095824
[6,] -0.9007739 -2.515975
[7,] -0.6596193 -1.423301

Forgive my limited understanding of the method but I'm not clear as to what is returned here/how to interpret these values (e.g. there are seven rows but only four initial variables...is it that the coefficients now also include non-linear terms in the model?). I couldn't figure this out from the Hastie et al. paper...

Also, I should explain that my main motivation with the analysis is not the resulting classification but to understand which variables have the most discriminating power given this classification. I'm exploring other methods but thought fda might be useful...

Thanks in advance!

user2414840
  • 721
  • 1
  • 7
  • 15

0 Answers0