bpfaff / vars

Multivariate Time Series Models: VAR, SVAR and SVEC
40 stars 22 forks source link

predict.vec2var (miscalculation when ecdet="trend") #3

Open weiweilars opened 6 years ago

weiweilars commented 6 years ago

Hi

I found something may be wrong in the function predict.vec2var

This part in the function when there is trend:

if(eval(object$vecm@ecdet) == "trend"){ trendf <- seq(obs + p, length = n.ahead) Zdet <- cbind(Zdet, trendf) } There are two situation: spec="longrun", then trendf<-seq(obs+1) spec="transitory", then trendf<-seq(obs+p)

Here is my consideration: spec is the parameter to control the formation of vecm model, however they are actually the same model. So they should have same predictions. However, according to this function, the predictions are different if you choose the different spec value.

I may be wrong and have misunderstand the parameters. Please let me know....

thanks for time!

yours, weiweiFeng