Description Usage Arguments Examples
plot.tuts_ar1(x,type,...)
plots summaries and diagnostics of tuts_ar1 objects.
1 2 |
x |
A tuts_ar1 objects. |
type |
plot/diagnostic type (options: 'predTUTS' plots one step predictions of the model, 'GR' plots Gelman-Rubin diagnostics, 'cv' plots 5-fold cross validation, 'mcmc' plots diagnostics of mcmc objects) |
... |
list of optional parameters: 'burn' (burn-in parameter ranging from 0 to 0.7 with default value set to 0), and CI (credible interval ranging from 0.3 to 1 with default value set to 0.95) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Import or simulate the data (simulation is chosen for illustrative purposes):
DATA=simtuts(N=50,Harmonics=c(10,30,0), sin.ampl=c(10,10, 0), cos.ampl=c(0,0,0),
trend=0,y.sd=3, ti.sd=1)
y=DATA$observed$y.obs
ti.mu=DATA$observed$ti.obs.tnorm
ti.sd= rep(1, length(ti.mu))
# Run the tuar1 model fitting with cross validation:
n.sim=1000
TUAR1=tuar1(y=y,ti.mu=ti.mu,ti.sd=ti.sd,n.sim=n.sim, CV=TRUE)
# Plots and diagnostics (optional parameters are listed in brackets):
plot(TUAR1,type='predTUTS') # One step out of salmple predictions of the model (CI, burn).
plot(TUAR1,type='par', burn=0.4) # Distributions of parameters of the AR(1) model (burn).
plot(TUAR1,type='mcmc') # mcmc diagnostics.
plot(TUAR1,type='cv', burn=0.4, CI=0.9) # 5 fold cross validation plot(CI, burn).
plot(TUAR1,type='GR') # Gelman-Rubin diagnostic (CI, burn).
plot(TUAR1,type='volatility') # Volatility realizaitons.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.