Jane Shevtsov wrote:
I am trying to use the plotmo package to generate a partial dependence
plot
for a CART model created with rpart. When running plotmo, I get "Error:
get.plotmo.y returned the wrong length (got 204938 expected 205000)". The
rpart predict function does indeed return 204938 results, but plotmo is
supposed to be able to handle NA's in rpart models. What I might do about
this?
It’s because you have NAs in y; plotmo only allows them in x (and then only
with rpart models). The plotmo help page is admittedly not clear on this
and I will update it in due course.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.