mgcv:gam automatically imposes sum-to-zero constraints on the smooths in
a model (even if there is only one smooth). This is to avoid lack of
identifiability with the intercept. The constraint removes one
coefficient and shifts the curve...
best,
Simon
On 17/06/14 15:40, Alexander Engelhardt
Hello Simon,
thanks for your response!
I incorporated the intercept, i.e. coef(my_gam)[1] into the spline. That
is, my B-spline coefficients are the intercept for the first one, and
for all others I added the intercept to them (see the code below if I'm
not clear)
Now I *almost* reproduce
Hello R-helpers,
I am working through Simon Wood's GAM book and want to specify my own
knot locations (on even tens, i.e. 10, 20, 30, etc.). Then, I want to
compute a GAM on that area, and given the coefficients, reconstruct the
same P-spline that is drawn in plot(my_gam).
I'm failing.
Here
3 matches
Mail list logo