R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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 <- array(list(14 + ,501 + ,11 + ,20 + ,91.81 + ,1303.2 + ,14 + ,485 + ,11 + ,19 + ,91.98 + ,-58.7 + ,15 + ,464 + ,11 + ,18 + ,91.72 + ,-378.9 + ,13 + ,460 + ,11 + ,13 + ,90.27 + ,175.6 + ,8 + ,467 + ,11 + ,17 + ,91.89 + ,233.7 + ,7 + ,460 + ,9 + ,17 + ,92.07 + ,706.8 + ,3 + ,448 + ,8 + ,13 + ,92.92 + ,-23.6 + ,3 + ,443 + ,6 + ,14 + ,93.34 + ,420.9 + ,4 + ,436 + ,7 + ,13 + ,93.6 + ,722.1 + ,4 + ,431 + ,8 + ,17 + ,92.41 + ,1401.3 + ,0 + ,484 + ,6 + ,17 + ,93.6 + ,-94.9 + ,-4 + ,510 + ,5 + ,15 + ,93.77 + ,1043.6 + ,-14 + ,513 + ,2 + ,9 + ,93.6 + ,1300.1 + ,-18 + ,503 + ,3 + ,10 + ,93.6 + ,721.1 + ,-8 + ,471 + ,3 + ,9 + ,93.51 + ,-45.6 + ,-1 + ,471 + ,7 + ,14 + ,92.66 + ,787.5 + ,1 + ,476 + ,8 + ,18 + ,94.2 + ,694.3 + ,2 + ,475 + ,7 + ,18 + ,94.37 + ,1054.7 + ,0 + ,470 + ,7 + ,12 + ,94.45 + ,821.9 + ,1 + ,461 + ,6 + ,16 + ,94.62 + ,1100.7 + ,0 + ,455 + ,6 + ,12 + ,94.37 + ,862.4 + ,-1 + ,456 + ,7 + ,19 + ,93.43 + ,1656.1 + ,-3 + ,517 + ,5 + ,13 + ,94.79 + ,-174 + ,-3 + ,525 + ,5 + ,12 + ,94.88 + ,1337.6 + ,-3 + ,523 + ,5 + ,13 + ,94.79 + ,1394.9 + ,-4 + ,519 + ,4 + ,11 + ,94.62 + ,915.7 + ,-8 + ,509 + ,4 + ,10 + ,94.71 + ,-481.1 + ,-9 + ,512 + ,4 + ,16 + ,93.77 + ,167.9 + ,-13 + ,519 + ,1 + ,12 + ,95.73 + ,208.2 + ,-18 + ,517 + ,-1 + ,6 + ,95.99 + ,382.2 + ,-11 + ,510 + ,3 + ,8 + ,95.82 + ,1004 + ,-9 + ,509 + ,4 + ,6 + ,95.47 + ,864.7 + ,-10 + ,501 + ,3 + ,8 + ,95.82 + ,1052.9 + ,-13 + ,507 + ,2 + ,8 + ,94.71 + ,1417.6 + ,-11 + ,569 + ,1 + ,9 + ,96.33 + ,-197.7 + ,-5 + ,580 + ,4 + ,13 + ,96.5 + ,1262.1 + ,-15 + ,578 + ,3 + ,8 + ,96.16 + ,1147.2 + ,-6 + ,565 + ,5 + ,11 + ,96.33 + ,700.2 + ,-6 + ,547 + ,6 + ,8 + ,96.33 + ,45.3 + ,-3 + ,555 + ,6 + ,10 + ,95.05 + ,458.5 + ,-1 + ,562 + ,6 + ,15 + ,96.84 + ,610.2 + ,-3 + ,561 + ,6 + ,12 + ,96.92 + ,786.4 + ,-4 + ,555 + ,6 + ,13 + ,97.44 + ,787.2 + ,-6 + ,544 + ,5 + ,12 + ,97.78 + ,1040 + ,0 + ,537 + ,6 + ,15 + ,97.69 + ,324.1 + ,-4 + ,543 + ,5 + ,13 + ,96.67 + ,1343 + ,-2 + ,594 + ,6 + ,13 + ,98.29 + ,-501.2 + ,-2 + ,611 + ,5 + ,16 + ,98.2 + ,800.4 + ,-6 + ,613 + ,7 + ,14 + ,98.71 + ,916.7 + ,-7 + ,611 + ,4 + ,12 + ,98.54 + ,695.8 + ,-6 + ,594 + ,5 + ,15 + ,98.2 + ,28 + ,-6 + ,595 + ,6 + ,14 + ,96.92 + ,495.6 + ,-3 + ,591 + ,6 + ,19 + ,99.06 + ,366.2 + ,-2 + ,589 + ,5 + ,16 + ,99.65 + ,633 + ,-5 + ,584 + ,3 + ,16 + ,99.82 + ,848.3 + ,-11 + ,573 + ,2 + ,11 + ,99.99 + ,472.2 + ,-11 + ,567 + ,3 + ,13 + ,100.33 + ,357.8 + ,-11 + ,569 + ,3 + ,12 + ,99.31 + ,824.3 + ,-10 + ,621 + ,2 + ,11 + ,101.1 + ,-880.1 + ,-14 + ,629 + ,0 + ,6 + ,101.1 + ,1066.8 + ,-8 + ,628 + ,4 + ,9 + ,100.93 + ,1052.8 + ,-9 + ,612 + ,4 + ,6 + ,100.85 + ,-32.1 + ,-5 + ,595 + ,5 + ,15 + ,100.93 + ,-1331.4 + ,-1 + ,597 + ,6 + ,17 + ,99.6 + ,-767.1 + ,-2 + ,593 + ,6 + ,13 + ,101.88 + ,-236.7 + ,-5 + ,590 + ,5 + ,12 + ,101.81 + ,-184.9 + ,-4 + ,580 + ,5 + ,13 + ,102.38 + ,-143.4 + ,-6 + ,574 + ,3 + ,10 + ,102.74 + ,493.9 + ,-2 + ,573 + ,5 + ,14 + ,102.82 + ,549.7 + ,-2 + ,573 + ,5 + ,13 + ,101.72 + ,982.7 + ,-2 + ,620 + ,5 + ,10 + ,103.47 + ,-856.3 + ,-2 + ,626 + ,3 + ,11 + ,102.98 + ,967 + ,2 + ,620 + ,6 + ,12 + ,102.68 + ,659.4 + ,1 + ,588 + ,6 + ,7 + ,102.9 + ,577.2 + ,-8 + ,566 + ,4 + ,11 + ,103.03 + ,-213.1 + ,-1 + ,557 + ,6 + ,9 + ,101.29 + ,17.7 + ,1 + ,561 + ,5 + ,13 + ,103.69 + ,390.1 + ,-1 + ,549 + ,4 + ,12 + ,103.68 + ,509.3 + ,2 + ,532 + ,5 + ,5 + ,104.2 + ,410 + ,2 + ,526 + ,5 + ,13 + ,104.08 + ,212.5 + ,1 + ,511 + ,4 + ,11 + ,104.16 + ,818 + ,-1 + ,499 + ,3 + ,8 + ,103.05 + ,422.7 + ,-2 + ,555 + ,2 + ,8 + ,104.66 + ,-158 + ,-2 + ,565 + ,3 + ,8 + ,104.46 + ,427.2 + ,-1 + ,542 + ,2 + ,8 + ,104.95 + ,243.4 + ,-8 + ,527 + ,-1 + ,0 + ,105.85 + ,-419.3 + ,-4 + ,510 + ,0 + ,3 + ,106.23 + ,-1459.8 + ,-6 + ,514 + ,-2 + ,0 + ,104.86 + ,-1389.8 + ,-3 + ,517 + ,1 + ,-1 + ,107.44 + ,-2.1 + ,-3 + ,508 + ,-2 + ,-1 + ,108.23 + ,-938.6 + ,-7 + ,493 + ,-2 + ,-4 + ,108.45 + ,-839.9 + ,-9 + ,490 + ,-2 + ,1 + ,109.39 + ,-297.6 + ,-11 + ,469 + ,-6 + ,-1 + ,110.15 + ,-376.3 + ,-13 + ,478 + ,-4 + ,0 + ,109.13 + ,-79.4 + ,-11 + ,528 + ,-2 + ,-1 + ,110.28 + ,-2091.3 + ,-9 + ,534 + ,0 + ,6 + ,110.17 + ,-1023 + ,-17 + ,518 + ,-5 + ,0 + ,109.99 + ,-765.6 + ,-22 + ,506 + ,-4 + ,-3 + ,109.26 + ,-1592.3 + ,-25 + ,502 + ,-5 + ,-3 + ,109.11 + ,-1588.8 + ,-20 + ,516 + ,-1 + ,4 + ,107.06 + ,-1318 + ,-24 + ,528 + ,-2 + ,1 + ,109.53 + ,-402.4 + ,-24 + ,533 + ,-4 + ,0 + ,108.92 + ,-814.5 + ,-22 + ,536 + ,-1 + ,-4 + ,109.24 + ,-98.4 + ,-19 + ,537 + ,1 + ,-2 + ,109.12 + ,-305.9 + ,-18 + ,524 + ,1 + ,3 + ,109 + ,-18.4 + ,-17 + ,536 + ,-2 + ,2 + ,107.23 + ,610.3 + ,-11 + ,587 + ,1 + ,5 + ,109.49 + ,-917.3 + ,-11 + ,597 + ,1 + ,6 + ,109.04 + ,88.4 + ,-12 + ,581 + ,3 + ,6 + ,109.02 + ,-740.2 + ,-10 + ,564 + ,3 + ,3 + ,109.23 + ,29.3 + ,-15 + ,558 + ,1 + ,4 + ,109.46 + ,-893.2 + ,-15 + ,575 + ,1 + ,7 + ,107.9 + ,-1030.2 + ,-15 + ,580 + ,0 + ,5 + ,110.42 + ,-403.4 + ,-13 + ,575 + ,2 + ,6 + ,110.98 + ,-46.9 + ,-8 + ,563 + ,2 + ,1 + ,111.48 + ,-321.2 + ,-13 + ,552 + ,-1 + ,3 + ,111.88 + ,-239.9 + ,-9 + ,537 + ,1 + ,6 + ,111.89 + ,640.9 + ,-7 + ,545 + ,0 + ,0 + ,109.85 + ,511.6 + ,-4 + ,601 + ,1 + ,3 + ,112.1 + ,-665.1 + ,-4 + ,604 + ,1 + ,4 + ,112.24 + ,657.7 + ,-2 + ,586 + ,3 + ,7 + ,112.39 + ,-207.7 + ,0 + ,564 + ,2 + ,6 + ,112.52 + ,-885.2 + ,-2 + ,549 + ,0 + ,6 + ,113.16 + ,-1595.8 + ,-3 + ,551 + ,0 + ,6 + ,111.84 + ,-1374.9 + ,1 + ,556 + ,3 + ,6 + ,114.33 + ,-316.6 + ,-2 + ,548 + ,-2 + ,2 + ,114.82 + ,-283.4 + ,-1 + ,540 + ,0 + ,2 + ,115.2 + ,-175.8 + ,1 + ,531 + ,1 + ,2 + ,115.4 + ,-694.2 + ,-3 + ,521 + ,-1 + ,3 + ,115.74 + ,-249.9 + ,-4 + ,519 + ,-2 + ,-1 + ,114.19 + ,268.2 + ,-9 + ,572 + ,-1 + ,-4 + ,115.94 + ,-2105.1 + ,-9 + ,581 + ,-1 + ,4 + ,116.03 + ,-762.8 + ,-7 + ,563 + ,1 + ,5 + ,116.24 + ,-117.1 + ,-14 + ,548 + ,-2 + ,3 + ,116.66 + ,-1094.4 + ,-12 + ,539 + ,-5 + ,-1 + ,116.79 + ,-2095.2 + ,-16 + ,541 + ,-5 + ,-4 + ,115.48 + ,-1587.6 + ,-20 + ,562 + ,-6 + ,0 + ,118.16 + ,-528 + ,-12 + ,559 + ,-4 + ,-1 + ,118.38 + ,-324.2 + ,-12 + ,546 + ,-3 + ,-1 + ,118.51 + ,-276.1 + ,-10 + ,536 + ,-3 + ,3 + ,118.42 + ,-139.1 + ,-10 + ,528 + ,-1 + ,2 + ,118.24 + ,268 + ,-13 + ,530 + ,-2 + ,-4 + ,116.47 + ,570.5 + ,-16 + ,582 + ,-3 + ,-3 + ,118.96 + ,-316.5) + ,dim=c(6 + ,143) + ,dimnames=list(c('i' + ,'w' + ,'f' + ,'s' + ,'c' + ,'h') + ,1:143)) > y <- array(NA,dim=c(6,143),dimnames=list(c('i','w','f','s','c','h'),1:143)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '1' > #'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!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x i w f s c h 1 14 501 11 20 91.81 1303.2 2 14 485 11 19 91.98 -58.7 3 15 464 11 18 91.72 -378.9 4 13 460 11 13 90.27 175.6 5 8 467 11 17 91.89 233.7 6 7 460 9 17 92.07 706.8 7 3 448 8 13 92.92 -23.6 8 3 443 6 14 93.34 420.9 9 4 436 7 13 93.60 722.1 10 4 431 8 17 92.41 1401.3 11 0 484 6 17 93.60 -94.9 12 -4 510 5 15 93.77 1043.6 13 -14 513 2 9 93.60 1300.1 14 -18 503 3 10 93.60 721.1 15 -8 471 3 9 93.51 -45.6 16 -1 471 7 14 92.66 787.5 17 1 476 8 18 94.20 694.3 18 2 475 7 18 94.37 1054.7 19 0 470 7 12 94.45 821.9 20 1 461 6 16 94.62 1100.7 21 0 455 6 12 94.37 862.4 22 -1 456 7 19 93.43 1656.1 23 -3 517 5 13 94.79 -174.0 24 -3 525 5 12 94.88 1337.6 25 -3 523 5 13 94.79 1394.9 26 -4 519 4 11 94.62 915.7 27 -8 509 4 10 94.71 -481.1 28 -9 512 4 16 93.77 167.9 29 -13 519 1 12 95.73 208.2 30 -18 517 -1 6 95.99 382.2 31 -11 510 3 8 95.82 1004.0 32 -9 509 4 6 95.47 864.7 33 -10 501 3 8 95.82 1052.9 34 -13 507 2 8 94.71 1417.6 35 -11 569 1 9 96.33 -197.7 36 -5 580 4 13 96.50 1262.1 37 -15 578 3 8 96.16 1147.2 38 -6 565 5 11 96.33 700.2 39 -6 547 6 8 96.33 45.3 40 -3 555 6 10 95.05 458.5 41 -1 562 6 15 96.84 610.2 42 -3 561 6 12 96.92 786.4 43 -4 555 6 13 97.44 787.2 44 -6 544 5 12 97.78 1040.0 45 0 537 6 15 97.69 324.1 46 -4 543 5 13 96.67 1343.0 47 -2 594 6 13 98.29 -501.2 48 -2 611 5 16 98.20 800.4 49 -6 613 7 14 98.71 916.7 50 -7 611 4 12 98.54 695.8 51 -6 594 5 15 98.20 28.0 52 -6 595 6 14 96.92 495.6 53 -3 591 6 19 99.06 366.2 54 -2 589 5 16 99.65 633.0 55 -5 584 3 16 99.82 848.3 56 -11 573 2 11 99.99 472.2 57 -11 567 3 13 100.33 357.8 58 -11 569 3 12 99.31 824.3 59 -10 621 2 11 101.10 -880.1 60 -14 629 0 6 101.10 1066.8 61 -8 628 4 9 100.93 1052.8 62 -9 612 4 6 100.85 -32.1 63 -5 595 5 15 100.93 -1331.4 64 -1 597 6 17 99.60 -767.1 65 -2 593 6 13 101.88 -236.7 66 -5 590 5 12 101.81 -184.9 67 -4 580 5 13 102.38 -143.4 68 -6 574 3 10 102.74 493.9 69 -2 573 5 14 102.82 549.7 70 -2 573 5 13 101.72 982.7 71 -2 620 5 10 103.47 -856.3 72 -2 626 3 11 102.98 967.0 73 2 620 6 12 102.68 659.4 74 1 588 6 7 102.90 577.2 75 -8 566 4 11 103.03 -213.1 76 -1 557 6 9 101.29 17.7 77 1 561 5 13 103.69 390.1 78 -1 549 4 12 103.68 509.3 79 2 532 5 5 104.20 410.0 80 2 526 5 13 104.08 212.5 81 1 511 4 11 104.16 818.0 82 -1 499 3 8 103.05 422.7 83 -2 555 2 8 104.66 -158.0 84 -2 565 3 8 104.46 427.2 85 -1 542 2 8 104.95 243.4 86 -8 527 -1 0 105.85 -419.3 87 -4 510 0 3 106.23 -1459.8 88 -6 514 -2 0 104.86 -1389.8 89 -3 517 1 -1 107.44 -2.1 90 -3 508 -2 -1 108.23 -938.6 91 -7 493 -2 -4 108.45 -839.9 92 -9 490 -2 1 109.39 -297.6 93 -11 469 -6 -1 110.15 -376.3 94 -13 478 -4 0 109.13 -79.4 95 -11 528 -2 -1 110.28 -2091.3 96 -9 534 0 6 110.17 -1023.0 97 -17 518 -5 0 109.99 -765.6 98 -22 506 -4 -3 109.26 -1592.3 99 -25 502 -5 -3 109.11 -1588.8 100 -20 516 -1 4 107.06 -1318.0 101 -24 528 -2 1 109.53 -402.4 102 -24 533 -4 0 108.92 -814.5 103 -22 536 -1 -4 109.24 -98.4 104 -19 537 1 -2 109.12 -305.9 105 -18 524 1 3 109.00 -18.4 106 -17 536 -2 2 107.23 610.3 107 -11 587 1 5 109.49 -917.3 108 -11 597 1 6 109.04 88.4 109 -12 581 3 6 109.02 -740.2 110 -10 564 3 3 109.23 29.3 111 -15 558 1 4 109.46 -893.2 112 -15 575 1 7 107.90 -1030.2 113 -15 580 0 5 110.42 -403.4 114 -13 575 2 6 110.98 -46.9 115 -8 563 2 1 111.48 -321.2 116 -13 552 -1 3 111.88 -239.9 117 -9 537 1 6 111.89 640.9 118 -7 545 0 0 109.85 511.6 119 -4 601 1 3 112.10 -665.1 120 -4 604 1 4 112.24 657.7 121 -2 586 3 7 112.39 -207.7 122 0 564 2 6 112.52 -885.2 123 -2 549 0 6 113.16 -1595.8 124 -3 551 0 6 111.84 -1374.9 125 1 556 3 6 114.33 -316.6 126 -2 548 -2 2 114.82 -283.4 127 -1 540 0 2 115.20 -175.8 128 1 531 1 2 115.40 -694.2 129 -3 521 -1 3 115.74 -249.9 130 -4 519 -2 -1 114.19 268.2 131 -9 572 -1 -4 115.94 -2105.1 132 -9 581 -1 4 116.03 -762.8 133 -7 563 1 5 116.24 -117.1 134 -14 548 -2 3 116.66 -1094.4 135 -12 539 -5 -1 116.79 -2095.2 136 -16 541 -5 -4 115.48 -1587.6 137 -20 562 -6 0 118.16 -528.0 138 -12 559 -4 -1 118.38 -324.2 139 -12 546 -3 -1 118.51 -276.1 140 -10 536 -3 3 118.42 -139.1 141 -10 528 -1 2 118.24 268.0 142 -13 530 -2 -4 116.47 570.5 143 -16 582 -3 -3 118.96 -316.5 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) w f s c h -5.075e+01 -4.773e-02 2.066e+00 2.904e-01 6.061e-01 -3.975e-04 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -11.2542 -2.0710 -0.0187 2.6995 10.4429 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -5.075e+01 8.803e+00 -5.764 5.19e-08 *** w -4.773e-02 8.559e-03 -5.576 1.27e-07 *** f 2.066e+00 2.023e-01 10.214 < 2e-16 *** s 2.904e-01 1.312e-01 2.213 0.0286 * c 6.061e-01 8.808e-02 6.881 1.94e-10 *** h -3.975e-04 5.358e-04 -0.742 0.4594 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 4.127 on 137 degrees of freedom Multiple R-squared: 0.7076, Adjusted R-squared: 0.6969 F-statistic: 66.3 on 5 and 137 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 3.802037e-01 7.604074e-01 0.61979628 [2,] 2.265508e-01 4.531016e-01 0.77344919 [3,] 2.253569e-01 4.507139e-01 0.77464305 [4,] 1.488803e-01 2.977606e-01 0.85111972 [5,] 9.279931e-02 1.855986e-01 0.90720069 [6,] 2.741804e-01 5.483609e-01 0.72581955 [7,] 2.298826e-01 4.597653e-01 0.77011737 [8,] 1.752033e-01 3.504066e-01 0.82479670 [9,] 1.456539e-01 2.913077e-01 0.85434613 [10,] 1.021614e-01 2.043227e-01 0.89783864 [11,] 7.449286e-02 1.489857e-01 0.92550714 [12,] 5.543676e-02 1.108735e-01 0.94456324 [13,] 4.017918e-02 8.035836e-02 0.95982082 [14,] 3.935591e-02 7.871182e-02 0.96064409 [15,] 2.780579e-02 5.561158e-02 0.97219421 [16,] 2.619088e-02 5.238175e-02 0.97380912 [17,] 1.963690e-02 3.927381e-02 0.98036310 [18,] 1.881993e-02 3.763986e-02 0.98118007 [19,] 1.329519e-02 2.659038e-02 0.98670481 [20,] 9.254116e-03 1.850823e-02 0.99074588 [21,] 6.824292e-03 1.364858e-02 0.99317571 [22,] 5.242293e-03 1.048459e-02 0.99475771 [23,] 3.760537e-03 7.521074e-03 0.99623946 [24,] 2.648845e-03 5.297689e-03 0.99735116 [25,] 1.584418e-03 3.168836e-03 0.99841558 [26,] 9.498122e-04 1.899624e-03 0.99905019 [27,] 9.044834e-04 1.808967e-03 0.99909552 [28,] 5.543897e-04 1.108779e-03 0.99944561 [29,] 9.533024e-04 1.906605e-03 0.99904670 [30,] 6.235636e-04 1.247127e-03 0.99937644 [31,] 6.795452e-04 1.359090e-03 0.99932045 [32,] 3.914690e-04 7.829380e-04 0.99960853 [33,] 2.223911e-04 4.447822e-04 0.99977761 [34,] 1.252092e-04 2.504184e-04 0.99987479 [35,] 8.331697e-05 1.666339e-04 0.99991668 [36,] 4.962464e-05 9.924929e-05 0.99995038 [37,] 2.780248e-05 5.560496e-05 0.99997220 [38,] 1.558925e-05 3.117851e-05 0.99998441 [39,] 8.246713e-06 1.649343e-05 0.99999175 [40,] 6.046154e-06 1.209231e-05 0.99999395 [41,] 1.530177e-05 3.060354e-05 0.99998470 [42,] 8.842883e-06 1.768577e-05 0.99999116 [43,] 5.546311e-06 1.109262e-05 0.99999445 [44,] 4.733194e-06 9.466388e-06 0.99999527 [45,] 2.921193e-06 5.842386e-06 0.99999708 [46,] 2.133938e-06 4.267876e-06 0.99999787 [47,] 2.178719e-06 4.357438e-06 0.99999782 [48,] 1.166899e-06 2.333798e-06 0.99999883 [49,] 9.747336e-07 1.949467e-06 0.99999903 [50,] 6.326520e-07 1.265304e-06 0.99999937 [51,] 3.684443e-07 7.368887e-07 0.99999963 [52,] 8.149888e-07 1.629978e-06 0.99999919 [53,] 4.370814e-07 8.741628e-07 0.99999956 [54,] 2.197064e-07 4.394128e-07 0.99999978 [55,] 1.453372e-07 2.906745e-07 0.99999985 [56,] 7.113903e-08 1.422781e-07 0.99999993 [57,] 3.462040e-08 6.924080e-08 0.99999997 [58,] 1.743663e-08 3.487326e-08 0.99999998 [59,] 8.711257e-09 1.742251e-08 0.99999999 [60,] 6.964605e-09 1.392921e-08 0.99999999 [61,] 3.576642e-09 7.153284e-09 1.00000000 [62,] 1.952292e-09 3.904584e-09 1.00000000 [63,] 1.250974e-09 2.501949e-09 1.00000000 [64,] 1.666753e-08 3.333506e-08 0.99999998 [65,] 2.225015e-08 4.450031e-08 0.99999998 [66,] 1.867125e-08 3.734250e-08 0.99999998 [67,] 1.885697e-08 3.771395e-08 0.99999998 [68,] 9.088288e-09 1.817658e-08 0.99999999 [69,] 5.751615e-09 1.150323e-08 0.99999999 [70,] 3.559044e-09 7.118088e-09 1.00000000 [71,] 3.018527e-09 6.037053e-09 1.00000000 [72,] 1.490176e-09 2.980352e-09 1.00000000 [73,] 8.403267e-10 1.680653e-09 1.00000000 [74,] 5.931647e-10 1.186329e-09 1.00000000 [75,] 1.432534e-09 2.865069e-09 1.00000000 [76,] 1.688402e-09 3.376804e-09 1.00000000 [77,] 4.518361e-09 9.036721e-09 1.00000000 [78,] 8.429384e-09 1.685877e-08 0.99999999 [79,] 9.074476e-09 1.814895e-08 0.99999999 [80,] 1.348397e-07 2.696793e-07 0.99999987 [81,] 1.879622e-07 3.759243e-07 0.99999981 [82,] 2.890891e-06 5.781782e-06 0.99999711 [83,] 7.522034e-06 1.504407e-05 0.99999248 [84,] 7.368936e-06 1.473787e-05 0.99999263 [85,] 2.471220e-05 4.942439e-05 0.99997529 [86,] 4.117348e-05 8.234695e-05 0.99995883 [87,] 6.216283e-05 1.243257e-04 0.99993784 [88,] 8.132228e-05 1.626446e-04 0.99991868 [89,] 1.085105e-04 2.170210e-04 0.99989149 [90,] 3.426591e-04 6.853182e-04 0.99965734 [91,] 7.824078e-04 1.564816e-03 0.99921759 [92,] 2.770812e-03 5.541624e-03 0.99722919 [93,] 1.878461e-02 3.756921e-02 0.98121539 [94,] 2.063393e-02 4.126787e-02 0.97936607 [95,] 4.504239e-02 9.008477e-02 0.95495761 [96,] 1.213340e-01 2.426679e-01 0.87866604 [97,] 3.209101e-01 6.418203e-01 0.67908986 [98,] 2.735572e-01 5.471143e-01 0.72644284 [99,] 2.328965e-01 4.657929e-01 0.76710353 [100,] 1.987015e-01 3.974029e-01 0.80129854 [101,] 2.515773e-01 5.031547e-01 0.74842266 [102,] 2.661201e-01 5.322403e-01 0.73387985 [103,] 3.843985e-01 7.687971e-01 0.61560145 [104,] 4.934248e-01 9.868496e-01 0.50657521 [105,] 5.543257e-01 8.913486e-01 0.44567428 [106,] 7.875602e-01 4.248795e-01 0.21243976 [107,] 8.232555e-01 3.534890e-01 0.17674451 [108,] 8.780061e-01 2.439878e-01 0.12199389 [109,] 9.584895e-01 8.302095e-02 0.04151048 [110,] 9.777528e-01 4.449446e-02 0.02224723 [111,] 9.681359e-01 6.372823e-02 0.03186412 [112,] 9.568755e-01 8.624908e-02 0.04312454 [113,] 9.426702e-01 1.146596e-01 0.05732981 [114,] 9.184646e-01 1.630708e-01 0.08153541 [115,] 8.862580e-01 2.274840e-01 0.11374200 [116,] 8.774620e-01 2.450760e-01 0.12253801 [117,] 8.311265e-01 3.377470e-01 0.16887350 [118,] 8.888556e-01 2.222887e-01 0.11114436 [119,] 8.828785e-01 2.342431e-01 0.11712153 [120,] 8.778486e-01 2.443027e-01 0.12215137 [121,] 8.584128e-01 2.831745e-01 0.14158723 [122,] 9.416853e-01 1.166295e-01 0.05831473 [123,] 8.911737e-01 2.176525e-01 0.10882626 [124,] 8.582943e-01 2.834115e-01 0.14170575 [125,] 9.227970e-01 1.544059e-01 0.07720296 [126,] 8.242873e-01 3.514254e-01 0.17571268 > postscript(file="/var/fisher/rcomp/tmp/1wax81351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/2b0301351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/3onl81351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/4zrc91351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/5rawz1351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 143 Frequency = 1 1 2 3 4 5 6 4.99431007 3.87668608 4.19515051 4.55548637 -2.23078594 0.64629042 7 8 9 10 11 12 -1.50424524 2.02105428 0.87344114 -1.60163692 -0.25603429 -0.01874661 13 14 15 16 17 18 -1.72991182 -8.79381745 -0.28085736 -2.15086456 -4.11033534 -1.05173739 19 20 21 22 23 24 -1.68899962 -0.20623633 -0.27420159 -4.44012888 0.79390174 2.01245081 25 26 27 28 29 30 1.70392687 3.07245368 -1.72420658 -3.49571703 -0.97367346 -0.28296359 31 32 33 34 35 36 -2.11198099 -1.48824477 -1.52206848 -1.35190323 3.75877839 3.40116264 37 38 39 40 41 42 -3.01581234 0.07965908 -2.23462424 1.50641769 1.36392114 0.20894987 43 44 45 46 47 48 -1.68264331 -1.95670503 0.54189326 0.49836882 1.15130106 3.72948467 49 50 51 52 53 54 -3.98931442 1.70952148 -1.09849099 -1.86479247 -1.85613734 1.73417050 55 56 57 58 59 60 2.61027648 -0.64915853 -3.83394020 -2.64444523 1.43132977 4.17124193 61 62 63 64 65 66 1.08543129 -0.18976110 -2.24575622 0.23321528 -0.96710495 -1.69077499 67 68 69 70 71 72 -1.78739356 0.96478361 -0.40302018 0.72619382 2.04878813 7.19870181 73 74 75 76 77 78 4.48322995 3.24200557 -4.23031777 -0.06489804 1.72394292 1.56117479 79 80 81 82 83 84 3.36191468 0.74659140 1.86981509 2.75000659 5.28207451 4.04708329 85 86 87 88 89 90 5.64545027 5.64212155 5.24957486 9.30200632 5.52527052 10.44292854 91 92 93 94 95 96 6.50414593 2.55483808 7.90585911 2.64903392 1.69674338 -1.69053358 97 98 99 100 101 102 1.83012039 -4.82366840 -5.85617648 -9.13506111 -10.75811769 -5.89102530 103 104 105 106 107 108 -8.69380116 -10.36880882 -11.25421275 -1.87016050 -2.48263853 -1.62326095 109 110 111 112 113 114 -7.83630808 -5.59782161 -7.54850638 -6.71735195 -5.10999217 -7.96888288 115 116 117 118 119 120 -2.50167072 -2.61929058 -3.99446538 3.38082103 4.28469899 4.57846816 121 122 123 124 125 126 0.28111168 3.23953413 3.98546440 3.96875266 0.92067129 8.74713068 127 128 129 130 131 132 5.04561419 4.22270659 3.55778721 6.83540186 1.16586116 -0.24875526 133 134 135 136 137 138 -3.40098138 -4.98084601 3.47285933 1.43525336 -1.86110241 2.10162022 139 140 141 142 143 -0.64456551 -0.17440472 -4.12705955 -2.03011501 -2.63445799 > postscript(file="/var/fisher/rcomp/tmp/6e3rj1351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 143 Frequency = 1 lag(myerror, k = 1) myerror 0 4.99431007 NA 1 3.87668608 4.99431007 2 4.19515051 3.87668608 3 4.55548637 4.19515051 4 -2.23078594 4.55548637 5 0.64629042 -2.23078594 6 -1.50424524 0.64629042 7 2.02105428 -1.50424524 8 0.87344114 2.02105428 9 -1.60163692 0.87344114 10 -0.25603429 -1.60163692 11 -0.01874661 -0.25603429 12 -1.72991182 -0.01874661 13 -8.79381745 -1.72991182 14 -0.28085736 -8.79381745 15 -2.15086456 -0.28085736 16 -4.11033534 -2.15086456 17 -1.05173739 -4.11033534 18 -1.68899962 -1.05173739 19 -0.20623633 -1.68899962 20 -0.27420159 -0.20623633 21 -4.44012888 -0.27420159 22 0.79390174 -4.44012888 23 2.01245081 0.79390174 24 1.70392687 2.01245081 25 3.07245368 1.70392687 26 -1.72420658 3.07245368 27 -3.49571703 -1.72420658 28 -0.97367346 -3.49571703 29 -0.28296359 -0.97367346 30 -2.11198099 -0.28296359 31 -1.48824477 -2.11198099 32 -1.52206848 -1.48824477 33 -1.35190323 -1.52206848 34 3.75877839 -1.35190323 35 3.40116264 3.75877839 36 -3.01581234 3.40116264 37 0.07965908 -3.01581234 38 -2.23462424 0.07965908 39 1.50641769 -2.23462424 40 1.36392114 1.50641769 41 0.20894987 1.36392114 42 -1.68264331 0.20894987 43 -1.95670503 -1.68264331 44 0.54189326 -1.95670503 45 0.49836882 0.54189326 46 1.15130106 0.49836882 47 3.72948467 1.15130106 48 -3.98931442 3.72948467 49 1.70952148 -3.98931442 50 -1.09849099 1.70952148 51 -1.86479247 -1.09849099 52 -1.85613734 -1.86479247 53 1.73417050 -1.85613734 54 2.61027648 1.73417050 55 -0.64915853 2.61027648 56 -3.83394020 -0.64915853 57 -2.64444523 -3.83394020 58 1.43132977 -2.64444523 59 4.17124193 1.43132977 60 1.08543129 4.17124193 61 -0.18976110 1.08543129 62 -2.24575622 -0.18976110 63 0.23321528 -2.24575622 64 -0.96710495 0.23321528 65 -1.69077499 -0.96710495 66 -1.78739356 -1.69077499 67 0.96478361 -1.78739356 68 -0.40302018 0.96478361 69 0.72619382 -0.40302018 70 2.04878813 0.72619382 71 7.19870181 2.04878813 72 4.48322995 7.19870181 73 3.24200557 4.48322995 74 -4.23031777 3.24200557 75 -0.06489804 -4.23031777 76 1.72394292 -0.06489804 77 1.56117479 1.72394292 78 3.36191468 1.56117479 79 0.74659140 3.36191468 80 1.86981509 0.74659140 81 2.75000659 1.86981509 82 5.28207451 2.75000659 83 4.04708329 5.28207451 84 5.64545027 4.04708329 85 5.64212155 5.64545027 86 5.24957486 5.64212155 87 9.30200632 5.24957486 88 5.52527052 9.30200632 89 10.44292854 5.52527052 90 6.50414593 10.44292854 91 2.55483808 6.50414593 92 7.90585911 2.55483808 93 2.64903392 7.90585911 94 1.69674338 2.64903392 95 -1.69053358 1.69674338 96 1.83012039 -1.69053358 97 -4.82366840 1.83012039 98 -5.85617648 -4.82366840 99 -9.13506111 -5.85617648 100 -10.75811769 -9.13506111 101 -5.89102530 -10.75811769 102 -8.69380116 -5.89102530 103 -10.36880882 -8.69380116 104 -11.25421275 -10.36880882 105 -1.87016050 -11.25421275 106 -2.48263853 -1.87016050 107 -1.62326095 -2.48263853 108 -7.83630808 -1.62326095 109 -5.59782161 -7.83630808 110 -7.54850638 -5.59782161 111 -6.71735195 -7.54850638 112 -5.10999217 -6.71735195 113 -7.96888288 -5.10999217 114 -2.50167072 -7.96888288 115 -2.61929058 -2.50167072 116 -3.99446538 -2.61929058 117 3.38082103 -3.99446538 118 4.28469899 3.38082103 119 4.57846816 4.28469899 120 0.28111168 4.57846816 121 3.23953413 0.28111168 122 3.98546440 3.23953413 123 3.96875266 3.98546440 124 0.92067129 3.96875266 125 8.74713068 0.92067129 126 5.04561419 8.74713068 127 4.22270659 5.04561419 128 3.55778721 4.22270659 129 6.83540186 3.55778721 130 1.16586116 6.83540186 131 -0.24875526 1.16586116 132 -3.40098138 -0.24875526 133 -4.98084601 -3.40098138 134 3.47285933 -4.98084601 135 1.43525336 3.47285933 136 -1.86110241 1.43525336 137 2.10162022 -1.86110241 138 -0.64456551 2.10162022 139 -0.17440472 -0.64456551 140 -4.12705955 -0.17440472 141 -2.03011501 -4.12705955 142 -2.63445799 -2.03011501 143 NA -2.63445799 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.87668608 4.99431007 [2,] 4.19515051 3.87668608 [3,] 4.55548637 4.19515051 [4,] -2.23078594 4.55548637 [5,] 0.64629042 -2.23078594 [6,] -1.50424524 0.64629042 [7,] 2.02105428 -1.50424524 [8,] 0.87344114 2.02105428 [9,] -1.60163692 0.87344114 [10,] -0.25603429 -1.60163692 [11,] -0.01874661 -0.25603429 [12,] -1.72991182 -0.01874661 [13,] -8.79381745 -1.72991182 [14,] -0.28085736 -8.79381745 [15,] -2.15086456 -0.28085736 [16,] -4.11033534 -2.15086456 [17,] -1.05173739 -4.11033534 [18,] -1.68899962 -1.05173739 [19,] -0.20623633 -1.68899962 [20,] -0.27420159 -0.20623633 [21,] -4.44012888 -0.27420159 [22,] 0.79390174 -4.44012888 [23,] 2.01245081 0.79390174 [24,] 1.70392687 2.01245081 [25,] 3.07245368 1.70392687 [26,] -1.72420658 3.07245368 [27,] -3.49571703 -1.72420658 [28,] -0.97367346 -3.49571703 [29,] -0.28296359 -0.97367346 [30,] -2.11198099 -0.28296359 [31,] -1.48824477 -2.11198099 [32,] -1.52206848 -1.48824477 [33,] -1.35190323 -1.52206848 [34,] 3.75877839 -1.35190323 [35,] 3.40116264 3.75877839 [36,] -3.01581234 3.40116264 [37,] 0.07965908 -3.01581234 [38,] -2.23462424 0.07965908 [39,] 1.50641769 -2.23462424 [40,] 1.36392114 1.50641769 [41,] 0.20894987 1.36392114 [42,] -1.68264331 0.20894987 [43,] -1.95670503 -1.68264331 [44,] 0.54189326 -1.95670503 [45,] 0.49836882 0.54189326 [46,] 1.15130106 0.49836882 [47,] 3.72948467 1.15130106 [48,] -3.98931442 3.72948467 [49,] 1.70952148 -3.98931442 [50,] -1.09849099 1.70952148 [51,] -1.86479247 -1.09849099 [52,] -1.85613734 -1.86479247 [53,] 1.73417050 -1.85613734 [54,] 2.61027648 1.73417050 [55,] -0.64915853 2.61027648 [56,] -3.83394020 -0.64915853 [57,] -2.64444523 -3.83394020 [58,] 1.43132977 -2.64444523 [59,] 4.17124193 1.43132977 [60,] 1.08543129 4.17124193 [61,] -0.18976110 1.08543129 [62,] -2.24575622 -0.18976110 [63,] 0.23321528 -2.24575622 [64,] -0.96710495 0.23321528 [65,] -1.69077499 -0.96710495 [66,] -1.78739356 -1.69077499 [67,] 0.96478361 -1.78739356 [68,] -0.40302018 0.96478361 [69,] 0.72619382 -0.40302018 [70,] 2.04878813 0.72619382 [71,] 7.19870181 2.04878813 [72,] 4.48322995 7.19870181 [73,] 3.24200557 4.48322995 [74,] -4.23031777 3.24200557 [75,] -0.06489804 -4.23031777 [76,] 1.72394292 -0.06489804 [77,] 1.56117479 1.72394292 [78,] 3.36191468 1.56117479 [79,] 0.74659140 3.36191468 [80,] 1.86981509 0.74659140 [81,] 2.75000659 1.86981509 [82,] 5.28207451 2.75000659 [83,] 4.04708329 5.28207451 [84,] 5.64545027 4.04708329 [85,] 5.64212155 5.64545027 [86,] 5.24957486 5.64212155 [87,] 9.30200632 5.24957486 [88,] 5.52527052 9.30200632 [89,] 10.44292854 5.52527052 [90,] 6.50414593 10.44292854 [91,] 2.55483808 6.50414593 [92,] 7.90585911 2.55483808 [93,] 2.64903392 7.90585911 [94,] 1.69674338 2.64903392 [95,] -1.69053358 1.69674338 [96,] 1.83012039 -1.69053358 [97,] -4.82366840 1.83012039 [98,] -5.85617648 -4.82366840 [99,] -9.13506111 -5.85617648 [100,] -10.75811769 -9.13506111 [101,] -5.89102530 -10.75811769 [102,] -8.69380116 -5.89102530 [103,] -10.36880882 -8.69380116 [104,] -11.25421275 -10.36880882 [105,] -1.87016050 -11.25421275 [106,] -2.48263853 -1.87016050 [107,] -1.62326095 -2.48263853 [108,] -7.83630808 -1.62326095 [109,] -5.59782161 -7.83630808 [110,] -7.54850638 -5.59782161 [111,] -6.71735195 -7.54850638 [112,] -5.10999217 -6.71735195 [113,] -7.96888288 -5.10999217 [114,] -2.50167072 -7.96888288 [115,] -2.61929058 -2.50167072 [116,] -3.99446538 -2.61929058 [117,] 3.38082103 -3.99446538 [118,] 4.28469899 3.38082103 [119,] 4.57846816 4.28469899 [120,] 0.28111168 4.57846816 [121,] 3.23953413 0.28111168 [122,] 3.98546440 3.23953413 [123,] 3.96875266 3.98546440 [124,] 0.92067129 3.96875266 [125,] 8.74713068 0.92067129 [126,] 5.04561419 8.74713068 [127,] 4.22270659 5.04561419 [128,] 3.55778721 4.22270659 [129,] 6.83540186 3.55778721 [130,] 1.16586116 6.83540186 [131,] -0.24875526 1.16586116 [132,] -3.40098138 -0.24875526 [133,] -4.98084601 -3.40098138 [134,] 3.47285933 -4.98084601 [135,] 1.43525336 3.47285933 [136,] -1.86110241 1.43525336 [137,] 2.10162022 -1.86110241 [138,] -0.64456551 2.10162022 [139,] -0.17440472 -0.64456551 [140,] -4.12705955 -0.17440472 [141,] -2.03011501 -4.12705955 [142,] -2.63445799 -2.03011501 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.87668608 4.99431007 2 4.19515051 3.87668608 3 4.55548637 4.19515051 4 -2.23078594 4.55548637 5 0.64629042 -2.23078594 6 -1.50424524 0.64629042 7 2.02105428 -1.50424524 8 0.87344114 2.02105428 9 -1.60163692 0.87344114 10 -0.25603429 -1.60163692 11 -0.01874661 -0.25603429 12 -1.72991182 -0.01874661 13 -8.79381745 -1.72991182 14 -0.28085736 -8.79381745 15 -2.15086456 -0.28085736 16 -4.11033534 -2.15086456 17 -1.05173739 -4.11033534 18 -1.68899962 -1.05173739 19 -0.20623633 -1.68899962 20 -0.27420159 -0.20623633 21 -4.44012888 -0.27420159 22 0.79390174 -4.44012888 23 2.01245081 0.79390174 24 1.70392687 2.01245081 25 3.07245368 1.70392687 26 -1.72420658 3.07245368 27 -3.49571703 -1.72420658 28 -0.97367346 -3.49571703 29 -0.28296359 -0.97367346 30 -2.11198099 -0.28296359 31 -1.48824477 -2.11198099 32 -1.52206848 -1.48824477 33 -1.35190323 -1.52206848 34 3.75877839 -1.35190323 35 3.40116264 3.75877839 36 -3.01581234 3.40116264 37 0.07965908 -3.01581234 38 -2.23462424 0.07965908 39 1.50641769 -2.23462424 40 1.36392114 1.50641769 41 0.20894987 1.36392114 42 -1.68264331 0.20894987 43 -1.95670503 -1.68264331 44 0.54189326 -1.95670503 45 0.49836882 0.54189326 46 1.15130106 0.49836882 47 3.72948467 1.15130106 48 -3.98931442 3.72948467 49 1.70952148 -3.98931442 50 -1.09849099 1.70952148 51 -1.86479247 -1.09849099 52 -1.85613734 -1.86479247 53 1.73417050 -1.85613734 54 2.61027648 1.73417050 55 -0.64915853 2.61027648 56 -3.83394020 -0.64915853 57 -2.64444523 -3.83394020 58 1.43132977 -2.64444523 59 4.17124193 1.43132977 60 1.08543129 4.17124193 61 -0.18976110 1.08543129 62 -2.24575622 -0.18976110 63 0.23321528 -2.24575622 64 -0.96710495 0.23321528 65 -1.69077499 -0.96710495 66 -1.78739356 -1.69077499 67 0.96478361 -1.78739356 68 -0.40302018 0.96478361 69 0.72619382 -0.40302018 70 2.04878813 0.72619382 71 7.19870181 2.04878813 72 4.48322995 7.19870181 73 3.24200557 4.48322995 74 -4.23031777 3.24200557 75 -0.06489804 -4.23031777 76 1.72394292 -0.06489804 77 1.56117479 1.72394292 78 3.36191468 1.56117479 79 0.74659140 3.36191468 80 1.86981509 0.74659140 81 2.75000659 1.86981509 82 5.28207451 2.75000659 83 4.04708329 5.28207451 84 5.64545027 4.04708329 85 5.64212155 5.64545027 86 5.24957486 5.64212155 87 9.30200632 5.24957486 88 5.52527052 9.30200632 89 10.44292854 5.52527052 90 6.50414593 10.44292854 91 2.55483808 6.50414593 92 7.90585911 2.55483808 93 2.64903392 7.90585911 94 1.69674338 2.64903392 95 -1.69053358 1.69674338 96 1.83012039 -1.69053358 97 -4.82366840 1.83012039 98 -5.85617648 -4.82366840 99 -9.13506111 -5.85617648 100 -10.75811769 -9.13506111 101 -5.89102530 -10.75811769 102 -8.69380116 -5.89102530 103 -10.36880882 -8.69380116 104 -11.25421275 -10.36880882 105 -1.87016050 -11.25421275 106 -2.48263853 -1.87016050 107 -1.62326095 -2.48263853 108 -7.83630808 -1.62326095 109 -5.59782161 -7.83630808 110 -7.54850638 -5.59782161 111 -6.71735195 -7.54850638 112 -5.10999217 -6.71735195 113 -7.96888288 -5.10999217 114 -2.50167072 -7.96888288 115 -2.61929058 -2.50167072 116 -3.99446538 -2.61929058 117 3.38082103 -3.99446538 118 4.28469899 3.38082103 119 4.57846816 4.28469899 120 0.28111168 4.57846816 121 3.23953413 0.28111168 122 3.98546440 3.23953413 123 3.96875266 3.98546440 124 0.92067129 3.96875266 125 8.74713068 0.92067129 126 5.04561419 8.74713068 127 4.22270659 5.04561419 128 3.55778721 4.22270659 129 6.83540186 3.55778721 130 1.16586116 6.83540186 131 -0.24875526 1.16586116 132 -3.40098138 -0.24875526 133 -4.98084601 -3.40098138 134 3.47285933 -4.98084601 135 1.43525336 3.47285933 136 -1.86110241 1.43525336 137 2.10162022 -1.86110241 138 -0.64456551 2.10162022 139 -0.17440472 -0.64456551 140 -4.12705955 -0.17440472 141 -2.03011501 -4.12705955 142 -2.63445799 -2.03011501 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/7aoin1351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/87sw51351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/9mti81351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/fisher/rcomp/tmp/107ub61351677347.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/11uzuj1351677347.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/12eazn1351677347.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/13cydk1351677347.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/14886r1351677347.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/fisher/rcomp/tmp/15d7xw1351677347.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/fisher/rcomp/tmp/16yrns1351677347.tab") + } > > try(system("convert tmp/1wax81351677347.ps tmp/1wax81351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/2b0301351677347.ps tmp/2b0301351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/3onl81351677347.ps tmp/3onl81351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/4zrc91351677347.ps tmp/4zrc91351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/5rawz1351677347.ps tmp/5rawz1351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/6e3rj1351677347.ps tmp/6e3rj1351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/7aoin1351677347.ps tmp/7aoin1351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/87sw51351677347.ps tmp/87sw51351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/9mti81351677347.ps tmp/9mti81351677347.png",intern=TRUE)) character(0) > try(system("convert tmp/107ub61351677347.ps tmp/107ub61351677347.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.477 1.094 8.567