Dear R-users: Let's see if you can help.
I have an matrix of class "ts" of 100 rows by 4 columns which called PP. In each column I have the time series of quarterly GDP from 4 countries. They applied the Hodrick -Prescott filter and now I want to plot simultaneously cyclical component of the 4 countries and another window graphed together the trend conponentes . #If PP include the series of one country would do: lambda <- 1600 DFIL <- hpfilter (PP, freq = lambda, type = "lambda" ) #First graph plot(DFIL$x, plot.type = "single" col = 1:Countries , main = "Economy and Trend" ) #Second graphic plot(DFIL$cycle, plot.type = "single" col = 1:Countries, main = "Cycle" ) #A Deactivate the two graphics pair(mfrow = c (1,1)) But I want to put on each graph window all the components'series. Then I made first: DFIL <- apply ( PP , 2, hpfilter , freq = lambda, type = "lambda" ) How can I graph all cyclical components together? Regards, Sebastian. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.