dprocess_spec: The latent state process density

Description Details Note Default behavior Note for Windows users See Also

Description

Specification of dprocess.

Details

Suppose you have a procedure that allows you to compute the probability density of an arbitrary transition from state x1 at time t1 to state x2 at time t2 under the assumption that the state remains unchanged between t1 and t2. Then you can furnish

1
    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.

Note

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.

Default behavior

By default, dprocess returns missing values (NA).

Note for Windows users

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 (described here) to cause the C snippets to be written to a file of your choice, thus avoiding the use of temporary files altogether.

See Also

More on implementing POMP models: Csnippet, accumulators, basic_components, covariate_table(), distributions, dmeasure_spec, parameter_trans(), pomp-package, prior_spec, rinit_spec, rmeasure_spec, rprocess_spec, skeleton_spec, transformations, userdata


pomp documentation built on July 28, 2021, 5:10 p.m.