pbreheny / visreg

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

predict.coxph cannot find data if an update is necessary #64

Closed pbreheny closed 4 years ago

pbreheny commented 5 years ago

Some types of variables, such as logicals, trigger an update; when they do, predict.coxph cannot find the updated data set:

pbc$Male <- pbc$sex == 'm'
fit <- coxph(Surv(time, status!=0) ~ Male, pbc)
visreg(fit, 'Male')

tiggers an error because model.frame cannot find the reformatted, internal version of the data set created by visreg.