veryone at the same time</em></p></li>
</ul>
<p>To do this, could define a <code>factor</code> (categorical) covariate for the time period, <code>timeperiod</code> say. Then would need to insert an <em>extra observation</em> at the change times (6 and 12 months) for each person with the value of this covariate:</p>
<pre><code>##     ptnum state months timeperiod
## 10      6     1   3.70   [-Inf,6)
## 1.6     6    NA   6.00     [6,12)
## 11      6     1   6.02     [6,12)
## 12      6     2   6.60     [6,12)