Skip to content
Back to formatted view

Raw Message

Message-ID: <CAMfKi3JaV5jGukKwsvqfeD5rOqu-A7FBhA5PjF+=RFKTgNzbcw@mail.gmail.com>
Date: 2022-07-09T17:40:29Z
From: Muhammad Zubair Chishti
Subject: Please guide
In-Reply-To: <CAMfKi3KtWtuH-Zc6qhDcrN8bwhEeTiD9PbZB_m1L_XbejCR0sQ@mail.gmail.com>

Dear Experts,
A kind reminder. Please help me.


On Fri, 8 Jul 2022, 21:56 Muhammad Zubair Chishti, <mzchishti at 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]]