visreg icon indicating copy to clipboard operation
visreg copied to clipboard

visreg and quantreg

Open pbreheny opened this issue 3 years ago • 0 comments

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")

pbreheny avatar May 19 '21 17:05 pbreheny