BayesianNormal function

Bayesian Estimation In Mixed Stochastic Differential Equations

Bayesian Estimation In Mixed Stochastic Differential Equations

Gibbs sampler for Bayesian estimation of the random effects (αj,βj)(\alpha_j, \beta_j) in the mixed SDE dXj(t)=(αjβjXj(t))dt+σa(Xj(t))dWj(t)dX_j(t)= (\alpha_j- \beta_j X_j(t))dt + \sigma a(X_j(t)) dW_j(t).

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/Δ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)/\log(N) at the beginning, is adjusted when acceptance rate is under 30% or over 60%

Returns

  • alpha: posterior samples (Markov chain) of α\alpha

  • beta: posterior samples (Markov chain) of β\beta

  • mu: posterior samples (Markov chain) of μ\mu

  • omega: posterior samples (Markov chain) of Ω\Omega

  • sigma2: posterior samples (Markov chain) of σ2\sigma^2

References

Hermann, S., Ickstadt, K. and C. Mueller (2016). Bayesian Prediction of Crack Growth Based on a Hierarchical Diffusion Model. Appearing in: Applied Stochastic Models in Business and Industry.

Rosenthal, J. S. (2011). 'Optimal proposal distributions and adaptive MCMC.' Handbook of Markov Chain Monte Carlo (2011): 93-112.