nse.geyer {nse} | R Documentation |
Geyer estimator
Description
Function which calculates the numerical standard error with the method of Geyer (1992).
Usage
nse.geyer(
x,
type = c("iseq", "bm", "obm", "iseq.bm"),
nbatch = 30,
iseq.type = c("pos", "dec", "con")
)
Arguments
x |
A numeric vector. |
type |
The type which can be either |
nbatch |
Number of batches when |
iseq.type |
Constraints on function: |
Details
The type "iseq"
gives the positive intial sequence estimator, "bm"
is the batch mean estimator,
"obm"
is the overlapping batch mean estimator and "iseq.bm"
is a combination of "iseq"
and "bm"
.
Value
The NSE estimator.
Note
nse.geyer
relies on the packages mcmc
and mcmcse
; see
the documentation of these packages for more details.
Author(s)
David Ardia and Keven Bluteau
References
Geyer, C.J. (1992). Practical Markov chain Monte Carlo. Statistical Science 7(4), .473-483.
Examples
## Not run:
n = 1000
ar = 0.9
mean = 1
sd = 1
set.seed(1234)
x = c(arima.sim(n = n, list(ar = ar), sd = sd) + mean)
nse.geyer(x = x, type = "bm", nbatch = 30)
nse.geyer(x = x, type = "obm", nbatch = 30)
nse.geyer(x = x, type = "iseq", iseq.type = "pos")
nse.geyer(x = x, type = "iseq.bm", iseq.type = "con")
## End(Not run)