[R] New family for gam in the mgcv library
Eva.Cantoni at metri.unige.ch
Thu Sep 29 16:06:01 CEST 2005
I'm using R 2.0.1 on a Sun, with mgcv library version 1.3-1.
I would like to implement a new family for the function gam in mgcv
(truncated Poisson family as defined in Barry & Welsh (2002), Ecological
I therefore defined a family function with all the necessary components
(linkfun, linkinv, variance, etc). But then I run into problems because
my link function is not a standard one, and fix.family.link() and
fix.family.var() (called by gam.outer) won't work. As I understand, the
purpose of these two functions is to modify families so to add a "dvar"
component and a "d2link" component, necessary for the fitting.
The fix I can imagine (but I didn't try yet) is to add the two extra
components (dvar and d2link) when defining the new family, and to
redefine the function gam.outer to avoid the use of fix.family.*.
Does someone have experience with this? Would this be the end of my
Thank you for your help,
Dr Eva Cantoni phone : (+41) 22 379 8240
Econométrie - Univ. Genève fax : (+41) 22 379 8299
40, Bd du Pont d'Arve e-mail : Eva.Cantoni at metri.unige.ch
CH-1211 Genève 4 http://www.unige.ch/ses/metri/cantoni
More information about the R-help