Dummy Variable with increase YEAR
<pre><code>dt&lt;- data.frame(year=factor(2000:2004))
</code></pre>

<p>I need a dummy variable set as below <code>dt.dummy</code>,</p>

<pre><code>dt.dummy &lt;-matrix(c(0,1,1,1,1,0,0,1,1,1,0,0,0,1,1,0,0,0,0,1), nrow=5)
</code></pre>

<p>That is, there is no dummy last year,2004 and dummies are created by the increased year.</p>

<p>I will use quarterly data, so atleast 120 observations.</p>