I'm trying to call the R function garchFit from Julia using Rcall. When I do things directly in R, all is well: the following works
library("fGarch")
library("rugarch")
spxData <- read.csv(file = 'SPXlogreturns.csv')
y = spxData$y
fit.arch <- garchFit(~garch(1,0),data=y,trace=F,include.mean=FALSE)
But when I have the same vector of log returns in Julia and try to do the same thing using RCall:
using RCall
@rput y
R"""
library("fGarch")
library("rugarch")
fit.arch <- garchFit(~garch(1,0),data=y,trace=F,include.mean=FALSE)
"""
I get the error Multivariate data inputs require lhs for the formula. Yet when I @rget y back from R, it's a vector, so I don't understand what garchFit wants. Any help much appreciated.