Integration time parameters for HMC without NUTS


I’m using RStan for HMC without NUTS (atm).
Is there a way to specify the number of integration steps L instead of the integration time int_time (which is L * stepsize)? Because I want to be able to set the length of the trajectory while using the adaptive stepsize from Stan, hence I do not know the stepsize before the simulation.

My workaround would be to simulate a few times without setting L, recording the stepsize that was used and then manually entering that value into my simulation, but maybe there is the easier way of supplying L directly.

1 Like

No. Setting L instead of int_time results in a step size-dependent integration time which is not appropriate for HMC. This is unfortunately a common mistake in many statistics and machine learning papers. Setting int_time ensures constant exploration, which is the direct degree of freedom, while the step size is adapted.

1 Like

Alright, thanks for the quick answer!