Displaying 1 result from an estimated 1 matches for "my_ccf".
Did you mean:
my_car
2009 Jul 03
0
A fast version of ccf () accepting missing values ?
...ls wich may contain
missing values.
One cannot pass "Na.action=na.pass" to the ccf() function.
So, I wrote a naive function of my own (see below).
Unsurprisingly, this function is not very fast.
Do you think that it is possible to do better, or should I accept my fate
?
Bruno.
my_ccf <- function (X, Y, lag.before = NULL, lag.after = NULL) {
l_X <- length(X)
l_Y <- length(Y)
if (l_Y != l_X) {
cat ("X and Y should have same size !")
return
}
if (is.null(lag.before)) {
lag.before <- l_X / 10
#should do 10*log10(N/m)
}
if (is.nu...