Re: [R] gamm design matrices

2014-03-06 Thread Linus
Hello Jarrod and Simon, i have a similiar issue. I want to use splines with the MCMCglmm-package. I need the packages for various reasons. I try to incorporate the splines via JarrodĀ“s function, which based on the mgvc-package. I attached my data and codes. For the thin-plate-splines the fixed

Re: [R] gamm design matrices

2014-03-03 Thread Simon Wood
Dear Jarrod, I've only managed to have a very quick look at this, but I wonder if the difference is to do with identifiability constraints? It looks to me as if your smooth.construct call does not have sum to zero constraints applied to the smooth, but by default 'gamm' will impose these

Re: [R] gamm design matrices

2014-03-03 Thread Jarrod Hadfield
Hi Simon, That's perfect - the matrices now agree. Thanks, Jarrod Quoting Simon Wood s.w...@bath.ac.uk on Mon, 03 Mar 2014 13:35:04 +: Dear Jarrod, I've only managed to have a very quick look at this, but I wonder if the difference is to do with identifiability constraints? It looks

Re: [R] gamm design matrices

2014-03-03 Thread Jarrod Hadfield
Hi Simon, Sorry, I spoke too soon. I now have the basic spline code working but with `by' variables I get an error in smoothCon: Error in ExtractData(object, data, knots) : 'names' attribute [1] must be the same length as the vector [0] and a segfault with smooth.construct (see example

[R] gamm design matrices

2014-03-02 Thread Jarrod Hadfield
Hi All, I would like to fit a varying coefficient model using MCMCglmm. To do this it is possible to reparameterise the smooth terms as a mixed model as Simon Wood neatly explains in his book. Given the original design matrix W and penalisation matrix S, I would like to find the fixed