i have lots of trouble with the export of a vector autoregression model with R, more specifically with the Stargazer package.
Model1 <- VAR(v1, p = 7, type = "const", season = NULL, exog = NULL)
sum <- summary(Model1)
sum
gives the desired output in the console which i cannot export.
When i try it with stargazer like this:
stargazer(sum[["varresult"]], type = 'text', out="VarModel.html")
i get the error message
"Error in .summary.object$coefficients : $ operator is invalid for atomic vectors"
Can someone help me out here please?