<HTML><BODY><SPAN>
<P> </P>
<P>Hello,</P>
<P>I'm new to the list. I'm trying to make an ode parameter estimation of my own data, following the <U>CollocInfer Manual </U>FHN(FitzHugh Nagumo) analysis, beginning p.47, as closely as possible.</P>
<P>I've attached my ode function "vocab11fn" separately for convenience.</P>
<P>I've been concerned about size of the penalty matrix in the smooth, but I think I've made a smooth.basis with this data and'cbasis'(below) so it seems to me the matrix sizes are ok.</P>
<P>Having tried a number of different entry points in "revising" my data analysis scripts, it seems that someone with some experience with the CI 'program'(or with the matlab analogue which I'm also happy to work with) might be able to make a wise suggestion, and I'll be very grateful for any help.</P>
<P>Here's my input:</P>
<P></P>
<P>knots2 = seq(0,20,2)</P>
<P>norder = 3</P>
<P>nbasis2 = length(knots2) + norder - 2</P>
<P>range = c(0,20)</P>
<P>breaks=knots2</P>
<P>cbasis = create.bspline.basis(range=range, nbasis=nbasis2, norder=norder,</P>
<P>breaks=knots2)</P>
<P>times2=c(0:11)</P>
<P>pars=c(0.1,0.01,0.01,0.01)</P>
<P>names(pars)=c("c","d","a","b")</P>
<P>x0=c(10,1)</P>
<P>names(x0)=c("V","S")</P>
<P>vocab11fn=make.vocab11fn() </P>
<P>y = lsoda(x0,times,vocab11fn$fn.ode,pars)</P>
<P>z=rnorm(12,1)</P>
<P>z2=rnorm(12,0.1) [<I>my own version of y + noise</I>]</P>
<P>z5<-data.frame(0.5*z,0.5*z2)</P>
<P>data<-as.matrix(z5)</P>
<P>V<-c(10,14,16,18,19,25,34,36,46,57,68,79) [<I>my own data set</I>]</P>
<P>S<-c(1,1,1,1,2,2,2,2,3,3,4,4)</P>
<P>newvs<-data.frame(V,S)</P>
<P>NEWVSDATA<-as.matrix(newvs)</P>
<P>NEWVS<-as.array(NEWVSDATA,dim=c(12,1,2)</P>
<P>assign("fd.data",array(NEWVS,c(nrow(NEWVS),1,ncol(NEWVS))))</P>
<P> </P>
<P>DEfd7 = Data2fd(fd.data, times2, cbasis,</P>
<P>fdnames=list(NULL,NULL,varnames))</P>
<P> </P>
<P>coefs=DEfd7$coefs <I>[here I've left out "[,1,] because it didn't work with fhn, and I got the</I></P>
<P>fhn coefficients without it]</P>
<P>varnames=c("V","S")</P>
<P>colnames(coefs) = varnames <I>[I had trouble with this but it doesn't seem crucial to the analysis</I>]</P>
<P>control=list()</P>
<P>control$trace = 0</P>
<P>control$maxit = 1000</P>
<P>control$maxtry = 10</P>
<P>control$reltol = 1e-6</P>
<P>control$meth = "BFGS"</P>
<P>control.in = control</P>
<P>control.in$reltol = 1e-12</P>
<P>control.in$print.level = 0</P>
<P>control.in$iterlim = 1000</P>
<P>control.out = control</P>
<P>control.out$trace = 2</P>
<P>res0 = Profile.LS(vocab11fn,NEWVS,times2,pars,coefs=coefs,basisvals=cbasis,</P>
<P>lambda=lambda,in.meth="nlminb",out.meth="ProfleGN",</P>
<P>control.in=control.in,control.out=control.out)</P>
<P>regards,</P>
<P>shfets</P></SPAN><BR><BR>--<BR><BR></BODY></HTML>