[R] predict and arima

Jose-Marcio Martins da Cruz Jose-Marcio.Martins at mines-paristech.fr
Wed Feb 9 12:29:50 CET 2011


bryan wrote:
> Indeed, there was a bug ... my current play code looks like this ...

Hmmmm.... the bug seems to be there, still.

 > 				fit<- arima(x.ts, order=c(p,q,d),
                                                           *****
 > 					seasonal=list(order=c(P,D,Q),
 > 					period=frequency(x.ts)),
 > 					method='CSS')

P.S. - I'm trying to use this code, me too. Also based on the same source.

But it doesn't seem to work with one of my series.

>
> get.best.arima<- function(x.ts, maxord=c(3,3,3,3))
> {
> 	# function based on 'Introductory Time Series with R'
> 	#  ... try and fit the best ARIMA(p,d,q,P,D,Q) model
> 	#      using all permutations from 0 to maxord for p,q,P,Q
> 	#      Assume D=1 and select d using ndiffs and the KPSS test
> 	#      for stationarity.
> 	#  ... if no model can be found - return NULL
>


-- 
  ---------------------------------------------------------------
  Jose Marcio MARTINS DA CRUZ           http://j-chkmail.ensmp.fr
  Ecole des Mines de Paris
  60, bd Saint Michel                      75272 - PARIS CEDEX 06
  mailto:Jose-Marcio.Martins at mines-paristech.fr



More information about the R-help mailing list