| inneropt {CollocInfer} | R Documentation | 
Inner Optimization Functions
Description
Estmates coefficients given parameters.
Usage
inneropt(data,times,pars,coefs,lik,proc,in.meth='nlminb',control.in=list())
Arguments
| data | Matrix of observed data values. | 
| times | Vector observation times for the data. | 
| pars | Initial values of parameters to be estimated processes. | 
| coefs | Vector giving the current estimate of the coefficients in the spline. | 
| lik | 
 | 
| proc | 
 | 
| in.meth |  Inner optimization function currently one of 'nlminb', 'maxNR', 'optim', 'trust' or 'SplineEst'.
The last calls  | 
| control.in | Control object for inner optimization function. | 
Details
This minimizes the objective function defined by the addition of the lik
and proc objectives with respect to the coefficients. A number of generic
optimization routines can be used and some experimentation is recommended. 
Value
A list with elements
| coefs | A matrix giving he optimized coefficients. | 
| res | The results of the inner optimization function. | 
See Also
outeropt, Smooth.LS,LS.setup, multinorm.setup, SplineCoefsErr
Examples
## Not run: 
# FitzHugh-Nagumo Equations
data(FhNdata)   # Some data
knots = seq(0,20,0.2)         # Create a basis
norder = 3
nbasis = length(knots) + norder - 2
range = c(0,20)
bbasis = create.bspline.basis(range=range(FhNtimes),nbasis=nbasis,
                                    norder=norder,breaks=knots)
lambda = 10000               # Penalty value
DEfd = smooth.basis(FhNtimes,FhNdata,fdPar(bbasis,1,0.5))   # Smooth to estimate
                                                            # coefficients first
coefs = DEfd$fd$coefs
colnames(coefs) = FhNvarnames
profile.obj = LS.setup(pars=FhNpars,coefs=coefs,fn=make.fhn(),
                        basisvals=bbasis,lambda=lambda,times=FhNtimes)
lik = profile.obj$lik
proc= profile.obj$proc
res = inneropt(FhNdata,times=FhNtimes,FhNpars,coefs,lik,proc,in.meth='nlminb')
plot(fd(res$coefs,bbasis))
## End(Not run)