[R] R: Apply a Seasonal ARMA process
Rui Barradas
ruipbarradas at sapo.pt
Mon Jun 24 12:59:07 CEST 2013
Hello,
You have three parameters, two sar and one intercept.
arima(x, order=c(0,0,0), seasonal=list(order=c(2,0,0), period=4),
transform.pars = FALSE, fixed = c(0.54, 0.5, rep(NA, 1)))
I also believe that the answer you got from Rolf is more to the point.
Try something along the lines he suggested.
Hope this helps,
Rui Barradas
Em 24-06-2013 10:34, Stefano Sofia escreveu:
> Thank you for your tips.
>
> I tried the code that you suggested, but there is a problem with the length of fixed.
> In the help page it is specified that the length of fixed must be total number of parameters.
> But in case of a Seasonal AR(2) model, which is the number of the parameters? I tried with length 4, 6, 8 but there always is the same error.
> And moreover, which is the order of its elements.
> Have you got some final hints about it?
>
> Thank you for your help
>
> Best regards,
>
> Stefano Sofia
>
> ________________________________________
> Da: Rui Barradas [ruipbarradas at sapo.pt]
> Inviato: venerdì 21 giugno 2013 16.37
> A: Stefano Sofia
> Oggetto: Re: [R] Apply a Seasonal ARMA process
>
> Hello,
>
> I think the correct way would be
>
> arima(my_ts, order=c(0,0,0), seasonal=list(order=c(2,0,0), period=4),
> transform.pars = FALSE, fixed = c(0.54, 0.5))
>
> Take a look at the help page for ?arima. You will see the description of
> argument 'fixed'. You will also see that 'n' is not an argument.
>
> Hope this helps,
>
> Rui Barradas
>
> Em 21-06-2013 14:48, Stefano Sofia escreveu:
>> Dear R users,
>> I have a seasonal time series of period 4 (my_ts).
>> I would like to apply to my_ts a Seasonal ARMA(2,0) process (only the seasonal part), with Seasonal AR coefficients respectively 0.54 and 0.5.
>> I tried to use the arima command from the stats package, but this code is not correct:
>>
>> arima(my_ts, order=c(0,0,0), seasonal=list(order=c(2,0,0), sar=c(0.54, 0.5), period=4), n=220)
>>
>> The error is:
>> "Error in optim(init[mask], armaCSS, method = optim.method, hessian = FALSE: initial value in 'vmmin' not finite".
>>
>> I am not even sure of the syntax about sar=c(0.54, 0.5).
>> I looked for this topic in the R archive, but I have not been able to find an example or a useful hint.
>> Could you please help me? Does arima handle seasonal ARMA processes? If yes, how? Is there a better specific package for that?
>>
>> Thank you for your help
>> Stefano Sofia
>>
>>
>> ________________________________
>>
>> AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere informazioni confidenziali, pertanto è destinato solo a persone autorizzate alla ricezione. I messaggi di posta elettronica per i client di Regione Marche possono contenere informazioni confidenziali e con privilegi legali. Se non si è il destinatario specificato, non leggere, copiare, inoltrare o archiviare questo messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al mittente ed eliminarlo completamente dal sistema del proprio computer. Ai sensi dell'art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessità ed urgenza, la risposta al presente messaggio di posta elettronica può essere visionata da persone estranee al destinatario.
>> IMPORTANT NOTICE: This e-mail message is intended to be received only by persons entitled to receive the confidential information it may contain. E-mail messages to clients of Regione Marche may contain information that is confidential and legally privileged. Please do not read, copy, forward, or store this message unless you are an intended recipient of it. If you have received this message in error, please forward it to the sender and delete it completely from your computer system.
>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> ________________________________
>
> AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere informazioni confidenziali, pertanto è destinato solo a persone autorizzate alla ricezione. I messaggi di posta elettronica per i client di Regione Marche possono contenere informazioni confidenziali e con privilegi legali. Se non si è il destinatario specificato, non leggere, copiare, inoltrare o archiviare questo messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al mittente ed eliminarlo completamente dal sistema del proprio computer. Ai sensi dell’art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessità ed urgenza, la risposta al presente messaggio di posta elettronica può essere visionata da persone estranee al destinatario.
> IMPORTANT NOTICE: This e-mail message is intended to be received only by persons entitled to receive the confidential information it may contain. E-mail messages to clients of Regione Marche may contain information that is confidential and legally privileged. Please do not read, copy, forward, or store this message unless you are an intended recipient of it. If you have received this message in error, please forward it to the sender and delete it completely from your computer system.
>
More information about the R-help
mailing list