[R] From daily series to monthly and viceversa

manta mantino84 at libero.it
Thu Apr 16 15:11:57 CEST 2009


Ok, I'll try to explain my issue. I have a monthly series (CPI index) and I
want to interpolate it using a specific lagged harmonized formula to get the
corresponding daily series. The formula is the following
 
CPI^=CPI(t-3)+(d-1)/D*(CPI(t-2)-CPI(t-3))
where

CPI^ is the CPI for the day we are calculating the reference CPI
CPI(t-i) is the CPI for the month i months prior
d is the day of the month for which we are calculating the reference CPI
D is the number of days in the month we are calculating

Then, the interpolation will give me 7 observations a week, but I need only
the observations from Monday to Friday. Therefore, I will have also to
discarde those estimates for Saturdays and Sundays.
Hope you can help. Thanks.

Marco


Gabor Grothendieck wrote:
> 
> You can remove missing values with:
> 
> zm <- aggregate(cambio, as.yearmon, mean, na.rm = TRUE)
> 
> Its not clear what your second question is asking. 
> 

-- 
View this message in context: http://www.nabble.com/From-daily-series-to-monthly-and-viceversa-tp23064454p23077695.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list