Description Usage Arguments Value References See Also Examples
Print a summary of a bsts
object.
1 2 | ## S3 method for class 'bsts'
summary(object, burn = SuggestBurn(.1, object), ...)
|
object |
An object of class |
burn |
The number of MCMC iterations to discard as burn-in. |
... |
Additional arguments passed to
|
Returns a list with the following elements.
residual.sd |
The posterior mean of the residual standard deviation parameter. |
prediction.sd |
The standard deviation of the one-step-ahead prediction errors for the training data. |
rsquare |
Proportion by which the residual variance is less than the variance of the original observations. |
relative.gof |
Harvey's goodness of fit statistic. Let nu denote the one step ahead prediction errors, n denote the length of the series, and y denote the original series. The goodness of fit statistic is 1 - sum(nu^2) / (n-2) * var(diff(y)). This statistic is analogous to rsquare in a regression model, but the reduction in sum of squared errors is relative to a random walk with a constant drift, y[t+1] = y[t] + beta + epsilon[t], which Harvey (1989, equation 5.5.14) argues is a more relevant baseline than a simple mean. Unlike a traditional R-square statistic, this can be negative. |
size |
Distribution of the number of nonzero coefficients appearing in the model |
coefficients |
If
|
Harvey's goodness of fit statistic is from Harvey (1989) Forecasting, structural time series models, and the Kalman filter. Page 268.
bsts
, plot.bsts
, summary.lm.spike
1 2 3 4 5 6 | data(AirPassengers)
y <- log(AirPassengers)
ss <- AddLocalLinearTrend(list(), y)
ss <- AddSeasonal(ss, y, nseasons = 12)
model <- bsts(y, state.specification = ss, niter = 100)
summary(model, burn = 20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.