[R] gam - Extraction of nonparametric component

Wensui Liu liuwensui at gmail.com
Mon Mar 10 18:53:12 CET 2008


i could remember exactly but it is like something: components <-
predict(gam.object, type = "terms")

On Mon, Mar 10, 2008 at 1:36 PM, Michael A. Milligan <pakdke at yahoo.com> wrote:
> Hello,
>
>  I am estimating a semiparametric partial linear model
>  using gam of the form
>
>  y=f1(x1)+f2(x2)+beta*X
>
>  where y is the dependent variable, f1(x1) and f2(x2)
>  are nonparametric functions of the independent
>  variables x1 and x2, respectively, and beta and X are
>  vectors of coefficients and independent variables.
>  The R code is
>
>  EqGamAS <-  gam(y ~ X+s(x1)+s(x2))
>
>  My question is, how can I extract the fitted values
>  of, say, f1(x1)?  Of course fitted(EqGamAS) returns
>  the fitted values of the entire regression function,
>  but is there a way to view only one component of the
>  nonparametric part of the estimation?  I have looked
>  through documentation and help archives and have not
>  found the answer.  I appreciate very much any help
>  anyone can give me.
>
>  Michael Milligan
>  Doctoral Candidate
>  University of New Mexico
>
>
>       ____________________________________________________________________________________
>  Be a better friend, newshound, and
>
>  ______________________________________________
>  R-help at r-project.org mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-help
>  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>  and provide commented, minimal, self-contained, reproducible code.
>



-- 
===============================
WenSui Liu
ChoicePoint Precision Marketing
Phone: 678-893-9457
Email : wensui.liu at choicepoint.com
Blog   : statcompute.spaces.live.com



More information about the R-help mailing list