R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(1687 + ,0 + ,-183.9235445 + ,1508 + ,0 + ,-177.0726091 + ,1507 + ,0 + ,-228.6351091 + ,1385 + ,0 + ,-237.4476091 + ,1632 + ,0 + ,-127.7601091 + ,1511 + ,0 + ,-193.0101091 + ,1559 + ,0 + ,-220.6351091 + ,1630 + ,0 + ,-164.5101091 + ,1579 + ,0 + ,-268.3226091 + ,1653 + ,0 + ,-333.6976091 + ,2152 + ,0 + ,-34.26010911 + ,2148 + ,0 + ,-154.8851091 + ,1752 + ,0 + ,-97.74528053 + ,1765 + ,0 + ,101.1056549 + ,1717 + ,0 + ,2.543154874 + ,1558 + ,0 + ,-43.26934513 + ,1575 + ,0 + ,-163.5818451 + ,1520 + ,0 + ,-162.8318451 + ,1805 + ,0 + ,46.54315487 + ,1800 + ,0 + ,26.66815487 + ,1719 + ,0 + ,-107.1443451 + ,2008 + ,0 + ,42.48065487 + ,2242 + ,0 + ,76.91815487 + ,2478 + ,0 + ,196.2931549 + ,2030 + ,0 + ,201.4329835 + ,1655 + ,0 + ,12.28391886 + ,1693 + ,0 + ,-0.278581137 + ,1623 + ,0 + ,42.90891886 + ,1805 + ,0 + ,87.59641886 + ,1746 + ,0 + ,84.34641886 + ,1795 + ,0 + ,57.72141886 + ,1926 + ,0 + ,173.8464189 + ,1619 + ,0 + ,-185.9660811 + ,1992 + ,0 + ,47.65891886 + ,2233 + ,0 + ,89.09641886 + ,2192 + ,0 + ,-68.52858114 + ,2080 + ,0 + ,272.6112475 + ,1768 + ,0 + ,146.4621829 + ,1835 + ,0 + ,162.8996829 + ,1569 + ,0 + ,10.08718285 + ,1976 + ,0 + ,279.7746829 + ,1853 + ,0 + ,212.5246829 + ,1965 + ,0 + ,248.8996829 + ,1689 + ,0 + ,-41.97531715 + ,1778 + ,0 + ,-5.787817149 + ,1976 + ,0 + ,52.83718285 + ,2397 + ,0 + ,274.2746829 + ,2654 + ,0 + ,414.6496829 + ,2097 + ,0 + ,310.7895114 + ,1963 + ,0 + ,362.6404468 + ,1677 + ,0 + ,26.07794684 + ,1941 + ,0 + ,403.2654468 + ,2003 + ,0 + ,327.9529468 + ,1813 + ,0 + ,193.7029468 + ,2012 + ,0 + ,317.0779468 + ,1912 + ,0 + ,202.2029468 + ,2084 + ,0 + ,321.3904468 + ,2080 + ,0 + ,178.0154468 + ,2118 + ,0 + ,16.45294684 + ,2150 + ,0 + ,-68.17205316 + ,1608 + ,0 + ,-157.0322246 + ,1503 + ,0 + ,-76.18128917 + ,1548 + ,0 + ,-81.74378917 + ,1382 + ,0 + ,-134.5562892 + ,1731 + ,0 + ,77.13121083 + ,1798 + ,0 + ,199.8812108 + ,1779 + ,0 + ,105.2562108 + ,1887 + ,0 + ,198.3812108 + ,2004 + ,0 + ,262.5687108 + ,2077 + ,0 + ,196.1937108 + ,2092 + ,0 + ,11.63121083 + ,2051 + ,0 + ,-145.9937892 + ,1577 + ,0 + ,-166.8539606 + ,1356 + ,0 + ,-202.0030252 + ,1652 + ,0 + ,43.43447482 + ,1382 + ,0 + ,-113.3780252 + ,1519 + ,0 + ,-113.6905252 + ,1421 + ,0 + ,-155.9405252 + ,1442 + ,0 + ,-210.5655252 + ,1543 + ,0 + ,-124.4405252 + ,1656 + ,0 + ,-64.25302518 + ,1561 + ,0 + ,-298.6280252 + ,1905 + ,0 + ,-154.1905252 + ,2199 + ,0 + ,23.18447482 + ,1473 + ,0 + ,-249.6756966 + ,1655 + ,0 + ,118.1752388 + ,1407 + ,0 + ,-180.3872612 + ,1395 + ,0 + ,-79.19976119 + ,1530 + ,0 + ,-81.51226119 + ,1309 + ,0 + ,-246.7622612 + ,1526 + ,0 + ,-105.3872612 + ,1327 + ,0 + ,-319.2622612 + ,1627 + ,0 + ,-72.07476119 + ,1748 + ,0 + ,-90.44976119 + ,1958 + ,0 + ,-80.01226119 + ,2274 + ,0 + ,119.3627388 + ,1648 + ,0 + ,-53.49743261 + ,1401 + ,0 + ,-114.6464972 + ,1411 + ,0 + ,-155.2089972 + ,1403 + ,0 + ,-50.02149721 + ,1394 + ,0 + ,-196.3339972 + ,1520 + ,0 + ,-14.58399721 + ,1528 + ,0 + ,-82.20899721 + ,1643 + ,0 + ,17.91600279 + ,1515 + ,0 + ,-162.8964972 + ,1685 + ,0 + ,-132.2714972 + ,2000 + ,0 + ,-16.83399721 + ,2215 + ,0 + ,81.54100279 + ,1956 + ,0 + ,275.6808314 + ,1462 + ,0 + ,-32.46823322 + ,1563 + ,0 + ,17.96926678 + ,1459 + ,0 + ,27.15676678 + ,1446 + ,0 + ,-123.1557332 + ,1622 + ,0 + ,108.5942668 + ,1657 + ,0 + ,67.96926678 + ,1638 + ,0 + ,34.09426678 + ,1643 + ,0 + ,-13.71823322 + ,1683 + ,0 + ,-113.0932332 + ,2050 + ,0 + ,54.34426678 + ,2262 + ,0 + ,149.7192668 + ,1813 + ,0 + ,153.8590954 + ,1445 + ,0 + ,-28.28996923 + ,1762 + ,0 + ,238.1475308 + ,1461 + ,0 + ,50.33503077 + ,1556 + ,0 + ,8.022530771 + ,1431 + ,0 + ,-61.22746923 + ,1427 + ,0 + ,-140.8524692 + ,1554 + ,0 + ,-28.72746923 + ,1645 + ,0 + ,9.460030771 + ,1653 + ,0 + ,-121.9149692 + ,2016 + ,0 + ,41.52253077 + ,2207 + ,0 + ,115.8975308 + ,1665 + ,0 + ,27.03735936 + ,1361 + ,0 + ,-91.11170524 + ,1506 + ,0 + ,3.325794759 + ,1360 + ,0 + ,-29.48670524 + ,1453 + ,0 + ,-73.79920524 + ,1522 + ,0 + ,50.95079476 + ,1460 + ,0 + ,-86.67420524 + ,1552 + ,0 + ,-9.54920524 + ,1548 + ,0 + ,-66.36170524 + ,1827 + ,0 + ,73.26329476 + ,1737 + ,0 + ,-216.2992052 + ,1941 + ,0 + ,-128.9242052 + ,1474 + ,0 + ,-142.7843767 + ,1458 + ,0 + ,27.06655875 + ,1542 + ,0 + ,60.50405875 + ,1404 + ,0 + ,35.69155875 + ,1522 + ,0 + ,16.37905875 + ,1385 + ,0 + ,-64.87094125 + ,1641 + ,0 + ,115.5040587 + ,1510 + ,0 + ,-30.37094125 + ,1681 + ,0 + ,87.81655875 + ,1938 + ,0 + ,205.4415587 + ,1868 + ,0 + ,-64.12094125 + ,1726 + ,0 + ,-322.7459413 + ,1456 + ,0 + ,-139.6061127 + ,1445 + ,0 + ,35.24482274 + ,1456 + ,0 + ,-4.317677263 + ,1365 + ,0 + ,17.86982274 + ,1487 + ,0 + ,2.557322737 + ,1558 + ,0 + ,129.3073227 + ,1488 + ,0 + ,-16.31767726 + ,1684 + ,0 + ,164.8073227 + ,1594 + ,0 + ,21.99482274 + ,1850 + ,0 + ,138.6198227 + ,1998 + ,0 + ,87.05732274 + ,2079 + ,0 + ,51.43232274 + ,1494 + ,0 + ,-80.42784867 + ,1057 + ,1 + ,-105.1918797 + ,1218 + ,1 + ,5.245620328 + ,1168 + ,1 + ,68.43312033 + ,1236 + ,1 + ,-0.879379672 + ,1076 + ,1 + ,-105.1293797 + ,1174 + ,1 + ,-82.75437967 + ,1139 + ,1 + ,-132.6293797 + ,1427 + ,1 + ,102.5581203 + ,1487 + ,1 + ,23.18312033 + ,1483 + ,1 + ,-180.3793797 + ,1513 + ,1 + ,-267.0043797 + ,1357 + ,1 + ,30.13544892 + ,1165 + ,1 + ,23.98638432 + ,1282 + ,1 + ,90.42388432 + ,1110 + ,1 + ,31.61138432 + ,1297 + ,1 + ,81.29888432 + ,1185 + ,1 + ,25.04888432 + ,1222 + ,1 + ,-13.57611568 + ,1284 + ,1 + ,33.54888432 + ,1444 + ,1 + ,140.7363843 + ,1575 + ,1 + ,132.3613843 + ,1737 + ,1 + ,94.79888432 + ,1763 + ,1 + ,4.173884316) + ,dim=c(3 + ,192) + ,dimnames=list(c('voor' + ,'na' + ,'res') + ,1:192)) > y <- array(NA,dim=c(3,192),dimnames=list(c('voor','na','res'),1:192)) > 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 Attaching package: 'zoo' The following object(s) are masked from package:base : 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 voor na res 1 1687 0 -183.9235445 2 1508 0 -177.0726091 3 1507 0 -228.6351091 4 1385 0 -237.4476091 5 1632 0 -127.7601091 6 1511 0 -193.0101091 7 1559 0 -220.6351091 8 1630 0 -164.5101091 9 1579 0 -268.3226091 10 1653 0 -333.6976091 11 2152 0 -34.2601091 12 2148 0 -154.8851091 13 1752 0 -97.7452805 14 1765 0 101.1056549 15 1717 0 2.5431549 16 1558 0 -43.2693451 17 1575 0 -163.5818451 18 1520 0 -162.8318451 19 1805 0 46.5431549 20 1800 0 26.6681549 21 1719 0 -107.1443451 22 2008 0 42.4806549 23 2242 0 76.9181549 24 2478 0 196.2931549 25 2030 0 201.4329835 26 1655 0 12.2839189 27 1693 0 -0.2785811 28 1623 0 42.9089189 29 1805 0 87.5964189 30 1746 0 84.3464189 31 1795 0 57.7214189 32 1926 0 173.8464189 33 1619 0 -185.9660811 34 1992 0 47.6589189 35 2233 0 89.0964189 36 2192 0 -68.5285811 37 2080 0 272.6112475 38 1768 0 146.4621829 39 1835 0 162.8996829 40 1569 0 10.0871828 41 1976 0 279.7746829 42 1853 0 212.5246829 43 1965 0 248.8996829 44 1689 0 -41.9753172 45 1778 0 -5.7878171 46 1976 0 52.8371828 47 2397 0 274.2746829 48 2654 0 414.6496829 49 2097 0 310.7895114 50 1963 0 362.6404468 51 1677 0 26.0779468 52 1941 0 403.2654468 53 2003 0 327.9529468 54 1813 0 193.7029468 55 2012 0 317.0779468 56 1912 0 202.2029468 57 2084 0 321.3904468 58 2080 0 178.0154468 59 2118 0 16.4529468 60 2150 0 -68.1720532 61 1608 0 -157.0322246 62 1503 0 -76.1812892 63 1548 0 -81.7437892 64 1382 0 -134.5562892 65 1731 0 77.1312108 66 1798 0 199.8812108 67 1779 0 105.2562108 68 1887 0 198.3812108 69 2004 0 262.5687108 70 2077 0 196.1937108 71 2092 0 11.6312108 72 2051 0 -145.9937892 73 1577 0 -166.8539606 74 1356 0 -202.0030252 75 1652 0 43.4344748 76 1382 0 -113.3780252 77 1519 0 -113.6905252 78 1421 0 -155.9405252 79 1442 0 -210.5655252 80 1543 0 -124.4405252 81 1656 0 -64.2530252 82 1561 0 -298.6280252 83 1905 0 -154.1905252 84 2199 0 23.1844748 85 1473 0 -249.6756966 86 1655 0 118.1752388 87 1407 0 -180.3872612 88 1395 0 -79.1997612 89 1530 0 -81.5122612 90 1309 0 -246.7622612 91 1526 0 -105.3872612 92 1327 0 -319.2622612 93 1627 0 -72.0747612 94 1748 0 -90.4497612 95 1958 0 -80.0122612 96 2274 0 119.3627388 97 1648 0 -53.4974326 98 1401 0 -114.6464972 99 1411 0 -155.2089972 100 1403 0 -50.0214972 101 1394 0 -196.3339972 102 1520 0 -14.5839972 103 1528 0 -82.2089972 104 1643 0 17.9160028 105 1515 0 -162.8964972 106 1685 0 -132.2714972 107 2000 0 -16.8339972 108 2215 0 81.5410028 109 1956 0 275.6808314 110 1462 0 -32.4682332 111 1563 0 17.9692668 112 1459 0 27.1567668 113 1446 0 -123.1557332 114 1622 0 108.5942668 115 1657 0 67.9692668 116 1638 0 34.0942668 117 1643 0 -13.7182332 118 1683 0 -113.0932332 119 2050 0 54.3442668 120 2262 0 149.7192668 121 1813 0 153.8590954 122 1445 0 -28.2899692 123 1762 0 238.1475308 124 1461 0 50.3350308 125 1556 0 8.0225308 126 1431 0 -61.2274692 127 1427 0 -140.8524692 128 1554 0 -28.7274692 129 1645 0 9.4600308 130 1653 0 -121.9149692 131 2016 0 41.5225308 132 2207 0 115.8975308 133 1665 0 27.0373594 134 1361 0 -91.1117052 135 1506 0 3.3257948 136 1360 0 -29.4867052 137 1453 0 -73.7992052 138 1522 0 50.9507948 139 1460 0 -86.6742052 140 1552 0 -9.5492052 141 1548 0 -66.3617052 142 1827 0 73.2632948 143 1737 0 -216.2992052 144 1941 0 -128.9242052 145 1474 0 -142.7843767 146 1458 0 27.0665587 147 1542 0 60.5040587 148 1404 0 35.6915587 149 1522 0 16.3790587 150 1385 0 -64.8709413 151 1641 0 115.5040587 152 1510 0 -30.3709413 153 1681 0 87.8165587 154 1938 0 205.4415587 155 1868 0 -64.1209413 156 1726 0 -322.7459413 157 1456 0 -139.6061127 158 1445 0 35.2448227 159 1456 0 -4.3176773 160 1365 0 17.8698227 161 1487 0 2.5573227 162 1558 0 129.3073227 163 1488 0 -16.3176773 164 1684 0 164.8073227 165 1594 0 21.9948227 166 1850 0 138.6198227 167 1998 0 87.0573227 168 2079 0 51.4323227 169 1494 0 -80.4278487 170 1057 1 -105.1918797 171 1218 1 5.2456203 172 1168 1 68.4331203 173 1236 1 -0.8793797 174 1076 1 -105.1293797 175 1174 1 -82.7543797 176 1139 1 -132.6293797 177 1427 1 102.5581203 178 1487 1 23.1831203 179 1483 1 -180.3793797 180 1513 1 -267.0043797 181 1357 1 30.1354489 182 1165 1 23.9863843 183 1282 1 90.4238843 184 1110 1 31.6113843 185 1297 1 81.2988843 186 1185 1 25.0488843 187 1222 1 -13.5761157 188 1284 1 33.5488843 189 1444 1 140.7363843 190 1575 1 132.3613843 191 1737 1 94.7988843 192 1763 1 4.1738843 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) na res 1717.8 -396.1 1.0 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -370.62 -148.92 -52.08 92.11 585.13 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1717.7515 16.5127 104.026 < 2e-16 *** na -396.0558 47.7094 -8.301 1.93e-14 *** res 1.0000 0.1056 9.473 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 214.7 on 189 degrees of freedom Multiple R-squared: 0.4564, Adjusted R-squared: 0.4506 F-statistic: 79.33 on 2 and 189 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.10456325 0.20912650 0.8954367 [2,] 0.04861959 0.09723917 0.9513804 [3,] 0.01817950 0.03635901 0.9818205 [4,] 0.01597835 0.03195670 0.9840217 [5,] 0.01924239 0.03848478 0.9807576 [6,] 0.21972382 0.43944765 0.7802762 [7,] 0.57118083 0.85763833 0.4288192 [8,] 0.49198944 0.98397888 0.5080106 [9,] 0.55321826 0.89356347 0.4467817 [10,] 0.49071934 0.98143869 0.5092807 [11,] 0.48339463 0.96678926 0.5166054 [12,] 0.41309956 0.82619911 0.5869004 [13,] 0.36388383 0.72776766 0.6361162 [14,] 0.29332935 0.58665869 0.7066707 [15,] 0.23115214 0.46230429 0.7688479 [16,] 0.18001660 0.36003320 0.8199834 [17,] 0.17454648 0.34909295 0.8254535 [18,] 0.28217187 0.56434374 0.7178281 [19,] 0.43410538 0.86821077 0.5658946 [20,] 0.39598673 0.79197347 0.6040133 [21,] 0.40318406 0.80636812 0.5968159 [22,] 0.37642697 0.75285393 0.6235730 [23,] 0.41281106 0.82562212 0.5871889 [24,] 0.37529115 0.75058231 0.6247088 [25,] 0.35479826 0.70959652 0.6452017 [26,] 0.30942197 0.61884393 0.6905780 [27,] 0.26581977 0.53163953 0.7341802 [28,] 0.22183970 0.44367940 0.7781603 [29,] 0.20151441 0.40302882 0.7984856 [30,] 0.27341465 0.54682930 0.7265854 [31,] 0.47962437 0.95924875 0.5203756 [32,] 0.43319218 0.86638436 0.5668078 [33,] 0.43371227 0.86742455 0.5662877 [34,] 0.40824354 0.81648707 0.5917565 [35,] 0.42752094 0.85504187 0.5724791 [36,] 0.39004710 0.78009420 0.6099529 [37,] 0.36565041 0.73130082 0.6343496 [38,] 0.32317167 0.64634334 0.6768283 [39,] 0.28409899 0.56819797 0.7159010 [40,] 0.24468719 0.48937437 0.7553128 [41,] 0.22666590 0.45333180 0.7733341 [42,] 0.30179618 0.60359237 0.6982038 [43,] 0.46533373 0.93066745 0.5346663 [44,] 0.42734943 0.85469887 0.5726506 [45,] 0.43452067 0.86904135 0.5654793 [46,] 0.41090046 0.82180092 0.5890995 [47,] 0.43378152 0.86756304 0.5662185 [48,] 0.40089803 0.80179607 0.5991020 [49,] 0.38167719 0.76335438 0.6183228 [50,] 0.34477761 0.68955522 0.6552224 [51,] 0.30815429 0.61630857 0.6918457 [52,] 0.27189704 0.54379407 0.7281030 [53,] 0.25657121 0.51314241 0.7434288 [54,] 0.32443033 0.64886066 0.6755697 [55,] 0.48763467 0.97526934 0.5123653 [56,] 0.44828290 0.89656580 0.5517171 [57,] 0.44896321 0.89792642 0.5510368 [58,] 0.43019460 0.86038919 0.5698054 [59,] 0.45652560 0.91305120 0.5434744 [60,] 0.42737957 0.85475915 0.5726204 [61,] 0.40998884 0.81997767 0.5900112 [62,] 0.37707283 0.75414565 0.6229272 [63,] 0.34271291 0.68542582 0.6572871 [64,] 0.30820580 0.61641160 0.6917942 [65,] 0.29498449 0.58996898 0.7050155 [66,] 0.36257418 0.72514836 0.6374258 [67,] 0.51204616 0.97590769 0.4879538 [68,] 0.47485639 0.94971277 0.5251436 [69,] 0.48139521 0.96279041 0.5186048 [70,] 0.46159708 0.92319417 0.5384029 [71,] 0.48900573 0.97801145 0.5109943 [72,] 0.46356669 0.92713337 0.5364333 [73,] 0.45367431 0.90734862 0.5463257 [74,] 0.42346990 0.84693980 0.5765301 [75,] 0.39039663 0.78079326 0.6096034 [76,] 0.35377141 0.70754282 0.6462286 [77,] 0.32679314 0.65358628 0.6732069 [78,] 0.38395960 0.76791919 0.6160404 [79,] 0.54621894 0.90756211 0.4537811 [80,] 0.50851985 0.98296029 0.4914801 [81,] 0.50519967 0.98960066 0.4948003 [82,] 0.48865656 0.97731312 0.5113434 [83,] 0.51307677 0.97384646 0.4869232 [84,] 0.48751930 0.97503861 0.5124807 [85,] 0.47841815 0.95683631 0.5215818 [86,] 0.44796428 0.89592857 0.5520357 [87,] 0.41543273 0.83086546 0.5845673 [88,] 0.37849023 0.75698047 0.6215098 [89,] 0.35475507 0.70951014 0.6452449 [90,] 0.41388812 0.82777623 0.5861119 [91,] 0.58087344 0.83825312 0.4191266 [92,] 0.54443541 0.91112919 0.4555646 [93,] 0.54482904 0.91034191 0.4551710 [94,] 0.52782332 0.94435336 0.4721767 [95,] 0.55272594 0.89454812 0.4472741 [96,] 0.52874167 0.94251666 0.4712583 [97,] 0.51822203 0.96355594 0.4817780 [98,] 0.48822227 0.97644455 0.5117777 [99,] 0.45592291 0.91184581 0.5440771 [100,] 0.41711219 0.83422437 0.5828878 [101,] 0.38860608 0.77721215 0.6113939 [102,] 0.44855753 0.89711506 0.5514425 [103,] 0.61453350 0.77093300 0.3854665 [104,] 0.59076289 0.81847422 0.4092371 [105,] 0.59111344 0.81777311 0.4088866 [106,] 0.57328854 0.85342292 0.4267115 [107,] 0.59662388 0.80675225 0.4033761 [108,] 0.57416484 0.85167032 0.4258352 [109,] 0.56191114 0.87617773 0.4380889 [110,] 0.53187667 0.93624666 0.4681233 [111,] 0.49895572 0.99791145 0.5010443 [112,] 0.46032267 0.92064534 0.5396773 [113,] 0.42867283 0.85734567 0.5713272 [114,] 0.49702129 0.99404259 0.5029787 [115,] 0.68764600 0.62470799 0.3123540 [116,] 0.66151773 0.67696454 0.3384823 [117,] 0.66224920 0.67550161 0.3377508 [118,] 0.64323076 0.71353848 0.3567692 [119,] 0.66187450 0.67625100 0.3381255 [120,] 0.63696499 0.72607002 0.3630350 [121,] 0.63141259 0.73717482 0.3685874 [122,] 0.60818042 0.78363915 0.3918196 [123,] 0.57549607 0.84900786 0.4245039 [124,] 0.53560211 0.92879578 0.4643979 [125,] 0.49737524 0.99475048 0.5026248 [126,] 0.56980125 0.86039751 0.4301988 [127,] 0.76853363 0.46293274 0.2314664 [128,] 0.73764541 0.52470919 0.2623546 [129,] 0.74798297 0.50403406 0.2520170 [130,] 0.73113264 0.53773472 0.2688674 [131,] 0.76017162 0.47965676 0.2398284 [132,] 0.74488490 0.51023021 0.2551151 [133,] 0.73242235 0.53515531 0.2675777 [134,] 0.71277307 0.57445387 0.2872269 [135,] 0.68200328 0.63599344 0.3179967 [136,] 0.64403419 0.71193162 0.3559658 [137,] 0.62461007 0.75077986 0.3753899 [138,] 0.62325258 0.75349484 0.3767474 [139,] 0.72852786 0.54294428 0.2714721 [140,] 0.69145927 0.61708145 0.3085407 [141,] 0.68898163 0.62203675 0.3110184 [142,] 0.66621706 0.66756587 0.3337829 [143,] 0.69392414 0.61215172 0.3060759 [144,] 0.66923864 0.66152272 0.3307614 [145,] 0.67942743 0.64114514 0.3205726 [146,] 0.64323532 0.71352936 0.3567647 [147,] 0.61419011 0.77161977 0.3858099 [148,] 0.56691492 0.86617017 0.4330851 [149,] 0.55842830 0.88314339 0.4415717 [150,] 0.58313942 0.83372115 0.4168606 [151,] 0.63233943 0.73532113 0.3676606 [152,] 0.58462478 0.83075043 0.4153752 [153,] 0.58344712 0.83310576 0.4165529 [154,] 0.56870033 0.86259935 0.4312997 [155,] 0.62809998 0.74380004 0.3719000 [156,] 0.62005003 0.75989994 0.3799500 [157,] 0.62579322 0.74841357 0.3742068 [158,] 0.63686380 0.72627241 0.3631362 [159,] 0.61660907 0.76678186 0.3833909 [160,] 0.61676723 0.76646555 0.3832328 [161,] 0.55946692 0.88106616 0.4405331 [162,] 0.52111156 0.95777688 0.4788884 [163,] 0.64676901 0.70646197 0.3532310 [164,] 0.58446759 0.83106482 0.4155324 [165,] 0.59260881 0.81478237 0.4073912 [166,] 0.54257439 0.91485123 0.4574256 [167,] 0.52579740 0.94840520 0.4742026 [168,] 0.47124310 0.94248621 0.5287569 [169,] 0.49548755 0.99097510 0.5045124 [170,] 0.47308933 0.94617866 0.5269107 [171,] 0.49516020 0.99032040 0.5048398 [172,] 0.41569761 0.83139523 0.5843024 [173,] 0.35385519 0.70771038 0.6461448 [174,] 0.30018329 0.60036658 0.6998167 [175,] 0.36882189 0.73764378 0.6311781 [176,] 0.28037935 0.56075871 0.7196206 [177,] 0.23668982 0.47337965 0.7633102 [178,] 0.18948995 0.37897990 0.8105101 [179,] 0.20829054 0.41658107 0.7917095 [180,] 0.16328371 0.32656743 0.8367163 [181,] 0.15975051 0.31950103 0.8402495 > postscript(file="/var/www/html/rcomp/tmp/139pj1227522315.ps",horizontal=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/www/html/rcomp/tmp/2s9d11227522315.ps",horizontal=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/www/html/rcomp/tmp/3b9gt1227522316.ps",horizontal=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/www/html/rcomp/tmp/4iffi1227522316.ps",horizontal=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/www/html/rcomp/tmp/5jqzu1227522316.ps",horizontal=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 = 192 Frequency = 1 1 2 3 4 5 6 153.1720652 -32.6788702 17.8836298 -95.3038702 42.0086298 -13.7413702 7 8 9 10 11 12 61.8836298 76.7586298 129.5711298 268.9461298 468.5086298 585.1336298 13 14 15 16 17 18 131.9938012 -53.8571342 -3.2946342 -116.4821342 20.8303658 -34.9196342 19 20 21 22 23 24 40.7053658 55.5803658 108.3928658 247.7678658 447.3303658 563.9553658 25 26 27 28 29 30 110.8155372 -75.0353982 -24.4728982 -137.6603982 -0.3478982 -56.0978982 31 32 33 34 35 36 19.5271018 34.4021018 87.2146018 226.5896018 426.1521018 542.7771019 37 38 39 40 41 42 89.6372732 -96.2136622 -45.6511622 -158.8386621 -21.5261622 -77.2761622 43 44 45 46 47 48 -1.6511622 13.2238379 66.0363379 205.4113379 404.9738378 521.5988378 49 50 51 52 53 54 68.4590093 -117.3919261 -66.8294261 -180.0169261 -42.7044261 -98.4544261 55 56 57 58 59 60 -22.8294261 -7.9544261 44.8580739 184.2330739 383.7955739 500.4205739 61 62 63 64 65 66 47.2807453 -138.5701901 -88.0076901 -201.1951901 -63.8826901 -119.6326901 67 68 69 70 71 72 -44.0076901 -29.1326901 23.6798099 163.0548099 362.6173099 479.2423099 73 74 75 76 77 78 26.1024813 -159.7484541 -109.1859541 -222.3734541 -85.0609541 -140.8109541 79 80 81 82 83 84 -65.1859541 -50.3109541 2.5015459 141.8765459 341.4390459 458.0640459 85 86 87 88 89 90 4.9242173 -180.9267181 -130.3642181 -243.5517181 -106.2392181 -161.9892181 91 92 93 94 95 96 -86.3642181 -71.4892181 -18.6767181 120.6982819 320.2607819 436.8857819 97 98 99 100 101 102 -16.2540467 -202.1049821 -151.5424821 -264.7299821 -127.4174821 -183.1674821 103 104 105 106 107 108 -107.5424821 -92.6674821 -39.8549821 99.5200179 299.0825179 415.7075179 109 110 111 112 113 114 -37.4323107 -223.2832461 -172.7207461 -285.9082461 -148.5957461 -204.3457461 115 116 117 118 119 120 -128.7207461 -113.8457461 -61.0332461 78.3417539 277.9042539 394.5292539 121 122 123 124 125 126 -58.6105747 -244.4615101 -193.8990101 -307.0865101 -169.7740101 -225.5240101 127 128 129 130 131 132 -149.8990101 -135.0240101 -82.2115101 57.1634899 256.7259899 373.3509899 133 134 135 136 137 138 -79.7888387 -265.6397740 -215.0772740 -328.2647740 -190.9522740 -246.7022741 139 140 141 142 143 144 -171.0772740 -156.2022740 -103.3897740 35.9852259 235.5477259 352.1727259 145 146 147 148 149 150 -100.9671026 -286.8180380 -236.2555380 -349.4430380 -212.1305380 -267.8805380 151 152 153 154 155 156 -192.2555380 -177.3805380 -124.5680380 14.8069620 214.3694620 330.9944620 157 158 159 160 161 162 -122.1453666 -307.9963020 -257.4338020 -370.6213020 -233.3088020 -289.0588020 163 164 165 166 167 168 -213.4338020 -198.5588020 -145.7463020 -6.3713020 193.1911980 309.8161980 169 170 171 172 173 174 -143.3236306 -159.5037725 -108.9412725 -222.1287725 -84.8162725 -140.5662725 175 176 177 178 179 180 -64.9412725 -50.0662725 2.7462275 142.1212275 341.6837275 458.3087275 181 182 183 184 185 186 5.1688989 -180.6820365 -130.1195365 -243.3070365 -105.9945365 -161.7445365 187 188 189 190 191 192 -86.1195365 -71.2445365 -18.4320365 120.9429635 320.5054635 437.1304635 > postscript(file="/var/www/html/rcomp/tmp/6ll8h1227522316.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 192 Frequency = 1 lag(myerror, k = 1) myerror 0 153.1720652 NA 1 -32.6788702 153.1720652 2 17.8836298 -32.6788702 3 -95.3038702 17.8836298 4 42.0086298 -95.3038702 5 -13.7413702 42.0086298 6 61.8836298 -13.7413702 7 76.7586298 61.8836298 8 129.5711298 76.7586298 9 268.9461298 129.5711298 10 468.5086298 268.9461298 11 585.1336298 468.5086298 12 131.9938012 585.1336298 13 -53.8571342 131.9938012 14 -3.2946342 -53.8571342 15 -116.4821342 -3.2946342 16 20.8303658 -116.4821342 17 -34.9196342 20.8303658 18 40.7053658 -34.9196342 19 55.5803658 40.7053658 20 108.3928658 55.5803658 21 247.7678658 108.3928658 22 447.3303658 247.7678658 23 563.9553658 447.3303658 24 110.8155372 563.9553658 25 -75.0353982 110.8155372 26 -24.4728982 -75.0353982 27 -137.6603982 -24.4728982 28 -0.3478982 -137.6603982 29 -56.0978982 -0.3478982 30 19.5271018 -56.0978982 31 34.4021018 19.5271018 32 87.2146018 34.4021018 33 226.5896018 87.2146018 34 426.1521018 226.5896018 35 542.7771019 426.1521018 36 89.6372732 542.7771019 37 -96.2136622 89.6372732 38 -45.6511622 -96.2136622 39 -158.8386621 -45.6511622 40 -21.5261622 -158.8386621 41 -77.2761622 -21.5261622 42 -1.6511622 -77.2761622 43 13.2238379 -1.6511622 44 66.0363379 13.2238379 45 205.4113379 66.0363379 46 404.9738378 205.4113379 47 521.5988378 404.9738378 48 68.4590093 521.5988378 49 -117.3919261 68.4590093 50 -66.8294261 -117.3919261 51 -180.0169261 -66.8294261 52 -42.7044261 -180.0169261 53 -98.4544261 -42.7044261 54 -22.8294261 -98.4544261 55 -7.9544261 -22.8294261 56 44.8580739 -7.9544261 57 184.2330739 44.8580739 58 383.7955739 184.2330739 59 500.4205739 383.7955739 60 47.2807453 500.4205739 61 -138.5701901 47.2807453 62 -88.0076901 -138.5701901 63 -201.1951901 -88.0076901 64 -63.8826901 -201.1951901 65 -119.6326901 -63.8826901 66 -44.0076901 -119.6326901 67 -29.1326901 -44.0076901 68 23.6798099 -29.1326901 69 163.0548099 23.6798099 70 362.6173099 163.0548099 71 479.2423099 362.6173099 72 26.1024813 479.2423099 73 -159.7484541 26.1024813 74 -109.1859541 -159.7484541 75 -222.3734541 -109.1859541 76 -85.0609541 -222.3734541 77 -140.8109541 -85.0609541 78 -65.1859541 -140.8109541 79 -50.3109541 -65.1859541 80 2.5015459 -50.3109541 81 141.8765459 2.5015459 82 341.4390459 141.8765459 83 458.0640459 341.4390459 84 4.9242173 458.0640459 85 -180.9267181 4.9242173 86 -130.3642181 -180.9267181 87 -243.5517181 -130.3642181 88 -106.2392181 -243.5517181 89 -161.9892181 -106.2392181 90 -86.3642181 -161.9892181 91 -71.4892181 -86.3642181 92 -18.6767181 -71.4892181 93 120.6982819 -18.6767181 94 320.2607819 120.6982819 95 436.8857819 320.2607819 96 -16.2540467 436.8857819 97 -202.1049821 -16.2540467 98 -151.5424821 -202.1049821 99 -264.7299821 -151.5424821 100 -127.4174821 -264.7299821 101 -183.1674821 -127.4174821 102 -107.5424821 -183.1674821 103 -92.6674821 -107.5424821 104 -39.8549821 -92.6674821 105 99.5200179 -39.8549821 106 299.0825179 99.5200179 107 415.7075179 299.0825179 108 -37.4323107 415.7075179 109 -223.2832461 -37.4323107 110 -172.7207461 -223.2832461 111 -285.9082461 -172.7207461 112 -148.5957461 -285.9082461 113 -204.3457461 -148.5957461 114 -128.7207461 -204.3457461 115 -113.8457461 -128.7207461 116 -61.0332461 -113.8457461 117 78.3417539 -61.0332461 118 277.9042539 78.3417539 119 394.5292539 277.9042539 120 -58.6105747 394.5292539 121 -244.4615101 -58.6105747 122 -193.8990101 -244.4615101 123 -307.0865101 -193.8990101 124 -169.7740101 -307.0865101 125 -225.5240101 -169.7740101 126 -149.8990101 -225.5240101 127 -135.0240101 -149.8990101 128 -82.2115101 -135.0240101 129 57.1634899 -82.2115101 130 256.7259899 57.1634899 131 373.3509899 256.7259899 132 -79.7888387 373.3509899 133 -265.6397740 -79.7888387 134 -215.0772740 -265.6397740 135 -328.2647740 -215.0772740 136 -190.9522740 -328.2647740 137 -246.7022741 -190.9522740 138 -171.0772740 -246.7022741 139 -156.2022740 -171.0772740 140 -103.3897740 -156.2022740 141 35.9852259 -103.3897740 142 235.5477259 35.9852259 143 352.1727259 235.5477259 144 -100.9671026 352.1727259 145 -286.8180380 -100.9671026 146 -236.2555380 -286.8180380 147 -349.4430380 -236.2555380 148 -212.1305380 -349.4430380 149 -267.8805380 -212.1305380 150 -192.2555380 -267.8805380 151 -177.3805380 -192.2555380 152 -124.5680380 -177.3805380 153 14.8069620 -124.5680380 154 214.3694620 14.8069620 155 330.9944620 214.3694620 156 -122.1453666 330.9944620 157 -307.9963020 -122.1453666 158 -257.4338020 -307.9963020 159 -370.6213020 -257.4338020 160 -233.3088020 -370.6213020 161 -289.0588020 -233.3088020 162 -213.4338020 -289.0588020 163 -198.5588020 -213.4338020 164 -145.7463020 -198.5588020 165 -6.3713020 -145.7463020 166 193.1911980 -6.3713020 167 309.8161980 193.1911980 168 -143.3236306 309.8161980 169 -159.5037725 -143.3236306 170 -108.9412725 -159.5037725 171 -222.1287725 -108.9412725 172 -84.8162725 -222.1287725 173 -140.5662725 -84.8162725 174 -64.9412725 -140.5662725 175 -50.0662725 -64.9412725 176 2.7462275 -50.0662725 177 142.1212275 2.7462275 178 341.6837275 142.1212275 179 458.3087275 341.6837275 180 5.1688989 458.3087275 181 -180.6820365 5.1688989 182 -130.1195365 -180.6820365 183 -243.3070365 -130.1195365 184 -105.9945365 -243.3070365 185 -161.7445365 -105.9945365 186 -86.1195365 -161.7445365 187 -71.2445365 -86.1195365 188 -18.4320365 -71.2445365 189 120.9429635 -18.4320365 190 320.5054635 120.9429635 191 437.1304635 320.5054635 192 NA 437.1304635 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -32.6788702 153.1720652 [2,] 17.8836298 -32.6788702 [3,] -95.3038702 17.8836298 [4,] 42.0086298 -95.3038702 [5,] -13.7413702 42.0086298 [6,] 61.8836298 -13.7413702 [7,] 76.7586298 61.8836298 [8,] 129.5711298 76.7586298 [9,] 268.9461298 129.5711298 [10,] 468.5086298 268.9461298 [11,] 585.1336298 468.5086298 [12,] 131.9938012 585.1336298 [13,] -53.8571342 131.9938012 [14,] -3.2946342 -53.8571342 [15,] -116.4821342 -3.2946342 [16,] 20.8303658 -116.4821342 [17,] -34.9196342 20.8303658 [18,] 40.7053658 -34.9196342 [19,] 55.5803658 40.7053658 [20,] 108.3928658 55.5803658 [21,] 247.7678658 108.3928658 [22,] 447.3303658 247.7678658 [23,] 563.9553658 447.3303658 [24,] 110.8155372 563.9553658 [25,] -75.0353982 110.8155372 [26,] -24.4728982 -75.0353982 [27,] -137.6603982 -24.4728982 [28,] -0.3478982 -137.6603982 [29,] -56.0978982 -0.3478982 [30,] 19.5271018 -56.0978982 [31,] 34.4021018 19.5271018 [32,] 87.2146018 34.4021018 [33,] 226.5896018 87.2146018 [34,] 426.1521018 226.5896018 [35,] 542.7771019 426.1521018 [36,] 89.6372732 542.7771019 [37,] -96.2136622 89.6372732 [38,] -45.6511622 -96.2136622 [39,] -158.8386621 -45.6511622 [40,] -21.5261622 -158.8386621 [41,] -77.2761622 -21.5261622 [42,] -1.6511622 -77.2761622 [43,] 13.2238379 -1.6511622 [44,] 66.0363379 13.2238379 [45,] 205.4113379 66.0363379 [46,] 404.9738378 205.4113379 [47,] 521.5988378 404.9738378 [48,] 68.4590093 521.5988378 [49,] -117.3919261 68.4590093 [50,] -66.8294261 -117.3919261 [51,] -180.0169261 -66.8294261 [52,] -42.7044261 -180.0169261 [53,] -98.4544261 -42.7044261 [54,] -22.8294261 -98.4544261 [55,] -7.9544261 -22.8294261 [56,] 44.8580739 -7.9544261 [57,] 184.2330739 44.8580739 [58,] 383.7955739 184.2330739 [59,] 500.4205739 383.7955739 [60,] 47.2807453 500.4205739 [61,] -138.5701901 47.2807453 [62,] -88.0076901 -138.5701901 [63,] -201.1951901 -88.0076901 [64,] -63.8826901 -201.1951901 [65,] -119.6326901 -63.8826901 [66,] -44.0076901 -119.6326901 [67,] -29.1326901 -44.0076901 [68,] 23.6798099 -29.1326901 [69,] 163.0548099 23.6798099 [70,] 362.6173099 163.0548099 [71,] 479.2423099 362.6173099 [72,] 26.1024813 479.2423099 [73,] -159.7484541 26.1024813 [74,] -109.1859541 -159.7484541 [75,] -222.3734541 -109.1859541 [76,] -85.0609541 -222.3734541 [77,] -140.8109541 -85.0609541 [78,] -65.1859541 -140.8109541 [79,] -50.3109541 -65.1859541 [80,] 2.5015459 -50.3109541 [81,] 141.8765459 2.5015459 [82,] 341.4390459 141.8765459 [83,] 458.0640459 341.4390459 [84,] 4.9242173 458.0640459 [85,] -180.9267181 4.9242173 [86,] -130.3642181 -180.9267181 [87,] -243.5517181 -130.3642181 [88,] -106.2392181 -243.5517181 [89,] -161.9892181 -106.2392181 [90,] -86.3642181 -161.9892181 [91,] -71.4892181 -86.3642181 [92,] -18.6767181 -71.4892181 [93,] 120.6982819 -18.6767181 [94,] 320.2607819 120.6982819 [95,] 436.8857819 320.2607819 [96,] -16.2540467 436.8857819 [97,] -202.1049821 -16.2540467 [98,] -151.5424821 -202.1049821 [99,] -264.7299821 -151.5424821 [100,] -127.4174821 -264.7299821 [101,] -183.1674821 -127.4174821 [102,] -107.5424821 -183.1674821 [103,] -92.6674821 -107.5424821 [104,] -39.8549821 -92.6674821 [105,] 99.5200179 -39.8549821 [106,] 299.0825179 99.5200179 [107,] 415.7075179 299.0825179 [108,] -37.4323107 415.7075179 [109,] -223.2832461 -37.4323107 [110,] -172.7207461 -223.2832461 [111,] -285.9082461 -172.7207461 [112,] -148.5957461 -285.9082461 [113,] -204.3457461 -148.5957461 [114,] -128.7207461 -204.3457461 [115,] -113.8457461 -128.7207461 [116,] -61.0332461 -113.8457461 [117,] 78.3417539 -61.0332461 [118,] 277.9042539 78.3417539 [119,] 394.5292539 277.9042539 [120,] -58.6105747 394.5292539 [121,] -244.4615101 -58.6105747 [122,] -193.8990101 -244.4615101 [123,] -307.0865101 -193.8990101 [124,] -169.7740101 -307.0865101 [125,] -225.5240101 -169.7740101 [126,] -149.8990101 -225.5240101 [127,] -135.0240101 -149.8990101 [128,] -82.2115101 -135.0240101 [129,] 57.1634899 -82.2115101 [130,] 256.7259899 57.1634899 [131,] 373.3509899 256.7259899 [132,] -79.7888387 373.3509899 [133,] -265.6397740 -79.7888387 [134,] -215.0772740 -265.6397740 [135,] -328.2647740 -215.0772740 [136,] -190.9522740 -328.2647740 [137,] -246.7022741 -190.9522740 [138,] -171.0772740 -246.7022741 [139,] -156.2022740 -171.0772740 [140,] -103.3897740 -156.2022740 [141,] 35.9852259 -103.3897740 [142,] 235.5477259 35.9852259 [143,] 352.1727259 235.5477259 [144,] -100.9671026 352.1727259 [145,] -286.8180380 -100.9671026 [146,] -236.2555380 -286.8180380 [147,] -349.4430380 -236.2555380 [148,] -212.1305380 -349.4430380 [149,] -267.8805380 -212.1305380 [150,] -192.2555380 -267.8805380 [151,] -177.3805380 -192.2555380 [152,] -124.5680380 -177.3805380 [153,] 14.8069620 -124.5680380 [154,] 214.3694620 14.8069620 [155,] 330.9944620 214.3694620 [156,] -122.1453666 330.9944620 [157,] -307.9963020 -122.1453666 [158,] -257.4338020 -307.9963020 [159,] -370.6213020 -257.4338020 [160,] -233.3088020 -370.6213020 [161,] -289.0588020 -233.3088020 [162,] -213.4338020 -289.0588020 [163,] -198.5588020 -213.4338020 [164,] -145.7463020 -198.5588020 [165,] -6.3713020 -145.7463020 [166,] 193.1911980 -6.3713020 [167,] 309.8161980 193.1911980 [168,] -143.3236306 309.8161980 [169,] -159.5037725 -143.3236306 [170,] -108.9412725 -159.5037725 [171,] -222.1287725 -108.9412725 [172,] -84.8162725 -222.1287725 [173,] -140.5662725 -84.8162725 [174,] -64.9412725 -140.5662725 [175,] -50.0662725 -64.9412725 [176,] 2.7462275 -50.0662725 [177,] 142.1212275 2.7462275 [178,] 341.6837275 142.1212275 [179,] 458.3087275 341.6837275 [180,] 5.1688989 458.3087275 [181,] -180.6820365 5.1688989 [182,] -130.1195365 -180.6820365 [183,] -243.3070365 -130.1195365 [184,] -105.9945365 -243.3070365 [185,] -161.7445365 -105.9945365 [186,] -86.1195365 -161.7445365 [187,] -71.2445365 -86.1195365 [188,] -18.4320365 -71.2445365 [189,] 120.9429635 -18.4320365 [190,] 320.5054635 120.9429635 [191,] 437.1304635 320.5054635 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -32.6788702 153.1720652 2 17.8836298 -32.6788702 3 -95.3038702 17.8836298 4 42.0086298 -95.3038702 5 -13.7413702 42.0086298 6 61.8836298 -13.7413702 7 76.7586298 61.8836298 8 129.5711298 76.7586298 9 268.9461298 129.5711298 10 468.5086298 268.9461298 11 585.1336298 468.5086298 12 131.9938012 585.1336298 13 -53.8571342 131.9938012 14 -3.2946342 -53.8571342 15 -116.4821342 -3.2946342 16 20.8303658 -116.4821342 17 -34.9196342 20.8303658 18 40.7053658 -34.9196342 19 55.5803658 40.7053658 20 108.3928658 55.5803658 21 247.7678658 108.3928658 22 447.3303658 247.7678658 23 563.9553658 447.3303658 24 110.8155372 563.9553658 25 -75.0353982 110.8155372 26 -24.4728982 -75.0353982 27 -137.6603982 -24.4728982 28 -0.3478982 -137.6603982 29 -56.0978982 -0.3478982 30 19.5271018 -56.0978982 31 34.4021018 19.5271018 32 87.2146018 34.4021018 33 226.5896018 87.2146018 34 426.1521018 226.5896018 35 542.7771019 426.1521018 36 89.6372732 542.7771019 37 -96.2136622 89.6372732 38 -45.6511622 -96.2136622 39 -158.8386621 -45.6511622 40 -21.5261622 -158.8386621 41 -77.2761622 -21.5261622 42 -1.6511622 -77.2761622 43 13.2238379 -1.6511622 44 66.0363379 13.2238379 45 205.4113379 66.0363379 46 404.9738378 205.4113379 47 521.5988378 404.9738378 48 68.4590093 521.5988378 49 -117.3919261 68.4590093 50 -66.8294261 -117.3919261 51 -180.0169261 -66.8294261 52 -42.7044261 -180.0169261 53 -98.4544261 -42.7044261 54 -22.8294261 -98.4544261 55 -7.9544261 -22.8294261 56 44.8580739 -7.9544261 57 184.2330739 44.8580739 58 383.7955739 184.2330739 59 500.4205739 383.7955739 60 47.2807453 500.4205739 61 -138.5701901 47.2807453 62 -88.0076901 -138.5701901 63 -201.1951901 -88.0076901 64 -63.8826901 -201.1951901 65 -119.6326901 -63.8826901 66 -44.0076901 -119.6326901 67 -29.1326901 -44.0076901 68 23.6798099 -29.1326901 69 163.0548099 23.6798099 70 362.6173099 163.0548099 71 479.2423099 362.6173099 72 26.1024813 479.2423099 73 -159.7484541 26.1024813 74 -109.1859541 -159.7484541 75 -222.3734541 -109.1859541 76 -85.0609541 -222.3734541 77 -140.8109541 -85.0609541 78 -65.1859541 -140.8109541 79 -50.3109541 -65.1859541 80 2.5015459 -50.3109541 81 141.8765459 2.5015459 82 341.4390459 141.8765459 83 458.0640459 341.4390459 84 4.9242173 458.0640459 85 -180.9267181 4.9242173 86 -130.3642181 -180.9267181 87 -243.5517181 -130.3642181 88 -106.2392181 -243.5517181 89 -161.9892181 -106.2392181 90 -86.3642181 -161.9892181 91 -71.4892181 -86.3642181 92 -18.6767181 -71.4892181 93 120.6982819 -18.6767181 94 320.2607819 120.6982819 95 436.8857819 320.2607819 96 -16.2540467 436.8857819 97 -202.1049821 -16.2540467 98 -151.5424821 -202.1049821 99 -264.7299821 -151.5424821 100 -127.4174821 -264.7299821 101 -183.1674821 -127.4174821 102 -107.5424821 -183.1674821 103 -92.6674821 -107.5424821 104 -39.8549821 -92.6674821 105 99.5200179 -39.8549821 106 299.0825179 99.5200179 107 415.7075179 299.0825179 108 -37.4323107 415.7075179 109 -223.2832461 -37.4323107 110 -172.7207461 -223.2832461 111 -285.9082461 -172.7207461 112 -148.5957461 -285.9082461 113 -204.3457461 -148.5957461 114 -128.7207461 -204.3457461 115 -113.8457461 -128.7207461 116 -61.0332461 -113.8457461 117 78.3417539 -61.0332461 118 277.9042539 78.3417539 119 394.5292539 277.9042539 120 -58.6105747 394.5292539 121 -244.4615101 -58.6105747 122 -193.8990101 -244.4615101 123 -307.0865101 -193.8990101 124 -169.7740101 -307.0865101 125 -225.5240101 -169.7740101 126 -149.8990101 -225.5240101 127 -135.0240101 -149.8990101 128 -82.2115101 -135.0240101 129 57.1634899 -82.2115101 130 256.7259899 57.1634899 131 373.3509899 256.7259899 132 -79.7888387 373.3509899 133 -265.6397740 -79.7888387 134 -215.0772740 -265.6397740 135 -328.2647740 -215.0772740 136 -190.9522740 -328.2647740 137 -246.7022741 -190.9522740 138 -171.0772740 -246.7022741 139 -156.2022740 -171.0772740 140 -103.3897740 -156.2022740 141 35.9852259 -103.3897740 142 235.5477259 35.9852259 143 352.1727259 235.5477259 144 -100.9671026 352.1727259 145 -286.8180380 -100.9671026 146 -236.2555380 -286.8180380 147 -349.4430380 -236.2555380 148 -212.1305380 -349.4430380 149 -267.8805380 -212.1305380 150 -192.2555380 -267.8805380 151 -177.3805380 -192.2555380 152 -124.5680380 -177.3805380 153 14.8069620 -124.5680380 154 214.3694620 14.8069620 155 330.9944620 214.3694620 156 -122.1453666 330.9944620 157 -307.9963020 -122.1453666 158 -257.4338020 -307.9963020 159 -370.6213020 -257.4338020 160 -233.3088020 -370.6213020 161 -289.0588020 -233.3088020 162 -213.4338020 -289.0588020 163 -198.5588020 -213.4338020 164 -145.7463020 -198.5588020 165 -6.3713020 -145.7463020 166 193.1911980 -6.3713020 167 309.8161980 193.1911980 168 -143.3236306 309.8161980 169 -159.5037725 -143.3236306 170 -108.9412725 -159.5037725 171 -222.1287725 -108.9412725 172 -84.8162725 -222.1287725 173 -140.5662725 -84.8162725 174 -64.9412725 -140.5662725 175 -50.0662725 -64.9412725 176 2.7462275 -50.0662725 177 142.1212275 2.7462275 178 341.6837275 142.1212275 179 458.3087275 341.6837275 180 5.1688989 458.3087275 181 -180.6820365 5.1688989 182 -130.1195365 -180.6820365 183 -243.3070365 -130.1195365 184 -105.9945365 -243.3070365 185 -161.7445365 -105.9945365 186 -86.1195365 -161.7445365 187 -71.2445365 -86.1195365 188 -18.4320365 -71.2445365 189 120.9429635 -18.4320365 190 320.5054635 120.9429635 191 437.1304635 320.5054635 > 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/www/html/rcomp/tmp/7tcsc1227522316.ps",horizontal=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/www/html/rcomp/tmp/8dai81227522316.ps",horizontal=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/www/html/rcomp/tmp/96s4f1227522316.ps",horizontal=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/www/html/rcomp/tmp/10pg311227522316.ps",horizontal=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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/www/html/rcomp/tmp/11yq121227522316.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/www/html/rcomp/tmp/12s3x51227522316.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/www/html/rcomp/tmp/13dah91227522316.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/www/html/rcomp/tmp/14gr9g1227522316.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/www/html/rcomp/tmp/159a7u1227522316.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/www/html/rcomp/tmp/16nvvg1227522316.tab") + } > > system("convert tmp/139pj1227522315.ps tmp/139pj1227522315.png") > system("convert tmp/2s9d11227522315.ps tmp/2s9d11227522315.png") > system("convert tmp/3b9gt1227522316.ps tmp/3b9gt1227522316.png") > system("convert tmp/4iffi1227522316.ps tmp/4iffi1227522316.png") > system("convert tmp/5jqzu1227522316.ps tmp/5jqzu1227522316.png") > system("convert tmp/6ll8h1227522316.ps tmp/6ll8h1227522316.png") > system("convert tmp/7tcsc1227522316.ps tmp/7tcsc1227522316.png") > system("convert tmp/8dai81227522316.ps tmp/8dai81227522316.png") > system("convert tmp/96s4f1227522316.ps tmp/96s4f1227522316.png") > system("convert tmp/10pg311227522316.ps tmp/10pg311227522316.png") > > > proc.time() user system elapsed 4.616 1.740 5.195