# NOT RUN {
#######################################################################
# Testing the bi-variate case (1 window), synthetic data!
#######################################################################
# Fig. 3 in Polanco-Mart<U+00ED>nez (2020)
test_fun1 <- rolwincor_1win(syntDATA, varX="X", varY="Y",
CorMethod="spearman", widthwin=21,
Align="center", pvalcorectmethod="BH")
# Plotting the bi-variate case (1 window)
plot_1win(syntDATA, test_fun1$Correlation_coefficients,
test_fun1$P_values_corrected, test_fun1$left_win,
test_fun1$righ_win, widthwin=21, KCASE="BIVAR",
varX="X", varY="Y")
#######################################################################
# Testing the multi-variate case (1 window), real-life ecological data!
#######################################################################
# Fig. 6 in Polanco-Mart<U+00ED>nez (2020)
test_fun2 <- rolwinmulcor_1win(YX_ecological_data, widthwin=61,
Align="center", pvalcorectmethod="BH")
# Plotting the bi-variate case (1 window), real-life ecological data
plot_1win(YX_ecological_data, test_fun2$Correlation_coefficients,
test_fun2$P_values_corrected, test_fun2$left_win,
test_fun2$righ_win, widthwin=61, KCASE="MULVAR", varY="PC1",
varX=paste("SST", "TSI", sep=", "), coltsY="black",
coltsX=c("red", "orange"), CEXLAB=1.15, CEXAXIS=1.65,
LWDtsX=rep(2,2), LWDtsY=2, parcen=c(0.45,15))
# }
Run the code above in your browser using DataLab