why won't cross correlation function work in this case ?


> ccf(sp,st)Error in ccf(sp, st) : univariate time series only



> head(sp)               sp
1993-12-31 466.45
1994-01-07 469.90
1994-01-14 474.91
1994-01-21 474.72
1994-01-28 478.70
1994-02-04 469.81

> class(sp)[1] "xts" "zoo"

> str(sp)An ‘xts’ object from 1993-12-31 to 2011-10-28 containing:
  Data: num [1:899, 1] 466 470 475 475 479 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : chr "sp"
  Indexed by objects of class: [Date] TZ:
  xts Attributes:
 NULL

> head(st)           stress
1993-12-31 -0.453
1994-01-07 -0.442
1994-01-14 -0.435
1994-01-21 -0.449
1994-01-28 -0.462
1994-02-04 -0.513

> class(st)[1] "xts" "zoo"

> str(sp)An ‘xts’ object from 1993-12-31 to 2011-10-28 containing:
  Data: num [1:899, 1] 466 470 475 475 479 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : chr "sp"
  Indexed by objects of class: [Date] TZ:
  xts Attributes:
 NULL

	[[alternative HTML version deleted]]

