0
eCHFao<- -0.141081
#eCHFa1<-0
eCHFb1<- 0.985833
eCHFg1<- 0.199665
meanCHF<- mean(XtCHF)
eVarCHF<- (array,3421)
eVarCHF[1]<- var(XtCHF)
abco<- c(meanCHF, XtCHF1)
for (i in 2:3421) {eVarCHF[i]<- exp(eCHFao + (eCHFb1*log(sqrt(eVarCHF[i-1]))}

this code can't run because of an unexpected closing bracket, I am not sure why the bracket is unexpected or what I am missing?

1 Answers1

0

May be a language problem since the thing that is unexpected is a curly-brace and what is missing are two closing parens (aka "brackets" in some parts of the English-speaking world):

exp(eCHFao + (eCHFb1*log(sqrt(eVarCHF[i-1]))
   1          2          3    4           43   # need more parens

The language terms referring to ('s, and {'s is a bit scattered around the world. You should have posted the full error message that started out:

Error: unexpected '}'

... so it didn't actually say "bracket".

IRTFM
  • 258,963
  • 21
  • 364
  • 487