[R] setar function error message
Ario Ario
garionet at gmail.com
Mon Jul 23 11:18:08 CEST 2012
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 <kridox at 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 at r-project.org mailing list
>> 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>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
-------------- next part --------------
RUPEE.US.
1 1.496498
2 1.496602
3 1.496636
4 1.496515
5 1.496515
6 1.496463
7 1.496429
8 1.496549
9 1.496480
10 1.496498
11 1.496498
12 1.496533
13 1.496533
14 1.496498
15 1.496515
16 1.496498
17 1.496533
18 1.496498
19 1.496498
20 1.496463
21 1.496533
22 1.496463
23 1.496445
24 1.496515
25 1.496480
26 1.496498
27 1.496463
28 1.496515
29 1.496515
30 1.496498
31 1.496480
32 1.496480
33 1.496445
34 1.496498
35 1.496480
36 1.496463
37 1.496463
38 1.496515
39 1.496480
40 1.496533
41 1.496515
42 1.496445
43 1.496515
44 1.496895
45 1.497344
46 1.496895
47 1.496533
48 1.496480
49 1.496498
50 1.496515
51 1.496515
52 1.496515
53 1.496480
54 1.496533
55 1.496515
56 1.496515
57 1.496533
58 1.496498
59 1.496515
60 1.496498
61 1.496463
62 1.496498
63 1.496498
64 1.496515
65 1.496515
66 1.496445
67 1.496498
68 1.496480
69 1.496515
70 1.496498
71 1.496445
72 1.496376
73 1.496480
74 1.496515
75 1.496480
76 1.496463
77 1.496515
78 1.496515
79 1.496515
80 1.496498
81 1.496515
82 1.496480
83 1.496498
84 1.496445
85 1.496480
86 1.496480
87 1.496533
88 1.496480
89 1.496480
90 1.496498
91 1.496515
92 1.496480
93 1.496498
94 1.496515
95 1.496515
96 1.496498
97 1.496515
98 1.496498
99 1.496533
100 1.496480
101 1.496515
102 1.496515
103 1.496515
104 1.496515
105 1.496515
106 1.496533
107 1.496533
108 1.496515
109 1.496602
110 1.496515
111 1.496498
112 1.496480
113 1.496515
114 1.496498
115 1.496515
116 1.496480
117 1.496515
118 1.496533
119 1.496498
120 1.496498
121 1.496498
122 1.496480
123 1.496498
124 1.496480
125 1.496498
126 1.496498
127 1.496480
128 1.496498
129 1.496515
130 1.496515
131 1.496498
132 1.496480
133 1.496498
134 1.496636
135 1.496549
136 1.496515
137 1.496533
138 1.496498
139 1.496480
140 1.496498
141 1.496463
142 1.496480
143 1.496533
144 1.496498
145 1.496567
146 1.496238
147 1.496498
148 1.496498
149 1.496480
150 1.496498
151 1.496515
152 1.496498
153 1.496515
154 1.496533
155 1.496533
156 1.496515
157 1.496480
158 1.496515
159 1.496533
160 1.496480
161 1.496533
162 1.496515
163 1.496498
164 1.496480
165 1.496515
166 1.496515
167 1.496411
168 1.496429
169 1.496584
170 1.496498
171 1.496515
172 1.496549
173 1.496515
174 1.496498
175 1.496533
176 1.496515
177 1.496515
178 1.496515
179 1.496549
180 1.496533
181 1.496549
182 1.496515
183 1.496515
184 1.496515
185 1.496549
186 1.496498
187 1.496498
188 1.496480
189 1.496549
190 1.496515
191 1.496498
192 1.496480
193 1.496498
194 1.496445
195 1.496411
196 1.496411
197 1.496498
198 1.496533
199 1.496480
200 1.496533
201 1.496498
202 1.496498
203 1.496498
204 1.496498
205 1.496498
206 1.496549
207 1.496480
208 1.496498
209 1.496498
210 1.496515
211 1.496498
212 1.496498
213 1.496515
214 1.496515
215 1.496722
216 1.496515
217 1.496602
218 1.496722
219 1.497206
220 1.496930
221 1.496999
222 1.497344
223 1.497172
224 1.497206
225 1.497397
226 1.497051
227 1.496688
228 1.496549
229 1.496515
230 1.496498
231 1.496498
232 1.496480
233 1.496463
234 1.496498
235 1.496515
236 1.496584
237 1.496549
238 1.496722
239 1.496860
240 1.497172
241 1.496722
242 1.496826
243 1.496722
244 1.496549
245 1.496515
246 1.496515
247 1.496515
248 1.496515
249 1.496498
250 1.496515
251 1.496549
252 1.496999
253 1.497068
254 1.496930
255 1.496982
256 1.496791
257 1.496791
258 1.497033
259 1.497017
260 1.496757
261 1.496498
262 1.496498
263 1.496515
264 1.496480
265 1.496445
266 1.496480
267 1.496515
268 1.496480
269 1.496429
270 1.496463
271 1.496411
272 1.496498
273 1.496549
274 1.496480
275 1.496515
276 1.496515
277 1.496549
278 1.496584
279 1.496757
280 1.496549
281 1.496602
282 1.496618
283 1.496584
284 1.496515
285 1.496549
286 1.496618
287 1.496480
288 1.496515
289 1.496445
290 1.496533
291 1.496567
292 1.496515
293 1.496498
294 1.496533
295 1.496429
296 1.496480
297 1.496515
298 1.496688
299 1.496567
300 1.496636
301 1.496791
302 1.496860
303 1.497293
304 1.497206
305 1.498138
306 1.500785
307 1.502564
308 1.503450
309 1.502359
310 1.501128
311 1.501812
312 1.502684
313 1.503238
314 1.497098
315 1.498311
316 1.497655
317 1.498104
318 1.498311
319 1.498999
320 1.499378
321 1.499756
322 1.499790
323 1.498862
324 1.498035
325 1.497759
326 1.497137
327 1.497690
328 1.496860
329 1.497344
330 1.497206
331 1.496999
332 1.496860
333 1.496757
334 1.496653
335 1.496307
336 1.496307
337 1.496999
338 1.496805
339 1.496860
340 1.497413
341 1.497206
342 1.496771
343 1.496584
344 1.496584
345 1.496653
346 1.497379
347 1.497344
348 1.497234
349 1.497303
350 1.497206
351 1.497137
352 1.496791
353 1.496701
354 1.497275
355 1.496584
356 1.497344
357 1.497483
358 1.497483
359 1.497344
360 1.497324
361 1.497047
362 1.496978
363 1.496681
364 1.496791
365 1.496978
366 1.496819
367 1.496750
368 1.497206
369 1.497275
370 1.497068
371 1.497206
372 1.496860
373 1.496860
374 1.497013
375 1.497047
376 1.497137
377 1.497096
378 1.496860
379 1.496895
380 1.496874
381 1.496860
382 1.496888
383 1.496860
384 1.496653
385 1.496542
386 1.496508
387 1.496542
388 1.496515
389 1.496874
390 1.496445
391 1.496930
392 1.496722
393 1.496494
394 1.496494
395 1.496494
396 1.496681
397 1.496508
398 1.496681
399 1.496480
400 1.496508
401 1.496480
402 1.496494
403 1.496584
404 1.496508
405 1.496508
406 1.496508
407 1.496584
408 1.496577
409 1.496701
410 1.496681
411 1.496791
412 1.497137
413 1.497137
414 1.497068
415 1.497096
416 1.497185
417 1.497344
418 1.497579
419 1.497690
420 1.497275
421 1.497648
422 1.498000
423 1.497828
424 1.499824
425 1.499481
426 1.499481
427 1.499824
428 1.500031
429 1.500511
430 1.502427
431 1.501128
432 1.502837
433 1.502768
434 1.502564
435 1.503178
436 1.503927
437 1.504471
438 1.510143
439 1.508732
440 1.507788
441 1.508462
442 1.511215
443 1.514481
444 1.516866
445 1.532117
446 1.528274
447 1.528338
448 1.528724
449 1.529109
450 1.528467
451 1.528852
452 1.531159
453 1.530136
454 1.529943
455 1.531159
456 1.530520
457 1.529623
458 1.529238
459 1.528981
460 1.530136
461 1.530200
462 1.529623
463 1.529879
464 1.529687
465 1.530904
466 1.534661
467 1.538448
468 1.541267
469 1.542639
470 1.544874
471 1.551145
472 1.550840
473 1.550840
474 1.550840
475 1.550840
476 1.549616
477 1.541579
478 1.534026
479 1.537819
480 1.536874
481 1.539703
482 1.540767
483 1.538448
484 1.535294
485 1.537882
486 1.538134
487 1.538385
488 1.538699
489 1.538511
490 1.541330
491 1.540204
492 1.541517
493 1.541579
494 1.541766
495 1.541829
496 1.542265
497 1.543012
498 1.542888
499 1.542888
500 1.542763
501 1.542888
502 1.542888
503 1.542327
504 1.541953
505 1.541953
506 1.542888
507 1.541922
508 1.542265
509 1.543447
510 1.543634
511 1.543509
512 1.543820
513 1.543696
514 1.543696
515 1.543820
516 1.543789
517 1.543789
518 1.544099
519 1.544750
520 1.545555
521 1.546111
522 1.546111
523 1.546543
524 1.546666
525 1.547775
526 1.549249
527 1.553883
528 1.554550
529 1.553276
530 1.553822
531 1.552972
532 1.554186
533 1.555034
534 1.554186
535 1.554913
536 1.555034
537 1.554247
538 1.553215
539 1.554186
540 1.556423
541 1.555940
542 1.555638
543 1.557327
544 1.561519
545 1.563303
546 1.565257
547 1.578639
548 1.576341
549 1.571126
550 1.569725
551 1.567026
552 1.567556
553 1.565080
554 1.562233
555 1.562352
556 1.562293
557 1.562293
558 1.562828
559 1.563244
560 1.563066
561 1.559368
562 1.555034
563 1.550779
564 1.546111
565 1.540016
566 1.538448
567 1.535357
568 1.529109
569 1.532372
570 1.531479
571 1.532181
572 1.531639
573 1.530264
574 1.530398
575 1.532117
576 1.535674
577 1.541704
578 1.545925
579 1.547159
580 1.540955
581 1.538448
582 1.533073
583 1.530840
584 1.535294
585 1.532117
586 1.532754
587 1.532117
588 1.530840
589 1.533391
590 1.532754
591 1.533073
592 1.532754
593 1.532754
594 1.532754
595 1.534026
596 1.533391
597 1.533645
598 1.534280
599 1.534026
600 1.531670
601 1.534026
602 1.534026
603 1.533709
604 1.533391
605 1.534661
606 1.534026
607 1.533772
608 1.540955
609 1.539703
610 1.539076
611 1.538448
612 1.537819
613 1.537819
614 1.538448
615 1.542825
616 1.545307
617 1.545925
618 1.542203
619 1.539703
620 1.540329
621 1.542203
622 1.541579
623 1.542825
624 1.542825
625 1.543447
626 1.545307
627 1.545307
628 1.546111
629 1.545307
630 1.544564
631 1.544440
632 1.543136
633 1.542825
634 1.542203
635 1.541704
636 1.541579
637 1.541579
638 1.542203
639 1.542203
640 1.542825
641 1.542825
642 1.542825
643 1.543447
644 1.542825
645 1.542825
646 1.542203
647 1.542825
648 1.542825
649 1.542825
650 1.546543
651 1.546913
652 1.542825
653 1.543447
654 1.543447
655 1.545183
656 1.544068
657 1.547159
658 1.546543
659 1.547159
660 1.549003
661 1.549003
662 1.550840
663 1.553276
664 1.553883
665 1.553883
666 1.551450
667 1.550840
668 1.551450
669 1.550840
670 1.552060
671 1.551450
672 1.552060
673 1.551450
674 1.550840
675 1.550228
676 1.549616
677 1.551450
678 1.551450
679 1.549616
680 1.553276
681 1.552668
682 1.551450
683 1.551450
684 1.551450
685 1.551450
686 1.551450
687 1.551450
688 1.551450
689 1.550840
690 1.551450
691 1.551450
692 1.552060
693 1.552668
694 1.552668
695 1.552060
696 1.552303
697 1.552120
698 1.551755
699 1.553276
700 1.553276
701 1.552060
702 1.552060
703 1.552060
704 1.552060
705 1.553276
706 1.552668
707 1.552668
708 1.552668
709 1.552668
710 1.552668
711 1.552668
712 1.552060
713 1.552060
714 1.552060
715 1.552060
716 1.552060
717 1.552060
718 1.552060
719 1.551450
720 1.551450
721 1.552060
722 1.552364
723 1.551938
724 1.552060
725 1.553762
726 1.552060
727 1.552181
728 1.552060
729 1.552364
730 1.552060
731 1.552425
732 1.553665
733 1.552060
734 1.551450
735 1.551511
736 1.551450
737 1.552060
738 1.552060
739 1.552449
740 1.551450
741 1.552060
742 1.552364
743 1.552547
744 1.552060
745 1.552060
746 1.555276
747 1.553300
748 1.552668
749 1.553276
750 1.553883
751 1.553276
752 1.553276
753 1.552060
754 1.552060
755 1.552668
756 1.552668
757 1.552668
758 1.553276
759 1.552911
760 1.552936
761 1.552911
762 1.552851
763 1.552668
764 1.553944
765 1.553944
766 1.553907
767 1.554973
768 1.554852
769 1.556544
770 1.554913
771 1.554489
772 1.554368
773 1.553883
774 1.554792
775 1.554489
776 1.554368
777 1.554247
778 1.553580
779 1.553580
780 1.553580
781 1.553883
782 1.555336
783 1.554186
784 1.554186
785 1.555397
786 1.554973
787 1.554852
788 1.555034
789 1.554792
790 1.554774
791 1.554489
792 1.554610
793 1.554471
794 1.554471
795 1.554580
796 1.554453
797 1.554489
798 1.554562
799 1.554562
800 1.554247
801 1.554429
802 1.554429
803 1.554641
804 1.554610
805 1.554852
806 1.554792
807 1.554731
808 1.554429
809 1.554792
810 1.554731
811 1.554550
812 1.554671
813 1.554671
814 1.554671
815 1.555542
816 1.555300
817 1.555058
818 1.554973
819 1.554792
820 1.554550
821 1.554792
822 1.554792
823 1.554756
824 1.554429
825 1.554671
826 1.554852
827 1.554307
828 1.554731
829 1.554550
830 1.554550
831 1.554513
832 1.554550
833 1.554429
834 1.554332
835 1.554368
836 1.554610
837 1.554792
838 1.554671
839 1.554792
840 1.554913
841 1.554792
842 1.554701
843 1.554792
844 1.554429
845 1.554792
846 1.554913
847 1.554792
848 1.554792
849 1.554671
850 1.554429
851 1.554550
852 1.554550
853 1.554550
854 1.554307
855 1.554186
856 1.554550
857 1.554429
858 1.554029
859 1.553883
860 1.553822
861 1.553580
862 1.553337
863 1.553458
864 1.553094
865 1.553215
866 1.553361
867 1.553215
868 1.553215
869 1.553337
870 1.553337
871 1.553094
872 1.553580
873 1.554307
874 1.554695
875 1.554574
876 1.554368
877 1.554307
878 1.554307
879 1.554247
880 1.554065
881 1.554065
882 1.553822
883 1.553671
884 1.553701
885 1.553458
886 1.553094
887 1.553701
888 1.554156
889 1.553822
890 1.553822
891 1.553580
892 1.553944
893 1.553822
894 1.553543
895 1.553519
896 1.553580
897 1.553543
898 1.553519
899 1.553907
900 1.554186
901 1.553944
902 1.553944
903 1.553822
904 1.553944
905 1.554126
906 1.553944
907 1.553944
908 1.554065
909 1.553822
910 1.553883
911 1.553944
912 1.553883
913 1.553944
914 1.553580
915 1.553458
916 1.553428
917 1.553822
918 1.553580
919 1.553337
920 1.553215
921 1.552729
922 1.552972
923 1.552729
924 1.552729
925 1.552607
926 1.552486
927 1.552607
928 1.552607
929 1.552607
930 1.552547
931 1.552547
932 1.552607
933 1.552753
934 1.552607
935 1.552607
936 1.553640
937 1.553106
938 1.552814
939 1.552851
940 1.552693
941 1.552851
942 1.552729
943 1.552668
944 1.552723
945 1.552851
946 1.552729
947 1.552851
948 1.552729
949 1.555940
950 1.559008
951 1.558349
952 1.560504
953 1.560803
954 1.560684
955 1.560922
956 1.560265
957 1.561698
958 1.562382
959 1.562531
960 1.562769
961 1.563481
962 1.564607
963 1.563718
964 1.563066
965 1.562709
966 1.562233
967 1.562079
968 1.562293
969 1.561221
970 1.560639
971 1.560803
972 1.560385
973 1.560026
974 1.559008
975 1.558769
976 1.558649
977 1.558553
978 1.558349
979 1.558469
980 1.558048
981 1.558349
982 1.558439
983 1.558409
984 1.558829
985 1.558888
986 1.559008
987 1.558948
988 1.559242
989 1.558769
990 1.558829
991 1.558793
992 1.558948
993 1.558769
994 1.558529
995 1.559068
996 1.559068
997 1.559691
998 1.559488
999 1.560146
1000 1.559931
More information about the R-help
mailing list