I am trying to do model averaging and wish to combine models from the rugarch package and model estimated through "lm" function. I use daily financial index data converted into an xts object. Thereby, I run lm functions:
X<-as.xts(Financial_index_data)
LM.Result<-lm(X ~ lag(X, -1))
and then I run a GARCH function using rugarch package:
library(rugarch)
Garch.spec = ugarchspec(variance.model = list(model="sGARCH", garchOrder = c(1,1)), mean.model = list(armaOrder=c(1,1)), distribution.model = "norm")
GARCH.Result<- ugarchfit(Garch.spec, X)
In my next step, I want to perform model averaging using MuMIn:
library(MuMIn)
MA<-model.avg(LM.Result, GARCH.Result)
And gets the following error: "Error: $ operator not defined for this S4 class"
I understand that rugarch package is not supported by MuMIn package. But is there anyway to transform my regression made in rugarch to an lm class or any model averaging package that supports all kinds of regression?