[Rd] Guidelines for writing model term functions (?)

Roger D. Peng rpeng at jhsph.edu
Fri Jul 2 16:18:06 CEST 2004

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()?



Roger D. Peng

More information about the R-devel mailing list