I am using the CollocInfer package, which is heavily dependent on the fda package, in R to estimate the parameters of an ordinary differential equation. I am able to successfully implement the Generalized Profiling Method to get these parameter estimates, but I cannot figure out how to use the output from the Profile.LS() function to evaluate the estimated solution to the ODE at t0, which will give the estimate of the initial conditions for the ODE based on the data.
Edit My previous example was too simple and didn’t capture the problem. Below is the modified example.
Simple Example Suppose I have data x, y, which I smooth using a B-spline basis
require(fda)
x <- seq(0, 25)
y <- 3 + sin(x) + rnorm(1, 0, 1)
b.basis <- create.bspline.basis(range(x), nbasis=8, norder=4)
smooth.y <- smooth.basis(x, y, b.basis)
yfd <- smooth.y$fd
yfdPar <- fdPar(yfd, 1, 1)
yfd1 <- smooth.fd(yfd, yfdPar)
What is the (easiest) way to calculate the value of yfd1 at x=0?
You can evaluate a functional data object at specified argument values, using
eval.fd