To fully specify the unobserved Markov state process, one must give its distribution at the zero-time (t0
).
One does this by furnishing a value for the rinit
argument.
As usual, this can be provided either as a C snippet or as an R function.
In the former case, bear in mind that:
The goal of a this snippet is the construction of a state vector, i.e., the setting of the dynamical states at time \(t_0\).
In addition to the parameters and covariates (if any), the variable t
, containing the zero-time, will be defined in the context in which the snippet is executed.
NB: The statenames
argument plays a particularly important role when the rinit is specified using a C snippet.
In particular, every state variable must be named in statenames
.
Failure to follow this rule will result in undefined behavior.
General rules for writing C snippets can be found here.
If an R function is to be used, pass
rinit = f
to pomp
, where f
is a function with arguments that can include the initial time t0
, any of the model parameters, and any covariates.
As usual, f
may take additional arguments, provided these are passed along with it in the call to pomp
.
f
must return a named numeric vector of initial states.
It is of course important that the names of the states match the expectations of the other basic components.
Note that the state-process rinit
can be either deterministic (as in the default) or stochastic.
In the latter case, it samples from the distribution of the state process at the zero-time, t0
.