R version 2.6.0 (2007-10-03) Copyright (C) 2007 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('Slacht' + ,'wet' + ,'') + ,1:192)) > y <- array(NA,dim=c(3,192),dimnames=list(c('Slacht','wet',''),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) > 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 Slacht wet 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) wet V3 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 *** wet -396.0558 47.7094 -8.301 1.93e-14 *** V3 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 > postscript(file="/var/www/html/rcomp/tmp/19ebb1195122538.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/2pzym1195122538.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/329xs1195122538.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/4iif81195122538.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/5jqea1195122538.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > 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/6edl21195122538.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/7fd0g1195122538.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/80moz1195122538.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/9t4al1195122538.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 > 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/10l8fy1195122538.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/11jn1l1195122539.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/12wmxj1195122539.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/13nnau1195122539.tab") > > system("convert tmp/19ebb1195122538.ps tmp/19ebb1195122538.png") > system("convert tmp/2pzym1195122538.ps tmp/2pzym1195122538.png") > system("convert tmp/329xs1195122538.ps tmp/329xs1195122538.png") > system("convert tmp/4iif81195122538.ps tmp/4iif81195122538.png") > system("convert tmp/5jqea1195122538.ps tmp/5jqea1195122538.png") > system("convert tmp/6edl21195122538.ps tmp/6edl21195122538.png") > system("convert tmp/7fd0g1195122538.ps tmp/7fd0g1195122538.png") > system("convert tmp/80moz1195122538.ps tmp/80moz1195122538.png") > system("convert tmp/9t4al1195122538.ps tmp/9t4al1195122538.png") > > > proc.time() user system elapsed 3.178 1.611 3.624