quantile.bspec {bspec}R Documentation

Quantiles of the posterior spectrum

Description

Function to compute quantiles of the spectrum's posterior distribution specified through the supplied bspec object argument.

Usage

## S3 method for class 'bspec'
quantile(x, probs = c(0.025, 0.5, 0.975),
  two.sided = x$two.sided, ...)

Arguments

x

a bspec object.

probs

a numerical vector of probabilities.

two.sided

a logical flag indicating whether quantiles are supposed to correspond to the one-sided or two-sided spectrum.

...

currently unused.

Details

The posterior distribution is a product of independent scaled inverse \chi^2 distributions.

Value

A matrix with columns corresponding to elements of probs, and rows corresponding to the Fourier frequencies x$freq. If probs is of length 1, a vector is returned instead.

Author(s)

Christian Roever, christian.roever@med.uni-goettingen.de

See Also

bspec, quantile

Examples

lhspec <- bspec(lh)

# posterior medians:
print(cbind("frequency"=lhspec$freq,
            "median"=quantile(lhspec, 0.5)))

[Package bspec version 1.6 Index]