Description Details Note Default behavior See Also
Specification of dprocess.
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.
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
).
Other information on model implementation: Csnippet
,
accumulators
,
covariate_table
,
distributions
, dmeasure_spec
,
parameter_trans
,
pomp2-package
, prior_spec
,
rinit_spec
, rmeasure_spec
,
rprocess_spec
, skeleton_spec
,
transformations
, userdata
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.