Description Usage Arguments Value See Also Examples
Plot results from MCMC estimation
1 2 3 |
data.df |
A data frame of t values and data values, with standard errors |
res.df |
A data frame of t values, estimates and uncertainty intervals |
res2.df |
A data frame of t values, estimates and uncertainty intervals. Default is NULL |
method |
Method used to fit model |
order |
Order of splines |
maintitle |
Title of plot |
plot.se |
Whether or not to plot standard errors |
save.plot |
Whether or not to save plot. Default is |
save.file.name |
Directory/file name where to save file |
A plot of time series data and estimates.
1 2 3 4 5 6 7 8 9 10 11 12 | nyears <- 100
prop.sample <- 0.7
obs.err <- TRUE
sigma.y <- 0.5
seed <- 123
method <- 'splines'
params <- list(sigma.alpha = 1, order = 1)
res <- simulateFluctuations(nyears, prop.sample, method, params, obs.err, sigma.y)
res$se <- 0.1
mod <- runMCMC(input.data = res, nyears = 100, method = "splines", order = 2, nchains = 2, nburnin = 100, niter = 100+3000, nthin = 3, obs.err = TRUE)
df.mu <- getResults(mod, method = "splines", nyears = nyears)
plotResults(res, df.mu, method = "splines", order = 1, save.file.name = "test.pdf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.