-1

library(mda)

I'm using:

pred.test <- predict(model.fda, test.data) 
after model.fda <- fda(Y~., train.data)

but obtained the following message:

Error in mindist[l] <- ndist[l] : NAs are not allowed in subscripted assignments.

Thank you very much for the hint!

chiwangc
  • 3,566
  • 16
  • 26
  • 32
Matt
  • 831
  • 2
  • 7
  • 16
  • 1
    Your question is not very clear... Could you provide your dataset (or dummy data with the same structure) to see if the issue can be reproduced. The error messages says that there may be NA's in your data or NA's generated at a certain point in the predict.fda function which cannot be dealt with by the function. The reason for this can only be figured out if we can have a look at your data. – FM Kerckhof May 11 '15 at 16:20
  • @FM kerckhof, thanks for your comment. I've solved this issue after normalizing the data (It was binary values only and maybe too sparse). – Matt May 11 '15 at 16:46
  • good to hear, maybe you can answer & close your own question below to help other users that could run into the same issues? – FM Kerckhof May 11 '15 at 18:43

1 Answers1

-1

I've solved this issue after normalizing the data (It was binary values only and maybe too sparse in my case).

Matt
  • 831
  • 2
  • 7
  • 16