View source: R/detrendfilters.R
logdiff | R Documentation |
logdiff
logarithmizes and then takes first differences of a
time series.
logdiff(y)
y |
univariate time series indexed as |
The first observation of the series are required as the initial value for the the first differences. The second observation will thereby be the first observation of the detrended series.
Returns a class 'ts'
object containing the log-differenced series.
If the provided series y
is of class ts
, the dates of the detrended
series will be set accordingly.
data(INDPRO, package="tsfilters")
IP_logdiff <- logdiff(INDPRO)
start(INDPRO)
start(IP_logdiff)
plot(IP_logdiff)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.