setting a prior distribution to an specify model parameter.
a time series model class specified in varstan.
a string value with the desired parameter which a prior is defined could be: "mu0", "sigma0", "ar", "ma", "arch", "garch", "mgarch", "dfv", "df", "LKJ" or "breg".
the distribution of the prior parameter. The only accepted is a prior_dist object.
an optional integer value, indicates the desired lag of the parameter which the prior is defined if lag = 0, then the prior distribution will be applied for all lags.
varstan provides its own functions to manipulate the parameter prior, this functions return
prior_dist class, the
dist argument only accepts this objects.
lag parameter is an optional value to change the prior distribution of one parameter in particular,
this argument is only valid for: "ar","ma", "arch", "garch", "mgarch", or "breg" par arguments. lag has to
be a integer lower than the total amount of lagged parameters of the model. For example, to ONLY
change the prior of the second "arch" parameter in a garch(3,1) model, a lag = 2 values must be specified.
For varma and Bekk models the covariance matrix Sigma is factorized as follows:
Sigma = D' Omega D
Where Omega is the correlation matrix that accepts an LKJ prior distribution D is a diagonal matrix with the inverse std deviations
For changing the degree freedom in a LKJ distribution for omega use par = "LKJ" and dist = LKJ(df), where df are the desired degree freedom.
For changing the the priors in the diagonal D use par = "sigma0" and select one of the available prior distributions.
For ar, ma garch, arch parameters in varma and Bekk models only normal distributions priors with different
mu and sd are accepted. Even if
get_prior accepts its change, Stan will change it to a normal(0,1) prior.
a time series model class specified in varstan with the changed prior.
Asael Alonzo Matamoros
1 2 3 4 5 6 7 8 9 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.