Skip to content

help with lagged scatterplot

4 messages · Winfried Theis, antonio rodriguez, Uwe Ligges

#
Hi!

I'm not sure, if I understand you correctly, you want to plot nao at time t
against mei at time t-h. So lag.plot is not the right function because it plots
e.g. nao(t) against nao(t-h). Well, something along the lines

attach(data)
plot(mei[1:(length(mei)-h)],nao[-(1:h)])

should do what you want. (Negativ indices remove values from vectors or
matrices.)

Regards,

Winfried
On 06-Aug-02 Antonio wrote:
---------------------------------------------------------------------
E-Mail: Winfried Theis <theis at statistik.uni-dortmund.de>
Date: 06-Aug-02

Dipl.-Math. Winfried Theis
SFB 475, Fachbereich Statistik, Universit"at Dortmund, 44221 Dortmund
Tel.: +49-231-755-5903 FAX: +49-231-755-4387
----------------------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Hi,

How do I can make a lagged scatterplot of two variables:	

 Yt (nao) versus Xt-h (mei)

if they have the following structure:
mei	nao
Jan 1950 -1.036  0.55
Feb 1950 -1.133  3.31
Mar 1950 -1.259  0.81
Apr 1950 -1.027  1.60
May 1950 -1.399 -1.73
Jun 1950 -1.366  1.26
Jul 1950 -1.300 -0.87
.
.
.

I've tried with lag.plot but I don't understanf how to use it

Thanks in advance

Antonio Rodriguez
CICEM Agua del Pino
Huelva, Spain
Antonio Rodr?guez Verdugo
Huelva, Spain
yerupaja01 at terra.es
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Dear Winfried,

Thanks!!

Seems to work fine. So if I had correctly understand, if I want to plot NAO
vs MEI-6 (6 months earlier) I need to write.

plot(mei[1:(length(mei)-6)],nao[-(1:6)])

It's OK?

As I have negative values for both variables I don't understand your note:
What does it means. My negative values are interfering some way the output?

Thanks in advance

Antonio


Antonio Rodr?guez Verdugo
Huelva, Spain
yerupaja01 at terra.es
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Antonio wrote:
No. Winfried wrote about the *indices*, not values. He tried to point
you to the "-" in your nao[-(1:6)] , which removes the first 6 values of
nao.
Maybe it's a good idea to read "An Introduction to R".

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._