# asympvar: Asymptotic Variance In geoRglm: A Package for Generalised Linear Spatial Models

## Description

Calculates the initial monotone/positive sequence estimate of the asymptotic variance from CLT (Geyer 92). Useful for estimation of the variance of a Markov Chain Monte Carlo estimate.

## Usage

 `1` ```asympvar(timeseries, type="mon", lag.max = 100, messages) ```

## Arguments

 `timeseries` a vector with a timeseries, or a matrix where the rows are different timeseries. `type` `"pos"` and `"mon"` gives the monotone and the positive sequence estimator, respectively, and `"all"` gives both. Default is `type="mon"`. `lag.max` maximum lag at which to calculate the asymptotic variance. Default is `lag.max = 100`. `messages` logical. If `TRUE`, the default, status messages are printed while the function is running.

## Value

A number (or a vector) with the estimate, when `type="mon"` or `type="pos"`. A list with components `mon` and `pos` when `type="all"`

## Author(s)

The orginal Splus version of this function was written by Rasmus Waagepetersen. R port by
Ole F. Christensen OleF.Christensen@agrsci.dk,
Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br.

## References

Geyer, C. (1992). Practical Monte Carlo (with discussion). Statist. Sci. 7, 473-511.

Further information about geoRglm can be found at:
http://gbi.agrsci.dk/~ofch/geoRglm.

## Examples

 ```1 2 3 4 5 6 7 8``` ```data(p50) ## Not run: test <- pois.krige(p50, krige = krige.glm.control(cov.pars = c(1,1), beta = 1), mcmc.input = mcmc.control(S.scale = 0.5, n.iter = 1000, thin = 1)) asympvar(test\$intensity[45,]) ass <- asympvar(test\$intensity[1:10,], type = "pos") ## End(Not run) ```

geoRglm documentation built on May 2, 2019, 4:03 p.m.