[R] Help on GAM

Simon Wood s.wood at bath.ac.uk
Thu Mar 1 13:56:35 CET 2007


On Thursday 01 March 2007 08:38, Dacha Atienza wrote:
> I want to do this model using mgcv
>
> caco1.gam<-gam(caco1$Pa~s(caco1$T10)+s(caco1$S10)+s(caco1$C10), data=caco1)
> But I want to indicate the degrees of freedom of each term, how I have to
> do it?
e.g. 
s(caco1$T10,k=6,fx=TRUE)
will give you a 5 DoF term. (Alternatively you can supply smoothing parameters 
directly to gam, which ultimately control the termwise DoFs.) 

>
> Then, I saw that always the results refered to positive interactions, there
> are not negative ones?
- I don't understand this question. If you specifiy an interaction with 
something like te(x,z) then the effect of the response could be positive or 
negativedepending on the values of x and z.

Simon

-- 
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603  www.maths.bath.ac.uk/~sw283



More information about the R-help mailing list