# NOT RUN {
ms = seq(3,100,1)
hs = seq(0,50,1)
overlap = TRUE
nu = 0
m_max = (max(ms)+1)*(max(hs)+1) - max(ms)*max(hs)*as.integer(overlap)
theta = c(c(1,(20:1)/10), rep(0, m_max - 20))
Gamma1 = diag(m_max+1)
Gamma2 = matrix(0, ncol = m_max+1, nrow = m_max+1)
Gamma12 = matrix(0, ncol = m_max+1, nrow = m_max+1)
for(t in 1:(m_max+1)){
for(h in 0:(m_max+1-t)){
Gamma2[t,t+h] = sum(theta[1:(length(theta)-h)]*theta[(1+h):length(theta)])
Gamma2[t+h,t] = Gamma2[t,t+h]
Gamma12[t,t+h] = theta[h+1]
}
}
covdcca = covFdcca(m = ms, nu = 0, h = hs,
G1 = Gamma1, G2 = Gamma2, G12 = Gamma12)
# }
Run the code above in your browser using DataLab