# nse.geyer: Geyer estimator In nse: Numerical Standard Errors Computation in R

## Description

Function which calculates the numerical standard error with the method of Geyer (1992).

## Usage

 ```1 2 3 4 5 6``` ```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 `"iseq"`, `"bm"`, `"obm"` or `"iseq.bm"`. See *Details*. Default is `type = "iseq"`. `nbatch` Number of batches when `type = "bm"` and `type = "iseq.bm"`. Default is `nbatch = 30`. `iseq.type` Constraints on function: `"pos"` for nonnegative, `"dec"` for nonnegative and nonincreasing, and `"con"` for nonnegative, nonincreasing, and convex. Default is `iseq.type = "pos"`.

## 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

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```## 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) ```

nse documentation built on April 26, 2021, 1:06 a.m.