expectation {bspec} | R Documentation |
Functions to compute (posterior) expectations or variances of the distributions specified as arguments.
expectation(x, ...) variance(x, ...) ## S3 method for class 'bspec': expectation(x, two.sided=x$two.sided, ...) ## S3 method for class 'bspec': variance(x, two.sided=x$two.sided, ...) ## S3 method for class 'bspecACF': expectation(x, ...) ## S3 method for class 'bspecACF': variance(x, ...)
x |
A bspec or
bspecACF object. |
two.sided |
A logical flag to indicate whether to compute
expectation / variance of one- or two-sided spectrum, if
the argument x is a bspec object. |
... |
A numeric
vector giving the expectations/variances
corresponding to the frequencies or lags of the argument.
Christian Roever, bspec@web.de
Roever, C., Meyer, R., Christensen, N. (2008): Modelling coloured noise. Arxiv preprint 0804.3853 [stat.ME], http://arxiv.org/abs/0804.3853, (submitted for publication).
# note the changing expectation # with increasing prior/posterior degrees-of-freedom: expectation(bspec(lh)) expectation(bspec(lh, priordf=1, priorscale=0.6)) expectation(bspec(lh, priordf=2, priorscale=0.6)) # similar for variance: variance(bspec(lh, priordf=2, priorscale=0.6)) variance(bspec(lh, priordf=3, priorscale=0.6)) # and again similar for autocovariances: expectation(acf(bspec(lh))) expectation(acf(bspec(lh, priordf=2, priorscale=0.6))) variance(acf(bspec(lh))) variance(acf(bspec(lh, priordf=4, priorscale=0.6)))