[R] VAR

Spencer Graves spencer.graves at pdf.com
Sat Mar 18 18:01:14 CET 2006


	  Where did you find the function "forecast"?  It is NOT a standard R 
function.

	  I just tried 'methods(class="ar")', which produced the following:

[1] predict.ar* print.ar*

    Non-visible functions are asterisked

	  The documentation for 'predict.ar' includes the following example:

 > sunspot.ar <- ar(sunspot.year)
 > (pred.sunspot <- predict(sunspot.ar, n.ahead=25))
$pred
Time Series:
Start = 1989
End = 2013
Frequency = 1
  [1] 135.25933 148.09051 133.98476 106.61344  71.21921  40.84057  18.70100
  [8]  11.52416  27.24208  56.99888  87.86705 107.62926 111.05437  98.05484
[15]  74.84085  48.80128  27.65441  18.15075  23.15355  40.04723  61.95906
[22]  80.79092  90.11420  87.44131  74.42284

$se
Time Series:
Start = 1989
End = 2013
Frequency = 1
  [1] 16.35519 24.68467 28.95653 29.97401 30.07714 30.15629 30.35971 
30.58793
  [9] 30.71100 30.74276 31.42565 32.96467 34.48910 35.33601 35.51890 
35.52034
[17] 35.62544 35.63564 35.63623 35.65107 35.70321 35.74992 35.78223 35.78905
[25] 35.78905

	  Does this answer your question?

	  spencer graves

Julija Kackina wrote:

> Hello!
> 
>  
> 
> I'm trying to forecast the UK exchange rate. To estimate my model I use
> ar() function. However, I can't get a forecast of the exchange rate
> using the function forecast().
> 
>  
> 
> Regards,
> 
> Julija Kackina
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list