enter image description hereI'm using the library vars in R to plot fanchart and predictions through the vector of error correction model. I have used this code:

vecmfemales <- ca.jo(b,type="trace",spec="transitory")
vecm.level <- vec2var(vecmfemales, r = 3)
vecm.females <- predict(vecm.level,n.head=50,start=1921,frequency=1)

My graph comes out on the abcissa with and index of number which start by 0 and ends up with 100. However on my graphs I need years calendars from 1921 to 2009. Furthermore, I want to get also forecasting years up to 2059. I try to read the package from Pfaff(2013) but he presents only the abscissa as an index not as a calendar years. Please somebody can help me to improve my codes in order to get only calendar years? These codes above are my codes.

  • $\begingroup$ Could you maybe include 1) the plot and/or 2) a dataset so that we can reproduce your example? $\endgroup$ – COOLSerdash Jul 12 '13 at 17:19
  • $\begingroup$ rmetrics.org/files/Meielisalp2007/Presentations/Pfaff.pdf. I have some problems to upload my graph here. But you can find this typical graph here on the link inserted above at page 100. Anyway, Pfaff uses the same annotations on the abscissa but never uses calendar years with years like 1921, 1922, 1923....2009. He just uses 0, 1, 2,...........89. $\endgroup$ – ntamjo achille Jul 12 '13 at 17:53
  • $\begingroup$ Some example data would be better. The code that you've provided in the question it not reproducible. $\endgroup$ – COOLSerdash Jul 12 '13 at 18:38
  • $\begingroup$ I've updated my post by inserting the graph output. As you ihave on the abscissa index which start from 1 and end at 100. But is there any code that can help me to set up calendar year( from 1921 to 2059) rather than number from 1 to 100? Thanks $\endgroup$ – ntamjo achille Jul 13 '13 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.