From rpeng at jhsph.edu  Fri Jul  2 16:18:06 2004
From: rpeng at jhsph.edu (Roger D. Peng)
Date: Fri Jul  2 16:18:11 2004
Subject: [Rd] Guidelines for writing model term functions (?)
Message-ID: <40E56E9E.1060805@jhsph.edu>

Are there any general guidelines for writing functions that appear in 
model formulas for functions like lm()/glm()?  The ones I can think of 
are ns()/bs() in `splines' and s() in `mgcv'.  It seems that ns()/bs() 
basically create matrix with a number of attributes and a class, while 
s() returns a list of parameters.  It seems that gam() in `mgcv' has 
its own way of dealing with formulas so maybe that's not a great 
example, but are there any suggestions for writing a function that 
might appear in the formula for, say, lm() or glm()?

Thanks,

-roger

-- 
Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/


[Rd] Guidelines for writing model term functions (?)
Roger D. Peng