dinit_spec | R Documentation |
Specification of the initial-state distribution density evaluator, dinit.
To fully specify the unobserved Markov state process, one must give its distribution at the zero-time (t0
).
One specifies how to evaluate the log probability density function for this distribution using the dinit
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 computation of a log likelihood, to be put into a variable named loglik
.
In addition to the state variables, parameters, and covariates (if any), the variable t
, containing the zero-time, will be defined in the context in which the snippet is executed.
General rules for writing C snippets can be found here.
If an R function is to be used, pass
dinit = f
to pomp
, where f
is a function with arguments that can include the time t
, any or all of the model state variables, parameters, and covariates.
As usual, f
may take additional arguments, provided these are passed along with it in the call to pomp
.
f
must return a single numeric value, the log likelihood.
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.
dinit
More on implementing POMP models:
Csnippet
,
accumvars
,
basic_components
,
betabinomial
,
covariates
,
dmeasure_spec
,
dprocess_spec
,
emeasure_spec
,
eulermultinom
,
parameter_trans()
,
pomp-package
,
pomp_constructor
,
prior_spec
,
rinit_spec
,
rmeasure_spec
,
rprocess_spec
,
skeleton_spec
,
transformations
,
userdata
,
vmeasure_spec
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.