`predcov`

simulates from the posterior predictive distribution
of the model-implied covariance matrix.

1 | ```
predcov(x, ahead = 1, each = 1)
``` |

`x` |
Object of class |

`ahead` |
Vector of timepoints, indicating how many steps to predict ahead. |

`each` |
Single integer (or coercible to such) indicating how often should be drawn from the posterior predictive distribution for each draw that has been stored during MCMC sampling. |

4-dimensional array containing draws from the predictive covariance distribution.

Currently crudely implemented as a triple loop in pure R, may be slow.

Other predictors: `predcond`

,
`predcor`

, `predh`

,
`predloglikWB`

, `predloglik`

,
`predprecWB`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
## Not run:
set.seed(1)
sim <- fsvsim(series = 3, factors = 1) # simulate
res <- fsvsample(sim$y, factors = 1) # estimate
# Predict 1, 10, and 100 days ahead:
predobj <- predcov(res, ahead = c(1, 10, 100))
# Trace plot of draws from posterior predictive distribution
# of the covariance of Sim1 and Sim2:
# (one, ten, and 100 days ahead):
plot.ts(predobj[1,2,,])
# Smoothed kernel density estimates of predicted covariance
# of Sim1 and Sim2:
plot(density(predobj[1,2,,"1"], adjust = 2))
lines(density(predobj[1,2,,"10"], adjust = 2), col = 2)
lines(density(predobj[1,2,,"100"], adjust = 2), col = 3)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.