dprocess_spec | R Documentation |

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 `t_1`

to state `x_2`

at time `t_2>t_1`

under the assumption that the state remains unchanged
between `t_1`

and `t_2`

.
Then you can furnish

dprocess = f

to `pomp`

, where `f`

is a C snippet or **R** function that implements your procedure.
Specifically, `f`

should compute the *log* probability density.

Using a C snippet is much preferred, due to its much greater computational efficiency.
See `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 `t_1`

and `t_2`

.
The state variables at time `t_1`

will have their usual name (see `statenames`

) with a “`_1`

” appended.
Likewise, the state variables at time `t_2`

will have a “`_2`

” appended.

If `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 “`_2`

” appended.
Thus for example, if `var`

is a state variable, when `f`

is called, `var_1`

will value of state variable `var`

at time `t_1`

, `var_2`

will have the value of `var`

at time `t_2`

.
`f`

should return the *log* likelihood of a transition from `x1`

at time `t1`

to `x2`

at time `t2`

,
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 `dprocess`

.
In fact, no current pomp inference algorithm makes use of `dprocess`

.
This functionality is provided only to support future algorithm development.

By default, `dprocess`

returns missing values (`NA`

).

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 `cdir`

and `cfile`

options to cause the C snippets to be written to a file of your choice, thus avoiding the use of temporary files altogether.

`dprocess`

More on implementing POMP models:
`Csnippet`

,
`accumvars`

,
`basic_components`

,
`betabinomial`

,
`covariates`

,
`dinit_spec`

,
`dmeasure_spec`

,
`emeasure_spec`

,
`eulermultinom`

,
`parameter_trans()`

,
`pomp-package`

,
`pomp_constructor`

,
`prior_spec`

,
`rinit_spec`

,
`rmeasure_spec`

,
`rprocess_spec`

,
`skeleton_spec`

,
`transformations`

,
`userdata`

,
`vmeasure_spec`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.