#Wavelet Analysis# (JETS-ITA)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetf$Date <- as.Date(dataetf$Date, format = "%d.%m.%Y")
dataetf$time <- 1:nrow(dataetf)

# --- Serileri düzenle ---
a <- dataetf$JETS
b <- dataetf$ITA

diffjets <- diff(a)
diffita  <- diff(b)
new_time <- dataetf$time[-1]

jets <- cbind(new_time, diffjets)
ita  <- cbind(new_time, diffita)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_jets <- wt(jets)
wt_ita  <- wt(ita)

# --- Coherence ---
wtc_jets_ita <- wtc(jets, ita, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_jets_ita, plot.cb = TRUE,
     main = "Wavelet Coherence: JETS and ITA")


#Wavelet Analysis# (JETS-PEJ)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetf$Date <- as.Date(dataetf$Date, format = "%d.%m.%Y")
dataetf$time <- 1:nrow(dataetf)

# --- Serileri düzenle ---
a <- dataetf$JETS
b <- dataetf$PEJ

diffjets <- diff(a)
diffpej  <- diff(b)
new_time <- dataetf$time[-1]

jets <- cbind(new_time, diffjets)
pej  <- cbind(new_time, diffpej)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_jets <- wt(jets)
wt_pej  <- wt(pej)

# --- Coherence ---
wtc_jets_pej <- wtc(jets, pej, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_jets_pej, plot.cb = TRUE,
     main = "Wavelet Coherence: JETS and PEJ")


#Wavelet Analysis# (JETS-AWAY)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetf$Date <- as.Date(dataetf$Date, format = "%d.%m.%Y")
dataetf$time <- 1:nrow(dataetf)

# --- Serileri düzenle ---
a <- dataetf$JETS
b <- dataetf$AWAY

diffjets <- diff(a)
diffaway  <- diff(b)
new_time <- dataetf$time[-1]

jets <- cbind(new_time, diffjets)
away  <- cbind(new_time, diffaway)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_jets <- wt(jets)
wt_away  <- wt(away)

# --- Coherence ---
wtc_jets_away <- wtc(jets, away, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_jets_away, plot.cb = TRUE,
     main = "Wavelet Coherence: JETS and AWAY")


#Wavelet Analysis# (JETS-BEDZ)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetfwithbedz$Date <- as.Date(dataetfwithbedz$Date, format = "%d.%m.%Y")
dataetfwithbedz$time <- 1:nrow(dataetfwithbedz)

# --- Serileri düzenle ---
a <- dataetfwithbedz$JETS
b <- dataetfwithbedz$BEDZ

diffjets <- diff(a)
diffbedz  <- diff(b)
new_time <- dataetfwithbedz$time[-1]

jets <- cbind(new_time, diffjets)
bedz  <- cbind(new_time, diffbedz)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_jets <- wt(jets)
wt_bedz  <- wt(bedz)

# --- Coherence ---
wtc_jets_bedz <- wtc(jets, bedz, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_jets_bedz, plot.cb = TRUE,
     main = "Wavelet Coherence: JETS and BEDZ")



#Wavelet Analysis# (ITA-PEJ)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetf$Date <- as.Date(dataetf$Date, format = "%d.%m.%Y")
dataetf$time <- 1:nrow(dataetf)

# --- Serileri düzenle ---
a <- dataetf$ITA
b <- dataetf$PEJ

diffita <- diff(a)
diffpej  <- diff(b)
new_time <- dataetf$time[-1]

ita <- cbind(new_time, diffita)
pej  <- cbind(new_time, diffpej)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_ita <- wt(ita)
wt_pej  <- wt(pej)

# --- Coherence ---
wtc_ita_pej <- wtc(ita, pej, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_ita_pej, plot.cb = TRUE,
     main = "Wavelet Coherence: ITA and PEJ")



#Wavelet Analysis# (ITA-AWAY)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetf$Date <- as.Date(dataetf$Date, format = "%d.%m.%Y")
dataetf$time <- 1:nrow(dataetf)

# --- Serileri düzenle ---
a <- dataetf$ITA
b <- dataetf$AWAY

diffita <- diff(a)
diffaway  <- diff(b)
new_time <- dataetf$time[-1]

ita <- cbind(new_time, diffita)
away  <- cbind(new_time, diffaway)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_ita <- wt(ita)
wt_away  <- wt(away)

# --- Coherence ---
wtc_ita_away <- wtc(ita, away, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_ita_away, plot.cb = TRUE,
     main = "Wavelet Coherence: ITA and AWAY")



#Wavelet Analysis# (ITA-BEDZ)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetfwithbedz$Date <- as.Date(dataetfwithbedz$Date, format = "%d.%m.%Y")
dataetfwithbedz$time <- 1:nrow(dataetfwithbedz)

# --- Serileri düzenle ---
a <- dataetfwithbedz$ITA
b <- dataetfwithbedz$BEDZ

diffita <- diff(a)
diffbedz  <- diff(b)
new_time <- dataetfwithbedz$time[-1]

ita <- cbind(new_time, diffita)
bedz <- cbind(new_time, diffbedz)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_ita <- wt(ita)
wt_bedz  <- wt(bedz)

# --- Coherence ---
wtc_ita_bedz <- wtc(ita, bedz, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_ita_bedz, plot.cb = TRUE,
     main = "Wavelet Coherence: ITA and BEDZ")



#Wavelet Analysis# (PEJ-AWAY)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetf$Date <- as.Date(dataetf$Date, format = "%d.%m.%Y")
dataetf$time <- 1:nrow(dataetf)

# --- Serileri düzenle ---
a <- dataetf$PEJ
b <- dataetf$AWAY

diffpej <- diff(a)
diffaway  <- diff(b)
new_time <- dataetf$time[-1]

pej <- cbind(new_time, diffpej)
away  <- cbind(new_time, diffaway)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_pej <- wt(pej)
wt_away  <- wt(away)

# --- Coherence ---
wtc_pej_away <- wtc(pej, away, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_pej_away, plot.cb = TRUE,
     main = "Wavelet Coherence: PEJ and AWAY")



#Wavelet Analysis# (PEJ-BEDZ)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetfwithbedz$Date <- as.Date(dataetfwithbedz$Date, format = "%d.%m.%Y")
dataetfwithbedz$time <- 1:nrow(dataetfwithbedz)

# --- Serileri düzenle ---
a <- dataetfwithbedz$PEJ
b <- dataetfwithbedz$BEDZ

diffpej <- diff(a)
diffbedz  <- diff(b)
new_time <- dataetfwithbedz$time[-1]

pej <- cbind(new_time, diffpej)
bedz <- cbind(new_time, diffbedz)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_pej <- wt(pej)
wt_bedz  <- wt(bedz)

# --- Coherence ---
wtc_pej_bedz <- wtc(pej, bedz, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_pej_bedz, plot.cb = TRUE,
     main = "Wavelet Coherence: PEJ and BEDZ")



#Wavelet Analysis# (AWAY-BEDZ)

library(biwavelet)

# --- Tarih formatı ve zaman ---
dataetfwithbedz$Date <- as.Date(dataetfwithbedz$Date, format = "%d.%m.%Y")
dataetfwithbedz$time <- 1:nrow(dataetfwithbedz)

# --- Serileri düzenle ---
a <- dataetfwithbedz$AWAY
b <- dataetfwithbedz$BEDZ

diffaway <- diff(a)
diffbedz  <- diff(b)
new_time <- dataetfwithbedz$time[-1]

away <- cbind(new_time, diffaway)
bedz <- cbind(new_time, diffbedz)

# --- SADECE 2 KOLONLA wt() yapılmalı ---
wt_away <- wt(away)
wt_bedz  <- wt(bedz)

# --- Coherence ---
wtc_away_bedz <- wtc(away, bedz, nrands = 100)

# --- Plot (tam temiz görüntü) ---
par(oma=c(0,0,0,1), mar=c(5,4,4,5)+0.1)
plot(wtc_away_bedz, plot.cb = TRUE,
     main = "Wavelet Coherence: AWAY and BEDZ")