Hi all I want to calculate certain lags of a time series and plot them simultaneously on a graph. can anyone help?
?lag.plot
-----Original Message-----
From: allan clark [mailto:allan@stats.uct.ac.za]
Sent: 03 February 2004 11:58
To: Rhelp
Subject: [R] R: lags and plots
Hi all
I want to calculate certain lags of a time series and plot them
simultaneously on a graph. can anyone help?
KSS Ltd
Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS
England
Company Registration Number 2800886
Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305
mailto:kssg@kssg.com http://www.kssg.com
The information in this Internet email is confidential and m...{{dropped}}
On Tue, 03 Feb 2004 13:57:53 +0200 allan clark wrote:> Hi all > > I want to calculate certain lags of a time series and plot them > simultaneously on a graph. can anyone help?Something like this? R> x <- ts(cumsum(rnorm(20)), start = 0, freq = 10) R> plot(x) R> lines(lag(x, k = -1), col = 4) hth Z
Consider the following:
plot(1:9, (1:10)[-1])
lines(1:9, (1:10)[-10])
Does this help?
spencer graves
allan clark wrote:
>Hi all
>
>I want to calculate certain lags of a time series and plot them
>simultaneously on a graph. can anyone help?
>
>
>
>
>------------------------------------------------------------------------
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>
>>>>> "allan" == allan clark <allan at stats.uct.ac.za> >>>>> on Tue, 03 Feb 2004 13:57:53 +0200 writes:allan> Hi all I want to calculate certain lags of a time allan> series and plot them simultaneously on a graph. can allan> anyone help? Use lag.plot() {name and part of UI is for S+ compatibility} Martin