# fda Package function smooth.basisPar

I have a data set of 100 subjects and each subject has 27 observations. But the observation time (I use the "age" when they got the exam here ) are different for each subject.The minimum age is 29 and maximum age is 96 in the data.

data are like this: SubjID obs1-obs27 age1-age7

My question is:

How to specify the basis? Here each subject has different observation time although they have same number of observations.

In the fda package, I would like to use function smooth.basisPar to smooth the data using specified penalty.

Before I use it, I specify the b-spline basis:

 bbasis<-create.bspline.basis(c(29,96),norder=6,breaks=seq(29,96,2))


Then I run smooth.basisPar

dbpfit<- smooth.basisPar(t(age),t(dbpdat),bbasis,Lfdobj=int2Lfd(4),lambda=1e-12)


But I got the error message;

Error in bsplineS(evalarg, breaks, norder, nderiv, returnMatrix) : Knots do not span the values of X

Thanks.

-