I would like to aggregate monthly series as quarterly data, but not as a mean or a sum, but rather as having three series of monthly lags for each quarter. So far I have tried:
for (i in seq(1,n,3))
{ if (i==1)
{
monthly_1=quarterly[(i+2)]
monthly_2=quarterly[(i+1)]
monthly_3=quarterly[i]
}
else {
monthly_1=rbind(monthly_1,quarterly[(i+2)])
monthly_2=rbind(monthly_2,quarterly[(i+1)])
monthly_3=rbind(monthly_3,quarterly[i])
}
}
I believe it can be done in R, I just haven't figured out the right way to do it. Any suggestions?