embarcadero icon indicating copy to clipboard operation
embarcadero copied to clipboard

add warning partial() doesn't work with rbart objects (yet)

Open jbyoder opened this issue 2 years ago • 2 comments

Running partial() on a model of class rbart fails, with error message

Error in pdbart(model, xind = x.vars, levs = lev, pl = FALSE) : x.train must be a matrix, data.frame, formula, fitted bart model, or dbartsSampler

Can confirm that pdbart() doesn't recognize an rbart object as a fitted BART model; and the documentation for rbart_vi doesn't mention partials, so this is on some level a dbarts thing.

jbyoder avatar Feb 26 '23 01:02 jbyoder

I can't remember if pdbart() has never worked for rbart() but I think it used to - @vdorie am I imagining this? If not, it would be great functionality to add (and I'm working on fixing some other issues)

cjcarlson avatar Feb 26 '23 20:02 cjcarlson

Looks like this was never available functionality, because the partials in my plague WNA paper are all from the models before adding the random intercepts (it's the same model trained with and without RI's, no other differences). I'd just do that in your use case, but in the long run, I should probably add a warning to partial() unless Vince adds this feature!

cjcarlson avatar Feb 26 '23 20:02 cjcarlson