plot {nprq} | R Documentation |
Takes a fitted rqss
object produced by rqss()
and plots
the component smooth functions that make up the ANOVA decomposition.
Since the components "omit the intercept" the estimated intercept is added back
in this facilitates the comparison of quantile fits particularly.
plot.rqss(x, ...)
x |
a fitted rqss object produced by rqss() . |
... |
additional arguments for the plotting algorithm |
The function produces plots for the ANOVA components as a side effect.
Roger Koenker
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) fit <- rqss(y~qss(x,constraint="N")+z) lines(x[-1],fit$coef[1]+fit$coef[-(1:2)]) fit <- rqss(y~qss(x,constraint="I")+z) lines(x[-1],fit$coef[1]+fit$coef[-(1:2)],col="blue") fit <- rqss(y~qss(x,constraint="CI")+z) lines(x[-1],fit$coef[1]+fit$coef[-(1:2)],col="red") #Cleanup rm(list=ls()) #A bivariate example data(CobarOre) attach(CobarOre) fit <- rqss(z~qss(cbind(x,y),lambda=.08)) plot(fit)