nse.geyer | R Documentation |
Function which calculates the numerical standard error with the method of Geyer (1992).
nse.geyer( x, type = c("iseq", "bm", "obm", "iseq.bm"), nbatch = 30, iseq.type = c("pos", "dec", "con") )
x |
A numeric vector. |
type |
The type which can be either |
nbatch |
Number of batches when |
iseq.type |
Constraints on function: |
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"
.
The NSE estimator.
nse.geyer
relies on the packages mcmc
and mcmcse
; see
the documentation of these packages for more details.
David Ardia and Keven Bluteau
Geyer, C.J. (1992). Practical Markov chain Monte Carlo. Statistical Science 7(4), .473-483.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.