From tlumley at u.washington.edu  Mon Jul  3 18:21:29 2006
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Mon, 3 Jul 2006 09:21:29 -0700 (PDT)
Subject: [Rd] "Template" for model.matrix functions
In-Reply-To: <44A863A2.40502@bfro.uni-lj.si>
References: <44A863A2.40502@bfro.uni-lj.si>
Message-ID: <Pine.LNX.4.64.0607030921110.21683@homer22.u.washington.edu>

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



[Rd] "Template" for model.matrix functions
Thomas Lumley