Skip to content
Prev 276449 / 398506 Next

linear against nonlinear alternatives - quantile regression

Just to address a piece of this - in the case in which you are currently
focusing on only one quantile, the rms package can help by fitting
restricted cubic splines for covariate effects, and then run anova to test
for nonlinearity (sometimes a dubious practice because if you then remove
nonlinear terms you are mildly cheating).

require(rms)
f <- Rq(y ~ x1 + rcs(x2,4), tau=.25)
anova(f)  # tests associations and nonlinearity of x2

Frank
Julia Lira wrote:
-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/linear-against-nonlinear-alternatives-quantile-regression-tp3993327p3993416.html
Sent from the R help mailing list archive at Nabble.com.