Description Usage Arguments Details Value References Examples
Calculate Geyer (1992) NSE estimator.
1 |
x |
A numeric vector or a matrix(only for type "bm"). |
type |
The type c("iseq","bm","obm","iseq.bm"). |
nbatch |
An optional parameter for the type m and iseq.bm. |
iseq.type |
constraints on function, ("pos") nonnegative, ("dec") nonnegative and nonincreasing, and ("con") nonnegative, nonincreasing, and convex. The default value is "pos". |
The type "iseq" is a wrapper around initseq from the MCMC package and gives the positive intial sequence estimator. The type "bm" is the batch mean estimator. The type "obm" is the overlapping batch mean estimator. The type "iseq.bm" is a combinaison of the two.
The variance estimator in the univariate case or the variance-covariance matrix estimator in the multivariate case.
Geyer, Charles J. "Practical markov chain monte carlo." Statistical Science (1992): 473-483.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | n = 1000
ar = c(0.9,0.6)
mean = c(1,5)
sd = c(10,2)
Ts1 = as.vector(arima.sim(n = n, list(ar = ar[1]), sd = sd[1]) + mean[1])
Ts2 = as.vector(arima.sim(n = n, list(ar = ar[2]), sd = sd[2]) + mean[2])
Ts = cbind(Ts1,Ts2)
nbatch = 30
nse::nse.geyer(x = Ts1, nbatch = nbatch, type = "bm",)
nse::nse.geyer(x = Ts, nbatch = nbatch , type = "bm")
nse::nse.geyer(x = Ts1 , type = "iseq", iseq.type = "pos")
nse::nse.geyer(x = Ts1, nbatch = nbatch, type = "iseq.bm", iseq.type = "con")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.