GW_STRETCH_MOVE#
Name#
GW_STRETCH_MOVE
Purpose#
Proposes a new step for an MCMC ensemble following the “stretch move” prescription in Goodman & Weare (2010).
Calling Sequence#
ensemble_new = gw_stretch_move(ensemble, a [, /error_check, z=z])
Inputs#
ensemblefloat or double array(Nparam, Nparallel)The current state of all the chains in the MCMC ensemble at a given trial.
aint, float, or double scalarA real constant \(\geq 1\) which controls the size of the proposal distribution (i.e., how close to 0
zis allowed to be and how largezis allowed to be). In practice, we can only sample values ofzin[1/a, a].
Optional Input#
error_checkflagIf set, all inputs are checked for errors. Otherwise, all inputs are assumed to be of correct format.
Output#
ensemble_newdouble array(Nparam, Nparallel)The new proposed positions of the ensemble.
Optional Output#
zdouble array(Nparallel)The proposal scaling constant.
Reference#
Modification History#
2021/12/02: Created (Erik B. Monson)
2022/04/21: Documentation (Erik B. Monson)
2022/06/17: Renamed variables to match naming scheme (Keith Doore)
2022/06/17: Updated documentation (Keith Doore)
2022/06/17: Added proper error handling (Keith Doore)
2022/06/17: Added
error_checkkeyword to do error handling (Keith Doore)2022/06/17: Removed
bounds_arrinput and subsequent code as this is now done in prior (Keith Doore)2022/06/17: Removed
seedinput as we do not ever specify the random seed (Keith Doore)2022/06/17: Made
za separate output fromensemble_newto prevent any issues or confusion (Keith Doore)2022/07/05: Changed from
roundtofloorinkprimeas index could exceed array size (Keith Doore)