Suppose I am conducting a research paper on time series data entitled “The Nexus Among…
- User
Suppose I am conducting a research paper on time series data entitled “The Nexus Among Oil Price, Stock Market, and Exchange Rate During Recent Pandemic & Russia-Ukraine Crisis: Fresh Evidence from UK Economy”. Here I have taken three variables Stock Index (SI), Brent Oil Price (OP), and Exchange Rate (ER). I have taken time series data from 2014-2023 segmenting into four periods. 2014-2019 for Pre-covid Period; 2020-2021 for Covid Period; 2022-2023 for War Period and 2014-2023 for the Overall Period. All of my variables are stationary at first differencing and not cointegrated, that's why I am going for VAR Model. The name of the converted variables of at first differencing are RET_SI, RET_OP, RET_ER. Now the problem is that I am getting serial autocorrelation and heteroskedasticity problem in different periods but I need to insist on conducting my research on VAR model. So, I want you to give me instructions in R to Conduct the VAR model of my variables with robust standard error that counts both autocorrelation and heteroskedasticity and make my VAR model reliable. Please guide me through.
- Assistant
- User
how to determine optimum lag length through R command. Also add that with your response and write it again.
- Assistant
- User
For your understanding, my dataset name is "data" already
your following command is showing error. data <- data.frame(Date = as.Date(as.yearmon(dataDate)), RET_SI = data RET_SI, RET_OP = dataRET_OP, RET_ER = data RET_ER)
Error-
Error: unexpected symbol in: "data <- data.frame(Date = as.Date(as.yearmon(dataDate)), RET_SI = data RET_SI"
Take into account the name of my dataset and correct and rewrite me all the code again.
- Assistant
- User
"df <- zoo(data[,-1], as.Date(as.yearmon(data" incorrect command saying
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.