Learn R Programming

bssm (version 0.1.8)

sde_ssm: Univariate state space model with continuous SDE dynamics

Description

Constructs an object of class sde_ssm by defining the functions for the drift, diffusion and derivative of diffusion terms of univariate SDE, as well as the log-density of observation equation. We assume that the observations are measured at integer times (missing values are allowed).

Usage

sde_ssm(y, drift, diffusion, ddiffusion, obs_pdf, prior_pdf, theta, x0,
  positive)

Arguments

y

Observations as univariate time series (or vector) of length \(n\).

drift, diffusion, ddiffusion

An external pointers for the C++ functions which define the drift, diffusion and derivative of diffusion functions of SDE.

obs_pdf

An external pointer for the C++ function which computes the observational log-density given the the states and parameter vector theta.

prior_pdf

An external pointer for the C++ function which computes the prior log-density given the parameter vector theta.

theta

Parameter vector passed to all model functions.

x0

Fixed initial value for SDE at time 0.

positive

If TRUE, positivity constraint is forced by abs in Millstein scheme.

Value

Object of class sde_ssm.

Details

As in case of nlg_ssm models, these general models need a bit more effort from the user, as you must provide the several small C++ snippets which define the model structure. See SDE vignette for an example.