| make.transfer {CollocInfer} | R Documentation |
Transfer Functions
Description
Returns a list of functions that calculate the transform and its derivatives.
Usage
make.id()
make.exp()
make.exptrans()
make.genlin()
make.fhn()
make.Henon()
make.SEIR()
make.NS()
chemo.fun(times,y,p,more=NULL)
Arguments
All the functions
created by make... functions, require the arguments needed by chemo.fun
times |
Evaluation times |
y |
Values of the state at the evaluation times |
p |
Parameters to be used |
more |
A list of additional arguments, in this case |
Details
make.genlin requires the specification of further elements in the list. In particular
the element more should be a list containing
mata matrix defining the linear transform before any parameters are added. This may be all zero, but it may also specify fixed elements, if desired.suba k-by-3 matrix indicating which parameters should be entered into which elements ofmat. Each row is a triple giving the row and colum ofmatto be specified and the element of the parameter vector that should be substituted.subover-rides any values inmat.forceif input functions are given, these are given as a list.force.matspecifying the influence of the elements offorceon the state variables. Defined as inmat.force.subdefined as insub, over-rides the elements offorce.matwith parameter values.
make.diagnostics estimates forcing-function diagnostics as in Hooker, 2009 for
goodness-of-fit assessment. It requires
psiValues of a basis expansion for forcing functions at the quadrature points.whichWhich states are to be forced?fn,dfdx,d2fdx2Functions and derivatives as would be used to estimate parameters for the original equations.pars Parameters to go into
more$fn.
make.SEIR estimates parameters and a seasonal variation in the infection rate in an
SEIR model. It requires the specification of the seasonal change rate in more by
a list with objects
beta.funA function to calculate beta, it should have argumentst,pandbetadefand return a matrix giving the value of beta at timestwith parametersp.beta.dfdpShould calculate the derivative ofbeta.funwith respect top, at timestreturning a matrix. The matrix should be of sizelength(t)bylength(p)wherepis the entire parameter vector.betadefAdditional inputs (eg bases) tobeta.funandbeta.dfdp.
make.NS provides functions for the North Shore example. This is a possibly time-varying
forced linear system of one dimension. It requires more to specify betabasis to
describe the autoregressive coefficient, and alphabasis to provide a contant in front of
the functional data object rainfd.
chemo.fun Is a five-state predator-prey-resources model used as an example. It stands
alone as a function and should be used with the findif.ode functions.
Value
A list of functions that calculate the transform and its derivatives, in a form compatible with the collocation inference functions.
make.id |
returns the identity transform. |
make.exp |
returns the exponential transform. |
make.genlin |
returns a linear combination transform – see details section below. |
make.fhn |
returns the FitzHugh-Nagumo equations. |
make.Henon |
reutrns the Henon map. |
make.SEIR |
returns SEIR equations for estimating the shape of a seasonal forcing component. |
make.diagnostics |
functions to perform forcing function diagnostics. |
See Also
Examples
# Observe the FitzHugh-Nagumo equations
proc = make.SSEproc()
proc$more = make.fhn()
lik = make.SSElik()
lik$more = make.id()
# Observe an unknown scalar transform of each component of a Henon map, given
# in the first two elements of the parameter vector:
proc = make.Dproc()
proc$more = make.multinorm()
proc$more$more = c(make.Henon,make.cvar)
lik = make.multinorm()
lik$more = c(make.genlin,make.cvar)
lik$more$more = list(mat = matrix(0,2,2),sub=matrix(c(1,1,1,2,2,2),2,3,byrow=TRUE))
# Model SEIR equations on the log scale and then exponentiate
lik = make.SSElik()
lik$more = make.exp()
proc = make.SSEproc()
proc$more = make.logtrans()
proc$more$more = make.SEIR()