[R] gam y-axis interpretation
Simon Wood
sw283 at maths.bath.ac.uk
Tue Mar 28 13:15:32 CEST 2006
All smooths in a GAM are `centred' in order to ensure model
identifiability. This means that a smooth, s, is estimated subject to the
constraint that \sum_i s(x_i)=0, where, x_i, are the covariate values.
So you can't transform back to the response scale just by applying the
inverse link, even if there is only one smooth. In the single smooth case,
you would need to add on the model intercept before applying the inverse
link. If you need plots on the response scale then it is best to use the
`predict' method function and have it return results on the `"response"'
scale...
best,
Simon
>- Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY
>- +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/
On Thu, 23 Mar 2006, Bliese, Paul D LTC USAMH wrote:
> Sorry if this is an obvious question...
>
>
>
> I'm estimating a simple binomial generalized additive model using the
> gam function in the package mgcv. The model makes sense given my data,
> and the predicted values also make sense given what I know about the
> data.
>
>
>
> However, I'm having trouble interpreting the y-axis of the plot of the
> gam object. The y-axis is labeled "s(x,2.52)" which I understand to
> basically mean a smoothing estimator with approximately 2.52 degrees of
> freedom. The y-axis in my case ranges from -2 to 6 and I thought that
> it would be possible to convert the Y axis estimate to a probability via
> exp(Y)/(1+exp(Y)). So for instance, my lowest y-axis estimate is -2 for
> a probability of:
>
>> exp(-2)/(1+exp(-2))
>
> [1] 0.1192029
>
>
>
> However, if I use the predict function my lowest estimate is -3.53862893
> for a probability of 2.8%. The 2.8% estimate is a much better estimate
> than 11.9% given my specific data, so I'm clearly not interpreting the
> plot correctly.
>
>
>
> The help files say plot.gam provides "the component smooth functions
> that make it up, on the scale of the
>
> linear predictor."
>
>
>
> I'm just not sure what that description means. Does someone have
> another description that might help me grasp the plot?
>
>
>
> Similar plots are on page 286 of Venables and Ripley (3rd Edition)...
>
>
>
> Thanks,
>
>
>
> Paul
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list