Skip to content

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

@weiweilars

Description

@weiweilars

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions