# \donttest{
set.seed(1)
x <- seq(-2, 2, length.out = 60)
X <- cbind(1, x)
y <- 0.5 * x + (1.2 + 0.35 * x) * stats::rnorm(length(x))
q_true <- 0.5 * x + (1.2 + 0.35 * x) * stats::qnorm(0.25)
fit_ldvb <- exalStaticLDVB(
y = y, X = X, p0 = 0.25,
max_iter = 60, tol = 1e-3,
verbose = FALSE
)
fit_mcmc <- exalStaticMCMC(
y = y, X = X, p0 = 0.25,
n.burn = 60, n.mcmc = 60,
mh.proposal = "slice",
verbose = FALSE
)
out <- exalStaticDiagnostics(fit_ldvb, fit_mcmc, ref = q_true, plot = FALSE)
print(out)
# }
Run the code above in your browser using DataLab