On Oct 12, 2010, at 9:38 PM, Addi Wei wrote:
Looking at 2 sets of time series data. Code below:
houst = read.table("C:/Documents/HOUST.txt",header=F)
houst = ts(houst, start = 1976,frequency = 12)
mortg = read.table("C:/Documents/mortg.txt",header=F)
mortg = ts(mortg, start = 1976,frequency = 12)
The data for houst looks like:
1367
1538
1421
1395
1459
1495
1401
1550
......so on
The data for mortg looks like:
9.02
8.81
8.76
8.73
8.77
8.85
8.93
9.00
8.98
8.93
......so on
When I try to run:
ccf(mortg, houst)
Error in ccf(mortg, houst) : univariate time series only
Have you tried:
both <- ts(matrix(c(mortg[1], houst[1]), ncol=2), frequency=12)
ccf(both)
Just a guess ... in the absence of a reproducible example.
--
David.
I get the error above.....I am trying to graph the cross-correlation
function of mortg and houst. Why am I getting the above error? How
do I
correct this? Thank you.
--
View this message in context:
http://r.789695.n4.nabble.com/Help-regarding-Time-Series-CCF-Function-tp2992988p2992988.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
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.