Description Usage Arguments Examples
plot.tuts_polyn
plots summaries and diagnostics of a tuts_polyn object.
1 2 |
x |
A tuts_polyn object. |
type |
plot/diagnostic type (options:'predTUTS' plots one step out of sample predictions of the model, 'GR' plots Gelman-Rubin diagnostics, 'cv' plots 5-fold cross validation, 'mcmc' plots diagnostics of mcmc objects, and 'volatility' plots volatility realizations). |
... |
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 | # 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))
# Set parameters and run the polynomial regression:
polyorder=2
n.sim=1000
PN=tupolyn(y=y,ti.mu=ti.mu,ti.sd=ti.sd,polyorder=polyorder,n.sim=n.sim, CV=TRUE)
# Plots and diagnostics (optional parameters are listed in brackets):
plot(PN,type='predTUTS',CI=0.95) # One step out of salmple predictions of the model (CI, burn).
plot(PN,type='cv',burn=0.3) # 5 fold cross-validation (CI, burn).
plot(PN,type='GR',CI=0.95) # Gelman-Rubin diagnostic (CI).
plot(PN,type='mcmc') # MCMC diagnostics.
plot(PN,type='volatility') # Volatility realizaitons.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.