Description Usage Arguments Details Value Author(s) References See Also Examples
Fitting a Stochastic Volatility model (SVM) in Stan.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | stan_SVM(
ts,
arma = c(0, 0),
xreg = NULL,
chains = 4,
iter = 2000,
warmup = floor(iter/2),
adapt.delta = 0.9,
tree.depth = 10,
stepwise = TRUE,
prior_mu0 = NULL,
prior_sigma0 = NULL,
prior_ar = NULL,
prior_ma = NULL,
prior_alpha = NULL,
prior_beta = NULL,
prior_breg = NULL,
series.name = NULL,
...
)
|
ts |
a numeric or ts object with the univariate time series. |
arma |
Optionally, a specification of the ARMA model,same as order parameter: the two components (p, q) are the AR order,and the MA order. |
xreg |
Optionally, a numerical matrix of external regressors, which must have the same number of rows as ts. It should not be a data frame. |
chains |
An integer of the number of Markov Chains chains to be run, by default 4 chains are run. |
iter |
An integer of total iterations per chain including the warm-up, by default the number of iterations are 2000. |
warmup |
A positive integer specifying number of warm-up (aka burn-in)
iterations. This also specifies the number of iterations used for step-size
adaptation, so warm-up samples should not be used for inference. The number
of warmup should not be larger than |
adapt.delta |
An optional real value between 0 and 1, the thin of the jumps in a HMC method. By default is 0.9. |
tree.depth |
An integer of the maximum depth of the trees evaluated during each iteration. By default is 10. |
stepwise |
If TRUE, will do stepwise selection (faster). Otherwise, it searches over all models. Non-stepwise selection can be very slow, especially for seasonal models. |
prior_mu0 |
The prior distribution for the location parameter in an SVM model. By default
the value is set |
prior_sigma0 |
The prior distribution for the scale parameter in an SVM model. By default
the value is set |
prior_ar |
The prior distribution for the auto-regressive parameters in an ARMA model.
By default the value is set |
prior_ma |
The prior distribution for the moving average parameters in an ARMA model.
By default the value is set |
prior_alpha |
The prior distribution for the arch parameters in a GARCH model.
By default the value is set |
prior_beta |
The prior distribution for the GARCH parameters in a GARCH model.
By default the value is set |
prior_breg |
The prior distribution for the regression coefficient parameters in a
ARIMAX model. By default the value is set |
series.name |
an optional string vector with the series names. |
... |
Further arguments passed to |
The function returns a varstan
object with the fitted model.
A varstan
object with the fitted SVM model.
Asael Alonzo Matamoros
Sangjoon,K. and Shephard, N. and Chib.S (1998). Stochastic Volatility: Likelihood
Inference and Comparison with ARCH Models. Review of Economic Studies.
65(1), 361-93. url: https://www.jstor.org/stable/2566931
.
Tsay, R (2010). Analysis of Financial Time Series. Wiley-Interscience. 978-0470414354, second edition.
Shumway, R.H. and Stoffer, D.S. (2010).Time Series Analysis and Its Applications: With R Examples. Springer Texts in Statistics. isbn: 9781441978646. First edition.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.