[R] About GAM in R, Need YOUR HELP!
David Winsemius
dwinsemius at comcast.net
Mon Jun 20 12:40:14 CEST 2011
On Jun 20, 2011, at 1:25 AM, pigpigmeow wrote:
> I'm beginner in R! I have a lot of problems on R.....
>
> I have three questions about GAM
> 1. What is the function of Gaussian distribution in GAM?(if I choose
> family
> is Gaussian)
Specifies an an error distribution.
> Is it used in the predictand value (Y)?
I don't understand the question except to say that model structure
would always influence predictions.
>
> 2. How to plot a graph the gam function?
> For example: y<-gam(a~s(b),family=gaussian (link=log)
> ,Data)
> how to plot x axis is s(b) and y axis is log a???
The usual way to plot an R regression object is to plot the predicted
values against the inputs.
You should be looking for the "predict" functions in whatever
(unstated) package you are using.
>
> 3. if I use GAM to create an equation with smoothing function
> For example: y<-gam(a~s(b)+s(c),family=gaussian (link=log),Data)
> how to get the coefficient of s(b) , s(c)
Again:
?predict
You can also look at the fit object with str() but from your other
questions and apparent difficulties, I am guessing that may be "too
much information".
> My final target is getting the GAM equation to predict a, so I need
> to know
> how to get the coefficient of equation and how to write the
> equation!!!
Spline fits will generally be complex curves and graphical output is
usually the way to evaluate and display the results. There will not be
a single coefficient that you can point to and say "that" is the effect.
>
>
> As I know, I'm silly to ask these questions. But GAM is very
> difficult to
> me. From now on, I need to clear the concept of GAM.
Get a good book and read more.
>
> Thank YOU!
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/About-GAM-in-R-Need-YOUR-HELP-tp3610522p3610522.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list