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