Bin Zhao
2008-Nov-24 04:13 UTC
[R] How to measure the significant difference between two time series
Dear R experts and statisticians,
I have some time series datasets, they are several years vegetation indices
(about 50 data points per year) sampled from different station. These indices
have similar dynamics with seasonal change.
My questions are,
1) How can I compare the difference among the indices, and how can I say there
is significant differnce between two time series. They don't have the same
values in the same date, but they may have the similar tendency and change
curves?
2) I also want to compare the interannual variation of the vegetation index in
the same station. Of course, the index can be separated into several sub-series,
i.e., one year one sub-series. Now I have the same question as 1), how can I
compare the significant differnce between different year?
If there are mature theoretical framework can resolve my questions, is there any
package in R can do this?
Any further advice is highly appreciated.
Regards,
Bin Zhao
2008-11-24 , 10:53:58
[[alternative HTML version deleted]]
Gerard M. Keogh
2008-Nov-26 10:59 UTC
[R] How to measure the significant difference between two time series
Q1: Quick answer
a) you need to remove the seasonality - there s/b a tool in the time series
package to do this - though I'm not familar enough with R to know this.
b) check the resulting series to see if it is stationary - acf decays
quickly i.e. within a couple of lags.
c) if two series are stationary then overlay the acf plots and if second
plot lies within the CI of the first they are the same.
d) on the seasonal parts of the two series do regression on year vs b1*q1+
b2*q2 + b3*q3 + b4*q4 and if the coefficients of the second are within the
2 Se band of the first - seasonality is similar.
if c) and d) are not signif - the two series are similar.
Also, standardise all your series so that they have mean 0 (or 1) and
variance 1 before you start - it'll make the numerics and comparisons
better.
Also, before starting you may need to take logs if the series oscillations
increase with time.
Q2 - don't know what you mean by interannual variation - within year
possibly.
Hope this helps.
Gerard
"Bin Zhao"
<zhaobin1969 at gmai
l.com> To
Sent by: "r-help" <r-help at
r-project.org>
r-help-bounces at r- cc
project.org
Subject
[R] How to measure the significant
24/11/2008 04:13 difference between two time
series
Please respond to
zhaobin1969 at gmail
.com
Dear R experts and statisticians,
I have some time series datasets, they are several years vegetation indices
(about 50 data points per year) sampled from different station. These
indices have similar dynamics with seasonal change.
My questions are,
1) How can I compare the difference among the indices, and how can I say
there is significant differnce between two time series. They don't have the
same values in the same date, but they may have the similar tendency and
change curves?
2) I also want to compare the interannual variation of the vegetation index
in the same station. Of course, the index can be separated into several
sub-series, i.e., one year one sub-series. Now I have the same question as
1), how can I compare the significant differnce between different year?
If there are mature theoretical framework can resolve my questions, is
there any package in R can do this?
Any further advice is highly appreciated.
Regards,
Bin Zhao
2008-11-24 , 10:53:58
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
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.
**********************************************************************************
The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited. If you received this in error, please contact
the sender and delete the material from any computer. It is the policy of the
Department of Justice, Equality and Law Reform and the Agencies and Offices
using its IT services to disallow the sending of offensive material.
Should you consider that the material contained in this message is offensive you
should contact the sender immediately and also mailminder[at]justice.ie.
Is le haghaidh an duine n? an eintitis ar a bhfuil s? d?rithe, agus le haghaidh
an duine n? an eintitis sin amh?in, a bhearta?tear an fhaisn?is a tarchuireadh
agus f?adfaidh s? go bhfuil ?bhar faoi r?n agus/n? faoi phribhl?id inti.
Toirmisctear aon athbhreithni?, atarchur n? leathadh a dh?anamh ar an bhfaisn?is
seo, aon ?s?id eile a bhaint aisti n? aon ghn?omh a dh?anamh ar a hiontaoibh, ag
daoine n? ag eintitis seachas an faighteoir beartaithe. M? fuair t? ? seo tr?
dhearmad, t?igh i dteagmh?il leis an seolt?ir, le do thoil, agus scrios an
t-?bhar as aon r?omhaire. Is ? beartas na Roinne Dl? agus Cirt, Comhionannais
agus Athch?irithe Dl?, agus na nOif?g? agus na nGn?omhaireachta? a ?s?ideann
seirbh?s? TF na Roinne, seoladh ?bhair chol?il a dh?chead?.
M?s rud ? go measann t? gur ?bhar col?il at? san ?bhar at? sa teachtaireacht seo
is ceart duit dul i dteagmh?il leis an seolt?ir l?ithreach agus le
mailminder[ag]justice.ie chomh maith.
***********************************************************************************