pbreheny / visreg

Visualization of regression functions
http://pbreheny.github.io/visreg/
61 stars 18 forks source link

Doesn't seem to work with randomForestSRC #120

Open pbreheny opened 3 months ago

pbreheny commented 3 months ago
fit <- rfsrc(Surv(time, status) ~ ., data = data)
visreg(fit, 'upcr')

results in

Error in class(x) <- unique.default(c("AsIs", oldClass(x))) : 
  attempt to set an attribute on NULL
5: trans(p$fit)
4: Response(fit, x, trans, alpha, ...)
3: getXY(fit, f, name, nn, cond.j, type, trans, alpha, jitter, ...)
2: setupV(fit, Data, xvar, nn, cond, type, trans, xtrans, alpha, 
       jitter, by, yName, ...)
1: visreg(fit, "upcr", gg = TRUE)