Description Usage Arguments References Examples
Comparison of the results for up to three S4 class Bayes.pred objects
1 2 3 |
x |
Bayes.pred class |
y |
Bayes.pred class |
z |
Bayes.pred class (optional) |
newwindow |
logical(1), if TRUE, a new window is opened for the plot |
plot.legend |
logical(1), if TRUE, a legend is added |
names |
character vector with names for the three objects appearing in the legend |
ylim |
optional |
xlab |
optional, default 'times' |
ylab |
optional, default 'X' |
... |
optional plot parameters |
Dion, C., Hermann, S. and Samson, A. (2016). Mixedsde: a R package to fit mixed stochastic differential equations.
1 2 3 4 5 6 7 8 9 10 11 12 | random <- 1; sigma <- 0.1; fixed <- 5; param <- c(3, 0.5)
sim <- mixedsde.sim(M = 20, T = 1, N = 50, model = 'OU', random = random, fixed = fixed,
density.phi = 'normal',param= param, sigma= sigma, X0 = 0, op.plot = 1)
# here: only 100 iterations for example - should be much more!
estim_Bayes_withoutprior <- mixedsde.fit(times = sim$times, X = sim$X, model = 'OU',
random, estim.method = 'paramBayes', nMCMC = 100)
prior <- list( m = c(param[1], fixed), v = c(param[1], fixed), alpha.omega = 11,
beta.omega = param[2]^2*10, alpha.sigma = 10, beta.sigma = sigma^2*9)
estim_Bayes <- mixedsde.fit(times = sim$times, X = sim$X, model = 'OU', random,
estim.method = 'paramBayes', prior = prior, nMCMC = 100)
plot2compare(estim_Bayes, estim_Bayes_withoutprior, names = c('with prior', 'without prior'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.