Learn R Programming

bsamGP (version 1.2.6)

fitted.bsam: Compute fitted values for a bsam object

Description

Computes pointwise posterior means and \(100(1-\alpha)\)% credible intervals of the fitted Bayesian spectral analysis models.

Usage


# S3 method for bsam
fitted(object, alpha = 0.05, HPD = TRUE, ...)

Value

A list object of class fitted.bsam containing posterior means and \(100(1-\alpha)\)% credible intervals. Generic function plot displays the results of the fit.

The output list includes the following objects:

fxobs

posterior estimates for unknown functions over observation.

fxgrid

posterior estimates for unknown functions over grid points.

wbeta

posterior estimates for parametric part.

yhat

posterior estimates for fitted values of response. For gbsar, it gives posterior estimates for expectation of response.

Arguments

object

a bsam object

alpha

a numeric scalar in the interval (0,1) giving the \(100(1-\alpha)\)% credible intervals.

HPD

a logical variable indicating whether the \(100(1-\alpha)\)% Highest Posterior Density (HPD) intervals are calculated. If HPD=FALSE, the \(100(1-\alpha)\)% equal-tail credible intervals are calculated. The default is TRUE.

...

not used

Details

None.

See Also

bsaq, bsaqdpm, bsar, bsardpm

Examples

Run this code
## See examples for bsaq, bsaqdpm, bsar, and bsardpm

Run the code above in your browser using DataLab