[R] Error message in function mars() in package mda

Jude Ryan juderyan at tcindex.com
Tue Aug 10 21:56:38 CEST 2004


Hi,

I am using function mars() in package mda to find knots in a whole bunch 
of predictor variables. I hope to be able to replicate all or some of 
the basis functions that the MARS software from Salford Systems creates. 
When I ran mars() on a small dataset, I was able to get the knots. 
However, when I tried running mars() on a larger dataset (145 predictor 
variables), for a different project, I get the following error message:

 > fit1 <- mars(disney2[,-146], disney2[,146])
Error in mars(disney2[, -146], disney2[, 146]) :
        NA/NaN/Inf in foreign function call (arg 5)
In addition: Warning messages:
1: NAs introduced by coercion
2: NAs introduced by coercion
 >

Does arg 5 refer to the 5th column in my dataset? This seems to be a 
data problem, is this correct?

Are there any other functions in R that will give me the knots for a set 
of predictor variables?

Any help is greatly appreciated.

Thanks,

Jude




More information about the R-help mailing list