| quantile.bspec {bspec} | R Documentation |
Function to compute quantiles of the spectrum's posterior
distribution specified through the supplied bspec
object argument.
## S3 method for class 'bspec': quantile(x, probs = c(0.025, 0.5, 0.975), two.sided = x$two.sided, ...)
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. |
... |
The posterior distribution is a product of independent scaled inverse chi-squared distributions.
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.
Christian Roever, bspec@web.de
lhspec <- bspec(lh)
# posterior medians:
print(cbind("frequency"=lhspec$freq,
"median"=quantile(lhspec, 0.5)))