Specification of the latent state process density function, dprocess.
Suppose you have a procedure that allows you to compute the probability density
of an arbitrary transition from state
x_1 at time
x_2 at time
under the assumption that the state remains unchanged
Then you can furnish
dprocess = f
f is a C snippet or R function that implements your procedure.
f should compute the log probability density.
Using a C snippet is much preferred, due to its much greater computational efficiency.
Csnippet for general rules on writing C snippets.
The goal of a dprocess C snippet is to fill the variable
loglik with the log probability density.
In the context of such a C snippet, the parameters, and covariates will be defined, as will the times
The state variables at time
t_1 will have their usual name (see
statenames) with a “
Likewise, the state variables at time
t_2 will have a “
f is given as an R function, it should take as arguments any or all of the state variables, parameter, covariates, and time.
The state-variable and time arguments will have suffices “
_1” and “
Thus for example, if
var is a state variable, when
f is called,
var_1 will value of state variable
var at time
var_2 will have the value of
var at time
f should return the log likelihood of a transition from
x1 at time
x2 at time
assuming that no intervening transitions have occurred.
To see examples, consult the demos and the tutorials on the package website.
It is not typically necessary (or even feasible) to define
In fact, no current pomp inference algorithm makes use of
This functionality is provided only to support future algorithm development.
dprocess returns missing values (
Some Windows users report problems when using C snippets in parallel computations.
These appear to arise when the temporary files created during the C snippet compilation process are not handled properly by the operating system.
To circumvent this problem, use the
cfile options to cause the C snippets to be written to a file of your choice, thus avoiding the use of temporary files altogether.
More on implementing POMP models:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.