Open matherealize opened 1 year ago
This will also affect fracplot and predict.mfpa, which both require matrix as input.
I think the best solution would be to create a dedicated function prepare_input_for_mfp2
that handles all of this.
The goal would be to make the mfp2 function easy to use. It should accept
Up until 09526413dd040e4b962f8c6a67fdddafa2dc88cb a call to
model.matrix()
would convert any input data to a model matrix. This includes conversion of factors into dummies.That is fine, but leads to the problem that we need to handle the expansion of arguments such as
df
properly. At the moment, all factors levels are treated as individual variables (also see #13 ), unlike inmfp
. Need to implement a helper that deals with this formfpa()
.In the current version we also need to check that the input object is indeed a matrix and does not contain factors, otherwise the program will crash.
Also relates to #20 .