Dear Experts, A kind reminder. Please help me.
On Fri, 8 Jul 2022, 21:56 Muhammad Zubair Chishti, <mzchis...@eco.qau.edu.pk> wrote: > > *Dear Experts,* > *Greetings from Pakistan*. > *When I run the following code in R* > library(frequencyConnectedness) > library(readxl) > ##Add data here## > Data <- read_excel("Data_oil_agri.xlsx", sheet = "Sheet1") > Data <- Data[,2:22] > Data=na.omit(Data) > Bnames=colnames(Data) > > lags=VARselect(Data, lag.max = 12, type = "const") ## "const", "trend", > "both", "none" > p=lags$selection[[3]] > > est <- VAR(Data, p = p, type = "const") > sp <- spilloverDY12(est, n.ahead = 10, no.corr = F) > > params_est = list(p = p, type = "const") > sp_roll <- spilloverRollingDY12(Data, n.ahead = 10, no.corr = F, "VAR", > params_est = params_est, window = 260) > bounds <- c(pi+0.00001, pi/5, 0) > sp_bk <- spilloverBK12(est, n.ahead = 100, no.corr = F, partition = bounds) > > sp_bk_roll <- spilloverRollingBK12(Data, n.ahead = 100, no.corr = F, > func_est = "VAR", params_est = params_est, window = 260, partition = bounds) > > **Till now the code works well. After that, when I run the following:* > > con = as.matrix(read_excel("DY_Table.xlsx")[,-1])*100 > > *I face the following error:* > *Error in* *`vectbl_as_col_location()`:* > ! Can't negate columns past the end. > ℹ Location 1 doesn't exist. > ℹ There are only 0 columns. > Run `rlang::last_error()` to see where the error occurred. > > Kindly please guide me. > > Regards > Muhammad Zubair Chishti > Ph.D. Student > School of Business, > Zhengzhou University, Henan, China. > My Google scholar link: > https://scholar.google.com/citationshl=en&user=YPqNJMwAAAAJ > My ResearchGate link: > https://www.researchgate.net/profile/Muhammad-Chishti > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.