[R-sig-eco] segmented quantile regression and rqss

Stephen B. Cox myrddincox at gmail.com
Fri May 2 16:33:10 CEST 2008


Not sure if this is what you are looking for, but just try something like:

m = nlrq(y~g0+g1*x*(x<=bp) + (g1 * bp + b1 * (x-bp))*(x>bp),
data=data, tau=.9,start=list(g0=1,g1=10,b1=-1,bp=5))

where 'bp' is the breakpoint between the two segments.  Obviously -
your starting values would change to fit your needs.

HTH

Stephen

--
Stephen B. Cox
Dept. Env. Tox
TTU


On Fri, May 2, 2008 at 8:38 AM,  <Griffith.Michael at epamail.epa.gov> wrote:
>
>  We have been investigating quantile regression for developing stressor -
>  response relationships from stream monitoring data.  I would like to add
>  a segmented model to our analyses to look for thresholds in these
>  relationships.  I have figured out how to fit a model composed of
>  multiple linear segments using rqss.  Koenker gives an example in the
>  vignette for Quantile Regression in R.  However, I would like to fit a 2
>  - segment model.  Can anyone give me pointers on how this might be done?
>
>  Michael
>
>  Michael B. Griffith, Ph.D.
>  Research Ecologist
>
>  USEPA, NCEA (MS A-110)
>  26 W. Martin Luther King Dr.
>  Cincinnati, OH  45268
>
>  telephone:  513 569-7034
>  e-mail:  griffith.michael at epa.gov
>
>  _______________________________________________
>  R-sig-ecology mailing list
>  R-sig-ecology at r-project.org
>  https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>



More information about the R-sig-ecology mailing list