2><span class="header-section-number">4.1</span> Running the sampler</h2>
<p>To generate a sample from the posterior distribution of
the model conditioned on the data,
we run the executable program with the argument <code>sample</code> or <code>method=sample</code>
together with the input data.
The executable can be run from any directory.
Here, we run it in the directory which contains the Stan program and input data,
<code>&lt;cmdstan-home&gt;/examples/bernoulli</code>:</p>
<pre><code>&gt; cd examples/ber