Re: [R] setting constraints on gam

2018-01-13 Thread Michael Dewey
Dear Alejandra in case you want to move on before Simon replies see inline On 12/01/2018 22:50, Alejandra Martínez Blancas wrote: Thanks Simon, by cloning a smooth construct do you mean copying and modifying the smooth constructor code? That is what I understand him to mean yes. (I believe it

Re: [R] setting constraints on gam

2018-01-12 Thread Alejandra Martínez Blancas
Thanks Simon, by cloning a smooth construct do you mean copying and modifying the smooth constructor code? Could you pleas elaborate on your answer? Which is the Predict.matrix method? 2018-01-12 3:20 GMT-06:00 Simon Wood : > There probably is a way, but it involves some programming. You would nee

Re: [R] setting constraints on gam

2018-01-12 Thread Simon Wood
There probably is a way, but it involves some programming. You would need to clone a smooth constructor (e.g. for the "cr" class), and then modify it to add a linear constraint matrix C to the returned smooth object. If b are the smooth coefficients then C should  be the matrix such that s(0) =

[R] setting constraints on gam

2018-01-11 Thread Alejandra Martínez Blancas
I am fitting a model in which the response variable y is a function of two independent, quantitative variables x1 and x2; thus: y = f(x1, x2). For reasons I do not believe to be important for the purpose of this post, I find it desirable to find f by means of GAM; also, I require principal effects