Learn R Programming

pomp (version 0.34-1)

traj.match: Trajectory matching

Description

Match trajectories.

Usage

traj.match(object, start, est, method = "Nelder-Mead", gr = NULL, ...)

Arguments

object
A pomp object.
start
Initial guess for parameters.
est
Character vector containing the names of parameters to be estimated.
method
One of the optimization methods recognized by optim.
gr
Passed to optim.
...
Arguments that will be passed to optim in the control list.

Details

Trajectory matching is accomplished using optim. The trajectory method is used for this, which in turn uses the skeleton slot of the pomp object.

See Also

optim, trajectory, pomp, pomp-class

Examples

Run this code
data(ou2)
  true.p <- c(
	      alpha.1=0.9,alpha.2=0,alpha.3=-0.4,alpha.4=0.99,
	      sigma.1=2,sigma.2=0.1,sigma.3=2,
	      tau=1,
              x1.0=50,x2.0=-50
	      )
  simdata <- simulate(ou2,nsim=1,params=true.p,seed=43553)
  guess.p <- true.p
  res <- traj.match(
		    simdata,
		    start=guess.p,
		    est=c('alpha.1','alpha.3','alpha.4','x1.0','x2.0','tau'),
		    maxit=2000,
		    method="Nelder-Mead",
		    reltol=1e-8
		    )

Run the code above in your browser using DataLab