h1>
<p>CmdStan has a basic diagnostic feature that will calculate the gradients of the initial state and compare them with gradients calculated by finite differences. Discrepancies between the two indicate that there is a problem with the model or initial states or else there is a bug in Stan.</p>
<p>To allow for the possibility of adding other kinds of diagnostic tests, the <code>diagnose</code> method argument configuration has subargument <code>test</code> which currently only takes value <code>gradient<