Optional Burn in for the models - mtc.run #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to make a proposition to update the
mtc.run
function as it is not supporting a burn-in phase currently.The burn-in phase is often required by national agencies for all mcmc runs, and even for conjugates.
We make the
mtc.run
update as minimalistic as posible and backward compatible.That is why for backward compatiblity the NEW ARGUMENT
n.burnin
is added as the last one, somtc.run
will works even if somebody used it without argument namesmtc.run(value, value)
instead ofmtc.run(arg1 = value, arg2 = value)
.Please give us your thoughts on the update.
Adaptation and burnin are not the same and currently only the former can be set in
mtc.run
.Please read more about it here https://stackoverflow.com/a/78807748/5442527 (example where adaptation is skipped as all models are conjugates) and here https://stackoverflow.com/a/38875637/5442527. Summing up it is important to recognize that burn-in and adaptation refer to two different things and are implemented independently in JAGS/rjags. The adaptation will be run only if at least one parameter in the model requires it, whereas burn-in is run always.
Our update fix the #78 issue.
We did not add any unit tests as the current tests structure will demand a lot of copy pasting. Please feel free to propose something.
Our update is backward compatible and results from mtc.run are the same.
The default value for n.burnin is 0.
Proof that the results from mtc.run are the same.