static_rq <- rq(Gold ~ lGold4 + USDX + lGSPC2, tau = seq(0.01,0.99,by=0.01),data = df_gold)
summary(rq_GSPC)
This is a static model that exposes how variables called lGold4(Gold variable ritarded by 4 lags), USDX, lGSPC2 influence Gold; I assure you that the code worked, without any collinearity problem due to singular matrix.
But I need the dynamic one’s by dynrq() command, so:
dynamic_rq <- dynrq(Gold ~ L(Gold,4)+ USDX + L(GSPC,2), tau = seq(0.01,0.99,by=0.01),data = df_gold)
FACTS ON DATA: all of them are time series vector with 1348 daily observations starting to 25/07/2017 and ending to 19/12/2022; that’s all xts() objects with this order and already stationaryzed.
First I’ve tried to run
dynamic_rq <- dynrq(Gold ~ L(Gold,4)+ USDX + L(GSPC,2), tau = seq(0.01,0.99,by=0.01),data = df_gold)
all right, but then with summary() the console response with a singular matrix error in base::backsolve.
This error results only in summary(dynamic_rq) due to singular matrix, but previously in static_rq everythings worked so that isn’t proprially collinearity. I thought the point is something about the code or some implementation I need.
PS:
I tried again with both the others “fn” and “pfn”(Fisher-Newton method wich penalize collinearity) methods but I received in summary() a singular matrix again for the first one, and in dynrq() an error saying “the number of elements to replace is not a multiple of the replacement length” for the second one.