Displaying 1 result from an estimated 1 matches for "0c457c73".
2008 Apr 25
4
Constructing dummy variables for months for a time series object
I have a TS of monthly observations.
head(data4)
1991(1) 1991(2) 1991(3) 1991(4) 1991(5) 1991(6)
12.00864 11.94203 11.98386 12.01900 12.19226 12.15488
Now I want to make 11 dummy variables indicating months. Therefore I did followings :
For Jan :
rep(c(rep(0,0), 1, rep(0, 11)), 17)
For Feb :
rep(c(rep(0,1), 1, rep(0, 10)), 17)
........ and so on
But my