Hi,
I know the problem now. Previously i use as.timeSeries function, but the
error message of setar function still came out. Anyway, many thanks to
Pascal for the solution.

Best Regards,
Ario

On Mon, Jul 23, 2012 at 4:28 PM, Pascal Oettli <kri...@ymail.com> wrote:

> Hello,
>
> It works for me (with a warning message), by adding this line before the
> setar procedure:
>
> > a <- as.ts(a)
>
> As I don't know the time step, thus it is only a pseudo time-series.
>
> Regards,
> Pascal
>
>
> Le 23/07/2012 18:18, Ario Ario a écrit :
>
>> Hi,
>> I apologize for not attaching a complete dataset. The dataset contains
>> only
>> 1000 observations. Please find it in the attachment. Thanks
>>
>> (Ario)
>>
>>
>>
>> On Mon, Jul 23, 2012 at 3:46 PM, Pascal Oettli <kri...@ymail.com> wrote:
>>
>>  Hello,
>>>
>>> Your problem is nto reproducible without the complete "a" dataset.
>>>
>>> Regards,
>>> Pascal
>>>
>>>
>>> Le 23/07/2012 09:49, Ario Ario a écrit :
>>>
>>>  Hi all,
>>>>
>>>> I have problem to estimate a SETAR model. I always get an error message.
>>>> Here is the code:
>>>>
>>>> ## there are 4175 observation in the series (a).
>>>>
>>>>   a[1:10,1] [1] 1.496498 1.496602 1.496636 1.496515 1.496515 1.496463
>>>>
>>>>> 1.496429 1.496549 1.496480
>>>>>
>>>>>  [10] 1.496498
>>>>
>>>>   library("tsDyn")
>>>>
>>>>>
>>>>>
>>>>   selectSETAR(a, m=2)Using maximum autoregressive order for low regime:
>>>> mL
>>>>
>>>>> = 2
>>>>>
>>>>>  Using maximum autoregressive order for high regime: mH = 2
>>>> Searching on 1552 possible threshold values within regimes with
>>>> sufficient ( 15% ) number of observations
>>>> Searching on  6208  combinations of thresholds ( 1552 ), thDelay ( 1
>>>> ), mL ( 2 ) and MM ( 2 )
>>>> Results of the grid search for 1 threshold
>>>>      thDelay mL mH       th pooled-AIC
>>>> 1        0  2  2 1.674402  -43590.12
>>>> 2        0  2  2 1.674218  -43588.81
>>>> 3        0  2  2 1.673758  -43588.24
>>>> 4        0  2  2 1.674011  -43588.19
>>>> 5        0  2  2 1.674480  -43587.85
>>>> 6        0  2  2 1.673988  -43587.62
>>>> 7        0  2  2 1.673666  -43587.56
>>>> 8        0  2  2 1.674471  -43587.16
>>>> 9        0  2  2 1.673620  -43586.51
>>>> 10       0  2  2 1.673574  -43585.83
>>>>
>>>>   mod.star <- setar(a, m=2, steps=5, thDelay=0, th=1.674402)Error in
>>>>
>>>>> rep(NA, length(x) - length(reg)) : invalid 'times' argument
>>>>>
>>>>>
>>>>
>>>> Would someone tell me the meaning of this error message? and how to
>>>> solve
>>>> the problem?
>>>>
>>>>
>>>> Kind Regards,
>>>> Ario
>>>>
>>>>          [[alternative HTML version deleted]]
>>>>
>>>> ______________________________****________________
>>>> R-help@r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/****listinfo/r-help<https://stat.ethz.ch/mailman/**listinfo/r-help>
>>>> <https://stat.**ethz.ch/mailman/listinfo/r-**help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>> >
>>>> PLEASE do read the posting guide http://www.R-project.org/**
>>>> posting-guide.html 
>>>> <http://www.R-project.org/**posting-guide.html<http://www.R-project.org/posting-guide.html>
>>>> >
>>>>
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>>
>>>>
>>>
>>
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to