[R] terms.formula

Thomas Lumley tlumley at u.washington.edu
Mon Mar 10 16:17:17 CET 2003


On Mon, 10 Mar 2003, Roger Koenker wrote:

> I'm in the very initial stage of expanding the formula processing
> in my quantile regression function rq() to handle additive
> nonparametric components, say qss(x), or qss(x,z).  I need some
> advice about strategy for formula processing.  My initial foray
> was to use:
>
> 	terms(formula,specials="qss")
>
> and then modify the components of the resulting
> terms.object.

Another approach, which you can see in coxph() in the survival package, is
to create a new formula without the qss terms.  It's not very pretty but
it seems to work portably.

	-thomas



More information about the R-help mailing list