Re: [Rd] "Template" for model.matrix functions

From: Thomas Lumley <>
Date: Mon 03 Jul 2006 - 16:21:29 GMT

On Mon, 3 Jul 2006, Gregor Gorjanc wrote:

> Hello!
> I would like to write a function that would create a (part) of a model
> matrix to be used in lm() like functions i.e
> lm(y ~ myFunc(x))
> Where can I find a good example or a template for this as well as for
> predict method?

I would look at bs() and ns() in the splines package.

         -thomas mailing list Received on Tue Jul 04 02:24:58 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 03 Jul 2006 - 20:24:51 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.