R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1687 + ,0 + ,NA + ,1508 + ,0 + ,1687 + ,1507 + ,0 + ,1508 + ,1385 + ,0 + ,1507 + ,1632 + ,0 + ,1385 + ,1511 + ,0 + ,1632 + ,1559 + ,0 + ,1511 + ,1630 + ,0 + ,1559 + ,1579 + ,0 + ,1630 + ,1653 + ,0 + ,1579 + ,2152 + ,0 + ,1653 + ,2148 + ,0 + ,2152 + ,1752 + ,0 + ,2148 + ,1765 + ,0 + ,1752 + ,1717 + ,0 + ,1765 + ,1558 + ,0 + ,1717 + ,1575 + ,0 + ,1558 + ,1520 + ,0 + ,1575 + ,1805 + ,0 + ,1520 + ,1800 + ,0 + ,1805 + ,1719 + ,0 + ,1800 + ,2008 + ,0 + ,1719 + ,2242 + ,0 + ,2008 + ,2478 + ,0 + ,2242 + ,2030 + ,0 + ,2478 + ,1655 + ,0 + ,2030 + ,1693 + ,0 + ,1655 + ,1623 + ,0 + ,1693 + ,1805 + ,0 + ,1623 + ,1746 + ,0 + ,1805 + ,1795 + ,0 + ,1746 + ,1926 + ,0 + ,1795 + ,1619 + ,0 + ,1926 + ,1992 + ,0 + ,1619 + ,2233 + ,0 + ,1992 + ,2192 + ,0 + ,2233 + ,2080 + ,0 + ,2192 + ,1768 + ,0 + ,2080 + ,1835 + ,0 + ,1768 + ,1569 + ,0 + ,1835 + ,1976 + ,0 + ,1569 + ,1853 + ,0 + ,1976 + ,1965 + ,0 + ,1853 + ,1689 + ,0 + ,1965 + ,1778 + ,0 + ,1689 + ,1976 + ,0 + ,1778 + ,2397 + ,0 + ,1976 + ,2654 + ,0 + ,2397 + ,2097 + ,0 + ,2654 + ,1963 + ,0 + ,2097 + ,1677 + ,0 + ,1963 + ,1941 + ,0 + ,1677 + ,2003 + ,0 + ,1941 + ,1813 + ,0 + ,2003 + ,2012 + ,0 + ,1813 + ,1912 + ,0 + ,2012 + ,2084 + ,0 + ,1912 + ,2080 + ,0 + ,2084 + ,2118 + ,0 + ,2080 + ,2150 + ,0 + ,2118 + ,1608 + ,0 + ,2150 + ,1503 + ,0 + ,1608 + ,1548 + ,0 + ,1503 + ,1382 + ,0 + ,1548 + ,1731 + ,0 + ,1382 + ,1798 + ,0 + ,1731 + ,1779 + ,0 + ,1798 + ,1887 + ,0 + ,1779 + ,2004 + ,0 + ,1887 + ,2077 + ,0 + ,2004 + ,2092 + ,0 + ,2077 + ,2051 + ,0 + ,2092 + ,1577 + ,0 + ,2051 + ,1356 + ,0 + ,1577 + ,1652 + ,0 + ,1356 + ,1382 + ,0 + ,1652 + ,1519 + ,0 + ,1382 + ,1421 + ,0 + ,1519 + ,1442 + ,0 + ,1421 + ,1543 + ,0 + ,1442 + ,1656 + ,0 + ,1543 + ,1561 + ,0 + ,1656 + ,1905 + ,0 + ,1561 + ,2199 + ,0 + ,1905 + ,1473 + ,0 + ,2199 + ,1655 + ,0 + ,1473 + ,1407 + ,0 + ,1655 + ,1395 + ,0 + ,1407 + ,1530 + ,0 + ,1395 + ,1309 + ,0 + ,1530 + ,1526 + ,0 + ,1309 + ,1327 + ,0 + ,1526 + ,1627 + ,0 + ,1327 + ,1748 + ,0 + ,1627 + ,1958 + ,0 + ,1748 + ,2274 + ,0 + ,1958 + ,1648 + ,0 + ,2274 + ,1401 + ,0 + ,1648 + ,1411 + ,0 + ,1401 + ,1403 + ,0 + ,1411 + ,1394 + ,0 + ,1403 + ,1520 + ,0 + ,1394 + ,1528 + ,0 + ,1520 + ,1643 + ,0 + ,1528 + ,1515 + ,0 + ,1643 + ,1685 + ,0 + ,1515 + ,2000 + ,0 + ,1685 + ,2215 + ,0 + ,2000 + ,1956 + ,0 + ,2215 + ,1462 + ,0 + ,1956 + ,1563 + ,0 + ,1462 + ,1459 + ,0 + ,1563 + ,1446 + ,0 + ,1459 + ,1622 + ,0 + ,1446 + ,1657 + ,0 + ,1622 + ,1638 + ,0 + ,1657 + ,1643 + ,0 + ,1638 + ,1683 + ,0 + ,1643 + ,2050 + ,0 + ,1683 + ,2262 + ,0 + ,2050 + ,1813 + ,0 + ,2262 + ,1445 + ,0 + ,1813 + ,1762 + ,0 + ,1445 + ,1461 + ,0 + ,1762 + ,1556 + ,0 + ,1461 + ,1431 + ,0 + ,1556 + ,1427 + ,0 + ,1431 + ,1554 + ,0 + ,1427 + ,1645 + ,0 + ,1554 + ,1653 + ,0 + ,1645 + ,2016 + ,0 + ,1653 + ,2207 + ,0 + ,2016 + ,1665 + ,0 + ,2207 + ,1361 + ,0 + ,1665 + ,1506 + ,0 + ,1361 + ,1360 + ,0 + ,1506 + ,1453 + ,0 + ,1360 + ,1522 + ,0 + ,1453 + ,1460 + ,0 + ,1522 + ,1552 + ,0 + ,1460 + ,1548 + ,0 + ,1552 + ,1827 + ,0 + ,1548 + ,1737 + ,0 + ,1827 + ,1941 + ,0 + ,1737 + ,1474 + ,0 + ,1941 + ,1458 + ,0 + ,1474 + ,1542 + ,0 + ,1458 + ,1404 + ,0 + ,1542 + ,1522 + ,0 + ,1404 + ,1385 + ,0 + ,1522 + ,1641 + ,0 + ,1385 + ,1510 + ,0 + ,1641 + ,1681 + ,0 + ,1510 + ,1938 + ,0 + ,1681 + ,1868 + ,0 + ,1938 + ,1726 + ,0 + ,1868 + ,1456 + ,0 + ,1726 + ,1445 + ,0 + ,1456 + ,1456 + ,0 + ,1445 + ,1365 + ,0 + ,1456 + ,1487 + ,0 + ,1365 + ,1558 + ,0 + ,1487 + ,1488 + ,0 + ,1558 + ,1684 + ,0 + ,1488 + ,1594 + ,0 + ,1684 + ,1850 + ,0 + ,1594 + ,1998 + ,0 + ,1850 + ,2079 + ,0 + ,1998 + ,1494 + ,0 + ,2079 + ,1057 + ,1 + ,1494 + ,1218 + ,1 + ,1057 + ,1168 + ,1 + ,1218 + ,1236 + ,1 + ,1168 + ,1076 + ,1 + ,1236 + ,1174 + ,1 + ,1076 + ,1139 + ,1 + ,1174 + ,1427 + ,1 + ,1139 + ,1487 + ,1 + ,1427 + ,1483 + ,1 + ,1487 + ,1513 + ,1 + ,1483 + ,1357 + ,1 + ,1513 + ,1165 + ,1 + ,1357 + ,1282 + ,1 + ,1165 + ,1110 + ,1 + ,1282 + ,1297 + ,1 + ,1110 + ,1185 + ,1 + ,1297 + ,1222 + ,1 + ,1185 + ,1284 + ,1 + ,1222 + ,1444 + ,1 + ,1284 + ,1575 + ,1 + ,1444 + ,1737 + ,1 + ,1575 + ,1763 + ,1 + ,1737) + ,dim=c(3 + ,192) + ,dimnames=list(c('Accidents' + ,'Belt' + ,'A1') + ,1:192)) > y <- array(NA,dim=c(3,192),dimnames=list(c('Accidents','Belt','A1'),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 = 'Include Monthly Dummies' > par1 = '3' > par3 <- 'No Linear Trend' > par2 <- 'Include Monthly Dummies' > par1 <- '3' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 () > #Author: root > #To cite this work: Wessa P., (2013), Multiple Regression (v1.0.29) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_multipleregression.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x A1 Accidents Belt M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 NA 1687 0 1 0 0 0 0 0 0 0 0 0 0 2 1687 1508 0 0 1 0 0 0 0 0 0 0 0 0 3 1508 1507 0 0 0 1 0 0 0 0 0 0 0 0 4 1507 1385 0 0 0 0 1 0 0 0 0 0 0 0 5 1385 1632 0 0 0 0 0 1 0 0 0 0 0 0 6 1632 1511 0 0 0 0 0 0 1 0 0 0 0 0 7 1511 1559 0 0 0 0 0 0 0 1 0 0 0 0 8 1559 1630 0 0 0 0 0 0 0 0 1 0 0 0 9 1630 1579 0 0 0 0 0 0 0 0 0 1 0 0 10 1579 1653 0 0 0 0 0 0 0 0 0 0 1 0 11 1653 2152 0 0 0 0 0 0 0 0 0 0 0 1 12 2152 2148 0 0 0 0 0 0 0 0 0 0 0 0 13 2148 1752 0 1 0 0 0 0 0 0 0 0 0 0 14 1752 1765 0 0 1 0 0 0 0 0 0 0 0 0 15 1765 1717 0 0 0 1 0 0 0 0 0 0 0 0 16 1717 1558 0 0 0 0 1 0 0 0 0 0 0 0 17 1558 1575 0 0 0 0 0 1 0 0 0 0 0 0 18 1575 1520 0 0 0 0 0 0 1 0 0 0 0 0 19 1520 1805 0 0 0 0 0 0 0 1 0 0 0 0 20 1805 1800 0 0 0 0 0 0 0 0 1 0 0 0 21 1800 1719 0 0 0 0 0 0 0 0 0 1 0 0 22 1719 2008 0 0 0 0 0 0 0 0 0 0 1 0 23 2008 2242 0 0 0 0 0 0 0 0 0 0 0 1 24 2242 2478 0 0 0 0 0 0 0 0 0 0 0 0 25 2478 2030 0 1 0 0 0 0 0 0 0 0 0 0 26 2030 1655 0 0 1 0 0 0 0 0 0 0 0 0 27 1655 1693 0 0 0 1 0 0 0 0 0 0 0 0 28 1693 1623 0 0 0 0 1 0 0 0 0 0 0 0 29 1623 1805 0 0 0 0 0 1 0 0 0 0 0 0 30 1805 1746 0 0 0 0 0 0 1 0 0 0 0 0 31 1746 1795 0 0 0 0 0 0 0 1 0 0 0 0 32 1795 1926 0 0 0 0 0 0 0 0 1 0 0 0 33 1926 1619 0 0 0 0 0 0 0 0 0 1 0 0 34 1619 1992 0 0 0 0 0 0 0 0 0 0 1 0 35 1992 2233 0 0 0 0 0 0 0 0 0 0 0 1 36 2233 2192 0 0 0 0 0 0 0 0 0 0 0 0 37 2192 2080 0 1 0 0 0 0 0 0 0 0 0 0 38 2080 1768 0 0 1 0 0 0 0 0 0 0 0 0 39 1768 1835 0 0 0 1 0 0 0 0 0 0 0 0 40 1835 1569 0 0 0 0 1 0 0 0 0 0 0 0 41 1569 1976 0 0 0 0 0 1 0 0 0 0 0 0 42 1976 1853 0 0 0 0 0 0 1 0 0 0 0 0 43 1853 1965 0 0 0 0 0 0 0 1 0 0 0 0 44 1965 1689 0 0 0 0 0 0 0 0 1 0 0 0 45 1689 1778 0 0 0 0 0 0 0 0 0 1 0 0 46 1778 1976 0 0 0 0 0 0 0 0 0 0 1 0 47 1976 2397 0 0 0 0 0 0 0 0 0 0 0 1 48 2397 2654 0 0 0 0 0 0 0 0 0 0 0 0 49 2654 2097 0 1 0 0 0 0 0 0 0 0 0 0 50 2097 1963 0 0 1 0 0 0 0 0 0 0 0 0 51 1963 1677 0 0 0 1 0 0 0 0 0 0 0 0 52 1677 1941 0 0 0 0 1 0 0 0 0 0 0 0 53 1941 2003 0 0 0 0 0 1 0 0 0 0 0 0 54 2003 1813 0 0 0 0 0 0 1 0 0 0 0 0 55 1813 2012 0 0 0 0 0 0 0 1 0 0 0 0 56 2012 1912 0 0 0 0 0 0 0 0 1 0 0 0 57 1912 2084 0 0 0 0 0 0 0 0 0 1 0 0 58 2084 2080 0 0 0 0 0 0 0 0 0 0 1 0 59 2080 2118 0 0 0 0 0 0 0 0 0 0 0 1 60 2118 2150 0 0 0 0 0 0 0 0 0 0 0 0 61 2150 1608 0 1 0 0 0 0 0 0 0 0 0 0 62 1608 1503 0 0 1 0 0 0 0 0 0 0 0 0 63 1503 1548 0 0 0 1 0 0 0 0 0 0 0 0 64 1548 1382 0 0 0 0 1 0 0 0 0 0 0 0 65 1382 1731 0 0 0 0 0 1 0 0 0 0 0 0 66 1731 1798 0 0 0 0 0 0 1 0 0 0 0 0 67 1798 1779 0 0 0 0 0 0 0 1 0 0 0 0 68 1779 1887 0 0 0 0 0 0 0 0 1 0 0 0 69 1887 2004 0 0 0 0 0 0 0 0 0 1 0 0 70 2004 2077 0 0 0 0 0 0 0 0 0 0 1 0 71 2077 2092 0 0 0 0 0 0 0 0 0 0 0 1 72 2092 2051 0 0 0 0 0 0 0 0 0 0 0 0 73 2051 1577 0 1 0 0 0 0 0 0 0 0 0 0 74 1577 1356 0 0 1 0 0 0 0 0 0 0 0 0 75 1356 1652 0 0 0 1 0 0 0 0 0 0 0 0 76 1652 1382 0 0 0 0 1 0 0 0 0 0 0 0 77 1382 1519 0 0 0 0 0 1 0 0 0 0 0 0 78 1519 1421 0 0 0 0 0 0 1 0 0 0 0 0 79 1421 1442 0 0 0 0 0 0 0 1 0 0 0 0 80 1442 1543 0 0 0 0 0 0 0 0 1 0 0 0 81 1543 1656 0 0 0 0 0 0 0 0 0 1 0 0 82 1656 1561 0 0 0 0 0 0 0 0 0 0 1 0 83 1561 1905 0 0 0 0 0 0 0 0 0 0 0 1 84 1905 2199 0 0 0 0 0 0 0 0 0 0 0 0 85 2199 1473 0 1 0 0 0 0 0 0 0 0 0 0 86 1473 1655 0 0 1 0 0 0 0 0 0 0 0 0 87 1655 1407 0 0 0 1 0 0 0 0 0 0 0 0 88 1407 1395 0 0 0 0 1 0 0 0 0 0 0 0 89 1395 1530 0 0 0 0 0 1 0 0 0 0 0 0 90 1530 1309 0 0 0 0 0 0 1 0 0 0 0 0 91 1309 1526 0 0 0 0 0 0 0 1 0 0 0 0 92 1526 1327 0 0 0 0 0 0 0 0 1 0 0 0 93 1327 1627 0 0 0 0 0 0 0 0 0 1 0 0 94 1627 1748 0 0 0 0 0 0 0 0 0 0 1 0 95 1748 1958 0 0 0 0 0 0 0 0 0 0 0 1 96 1958 2274 0 0 0 0 0 0 0 0 0 0 0 0 97 2274 1648 0 1 0 0 0 0 0 0 0 0 0 0 98 1648 1401 0 0 1 0 0 0 0 0 0 0 0 0 99 1401 1411 0 0 0 1 0 0 0 0 0 0 0 0 100 1411 1403 0 0 0 0 1 0 0 0 0 0 0 0 101 1403 1394 0 0 0 0 0 1 0 0 0 0 0 0 102 1394 1520 0 0 0 0 0 0 1 0 0 0 0 0 103 1520 1528 0 0 0 0 0 0 0 1 0 0 0 0 104 1528 1643 0 0 0 0 0 0 0 0 1 0 0 0 105 1643 1515 0 0 0 0 0 0 0 0 0 1 0 0 106 1515 1685 0 0 0 0 0 0 0 0 0 0 1 0 107 1685 2000 0 0 0 0 0 0 0 0 0 0 0 1 108 2000 2215 0 0 0 0 0 0 0 0 0 0 0 0 109 2215 1956 0 1 0 0 0 0 0 0 0 0 0 0 110 1956 1462 0 0 1 0 0 0 0 0 0 0 0 0 111 1462 1563 0 0 0 1 0 0 0 0 0 0 0 0 112 1563 1459 0 0 0 0 1 0 0 0 0 0 0 0 113 1459 1446 0 0 0 0 0 1 0 0 0 0 0 0 114 1446 1622 0 0 0 0 0 0 1 0 0 0 0 0 115 1622 1657 0 0 0 0 0 0 0 1 0 0 0 0 116 1657 1638 0 0 0 0 0 0 0 0 1 0 0 0 117 1638 1643 0 0 0 0 0 0 0 0 0 1 0 0 118 1643 1683 0 0 0 0 0 0 0 0 0 0 1 0 119 1683 2050 0 0 0 0 0 0 0 0 0 0 0 1 120 2050 2262 0 0 0 0 0 0 0 0 0 0 0 0 121 2262 1813 0 1 0 0 0 0 0 0 0 0 0 0 122 1813 1445 0 0 1 0 0 0 0 0 0 0 0 0 123 1445 1762 0 0 0 1 0 0 0 0 0 0 0 0 124 1762 1461 0 0 0 0 1 0 0 0 0 0 0 0 125 1461 1556 0 0 0 0 0 1 0 0 0 0 0 0 126 1556 1431 0 0 0 0 0 0 1 0 0 0 0 0 127 1431 1427 0 0 0 0 0 0 0 1 0 0 0 0 128 1427 1554 0 0 0 0 0 0 0 0 1 0 0 0 129 1554 1645 0 0 0 0 0 0 0 0 0 1 0 0 130 1645 1653 0 0 0 0 0 0 0 0 0 0 1 0 131 1653 2016 0 0 0 0 0 0 0 0 0 0 0 1 132 2016 2207 0 0 0 0 0 0 0 0 0 0 0 0 133 2207 1665 0 1 0 0 0 0 0 0 0 0 0 0 134 1665 1361 0 0 1 0 0 0 0 0 0 0 0 0 135 1361 1506 0 0 0 1 0 0 0 0 0 0 0 0 136 1506 1360 0 0 0 0 1 0 0 0 0 0 0 0 137 1360 1453 0 0 0 0 0 1 0 0 0 0 0 0 138 1453 1522 0 0 0 0 0 0 1 0 0 0 0 0 139 1522 1460 0 0 0 0 0 0 0 1 0 0 0 0 140 1460 1552 0 0 0 0 0 0 0 0 1 0 0 0 141 1552 1548 0 0 0 0 0 0 0 0 0 1 0 0 142 1548 1827 0 0 0 0 0 0 0 0 0 0 1 0 143 1827 1737 0 0 0 0 0 0 0 0 0 0 0 1 144 1737 1941 0 0 0 0 0 0 0 0 0 0 0 0 145 1941 1474 0 1 0 0 0 0 0 0 0 0 0 0 146 1474 1458 0 0 1 0 0 0 0 0 0 0 0 0 147 1458 1542 0 0 0 1 0 0 0 0 0 0 0 0 148 1542 1404 0 0 0 0 1 0 0 0 0 0 0 0 149 1404 1522 0 0 0 0 0 1 0 0 0 0 0 0 150 1522 1385 0 0 0 0 0 0 1 0 0 0 0 0 151 1385 1641 0 0 0 0 0 0 0 1 0 0 0 0 152 1641 1510 0 0 0 0 0 0 0 0 1 0 0 0 153 1510 1681 0 0 0 0 0 0 0 0 0 1 0 0 154 1681 1938 0 0 0 0 0 0 0 0 0 0 1 0 155 1938 1868 0 0 0 0 0 0 0 0 0 0 0 1 156 1868 1726 0 0 0 0 0 0 0 0 0 0 0 0 157 1726 1456 0 1 0 0 0 0 0 0 0 0 0 0 158 1456 1445 0 0 1 0 0 0 0 0 0 0 0 0 159 1445 1456 0 0 0 1 0 0 0 0 0 0 0 0 160 1456 1365 0 0 0 0 1 0 0 0 0 0 0 0 161 1365 1487 0 0 0 0 0 1 0 0 0 0 0 0 162 1487 1558 0 0 0 0 0 0 1 0 0 0 0 0 163 1558 1488 0 0 0 0 0 0 0 1 0 0 0 0 164 1488 1684 0 0 0 0 0 0 0 0 1 0 0 0 165 1684 1594 0 0 0 0 0 0 0 0 0 1 0 0 166 1594 1850 0 0 0 0 0 0 0 0 0 0 1 0 167 1850 1998 0 0 0 0 0 0 0 0 0 0 0 1 168 1998 2079 0 0 0 0 0 0 0 0 0 0 0 0 169 2079 1494 0 1 0 0 0 0 0 0 0 0 0 0 170 1494 1057 1 0 1 0 0 0 0 0 0 0 0 0 171 1057 1218 1 0 0 1 0 0 0 0 0 0 0 0 172 1218 1168 1 0 0 0 1 0 0 0 0 0 0 0 173 1168 1236 1 0 0 0 0 1 0 0 0 0 0 0 174 1236 1076 1 0 0 0 0 0 1 0 0 0 0 0 175 1076 1174 1 0 0 0 0 0 0 1 0 0 0 0 176 1174 1139 1 0 0 0 0 0 0 0 1 0 0 0 177 1139 1427 1 0 0 0 0 0 0 0 0 1 0 0 178 1427 1487 1 0 0 0 0 0 0 0 0 0 1 0 179 1487 1483 1 0 0 0 0 0 0 0 0 0 0 1 180 1483 1513 1 0 0 0 0 0 0 0 0 0 0 0 181 1513 1357 1 1 0 0 0 0 0 0 0 0 0 0 182 1357 1165 1 0 1 0 0 0 0 0 0 0 0 0 183 1165 1282 1 0 0 1 0 0 0 0 0 0 0 0 184 1282 1110 1 0 0 0 1 0 0 0 0 0 0 0 185 1110 1297 1 0 0 0 0 1 0 0 0 0 0 0 186 1297 1185 1 0 0 0 0 0 1 0 0 0 0 0 187 1185 1222 1 0 0 0 0 0 0 1 0 0 0 0 188 1222 1284 1 0 0 0 0 0 0 0 1 0 0 0 189 1284 1444 1 0 0 0 0 0 0 0 0 1 0 0 190 1444 1575 1 0 0 0 0 0 0 0 0 0 1 0 191 1575 1737 1 0 0 0 0 0 0 0 0 0 0 1 192 1737 1763 1 0 0 0 0 0 0 0 0 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Accidents Belt M1 M2 M3 663.9895 0.6391 -136.6393 398.7368 93.6680 -138.6474 M4 M5 M6 M7 M8 M9 -15.7447 -216.6911 -43.7478 -147.8311 -81.7130 -100.5915 M10 M11 -136.8561 -125.0253 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -342.40 -86.90 -3.57 80.02 365.86 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 663.9895 128.9546 5.149 6.92e-07 *** Accidents 0.6391 0.0575 11.114 < 2e-16 *** Belt -136.6393 37.4230 -3.651 0.000343 *** M1 398.7368 54.2532 7.350 7.06e-12 *** M2 93.6680 59.0565 1.586 0.114507 M3 -138.6474 57.3545 -2.417 0.016648 * M4 -15.7447 61.2904 -0.257 0.797565 M5 -216.6911 56.5770 -3.830 0.000178 *** M6 -43.7478 58.4079 -0.749 0.454849 M7 -147.8311 55.9542 -2.642 0.008980 ** M8 -81.7130 55.4989 -1.472 0.142706 M9 -100.5915 53.9610 -1.864 0.063956 . M10 -136.8562 50.5580 -2.707 0.007456 ** M11 -125.0253 47.6498 -2.624 0.009454 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 133.4 on 177 degrees of freedom (1 observation deleted due to missingness) Multiple R-squared: 0.8032, Adjusted R-squared: 0.7887 F-statistic: 55.56 on 13 and 177 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.4689551 0.937910283 0.5310448587 [2,] 0.3866851 0.773370296 0.6133148519 [3,] 0.3452550 0.690509985 0.6547450075 [4,] 0.2542084 0.508416781 0.7457916097 [5,] 0.1791529 0.358305863 0.8208470684 [6,] 0.3525359 0.705071712 0.6474641441 [7,] 0.2874453 0.574890614 0.7125546929 [8,] 0.2713968 0.542793668 0.7286031659 [9,] 0.4804989 0.960997790 0.5195011048 [10,] 0.3964418 0.792883548 0.6035582261 [11,] 0.3157617 0.631523377 0.6842383116 [12,] 0.2453068 0.490613690 0.7546931548 [13,] 0.1909595 0.381919012 0.8090404940 [14,] 0.1867513 0.373502516 0.8132487420 [15,] 0.1404561 0.280912164 0.8595439181 [16,] 0.2232493 0.446498601 0.7767506995 [17,] 0.2180661 0.436132164 0.7819339181 [18,] 0.2032833 0.406566625 0.7967166873 [19,] 0.1876894 0.375378784 0.8123106082 [20,] 0.2527922 0.505584321 0.7472078394 [21,] 0.2870834 0.574166888 0.7129165560 [22,] 0.2367721 0.473544130 0.7632279350 [23,] 0.2574632 0.514926301 0.7425368493 [24,] 0.2505865 0.501173048 0.7494134759 [25,] 0.2605424 0.521084853 0.7394575735 [26,] 0.2366334 0.473266897 0.7633665515 [27,] 0.4207276 0.841455203 0.5792723985 [28,] 0.4301889 0.860377832 0.5698110841 [29,] 0.3892502 0.778500322 0.6107498391 [30,] 0.3429772 0.685954340 0.6570228302 [31,] 0.2963919 0.592783750 0.7036081248 [32,] 0.4491427 0.898285371 0.5508573146 [33,] 0.4091512 0.818302327 0.5908488363 [34,] 0.6429416 0.714116835 0.3570584176 [35,] 0.7122030 0.575594073 0.2877970363 [36,] 0.8030823 0.393835488 0.1969177441 [37,] 0.8447707 0.310458646 0.1552293228 [38,] 0.8160602 0.367879679 0.1839398394 [39,] 0.8530053 0.293989441 0.1469947206 [40,] 0.8442820 0.311436036 0.1557180182 [41,] 0.9261820 0.147635960 0.0738179799 [42,] 0.9547924 0.090415204 0.0452076020 [43,] 0.9471735 0.105652996 0.0528264978 [44,] 0.9346802 0.130639631 0.0653198153 [45,] 0.9364805 0.127038959 0.0635194797 [46,] 0.9318020 0.136396098 0.0681980491 [47,] 0.9148196 0.170360768 0.0851803839 [48,] 0.9215988 0.156802366 0.0784011828 [49,] 0.9179677 0.164064596 0.0820322982 [50,] 0.9324578 0.135084405 0.0675422023 [51,] 0.9309804 0.138039199 0.0690195995 [52,] 0.9376431 0.124713848 0.0623569240 [53,] 0.9614201 0.077159806 0.0385799031 [54,] 0.9808881 0.038223729 0.0191118647 [55,] 0.9794420 0.041116016 0.0205580079 [56,] 0.9740580 0.051883964 0.0259419819 [57,] 0.9692811 0.061437817 0.0307189085 [58,] 0.9845036 0.030992706 0.0154963531 [59,] 0.9837276 0.032544702 0.0162723511 [60,] 0.9788278 0.042344451 0.0211722253 [61,] 0.9739904 0.052019199 0.0260095994 [62,] 0.9670844 0.065831176 0.0329155881 [63,] 0.9697410 0.060517928 0.0302589642 [64,] 0.9679928 0.064014476 0.0320072379 [65,] 0.9639114 0.072177298 0.0360886491 [66,] 0.9750177 0.049964504 0.0249822519 [67,] 0.9788462 0.042307610 0.0211538050 [68,] 0.9820016 0.035996804 0.0179984022 [69,] 0.9949471 0.010105810 0.0050529052 [70,] 0.9973944 0.005211118 0.0026055590 [71,] 0.9974844 0.005031196 0.0025155979 [72,] 0.9964992 0.007001573 0.0035007867 [73,] 0.9954566 0.009086719 0.0045433597 [74,] 0.9967109 0.006578109 0.0032890546 [75,] 0.9957499 0.008500256 0.0042501280 [76,] 0.9988039 0.002392158 0.0011960790 [77,] 0.9982988 0.003402375 0.0017011875 [78,] 0.9976458 0.004708473 0.0023542364 [79,] 0.9975952 0.004809593 0.0024047967 [80,] 0.9985139 0.002972263 0.0014861316 [81,] 0.9979082 0.004183530 0.0020917651 [82,] 0.9972299 0.005540296 0.0027701480 [83,] 0.9973793 0.005241377 0.0026206885 [84,] 0.9965306 0.006938884 0.0034694421 [85,] 0.9974719 0.005056248 0.0025281240 [86,] 0.9965185 0.006963077 0.0034815384 [87,] 0.9958372 0.008325681 0.0041628407 [88,] 0.9953905 0.009218939 0.0046094693 [89,] 0.9947982 0.010403520 0.0052017599 [90,] 0.9947650 0.010470013 0.0052350064 [91,] 0.9931658 0.013668479 0.0068342396 [92,] 0.9930372 0.013925543 0.0069627713 [93,] 0.9983003 0.003399498 0.0016997489 [94,] 0.9978238 0.004352429 0.0021762144 [95,] 0.9968850 0.006230075 0.0031150376 [96,] 0.9960968 0.007806401 0.0039032005 [97,] 0.9967888 0.006422417 0.0032112083 [98,] 0.9963724 0.007255169 0.0036275843 [99,] 0.9960799 0.007840208 0.0039201041 [100,] 0.9950735 0.009853046 0.0049265228 [101,] 0.9931723 0.013655394 0.0068276972 [102,] 0.9943957 0.011208520 0.0056042598 [103,] 0.9928331 0.014333770 0.0071668851 [104,] 0.9962991 0.007401897 0.0037009484 [105,] 0.9975852 0.004829686 0.0024148429 [106,] 0.9975065 0.004986904 0.0024934519 [107,] 0.9989790 0.002042013 0.0010210065 [108,] 0.9985782 0.002843578 0.0014217891 [109,] 0.9979710 0.004057954 0.0020289771 [110,] 0.9970114 0.005977282 0.0029886408 [111,] 0.9966958 0.006608360 0.0033041798 [112,] 0.9953713 0.009257435 0.0046287174 [113,] 0.9934209 0.013158229 0.0065791146 [114,] 0.9961860 0.007627937 0.0038139686 [115,] 0.9953938 0.009212458 0.0046062291 [116,] 0.9991687 0.001662653 0.0008313267 [117,] 0.9989010 0.002198058 0.0010990292 [118,] 0.9985796 0.002840854 0.0014204271 [119,] 0.9978044 0.004391172 0.0021955858 [120,] 0.9967634 0.006473225 0.0032366127 [121,] 0.9960222 0.007955625 0.0039778125 [122,] 0.9949755 0.010048967 0.0050244835 [123,] 0.9934955 0.013008927 0.0065044637 [124,] 0.9904601 0.019079815 0.0095399077 [125,] 0.9908178 0.018364392 0.0091821958 [126,] 0.9888773 0.022245367 0.0111226835 [127,] 0.9922106 0.015578851 0.0077894256 [128,] 0.9899764 0.020047253 0.0100236264 [129,] 0.9924065 0.015186921 0.0075934604 [130,] 0.9890319 0.021936221 0.0109681103 [131,] 0.9839608 0.032078446 0.0160392229 [132,] 0.9765715 0.046857054 0.0234285269 [133,] 0.9664321 0.067135705 0.0335678524 [134,] 0.9625478 0.074904485 0.0374522424 [135,] 0.9657973 0.068405453 0.0342027267 [136,] 0.9556469 0.088706285 0.0443531424 [137,] 0.9388548 0.122290488 0.0611452438 [138,] 0.9387464 0.122507235 0.0612536175 [139,] 0.9177024 0.164595178 0.0822975892 [140,] 0.9466472 0.106705643 0.0533528216 [141,] 0.9838935 0.032212938 0.0161064690 [142,] 0.9746501 0.050699823 0.0253499114 [143,] 0.9705292 0.058941515 0.0294707576 [144,] 0.9651053 0.069789484 0.0348947419 [145,] 0.9651945 0.069610974 0.0348054869 [146,] 0.9510473 0.097905424 0.0489527120 [147,] 0.9383459 0.123308121 0.0616540605 [148,] 0.9378280 0.124344076 0.0621720380 [149,] 0.9690257 0.061948599 0.0309742997 [150,] 0.9683784 0.063243122 0.0316215611 [151,] 0.9856879 0.028624219 0.0143121097 [152,] 0.9713583 0.057283474 0.0286417368 [153,] 0.9867435 0.026513001 0.0132565006 [154,] 0.9773395 0.045320919 0.0226604593 [155,] 0.9671407 0.065718528 0.0328592638 [156,] 0.9509143 0.098171343 0.0490856713 [157,] 0.8884566 0.223086785 0.1115433923 [158,] 0.8083864 0.383227170 0.1916135850 [159,] 0.6317653 0.736469433 0.3682347164 > postscript(file="/var/fisher/rcomp/tmp/18xl11384957268.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) Warning message: In x[, 1] - mysum$resid : longer object length is not a multiple of shorter object length > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/2fvvq1384957268.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/32e2c1384957268.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/459gv1384957268.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/51mev1384957268.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 = 191 Frequency = 1 2 3 4 5 6 7 -34.4485500 19.5060093 -26.4242569 -105.3400922 46.0499047 -1.5444405 8 9 10 11 12 13 -65.0399790 57.4335338 -4.5965794 -261.3476932 115.1835032 -34.4622883 14 15 16 17 18 19 -133.7020628 142.2910767 73.0082034 104.0896752 -16.7021639 -149.7676473 20 21 22 23 24 25 72.3098374 137.9569120 -91.4837275 36.1316214 -5.7256766 117.8627057 26 27 28 29 30 31 214.6009971 47.6299261 7.4654861 22.0923680 68.8570039 82.6235400 32 33 34 35 36 37 -18.2191222 327.8687847 -181.2578278 25.8836899 168.0622792 -200.0932307 38 39 40 41 42 43 192.3805810 69.8750669 183.9778974 -141.1969343 171.4713001 80.9733564 44 45 46 47 48 49 303.2520161 -10.7510928 -12.0319282 -94.9317813 36.7894275 251.0417510 50 51 52 53 54 55 84.7524293 365.8558258 -211.7742690 213.5468601 224.0360492 10.9347763 56 57 58 59 60 61 207.7285400 16.6785768 227.4997242 187.3823435 79.9052658 59.5708084 62 63 64 65 66 67 -110.2529564 -11.6978585 16.4930993 -171.6128462 -38.3771699 144.8494396 68 69 70 71 72 73 -9.2934918 42.8080749 149.4170804 200.9994304 117.1780197 -19.6165111 74 75 76 77 78 79 -47.3025036 -225.1662061 120.4930993 -36.1196761 -9.4294099 -16.7675495 80 81 82 83 84 85 -126.4366498 -78.7786082 131.2023434 -195.4853677 -164.4115518 194.8518365 86 87 88 89 90 91 -342.3990029 230.4178820 -132.8154442 -30.1499821 73.1518875 -182.4535225 92 93 94 95 96 97 95.6129952 -276.2441651 -17.3128585 -42.3586602 -159.3454564 158.0060593 98 99 100 101 102 103 -5.0628463 -26.1385929 -133.9283940 64.7701647 -197.7021639 27.2682400 104 105 106 107 108 109 -104.3485225 111.3371323 -89.0483787 -132.2016467 -79.6374515 -97.8425085 110 111 112 113 114 115 263.9509114 -62.2846394 -17.7190427 87.5359909 -210.8922740 46.8219243 116 117 118 119 120 121 27.8470711 24.5299353 40.2298588 -166.1575831 -59.6760316 40.5514694 122 123 124 125 126 127 131.8159298 -206.4692660 180.0027199 19.2329310 21.1794028 2.8192314 128 129 130 131 132 133 -148.4669558 -60.7483022 61.4034206 -174.4275464 -58.5245017 80.1410410 134 135 136 137 138 139 37.5019028 -126.8548720 -11.4462887 -15.9378401 -139.9804013 72.7283135 140 141 142 143 144 145 -114.1887183 -0.7537857 -146.8032379 177.8865784 -167.5189203 -63.7872822 146 147 148 149 150 151 -215.4926137 -52.8631461 -3.5675127 -16.0370323 16.5788643 -179.9521761 152 153 154 155 156 157 93.6542682 -127.7565763 -84.7454166 205.1620252 100.8916059 -267.2831451 158 159 160 161 162 163 -225.1840702 -10.8989356 -64.6418824 -32.6678769 -128.9886755 90.8329891 164 165 166 167 168 169 -170.5523903 101.8467529 -115.5029686 34.0765907 5.2826954 61.4303432 170 171 172 173 174 175 197.4333385 -110.1493359 -40.0961504 67.3902663 64.7058936 -53.8443879 176 177 178 179 180 181 0.4066586 -199.7810770 86.1364719 136.8620778 -11.3367625 -280.3710485 182 183 184 185 186 187 -8.5914840 -43.0529344 60.9727357 -29.5959760 56.0419524 24.4779132 188 189 190 191 192 -44.2655568 -65.6460954 46.8940240 62.5259212 82.8835558 > postscript(file="/var/fisher/rcomp/tmp/6r1pw1384957268.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 = 191 Frequency = 1 lag(myerror, k = 1) myerror 0 -34.4485500 NA 1 19.5060093 -34.4485500 2 -26.4242569 19.5060093 3 -105.3400922 -26.4242569 4 46.0499047 -105.3400922 5 -1.5444405 46.0499047 6 -65.0399790 -1.5444405 7 57.4335338 -65.0399790 8 -4.5965794 57.4335338 9 -261.3476932 -4.5965794 10 115.1835032 -261.3476932 11 -34.4622883 115.1835032 12 -133.7020628 -34.4622883 13 142.2910767 -133.7020628 14 73.0082034 142.2910767 15 104.0896752 73.0082034 16 -16.7021639 104.0896752 17 -149.7676473 -16.7021639 18 72.3098374 -149.7676473 19 137.9569120 72.3098374 20 -91.4837275 137.9569120 21 36.1316214 -91.4837275 22 -5.7256766 36.1316214 23 117.8627057 -5.7256766 24 214.6009971 117.8627057 25 47.6299261 214.6009971 26 7.4654861 47.6299261 27 22.0923680 7.4654861 28 68.8570039 22.0923680 29 82.6235400 68.8570039 30 -18.2191222 82.6235400 31 327.8687847 -18.2191222 32 -181.2578278 327.8687847 33 25.8836899 -181.2578278 34 168.0622792 25.8836899 35 -200.0932307 168.0622792 36 192.3805810 -200.0932307 37 69.8750669 192.3805810 38 183.9778974 69.8750669 39 -141.1969343 183.9778974 40 171.4713001 -141.1969343 41 80.9733564 171.4713001 42 303.2520161 80.9733564 43 -10.7510928 303.2520161 44 -12.0319282 -10.7510928 45 -94.9317813 -12.0319282 46 36.7894275 -94.9317813 47 251.0417510 36.7894275 48 84.7524293 251.0417510 49 365.8558258 84.7524293 50 -211.7742690 365.8558258 51 213.5468601 -211.7742690 52 224.0360492 213.5468601 53 10.9347763 224.0360492 54 207.7285400 10.9347763 55 16.6785768 207.7285400 56 227.4997242 16.6785768 57 187.3823435 227.4997242 58 79.9052658 187.3823435 59 59.5708084 79.9052658 60 -110.2529564 59.5708084 61 -11.6978585 -110.2529564 62 16.4930993 -11.6978585 63 -171.6128462 16.4930993 64 -38.3771699 -171.6128462 65 144.8494396 -38.3771699 66 -9.2934918 144.8494396 67 42.8080749 -9.2934918 68 149.4170804 42.8080749 69 200.9994304 149.4170804 70 117.1780197 200.9994304 71 -19.6165111 117.1780197 72 -47.3025036 -19.6165111 73 -225.1662061 -47.3025036 74 120.4930993 -225.1662061 75 -36.1196761 120.4930993 76 -9.4294099 -36.1196761 77 -16.7675495 -9.4294099 78 -126.4366498 -16.7675495 79 -78.7786082 -126.4366498 80 131.2023434 -78.7786082 81 -195.4853677 131.2023434 82 -164.4115518 -195.4853677 83 194.8518365 -164.4115518 84 -342.3990029 194.8518365 85 230.4178820 -342.3990029 86 -132.8154442 230.4178820 87 -30.1499821 -132.8154442 88 73.1518875 -30.1499821 89 -182.4535225 73.1518875 90 95.6129952 -182.4535225 91 -276.2441651 95.6129952 92 -17.3128585 -276.2441651 93 -42.3586602 -17.3128585 94 -159.3454564 -42.3586602 95 158.0060593 -159.3454564 96 -5.0628463 158.0060593 97 -26.1385929 -5.0628463 98 -133.9283940 -26.1385929 99 64.7701647 -133.9283940 100 -197.7021639 64.7701647 101 27.2682400 -197.7021639 102 -104.3485225 27.2682400 103 111.3371323 -104.3485225 104 -89.0483787 111.3371323 105 -132.2016467 -89.0483787 106 -79.6374515 -132.2016467 107 -97.8425085 -79.6374515 108 263.9509114 -97.8425085 109 -62.2846394 263.9509114 110 -17.7190427 -62.2846394 111 87.5359909 -17.7190427 112 -210.8922740 87.5359909 113 46.8219243 -210.8922740 114 27.8470711 46.8219243 115 24.5299353 27.8470711 116 40.2298588 24.5299353 117 -166.1575831 40.2298588 118 -59.6760316 -166.1575831 119 40.5514694 -59.6760316 120 131.8159298 40.5514694 121 -206.4692660 131.8159298 122 180.0027199 -206.4692660 123 19.2329310 180.0027199 124 21.1794028 19.2329310 125 2.8192314 21.1794028 126 -148.4669558 2.8192314 127 -60.7483022 -148.4669558 128 61.4034206 -60.7483022 129 -174.4275464 61.4034206 130 -58.5245017 -174.4275464 131 80.1410410 -58.5245017 132 37.5019028 80.1410410 133 -126.8548720 37.5019028 134 -11.4462887 -126.8548720 135 -15.9378401 -11.4462887 136 -139.9804013 -15.9378401 137 72.7283135 -139.9804013 138 -114.1887183 72.7283135 139 -0.7537857 -114.1887183 140 -146.8032379 -0.7537857 141 177.8865784 -146.8032379 142 -167.5189203 177.8865784 143 -63.7872822 -167.5189203 144 -215.4926137 -63.7872822 145 -52.8631461 -215.4926137 146 -3.5675127 -52.8631461 147 -16.0370323 -3.5675127 148 16.5788643 -16.0370323 149 -179.9521761 16.5788643 150 93.6542682 -179.9521761 151 -127.7565763 93.6542682 152 -84.7454166 -127.7565763 153 205.1620252 -84.7454166 154 100.8916059 205.1620252 155 -267.2831451 100.8916059 156 -225.1840702 -267.2831451 157 -10.8989356 -225.1840702 158 -64.6418824 -10.8989356 159 -32.6678769 -64.6418824 160 -128.9886755 -32.6678769 161 90.8329891 -128.9886755 162 -170.5523903 90.8329891 163 101.8467529 -170.5523903 164 -115.5029686 101.8467529 165 34.0765907 -115.5029686 166 5.2826954 34.0765907 167 61.4303432 5.2826954 168 197.4333385 61.4303432 169 -110.1493359 197.4333385 170 -40.0961504 -110.1493359 171 67.3902663 -40.0961504 172 64.7058936 67.3902663 173 -53.8443879 64.7058936 174 0.4066586 -53.8443879 175 -199.7810770 0.4066586 176 86.1364719 -199.7810770 177 136.8620778 86.1364719 178 -11.3367625 136.8620778 179 -280.3710485 -11.3367625 180 -8.5914840 -280.3710485 181 -43.0529344 -8.5914840 182 60.9727357 -43.0529344 183 -29.5959760 60.9727357 184 56.0419524 -29.5959760 185 24.4779132 56.0419524 186 -44.2655568 24.4779132 187 -65.6460954 -44.2655568 188 46.8940240 -65.6460954 189 62.5259212 46.8940240 190 82.8835558 62.5259212 191 NA 82.8835558 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 19.5060093 -34.4485500 [2,] -26.4242569 19.5060093 [3,] -105.3400922 -26.4242569 [4,] 46.0499047 -105.3400922 [5,] -1.5444405 46.0499047 [6,] -65.0399790 -1.5444405 [7,] 57.4335338 -65.0399790 [8,] -4.5965794 57.4335338 [9,] -261.3476932 -4.5965794 [10,] 115.1835032 -261.3476932 [11,] -34.4622883 115.1835032 [12,] -133.7020628 -34.4622883 [13,] 142.2910767 -133.7020628 [14,] 73.0082034 142.2910767 [15,] 104.0896752 73.0082034 [16,] -16.7021639 104.0896752 [17,] -149.7676473 -16.7021639 [18,] 72.3098374 -149.7676473 [19,] 137.9569120 72.3098374 [20,] -91.4837275 137.9569120 [21,] 36.1316214 -91.4837275 [22,] -5.7256766 36.1316214 [23,] 117.8627057 -5.7256766 [24,] 214.6009971 117.8627057 [25,] 47.6299261 214.6009971 [26,] 7.4654861 47.6299261 [27,] 22.0923680 7.4654861 [28,] 68.8570039 22.0923680 [29,] 82.6235400 68.8570039 [30,] -18.2191222 82.6235400 [31,] 327.8687847 -18.2191222 [32,] -181.2578278 327.8687847 [33,] 25.8836899 -181.2578278 [34,] 168.0622792 25.8836899 [35,] -200.0932307 168.0622792 [36,] 192.3805810 -200.0932307 [37,] 69.8750669 192.3805810 [38,] 183.9778974 69.8750669 [39,] -141.1969343 183.9778974 [40,] 171.4713001 -141.1969343 [41,] 80.9733564 171.4713001 [42,] 303.2520161 80.9733564 [43,] -10.7510928 303.2520161 [44,] -12.0319282 -10.7510928 [45,] -94.9317813 -12.0319282 [46,] 36.7894275 -94.9317813 [47,] 251.0417510 36.7894275 [48,] 84.7524293 251.0417510 [49,] 365.8558258 84.7524293 [50,] -211.7742690 365.8558258 [51,] 213.5468601 -211.7742690 [52,] 224.0360492 213.5468601 [53,] 10.9347763 224.0360492 [54,] 207.7285400 10.9347763 [55,] 16.6785768 207.7285400 [56,] 227.4997242 16.6785768 [57,] 187.3823435 227.4997242 [58,] 79.9052658 187.3823435 [59,] 59.5708084 79.9052658 [60,] -110.2529564 59.5708084 [61,] -11.6978585 -110.2529564 [62,] 16.4930993 -11.6978585 [63,] -171.6128462 16.4930993 [64,] -38.3771699 -171.6128462 [65,] 144.8494396 -38.3771699 [66,] -9.2934918 144.8494396 [67,] 42.8080749 -9.2934918 [68,] 149.4170804 42.8080749 [69,] 200.9994304 149.4170804 [70,] 117.1780197 200.9994304 [71,] -19.6165111 117.1780197 [72,] -47.3025036 -19.6165111 [73,] -225.1662061 -47.3025036 [74,] 120.4930993 -225.1662061 [75,] -36.1196761 120.4930993 [76,] -9.4294099 -36.1196761 [77,] -16.7675495 -9.4294099 [78,] -126.4366498 -16.7675495 [79,] -78.7786082 -126.4366498 [80,] 131.2023434 -78.7786082 [81,] -195.4853677 131.2023434 [82,] -164.4115518 -195.4853677 [83,] 194.8518365 -164.4115518 [84,] -342.3990029 194.8518365 [85,] 230.4178820 -342.3990029 [86,] -132.8154442 230.4178820 [87,] -30.1499821 -132.8154442 [88,] 73.1518875 -30.1499821 [89,] -182.4535225 73.1518875 [90,] 95.6129952 -182.4535225 [91,] -276.2441651 95.6129952 [92,] -17.3128585 -276.2441651 [93,] -42.3586602 -17.3128585 [94,] -159.3454564 -42.3586602 [95,] 158.0060593 -159.3454564 [96,] -5.0628463 158.0060593 [97,] -26.1385929 -5.0628463 [98,] -133.9283940 -26.1385929 [99,] 64.7701647 -133.9283940 [100,] -197.7021639 64.7701647 [101,] 27.2682400 -197.7021639 [102,] -104.3485225 27.2682400 [103,] 111.3371323 -104.3485225 [104,] -89.0483787 111.3371323 [105,] -132.2016467 -89.0483787 [106,] -79.6374515 -132.2016467 [107,] -97.8425085 -79.6374515 [108,] 263.9509114 -97.8425085 [109,] -62.2846394 263.9509114 [110,] -17.7190427 -62.2846394 [111,] 87.5359909 -17.7190427 [112,] -210.8922740 87.5359909 [113,] 46.8219243 -210.8922740 [114,] 27.8470711 46.8219243 [115,] 24.5299353 27.8470711 [116,] 40.2298588 24.5299353 [117,] -166.1575831 40.2298588 [118,] -59.6760316 -166.1575831 [119,] 40.5514694 -59.6760316 [120,] 131.8159298 40.5514694 [121,] -206.4692660 131.8159298 [122,] 180.0027199 -206.4692660 [123,] 19.2329310 180.0027199 [124,] 21.1794028 19.2329310 [125,] 2.8192314 21.1794028 [126,] -148.4669558 2.8192314 [127,] -60.7483022 -148.4669558 [128,] 61.4034206 -60.7483022 [129,] -174.4275464 61.4034206 [130,] -58.5245017 -174.4275464 [131,] 80.1410410 -58.5245017 [132,] 37.5019028 80.1410410 [133,] -126.8548720 37.5019028 [134,] -11.4462887 -126.8548720 [135,] -15.9378401 -11.4462887 [136,] -139.9804013 -15.9378401 [137,] 72.7283135 -139.9804013 [138,] -114.1887183 72.7283135 [139,] -0.7537857 -114.1887183 [140,] -146.8032379 -0.7537857 [141,] 177.8865784 -146.8032379 [142,] -167.5189203 177.8865784 [143,] -63.7872822 -167.5189203 [144,] -215.4926137 -63.7872822 [145,] -52.8631461 -215.4926137 [146,] -3.5675127 -52.8631461 [147,] -16.0370323 -3.5675127 [148,] 16.5788643 -16.0370323 [149,] -179.9521761 16.5788643 [150,] 93.6542682 -179.9521761 [151,] -127.7565763 93.6542682 [152,] -84.7454166 -127.7565763 [153,] 205.1620252 -84.7454166 [154,] 100.8916059 205.1620252 [155,] -267.2831451 100.8916059 [156,] -225.1840702 -267.2831451 [157,] -10.8989356 -225.1840702 [158,] -64.6418824 -10.8989356 [159,] -32.6678769 -64.6418824 [160,] -128.9886755 -32.6678769 [161,] 90.8329891 -128.9886755 [162,] -170.5523903 90.8329891 [163,] 101.8467529 -170.5523903 [164,] -115.5029686 101.8467529 [165,] 34.0765907 -115.5029686 [166,] 5.2826954 34.0765907 [167,] 61.4303432 5.2826954 [168,] 197.4333385 61.4303432 [169,] -110.1493359 197.4333385 [170,] -40.0961504 -110.1493359 [171,] 67.3902663 -40.0961504 [172,] 64.7058936 67.3902663 [173,] -53.8443879 64.7058936 [174,] 0.4066586 -53.8443879 [175,] -199.7810770 0.4066586 [176,] 86.1364719 -199.7810770 [177,] 136.8620778 86.1364719 [178,] -11.3367625 136.8620778 [179,] -280.3710485 -11.3367625 [180,] -8.5914840 -280.3710485 [181,] -43.0529344 -8.5914840 [182,] 60.9727357 -43.0529344 [183,] -29.5959760 60.9727357 [184,] 56.0419524 -29.5959760 [185,] 24.4779132 56.0419524 [186,] -44.2655568 24.4779132 [187,] -65.6460954 -44.2655568 [188,] 46.8940240 -65.6460954 [189,] 62.5259212 46.8940240 [190,] 82.8835558 62.5259212 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 19.5060093 -34.4485500 2 -26.4242569 19.5060093 3 -105.3400922 -26.4242569 4 46.0499047 -105.3400922 5 -1.5444405 46.0499047 6 -65.0399790 -1.5444405 7 57.4335338 -65.0399790 8 -4.5965794 57.4335338 9 -261.3476932 -4.5965794 10 115.1835032 -261.3476932 11 -34.4622883 115.1835032 12 -133.7020628 -34.4622883 13 142.2910767 -133.7020628 14 73.0082034 142.2910767 15 104.0896752 73.0082034 16 -16.7021639 104.0896752 17 -149.7676473 -16.7021639 18 72.3098374 -149.7676473 19 137.9569120 72.3098374 20 -91.4837275 137.9569120 21 36.1316214 -91.4837275 22 -5.7256766 36.1316214 23 117.8627057 -5.7256766 24 214.6009971 117.8627057 25 47.6299261 214.6009971 26 7.4654861 47.6299261 27 22.0923680 7.4654861 28 68.8570039 22.0923680 29 82.6235400 68.8570039 30 -18.2191222 82.6235400 31 327.8687847 -18.2191222 32 -181.2578278 327.8687847 33 25.8836899 -181.2578278 34 168.0622792 25.8836899 35 -200.0932307 168.0622792 36 192.3805810 -200.0932307 37 69.8750669 192.3805810 38 183.9778974 69.8750669 39 -141.1969343 183.9778974 40 171.4713001 -141.1969343 41 80.9733564 171.4713001 42 303.2520161 80.9733564 43 -10.7510928 303.2520161 44 -12.0319282 -10.7510928 45 -94.9317813 -12.0319282 46 36.7894275 -94.9317813 47 251.0417510 36.7894275 48 84.7524293 251.0417510 49 365.8558258 84.7524293 50 -211.7742690 365.8558258 51 213.5468601 -211.7742690 52 224.0360492 213.5468601 53 10.9347763 224.0360492 54 207.7285400 10.9347763 55 16.6785768 207.7285400 56 227.4997242 16.6785768 57 187.3823435 227.4997242 58 79.9052658 187.3823435 59 59.5708084 79.9052658 60 -110.2529564 59.5708084 61 -11.6978585 -110.2529564 62 16.4930993 -11.6978585 63 -171.6128462 16.4930993 64 -38.3771699 -171.6128462 65 144.8494396 -38.3771699 66 -9.2934918 144.8494396 67 42.8080749 -9.2934918 68 149.4170804 42.8080749 69 200.9994304 149.4170804 70 117.1780197 200.9994304 71 -19.6165111 117.1780197 72 -47.3025036 -19.6165111 73 -225.1662061 -47.3025036 74 120.4930993 -225.1662061 75 -36.1196761 120.4930993 76 -9.4294099 -36.1196761 77 -16.7675495 -9.4294099 78 -126.4366498 -16.7675495 79 -78.7786082 -126.4366498 80 131.2023434 -78.7786082 81 -195.4853677 131.2023434 82 -164.4115518 -195.4853677 83 194.8518365 -164.4115518 84 -342.3990029 194.8518365 85 230.4178820 -342.3990029 86 -132.8154442 230.4178820 87 -30.1499821 -132.8154442 88 73.1518875 -30.1499821 89 -182.4535225 73.1518875 90 95.6129952 -182.4535225 91 -276.2441651 95.6129952 92 -17.3128585 -276.2441651 93 -42.3586602 -17.3128585 94 -159.3454564 -42.3586602 95 158.0060593 -159.3454564 96 -5.0628463 158.0060593 97 -26.1385929 -5.0628463 98 -133.9283940 -26.1385929 99 64.7701647 -133.9283940 100 -197.7021639 64.7701647 101 27.2682400 -197.7021639 102 -104.3485225 27.2682400 103 111.3371323 -104.3485225 104 -89.0483787 111.3371323 105 -132.2016467 -89.0483787 106 -79.6374515 -132.2016467 107 -97.8425085 -79.6374515 108 263.9509114 -97.8425085 109 -62.2846394 263.9509114 110 -17.7190427 -62.2846394 111 87.5359909 -17.7190427 112 -210.8922740 87.5359909 113 46.8219243 -210.8922740 114 27.8470711 46.8219243 115 24.5299353 27.8470711 116 40.2298588 24.5299353 117 -166.1575831 40.2298588 118 -59.6760316 -166.1575831 119 40.5514694 -59.6760316 120 131.8159298 40.5514694 121 -206.4692660 131.8159298 122 180.0027199 -206.4692660 123 19.2329310 180.0027199 124 21.1794028 19.2329310 125 2.8192314 21.1794028 126 -148.4669558 2.8192314 127 -60.7483022 -148.4669558 128 61.4034206 -60.7483022 129 -174.4275464 61.4034206 130 -58.5245017 -174.4275464 131 80.1410410 -58.5245017 132 37.5019028 80.1410410 133 -126.8548720 37.5019028 134 -11.4462887 -126.8548720 135 -15.9378401 -11.4462887 136 -139.9804013 -15.9378401 137 72.7283135 -139.9804013 138 -114.1887183 72.7283135 139 -0.7537857 -114.1887183 140 -146.8032379 -0.7537857 141 177.8865784 -146.8032379 142 -167.5189203 177.8865784 143 -63.7872822 -167.5189203 144 -215.4926137 -63.7872822 145 -52.8631461 -215.4926137 146 -3.5675127 -52.8631461 147 -16.0370323 -3.5675127 148 16.5788643 -16.0370323 149 -179.9521761 16.5788643 150 93.6542682 -179.9521761 151 -127.7565763 93.6542682 152 -84.7454166 -127.7565763 153 205.1620252 -84.7454166 154 100.8916059 205.1620252 155 -267.2831451 100.8916059 156 -225.1840702 -267.2831451 157 -10.8989356 -225.1840702 158 -64.6418824 -10.8989356 159 -32.6678769 -64.6418824 160 -128.9886755 -32.6678769 161 90.8329891 -128.9886755 162 -170.5523903 90.8329891 163 101.8467529 -170.5523903 164 -115.5029686 101.8467529 165 34.0765907 -115.5029686 166 5.2826954 34.0765907 167 61.4303432 5.2826954 168 197.4333385 61.4303432 169 -110.1493359 197.4333385 170 -40.0961504 -110.1493359 171 67.3902663 -40.0961504 172 64.7058936 67.3902663 173 -53.8443879 64.7058936 174 0.4066586 -53.8443879 175 -199.7810770 0.4066586 176 86.1364719 -199.7810770 177 136.8620778 86.1364719 178 -11.3367625 136.8620778 179 -280.3710485 -11.3367625 180 -8.5914840 -280.3710485 181 -43.0529344 -8.5914840 182 60.9727357 -43.0529344 183 -29.5959760 60.9727357 184 56.0419524 -29.5959760 185 24.4779132 56.0419524 186 -44.2655568 24.4779132 187 -65.6460954 -44.2655568 188 46.8940240 -65.6460954 189 62.5259212 46.8940240 190 82.8835558 62.5259212 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/7kjgj1384957268.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/8hxtg1384957268.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/9ocr61384957268.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/fisher/rcomp/tmp/10shmh1384957268.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, signif(mysum$coefficients[i,1],6), sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/11t0im1384957268.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,signif(mysum$coefficients[i,1],6)) + a<-table.element(a, signif(mysum$coefficients[i,2],6)) + a<-table.element(a, signif(mysum$coefficients[i,3],4)) + a<-table.element(a, signif(mysum$coefficients[i,4],6)) + a<-table.element(a, signif(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/12ngp01384957268.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, signif(sqrt(mysum$r.squared),6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, signif(mysum$r.squared,6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, signif(mysum$adj.r.squared,6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, signif(mysum$fstatistic[1],6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, signif(mysum$fstatistic[2],6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, signif(mysum$fstatistic[3],6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6)) > 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, signif(mysum$sigma,6)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, signif(sum(myerror*myerror),6)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/138tln1384957268.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,signif(x[i],6)) + a<-table.element(a,signif(x[i]-mysum$resid[i],6)) + a<-table.element(a,signif(mysum$resid[i],6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/14uj8j1384957268.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,signif(gqarr[mypoint-kp3+1,1],6)) + a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6)) + a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6)) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/fisher/rcomp/tmp/15lamk1384957268.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,signif(numsignificant1,6)) + a<-table.element(a,signif(numsignificant1/numgqtests,6)) + 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,signif(numsignificant5,6)) + a<-table.element(a,signif(numsignificant5/numgqtests,6)) + 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,signif(numsignificant10,6)) + a<-table.element(a,signif(numsignificant10/numgqtests,6)) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/fisher/rcomp/tmp/16sz821384957268.tab") + } > > try(system("convert tmp/18xl11384957268.ps tmp/18xl11384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/2fvvq1384957268.ps tmp/2fvvq1384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/32e2c1384957268.ps tmp/32e2c1384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/459gv1384957268.ps tmp/459gv1384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/51mev1384957268.ps tmp/51mev1384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/6r1pw1384957268.ps tmp/6r1pw1384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/7kjgj1384957268.ps tmp/7kjgj1384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/8hxtg1384957268.ps tmp/8hxtg1384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/9ocr61384957268.ps tmp/9ocr61384957268.png",intern=TRUE)) character(0) > try(system("convert tmp/10shmh1384957268.ps tmp/10shmh1384957268.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.767 1.424 10.185