- # NOTE: if predict_at does not cut days at midnight, exogenous vars need to be shifted
- exo_hat = as.data.frame( exo_df[
- ifelse(predict_at>0,max(1,i-1),i) , (1+nb_exos+1):(1+2*nb_exos) ] )
- exo = as.data.frame( exo_df[ ifelse(predict_at>0,max(1,i-1),i) , 2:(1+nb_exos) ] )
+ exo = as.data.frame( exo_df[i,2:(1+nb_exos)] )
+ exo_hat = as.data.frame( exo_df[i,(1+nb_exos+1):(1+2*nb_exos)] )