Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
98.71 109.33 109.28 112.88 111.90 117.30 132.68 136.28 137.89 137.13 120.56 122.79 115.47 116.30 116.83 116.58 110.51 120.62 118.32 123.24 113.03 107.51 99.82 104.69 106.48 106.65 113.48 115.41 107.62 109.88 111.69 111.40 101.09 99.55 97.41 93.88 99.75 109.12 107.82 108.59 114.80 119.56 121.01 116.24 113.95 119.02 128.23 145.11 144.35 121.55 128.31 124.07 117.55 114.63 112.16 131.70 127.87 133.00 136.20 140.88 137.31 134.39 138.98 143.72 147.11 142.07 146.85 147.75 147.75 133.86 128.55 125.36 133.96 129.30 129.30 129.30 132.96 129.00 131.96 128.30 123.98 123.98 123.98 126.09 119.01 140.23 140.43 156.64 158.94 162.33 160.33 159.90 144.79 144.79 149.07 152.57 140.65 145.98 147.99 149.58 150.91 155.40 152.74 152.74 142.00 147.14 139.50 140.51 141.17 141.17 141.17 149.43 145.02 159.55 162.87 146.15 146.44 135.75 133.22 161.92 164.07 164.07 164.07 178.60 180.69 175.36 160.28 161.84 161.84 153.82 168.50 169.60 173.08 155.44 155.44 155.44 148.97 158.20 149.67 142.50 133.90 124.20 130.09 127.65 118.58 126.50 126.50 126.50 128.01 128.97 119.94 114.17 109.00 109.00 109.00 110.39 110.33 103.65 101.28 99.50 98.18 104.00 99.48 90.57 84.78 87.88 86.02 92.05 87.69 88.32 101.14 91.76 93.09 90.44 90.44 94.33 91.09 97.49 105.59 97.58 93.25 93.15 93.00 100.25 101.07 106.90 107.09 97.79 97.87 87.11 83.20 83.10 82.17 86.68 86.68 86.68 87.55 79.97 85.05 82.74 79.99 79.99 79.99 76.55 86.74 82.15 82.50 81.81 79.68 75.00 66.00 68.50 63.00 69.20 67.40 71.00 70.70 60.90 51.30 49.20 50.50 43.20 45.20 42.00 39.70 42.50 4.61 46.10 58.90 63.10 56.20 40.10 3.32 33.20 41.40 50.80 130.00 82.00 4.47 44.70 132.20 344.60 496.50 492.10 629.70 669.00 631.90 612.00 542.70 467.40 653.60 812.70 815.10 955.40 955.30 883.60 902.90 822.00 73.24 732.40 735.60 710.50 725.80 728.20 698.20 733.70 706.40 706.10 726.70 765.00 749.90 748.40 704.10 759.80 784.50 745.00 776.50 772.90 740.90 747.10 765.40 727.10 680.80 745.40 713.90 747.20 855.40 816.30 814.20 841.10 834.70 838.40 781.30 815.60 768.60 690.70 625.80 654.00 648.00 636.90 648.30 674.20 672.20 677.80 622.80 617.50 613.50 680.80 673.80 689.10 627.80 622.00 578.60 588.30 541.80 558.40 563.70 609.50 598.10 606.40 583.30 604.70 581.50 575.70 548.10 549.90 571.00 644.70 620.00 673.50 702.90 694.40 645.10 620.60 602.10 643.90 619.40 576.90 557.50 556.60 598.60 606.80 575.50 537.60 598.40 601.00 665.00 653.50 688.00 637.10 664.20 623.00 631.10 600.70 571.40 640.10 674.70 708.60 817.80 787.40 733.30 677.20 625.80 689.00 640.50 587.10 641.50 678.00 670.70 688.00 750.20 817.60 981.90 933.60 876.00 871.00 950.00 965.60 891.40 890.40 770.60 804.40 824.00 744.30 780.90 856.20 817.50 837.40 897.10 954.20 1.005.60 955.00 898.20 905.90 803.80 810.50 703.40 841.20 815.40 771.60 773.80 859.20 815.40 856.60 834.60 861.50 732.10 645.50 645.00 631.10 607.80 639.20 590.20 560.10 574.10 589.80 590.80 516.00 599.50 588.50 597.50 600.50 635.00 576.50 568.00 486.00 466.50 452.50 449.00 447.50 428.50 405.50 392.50 425.50 431.50 423.00 435.00 433.00 377.50 340.00 321.50 323.50 329.50 326.00 321.00 342.50 341.50 348.50 344.00 360.00 362.50 369.50 339.50 345.50 349.50 366.50 344.00 342.00 335.00 356.00 378.00 378.00 408.50 374.00 379.00 360.00 367.00 391.50 416.50 421.50 449.50 457.50 466.00 501.00 520.50 511.50 488.00 486.00 458.50 452.50 450.00 490.50 490.00 548.00 577.50 577.50 540.50 561.00 558.50 518.00 511.00 525.50 516.00 561.00 543.50 514.50 527.00 468.50 455.50 491.50 490.50 492.50 540.50 560.00 597.50 585.00 618.00 612.00 651.00 645.00 574.00 542.00 522.00 525.50 521.00 544.00 510.00 534.50 569.50 555.00 575.00 581.00 546.50 529.00 498.50 466.50 424.00 428.50 422.50 415.50 457.50 452.50 450.50 475.00 479.00 481.00 512.00 497.00 487.00 506.00 515.00 464.50 460.50 427.50 438.00 421.00 445.00 409.00 413.50 372.00 429.50 400.00 363.00 385.50 387.50 371.00 364.00 373.50 343.50 340.00 338.00 322.50 330.00 344.00 320.00 339.00 350.50 380.50 354.50 364.00 360.00 346.00 327.00 311.50 326.00 348.50 366.50 371.50 380.00 394.00 386.50 388.00 358.50 384.50 381.00 396.00 404.00 447.00 460.50 445.00 457.50 448.00 452.50 467.50 469.00 445.00 447.50 376.50 369.00 390.00 381.50 388.00 384.50 399.00 372.00 370.00 354.50 381.00 398.00 395.50 405.50 423.00 406.50 375.00 379.00 353.00 367.50 376.00 340.50 343.50 356.50 355.00 358.50 370.00 390.50 395.50 413.50 415.50 442.50 418.00 376.00 415.50 412.00 405.00 391.00 362.00 397.50 483.00 495.00 550.50 561.00 563.00 559.50 579.50 599.50 587.50 606.00 617.50 615.00 626.00 628.00 655.00 635.00 618.50 639.50 628.50 653.00 645.00 655.50 668.00 681.50 674.00 725.50 732.00 730.00 718.50 697.50 662.00 682.50 653.50 651.00 668.50 675.50 692.00 668.50 661.00 675.50 690.00 690.00 718.50 707.50 699.50 707.00 694.50 705.00 708.00 706.00 697.50 698.00 694.00 715.50 691.00 704.50 744.00 716.00 699.00 721.00 706.50 705.50 706.00 706.50 754.00 774.50 791.00 746.00 749.00 743.50 755.50 751.50 728.00 703.50 692.00 724.50 723.00 712.50 738.50 716.00 762.00 801.50 791.50 774.50 758.50 760.50 722.00 755.50 706.50 689.50 691.50 672.50 663.00 668.50 699.50 678.00 653.50 698.50 735.00 722.50 679.50 707.00 640.50 660.00 642.00 651.50 669.00 669.00 676.50 662.50 665.50 661.00 708.00 671.00 668.00 676.00 648.00 655.00 716.50 681.00 657.50 660.00 663.00 723.00 795.50 791.50 693.50 676.50 613.00 658.50 653.00 672.00 730.00 723.50 821.00 826.00 789.00 821.00 915.50 899.00 998.00 943.00 902.00 896.50 886.00 941.50 991.00 940.50 867.00 846.50 819.00 870.00 911.00 931.50 916.50 966.00 888.00 895.50 897.00 902.00 845.50 812.00 787.50 742.50 734.50 702.00 707.50 710.50 638.00 634.00 632.00 614.00 639.50 667.00 697.50 726.00 721.00 727.00 768.50 783.00 766.00 780.00 749.50 735.00 776.00 744.00 741.00 730.00 745.50 761.00 797.00 806.50 792.00 813.00 764.50 786.00 764.00 758.00 794.00 761.00 752.50 790.00 811.50 841.50 858.50 897.50 883.50 904.00 911.50 968.00 973.00 998.50 965.00 1.005.00 969.00 908.50 950.00 927.00 893.00 896.50 916.00 893.50 939.00 1.003.50 953.50 914.50 941.00 992.50 974.00 1.050.00 1.099.50 1.071.00 1.144.50 1.107.00 1.208.50 1.276.50 1.199.00 1.252.00 1.146.50 1.127.50 1.027.50 1.073.00 1.054.00 946.50 937.50 931.00 911.00 940.00 901.00 902.50 898.50 842.50 879.50 922.50 898.50 857.50 821.00 815.50 829.50 890.00 898.00 926.00 931.50 933.00 882.50 924.00 835.50 849.50 901.00 885.50 878.00 884.50 868.50 839.00 804.00 838.00 827.50 817.50 766.00 820.50 859.00 841.50 931.00 922.00 984.50 944.50 967.50 1.000.00 949.00 897.50 857.50 864.00 901.00 886.00 886.00 1.026.00 962.00 912.50 961.50 1.015.00 1.020.00 867.50 853.00 820.00 822.00 833.00 864.00 847.50 883.50 862.00 959.00 922.00 919.00 1.019.50 960.00 937.50 924.00 882.50 797.50 750.00 755.50 749.50 706.50 794.00 821.50 830.50 900.00 874.00 916.00 910.00 1.050.00 1.122.00 1.150.00 1.180.00 1.282.00 1.314.00 1.360.00 1.518.00 1.458.00 1.374.00 1.348.00 1.368.00 1.392.00 1.404.00 1.362.00 1.292.00 1.258.00 1.320.00 1.280.00 1.402.00 1.322.00 1.336.00 1.422.00 1.474.00 1.416.00 1.344.00 1.482.00 1.522.00 1.144.00 1.392.00 1.232.00 1.072.00 1.112.00 1.144.00 1.118.00 1.344.00 1.252.00 1.658.00 1.570.00 1.494.00 2.092.00 2.224.00 2.196.00 2.204.00 2.288.00 2.432.00 2.334.00 2.372.00 2.294.00 2.388.00 2.238.00 2.470.00 2.414.00 2.468.00 2.014.00 1.954.00 1.832.00 1.786.00 1.662.00 1.674.00 1.584.00 1.736.00 1.780.00 1.834.00 1.712.00 1.656.00 1.670.00 1.840.00 1.674.00 1.658.00 1.696.00 1.688.00 1.584.00 1.514.00 1.748.00 1.388.00 1.324.00 1.116.00 1.336.00 1.048.00 956.00 860.00 828.00 826.00 856.00 848.00 844.00 884.00 1.078.00 1.322.00 1.302.00 1.300.00 1.530.00 1.526.00 1.464.00 1.480.00 1.462.00 1.320.00 1.338.00 1.414.00 1.436.00 1.280.00 1.286.00 1.530.00 1.462.00 1.380.00 1.392.00 1.522.00 1.680.00 1.456.00 1.380.00 1.822.00 2.328.00 2.186.00 2.278.00 2.598.00 2.740.00 2.544.00 2.686.00 2.432.00 2.264.00 2.276.00 2.494.00 2.694.00 2.484.00 2.688.00 2.684.00 2.722.00 2.472.00 2.158.00 2.070.00 2.242.00 2.094.00 1.956.00 2.166.00 2.082.00 1.986.00 2.270.00 2.276.00 3.304.00 3.486.00 3.600.00 3.692.00 3.398.00 3.640.00 3.778.00 4.218.00 4.436.00 3.612.00 3.598.00 3.470.00 3.720.00 3.686.00 3.644.00 4.180.00 3.686.00 4.666.00 4.946.00 5.128.00 4.274.00 3.634.00 3.194.00 3.456.00 4.120.00 4.092.00 4.198.00 3.817.80 5.008.40 5.360.00 5.747.40 6.336.20 5.990.80 6.198.60 6.122.00 6.141.40 6.124.20 6.319.40 6.014.60 5.850.60 5.567.40 6.210.60 5.966.80 6.100.00 6.131.60 5.833.20 5.198.40 5.102.60 4.382.40 3.956.00 4.578.40 4.725.60 4.117.20 5.321.20 5.695.00 5.705.60 6.030.80 6.077.00 5.360.60 6.120.40 6.018.20 5.272.40 5.877.40 5.185.00 4.760.80 3.982.00 3.836.60 3.551.80 3.769.20 3.751.00 3.269.60 3.270.00 3.200.60 3.522.80 3.427.00 3.281.40 3.619.40 3.199.60 3.403.00 3.358.20 3.547.60 3.347.80 2.948.00 3.073.00 2.923.40 2.134.20 2.126.60 2.157.00 1.982.40 2.309.60 2.360.20 2.129.20 2.726.60 2.878.60 2.782.40 2.693.60 3.548.40 3.250.60 3.038.00 2.975.00 3.089.80 2.799.60 2.523.20 3.254.80 2.803.60 2.563.80 3.113.40 3.417.20 3.578.20 3.042.00 2.686.00 2.625.20 2.362.00 2.429.20 2.656.80 2.456.80 2.758.40 2.260.00 2.230.80 1.981.20 2.184.60 2.341.00 2.253.60 1.865.40 1.670.80 1.547.80 1.528.80 1.414.60 1.533.60 1.471.80 1.505.80 1.585.40 1.332.80 1.345.20 1.323.60 1.652.00 1.616.80 1.598.20 1.510.40 1.634.20 1.320.40 1.284.20 1.432.20 1.577.00 1.408.00 1.428.00 1.663.80 1.471.00 1.501.60 1.261.20 1.167.60 1.304.00 1.163.60 1.290.00 1.209.60 1.134.60 1.095.20 1.146.60 1.261.20 1.031.20 916.20 1.229.20 1.107.00 877.40 842.80 966.00 856.66 746.80 680.40 595.20 638.20 587.00 554.20 590.80 560.00 493.40 471.00 456.20 452.60 428.00 499.20 509.40 569.20 576.00 626.00 704.20 768.00 718.60 684.80 678.40 621.00 618.80 667.60 645.20 715.80 663.40 641.20 647.80 623.80 581.20 689.40 606.60 599.20 670.40 656.20 665.60 640.00 651.40 730.00 653.00 611.80 654.60 613.00 596.40 634.60 631.20 589.60 603.60 671.40 618.60 587.60 669.00 655.60 640.20 654.20 630.20 667.60 623.80 710.00 756.00 792.40 798.60 796.60 812.00 944.20 985.60 1.001.40 1.082.00 994.40 976.60 1.055.80 947.80 1.096.80 1.218.00 1.201.40 984.40 1.006.40 1.038.60 904.40 960.40 959.00 888.20 843.60 705.60 752.00 719.00 715.00 819.00 878.00 761.00 775.00 867.00 958.00 968.00 875.00 747.00 752.00 735.00 708.00 716.00 803.00 767.00 745.00 787.00 800.00 881.00 899.00 782.00 655.00 777.00 845.00 1.106.00 1.246.00 1.128.00 1.022.00 1.104.00 1.028.00 1.035.00 1.260.00 1.013.00 925.00 788.00 802.00 746.00 802.00 780.00 857.00 811.00 902.00 850.00 795.00 888.00 759.00 846.00 870.00 796.00 1.216.00 1.393.00 1.412.00 1.491.00 1.542.00 1.436.00 1.434.00 1.391.00 1.495.00 1.759.00 1.778.00 1.671.00 1.867.00 1.956.00 2.042.00 2.055.00 2.084.00 2.089.00 2.109.00 2.229.00 2.313.00 2.209.00 2.022.00 2.050.00 2.048.00 2.115.00 2.220.00 2.135.00 2.192.00 2.089.00 2.162.00 2.298.00 2.372.00 2.252.00 2.283.00 2.299.00 2.236.00 2.184.00 2.390.00 2.378.00 2.452.00 2.351.00 2.582.00 2.586.00 2.539.00 2.558.00 2.360.00 2.244.00 2.207.00 2.150.00 2.134.00 2.240.00 2.316.00 2.155.00 2.150.00 2.353.00 2.385.00 2.143.00 1.969.00 2.124.00 1.983.00 2.186.01 2.125.00 2.088.80 2.128.00 2.183.00 1.928.00 1.920.00 2.039.00 1.865.00 1.933.00 2.020.00 2.181.00 1.904.00 1.987.00 1.696.00 1.710.00 1.902.00 2.000.00 2.148.00 2.240.00 2.221.00 2.045.00 1.830.00 1.822.00 1.496.00 1.599.00 1.676.00 1.581.00 1.667.00 1.461.00 1.650.00 1.958.99 2.509.00 2.500.00 2.700.00 2.795.00 2.919.00 2.857.00 2.800.00 2.689.00 2.673.00 2.709.00 2.837.00 3.028.00 2.818.00 3.089.77 2.976.00 2.887.00 3.011.00 3.197.00 3.001.00 3.527.00 3.336.00 3.093.10 3.354.00 3.410.00 3.042.00 3.454.00 4.167.00 3.774.00 3.521.00 4.132.00 4.379.00 4.555.00 4.043.00 3.883.00 3.425.00 3.692.00 4.125.00 3.560.00 3.128.00 3.410.00 3.699.00 3.174.00 2.724.00 2.434.00 2.478.00 2.150.00 2.282.00 2.087.00 1.886.00 2.020.00 2.540.00 2.680.00 2.190.00 1.860.00 2.020.00 2.660.00 2.860.00 3.230.00 3.530.10 3.180.00 3.050.00 3.420.00 3.700.00 3.500.00 4.340.00 3.400.00 5.300.00 5.690.00 5.230.00 5.400.00 5.200.00 4.650.00 5.930.00 4.940.00 4.260.00 3.630.00 3.910.00 4.050.00 3.500.00 4.340.00 3.400.00 3.100.00 3.900.00 4.550.00 3.940.00 4.950.00 6.629.00 8.220.00 7.679.90 8.480.00 9.120.00 8.670.00 10.290.00 10.310.00 9.960.00 10.750.00 10.660.00 10.560.00 10.650.00 9.990.00 10.550.00 11.910.00 9.350.00 10.670.00 9.400.00 11.800.00 11.970.00 11.820.00 13.000.00 13.190.00 14.220.00 13.440.00 14.000.00 13.002.70 15.140.00 17.040.10 17.050.00 19.060.00 18.230.00 16.910.00 18.210.00 17.130.00 18.340.00 16.880.00 19.810.00 18.587.00 21.810.00 21.869.90 24.910.00 24.120.00 23.000.00 23.210.00 21.860.00 23.030.00 23.560.00 24.110.00 24.590.00 25.420.00 25.360.00 25.040.00 25.750.00 26.039.90 25.760.00 24.680.00 25.660.00 25.470.00 23.700.00 22.929.90 25.420.00 24.420.00 26.820.00 26.350.00 28.050.00 26.740.00 23.820.00 26.180.00 27.380.00 29.580.00 29.020.00 30.769.90 25.170.00 25.100.00 28.890.00 33.580.00 30.140.00 32.810.00 28.180.00 27.090.00 28.500.00 26.090.00 25.750.00 27.650.00 24.570.00 25.750.00 25.510.00 24.100.00 27.390.00 26.450.00 30.000.00 24.620.00 21.720.00 22.160.00 23.400.00 23.740.00 20.200.00 18.580.00 16.340.00 16.468.00 15.740.00 14.590.00 14.800.00 14.470.00 15.250.00 14.410.00 14.090.00 14.350.00 16.840.00 17.280.00 17.120.00 16.680.00 16.950.00 17.020.00 17.100.00 18.130.00 17.230.00 17.610.00 17.120.00 17.400.00 17.550.00 19.710.00 20.080.00 19.420.00 18.150.00 19.450.00 20.360.00 19.170.00 21.120.00 18.710.00 20.380.00 18.700.00 17.320.00 16.900.00 18.390.00 18.550.00 21.050.00 20.290.00 21.935.00 23.500.00 22.880.00 20.460.00 21.950.00 20.850.00 22.480.00 19.500.00 19.880.00 21.811.00 21.360.00 19.730.00 23.260.00 21.880.00 27.560.00 27.650.00 27.030.00 32.100.00 34.290.00 39.260.00 39.829.90 35.890.00 32.110.00 32.030.00 34.510.00 37.170.00 35.140.00 33.260.00 33.460.00 31.770.00 31.430.00 31.520.00 35.000.00 37.960.00 36.070.00 35.890.00 30.800.00 38.280.00 39.910.00 36.060.00 30.550.00 34.770.10 30.740.00 27.170.00 23.480.00 22.730.00 23.800.00 21.650.00 21.600.00 21.910.00 24.360.00 21.490.00 20.170.00 23.860.00 25.430.00 23.830.00 27.600.00 24.640.00 21.120.00 20.330.00 19.600.00 21.260.00 17.940.00 15.740.00 16.670.00 17.940.00 18.340.00 18.230.00 18.250.00 15.600.00 14.470.00 15.240.00 14.226.40 14.120.00 12.880.00 13.430.00 13.050.00 13.950.00 14.420.00 15.290.00 14.910.00 14.399.90 14.650.00 15.820.00 13.960.00 13.150.00 13.410.00 14.950.00 13.590.00 15.350.00 19.450.00 17.337.50 17.560.00 18.680.00 19.200.00 20.410.00 20.850.00 24.250.00 24.979.00 26.330.00 27.390.00 25.140.00 24.400.00 26.440.00 26.550.00 26.230.00 29.280.00 28.260.00 29.600.00 28.020.00 30.910.00 36.120.00 35.700.00 40.803.60 41.684.50 40.820.00 36.500.00 39.790.00 33.360.00 30.080.00 31.440.00 26.750.00 28.000.00 26.290.00 26.070.00 28.800.00 29.750.00 31.130.00 35.200.00 35.330.00
Seasonal period
12
1
2
3
4
5
6
7
8
9
10
11
12
Number of Forecasts
12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Algorithm
BFGS
L-BFGS-B
Chart options
R Code
require('stsm') require('stsm.class') require('KFKSDS') par1 <- as.numeric(par1) par2 <- as.numeric(par2) nx <- length(x) x <- ts(x,frequency=par1) m <- StructTS(x,type='BSM') print(m$coef) print(m$fitted) print(m$resid) 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 mm <- stsm.model(model = 'BSM', y = x, transPars = 'StructTS') fit2 <- stsmFit(mm, stsm.method = 'maxlik.td.optim', method = par3, KF.args = list(P0cov = TRUE)) (fit2.comps <- tsSmooth(fit2, P0cov = FALSE)$states) m2 <- set.pars(mm, pmax(fit2$par, .Machine$double.eps)) (ss <- char2numeric(m2)) (pred <- predict(ss, x, n.ahead = par2)) mylagmax <- nx/2 bitmap(file='test2.png') 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() bitmap(file='test3.png') 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() bitmap(file='test4.png') 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() bitmap(file='test1.png') plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time',type='b') grid() dev.off() bitmap(file='test5.png') 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() bitmap(file='test6.png') par(mfrow = c(3,1), mar = c(3,3,3,3)) plot(cbind(x, pred$pred), type = 'n', plot.type = 'single', ylab = '') lines(x) polygon(c(time(pred$pred), rev(time(pred$pred))), c(pred$pred + 2 * pred$se, rev(pred$pred)), col = 'gray85', border = NA) polygon(c(time(pred$pred), rev(time(pred$pred))), c(pred$pred - 2 * pred$se, rev(pred$pred)), col = ' gray85', border = NA) lines(pred$pred, col = 'blue', lwd = 1.5) mtext(text = 'forecasts of the observed series', side = 3, adj = 0) plot(cbind(x, pred$a[,1]), type = 'n', plot.type = 'single', ylab = '') lines(x) polygon(c(time(pred$a[,1]), rev(time(pred$a[,1]))), c(pred$a[,1] + 2 * sqrt(pred$P[,1]), rev(pred$a[,1])), col = 'gray85', border = NA) polygon(c(time(pred$a[,1]), rev(time(pred$a[,1]))), c(pred$a[,1] - 2 * sqrt(pred$P[,1]), rev(pred$a[,1])), col = ' gray85', border = NA) lines(pred$a[,1], col = 'blue', lwd = 1.5) mtext(text = 'forecasts of the level component', side = 3, adj = 0) plot(cbind(fit2.comps[,3], pred$a[,3]), type = 'n', plot.type = 'single', ylab = '') lines(fit2.comps[,3]) polygon(c(time(pred$a[,3]), rev(time(pred$a[,3]))), c(pred$a[,3] + 2 * sqrt(pred$P[,3]), rev(pred$a[,3])), col = 'gray85', border = NA) polygon(c(time(pred$a[,3]), rev(time(pred$a[,3]))), c(pred$a[,3] - 2 * sqrt(pred$P[,3]), rev(pred$a[,3])), col = ' gray85', border = NA) lines(pred$a[,3], col = 'blue', lwd = 1.5) mtext(text = 'forecasts of the seasonal component', side = 3, adj = 0) dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Structural Time Series Model -- Interpolation',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='mytable.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Structural Time Series Model -- Extrapolation',4,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,'Seasonal',header=TRUE) a<-table.row.end(a) for (i in 1:par2) { a<-table.row.start(a) a<-table.element(a,i,header=TRUE) a<-table.element(a,pred$pred[i]) a<-table.element(a,pred$a[i,1]) a<-table.element(a,pred$a[i,3]) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable1.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation