[R] Almost a GAM?
Simon Wood
snw at mcs.st-and.ac.uk
Mon Jan 28 19:34:18 CET 2002
I don't know of a package that will do this easily, sorry! It's on the
mgcv "to do" list, but involves a fair bit of work. In principle you can
do it yourself by manipulating the design matrix G$X that you'd get by
calling
G<-gam.setup(z~s(x,y)+s(x,y))
G<-GAMsetup(G)
.. you just need to multiply the columns of the design matrix relating to
the first smooth by w1 and the columns relating to the second by w2, then
gam.fit() can do the rest... the easiest way to do this would be to modify
gam() [just after GAMsetup() is called].... but obviously this is a
nuisance (and will hopefully not be necessary in mgcv 0.8!)
> I would like to estimate, for lack of a better description,
> a partially additive non-parametric model with the following
> structure:
>
> z~ f(x,y):w1 + g(x,y):w2 + e
>
> In other words, I'd like to estimate the marginals with
> respect to w1 and w2 as nonparametric functions of
> x and y.
>
> I'm not positive, but I think I recall being able to estimate
> a model like this using Splus gam function a couple years
> ago (I no longer have Splus). Although, I can
> see that this would be a bit more difficult to do than a standard
> gam with univariate partials and no interaction terms. The mgcv
> gam function doesn't seem to like a function of this form.
Simon
______________________________________________________________________
> Simon Wood snw at st-and.ac.uk http://www.ruwpa.st-and.ac.uk/simon.html
> The Mathematical Institute, North Haugh, St. Andrews, Fife KY16 9SS UK
> Direct telephone: (0)1334 463799 Indirect fax: (0)1334 463748
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list