# NOT RUN {
## Bivariate Normal with mean (mu1, mu2) and covariance sigma
n <- 1e3
mu = c(2, 50)
sigma = matrix(c(1, 0.5, 0.5, 1), nrow = 2)
out = BVN_Gibbs(n, mu, sigma)
x = out[,1]
mcse(x)
mcse.q(x, 0.1)
mcse.q(x, 0.9)
# Estimate the mean, 0.1 quantile, and 0.9 quantile with MCSEs using overlapping batch means.
mcse(x, method = "obm")
mcse.q(x, 0.1, method = "obm")
mcse.q(x, 0.9, method = "obm")
# Estimate E(x^2) with MCSE using spectral methods.
g = function(x) { x^2 }
mcse(x, g = g, method = "tukey")
# }
Run the code above in your browser using DataLab