#1. Declare The Dataset As A Time Series, TS, Object in R
#1. Declare The Dataset As A Time Series, TS, Object in R
(I don’t really understand your meaning of “Copy and paste your R-codes on
the last page of your answer sheet with the title "Appendices". My code is
really long, sorry TAT)
#1f.best one
install.packages("tseries")
library("tseries")
adf_result=adf.test(Asset1_ts)
adf_result #dont know what does the result mean
#so, ADF equation without drift and trend is the best one i think
#2 price relationship
install.packages("dynlm")
library("dynlm")
install.packages("dplyr")
library("dplyr")
str(ETs)
ETs$Asset2_L1=lag(ETs$Asset2, 1)
ETs$Asset2_L2=lag(ETs$Asset2, 2)
Asset2_ts=ts(ETs$Asset2)
Asset3_ts=ts(ETs$Asset3)
ETs_cleaned=na.omit(ETs)
model_ARDL=dynlm(Asset1~Asset2_L1+Asset2_L2+Asset3,data=ETs_cleaned)
summary("model_ARDL")
#alright, its just some words about my feeling, It doesn't matter the results
#to be honestly, i learnt some functions from chatgpt and youtube, because, some
code you taught in class, i cant totally understand.
#so, if you think my code is unsuitable, you can lower my grade.
#i did try my best, even some results are still wrong