Description Usage Arguments Examples
Fit Bayesian EWI model
1 2 |
data_frame |
Data frame containing the time covariarte ('x') and response ('y') with no NAs |
ewi_model |
Which model to fit. Either the dynamic AR(1) model ('ar') or stochastic volatility model ('sv'). Defaults to 'ar'. For both cases, a gaussian process model is fit to the time-varying parameters. |
iter |
Number of iterations in Stan sampling. |
chains |
Number of chains in Stan sampling. |
control |
A list of options to pass to Stan sampling. |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
library(bayesewi)
model_1 = fit_ewi(data_example, ewi_model="ar")
model_2 = fit_ewi(data_example, ewi_model="ar", iter = 1000, chains=2)
print(plot_estimates(model_2))
options(mc.cores = parallel::detectCores())
model_2 = fit_ewi(data_example, ewi_model="ar", iter = 100, chains=3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.