Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify run_mod() inputs? #43

Open
d-morrison opened this issue Feb 17, 2025 · 0 comments
Open

clarify run_mod() inputs? #43

d-morrison opened this issue Feb 17, 2025 · 0 comments
Assignees

Comments

@d-morrison
Copy link
Member

d-morrison commented Feb 17, 2025

niter appears to only get used to define nthin (along with nmc):

serodynamics/R/Run_Mod.R

Lines 92 to 98 in bb40bdc

# inputs for jags model
nchains <- nchain # nr of MC chains to run simultaneously
nadapt <- nadapt # nr of iterations for adaptation
nburnin <- nburn # nr of iterations to use for burn-in
nmc <- nmc # nr of samples in posterior chains
niter <- niter # nr of iterations for posterior sample
nthin <- round(niter / nmc) # thinning needed to produce nmc from niter

niter is not passed to run.jags() directly:

serodynamics/R/Run_Mod.R

Lines 99 to 114 in bb40bdc

tomonitor <- c("y0", "y1", "t1", "alpha", "shape")
jags_post <- runjags::run.jags(
model = file_mod,
data = c(longdata, priors),
inits = initsfunction,
method = "parallel",
adapt = nadapt,
burnin = nburnin,
thin = nthin,
sample = nmc,
n.chains = nchains,
monitor = tomonitor,
summarise = FALSE
)

why not just make nthin an input parameter of run_mod() and remove niter?
I don't understand why run_mod() changes the parametrization from run.jags().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants