nse.geyer: Variance of sample mean of functional of reversible Markov...

Description Usage Arguments Details Value References Examples

Description

Calculate Geyer (1992) NSE estimator.

Usage

1
2
nse.geyer(x, type = c("iseq", "bm", "obm", "iseq.bm"), nbatch = 30,
  iseq.type = c("pos", "dec", "con"))

Arguments

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".

Details

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.

Value

The variance estimator in the univariate case or the v ariance-covariance matrix estimator in the multivariate case.

References

Geyer, Charles J. "Practical markov chain monte carlo." Statistical Science (1992): 473-483.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
n    = 1000
ar   = 0.9
mean = 1
sd   = 1
set.seed(1234)
x = as.vector(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")
 

braverock/nse documentation built on May 13, 2019, 5:03 a.m.