simulate_langevin_diffusion_mixG: Exact Algorithm for langevin diffusion with pi as a tempered...

Description Usage Arguments Value Examples

Description

Simulate langevin diffusion using the Exact Algorithm with pi = exp(-(beta*x^4)/2)

Usage

1
2
simulate_langevin_diffusion_mixG(x0, y, s, t, K, weights, means, sds, beta,
  accept_prob = FALSE)

Arguments

x0

start value

y

end value

s

start time

t

end time

K

lower bound of the phi function

weights

vector: weights of mixture Gaussian

means

vector: means of mixture Gassuan

sds

vector: st.devs of mixture Gaussian

beta

real value between 0 and 1

accept_prob

boolean value: defaults to F, determined whether or not to return acceptance prob (T) or a skeleton of the diffusion (F)

Value

accept_prob real value if accept_prob = TRUE

layered_bb matrix holding skeleton of the diffusion

Examples

1
2
3
4
lower_bound <- lower_bound_phi_function_mixG(weights = c(0.4, 0.6), means = c(-3, 9), sds = c(1,1), 1)
test <- simulate_langevin_diffusion_mixG(x0 = 0.6, y = 1.2, s = 0, t = 2, K = lower_bound, accept_prob = FALSE,
                                         weights = c(0.5, 0.5), means = c(-2, 2), sds = c(1,1), beta = 1)
plot(x = test['time',], y = test['X',], type = 'l')

rchan26/mixGaussTempering documentation built on June 14, 2019, 3:26 p.m.