Re: [R] check.k function in mgcv packages

2012-07-01 Thread ywh123
Hi,thanks very much, I have some another questions about GAM models. First,Is there some restrictions on the sample size? For example,I am studying the GDP and foreign direct investment on 29 provinces in China(N=29).Whether or not N is too samll? If so,could I use pooled data(N=29,T=5)? Sec

Re: [R] check.k function in mgcv packages

2012-06-21 Thread Simon Wood
The point is that you are checking the basis dimension used in the first model, b, where the basis dimension for s(x2) was set to 6. All the other model fits are about checking that first one. On checking the residuals from model b you detect pattern with respect to x2, with an estimated degree

[R] check.k function in mgcv packages

2012-06-21 Thread ywh123
Hi,everyone, I am studying the generalized additive model and employ the package 'mgcv' developed by professor Wood. However,I can not understand the example listed in check.in function. For example, library(mgcv) set.seed(1) dat <- gamSim(1,n=400,scale=2) ## fit a GAM with quite low `k' b<-gam