Julia Lira
2011-Nov-05 14:05 UTC
[R] linear against nonlinear alternatives - quantile regression
Dear all, I would like to know whether any specification test for linear against nonlinear model hypothesis has been implemented in R using the quantreg package. I could read papers concerning this issue, but they haven't been implemented at R. As far as I know, we only have two specification tests in this line: anova.rq and Khmaladze.test. The first one test equality and significance of the slopes across quantiles and the latter one test if the linear specification is model of location or location and scale shift. Do you have any suggestion? Thanks a lot! Best regards, Julia [[alternative HTML version deleted]]
Frank Harrell
2011-Nov-05 14:43 UTC
[R] 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:> > Dear all, > > I would like to know whether any specification test for linear against > nonlinear model hypothesis has been implemented in R using the quantreg > package. > > I could read papers concerning this issue, but they haven't been > implemented at R. As far as I know, we only have two specification tests > in this line: anova.rq and Khmaladze.test. The first one test equality and > significance of the slopes across quantiles and the latter one test if the > linear specification is model of location or location and scale shift. > > Do you have any suggestion? > > Thanks a lot! > > Best regards, > > Julia > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@ mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >----- 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.
Xu Wang
2011-Nov-16 20:10 UTC
[R] linear against nonlinear alternatives - quantile regression
I'm just curious if Professor Koenker responded to this (e.g. in an individual email or otherwise), as I would be interested in the answer. -- View this message in context: http://r.789695.n4.nabble.com/linear-against-nonlinear-alternatives-quantile-regression-tp3993327p4077713.html Sent from the R help mailing list archive at Nabble.com.