The following minimal example produces an error in the new implementation of partialDependence, @cjvanlissa
library(semtree)
library(lavaan)
library(tictoc)
# sample some univariate data in x and two covariates y,z
n<-1000
data <- data.frame(x=rnorm(n),
y=ordered(rbinom(n = n,1,.25)),
z=ordered(sample(c(0,1),n,TRUE))
)
model <- "x~~x; x~0"
model <- lavaan::lavaan(model, data)
forest <- semforest(model, data,control = semforest.control(num.trees=20))
pd <- partialDependence(forest, reference.var = "y")
The following minimal example produces an error in the new implementation of partialDependence, @cjvanlissa