stan4bart
stan4bart copied to clipboard
Var list changing size
I am trying to fit a stan4bart model after the latest update but am getting the following error:
fit <- stan4bart(dx ~ bart(. - dx - history) + history, dat_new[dat_new$train,],
cores = 1, seed = 0,
verbose = 1,
bart_args=list(keepTrees=T),
test=dat_new[!dat_new$train,])
'varlist' has changed (from nvar=9) to new 10 after EncodeVars() -- should no longer happen!
I was able to get this to work by directly converting my data frame into a model matrix and back to a data frame. Perhaps some of the issue could be with factor variable encoding?
Is this with an install from a recent commit? I made some changes last week to hopefully address this, and I can't recreate it locally.