pbreheny / visreg

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

visreg and quantreg #95

Open pbreheny opened 3 years ago

pbreheny commented 3 years ago

Communicated via e-mail from Jean-Yves Barnagaud:

I was wondering if it would be a big deal to implement spline-based quantile regressions similarly? The rqss function from quantreg returns objects that cannot be handled by visreg currently because model curves are stored as lists. See the example below based on the code provided in ?rqss

library(visreg)
library(quantreg)
n <- 200
x <- sort(rchisq(n,4))
z <- x + rnorm(n)
y <- log(x)+ .1*(log(x))^2 + log(x)*rnorm(n)/4 + z
plot(x,y-z)
fN <- rqss(y~qss(x,constraint="N")+z)
visreg(fN,"x")