search for: x_select

Displaying 1 result from an estimated 1 matches for "x_select".

Did you mean: g_select
2009 Jul 03
0
A fast version of ccf () accepting missing values ?
...<- list() res$cor <- rep(0.0, 1 + lag.before + lag.after) sub_X <- X[ 1 + lag.before : (l_X - lag.after)] res$delay <- seq(-lag.before, lag.after) for (i in res$delay) { sub_Y <- Y[(lag.before+i+1) : (l_X-lag.after+i+1)] OK <- !(is.na(sub_X) | is.na(sub_Y)) x_select <- sub_X[OK] y_select <- sub_Y[OK] res$cor[i+lag.before+1] <- cor (x_select, y_select) } return (res) } [[alternative HTML version deleted]]