Description Usage Arguments Value Examples
A function that takes in settings for a JAGS run, and parameter settings. Function writes model based on which parameters we are choosing to model, runs JAGS and saves tibbles of MCMC values per simulations. The MCMC tibbles are saved to the output folder by simulation number out of Nsim simulations. Last, there are traceplots and convergence information saved to output folder as part of coda package output.
1 2 | run_mcmc(runname, Nchains, Niter, i, modelonegammatrue, modelgammatruect,
simsetting)
|
runname |
Extension to output folder that describes run setting, ie alldata. |
Nchains |
Number of chains ran by JAGS. |
Niter |
Number of iterations per chain ran by JAGS. |
i |
#Simulation number out of Nsim. |
modelonegammatrue |
Indicator (TRUE or FALSE) if the model includes one parameter for gammatruematvr. |
modelgammatruect |
Indicator (TRUE or FALSE) if the model includes unique country-year parametes for gammatruematvr. |
simsetting |
Describes simulation setting. |
Takes in jags inputs from run_simulation. Writes and runs specified model. Outputs a tibble of MCMC samples (for all parnames listed below) for the given simulation.
1 | run_mcmc(runname = "test", Nchains = 1, Niter = 10, i=1, modelonegammatrue = T, modelgammatruect = F, simsetting = "test")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.