Description Usage Arguments Value Syntactical jargon Warning Note Author(s) References See Also Examples
BiJGQD.mcmc()
uses parametrised coefficients (provided by the user as Rfunctions) to construct a C++ program in real time that allows the user to perform Bayesian inference on the resulting diffusion model. Given a set of starting parameters and other input parameters, a MCMC chain is returned for further analysis. The user may specify any model within the JGQD framework by defining parametrised functions giving the form of the coefficients of the model.
That is, BiJGQD.density
generates approximate transitional densities for a class of bivariate jump diffusion processes with SDE:
where
and
describes a bivariate Poisson process with jump matrix:
and intensity vector
1 2 3 4 5 
X 
A matrix containing rows of data points to be modelled. Although observations are allowed to be nonequidistant, observations in both dimensions are assumed to occur at the same time epochs (i.e. 
time 
A vector containing the time epochs at which observations were made. 
mesh 
The number of mesh points in the time discretization. 
theta 
The parameter vector of the process. theta are taken as the starting values of the MCMC chain and gives the dimension of the parameter vector used to calculate the DIC. Care should be taken to ensure that each element in theta is in fact used within the coefficientfunctions, otherwise redundant parameters will be counted in the calculation of the DIC. 
sds 
Proposal distribution standard deviations. That is, for the ith parameter the proposal distribution is ~ Normal(..., 
updates 
The number of MCMC updates/iterations to perform (including burnin). 
burns 
The number of MCMC updates/iterations to burn. 
exclude 
Vector indicating which transitions to exclude from the analysis. Default = 
plot.chain 
If = TRUE (default), a trace plot of the MCMC chain will be made along with a trace of the acceptance rate. 
RK.order 
The order of the RungeKutta solver used to approximate the trajectories of cumulants. Must be 4 (default) or 10. 
Tag 

Dtype 
The density approximant to use. Valid types are 
Jdist 
Valid entries are 'MVNormal' (currently). 
Jtype 
Valid types are 1 or 2. 
adapt 
For development purposes. 
wrt 
If 
print.output 
If 
decode 
Should the algorithm estimate jump detection probabilities? Default value is 
palette 
Colour palette for drawing trace plots. Default 
par.matrix 
A matrix containing the MCMC chain on 
acceptence.rate 
A vector containing the acceptance rate of the MCMC at every iteration. 
model.info 
A list of variables pertaining to inference calculations. 
model.info$elapsed.time 
The runtime, in h/m/s format,of the MCMC procedure (excluding compile time). 
model.info$time.homogeneous 
‘No’ if the model has timehomogeneous coefficients and ‘Yes’ otherwise. 
model.info$p 
The dimension of 
model.info$DIC 
Calculated Deviance Information Criterion. 
model.info$pd 
Effective number of parameters (see 
decode.prob 
Estimated jump detection probabilities. 
Synt. [1]: The coefficients of the 2D JGQD may be parameterized using the reserved variable theta
. For example:
a00 < function(t){theta[1]*(theta[2]+sin(2*pi*(ttheta[3])))}
.
Synt. [2]: Due to syntactical differences between R and C++ special functions have to be used when terms that depend on t
. When the function cannot be separated in to terms that contain a single t
, the prod(a,b)
function must be used. For example:
a00 < function(t){0.1*(10+0.2*sin(2*pi*t)+0.3*prod(sqrt(t),1+cos(3*pi*t)))}
.
Here sqrt(t)*cos(3*pi*t) constitutes the product of two terms that cannot be written i.t.o. a single t
. To circumvent this isue, one may use the prod(a,b)
function.
Synt. [3]: Similarly, the ^  operator is not overloaded in C++. Instead the pow(x,p)
function may be used to calculate x^p. For example sin(2*pi*t)^3 in:
a00 < function(t){0.1*(10+0.2*pow(sin(2*pi*t),3))}
.
Warning [1]: The parameter mesh
is used to discretize the transition horizons between successive observations. It is thus important to ensure that mesh
is not too small when large time differences are present in time
. Check output for max(dt) and divide by mesh
.
Note [1]: When plot.chain
is TRUE
, a trace plot is created of the resulting MCMC along with the acceptance rate at each update. This may save time when
scrutinizing initial MCMC runs.
Etienne A.D. Pienaar [email protected]
Updates available on GitHub at https://github.com/eta21.
Daniels, H.E. 1954 Saddlepoint approximations in statistics. Ann. Math. Stat., 25:631–650.
Eddelbuettel, D. and Romain, F. 2011 Rcpp: Seamless R and C++ integration. Journal of Statistical Software, 40(8):1–18,. URL http://www.jstatsoft.org/v40/i08/.
Eddelbuettel, D. 2013 Seamless R and C++ Integration with Rcpp. New York: Springer. ISBN 9781461468677.
Eddelbuettel, D. and Sanderson, C. 2014 Rcpparmadillo: Accelerating R with highperformance C++ linear algebra. Computational Statistics and Data Analysis, 71:1054–1063. URL http://dx.doi.org/10.1016/j.csda.2013.02.005.
Feagin, T. 2007 A tenthorder RungeKutta method with error estimate. In Proceedings of the IAENG Conf. on Scientifc Computing.
Varughese, M.M. 2013 Parameter estimation for multivariate diffusion systems. Comput. Stat. Data An., 57:417–428.
JGQD.remove
and JGQD.mcmc
.
1 2 3 4 5 6 7 8 9 10  #===============================================================================
# For detailed notes and examples on how to use the BiJGQD.mcmc() function, see
# the following vignette:
RShowDoc('Part_4_Likelihood_Inference',type='html','DiffusionRjgqd')
#===============================================================================

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.