[R] Find growth rate of a zoo (time series) object

jpm miao miaojpm at gmail.com
Tue Oct 7 11:20:28 CEST 2014


Hi,

   Is there any way to find the growth rate of a quarterly/monthly time
series? For example, I have a quarterly CPI level series, and I wonder how
to find the CPI growth rate (inflation rate). Is there easier way to
convert to another class and convert back?

Thanks!



> dput(dtz[1:16,"CPI"])
structure(c(58.7966666666667, 59.5733333333333, 60.7366666666667,
60.78, 60.9033333333333, 61.39, 62.6066666666667, 62.0733333333333,
62.58, 63.1033333333333, 62.6033333333333, 62.0633333333333,
61.8333333333333, 62.7566666666667, 63.0333333333333, 62.6533333333333
), index = structure(c(1981, 1981.25, 1981.5, 1981.75, 1982,
1982.25, 1982.5, 1982.75, 1983, 1983.25, 1983.5, 1983.75, 1984,
1984.25, 1984.5, 1984.75), class = "yearqtr"), class = "zoo")

	[[alternative HTML version deleted]]



More information about the R-help mailing list