EdwinKipruto / mfp2

3 stars 0 forks source link

predict.mfp ignores newdata? #58

Open georgheinze opened 1 year ago

georgheinze commented 1 year ago

please check if predict.mfp (using type="contrasts") makes use of newdata properly. I found the values of x of the training data in the result of predict.mfp, not the values of x of newdata.

georgheinze commented 1 year ago

Not sure but I think the problem is in line 166 of predict.mfp2, where it looks up the sequence of x values in object$x, not in newdata.

EdwinKipruto commented 1 year ago

Thanks @georgheinze for pointing out the error. We will work on it. I think we did not consider newdata when type is "terms" or "contrasts"

matherealize commented 1 year ago

Thanks @georgheinze for pointing out the error. We will work on it. I think we did not consider newdata when type is "terms" or "contrasts"

@georgheinze the latest version should fix this issue. Please try it and see if it works properly for you.