R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(6.34 + ,6.42 + ,6.55 + ,6.46 + ,6.25 + ,6.62 + ,6.77 + ,7.08 + ,7.31 + ,7.3 + ,7.19 + ,7.51 + ,7.66 + ,7.5 + ,8.02 + ,7.63 + ,7.25 + ,7.24 + ,7.16 + ,6.83 + ,6.59 + ,6.76 + ,6.43 + ,6.21 + ,5.69 + ,5.56 + ,5.55 + ,5.32 + ,5.07 + ,5.19 + ,5.18 + ,5.16 + ,4.96 + ,4.67 + ,4.54 + ,4.39 + ,4.25 + ,4.32 + ,4.55 + ,4.47 + ,4.36 + ,4.33 + ,4.32 + ,4.49 + ,4.42 + ,4.55 + ,4.56 + ,4.41 + ,4.22 + ,4.17 + ,4.05 + ,4.12 + ,4.13 + ,4.08 + ,4.01 + ,3.93 + ,3.75 + ,3.59 + ,3.55 + ,3.27 + ,3.0617 + ,3.0297 + ,3.0462 + ,2.7564 + ,2.6827 + ,2.8363 + ,3.03 + ,3.2373 + ,3.3011 + ,3.6837 + ,3.6892 + ,3.8263 + ,3.9495 + ,4.1114 + ,4.2675 + ,4.3645 + ,4.8485 + ,4.9649 + ,5.105 + ,5.2484 + ,5.2192 + ,5.2184 + ,5.1933 + ,4.8809 + ,4.5736 + ,4.5913 + ,4.4711 + ,4.4811 + ,4.5205 + ,4.3125 + ,4.3109 + ,4.1075 + ,3.77 + ,3.3694 + ,3.1979 + ,3.2981 + ,3.4832 + ,3.5936 + ,3.8156 + ,3.8602 + ,3.9627 + ,3.8688 + ,3.6448 + ,3.4404 + ,3.2364 + ,3.1259 + ,3.0174 + ,2.8716 + ,2.7045 + ,2.5036 + ,2.4112 + ,2.447 + ,2.2521 + ,2.0137 + ,2.0761 + ,2.2786 + ,2.2576 + ,2.3025 + ,2.4103 + ,2.3808 + ,2.2163 + ,2.163 + ,2.055 + ,2.1626 + ,2.2974 + ,2.4044 + ,2.361 + ,2.302 + ,2.377 + ,2.3161 + ,2.3283 + ,2.301 + ,2.3121 + ,2.31 + ,2.3348 + ,2.2651 + ,2.1933 + ,2.1028 + ,2.168 + ,2.2229 + ,2.2195 + ,2.4136 + ,2.6844 + ,2.7833 + ,2.8335 + ,2.9142 + ,3.1053 + ,3.2214 + ,3.3078 + ,3.4005 + ,3.5386 + ,3.6151 + ,3.7153 + ,3.7992 + ,3.8637 + ,3.9209 + ,4.0644 + ,4.0936 + ,4.1055 + ,4.2527 + ,4.3731 + ,4.5055 + ,4.5638 + ,4.6663 + ,4.7245 + ,4.6467 + ,4.6072 + ,4.7929 + ,4.498 + ,4.3489 + ,4.5901 + ,4.8199 + ,4.9938 + ,5.3608 + ,5.3932 + ,5.323 + ,5.3839 + ,5.2478 + ,4.3504 + ,3.452 + ,2.6216 + ,2.1354 + ,1.9089 + ,1.771 + ,1.6444 + ,1.6105 + ,1.412 + ,1.3343 + ,1.261 + ,1.2426 + ,1.2306 + ,1.2424 + ,1.2322 + ,1.2252 + ,1.2151 + ,1.2252 + ,1.2493 + ,1.2813 + ,1.3734 + ,1.421 + ,1.4205 + ,1.4954 + ,1.5405 + ,1.5261 + ,1.55 + ,1.714 + ,1.9241 + ,2.0856 + ,2.1471 + ,2.1441 + ,2.1827 + ,2.0969 + ,2.0669 + ,2.1101 + ,2.0439 + ,2.0035 + ,1.8366 + ,1.6783 + ,1.4985 + ,1.3678 + ,1.266 + ,1.219 + ,1.0608 + ,0.8766 + ,0.7398 + ,0.6501 + ,0.5879 + ,0.5493 + ,0.5753 + ,0.5942 + ,0.545 + ,0.5284 + ,0.4838 + ,0.5071 + ,0.5254 + ,0.5423 + ,0.5434 + ,0.541) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > nx <- length(x) > x <- ts(x,frequency=par1) > m <- StructTS(x,type='BSM') > m$coef level slope seas epsilon 0.013621307 0.006624166 0.000000000 0.000000000 > m$fitted level slope sea Jan 1 6.3400000 0.0000000000 0.000000000 Feb 1 6.4164062 0.0144831140 0.003593753 Mar 1 6.5474397 0.0681557388 0.002560339 Apr 1 6.4567144 -0.0089335418 0.003285560 May 1 6.2462473 -0.1081289784 0.003752688 Jun 1 6.6168084 0.1284787189 0.003191573 Jul 1 6.7668212 0.1391370896 0.003178825 Aug 1 7.0768723 0.2237734125 0.003127748 Sep 1 7.3068732 0.2268578861 0.003126808 Oct 1 7.2968552 0.1095237443 0.003144839 Nov 1 7.1868467 0.0007761950 0.003153271 Dec 1 7.5068529 0.1589132365 0.003147083 Jan 2 7.6876400 0.1694361267 -0.027640026 Feb 2 7.5049212 0.0132021220 -0.004921243 Mar 2 8.0266244 0.2667913969 -0.006624383 Apr 2 7.6355134 -0.0594033107 -0.005513384 May 2 7.2552399 -0.2183240182 -0.005239901 Jun 2 7.2453296 -0.1151073408 -0.005329562 Jul 2 7.1653372 -0.0977151316 -0.005337187 Aug 2 6.8353117 -0.2127856465 -0.005311730 Sep 2 6.5953102 -0.2262671297 -0.005310225 Oct 2 6.7653213 -0.0299641844 -0.005321284 Nov 2 6.4353171 -0.1785959513 -0.005317059 Dec 2 6.2153168 -0.1991066896 -0.005316764 Jan 3 5.6811366 -0.3628678908 0.008863373 Feb 3 5.5575716 -0.2522466131 0.002428437 Mar 3 5.5480985 -0.1314592768 0.001901525 Apr 3 5.3179905 -0.1803553744 0.002009507 May 3 5.0679520 -0.2148704992 0.002048002 Jun 3 5.1880454 -0.0489645152 0.001954609 Jul 3 5.1780509 -0.0296617454 0.001949125 Aug 3 5.1580516 -0.0248754766 0.001948439 Sep 3 4.9580453 -0.1116288160 0.001954715 Oct 3 4.6680421 -0.1999903720 0.001957940 Nov 3 4.5380427 -0.1653185379 0.001957302 Dec 3 4.3880428 -0.1577300405 0.001957231 Jan 4 4.2679046 -0.1392704932 -0.017904618 Feb 4 4.3165050 -0.0507782491 0.003494961 Mar 4 4.5469565 0.0889847627 0.003043482 Apr 4 4.4668196 0.0051703694 0.003180431 May 4 4.3567725 -0.0519005494 0.003227517 Jun 4 4.3267770 -0.0410505925 0.003222999 Jul 4 4.3167802 -0.0256684386 0.003219766 Aug 4 4.4867905 0.0712622912 0.003209488 Sep 4 4.4167868 0.0012836863 0.003213233 Oct 4 4.5467885 0.0650471943 0.003211511 Nov 4 4.5567881 0.0377779132 0.003211883 Dec 4 4.4067875 -0.0552435103 0.003212522 Jan 5 4.2617566 -0.0994342467 -0.041756577 Feb 5 4.1661737 -0.0976005356 0.003826325 Mar 5 4.0461451 -0.1087392450 0.003854890 Apr 5 4.1162600 -0.0201091967 0.003739965 May 5 4.1262698 -0.0051900062 0.003730199 Jun 5 4.0762625 -0.0273893816 0.003737533 Jul 5 4.0062589 -0.0484981687 0.003741052 Aug 5 3.9262576 -0.0641036095 0.003742365 Sep 5 3.7462552 -0.1215164226 0.003744803 Oct 5 3.5862548 -0.1405804220 0.003745211 Nov 5 3.5462553 -0.0907548898 0.003744673 Dec 5 3.2662548 -0.1845031329 0.003745184 Jan 6 3.1017605 -0.1746421625 -0.040060540 Feb 6 3.0254192 -0.1275113918 0.004280786 Mar 6 3.0420714 -0.0559448039 0.004128589 Apr 6 2.7521468 -0.1718854599 0.004253204 May 6 2.6784732 -0.1232363562 0.004226807 Jun 6 2.8321107 0.0139100092 0.004189252 Jul 6 3.0258231 0.1029755600 0.004176945 Aug 6 3.2331267 0.1546559757 0.004173341 Sep 6 3.2969251 0.1096477041 0.004174925 Oct 6 3.6795275 0.2448628405 0.004172524 Nov 6 3.6850264 0.1262872714 0.004173587 Dec 6 3.8221264 0.1316436809 0.004173562 Jan 7 3.9935355 0.1512585709 -0.044035547 Feb 7 4.1076028 0.1333396811 0.003797162 Mar 7 4.2637234 0.1446452120 0.003776625 Apr 7 4.3607017 0.1210264679 0.003798301 May 7 4.8447850 0.3008678303 0.003714983 Jun 7 4.9611637 0.2094820767 0.003736350 Jul 7 5.1012596 0.1751111931 0.003740405 Aug 7 5.2446587 0.1594020570 0.003741340 Sep 7 5.2154559 0.0659723022 0.003744147 Oct 7 5.2146554 0.0328946333 0.003744649 Nov 7 5.1895551 0.0041652509 0.003744868 Dec 7 4.8771545 -0.1526548431 0.003745474 Jan 8 4.6190453 -0.2047042566 -0.045445331 Feb 8 4.5863381 -0.1215353187 0.004961905 Mar 8 4.4661391 -0.1208722651 0.004960851 Apr 8 4.4761911 -0.0560017989 0.004908904 May 8 4.5156102 -0.0087344247 0.004889798 Jun 8 4.3075901 -0.1074504503 0.004909935 Jul 8 4.3059955 -0.0550137346 0.004904537 Aug 8 4.1025916 -0.1285215076 0.004908356 Sep 8 3.7650889 -0.2320453385 0.004911069 Oct 8 3.3644878 -0.3155439594 0.004912174 Nov 8 3.1929883 -0.2441874607 0.004911698 Dec 8 3.2931889 -0.0735848007 0.004911123 Jan 9 3.5264407 0.0779319231 -0.043240674 Feb 9 3.5897317 0.0708325913 0.003868330 Mar 9 3.8118372 0.1458747359 0.003762816 Apr 9 3.8564015 0.0956785165 0.003798468 May 9 3.9589027 0.0990582016 0.003797256 Jun 9 3.8649854 0.0034672657 0.003814550 Jul 9 3.6409752 -0.1092164586 0.003824838 Aug 9 3.4365730 -0.1563685864 0.003827010 Sep 9 3.2325724 -0.1799642492 0.003827558 Oct 9 3.1220728 -0.1455530449 0.003827155 Nov 9 3.0135730 -0.1271977070 0.003827046 Dec 9 2.8677729 -0.1364129109 0.003827074 Jan 10 2.7461371 -0.1291133020 -0.041637134 Feb 10 2.5002633 -0.1858552276 0.003336706 Mar 10 2.4079219 -0.1394722763 0.003278106 Apr 10 2.4437773 -0.0526043204 0.003222676 May 10 2.2488546 -0.1231033475 0.003245382 Jun 10 2.0104453 -0.1802207757 0.003254665 Jul 10 2.0728552 -0.0600303472 0.003244807 Aug 10 2.2753606 0.0700221964 0.003239425 Sep 10 2.2543596 0.0249315982 0.003240367 Oct 10 2.2992597 0.0348235463 0.003240262 Nov 10 2.4070599 0.0709746227 0.003240070 Dec 10 2.3775598 0.0212015043 0.003240204 Jan 11 2.2559434 -0.0493680382 -0.039643357 Feb 11 2.1595599 -0.0722570966 0.003440106 Mar 11 2.0515396 -0.0899936519 0.003460446 Apr 11 2.1591963 0.0079328378 0.003403721 May 11 2.2940147 0.0707872474 0.003385345 Jun 11 2.4010173 0.0887268261 0.003382698 Jul 11 2.3576124 0.0232733701 0.003387571 Aug 11 2.2986109 -0.0174832860 0.003389102 Sep 11 2.3736118 0.0283311050 0.003388234 Oct 11 2.3127113 -0.0158722045 0.003388657 Nov 11 2.3249114 -0.0019657956 0.003388590 Dec 11 2.2976114 -0.0145158537 0.003388620 Jan 12 2.3477307 0.0174293025 -0.035630679 Feb 12 2.3069465 -0.0109536391 0.003053516 Mar 12 2.3317651 0.0067856911 0.003034884 Apr 12 2.2620450 -0.0311188686 0.003054986 May 12 2.1902396 -0.0512735292 0.003060381 Jun 12 2.0997370 -0.0707060395 0.003063006 Jul 12 2.1649416 -0.0033804641 0.003058417 Aug 12 2.2198426 0.0254905601 0.003057424 Sep 12 2.2164423 0.0111787485 0.003057672 Oct 12 2.4105431 0.1017942868 0.003056879 Nov 12 2.6813435 0.1855163383 0.003056508 Dec 12 2.7802434 0.1426083369 0.003056604 Jan 13 2.8683912 0.1156866437 -0.034891237 Feb 13 2.9112422 0.0801298646 0.002957840 Mar 13 3.1023955 0.1351815013 0.002904521 Apr 13 3.2184909 0.1257254385 0.002909145 May 13 3.3048860 0.1062425828 0.002913954 Jun 13 3.3975852 0.0995336986 0.002914790 Jul 13 3.5356864 0.1186387885 0.002913589 Aug 13 3.6121857 0.0977640435 0.002914251 Sep 13 3.7123858 0.0989707681 0.002914232 Oct 13 3.7962857 0.0915050103 0.002914292 Nov 13 3.8607857 0.0781272681 0.002914347 Dec 13 3.9179856 0.0677603181 0.002914368 Jan 14 4.0941296 0.1213468936 -0.029729614 Feb 14 4.0912360 0.0606305002 0.002364006 Mar 14 4.1031143 0.0364581015 0.002385722 Apr 14 4.2503392 0.0913360994 0.002360822 May 14 4.3707425 0.1057350224 0.002357525 Jun 14 4.5031440 0.1189446104 0.002355998 Jul 14 4.5614422 0.0889023148 0.002357750 Aug 14 4.6639424 0.0956383457 0.002357552 Sep 14 4.7221422 0.0770921315 0.002357828 Oct 14 4.6443416 0.0003616612 0.002358403 Nov 14 4.6048415 -0.0193850088 0.002358477 Dec 14 4.7905417 0.0822100023 0.002358283 Jan 15 4.5307584 -0.0869006069 -0.032758423 Feb 15 4.3461702 -0.1346847162 0.002729756 Mar 15 4.5875265 0.0517533046 0.002573504 Apr 15 4.8173638 0.1399820800 0.002536168 May 15 4.9912674 0.1567856974 0.002532580 Jun 15 5.3582786 0.2609238011 0.002521356 Jul 15 5.3906725 0.1477170885 0.002527513 Aug 15 5.3204695 0.0397651784 0.002530476 Sep 15 5.3813697 0.0502349498 0.002530331 Oct 15 5.2452690 -0.0420716645 0.002530976 Nov 15 4.3478675 -0.4657842195 0.002532470 Dec 15 3.4494671 -0.6800934234 0.002532851 Jan 16 2.6516502 -0.7383130349 -0.030050221 Feb 16 2.1321473 -0.6311952038 0.003252733 Mar 16 1.9058049 -0.4304830332 0.003095127 Apr 16 1.7679624 -0.2855001376 0.003037647 May 16 1.6413781 -0.2067782264 0.003021896 Jun 16 1.6074868 -0.1211361599 0.003013248 Jul 16 1.4089848 -0.1594608468 0.003015201 Aug 16 1.3312858 -0.1189581083 0.003014159 Sep 16 1.2579861 -0.0963399877 0.003013866 Oct 16 1.2395864 -0.0577300739 0.003013613 Nov 16 1.2275865 -0.0350763097 0.003013538 Dec 16 1.2393865 -0.0118547236 0.003013500 Jan 17 1.2647010 0.0065290811 -0.032500965 Feb 17 1.2223548 -0.0174146528 0.002845222 Mar 17 1.2122575 -0.0137871349 0.002842537 Apr 17 1.2223619 -0.0019506153 0.002838123 May 17 1.2464643 0.0109552578 0.002835694 Jun 17 1.2784653 0.0213805912 0.002834704 Jul 17 1.3705670 0.0564137333 0.002833025 Aug 17 1.4181669 0.0520475810 0.002833130 Sep 17 1.4176666 0.0260165529 0.002833448 Oct 17 1.4925667 0.0502324365 0.002833299 Nov 17 1.5376667 0.0476899301 0.002833307 Dec 17 1.5232666 0.0169318207 0.002833355 Jan 18 1.5805063 0.0368698757 -0.030506328 Feb 18 1.7110288 0.0827786914 0.002971174 Mar 18 1.9211729 0.1459165592 0.002927146 Apr 18 2.0826756 0.1536383229 0.002924428 May 18 2.1441675 0.1079917715 0.002932537 Jun 18 2.1411625 0.0530077269 0.002937467 Jul 18 2.1797622 0.0458703961 0.002937790 Aug 18 2.0939607 -0.0193565564 0.002939279 Sep 18 2.0639607 -0.0246291069 0.002939340 Oct 18 2.1071609 0.0089720781 0.002939144 Nov 18 2.0409607 -0.0282666662 0.002939254 Dec 18 2.0005607 -0.0342772770 0.002939262 Jan 19 1.8704151 -0.0817019715 -0.033815086 Feb 19 1.6754524 -0.1372539348 0.002847552 Mar 19 1.4956385 -0.1583511070 0.002861477 Apr 19 1.3649431 -0.1446498760 0.002856909 May 19 1.2631467 -0.1234215529 0.002853338 Jun 19 1.2161499 -0.0855632306 0.002850124 Jul 19 1.0579483 -0.1215461816 0.002851665 Aug 19 0.8737477 -0.1525836624 0.002852336 Sep 19 0.7369477 -0.1447647497 0.002852251 Oct 19 0.6472479 -0.1174867725 0.002852101 Nov 19 0.5850480 -0.0900988110 0.002852025 Dec 19 0.5464480 -0.0645873302 0.002851989 Jan 20 0.6048697 -0.0037320407 -0.029569667 Feb 20 0.5915301 -0.0084467150 0.002669910 Mar 20 0.5423174 -0.0286539075 0.002682575 Apr 20 0.5257193 -0.0226812248 0.002680684 May 20 0.4811176 -0.0335400041 0.002682419 Jun 20 0.5044199 -0.0053821696 0.002680149 Jul 20 0.5227203 0.0063495494 0.002679672 Aug 20 0.5396204 0.0115760368 0.002679565 Sep 20 0.5407204 0.0063864164 0.002679618 Oct 20 0.5383204 0.0020338012 0.002679641 > m$resid Jan Feb Mar Apr May 1 0.000000000 0.362644063 0.724207563 -0.970183075 -1.226269035 2 0.150662755 -1.735906565 3.069355868 -3.992579705 -1.950710795 3 -2.170442252 1.287558714 1.469720750 -0.599286659 -0.423809229 4 0.238527871 1.047943404 1.704925377 -1.027918437 -0.700885394 5 -0.563847645 0.021910576 -0.136079628 1.087389501 0.183239534 6 0.124871595 0.566241863 0.875170506 -1.422812952 0.597552731 7 0.247138907 -0.216076219 0.138348164 -0.289897997 2.209074774 8 -0.653444523 1.005554850 0.008118104 0.796328599 0.580626418 9 1.897065023 -0.086005695 0.919145192 -0.616254799 0.041516693 10 0.091203306 -0.688475802 0.568296576 1.066556767 -0.866041238 11 -0.880237679 -0.278069676 -0.217369342 1.202411600 0.772144320 12 0.397916435 -0.345164859 0.217450097 -0.465444813 -0.247596369 13 -0.334959901 -0.432774471 0.674949761 -0.116120033 -0.239346182 14 0.666080113 -0.739534855 -0.296406959 0.673926024 0.176892031 15 -2.100300186 -0.582378182 2.286448772 1.083525340 0.206435710 16 -0.722549985 1.306220844 2.461793816 1.780568013 0.967121362 17 0.228013772 -0.292113028 0.044497176 0.145370826 0.158553432 18 0.247154023 0.560319095 0.774555761 0.094837456 -0.560788134 19 -0.587591383 -0.678264476 -0.258834806 0.168279825 0.260800755 20 0.753663928 -0.057583077 -0.247934215 0.073358437 -0.133406270 Jun Jul Aug Sep Oct 1 2.911661286 0.131007988 1.040004255 0.037898902 -1.441655975 2 1.267876094 0.213678967 -1.413811387 -0.165641932 2.411908065 3 2.038106223 0.237157186 0.058806719 -1.065907301 -1.085669027 4 0.133294093 0.188989825 1.190947260 -0.859802721 0.783441136 5 -0.272730858 -0.259350602 -0.191737817 -0.705411503 -0.234233080 6 1.684941487 1.094297785 0.634977284 -0.553001312 1.661343949 7 -1.122752340 -0.422296731 -0.193012224 -1.147939810 -0.406414468 8 -1.212821314 0.644263376 -0.903162746 -1.271962489 -1.025920203 9 -1.174434297 -1.384490183 -0.579340955 -0.289912004 0.422799208 10 -0.701750821 1.476723380 1.597908596 -0.554013122 0.121539131 11 0.220408520 -0.804196766 -0.500762440 0.562906161 -0.543111621 12 -0.238751762 0.827199390 0.354728020 -0.175844472 1.113363527 13 -0.082426959 0.234735918 -0.256480626 0.014826625 -0.091729329 14 0.162296580 -0.369116842 0.082763248 -0.227871191 -0.942762253 15 1.279471812 -1.390923264 -1.326367441 0.128638617 -1.134141263 16 1.052226018 -0.470879540 0.497643073 0.277901375 0.474387421 17 0.128089223 0.430437882 -0.053645402 -0.319834651 0.297532668 18 -0.675553863 -0.087693496 -0.801421067 -0.064782090 0.412846809 19 0.465141674 -0.442108118 -0.381346855 0.096068404 0.335155619 20 0.345958231 0.144142982 0.064216058 -0.063763157 -0.053479165 Nov Dec 1 -1.336148073 1.942979328 2 -1.826189794 -0.252008767 3 0.426001498 0.093237401 4 -0.335048764 -1.142924002 5 0.612190080 -1.151854206 6 -1.456899410 0.065812464 7 -0.352988573 -1.926797560 8 0.876734085 2.096139477 9 0.225526066 -0.113224217 10 0.444176520 -0.611546143 11 0.170863525 -0.154198489 12 1.028665630 -0.527196681 13 -0.164367970 -0.127375349 14 -0.242620916 1.248264914 15 -5.206018466 -2.633147608 16 0.278339440 0.285316090 17 -0.031238950 -0.377914903 18 -0.457540352 -0.073850424 19 0.336506985 0.313451282 20 > mylevel <- as.numeric(m$fitted[,'level']) > myslope <- as.numeric(m$fitted[,'slope']) > myseas <- as.numeric(m$fitted[,'sea']) > myresid <- as.numeric(m$resid) > myfit <- mylevel+myseas > mylagmax <- nx/2 > postscript(file="/var/wessaorg/rcomp/tmp/1pwrw1385125511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow = c(2,2)) > acf(as.numeric(x),lag.max = mylagmax,main='Observed') > acf(mylevel,na.action=na.pass,lag.max = mylagmax,main='Level') > acf(myseas,na.action=na.pass,lag.max = mylagmax,main='Seasonal') > acf(myresid,na.action=na.pass,lag.max = mylagmax,main='Standardized Residals') > par(op) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/20n0d1385125511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow = c(2,2)) > spectrum(as.numeric(x),main='Observed') > spectrum(mylevel,main='Level') > spectrum(myseas,main='Seasonal') > spectrum(myresid,main='Standardized Residals') > par(op) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/31ljt1385125511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow = c(2,2)) > cpgram(as.numeric(x),main='Observed') > cpgram(mylevel,main='Level') > cpgram(myseas,main='Seasonal') > cpgram(myresid,main='Standardized Residals') > par(op) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/40z8y1385125511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time',type='b') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ywku1385125511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow = c(2,2)) > hist(m$resid,main='Residual Histogram') > plot(density(m$resid),main='Residual Kernel Density') > qqnorm(m$resid,main='Residual Normal QQ Plot') > qqline(m$resid) > plot(m$resid^2, myfit^2,main='Sq.Resid vs. Sq.Fit',xlab='Squared residuals',ylab='Squared Fit') > par(op) > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Structural Time Series Model',6,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'t',header=TRUE) > a<-table.element(a,'Observed',header=TRUE) > a<-table.element(a,'Level',header=TRUE) > a<-table.element(a,'Slope',header=TRUE) > a<-table.element(a,'Seasonal',header=TRUE) > a<-table.element(a,'Stand. Residuals',header=TRUE) > a<-table.row.end(a) > for (i in 1:nx) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,mylevel[i]) + a<-table.element(a,myslope[i]) + a<-table.element(a,myseas[i]) + a<-table.element(a,myresid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/6hpza1385125511.tab") > > try(system("convert tmp/1pwrw1385125511.ps tmp/1pwrw1385125511.png",intern=TRUE)) character(0) > try(system("convert tmp/20n0d1385125511.ps tmp/20n0d1385125511.png",intern=TRUE)) character(0) > try(system("convert tmp/31ljt1385125511.ps tmp/31ljt1385125511.png",intern=TRUE)) character(0) > try(system("convert tmp/40z8y1385125511.ps tmp/40z8y1385125511.png",intern=TRUE)) character(0) > try(system("convert tmp/5ywku1385125511.ps tmp/5ywku1385125511.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.435 0.695 6.113