[R] Help regarding Time Series: CCF Function

Addi Wei addiwei at gmail.com
Wed Oct 13 03:38:36 CEST 2010


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

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.



More information about the R-help mailing list