Description Usage Arguments Value Author(s) Examples
The functions gets the defined distribution of a defined model parameter
1 |
model |
a time series model class specified in varstan. |
par |
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". |
lag |
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 |
None. Prints the prior distribution of a desired parameter.
Asael Alonzo Matamoros
1 2 3 4 5 6 7 8 9 10 11 12 | library(astsa)
# get all the ar parameters
dat = Sarima(birth,order = c(2,1,2))
get_prior(model = dat,par = "ar")
# change the mean constant parameter
dat = set_prior(model = dat,par = "mu0",dist = student(0,2.5,7))
get_prior(dat,par = "mu0")
# change and print only the second ma parameter
dat = set_prior(model = dat,par = "ma",dist = beta(2,2),lag = 2)
get_prior(dat,par = "ma")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.