Usage
BayesianNormal(times, X, model = c("OU", "CIR"), prior, start, random, nMCMC = 1000, propSd = 0.2)
Arguments
times
vector of observation times
X
matrix of the M trajectories (each row is a trajectory with $N= T/\Delta$ column).
model
name of the SDE: 'OU' (Ornstein-Uhlenbeck) or 'CIR' (Cox-Ingersoll-Ross).
prior
list of prior parameters: mean and variance of the Gaussian prior on the mean mu, shape and scale of the inverse Gamma prior for the variances omega, shape and scale of the inverse Gamma prior for sigma
start
list of starting values: mu, sigma
random
random effects in the drift: 1 if one additive random effect, 2 if one multiplicative random effect or c(1,2) if 2 random effects.
nMCMC
number of iterations of the MCMC algorithm
propSd
proposal standard deviation of $\phi$ is $|\mu|*$propSd$/\log(N)$ at the beginning, is adjusted when acceptance rate is under 30% or over 60%