Re: [R] How to define degree=1 in mgcv

2010-01-25 Thread Simon Wood
On Monday 25 January 2010 02:40, hellen lee wrote: > Hi, all > > I have a question on mgcv and ns. Now I want to compare the results from > glm, gam and ns. Take a simple model y~x for example. > > glm1 = glm(y~x, data=data1) > gam1 = gam(y~s(x), data=data1) > ns1 = glm(y~ns(x),data=data1) > > In o

Re: [R] How to define degree=1 in mgcv

2010-01-25 Thread Gavin Simpson
On Sun, 2010-01-24 at 16:28 -0500, hellen lee wrote: > Hi, all > > I have a question on mgcv and ns. Now I want to compare the results from > glm, gam and ns. Take a simple model y~x for example. > > glm1 = glm(y~x, data=data1) > gam1 = gam(y~s(x), data=data1) > ns1 = glm(y~ns(x),data=data1) > >

[R] How to define degree=1 in mgcv

2010-01-24 Thread hellen lee
Hi, all I have a question on mgcv and ns. Now I want to compare the results from glm, gam and ns. Take a simple model y~x for example. glm1 = glm(y~x, data=data1) gam1 = gam(y~s(x), data=data1) ns1 = glm(y~ns(x),data=data1) In order to confirm the result from glm1 is consistent to those from gam

[R] How to define degree=1 in mgcv

2010-01-24 Thread hellen lee
Hi, all I have a question on mgcv and ns. Now I want to compare the results from glm, gam and ns. Take a simple model y~x for example. glm1 = glm(y~x, data=data1) gam1 = gam(y~s(x), data=data1) ns1 = glm(y~ns(x),data=data1) In order to confirm the result from glm1 is consistent to those from gam