Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta

??
-- 
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23156769.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius
Are you trying to imply that people should be able to answer a  
question that included no data? As others have pointed out, our powers  
of telepathy are generally less than commonly assumed.


On Apr 21, 2009, at 10:00 AM, manta wrote:



??
--
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23156769.html
Sent from the R help mailing list archive at Nabble.com.


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@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.


Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta

Sorry, my bad, i did not mean to 'be mean'.
Here are the first five observations for three variables (dr1, dr2 and doil)

dr1
  1996-01-021996-01-031996-01-041996-01-051996-01-08 
 0.0005814396 -0.0023725000 -0.0072835915  0.0074536448 -0.0007004221 

dr2
   1996-01-031996-01-041996-01-051996-01-081996-01-09 
-0.0029539396 -0.0049110915  0.0147372363 -0.0081540669 -0.0003020745 

do1
1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08 
  0.08   0.01   0.17  -0.03   0.00 

As you can see, dr2 is nothing but the 1st difference of dr1. In my case,
I'm trying to find out the cross-correlation between the two variables do1
and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
do10,dr1,dr2,...,dr10, and the same for dr1).

Hope it helps,
Marco


David Winsemius wrote:
 
 Are you trying to imply that people should be able to answer a  
 question that included no data? As others have pointed out, our powers  
 of telepathy are generally less than commonly assumed.
 

-- 
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23157961.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius
We still have an inadequate characterization of the data to answe the  
question ( as I remember it from yesterday). Missing, for example, is  
any information about lengths which would seem essential since (as I  
remember) you wantted to know why the result was so short. Why not put  
in a full working example with an extract of the data. Suggest you try  
using dput as a method of creating a working example. That way we (and  
the R interpreter) would get labels and class information.


--
David Winsemius

On Apr 21, 2009, at 10:56 AM, manta wrote:



Sorry, my bad, i did not mean to 'be mean'.
Here are the first five observations for three variables (dr1, dr2  
and doil)


dr1
 1996-01-021996-01-031996-01-041996-01-051996-01-08
0.0005814396 -0.0023725000 -0.0072835915  0.0074536448 -0.0007004221

dr2
  1996-01-031996-01-041996-01-051996-01-081996-01-09
-0.0029539396 -0.0049110915  0.0147372363 -0.0081540669 -0.0003020745

do1
1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08
 0.08   0.01   0.17  -0.03   0.00

As you can see, dr2 is nothing but the 1st difference of dr1. In my  
case,
I'm trying to find out the cross-correlation between the two  
variables do1

and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
do10,dr1,dr2,...,dr10, and the same for dr1).

Hope it helps,
Marco


David Winsemius wrote:


Are you trying to imply that people should be able to answer a
question that included no data? As others have pointed out, our  
powers

of telepathy are generally less than commonly assumed.



--
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23157961.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@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.


Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius
When I remake those variables and try ccf(do1,dr1), the plot appears  
reasonable. What problem were you experiencing? It looks as though  
your method of differencing (whatever it was) offset the date  
registration of the zoo series in dr2,  but ccf(do1, dr2) still does  
not appear to choke on that input.


--
David

On Apr 21, 2009, at 4:06 PM, manta wrote:


DW:  Modifications of that output to reconstruct the series:




do1 - structure(c(0.0818, 0.008,  
0.172,

-0.0311, 0, 0.629, -0.317,
-0.433, -0.469, -0.359), index =
structure(c(9497,
9498, 9499, 9500, 9503, 9504, 9505, 9506, 9507, 9510), class =  
Date),

class = zoo);




dr1 - structure(c(0.000581439553993701, -0.00237250002417344,
-0.00728359151384361,
0.00745364483017663, -0.000700422111259091, -0.00100249660582796,
0.00198943708754806, 0.000342959230417050, -0.00113732213621109,
-0.00205039624417003), index = structure(c(9497, 9498, 9499,
9500, 9503, 9504, 9505, 9506, 9507, 9510), class = Date), class =  
zoo);




dr2 - structure(c(-0.00295393957816714, -0.00491109148967017,  
0.0147372363440202,

-0.00815406694143572, -0.000302074494568871, 0.00299193369337603,
-0.00164647785713101, -0.00148028136662814, -0.000913074107958933,
-0.00247839573899256), index = structure(c(9498, 9499, 9500,
9503, 9504, 9505, 9506, 9507, 9510, 9511), class = Date), class =  
zoo)





total number of observations is 3393 for the original data set (i.e.  
for do1

is 3392, for do2 is 3391 and so on)



David Winsemius wrote:


We still have an inadequate characterization of the data to answe the
question ( as I remember it from yesterday). Missing, for example, is
any information about lengths which would seem essential since (as I
remember) you wantted to know why the result was so short. Why not  
put
in a full working example with an extract of the data. Suggest you  
try
using dput as a method of creating a working example. That way we  
(and

the R interpreter) would get labels and class information.

--
David Winsemius

On Apr 21, 2009, at 10:56 AM, manta wrote:



Sorry, my bad, i did not mean to 'be mean'.
Here are the first five observations for three variables (dr1, dr2
and doil)

dr1
1996-01-021996-01-031996-01-041996-01-051996-01-08
0.0005814396 -0.0023725000 -0.0072835915  0.0074536448 -0.0007004221

dr2
 1996-01-031996-01-041996-01-051996-01-081996-01-09
-0.0029539396 -0.0049110915  0.0147372363 -0.0081540669  
-0.0003020745


do1
1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08
0.08   0.01   0.17  -0.03   0.00

As you can see, dr2 is nothing but the 1st difference of dr1. In my
case,
I'm trying to find out the cross-correlation between the two
variables do1
and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
do10,dr1,dr2,...,dr10, and the same for dr1).

Hope it helps,
Marco





In response to ??



David Winsemius wrote:


Are you trying to imply that people should be able to answer a
question that included no data? As others have pointed out, our
powers of telepathy are generally less than commonly assumed.



David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@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.


Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta

This is what I get.

 ccf(do1,dr1)
Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) : 
  valore mancante nell'oggetto #italian translation of 'missing values in
object'
 ccf(do1,dr2)
Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) : 
  valore mancante nell'oggetto #italian translation of 'missing values in
object'

Could the problem be in a different version of the ccf function i have?




David Winsemius wrote:
 
 When I remake those variables and try ccf(do1,dr1), the plot appears  
 reasonable. What problem were you experiencing? It looks as though  
 your method of differencing (whatever it was) offset the date  
 registration of the zoo series in dr2,  but ccf(do1, dr2) still does  
 not appear to choke on that input.
 
 -- 
 David
 
 On Apr 21, 2009, at 4:06 PM, manta wrote:
 
 DW:  Modifications of that output to reconstruct the series:
 

 do1 - structure(c(0.0818, 0.008,  
 0.172,
 -0.0311, 0, 0.629, -0.317,
 -0.433, -0.469, -0.359), index =
 structure(c(9497,
 9498, 9499, 9500, 9503, 9504, 9505, 9506, 9507, 9510), class =  
 Date),
 class = zoo);
 

 dr1 - structure(c(0.000581439553993701, -0.00237250002417344,
 -0.00728359151384361,
 0.00745364483017663, -0.000700422111259091, -0.00100249660582796,
 0.00198943708754806, 0.000342959230417050, -0.00113732213621109,
 -0.00205039624417003), index = structure(c(9497, 9498, 9499,
 9500, 9503, 9504, 9505, 9506, 9507, 9510), class = Date), class =  
 zoo);
 

 dr2 - structure(c(-0.00295393957816714, -0.00491109148967017,  
 0.0147372363440202,
 -0.00815406694143572, -0.000302074494568871, 0.00299193369337603,
 -0.00164647785713101, -0.00148028136662814, -0.000913074107958933,
 -0.00247839573899256), index = structure(c(9498, 9499, 9500,
 9503, 9504, 9505, 9506, 9507, 9510, 9511), class = Date), class =  
 zoo)
 


 total number of observations is 3393 for the original data set (i.e.  
 for do1
 is 3392, for do2 is 3391 and so on)



 David Winsemius wrote:

 We still have an inadequate characterization of the data to answe the
 question ( as I remember it from yesterday). Missing, for example, is
 any information about lengths which would seem essential since (as I
 remember) you wantted to know why the result was so short. Why not  
 put
 in a full working example with an extract of the data. Suggest you  
 try
 using dput as a method of creating a working example. That way we  
 (and
 the R interpreter) would get labels and class information.

 -- 
 David Winsemius

 On Apr 21, 2009, at 10:56 AM, manta wrote:


 Sorry, my bad, i did not mean to 'be mean'.
 Here are the first five observations for three variables (dr1, dr2
 and doil)

 dr1
 1996-01-021996-01-031996-01-041996-01-051996-01-08
 0.0005814396 -0.0023725000 -0.0072835915  0.0074536448 -0.0007004221

 dr2
  1996-01-031996-01-041996-01-051996-01-081996-01-09
 -0.0029539396 -0.0049110915  0.0147372363 -0.0081540669  
 -0.0003020745

 do1
 1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08
 0.08   0.01   0.17  -0.03   0.00

 As you can see, dr2 is nothing but the 1st difference of dr1. In my
 case,
 I'm trying to find out the cross-correlation between the two
 variables do1
 and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
 do10,dr1,dr2,...,dr10, and the same for dr1).

 Hope it helps,
 Marco

 
 
 In response to ??
 
 David Winsemius wrote:

 Are you trying to imply that people should be able to answer a
 question that included no data? As others have pointed out, our
 powers of telepathy are generally less than commonly assumed.

 
 David Winsemius, MD
 Heritage Laboratories
 West Hartford, CT
 
 __
 R-help@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.
 
 

-- 
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23165218.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius


If you were doing that with the full sized do1 and dr1, then my guess  
would be different data as the root cause. If you were doing this on  
the tiny sample objects that I created from your dput output, then I  
don't have an answer, since there were no missing values in those  
objects.


--
David Winsemius


On Apr 21, 2009, at 5:21 PM, manta wrote:



This is what I get.


ccf(do1,dr1)

Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) :
 valore mancante nell'oggetto #italian translation of 'missing  
values in

object'

ccf(do1,dr2)

Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) :
 valore mancante nell'oggetto #italian translation of 'missing  
values in

object'

Could the problem be in a different version of the ccf function i  
have?





David Winsemius wrote:


When I remake those variables and try ccf(do1,dr1), the plot appears
reasonable. What problem were you experiencing? It looks as though
your method of differencing (whatever it was) offset the date
registration of the zoo series in dr2,  but ccf(do1, dr2) still does
not appear to choke on that input.

--
David

On Apr 21, 2009, at 4:06 PM, manta wrote:


DW:  Modifications of that output to reconstruct the series:




do1 - structure(c(0.0818, 0.008,
0.172,
-0.0311, 0, 0.629, -0.317,
-0.433, -0.469, -0.359), index =
structure(c(9497,
9498, 9499, 9500, 9503, 9504, 9505, 9506, 9507, 9510), class =
Date),
class = zoo);




dr1 - structure(c(0.000581439553993701, -0.00237250002417344,
-0.00728359151384361,
0.00745364483017663, -0.000700422111259091, -0.00100249660582796,
0.00198943708754806, 0.000342959230417050, -0.00113732213621109,
-0.00205039624417003), index = structure(c(9497, 9498, 9499,
9500, 9503, 9504, 9505, 9506, 9507, 9510), class = Date), class =
zoo);




dr2 - structure(c(-0.00295393957816714, -0.00491109148967017,
0.0147372363440202,
-0.00815406694143572, -0.000302074494568871, 0.00299193369337603,
-0.00164647785713101, -0.00148028136662814, -0.000913074107958933,
-0.00247839573899256), index = structure(c(9498, 9499, 9500,
9503, 9504, 9505, 9506, 9507, 9510, 9511), class = Date), class =
zoo)





total number of observations is 3393 for the original data set (i.e.
for do1
is 3392, for do2 is 3391 and so on)



David Winsemius wrote:


We still have an inadequate characterization of the data to answe  
the
question ( as I remember it from yesterday). Missing, for  
example, is
any information about lengths which would seem essential since  
(as I

remember) you wantted to know why the result was so short. Why not
put
in a full working example with an extract of the data. Suggest you
try
using dput as a method of creating a working example. That way we
(and
the R interpreter) would get labels and class information.

--
David Winsemius

On Apr 21, 2009, at 10:56 AM, manta wrote:



Sorry, my bad, i did not mean to 'be mean'.
Here are the first five observations for three variables (dr1, dr2
and doil)

dr1
1996-01-021996-01-031996-01-041996-01-051996-01-08
0.0005814396 -0.0023725000 -0.0072835915  0.0074536448  
-0.0007004221


dr2
1996-01-031996-01-041996-01-051996-01-081996-01-09
-0.0029539396 -0.0049110915  0.0147372363 -0.0081540669
-0.0003020745

do1
1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08
   0.08   0.01   0.17  -0.03   0.00

As you can see, dr2 is nothing but the 1st difference of dr1. In  
my

case,
I'm trying to find out the cross-correlation between the two
variables do1
and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
do10,dr1,dr2,...,dr10, and the same for dr1).

Hope it helps,
Marco





In response to ??



David Winsemius wrote:


Are you trying to imply that people should be able to answer a
question that included no data? As others have pointed out, our
powers of telepathy are generally less than commonly assumed.



David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@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.




--
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23165218.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta

The problem is that I was doing that for the tiny sample objects.
So I really have no clue about



David Winsemius wrote:
 
 
 If you were doing that with the full sized do1 and dr1, then my guess  
 would be different data as the root cause. If you were doing this on  
 the tiny sample objects that I created from your dput output, then I  
 don't have an answer, since there were no missing values in those  
 objects.
 
 -- 
 David Winsemius
 
 
 On Apr 21, 2009, at 5:21 PM, manta wrote:
 

 This is what I get.

 ccf(do1,dr1)
 Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) :
  valore mancante nell'oggetto #italian translation of 'missing  
 values in
 object'
 ccf(do1,dr2)
 Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) :
  valore mancante nell'oggetto #italian translation of 'missing  
 values in
 object'

 Could the problem be in a different version of the ccf function i  
 have?




 David Winsemius wrote:

 When I remake those variables and try ccf(do1,dr1), the plot appears
 reasonable. What problem were you experiencing? It looks as though
 your method of differencing (whatever it was) offset the date
 registration of the zoo series in dr2,  but ccf(do1, dr2) still does
 not appear to choke on that input.

 -- 
 David

 On Apr 21, 2009, at 4:06 PM, manta wrote:

 DW:  Modifications of that output to reconstruct the series:


 do1 - structure(c(0.0818, 0.008,
 0.172,
 -0.0311, 0, 0.629, -0.317,
 -0.433, -0.469, -0.359), index =
 structure(c(9497,
 9498, 9499, 9500, 9503, 9504, 9505, 9506, 9507, 9510), class =
 Date),
 class = zoo);


 dr1 - structure(c(0.000581439553993701, -0.00237250002417344,
 -0.00728359151384361,
 0.00745364483017663, -0.000700422111259091, -0.00100249660582796,
 0.00198943708754806, 0.000342959230417050, -0.00113732213621109,
 -0.00205039624417003), index = structure(c(9497, 9498, 9499,
 9500, 9503, 9504, 9505, 9506, 9507, 9510), class = Date), class =
 zoo);


 dr2 - structure(c(-0.00295393957816714, -0.00491109148967017,
 0.0147372363440202,
 -0.00815406694143572, -0.000302074494568871, 0.00299193369337603,
 -0.00164647785713101, -0.00148028136662814, -0.000913074107958933,
 -0.00247839573899256), index = structure(c(9498, 9499, 9500,
 9503, 9504, 9505, 9506, 9507, 9510, 9511), class = Date), class =
 zoo)



 total number of observations is 3393 for the original data set (i.e.
 for do1
 is 3392, for do2 is 3391 and so on)



 David Winsemius wrote:

 We still have an inadequate characterization of the data to answe  
 the
 question ( as I remember it from yesterday). Missing, for  
 example, is
 any information about lengths which would seem essential since  
 (as I
 remember) you wantted to know why the result was so short. Why not
 put
 in a full working example with an extract of the data. Suggest you
 try
 using dput as a method of creating a working example. That way we
 (and
 the R interpreter) would get labels and class information.

 -- 
 David Winsemius

 On Apr 21, 2009, at 10:56 AM, manta wrote:


 Sorry, my bad, i did not mean to 'be mean'.
 Here are the first five observations for three variables (dr1, dr2
 and doil)

 dr1
 1996-01-021996-01-031996-01-041996-01-051996-01-08
 0.0005814396 -0.0023725000 -0.0072835915  0.0074536448  
 -0.0007004221

 dr2
 1996-01-031996-01-041996-01-051996-01-081996-01-09
 -0.0029539396 -0.0049110915  0.0147372363 -0.0081540669
 -0.0003020745

 do1
 1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08
0.08   0.01   0.17  -0.03   0.00

 As you can see, dr2 is nothing but the 1st difference of dr1. In  
 my
 case,
 I'm trying to find out the cross-correlation between the two
 variables do1
 and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
 do10,dr1,dr2,...,dr10, and the same for dr1).

 Hope it helps,
 Marco



 In response to ??

 David Winsemius wrote:

 Are you trying to imply that people should be able to answer a
 question that included no data? As others have pointed out, our
 powers of telepathy are generally less than commonly assumed.


 David Winsemius, MD
 Heritage Laboratories
 West Hartford, CT

 __
 R-help@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.



 -- 
 View this message in context:
 http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23165218.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@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.
 

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius
When I get such unexpected behavior, I generally reinstall software. I  
am currently using the Urbanek prepared MacOSX  2.8.1 binary under  
Leopard with the 64 bit GUI. The stats package is part of the core  
distribution, so reinstalling the stats package would mean  
reinstalling R. Other options would include using trace or other  
debugging facilities.


--
David.

On Apr 21, 2009, at 5:45 PM, manta wrote:



The problem is that I was doing that for the tiny sample objects.
So I really have no clue about

David Winsemius wrote:



If you were doing that with the full sized do1 and dr1, then my guess
would be different data as the root cause. If you were doing this on
the tiny sample objects that I created from your dput output, then I
don't have an answer, since there were no missing values in those
objects.

--
David Winsemius


On Apr 21, 2009, at 5:21 PM, manta wrote:



This is what I get.


ccf(do1,dr1)

Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) :
valore mancante nell'oggetto #italian translation of 'missing
values in
object'

ccf(do1,dr2)

Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) :
valore mancante nell'oggetto #italian translation of 'missing
values in
object'

Could the problem be in a different version of the ccf function i
have?




David Winsemius wrote:


When I remake those variables and try ccf(do1,dr1), the plot  
appears

reasonable. What problem were you experiencing? It looks as though
your method of differencing (whatever it was) offset the date
registration of the zoo series in dr2,  but ccf(do1, dr2) still  
does

not appear to choke on that input.

--
David

On Apr 21, 2009, at 4:06 PM, manta wrote:


DW:  Modifications of that output to reconstruct the series:




do1 - structure(c(0.0818, 0.008,
0.172,
-0.0311, 0, 0.629, -0.317,
-0.433, -0.469, -0.359),  
index =

structure(c(9497,
9498, 9499, 9500, 9503, 9504, 9505, 9506, 9507, 9510), class =
Date),
class = zoo);




dr1 - structure(c(0.000581439553993701, -0.00237250002417344,
-0.00728359151384361,
0.00745364483017663, -0.000700422111259091, -0.00100249660582796,
0.00198943708754806, 0.000342959230417050, -0.00113732213621109,
-0.00205039624417003), index = structure(c(9497, 9498, 9499,
9500, 9503, 9504, 9505, 9506, 9507, 9510), class = Date),  
class =

zoo);




dr2 - structure(c(-0.00295393957816714, -0.00491109148967017,
0.0147372363440202,
-0.00815406694143572, -0.000302074494568871, 0.00299193369337603,
-0.00164647785713101, -0.00148028136662814, -0.000913074107958933,
-0.00247839573899256), index = structure(c(9498, 9499, 9500,
9503, 9504, 9505, 9506, 9507, 9510, 9511), class = Date),  
class =

zoo)





total number of observations is 3393 for the original data set  
(i.e.

for do1
is 3392, for do2 is 3391 and so on)



David Winsemius wrote:


We still have an inadequate characterization of the data to answe
the
question ( as I remember it from yesterday). Missing, for
example, is
any information about lengths which would seem essential since
(as I
remember) you wantted to know why the result was so short. Why  
not

put
in a full working example with an extract of the data. Suggest  
you

try
using dput as a method of creating a working example. That way we
(and
the R interpreter) would get labels and class information.

--
David Winsemius

On Apr 21, 2009, at 10:56 AM, manta wrote:



Sorry, my bad, i did not mean to 'be mean'.
Here are the first five observations for three variables (dr1,  
dr2

and doil)

dr1
1996-01-021996-01-031996-01-041996-01-05 
1996-01-08

0.0005814396 -0.0023725000 -0.0072835915  0.0074536448
-0.0007004221

dr2
1996-01-031996-01-041996-01-051996-01-08 
1996-01-09

-0.0029539396 -0.0049110915  0.0147372363 -0.0081540669
-0.0003020745

do1
1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08
  0.08   0.01   0.17  -0.03   0.00

As you can see, dr2 is nothing but the 1st difference of dr1. In
my
case,
I'm trying to find out the cross-correlation between the two
variables do1
and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
do10,dr1,dr2,...,dr10, and the same for dr1).

Hope it helps,
Marco





In response to ??



David Winsemius wrote:


Are you trying to imply that people should be able to answer a
question that included no data? As others have pointed out, our
powers of telepathy are generally less than commonly assumed.



David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@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.




--
View this message in context:
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23165218.html
Sent from 

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta

Here you are
dput(do1[1:10])
structure(c(0.0818, 0.008, 0.172, 
-0.0311, 0, 0.629, -0.317, 
-0.433, -0.469, -0.359), index =
structure(c(9497, 
9498, 9499, 9500, 9503, 9504, 9505, 9506, 9507, 9510), class = Date),
class = zoo)
dput(dr1[1:10])
structure(c(0.000581439553993701, -0.00237250002417344,
-0.00728359151384361, 
0.00745364483017663, -0.000700422111259091, -0.00100249660582796, 
0.00198943708754806, 0.000342959230417050, -0.00113732213621109, 
-0.00205039624417003), index = structure(c(9497, 9498, 9499, 
9500, 9503, 9504, 9505, 9506, 9507, 9510), class = Date), class = zoo)
dput(dr2[1:10])
structure(c(-0.00295393957816714, -0.00491109148967017, 0.0147372363440202, 
-0.00815406694143572, -0.000302074494568871, 0.00299193369337603, 
-0.00164647785713101, -0.00148028136662814, -0.000913074107958933, 
-0.00247839573899256), index = structure(c(9498, 9499, 9500, 
9503, 9504, 9505, 9506, 9507, 9510, 9511), class = Date), class = zoo)

total number of observations is 3393 for the original data set (i.e. for do1
is 3392, for do2 is 3391 and so on)



David Winsemius wrote:
 
 We still have an inadequate characterization of the data to answe the  
 question ( as I remember it from yesterday). Missing, for example, is  
 any information about lengths which would seem essential since (as I  
 remember) you wantted to know why the result was so short. Why not put  
 in a full working example with an extract of the data. Suggest you try  
 using dput as a method of creating a working example. That way we (and  
 the R interpreter) would get labels and class information.
 
 -- 
 David Winsemius
 
 On Apr 21, 2009, at 10:56 AM, manta wrote:
 

 Sorry, my bad, i did not mean to 'be mean'.
 Here are the first five observations for three variables (dr1, dr2  
 and doil)

 dr1
  1996-01-021996-01-031996-01-041996-01-051996-01-08
 0.0005814396 -0.0023725000 -0.0072835915  0.0074536448 -0.0007004221

 dr2
   1996-01-031996-01-041996-01-051996-01-081996-01-09
 -0.0029539396 -0.0049110915  0.0147372363 -0.0081540669 -0.0003020745

 do1
 1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08
  0.08   0.01   0.17  -0.03   0.00

 As you can see, dr2 is nothing but the 1st difference of dr1. In my  
 case,
 I'm trying to find out the cross-correlation between the two  
 variables do1
 and dr1 up to their 10th lag (i.e. do1 with do2, do3, ...,
 do10,dr1,dr2,...,dr10, and the same for dr1).

 Hope it helps,
 Marco


 David Winsemius wrote:

 Are you trying to imply that people should be able to answer a
 question that included no data? As others have pointed out, our  
 powers
 of telepathy are generally less than commonly assumed.


 -- 
 View this message in context:
 http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23157961.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@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.
 
 David Winsemius, MD
 Heritage Laboratories
 West Hartford, CT
 
 __
 R-help@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.
 
 

-- 
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23163878.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] Cross-Correlation function (CCF) issues

2009-04-20 Thread manta

Dear all,
I have two series of returns and I want to find the cross-correlations
between these two series. I know of the ccf, but it does not work as I'd
like

if i type

ccf(x,y,lag.max=20,type=correlation,plot=FALSE)

i got the error message
Error in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) : 
  missing values in object

So i found that somebody suggested to type
ccf(x,y,lag.max=20,type=correlation,na.action=na.contiguous,plot=FALSE)

but in this case I can only get the cross-correlations for four lagsm
whatever series i plug in the ccf functions (i.e. it's not a matter of the
particular series)

Any suggestions?
-- 
View this message in context: 
http://www.nabble.com/Cross-Correlation-function-%28CCF%29-issues-tp23145411p23145411.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.