0

I'm trying to do a flexible discriminant analysis,using measurements taken on bones, but i need to apply MARS as a method using R ,however for some reason, only for some of my dataframes R give me a warning

Warning message:

In fda(SEX ~ ., data = hex, method = mars) : degenerate problem; no discrimination

Can anybody please tell me what i'm doing wrong?

hex <- "Sex age hdl hdb
1 F 0 8.4 20.41
2 F 0 7.4 15.40
3 F 9 7.3 19.40
4 M 9 13.5 37.31
5 M 11 14.4 43.49
6 M 11 15.7 40.10 “

hex=read.table("hex.txt", header = TRUE, sep = "\t")

str(hex)

hex[2:3] <- lapply(hex[2:3], as.numeric)

hexfit <- fda(SEX~ ., data =hex,method=mars)

Warning message: In fda(SEX ~ ., data = hex, method = mars) : degenerate problem; no discrimination

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Rob
  • 1
  • 1
  • 1
    Please share a reproducible example of the data and code that produces the error, it's difficult to tell what might be causing your error if we can't see the code that led to it. See [mcve] and [how to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Jan Boyer Jan 23 '19 at 18:11
  • Is zz the same data as hex and humerus? Please edit question to make your code reproducible. – erc Jan 24 '19 at 09:12

0 Answers0