uwerr: Time Series Analysis With Gamma Method

View source: R/UWerr.R

uwerrR Documentation

Time Series Analysis With Gamma Method

Description

Analyse time series data with the so called gamma method

Usage

uwerr(f, data, nrep, S = 1.5, pl = FALSE, ...)

Arguments

f

function computing the derived quantity. If not given it is assumed that a primary quantity is analysed.

f must have the data vector of length Nalpha as the first argument. Further arguments to f can be passed to uwerr via the ... argument.

f may return a vector object of numeric type.

data

array of data to be analysed. It must be of dimension (N x Nalpha) (i.e. N rows and Nalpha columns), where N is the total number of measurements and Nalpha is the number of primary observables

nrep

the vector (N1, N2, ...) of replica length N1, N2

S

initial guess for the ratio tau/tauint, with tau the exponetial autocorrelation length.

pl

logical: if TRUE, the autocorrelation function, the integrated autocorrelation time as function of the integration cut-off and (for primary quantities) the time history of the observable are plotted with plot.uwerr

...

arguments passed to function f.

Value

In case of a primary observable (uwerrprimary), an object of class uwerr with basis class list containing the following objects

value

the expectation value of the obsevable

dvalue

the error estimate

ddvalue

estimate of the error on the error

tauint

estimate of the integrated autocorrelation time for that quantity

dtauint

error of tauint

Qval

the p-value of the weighted average in case of several replicas

In case of a derived observable (uwerrderived), i.e. if a function is specified, the above objects are contained in a list called res.

uwerrprimary returns in addition

data

input data

whereas uwerrderived returns

datamean

(vector of) mean(s) of the (vector of) data

and in addition

fgrad

the estimated gradient of f

and

f

the input statistics

In both cases the return object containes

Wopt

value of optimal cut-off for the Gamma function integration

Wmax

maximal value of the cut-off for the Gamma function integration

tauintofW

integrated autocorrelation time as a function of the cut-off W

dtauintofW

error of the integrated autocorrelation time as a function of the cut-off W

S

input parameter S

N

total number of observations

R

number of replicas

nrep

vector of observations per replicum

Gamma

normalised autocorrelation function

primary

set to 1 for uwerrprimary and 0 for uwerrderived

Author(s)

Carsten Urbach, curbach@gmx.de

References

“Monte Carlo errors with less errors”, Ulli Wolff, Comput.Phys.Commun. 156 (2004) 143-153, Comput.Phys.Commun. 176 (2007) 383 (erratum), hep-lat/0306017

See Also

plot.uwerr

Examples


data(plaq.sample)
plaq.res <- uwerrprimary(plaq.sample)
summary(plaq.res)
plot(plaq.res)


hadron documentation built on Sept. 9, 2022, 5:06 p.m.