Re: [R] physical constraint with gam

2016-05-16 Thread Dominik Schneider
Thanks for the clarification! On Sat, May 14, 2016 at 1:24 AM, Simon Wood wrote: > On 12/05/16 02:29, Dominik Schneider wrote: > > Hi again, > I'm looking for some clarification on 2 things. > 1. On that last note, I realize that s(x1,x2) would be the other obvious > interaction to compare with

Re: [R] physical constraint with gam

2016-05-14 Thread Simon Wood
On 12/05/16 02:29, Dominik Schneider wrote: > Hi again, > I'm looking for some clarification on 2 things. > 1. On that last note, I realize that s(x1,x2) would be the other > obvious interaction to compare with - and I see that you recommend > te(x1,x2) if they are not on the same scale. - yes th

Re: [R] physical constraint with gam

2016-05-13 Thread Simon Wood
On 11/05/16 17:11, Dominik Schneider wrote: > Hi Simon, Thanks for this explanation. > To make sure I understand, another way of explaining the y axis in my > original example is that it is the contribution to snowdepth relative > to the other variables (the example only had fsca, but my actual c

Re: [R] physical constraint with gam

2016-05-11 Thread Dominik Schneider
Hi again, I'm looking for some clarification on 2 things. 1. On that last note, I realize that s(x1,x2) would be the other obvious interaction to compare with - and I see that you recommend te(x1,x2) if they are not on the same scale. 2. If s(x1,by=x1) gives you a "parameter" value similar to a GLM

Re: [R] physical constraint with gam

2016-05-11 Thread Dominik Schneider
Hi Simon, Thanks for this explanation. To make sure I understand, another way of explaining the y axis in my original example is that it is the contribution to snowdepth relative to the other variables (the example only had fsca, but my actual case has a couple others). i.e. a negative s(fsca) of -

Re: [R] physical constraint with gam

2016-05-11 Thread Simon Wood
The spline having a positive value is not the same as a glm coefficient having a positive value. When you plot a smooth, say s(x), that is equivalent to plotting the line 'beta * x' in a GLM. It is not equivalent to plotting 'beta'. The smooths in a gam are (usually) subject to `sum-to-zero' id

Re: [R] physical constraint with gam

2016-05-11 Thread David Winsemius
> On May 10, 2016, at 5:30 PM, Dominik Schneider > wrote: > > Hi, > Just getting into using GAM using the mgcv package. I've generated some > models and extracted the splines for each of the variables and started > visualizing them. I'm noticing that one of my variables is physically > unrealis

[R] physical constraint with gam

2016-05-11 Thread Dominik Schneider
Hi, Just getting into using GAM using the mgcv package. I've generated some models and extracted the splines for each of the variables and started visualizing them. I'm noticing that one of my variables is physically unrealistic. In the example below, my interpretation of the following plot is tha