As you can see there is no $ in my lines. However when I try to run the last line it gives me the error of $ blabla atomic. In the beginning I had some $ in there but then I changed everything to the [] format. It still gives me the error. Any idea why?
Attached the code that I used.
library(rugarch)
library(xts)
#uploading and preparing the data
data_sentivola<-read.csv("Some Path")
data_sentivola_INT <- data_sentivola[data_sentivola[,"ticker"] == "INTC",]
xts_sentivola_INTC <- xts(data_sentivola_INT[,c("return","rv")], order.by=as.Date(data_sentivola_INT[,"Date"]))
#Specifying the realGARCH model
spec <- ugarchspec(mean.model = list(armaOrder = c(0, 0), include.mean = FALSE), variance.model = list(model = 'realGARCH', garchOrder = c(1, 1)))
fit<- ugarchfit(spec, xts_sentivola_INTC[,"return"]*100, solver = "hybrid", realizedVol = xts_sentivola_INTC[,"rv"]*100)
The error message then looks like that
Error: $ operator is invalid for atomic vectors