rgamma</a></span><span class="op">(</span><span class="fl">8000</span>, <span class="fl">0.3</span><span class="op">)</span>
<span class="va">ehr_data</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op">(</span>
  patient_id <span class="op">=</span> <span class="fl">1</span><span class="op">:</span><span class="fl">8000</span>,
  ICD1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Poisson.h