R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(114468 + ,47 + ,95556 + ,1173 + ,88594 + ,48 + ,54565 + ,669 + ,74151 + ,42 + ,63016 + ,1154 + ,77921 + ,77 + ,79774 + ,1948 + ,53212 + ,33 + ,31258 + ,705 + ,34956 + ,20 + ,52491 + ,332 + ,149703 + ,80 + ,91256 + ,2726 + ,6853 + ,16 + ,22807 + ,345 + ,58907 + ,39 + ,77411 + ,1385 + ,67067 + ,26 + ,48821 + ,1162 + ,110563 + ,67 + ,52295 + ,1431 + ,58126 + ,76 + ,63262 + ,1228 + ,57113 + ,46 + ,50466 + ,1205 + ,77993 + ,44 + ,62932 + ,1732 + ,68091 + ,57 + ,38439 + ,1214 + ,124676 + ,125 + ,70817 + ,3221 + ,109522 + ,43 + ,105965 + ,1385 + ,75865 + ,107 + ,73795 + ,1992 + ,79746 + ,36 + ,82043 + ,883 + ,77844 + ,51 + ,74349 + ,1631 + ,98681 + ,49 + ,82204 + ,1459 + ,105531 + ,58 + ,55709 + ,1929 + ,51428 + ,22 + ,37137 + ,860 + ,65703 + ,33 + ,70780 + ,1165 + ,72562 + ,77 + ,55027 + ,2115 + ,81728 + ,93 + ,56699 + ,1939 + ,95580 + ,86 + ,65911 + ,1844 + ,98278 + ,56 + ,56316 + ,1346 + ,46629 + ,35 + ,26982 + ,1093 + ,115189 + ,40 + ,54628 + ,1626 + ,124865 + ,56 + ,96750 + ,1551 + ,59392 + ,50 + ,53009 + ,1267 + ,127818 + ,66 + ,64664 + ,1478 + ,17821 + ,27 + ,36990 + ,670 + ,154076 + ,58 + ,85224 + ,2040 + ,64881 + ,38 + ,37048 + ,1561 + ,136506 + ,85 + ,59635 + ,2079 + ,66524 + ,52 + ,42051 + ,1113 + ,45988 + ,26 + ,26998 + ,686 + ,107445 + ,111 + ,63717 + ,2065 + ,102772 + ,57 + ,55071 + ,2251 + ,46657 + ,43 + ,40001 + ,1106 + ,97563 + ,50 + ,54506 + ,1244 + ,36663 + ,32 + ,35838 + ,1021 + ,55369 + ,49 + ,50838 + ,1735 + ,77921 + ,99 + ,86997 + ,3681 + ,56968 + ,42 + ,33032 + ,918 + ,77519 + ,56 + ,61704 + ,1582 + ,129805 + ,73 + ,117986 + ,2900 + ,72761 + ,39 + ,56733 + ,1496 + ,81278 + ,55 + ,55064 + ,1116 + ,15049 + ,24 + ,5950 + ,496 + ,113935 + ,215 + ,84607 + ,1777 + ,25109 + ,17 + ,32551 + ,744 + ,45824 + ,61 + ,31701 + ,1104 + ,89644 + ,27 + ,71170 + ,1612 + ,109011 + ,60 + ,101773 + ,1849 + ,134245 + ,114 + ,101653 + ,2460 + ,136692 + ,79 + ,81493 + ,1701 + ,50741 + ,57 + ,55901 + ,1334 + ,149510 + ,89 + ,109104 + ,2549 + ,147888 + ,78 + ,114425 + ,2218 + ,54987 + ,62 + ,36311 + ,1633 + ,74467 + ,64 + ,70027 + ,1741 + ,100033 + ,43 + ,73713 + ,982 + ,85505 + ,38 + ,40671 + ,1171 + ,62426 + ,88 + ,89041 + ,1282 + ,82932 + ,104 + ,57231 + ,1977 + ,72002 + ,50 + ,68608 + ,1521 + ,65469 + ,37 + ,59155 + ,1071 + ,63572 + ,37 + ,55827 + ,1425 + ,23824 + ,29 + ,22618 + ,852 + ,73831 + ,46 + ,58425 + ,1363 + ,63551 + ,40 + ,65724 + ,1152 + ,56756 + ,36 + ,56979 + ,1100 + ,81399 + ,48 + ,72369 + ,1393 + ,117881 + ,60 + ,79194 + ,1521 + ,70711 + ,62 + ,202316 + ,1015 + ,50495 + ,38 + ,44970 + ,993 + ,53845 + ,45 + ,49319 + ,1190 + ,51390 + ,33 + ,36252 + ,1244 + ,104953 + ,79 + ,75741 + ,2648 + ,65983 + ,54 + ,38417 + ,1177 + ,76839 + ,61 + ,64102 + ,1333 + ,55792 + ,25 + ,56622 + ,870 + ,25155 + ,39 + ,15430 + ,1473 + ,55291 + ,38 + ,72571 + ,881 + ,84279 + ,116 + ,67271 + ,2489 + ,99692 + ,57 + ,43460 + ,1429 + ,59633 + ,72 + ,99501 + ,1995 + ,63249 + ,55 + ,28340 + ,1247 + ,82928 + ,50 + ,76013 + ,1357 + ,50000 + ,45 + ,37361 + ,1317 + ,69455 + ,54 + ,48204 + ,2041 + ,84068 + ,53 + ,76168 + ,1454 + ,76195 + ,28 + ,85168 + ,1031 + ,114634 + ,30 + ,125410 + ,1154 + ,139357 + ,57 + ,123328 + ,1521 + ,110044 + ,98 + ,83038 + ,2314 + ,155118 + ,75 + ,120087 + ,2274 + ,83061 + ,71 + ,91939 + ,1371 + ,127122 + ,42 + ,103646 + ,1624 + ,45653 + ,112 + ,29467 + ,999 + ,19630 + ,14 + ,43750 + ,602 + ,67229 + ,46 + ,34497 + ,1380 + ,86060 + ,93 + ,66477 + ,1207 + ,88003 + ,30 + ,71181 + ,1405 + ,95815 + ,66 + ,74482 + ,1800 + ,85499 + ,37 + ,174949 + ,705 + ,27220 + ,66 + ,46765 + ,1151 + ,109882 + ,43 + ,90257 + ,1270 + ,72579 + ,57 + ,51370 + ,1381 + ,5841 + ,10 + ,1168 + ,391 + ,68369 + ,53 + ,51360 + ,1264 + ,24610 + ,25 + ,25162 + ,530 + ,30995 + ,36 + ,21067 + ,1123 + ,150662 + ,69 + ,58233 + ,1981 + ,6622 + ,16 + ,855 + ,387 + ,93694 + ,38 + ,85903 + ,1485 + ,13155 + ,19 + ,14116 + ,449 + ,111908 + ,79 + ,57637 + ,2209 + ,57550 + ,36 + ,94137 + ,1135 + ,16356 + ,48 + ,62147 + ,814 + ,40174 + ,31 + ,62832 + ,1015 + ,13983 + ,34 + ,8773 + ,568 + ,52316 + ,26 + ,63785 + ,936 + ,99585 + ,50 + ,65196 + ,1585 + ,86271 + ,40 + ,73087 + ,871 + ,131012 + ,52 + ,72631 + ,2275 + ,130274 + ,67 + ,86281 + ,1638 + ,159051 + ,75 + ,162365 + ,2238 + ,76506 + ,24 + ,56530 + ,829 + ,49145 + ,29 + ,35606 + ,809 + ,66398 + ,197 + ,70111 + ,1904 + ,127546 + ,115 + ,92046 + ,3053 + ,6802 + ,17 + ,63989 + ,655 + ,99509 + ,88 + ,104911 + ,2617 + ,43106 + ,52 + ,43448 + ,1314 + ,108303 + ,35 + ,60029 + ,1154 + ,64167 + ,54 + ,38650 + ,1496 + ,8579 + ,77 + ,47261 + ,754 + ,97811 + ,82 + ,73586 + ,2831 + ,84365 + ,54 + ,83042 + ,1281 + ,10901 + ,63 + ,37238 + ,2035 + ,91346 + ,72 + ,63958 + ,1894 + ,33660 + ,42 + ,78956 + ,1268 + ,93634 + ,50 + ,99518 + ,1713 + ,109348 + ,69 + ,111436 + ,1568 + ,7953 + ,10 + ,6023 + ,207 + ,63538 + ,59 + ,42564 + ,1302 + ,108281 + ,79 + ,38885 + ,1761 + ,4245 + ,5 + ,1644 + ,151 + ,21509 + ,20 + ,6179 + ,474 + ,7670 + ,5 + ,3926 + ,141 + ,10641 + ,27 + ,23238 + ,705 + ,41243 + ,35 + ,49288 + ,1032) + ,dim=c(4 + ,156) + ,dimnames=list(c('CWS' + ,'NOL' + ,'CWC' + ,'TNOP') + ,1:156)) > y <- array(NA,dim=c(4,156),dimnames=list(c('CWS','NOL','CWC','TNOP'),1:156)) > 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' > #'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 > 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 CWS NOL CWC TNOP 1 114468 47 95556 1173 2 88594 48 54565 669 3 74151 42 63016 1154 4 77921 77 79774 1948 5 53212 33 31258 705 6 34956 20 52491 332 7 149703 80 91256 2726 8 6853 16 22807 345 9 58907 39 77411 1385 10 67067 26 48821 1162 11 110563 67 52295 1431 12 58126 76 63262 1228 13 57113 46 50466 1205 14 77993 44 62932 1732 15 68091 57 38439 1214 16 124676 125 70817 3221 17 109522 43 105965 1385 18 75865 107 73795 1992 19 79746 36 82043 883 20 77844 51 74349 1631 21 98681 49 82204 1459 22 105531 58 55709 1929 23 51428 22 37137 860 24 65703 33 70780 1165 25 72562 77 55027 2115 26 81728 93 56699 1939 27 95580 86 65911 1844 28 98278 56 56316 1346 29 46629 35 26982 1093 30 115189 40 54628 1626 31 124865 56 96750 1551 32 59392 50 53009 1267 33 127818 66 64664 1478 34 17821 27 36990 670 35 154076 58 85224 2040 36 64881 38 37048 1561 37 136506 85 59635 2079 38 66524 52 42051 1113 39 45988 26 26998 686 40 107445 111 63717 2065 41 102772 57 55071 2251 42 46657 43 40001 1106 43 97563 50 54506 1244 44 36663 32 35838 1021 45 55369 49 50838 1735 46 77921 99 86997 3681 47 56968 42 33032 918 48 77519 56 61704 1582 49 129805 73 117986 2900 50 72761 39 56733 1496 51 81278 55 55064 1116 52 15049 24 5950 496 53 113935 215 84607 1777 54 25109 17 32551 744 55 45824 61 31701 1104 56 89644 27 71170 1612 57 109011 60 101773 1849 58 134245 114 101653 2460 59 136692 79 81493 1701 60 50741 57 55901 1334 61 149510 89 109104 2549 62 147888 78 114425 2218 63 54987 62 36311 1633 64 74467 64 70027 1741 65 100033 43 73713 982 66 85505 38 40671 1171 67 62426 88 89041 1282 68 82932 104 57231 1977 69 72002 50 68608 1521 70 65469 37 59155 1071 71 63572 37 55827 1425 72 23824 29 22618 852 73 73831 46 58425 1363 74 63551 40 65724 1152 75 56756 36 56979 1100 76 81399 48 72369 1393 77 117881 60 79194 1521 78 70711 62 202316 1015 79 50495 38 44970 993 80 53845 45 49319 1190 81 51390 33 36252 1244 82 104953 79 75741 2648 83 65983 54 38417 1177 84 76839 61 64102 1333 85 55792 25 56622 870 86 25155 39 15430 1473 87 55291 38 72571 881 88 84279 116 67271 2489 89 99692 57 43460 1429 90 59633 72 99501 1995 91 63249 55 28340 1247 92 82928 50 76013 1357 93 50000 45 37361 1317 94 69455 54 48204 2041 95 84068 53 76168 1454 96 76195 28 85168 1031 97 114634 30 125410 1154 98 139357 57 123328 1521 99 110044 98 83038 2314 100 155118 75 120087 2274 101 83061 71 91939 1371 102 127122 42 103646 1624 103 45653 112 29467 999 104 19630 14 43750 602 105 67229 46 34497 1380 106 86060 93 66477 1207 107 88003 30 71181 1405 108 95815 66 74482 1800 109 85499 37 174949 705 110 27220 66 46765 1151 111 109882 43 90257 1270 112 72579 57 51370 1381 113 5841 10 1168 391 114 68369 53 51360 1264 115 24610 25 25162 530 116 30995 36 21067 1123 117 150662 69 58233 1981 118 6622 16 855 387 119 93694 38 85903 1485 120 13155 19 14116 449 121 111908 79 57637 2209 122 57550 36 94137 1135 123 16356 48 62147 814 124 40174 31 62832 1015 125 13983 34 8773 568 126 52316 26 63785 936 127 99585 50 65196 1585 128 86271 40 73087 871 129 131012 52 72631 2275 130 130274 67 86281 1638 131 159051 75 162365 2238 132 76506 24 56530 829 133 49145 29 35606 809 134 66398 197 70111 1904 135 127546 115 92046 3053 136 6802 17 63989 655 137 99509 88 104911 2617 138 43106 52 43448 1314 139 108303 35 60029 1154 140 64167 54 38650 1496 141 8579 77 47261 754 142 97811 82 73586 2831 143 84365 54 83042 1281 144 10901 63 37238 2035 145 91346 72 63958 1894 146 33660 42 78956 1268 147 93634 50 99518 1713 148 109348 69 111436 1568 149 7953 10 6023 207 150 63538 59 42564 1302 151 108281 79 38885 1761 152 4245 5 1644 151 153 21509 20 6179 474 154 7670 5 3926 141 155 10641 27 23238 705 156 41243 35 49288 1032 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) NOL CWC TNOP 1363.805 0.369 0.523 29.023 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -75810 -12188 -511 12106 61324 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.364e+03 4.942e+03 0.276 0.783 NOL 3.690e-01 8.407e+01 0.004 0.997 CWC 5.230e-01 6.651e-02 7.863 6.44e-13 *** TNOP 2.902e+01 4.290e+00 6.766 2.69e-10 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 22870 on 152 degrees of freedom Multiple R-squared: 0.6328, Adjusted R-squared: 0.6256 F-statistic: 87.32 on 3 and 152 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,] 0.79233778 0.41532444 0.20766222 [2,] 0.72122951 0.55754098 0.27877049 [3,] 0.70747740 0.58504519 0.29252260 [4,] 0.65660541 0.68678919 0.34339459 [5,] 0.63846877 0.72306245 0.36153123 [6,] 0.75027619 0.49944761 0.24972381 [7,] 0.68077681 0.63844638 0.31922319 [8,] 0.59623176 0.80753648 0.40376824 [9,] 0.50873077 0.98253846 0.49126923 [10,] 0.45075167 0.90150333 0.54924833 [11,] 0.36960948 0.73921896 0.63039052 [12,] 0.41394793 0.82789586 0.58605207 [13,] 0.33830058 0.67660116 0.66169942 [14,] 0.29046862 0.58093723 0.70953138 [15,] 0.23440625 0.46881250 0.76559375 [16,] 0.22051343 0.44102686 0.77948657 [17,] 0.16974295 0.33948589 0.83025705 [18,] 0.14016721 0.28033441 0.85983279 [19,] 0.12831275 0.25662551 0.87168725 [20,] 0.09597188 0.19194376 0.90402812 [21,] 0.07162919 0.14325837 0.92837081 [22,] 0.08415025 0.16830051 0.91584975 [23,] 0.06132722 0.12265445 0.93867278 [24,] 0.10332853 0.20665706 0.89667147 [25,] 0.10215976 0.20431952 0.89784024 [26,] 0.08241897 0.16483793 0.91758103 [27,] 0.19731987 0.39463974 0.80268013 [28,] 0.21727401 0.43454802 0.78272599 [29,] 0.33315169 0.66630339 0.66684831 [30,] 0.28346397 0.56692794 0.71653603 [31,] 0.40304221 0.80608442 0.59695779 [32,] 0.35773274 0.71546549 0.64226726 [33,] 0.31573728 0.63147456 0.68426272 [34,] 0.27624470 0.55248940 0.72375530 [35,] 0.23419166 0.46838331 0.76580834 [36,] 0.20341934 0.40683867 0.79658066 [37,] 0.22401220 0.44802441 0.77598780 [38,] 0.20425399 0.40850799 0.79574601 [39,] 0.22048602 0.44097204 0.77951398 [40,] 0.67015016 0.65969967 0.32984984 [41,] 0.63097820 0.73804359 0.36902180 [42,] 0.58445018 0.83109963 0.41554982 [43,] 0.56199616 0.87600768 0.43800384 [44,] 0.51193175 0.97613651 0.48806825 [45,] 0.48098085 0.96196171 0.51901915 [46,] 0.43528833 0.87057666 0.56471167 [47,] 0.43568572 0.87137143 0.56431428 [48,] 0.41761621 0.83523243 0.58238379 [49,] 0.37437235 0.74874471 0.62562765 [50,] 0.32916563 0.65833126 0.67083437 [51,] 0.29027887 0.58055774 0.70972113 [52,] 0.25269921 0.50539843 0.74730079 [53,] 0.34107651 0.68215303 0.65892349 [54,] 0.33991091 0.67982182 0.66008909 [55,] 0.31262219 0.62524438 0.68737781 [56,] 0.29482805 0.58965610 0.70517195 [57,] 0.26261451 0.52522903 0.73738549 [58,] 0.24587172 0.49174345 0.75412828 [59,] 0.26223133 0.52446267 0.73776867 [60,] 0.29120655 0.58241309 0.70879345 [61,] 0.34990767 0.69981534 0.65009233 [62,] 0.30950908 0.61901816 0.69049092 [63,] 0.28142466 0.56284933 0.71857534 [64,] 0.24559668 0.49119336 0.75440332 [65,] 0.21623115 0.43246230 0.78376885 [66,] 0.19487636 0.38975273 0.80512364 [67,] 0.16466950 0.32933900 0.83533050 [68,] 0.14333521 0.28667042 0.85666479 [69,] 0.12288253 0.24576507 0.87711747 [70,] 0.10166628 0.20333256 0.89833372 [71,] 0.11619170 0.23238339 0.88380830 [72,] 0.46385717 0.92771435 0.53614283 [73,] 0.42080328 0.84160656 0.57919672 [74,] 0.38286581 0.76573163 0.61713419 [75,] 0.34245506 0.68491012 0.65754494 [76,] 0.31311693 0.62623386 0.68688307 [77,] 0.28246020 0.56492040 0.71753980 [78,] 0.24626463 0.49252927 0.75373537 [79,] 0.21138805 0.42277609 0.78861195 [80,] 0.22880373 0.45760747 0.77119627 [81,] 0.20087364 0.40174728 0.79912636 [82,] 0.20513237 0.41026474 0.79486763 [83,] 0.24848713 0.49697425 0.75151287 [84,] 0.41855748 0.83711496 0.58144252 [85,] 0.38591836 0.77183671 0.61408164 [86,] 0.34221125 0.68442251 0.65778875 [87,] 0.30700539 0.61401079 0.69299461 [88,] 0.29025229 0.58050458 0.70974771 [89,] 0.25085955 0.50171909 0.74914045 [90,] 0.21441051 0.42882103 0.78558949 [91,] 0.19537187 0.39074374 0.80462813 [92,] 0.22210095 0.44420191 0.77789905 [93,] 0.18812968 0.37625937 0.81187032 [94,] 0.19455251 0.38910502 0.80544749 [95,] 0.16528899 0.33057799 0.83471101 [96,] 0.17144470 0.34288941 0.82855530 [97,] 0.14993527 0.29987055 0.85006473 [98,] 0.14533074 0.29066148 0.85466926 [99,] 0.12195250 0.24390500 0.87804750 [100,] 0.12101956 0.24203912 0.87898044 [101,] 0.10046835 0.20093671 0.89953165 [102,] 0.08097260 0.16194520 0.91902740 [103,] 0.08072166 0.16144333 0.91927834 [104,] 0.09098370 0.18196739 0.90901630 [105,] 0.09624270 0.19248539 0.90375730 [106,] 0.07796035 0.15592070 0.92203965 [107,] 0.06238377 0.12476753 0.93761623 [108,] 0.04917437 0.09834874 0.95082563 [109,] 0.03788797 0.07577594 0.96211203 [110,] 0.03087005 0.06174009 0.96912995 [111,] 0.14438153 0.28876307 0.85561847 [112,] 0.11722321 0.23444643 0.88277679 [113,] 0.09423830 0.18847660 0.90576170 [114,] 0.07459802 0.14919603 0.92540198 [115,] 0.07045640 0.14091281 0.92954360 [116,] 0.07078565 0.14157129 0.92921435 [117,] 0.10391562 0.20783124 0.89608438 [118,] 0.10090472 0.20180944 0.89909528 [119,] 0.07858634 0.15717267 0.92141366 [120,] 0.06215314 0.12430627 0.93784686 [121,] 0.05761700 0.11523400 0.94238300 [122,] 0.05472172 0.10944345 0.94527828 [123,] 0.06661623 0.13323245 0.93338377 [124,] 0.11756986 0.23513972 0.88243014 [125,] 0.10099134 0.20198267 0.89900866 [126,] 0.11030457 0.22060913 0.88969543 [127,] 0.08960041 0.17920082 0.91039959 [128,] 0.07924011 0.15848022 0.92075989 [129,] 0.05895162 0.11790324 0.94104838 [130,] 0.10602403 0.21204807 0.89397597 [131,] 0.09412234 0.18824469 0.90587766 [132,] 0.07192579 0.14385159 0.92807421 [133,] 0.18895742 0.37791484 0.81104258 [134,] 0.14906577 0.29813154 0.85093423 [135,] 0.65061465 0.69877069 0.34938535 [136,] 0.75691444 0.48617113 0.24308556 [137,] 0.67191410 0.65617180 0.32808590 [138,] 0.89322061 0.21355878 0.10677939 [139,] 0.82847090 0.34305820 0.17152910 [140,] 0.94022062 0.11955876 0.05977938 [141,] 0.93757582 0.12484836 0.06242418 [142,] 0.91774906 0.16450189 0.08225094 [143,] 0.81757840 0.36484321 0.18242160 > postscript(file="/var/wessaorg/rcomp/tmp/1z7b61321974063.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/wessaorg/rcomp/tmp/2kgao1321974063.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/wessaorg/rcomp/tmp/3rttb1321974063.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/wessaorg/rcomp/tmp/43tb71321974063.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/wessaorg/rcomp/tmp/5hfdm1321974063.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 = 156 Frequency = 1 1 2 3 4 5 6 29070.5593 39260.5857 6324.0299 -21727.0464 15027.9650 -3501.6655 7 8 9 10 11 12 21469.2023 -16456.8838 -23151.2450 6437.1952 40294.0756 -11989.8753 13 14 15 16 17 18 -5632.4514 -6566.1473 11369.9468 -7252.0277 12529.6197 -21944.3429 19 20 21 22 23 24 9836.1118 -9757.0523 11964.7965 19026.4860 5674.9448 -6500.1814 25 26 27 28 29 30 -18991.1661 -5597.3917 6196.8615 28377.2697 -580.5607 38050.4574 31 32 33 34 35 36 27869.0794 -6484.2538 49716.8395 -22342.6303 48914.6929 -1176.6279 37 38 39 40 41 42 43584.9055 10847.1885 10585.8058 12785.9047 7256.0576 -7741.2565 43 44 45 46 47 48 31571.4039 -13087.1408 -22954.3580 -75809.5999 11670.9833 -2048.9083 49 50 51 52 53 54 -17455.0157 -1705.0022 18707.7066 -3830.7560 16671.5146 -14877.2234 55 56 57 58 59 60 -4182.2665 4265.7390 737.8728 8281.5726 43312.9564 -18594.7925 61 62 63 64 65 66 17076.1480 22282.1808 -12783.7254 -14071.1509 31603.5135 28871.7004 67 68 69 70 71 72 -22742.9915 -5778.5451 -9403.8139 2071.9510 -8358.8185 -14106.5665 73 74 75 76 77 78 2337.6392 -5633.3673 -6344.3853 1742.0241 30935.4198 -65937.7533 79 80 81 82 83 84 -3220.3968 -7864.8980 -5049.1736 -12902.8679 10348.4146 3241.9427 85 86 87 88 89 90 -442.3097 -27043.5672 -9608.0830 -24546.3537 34105.1816 -51693.7617 91 92 93 94 95 96 10852.3156 2409.4449 -9142.2546 -16373.7980 652.0354 358.3841 97 98 99 100 101 102 14181.7612 29332.1180 -1941.2080 24926.9812 -6200.3215 24406.2101 103 104 105 106 107 108 -156.3583 -22090.4847 7755.6828 14866.0148 8625.6670 3233.9506 109 110 111 112 113 114 -27831.4559 -32030.0992 24441.9679 4248.6617 -7485.3572 3441.0732 115 116 117 118 119 120 -5304.0589 -13992.3028 61324.2684 -6426.7914 4292.8171 -8629.3325 121 122 123 124 125 126 16260.9909 -25998.4199 -41150.8664 -23518.4716 -8466.4329 -9580.1825 127 128 129 130 131 132 18106.0526 21391.5619 25618.1332 36223.8987 7795.0227 21510.1201 133 134 135 136 137 138 5670.1965 -26963.9228 -10604.4146 -47042.0470 -32705.2758 -19135.0382 139 140 141 142 143 144 42040.7004 -847.8134 -39412.3653 -24230.2240 2374.8262 -69022.1777 145 146 147 148 149 150 1538.2157 -45811.6224 -9509.0125 4173.6684 -2572.0826 2104.9550 151 152 153 154 155 156 35442.9373 -2362.8916 3149.4704 158.9402 -23346.6652 -15861.3422 > postscript(file="/var/wessaorg/rcomp/tmp/6ewmw1321974063.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 29070.5593 NA 1 39260.5857 29070.5593 2 6324.0299 39260.5857 3 -21727.0464 6324.0299 4 15027.9650 -21727.0464 5 -3501.6655 15027.9650 6 21469.2023 -3501.6655 7 -16456.8838 21469.2023 8 -23151.2450 -16456.8838 9 6437.1952 -23151.2450 10 40294.0756 6437.1952 11 -11989.8753 40294.0756 12 -5632.4514 -11989.8753 13 -6566.1473 -5632.4514 14 11369.9468 -6566.1473 15 -7252.0277 11369.9468 16 12529.6197 -7252.0277 17 -21944.3429 12529.6197 18 9836.1118 -21944.3429 19 -9757.0523 9836.1118 20 11964.7965 -9757.0523 21 19026.4860 11964.7965 22 5674.9448 19026.4860 23 -6500.1814 5674.9448 24 -18991.1661 -6500.1814 25 -5597.3917 -18991.1661 26 6196.8615 -5597.3917 27 28377.2697 6196.8615 28 -580.5607 28377.2697 29 38050.4574 -580.5607 30 27869.0794 38050.4574 31 -6484.2538 27869.0794 32 49716.8395 -6484.2538 33 -22342.6303 49716.8395 34 48914.6929 -22342.6303 35 -1176.6279 48914.6929 36 43584.9055 -1176.6279 37 10847.1885 43584.9055 38 10585.8058 10847.1885 39 12785.9047 10585.8058 40 7256.0576 12785.9047 41 -7741.2565 7256.0576 42 31571.4039 -7741.2565 43 -13087.1408 31571.4039 44 -22954.3580 -13087.1408 45 -75809.5999 -22954.3580 46 11670.9833 -75809.5999 47 -2048.9083 11670.9833 48 -17455.0157 -2048.9083 49 -1705.0022 -17455.0157 50 18707.7066 -1705.0022 51 -3830.7560 18707.7066 52 16671.5146 -3830.7560 53 -14877.2234 16671.5146 54 -4182.2665 -14877.2234 55 4265.7390 -4182.2665 56 737.8728 4265.7390 57 8281.5726 737.8728 58 43312.9564 8281.5726 59 -18594.7925 43312.9564 60 17076.1480 -18594.7925 61 22282.1808 17076.1480 62 -12783.7254 22282.1808 63 -14071.1509 -12783.7254 64 31603.5135 -14071.1509 65 28871.7004 31603.5135 66 -22742.9915 28871.7004 67 -5778.5451 -22742.9915 68 -9403.8139 -5778.5451 69 2071.9510 -9403.8139 70 -8358.8185 2071.9510 71 -14106.5665 -8358.8185 72 2337.6392 -14106.5665 73 -5633.3673 2337.6392 74 -6344.3853 -5633.3673 75 1742.0241 -6344.3853 76 30935.4198 1742.0241 77 -65937.7533 30935.4198 78 -3220.3968 -65937.7533 79 -7864.8980 -3220.3968 80 -5049.1736 -7864.8980 81 -12902.8679 -5049.1736 82 10348.4146 -12902.8679 83 3241.9427 10348.4146 84 -442.3097 3241.9427 85 -27043.5672 -442.3097 86 -9608.0830 -27043.5672 87 -24546.3537 -9608.0830 88 34105.1816 -24546.3537 89 -51693.7617 34105.1816 90 10852.3156 -51693.7617 91 2409.4449 10852.3156 92 -9142.2546 2409.4449 93 -16373.7980 -9142.2546 94 652.0354 -16373.7980 95 358.3841 652.0354 96 14181.7612 358.3841 97 29332.1180 14181.7612 98 -1941.2080 29332.1180 99 24926.9812 -1941.2080 100 -6200.3215 24926.9812 101 24406.2101 -6200.3215 102 -156.3583 24406.2101 103 -22090.4847 -156.3583 104 7755.6828 -22090.4847 105 14866.0148 7755.6828 106 8625.6670 14866.0148 107 3233.9506 8625.6670 108 -27831.4559 3233.9506 109 -32030.0992 -27831.4559 110 24441.9679 -32030.0992 111 4248.6617 24441.9679 112 -7485.3572 4248.6617 113 3441.0732 -7485.3572 114 -5304.0589 3441.0732 115 -13992.3028 -5304.0589 116 61324.2684 -13992.3028 117 -6426.7914 61324.2684 118 4292.8171 -6426.7914 119 -8629.3325 4292.8171 120 16260.9909 -8629.3325 121 -25998.4199 16260.9909 122 -41150.8664 -25998.4199 123 -23518.4716 -41150.8664 124 -8466.4329 -23518.4716 125 -9580.1825 -8466.4329 126 18106.0526 -9580.1825 127 21391.5619 18106.0526 128 25618.1332 21391.5619 129 36223.8987 25618.1332 130 7795.0227 36223.8987 131 21510.1201 7795.0227 132 5670.1965 21510.1201 133 -26963.9228 5670.1965 134 -10604.4146 -26963.9228 135 -47042.0470 -10604.4146 136 -32705.2758 -47042.0470 137 -19135.0382 -32705.2758 138 42040.7004 -19135.0382 139 -847.8134 42040.7004 140 -39412.3653 -847.8134 141 -24230.2240 -39412.3653 142 2374.8262 -24230.2240 143 -69022.1777 2374.8262 144 1538.2157 -69022.1777 145 -45811.6224 1538.2157 146 -9509.0125 -45811.6224 147 4173.6684 -9509.0125 148 -2572.0826 4173.6684 149 2104.9550 -2572.0826 150 35442.9373 2104.9550 151 -2362.8916 35442.9373 152 3149.4704 -2362.8916 153 158.9402 3149.4704 154 -23346.6652 158.9402 155 -15861.3422 -23346.6652 156 NA -15861.3422 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 39260.5857 29070.5593 [2,] 6324.0299 39260.5857 [3,] -21727.0464 6324.0299 [4,] 15027.9650 -21727.0464 [5,] -3501.6655 15027.9650 [6,] 21469.2023 -3501.6655 [7,] -16456.8838 21469.2023 [8,] -23151.2450 -16456.8838 [9,] 6437.1952 -23151.2450 [10,] 40294.0756 6437.1952 [11,] -11989.8753 40294.0756 [12,] -5632.4514 -11989.8753 [13,] -6566.1473 -5632.4514 [14,] 11369.9468 -6566.1473 [15,] -7252.0277 11369.9468 [16,] 12529.6197 -7252.0277 [17,] -21944.3429 12529.6197 [18,] 9836.1118 -21944.3429 [19,] -9757.0523 9836.1118 [20,] 11964.7965 -9757.0523 [21,] 19026.4860 11964.7965 [22,] 5674.9448 19026.4860 [23,] -6500.1814 5674.9448 [24,] -18991.1661 -6500.1814 [25,] -5597.3917 -18991.1661 [26,] 6196.8615 -5597.3917 [27,] 28377.2697 6196.8615 [28,] -580.5607 28377.2697 [29,] 38050.4574 -580.5607 [30,] 27869.0794 38050.4574 [31,] -6484.2538 27869.0794 [32,] 49716.8395 -6484.2538 [33,] -22342.6303 49716.8395 [34,] 48914.6929 -22342.6303 [35,] -1176.6279 48914.6929 [36,] 43584.9055 -1176.6279 [37,] 10847.1885 43584.9055 [38,] 10585.8058 10847.1885 [39,] 12785.9047 10585.8058 [40,] 7256.0576 12785.9047 [41,] -7741.2565 7256.0576 [42,] 31571.4039 -7741.2565 [43,] -13087.1408 31571.4039 [44,] -22954.3580 -13087.1408 [45,] -75809.5999 -22954.3580 [46,] 11670.9833 -75809.5999 [47,] -2048.9083 11670.9833 [48,] -17455.0157 -2048.9083 [49,] -1705.0022 -17455.0157 [50,] 18707.7066 -1705.0022 [51,] -3830.7560 18707.7066 [52,] 16671.5146 -3830.7560 [53,] -14877.2234 16671.5146 [54,] -4182.2665 -14877.2234 [55,] 4265.7390 -4182.2665 [56,] 737.8728 4265.7390 [57,] 8281.5726 737.8728 [58,] 43312.9564 8281.5726 [59,] -18594.7925 43312.9564 [60,] 17076.1480 -18594.7925 [61,] 22282.1808 17076.1480 [62,] -12783.7254 22282.1808 [63,] -14071.1509 -12783.7254 [64,] 31603.5135 -14071.1509 [65,] 28871.7004 31603.5135 [66,] -22742.9915 28871.7004 [67,] -5778.5451 -22742.9915 [68,] -9403.8139 -5778.5451 [69,] 2071.9510 -9403.8139 [70,] -8358.8185 2071.9510 [71,] -14106.5665 -8358.8185 [72,] 2337.6392 -14106.5665 [73,] -5633.3673 2337.6392 [74,] -6344.3853 -5633.3673 [75,] 1742.0241 -6344.3853 [76,] 30935.4198 1742.0241 [77,] -65937.7533 30935.4198 [78,] -3220.3968 -65937.7533 [79,] -7864.8980 -3220.3968 [80,] -5049.1736 -7864.8980 [81,] -12902.8679 -5049.1736 [82,] 10348.4146 -12902.8679 [83,] 3241.9427 10348.4146 [84,] -442.3097 3241.9427 [85,] -27043.5672 -442.3097 [86,] -9608.0830 -27043.5672 [87,] -24546.3537 -9608.0830 [88,] 34105.1816 -24546.3537 [89,] -51693.7617 34105.1816 [90,] 10852.3156 -51693.7617 [91,] 2409.4449 10852.3156 [92,] -9142.2546 2409.4449 [93,] -16373.7980 -9142.2546 [94,] 652.0354 -16373.7980 [95,] 358.3841 652.0354 [96,] 14181.7612 358.3841 [97,] 29332.1180 14181.7612 [98,] -1941.2080 29332.1180 [99,] 24926.9812 -1941.2080 [100,] -6200.3215 24926.9812 [101,] 24406.2101 -6200.3215 [102,] -156.3583 24406.2101 [103,] -22090.4847 -156.3583 [104,] 7755.6828 -22090.4847 [105,] 14866.0148 7755.6828 [106,] 8625.6670 14866.0148 [107,] 3233.9506 8625.6670 [108,] -27831.4559 3233.9506 [109,] -32030.0992 -27831.4559 [110,] 24441.9679 -32030.0992 [111,] 4248.6617 24441.9679 [112,] -7485.3572 4248.6617 [113,] 3441.0732 -7485.3572 [114,] -5304.0589 3441.0732 [115,] -13992.3028 -5304.0589 [116,] 61324.2684 -13992.3028 [117,] -6426.7914 61324.2684 [118,] 4292.8171 -6426.7914 [119,] -8629.3325 4292.8171 [120,] 16260.9909 -8629.3325 [121,] -25998.4199 16260.9909 [122,] -41150.8664 -25998.4199 [123,] -23518.4716 -41150.8664 [124,] -8466.4329 -23518.4716 [125,] -9580.1825 -8466.4329 [126,] 18106.0526 -9580.1825 [127,] 21391.5619 18106.0526 [128,] 25618.1332 21391.5619 [129,] 36223.8987 25618.1332 [130,] 7795.0227 36223.8987 [131,] 21510.1201 7795.0227 [132,] 5670.1965 21510.1201 [133,] -26963.9228 5670.1965 [134,] -10604.4146 -26963.9228 [135,] -47042.0470 -10604.4146 [136,] -32705.2758 -47042.0470 [137,] -19135.0382 -32705.2758 [138,] 42040.7004 -19135.0382 [139,] -847.8134 42040.7004 [140,] -39412.3653 -847.8134 [141,] -24230.2240 -39412.3653 [142,] 2374.8262 -24230.2240 [143,] -69022.1777 2374.8262 [144,] 1538.2157 -69022.1777 [145,] -45811.6224 1538.2157 [146,] -9509.0125 -45811.6224 [147,] 4173.6684 -9509.0125 [148,] -2572.0826 4173.6684 [149,] 2104.9550 -2572.0826 [150,] 35442.9373 2104.9550 [151,] -2362.8916 35442.9373 [152,] 3149.4704 -2362.8916 [153,] 158.9402 3149.4704 [154,] -23346.6652 158.9402 [155,] -15861.3422 -23346.6652 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 39260.5857 29070.5593 2 6324.0299 39260.5857 3 -21727.0464 6324.0299 4 15027.9650 -21727.0464 5 -3501.6655 15027.9650 6 21469.2023 -3501.6655 7 -16456.8838 21469.2023 8 -23151.2450 -16456.8838 9 6437.1952 -23151.2450 10 40294.0756 6437.1952 11 -11989.8753 40294.0756 12 -5632.4514 -11989.8753 13 -6566.1473 -5632.4514 14 11369.9468 -6566.1473 15 -7252.0277 11369.9468 16 12529.6197 -7252.0277 17 -21944.3429 12529.6197 18 9836.1118 -21944.3429 19 -9757.0523 9836.1118 20 11964.7965 -9757.0523 21 19026.4860 11964.7965 22 5674.9448 19026.4860 23 -6500.1814 5674.9448 24 -18991.1661 -6500.1814 25 -5597.3917 -18991.1661 26 6196.8615 -5597.3917 27 28377.2697 6196.8615 28 -580.5607 28377.2697 29 38050.4574 -580.5607 30 27869.0794 38050.4574 31 -6484.2538 27869.0794 32 49716.8395 -6484.2538 33 -22342.6303 49716.8395 34 48914.6929 -22342.6303 35 -1176.6279 48914.6929 36 43584.9055 -1176.6279 37 10847.1885 43584.9055 38 10585.8058 10847.1885 39 12785.9047 10585.8058 40 7256.0576 12785.9047 41 -7741.2565 7256.0576 42 31571.4039 -7741.2565 43 -13087.1408 31571.4039 44 -22954.3580 -13087.1408 45 -75809.5999 -22954.3580 46 11670.9833 -75809.5999 47 -2048.9083 11670.9833 48 -17455.0157 -2048.9083 49 -1705.0022 -17455.0157 50 18707.7066 -1705.0022 51 -3830.7560 18707.7066 52 16671.5146 -3830.7560 53 -14877.2234 16671.5146 54 -4182.2665 -14877.2234 55 4265.7390 -4182.2665 56 737.8728 4265.7390 57 8281.5726 737.8728 58 43312.9564 8281.5726 59 -18594.7925 43312.9564 60 17076.1480 -18594.7925 61 22282.1808 17076.1480 62 -12783.7254 22282.1808 63 -14071.1509 -12783.7254 64 31603.5135 -14071.1509 65 28871.7004 31603.5135 66 -22742.9915 28871.7004 67 -5778.5451 -22742.9915 68 -9403.8139 -5778.5451 69 2071.9510 -9403.8139 70 -8358.8185 2071.9510 71 -14106.5665 -8358.8185 72 2337.6392 -14106.5665 73 -5633.3673 2337.6392 74 -6344.3853 -5633.3673 75 1742.0241 -6344.3853 76 30935.4198 1742.0241 77 -65937.7533 30935.4198 78 -3220.3968 -65937.7533 79 -7864.8980 -3220.3968 80 -5049.1736 -7864.8980 81 -12902.8679 -5049.1736 82 10348.4146 -12902.8679 83 3241.9427 10348.4146 84 -442.3097 3241.9427 85 -27043.5672 -442.3097 86 -9608.0830 -27043.5672 87 -24546.3537 -9608.0830 88 34105.1816 -24546.3537 89 -51693.7617 34105.1816 90 10852.3156 -51693.7617 91 2409.4449 10852.3156 92 -9142.2546 2409.4449 93 -16373.7980 -9142.2546 94 652.0354 -16373.7980 95 358.3841 652.0354 96 14181.7612 358.3841 97 29332.1180 14181.7612 98 -1941.2080 29332.1180 99 24926.9812 -1941.2080 100 -6200.3215 24926.9812 101 24406.2101 -6200.3215 102 -156.3583 24406.2101 103 -22090.4847 -156.3583 104 7755.6828 -22090.4847 105 14866.0148 7755.6828 106 8625.6670 14866.0148 107 3233.9506 8625.6670 108 -27831.4559 3233.9506 109 -32030.0992 -27831.4559 110 24441.9679 -32030.0992 111 4248.6617 24441.9679 112 -7485.3572 4248.6617 113 3441.0732 -7485.3572 114 -5304.0589 3441.0732 115 -13992.3028 -5304.0589 116 61324.2684 -13992.3028 117 -6426.7914 61324.2684 118 4292.8171 -6426.7914 119 -8629.3325 4292.8171 120 16260.9909 -8629.3325 121 -25998.4199 16260.9909 122 -41150.8664 -25998.4199 123 -23518.4716 -41150.8664 124 -8466.4329 -23518.4716 125 -9580.1825 -8466.4329 126 18106.0526 -9580.1825 127 21391.5619 18106.0526 128 25618.1332 21391.5619 129 36223.8987 25618.1332 130 7795.0227 36223.8987 131 21510.1201 7795.0227 132 5670.1965 21510.1201 133 -26963.9228 5670.1965 134 -10604.4146 -26963.9228 135 -47042.0470 -10604.4146 136 -32705.2758 -47042.0470 137 -19135.0382 -32705.2758 138 42040.7004 -19135.0382 139 -847.8134 42040.7004 140 -39412.3653 -847.8134 141 -24230.2240 -39412.3653 142 2374.8262 -24230.2240 143 -69022.1777 2374.8262 144 1538.2157 -69022.1777 145 -45811.6224 1538.2157 146 -9509.0125 -45811.6224 147 4173.6684 -9509.0125 148 -2572.0826 4173.6684 149 2104.9550 -2572.0826 150 35442.9373 2104.9550 151 -2362.8916 35442.9373 152 3149.4704 -2362.8916 153 158.9402 3149.4704 154 -23346.6652 158.9402 155 -15861.3422 -23346.6652 > 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/wessaorg/rcomp/tmp/7rggy1321974063.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/wessaorg/rcomp/tmp/8hsng1321974063.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/wessaorg/rcomp/tmp/9zznk1321974063.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/wessaorg/rcomp/tmp/10fx961321974063.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/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, '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/wessaorg/rcomp/tmp/11q3hu1321974063.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/wessaorg/rcomp/tmp/12wt2e1321974063.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/wessaorg/rcomp/tmp/139f1o1321974063.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/wessaorg/rcomp/tmp/14bok31321974063.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/wessaorg/rcomp/tmp/15411m1321974063.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/wessaorg/rcomp/tmp/16tp2t1321974063.tab") + } > > try(system("convert tmp/1z7b61321974063.ps tmp/1z7b61321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/2kgao1321974063.ps tmp/2kgao1321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/3rttb1321974063.ps tmp/3rttb1321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/43tb71321974063.ps tmp/43tb71321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/5hfdm1321974063.ps tmp/5hfdm1321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/6ewmw1321974063.ps tmp/6ewmw1321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/7rggy1321974063.ps tmp/7rggy1321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/8hsng1321974063.ps tmp/8hsng1321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/9zznk1321974063.ps tmp/9zznk1321974063.png",intern=TRUE)) character(0) > try(system("convert tmp/10fx961321974063.ps tmp/10fx961321974063.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.676 0.505 5.275