[Rd] "Template" for model.matrix functions

Thomas Lumley tlumley at u.washington.edu
Mon Jul 3 18:21:29 CEST 2006


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



More information about the R-devel mailing list