R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(1632 + ,0 + ,1385 + ,1507 + ,1508 + ,1687 + ,1511 + ,0 + ,1632 + ,1385 + ,1507 + ,1508 + ,1559 + ,0 + ,1511 + ,1632 + ,1385 + ,1507 + ,1630 + ,0 + ,1559 + ,1511 + ,1632 + ,1385 + ,1579 + ,0 + ,1630 + ,1559 + ,1511 + ,1632 + ,1653 + ,0 + ,1579 + ,1630 + ,1559 + ,1511 + ,2152 + ,0 + ,1653 + ,1579 + ,1630 + ,1559 + ,2148 + ,0 + ,2152 + ,1653 + ,1579 + ,1630 + ,1752 + ,0 + ,2148 + ,2152 + ,1653 + ,1579 + ,1765 + ,0 + ,1752 + ,2148 + ,2152 + ,1653 + ,1717 + ,0 + ,1765 + ,1752 + ,2148 + ,2152 + ,1558 + ,0 + ,1717 + ,1765 + ,1752 + ,2148 + ,1575 + ,0 + ,1558 + ,1717 + ,1765 + ,1752 + ,1520 + ,0 + ,1575 + ,1558 + ,1717 + ,1765 + ,1805 + ,0 + ,1520 + ,1575 + ,1558 + ,1717 + ,1800 + ,0 + ,1805 + ,1520 + ,1575 + ,1558 + ,1719 + ,0 + ,1800 + ,1805 + ,1520 + ,1575 + ,2008 + ,0 + ,1719 + ,1800 + ,1805 + ,1520 + ,2242 + ,0 + ,2008 + ,1719 + ,1800 + ,1805 + ,2478 + ,0 + ,2242 + ,2008 + ,1719 + ,1800 + ,2030 + ,0 + ,2478 + ,2242 + ,2008 + ,1719 + ,1655 + ,0 + ,2030 + ,2478 + ,2242 + ,2008 + ,1693 + ,0 + ,1655 + ,2030 + ,2478 + ,2242 + ,1623 + ,0 + ,1693 + ,1655 + ,2030 + ,2478 + ,1805 + ,0 + ,1623 + ,1693 + ,1655 + ,2030 + ,1746 + ,0 + ,1805 + ,1623 + ,1693 + ,1655 + ,1795 + ,0 + ,1746 + ,1805 + ,1623 + ,1693 + ,1926 + ,0 + ,1795 + ,1746 + ,1805 + ,1623 + ,1619 + ,0 + ,1926 + ,1795 + ,1746 + ,1805 + ,1992 + ,0 + ,1619 + ,1926 + ,1795 + ,1746 + ,2233 + ,0 + ,1992 + ,1619 + ,1926 + ,1795 + ,2192 + ,0 + ,2233 + ,1992 + ,1619 + ,1926 + ,2080 + ,0 + ,2192 + ,2233 + ,1992 + ,1619 + ,1768 + ,0 + ,2080 + ,2192 + ,2233 + ,1992 + ,1835 + ,0 + ,1768 + ,2080 + ,2192 + ,2233 + ,1569 + ,0 + ,1835 + ,1768 + ,2080 + ,2192 + ,1976 + ,0 + ,1569 + ,1835 + ,1768 + ,2080 + ,1853 + ,0 + ,1976 + ,1569 + ,1835 + ,1768 + ,1965 + ,0 + ,1853 + ,1976 + ,1569 + ,1835 + ,1689 + ,0 + ,1965 + ,1853 + ,1976 + ,1569 + ,1778 + ,0 + ,1689 + ,1965 + ,1853 + ,1976 + ,1976 + ,0 + ,1778 + ,1689 + ,1965 + ,1853 + ,2397 + ,0 + ,1976 + ,1778 + ,1689 + ,1965 + ,2654 + ,0 + ,2397 + ,1976 + ,1778 + ,1689 + ,2097 + ,0 + ,2654 + ,2397 + ,1976 + ,1778 + ,1963 + ,0 + ,2097 + ,2654 + ,2397 + ,1976 + ,1677 + ,0 + ,1963 + ,2097 + ,2654 + ,2397 + ,1941 + ,0 + ,1677 + ,1963 + ,2097 + ,2654 + ,2003 + ,0 + ,1941 + ,1677 + ,1963 + ,2097 + ,1813 + ,0 + ,2003 + ,1941 + ,1677 + ,1963 + ,2012 + ,0 + ,1813 + ,2003 + ,1941 + ,1677 + ,1912 + ,0 + ,2012 + ,1813 + ,2003 + ,1941 + ,2084 + ,0 + ,1912 + ,2012 + ,1813 + ,2003 + ,2080 + ,0 + ,2084 + ,1912 + ,2012 + ,1813 + ,2118 + ,0 + ,2080 + ,2084 + ,1912 + ,2012 + ,2150 + ,0 + ,2118 + ,2080 + ,2084 + ,1912 + ,1608 + ,0 + ,2150 + ,2118 + ,2080 + ,2084 + ,1503 + ,0 + ,1608 + ,2150 + ,2118 + ,2080 + ,1548 + ,0 + ,1503 + ,1608 + ,2150 + ,2118 + ,1382 + ,0 + ,1548 + ,1503 + ,1608 + ,2150 + ,1731 + ,0 + ,1382 + ,1548 + ,1503 + ,1608 + ,1798 + ,0 + ,1731 + ,1382 + ,1548 + ,1503 + ,1779 + ,0 + ,1798 + ,1731 + ,1382 + ,1548 + ,1887 + ,0 + ,1779 + ,1798 + ,1731 + ,1382 + ,2004 + ,0 + ,1887 + ,1779 + ,1798 + ,1731 + ,2077 + ,0 + ,2004 + ,1887 + ,1779 + ,1798 + ,2092 + ,0 + ,2077 + ,2004 + ,1887 + ,1779 + ,2051 + ,0 + ,2092 + ,2077 + ,2004 + ,1887 + ,1577 + ,0 + ,2051 + ,2092 + ,2077 + ,2004 + ,1356 + ,0 + ,1577 + ,2051 + ,2092 + ,2077 + ,1652 + ,0 + ,1356 + ,1577 + ,2051 + ,2092 + ,1382 + ,0 + ,1652 + ,1356 + ,1577 + ,2051 + ,1519 + ,0 + ,1382 + ,1652 + ,1356 + ,1577 + ,1421 + ,0 + ,1519 + ,1382 + ,1652 + ,1356 + ,1442 + ,0 + ,1421 + ,1519 + ,1382 + ,1652 + ,1543 + ,0 + ,1442 + ,1421 + ,1519 + ,1382 + ,1656 + ,0 + ,1543 + ,1442 + ,1421 + ,1519 + ,1561 + ,0 + ,1656 + ,1543 + ,1442 + ,1421 + ,1905 + ,0 + ,1561 + ,1656 + ,1543 + ,1442 + ,2199 + ,0 + ,1905 + ,1561 + ,1656 + ,1543 + ,1473 + ,0 + ,2199 + ,1905 + ,1561 + ,1656 + ,1655 + ,0 + ,1473 + ,2199 + ,1905 + ,1561 + ,1407 + ,0 + ,1655 + ,1473 + ,2199 + ,1905 + ,1395 + ,0 + ,1407 + ,1655 + ,1473 + ,2199 + ,1530 + ,0 + ,1395 + ,1407 + ,1655 + ,1473 + ,1309 + ,0 + ,1530 + ,1395 + ,1407 + ,1655 + ,1526 + ,0 + ,1309 + ,1530 + ,1395 + ,1407 + ,1327 + ,0 + ,1526 + ,1309 + ,1530 + ,1395 + ,1627 + ,0 + ,1327 + ,1526 + ,1309 + ,1530 + ,1748 + ,0 + ,1627 + ,1327 + ,1526 + ,1309 + ,1958 + ,0 + ,1748 + ,1627 + ,1327 + ,1526 + ,2274 + ,0 + ,1958 + ,1748 + ,1627 + ,1327 + ,1648 + ,0 + ,2274 + ,1958 + ,1748 + ,1627 + ,1401 + ,0 + ,1648 + ,2274 + ,1958 + ,1748 + ,1411 + ,0 + ,1401 + ,1648 + ,2274 + ,1958 + ,1403 + ,0 + ,1411 + ,1401 + ,1648 + ,2274 + ,1394 + ,0 + ,1403 + ,1411 + ,1401 + ,1648 + ,1520 + ,0 + ,1394 + ,1403 + ,1411 + ,1401 + ,1528 + ,0 + ,1520 + ,1394 + ,1403 + ,1411 + ,1643 + ,0 + ,1528 + ,1520 + ,1394 + ,1403 + ,1515 + ,0 + ,1643 + ,1528 + ,1520 + ,1394 + ,1685 + ,0 + ,1515 + ,1643 + ,1528 + ,1520 + ,2000 + ,0 + ,1685 + ,1515 + ,1643 + ,1528 + ,2215 + ,0 + ,2000 + ,1685 + ,1515 + ,1643 + ,1956 + ,0 + ,2215 + ,2000 + ,1685 + ,1515 + ,1462 + ,0 + ,1956 + ,2215 + ,2000 + ,1685 + ,1563 + ,0 + ,1462 + ,1956 + ,2215 + ,2000 + ,1459 + ,0 + ,1563 + ,1462 + ,1956 + ,2215 + ,1446 + ,0 + ,1459 + ,1563 + ,1462 + ,1956 + ,1622 + ,0 + ,1446 + ,1459 + ,1563 + ,1462 + ,1657 + ,0 + ,1622 + ,1446 + ,1459 + ,1563 + ,1638 + ,0 + ,1657 + ,1622 + ,1446 + ,1459 + ,1643 + ,0 + ,1638 + ,1657 + ,1622 + ,1446 + ,1683 + ,0 + ,1643 + ,1638 + ,1657 + ,1622 + ,2050 + ,0 + ,1683 + ,1643 + ,1638 + ,1657 + ,2262 + ,0 + ,2050 + ,1683 + ,1643 + ,1638 + ,1813 + ,0 + ,2262 + ,2050 + ,1683 + ,1643 + ,1445 + ,0 + ,1813 + ,2262 + ,2050 + ,1683 + ,1762 + ,0 + ,1445 + ,1813 + ,2262 + ,2050 + ,1461 + ,0 + ,1762 + ,1445 + ,1813 + ,2262 + ,1556 + ,0 + ,1461 + ,1762 + ,1445 + ,1813 + ,1431 + ,0 + ,1556 + ,1461 + ,1762 + ,1445 + ,1427 + ,0 + ,1431 + ,1556 + ,1461 + ,1762 + ,1554 + ,0 + ,1427 + ,1431 + ,1556 + ,1461 + ,1645 + ,0 + ,1554 + ,1427 + ,1431 + ,1556 + ,1653 + ,0 + ,1645 + ,1554 + ,1427 + ,1431 + ,2016 + ,0 + ,1653 + ,1645 + ,1554 + ,1427 + ,2207 + ,0 + ,2016 + ,1653 + ,1645 + ,1554 + ,1665 + ,0 + ,2207 + ,2016 + ,1653 + ,1645 + ,1361 + ,0 + ,1665 + ,2207 + ,2016 + ,1653 + ,1506 + ,0 + ,1361 + ,1665 + ,2207 + ,2016 + ,1360 + ,0 + ,1506 + ,1361 + ,1665 + ,2207 + ,1453 + ,0 + ,1360 + ,1506 + ,1361 + ,1665 + ,1522 + ,0 + ,1453 + ,1360 + ,1506 + ,1361 + ,1460 + ,0 + ,1522 + ,1453 + ,1360 + ,1506 + ,1552 + ,0 + ,1460 + ,1522 + ,1453 + ,1360 + ,1548 + ,0 + ,1552 + ,1460 + ,1522 + ,1453 + ,1827 + ,0 + ,1548 + ,1552 + ,1460 + ,1522 + ,1737 + ,0 + ,1827 + ,1548 + ,1552 + ,1460 + ,1941 + ,0 + ,1737 + ,1827 + ,1548 + ,1552 + ,1474 + ,0 + ,1941 + ,1737 + ,1827 + ,1548 + ,1458 + ,0 + ,1474 + ,1941 + ,1737 + ,1827 + ,1542 + ,0 + ,1458 + ,1474 + ,1941 + ,1737 + ,1404 + ,0 + ,1542 + ,1458 + ,1474 + ,1941 + ,1522 + ,0 + ,1404 + ,1542 + ,1458 + ,1474 + ,1385 + ,0 + ,1522 + ,1404 + ,1542 + ,1458 + ,1641 + ,0 + ,1385 + ,1522 + ,1404 + ,1542 + ,1510 + ,0 + ,1641 + ,1385 + ,1522 + ,1404 + ,1681 + ,0 + ,1510 + ,1641 + ,1385 + ,1522 + ,1938 + ,0 + ,1681 + ,1510 + ,1641 + ,1385 + ,1868 + ,0 + ,1938 + ,1681 + ,1510 + ,1641 + ,1726 + ,0 + ,1868 + ,1938 + ,1681 + ,1510 + ,1456 + ,0 + ,1726 + ,1868 + ,1938 + ,1681 + ,1445 + ,0 + ,1456 + ,1726 + ,1868 + ,1938 + ,1456 + ,0 + ,1445 + ,1456 + ,1726 + ,1868 + ,1365 + ,0 + ,1456 + ,1445 + ,1456 + ,1726 + ,1487 + ,0 + ,1365 + ,1456 + ,1445 + ,1456 + ,1558 + ,0 + ,1487 + ,1365 + ,1456 + ,1445 + ,1488 + ,0 + ,1558 + ,1487 + ,1365 + ,1456 + ,1684 + ,0 + ,1488 + ,1558 + ,1487 + ,1365 + ,1594 + ,0 + ,1684 + ,1488 + ,1558 + ,1487 + ,1850 + ,0 + ,1594 + ,1684 + ,1488 + ,1558 + ,1998 + ,0 + ,1850 + ,1594 + ,1684 + ,1488 + ,2079 + ,0 + ,1998 + ,1850 + ,1594 + ,1684 + ,1494 + ,0 + ,2079 + ,1998 + ,1850 + ,1594 + ,1057 + ,1 + ,1494 + ,2079 + ,1998 + ,1850 + ,1218 + ,1 + ,1057 + ,1494 + ,2079 + ,1998 + ,1168 + ,1 + ,1218 + ,1057 + ,1494 + ,2079 + ,1236 + ,1 + ,1168 + ,1218 + ,1057 + ,1494 + ,1076 + ,1 + ,1236 + ,1168 + ,1218 + ,1057 + ,1174 + ,1 + ,1076 + ,1236 + ,1168 + ,1218 + ,1139 + ,1 + ,1174 + ,1076 + ,1236 + ,1168 + ,1427 + ,1 + ,1139 + ,1174 + ,1076 + ,1236 + ,1487 + ,1 + ,1427 + ,1139 + ,1174 + ,1076 + ,1483 + ,1 + ,1487 + ,1427 + ,1139 + ,1174 + ,1513 + ,1 + ,1483 + ,1487 + ,1427 + ,1139 + ,1357 + ,1 + ,1513 + ,1483 + ,1487 + ,1427 + ,1165 + ,1 + ,1357 + ,1513 + ,1483 + ,1487 + ,1282 + ,1 + ,1165 + ,1357 + ,1513 + ,1483 + ,1110 + ,1 + ,1282 + ,1165 + ,1357 + ,1513 + ,1297 + ,1 + ,1110 + ,1282 + ,1165 + ,1357 + ,1185 + ,1 + ,1297 + ,1110 + ,1282 + ,1165 + ,1222 + ,1 + ,1185 + ,1297 + ,1110 + ,1282 + ,1284 + ,1 + ,1222 + ,1185 + ,1297 + ,1110 + ,1444 + ,1 + ,1284 + ,1222 + ,1185 + ,1297 + ,1575 + ,1 + ,1444 + ,1284 + ,1222 + ,1185 + ,1737 + ,1 + ,1575 + ,1444 + ,1284 + ,1222 + ,1763 + ,1 + ,1737 + ,1575 + ,1444 + ,1284) + ,dim=c(6 + ,188) + ,dimnames=list(c('Y' + ,'X' + ,'Y1' + ,'Y2' + ,'Y3' + ,'Y4') + ,1:188)) > y <- array(NA,dim=c(6,188),dimnames=list(c('Y','X','Y1','Y2','Y3','Y4'),1:188)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > ylab = '' > xlab = '' > main = '' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Y X Y1 Y2 Y3 Y4 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 1632 0 1385 1507 1508 1687 1 0 0 0 0 0 0 0 0 0 0 1 2 1511 0 1632 1385 1507 1508 0 1 0 0 0 0 0 0 0 0 0 2 3 1559 0 1511 1632 1385 1507 0 0 1 0 0 0 0 0 0 0 0 3 4 1630 0 1559 1511 1632 1385 0 0 0 1 0 0 0 0 0 0 0 4 5 1579 0 1630 1559 1511 1632 0 0 0 0 1 0 0 0 0 0 0 5 6 1653 0 1579 1630 1559 1511 0 0 0 0 0 1 0 0 0 0 0 6 7 2152 0 1653 1579 1630 1559 0 0 0 0 0 0 1 0 0 0 0 7 8 2148 0 2152 1653 1579 1630 0 0 0 0 0 0 0 1 0 0 0 8 9 1752 0 2148 2152 1653 1579 0 0 0 0 0 0 0 0 1 0 0 9 10 1765 0 1752 2148 2152 1653 0 0 0 0 0 0 0 0 0 1 0 10 11 1717 0 1765 1752 2148 2152 0 0 0 0 0 0 0 0 0 0 1 11 12 1558 0 1717 1765 1752 2148 0 0 0 0 0 0 0 0 0 0 0 12 13 1575 0 1558 1717 1765 1752 1 0 0 0 0 0 0 0 0 0 0 13 14 1520 0 1575 1558 1717 1765 0 1 0 0 0 0 0 0 0 0 0 14 15 1805 0 1520 1575 1558 1717 0 0 1 0 0 0 0 0 0 0 0 15 16 1800 0 1805 1520 1575 1558 0 0 0 1 0 0 0 0 0 0 0 16 17 1719 0 1800 1805 1520 1575 0 0 0 0 1 0 0 0 0 0 0 17 18 2008 0 1719 1800 1805 1520 0 0 0 0 0 1 0 0 0 0 0 18 19 2242 0 2008 1719 1800 1805 0 0 0 0 0 0 1 0 0 0 0 19 20 2478 0 2242 2008 1719 1800 0 0 0 0 0 0 0 1 0 0 0 20 21 2030 0 2478 2242 2008 1719 0 0 0 0 0 0 0 0 1 0 0 21 22 1655 0 2030 2478 2242 2008 0 0 0 0 0 0 0 0 0 1 0 22 23 1693 0 1655 2030 2478 2242 0 0 0 0 0 0 0 0 0 0 1 23 24 1623 0 1693 1655 2030 2478 0 0 0 0 0 0 0 0 0 0 0 24 25 1805 0 1623 1693 1655 2030 1 0 0 0 0 0 0 0 0 0 0 25 26 1746 0 1805 1623 1693 1655 0 1 0 0 0 0 0 0 0 0 0 26 27 1795 0 1746 1805 1623 1693 0 0 1 0 0 0 0 0 0 0 0 27 28 1926 0 1795 1746 1805 1623 0 0 0 1 0 0 0 0 0 0 0 28 29 1619 0 1926 1795 1746 1805 0 0 0 0 1 0 0 0 0 0 0 29 30 1992 0 1619 1926 1795 1746 0 0 0 0 0 1 0 0 0 0 0 30 31 2233 0 1992 1619 1926 1795 0 0 0 0 0 0 1 0 0 0 0 31 32 2192 0 2233 1992 1619 1926 0 0 0 0 0 0 0 1 0 0 0 32 33 2080 0 2192 2233 1992 1619 0 0 0 0 0 0 0 0 1 0 0 33 34 1768 0 2080 2192 2233 1992 0 0 0 0 0 0 0 0 0 1 0 34 35 1835 0 1768 2080 2192 2233 0 0 0 0 0 0 0 0 0 0 1 35 36 1569 0 1835 1768 2080 2192 0 0 0 0 0 0 0 0 0 0 0 36 37 1976 0 1569 1835 1768 2080 1 0 0 0 0 0 0 0 0 0 0 37 38 1853 0 1976 1569 1835 1768 0 1 0 0 0 0 0 0 0 0 0 38 39 1965 0 1853 1976 1569 1835 0 0 1 0 0 0 0 0 0 0 0 39 40 1689 0 1965 1853 1976 1569 0 0 0 1 0 0 0 0 0 0 0 40 41 1778 0 1689 1965 1853 1976 0 0 0 0 1 0 0 0 0 0 0 41 42 1976 0 1778 1689 1965 1853 0 0 0 0 0 1 0 0 0 0 0 42 43 2397 0 1976 1778 1689 1965 0 0 0 0 0 0 1 0 0 0 0 43 44 2654 0 2397 1976 1778 1689 0 0 0 0 0 0 0 1 0 0 0 44 45 2097 0 2654 2397 1976 1778 0 0 0 0 0 0 0 0 1 0 0 45 46 1963 0 2097 2654 2397 1976 0 0 0 0 0 0 0 0 0 1 0 46 47 1677 0 1963 2097 2654 2397 0 0 0 0 0 0 0 0 0 0 1 47 48 1941 0 1677 1963 2097 2654 0 0 0 0 0 0 0 0 0 0 0 48 49 2003 0 1941 1677 1963 2097 1 0 0 0 0 0 0 0 0 0 0 49 50 1813 0 2003 1941 1677 1963 0 1 0 0 0 0 0 0 0 0 0 50 51 2012 0 1813 2003 1941 1677 0 0 1 0 0 0 0 0 0 0 0 51 52 1912 0 2012 1813 2003 1941 0 0 0 1 0 0 0 0 0 0 0 52 53 2084 0 1912 2012 1813 2003 0 0 0 0 1 0 0 0 0 0 0 53 54 2080 0 2084 1912 2012 1813 0 0 0 0 0 1 0 0 0 0 0 54 55 2118 0 2080 2084 1912 2012 0 0 0 0 0 0 1 0 0 0 0 55 56 2150 0 2118 2080 2084 1912 0 0 0 0 0 0 0 1 0 0 0 56 57 1608 0 2150 2118 2080 2084 0 0 0 0 0 0 0 0 1 0 0 57 58 1503 0 1608 2150 2118 2080 0 0 0 0 0 0 0 0 0 1 0 58 59 1548 0 1503 1608 2150 2118 0 0 0 0 0 0 0 0 0 0 1 59 60 1382 0 1548 1503 1608 2150 0 0 0 0 0 0 0 0 0 0 0 60 61 1731 0 1382 1548 1503 1608 1 0 0 0 0 0 0 0 0 0 0 61 62 1798 0 1731 1382 1548 1503 0 1 0 0 0 0 0 0 0 0 0 62 63 1779 0 1798 1731 1382 1548 0 0 1 0 0 0 0 0 0 0 0 63 64 1887 0 1779 1798 1731 1382 0 0 0 1 0 0 0 0 0 0 0 64 65 2004 0 1887 1779 1798 1731 0 0 0 0 1 0 0 0 0 0 0 65 66 2077 0 2004 1887 1779 1798 0 0 0 0 0 1 0 0 0 0 0 66 67 2092 0 2077 2004 1887 1779 0 0 0 0 0 0 1 0 0 0 0 67 68 2051 0 2092 2077 2004 1887 0 0 0 0 0 0 0 1 0 0 0 68 69 1577 0 2051 2092 2077 2004 0 0 0 0 0 0 0 0 1 0 0 69 70 1356 0 1577 2051 2092 2077 0 0 0 0 0 0 0 0 0 1 0 70 71 1652 0 1356 1577 2051 2092 0 0 0 0 0 0 0 0 0 0 1 71 72 1382 0 1652 1356 1577 2051 0 0 0 0 0 0 0 0 0 0 0 72 73 1519 0 1382 1652 1356 1577 1 0 0 0 0 0 0 0 0 0 0 73 74 1421 0 1519 1382 1652 1356 0 1 0 0 0 0 0 0 0 0 0 74 75 1442 0 1421 1519 1382 1652 0 0 1 0 0 0 0 0 0 0 0 75 76 1543 0 1442 1421 1519 1382 0 0 0 1 0 0 0 0 0 0 0 76 77 1656 0 1543 1442 1421 1519 0 0 0 0 1 0 0 0 0 0 0 77 78 1561 0 1656 1543 1442 1421 0 0 0 0 0 1 0 0 0 0 0 78 79 1905 0 1561 1656 1543 1442 0 0 0 0 0 0 1 0 0 0 0 79 80 2199 0 1905 1561 1656 1543 0 0 0 0 0 0 0 1 0 0 0 80 81 1473 0 2199 1905 1561 1656 0 0 0 0 0 0 0 0 1 0 0 81 82 1655 0 1473 2199 1905 1561 0 0 0 0 0 0 0 0 0 1 0 82 83 1407 0 1655 1473 2199 1905 0 0 0 0 0 0 0 0 0 0 1 83 84 1395 0 1407 1655 1473 2199 0 0 0 0 0 0 0 0 0 0 0 84 85 1530 0 1395 1407 1655 1473 1 0 0 0 0 0 0 0 0 0 0 85 86 1309 0 1530 1395 1407 1655 0 1 0 0 0 0 0 0 0 0 0 86 87 1526 0 1309 1530 1395 1407 0 0 1 0 0 0 0 0 0 0 0 87 88 1327 0 1526 1309 1530 1395 0 0 0 1 0 0 0 0 0 0 0 88 89 1627 0 1327 1526 1309 1530 0 0 0 0 1 0 0 0 0 0 0 89 90 1748 0 1627 1327 1526 1309 0 0 0 0 0 1 0 0 0 0 0 90 91 1958 0 1748 1627 1327 1526 0 0 0 0 0 0 1 0 0 0 0 91 92 2274 0 1958 1748 1627 1327 0 0 0 0 0 0 0 1 0 0 0 92 93 1648 0 2274 1958 1748 1627 0 0 0 0 0 0 0 0 1 0 0 93 94 1401 0 1648 2274 1958 1748 0 0 0 0 0 0 0 0 0 1 0 94 95 1411 0 1401 1648 2274 1958 0 0 0 0 0 0 0 0 0 0 1 95 96 1403 0 1411 1401 1648 2274 0 0 0 0 0 0 0 0 0 0 0 96 97 1394 0 1403 1411 1401 1648 1 0 0 0 0 0 0 0 0 0 0 97 98 1520 0 1394 1403 1411 1401 0 1 0 0 0 0 0 0 0 0 0 98 99 1528 0 1520 1394 1403 1411 0 0 1 0 0 0 0 0 0 0 0 99 100 1643 0 1528 1520 1394 1403 0 0 0 1 0 0 0 0 0 0 0 100 101 1515 0 1643 1528 1520 1394 0 0 0 0 1 0 0 0 0 0 0 101 102 1685 0 1515 1643 1528 1520 0 0 0 0 0 1 0 0 0 0 0 102 103 2000 0 1685 1515 1643 1528 0 0 0 0 0 0 1 0 0 0 0 103 104 2215 0 2000 1685 1515 1643 0 0 0 0 0 0 0 1 0 0 0 104 105 1956 0 2215 2000 1685 1515 0 0 0 0 0 0 0 0 1 0 0 105 106 1462 0 1956 2215 2000 1685 0 0 0 0 0 0 0 0 0 1 0 106 107 1563 0 1462 1956 2215 2000 0 0 0 0 0 0 0 0 0 0 1 107 108 1459 0 1563 1462 1956 2215 0 0 0 0 0 0 0 0 0 0 0 108 109 1446 0 1459 1563 1462 1956 1 0 0 0 0 0 0 0 0 0 0 109 110 1622 0 1446 1459 1563 1462 0 1 0 0 0 0 0 0 0 0 0 110 111 1657 0 1622 1446 1459 1563 0 0 1 0 0 0 0 0 0 0 0 111 112 1638 0 1657 1622 1446 1459 0 0 0 1 0 0 0 0 0 0 0 112 113 1643 0 1638 1657 1622 1446 0 0 0 0 1 0 0 0 0 0 0 113 114 1683 0 1643 1638 1657 1622 0 0 0 0 0 1 0 0 0 0 0 114 115 2050 0 1683 1643 1638 1657 0 0 0 0 0 0 1 0 0 0 0 115 116 2262 0 2050 1683 1643 1638 0 0 0 0 0 0 0 1 0 0 0 116 117 1813 0 2262 2050 1683 1643 0 0 0 0 0 0 0 0 1 0 0 117 118 1445 0 1813 2262 2050 1683 0 0 0 0 0 0 0 0 0 1 0 118 119 1762 0 1445 1813 2262 2050 0 0 0 0 0 0 0 0 0 0 1 119 120 1461 0 1762 1445 1813 2262 0 0 0 0 0 0 0 0 0 0 0 120 121 1556 0 1461 1762 1445 1813 1 0 0 0 0 0 0 0 0 0 0 121 122 1431 0 1556 1461 1762 1445 0 1 0 0 0 0 0 0 0 0 0 122 123 1427 0 1431 1556 1461 1762 0 0 1 0 0 0 0 0 0 0 0 123 124 1554 0 1427 1431 1556 1461 0 0 0 1 0 0 0 0 0 0 0 124 125 1645 0 1554 1427 1431 1556 0 0 0 0 1 0 0 0 0 0 0 125 126 1653 0 1645 1554 1427 1431 0 0 0 0 0 1 0 0 0 0 0 126 127 2016 0 1653 1645 1554 1427 0 0 0 0 0 0 1 0 0 0 0 127 128 2207 0 2016 1653 1645 1554 0 0 0 0 0 0 0 1 0 0 0 128 129 1665 0 2207 2016 1653 1645 0 0 0 0 0 0 0 0 1 0 0 129 130 1361 0 1665 2207 2016 1653 0 0 0 0 0 0 0 0 0 1 0 130 131 1506 0 1361 1665 2207 2016 0 0 0 0 0 0 0 0 0 0 1 131 132 1360 0 1506 1361 1665 2207 0 0 0 0 0 0 0 0 0 0 0 132 133 1453 0 1360 1506 1361 1665 1 0 0 0 0 0 0 0 0 0 0 133 134 1522 0 1453 1360 1506 1361 0 1 0 0 0 0 0 0 0 0 0 134 135 1460 0 1522 1453 1360 1506 0 0 1 0 0 0 0 0 0 0 0 135 136 1552 0 1460 1522 1453 1360 0 0 0 1 0 0 0 0 0 0 0 136 137 1548 0 1552 1460 1522 1453 0 0 0 0 1 0 0 0 0 0 0 137 138 1827 0 1548 1552 1460 1522 0 0 0 0 0 1 0 0 0 0 0 138 139 1737 0 1827 1548 1552 1460 0 0 0 0 0 0 1 0 0 0 0 139 140 1941 0 1737 1827 1548 1552 0 0 0 0 0 0 0 1 0 0 0 140 141 1474 0 1941 1737 1827 1548 0 0 0 0 0 0 0 0 1 0 0 141 142 1458 0 1474 1941 1737 1827 0 0 0 0 0 0 0 0 0 1 0 142 143 1542 0 1458 1474 1941 1737 0 0 0 0 0 0 0 0 0 0 1 143 144 1404 0 1542 1458 1474 1941 0 0 0 0 0 0 0 0 0 0 0 144 145 1522 0 1404 1542 1458 1474 1 0 0 0 0 0 0 0 0 0 0 145 146 1385 0 1522 1404 1542 1458 0 1 0 0 0 0 0 0 0 0 0 146 147 1641 0 1385 1522 1404 1542 0 0 1 0 0 0 0 0 0 0 0 147 148 1510 0 1641 1385 1522 1404 0 0 0 1 0 0 0 0 0 0 0 148 149 1681 0 1510 1641 1385 1522 0 0 0 0 1 0 0 0 0 0 0 149 150 1938 0 1681 1510 1641 1385 0 0 0 0 0 1 0 0 0 0 0 150 151 1868 0 1938 1681 1510 1641 0 0 0 0 0 0 1 0 0 0 0 151 152 1726 0 1868 1938 1681 1510 0 0 0 0 0 0 0 1 0 0 0 152 153 1456 0 1726 1868 1938 1681 0 0 0 0 0 0 0 0 1 0 0 153 154 1445 0 1456 1726 1868 1938 0 0 0 0 0 0 0 0 0 1 0 154 155 1456 0 1445 1456 1726 1868 0 0 0 0 0 0 0 0 0 0 1 155 156 1365 0 1456 1445 1456 1726 0 0 0 0 0 0 0 0 0 0 0 156 157 1487 0 1365 1456 1445 1456 1 0 0 0 0 0 0 0 0 0 0 157 158 1558 0 1487 1365 1456 1445 0 1 0 0 0 0 0 0 0 0 0 158 159 1488 0 1558 1487 1365 1456 0 0 1 0 0 0 0 0 0 0 0 159 160 1684 0 1488 1558 1487 1365 0 0 0 1 0 0 0 0 0 0 0 160 161 1594 0 1684 1488 1558 1487 0 0 0 0 1 0 0 0 0 0 0 161 162 1850 0 1594 1684 1488 1558 0 0 0 0 0 1 0 0 0 0 0 162 163 1998 0 1850 1594 1684 1488 0 0 0 0 0 0 1 0 0 0 0 163 164 2079 0 1998 1850 1594 1684 0 0 0 0 0 0 0 1 0 0 0 164 165 1494 0 2079 1998 1850 1594 0 0 0 0 0 0 0 0 1 0 0 165 166 1057 1 1494 2079 1998 1850 0 0 0 0 0 0 0 0 0 1 0 166 167 1218 1 1057 1494 2079 1998 0 0 0 0 0 0 0 0 0 0 1 167 168 1168 1 1218 1057 1494 2079 0 0 0 0 0 0 0 0 0 0 0 168 169 1236 1 1168 1218 1057 1494 1 0 0 0 0 0 0 0 0 0 0 169 170 1076 1 1236 1168 1218 1057 0 1 0 0 0 0 0 0 0 0 0 170 171 1174 1 1076 1236 1168 1218 0 0 1 0 0 0 0 0 0 0 0 171 172 1139 1 1174 1076 1236 1168 0 0 0 1 0 0 0 0 0 0 0 172 173 1427 1 1139 1174 1076 1236 0 0 0 0 1 0 0 0 0 0 0 173 174 1487 1 1427 1139 1174 1076 0 0 0 0 0 1 0 0 0 0 0 174 175 1483 1 1487 1427 1139 1174 0 0 0 0 0 0 1 0 0 0 0 175 176 1513 1 1483 1487 1427 1139 0 0 0 0 0 0 0 1 0 0 0 176 177 1357 1 1513 1483 1487 1427 0 0 0 0 0 0 0 0 1 0 0 177 178 1165 1 1357 1513 1483 1487 0 0 0 0 0 0 0 0 0 1 0 178 179 1282 1 1165 1357 1513 1483 0 0 0 0 0 0 0 0 0 0 1 179 180 1110 1 1282 1165 1357 1513 0 0 0 0 0 0 0 0 0 0 0 180 181 1297 1 1110 1282 1165 1357 1 0 0 0 0 0 0 0 0 0 0 181 182 1185 1 1297 1110 1282 1165 0 1 0 0 0 0 0 0 0 0 0 182 183 1222 1 1185 1297 1110 1282 0 0 1 0 0 0 0 0 0 0 0 183 184 1284 1 1222 1185 1297 1110 0 0 0 1 0 0 0 0 0 0 0 184 185 1444 1 1284 1222 1185 1297 0 0 0 0 1 0 0 0 0 0 0 185 186 1575 1 1444 1284 1222 1185 0 0 0 0 0 1 0 0 0 0 0 186 187 1737 1 1575 1444 1284 1222 0 0 0 0 0 0 1 0 0 0 0 187 188 1763 1 1737 1575 1444 1284 0 0 0 0 0 0 0 1 0 0 0 188 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X Y1 Y2 Y3 Y4 522.91809 -80.79823 0.38975 0.17272 0.03596 0.03546 M1 M2 M3 M4 M5 M6 188.66231 104.98735 181.66732 176.54103 208.39566 324.64288 M7 M8 M9 M10 M11 t 458.31248 471.42553 -54.24817 -111.18751 86.60035 -0.76712 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -328.526 -92.222 1.110 86.948 294.049 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 522.91809 164.86157 3.172 0.00180 ** X -80.79823 38.14953 -2.118 0.03563 * Y1 0.38975 0.07672 5.080 9.85e-07 *** Y2 0.17272 0.08213 2.103 0.03693 * Y3 0.03596 0.08190 0.439 0.66121 Y4 0.03546 0.07517 0.472 0.63770 M1 188.66231 56.52126 3.338 0.00104 ** M2 104.98735 63.65157 1.649 0.10091 M3 181.66732 63.23377 2.873 0.00459 ** M4 176.54103 68.28950 2.585 0.01057 * M5 208.39566 62.64060 3.327 0.00108 ** M6 324.64288 66.37528 4.891 2.31e-06 *** M7 458.31248 65.93663 6.951 7.44e-11 *** M8 471.42553 73.30544 6.431 1.24e-09 *** M9 -54.24817 80.31085 -0.675 0.50029 M10 -111.18751 77.36123 -1.437 0.15248 M11 86.60035 62.44811 1.387 0.16733 t -0.76712 0.25623 -2.994 0.00317 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 127.3 on 170 degrees of freedom Multiple R-squared: 0.8265, Adjusted R-squared: 0.8091 F-statistic: 47.63 on 17 and 170 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.8016493 0.3967014664 0.1983507332 [2,] 0.7228218 0.5543564493 0.2771782247 [3,] 0.6785324 0.6429352848 0.3214676424 [4,] 0.5679789 0.8640421545 0.4320210772 [5,] 0.4490784 0.8981568557 0.5509215722 [6,] 0.3686116 0.7372231802 0.6313884099 [7,] 0.3344754 0.6689507354 0.6655246323 [8,] 0.2534019 0.5068038610 0.7465980695 [9,] 0.3846916 0.7693832782 0.6153083609 [10,] 0.3034947 0.6069893318 0.6965053341 [11,] 0.3156192 0.6312383584 0.6843808208 [12,] 0.4108516 0.8217031808 0.5891484096 [13,] 0.3675716 0.7351431649 0.6324284176 [14,] 0.3084594 0.6169187054 0.6915406473 [15,] 0.2451489 0.4902978135 0.7548510933 [16,] 0.2898302 0.5796603183 0.7101698409 [17,] 0.3175729 0.6351458797 0.6824270601 [18,] 0.2748645 0.5497290438 0.7251354781 [19,] 0.2312151 0.4624301453 0.7687849273 [20,] 0.3948002 0.7896004623 0.6051997688 [21,] 0.3387800 0.6775599137 0.6612200431 [22,] 0.2910086 0.5820172325 0.7089913837 [23,] 0.2741187 0.5482374094 0.7258812953 [24,] 0.3721914 0.7443828411 0.6278085795 [25,] 0.3300696 0.6601391897 0.6699304052 [26,] 0.3042312 0.6084623970 0.6957688015 [27,] 0.3820380 0.7640760041 0.6179619980 [28,] 0.4841640 0.9683279935 0.5158360032 [29,] 0.4755416 0.9510832085 0.5244583957 [30,] 0.4426661 0.8853321692 0.5573339154 [31,] 0.4378598 0.8757195681 0.5621402159 [32,] 0.3965444 0.7930887113 0.6034556444 [33,] 0.4639825 0.9279650268 0.5360174866 [34,] 0.4228630 0.8457259890 0.5771370055 [35,] 0.6614372 0.6771255951 0.3385627976 [36,] 0.8400852 0.3198295952 0.1599147976 [37,] 0.9508020 0.0983959562 0.0491979781 [38,] 0.9500359 0.0999281912 0.0499640956 [39,] 0.9364451 0.1271097981 0.0635548991 [40,] 0.9357217 0.1285565208 0.0642782604 [41,] 0.9341031 0.1317938678 0.0658969339 [42,] 0.9494317 0.1011365869 0.0505682934 [43,] 0.9451728 0.1096544542 0.0548272271 [44,] 0.9477001 0.1045998094 0.0522999047 [45,] 0.9658922 0.0682155469 0.0341077735 [46,] 0.9688296 0.0623408796 0.0311704398 [47,] 0.9814587 0.0370825356 0.0185412678 [48,] 0.9864259 0.0271482768 0.0135741384 [49,] 0.9861492 0.0277015160 0.0138507580 [50,] 0.9847405 0.0305189212 0.0152594606 [51,] 0.9873049 0.0253901109 0.0126950554 [52,] 0.9861943 0.0276114104 0.0138057052 [53,] 0.9852918 0.0294163808 0.0147081904 [54,] 0.9819955 0.0360090021 0.0180045011 [55,] 0.9808924 0.0382152827 0.0191076413 [56,] 0.9748088 0.0503824552 0.0251912276 [57,] 0.9692512 0.0614975483 0.0307487741 [58,] 0.9829441 0.0341117922 0.0170558961 [59,] 0.9775147 0.0449705791 0.0224852896 [60,] 0.9800118 0.0399764782 0.0199882391 [61,] 0.9881644 0.0236711258 0.0118355629 [62,] 0.9939948 0.0120104973 0.0060052486 [63,] 0.9951509 0.0096982799 0.0048491400 [64,] 0.9933259 0.0133481559 0.0066740780 [65,] 0.9914256 0.0171488313 0.0085744157 [66,] 0.9948704 0.0102592490 0.0051296245 [67,] 0.9930189 0.0139621240 0.0069810620 [68,] 0.9967869 0.0064262478 0.0032131239 [69,] 0.9963755 0.0072490453 0.0036245226 [70,] 0.9953764 0.0092472380 0.0046236190 [71,] 0.9937424 0.0125151321 0.0062575660 [72,] 0.9961200 0.0077599795 0.0038799898 [73,] 0.9952936 0.0094128391 0.0047064196 [74,] 0.9944863 0.0110274244 0.0055137122 [75,] 0.9941030 0.0117940685 0.0058970342 [76,] 0.9923674 0.0152651433 0.0076325717 [77,] 0.9934006 0.0131987545 0.0065993772 [78,] 0.9917749 0.0164501593 0.0082250796 [79,] 0.9890276 0.0219448618 0.0109724309 [80,] 0.9863444 0.0273112790 0.0136556395 [81,] 0.9890796 0.0218407109 0.0109203554 [82,] 0.9880509 0.0238982999 0.0119491499 [83,] 0.9845631 0.0308737535 0.0154368768 [84,] 0.9829052 0.0341896680 0.0170948340 [85,] 0.9944455 0.0111089810 0.0055544905 [86,] 0.9937232 0.0125536436 0.0062768218 [87,] 0.9912654 0.0174691545 0.0087345773 [88,] 0.9882464 0.0235072555 0.0117536278 [89,] 0.9894139 0.0211721133 0.0105860567 [90,] 0.9908651 0.0182697572 0.0091348786 [91,] 0.9890051 0.0219898609 0.0109949305 [92,] 0.9850517 0.0298965652 0.0149482826 [93,] 0.9798696 0.0402607589 0.0201303795 [94,] 0.9813057 0.0373885078 0.0186942539 [95,] 0.9812146 0.0375708725 0.0187854363 [96,] 0.9891047 0.0217905789 0.0108952895 [97,] 0.9924982 0.0150036883 0.0075018442 [98,] 0.9908077 0.0183845103 0.0091922552 [99,] 0.9976445 0.0047110273 0.0023555136 [100,] 0.9966494 0.0067011165 0.0033505582 [101,] 0.9955072 0.0089856901 0.0044928451 [102,] 0.9939457 0.0121086563 0.0060543282 [103,] 0.9927710 0.0144579349 0.0072289675 [104,] 0.9901267 0.0197465223 0.0098732611 [105,] 0.9869431 0.0261137948 0.0130568974 [106,] 0.9898951 0.0202098384 0.0101049192 [107,] 0.9937901 0.0124198759 0.0062099379 [108,] 0.9992685 0.0014630720 0.0007315360 [109,] 0.9996383 0.0007234945 0.0003617473 [110,] 0.9995328 0.0009343615 0.0004671807 [111,] 0.9993232 0.0013536472 0.0006768236 [112,] 0.9989107 0.0021786965 0.0010893483 [113,] 0.9983243 0.0033514340 0.0016757170 [114,] 0.9988109 0.0023782989 0.0011891495 [115,] 0.9981331 0.0037338469 0.0018669235 [116,] 0.9977032 0.0045935557 0.0022967778 [117,] 0.9963997 0.0072006977 0.0036003489 [118,] 0.9950807 0.0098385038 0.0049192519 [119,] 0.9954274 0.0091452920 0.0045726460 [120,] 0.9946397 0.0107205477 0.0053602738 [121,] 0.9919943 0.0160113317 0.0080056659 [122,] 0.9911504 0.0176991376 0.0088495688 [123,] 0.9912683 0.0174633189 0.0087316594 [124,] 0.9875383 0.0249234474 0.0124617237 [125,] 0.9851346 0.0297307207 0.0148653603 [126,] 0.9781628 0.0436744712 0.0218372356 [127,] 0.9908347 0.0183305008 0.0091652504 [128,] 0.9858162 0.0283675641 0.0141837820 [129,] 0.9843032 0.0313935882 0.0156967941 [130,] 0.9982786 0.0034428974 0.0017214487 [131,] 0.9970684 0.0058631884 0.0029315942 [132,] 0.9981093 0.0037814473 0.0018907236 [133,] 0.9968034 0.0063931029 0.0031965515 [134,] 0.9952664 0.0094672627 0.0047336313 [135,] 0.9955493 0.0089014767 0.0044507383 [136,] 0.9918216 0.0163568720 0.0081784360 [137,] 0.9852646 0.0294708030 0.0147354015 [138,] 0.9752156 0.0495687529 0.0247843764 [139,] 0.9566489 0.0867022840 0.0433511420 [140,] 0.9800517 0.0398965156 0.0199482578 [141,] 0.9755125 0.0489749665 0.0244874833 [142,] 0.9528973 0.0942054814 0.0471027407 [143,] 0.9350420 0.1299160934 0.0649580467 [144,] 0.9595679 0.0808642235 0.0404321118 [145,] 0.9137468 0.1725064682 0.0862532341 [146,] 0.8268313 0.3463374579 0.1731687289 [147,] 0.7572851 0.4854297076 0.2427148538 > postscript(file="/var/www/html/rcomp/tmp/1dziy1258751152.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/2op4n1258751152.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/3p8rf1258751152.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/4e9ir1258751152.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/5twv31258751152.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 188 Frequency = 1 1 2 3 4 5 6 7.037835 -98.331247 -117.325401 -42.794803 -165.254264 -196.555340 7 8 9 10 11 12 145.254550 -79.041426 -34.083291 171.087420 -28.154237 -68.943562 13 14 15 16 17 18 -156.001393 -104.456935 130.549461 34.892228 -123.098350 74.557655 19 20 21 22 23 24 67.081018 152.706477 91.230387 -110.882336 -63.151544 11.916144 25 26 27 28 29 30 56.111818 34.643474 0.459169 124.384106 -277.557055 77.319078 31 32 33 34 35 36 86.618978 -118.689669 267.580039 42.125992 45.978952 -99.395392 37 38 39 40 41 42 227.000384 84.415753 105.331312 -192.382642 -56.256421 39.582940 43 44 45 46 47 48 241.089876 294.048755 80.331486 154.577464 -204.181032 292.712867 49 50 51 52 53 54 137.895615 -22.390059 164.690640 14.249854 164.397885 -5.263454 55 56 57 58 59 60 -131.777414 -128.880938 -169.431718 -12.233581 -32.212320 -91.893747 61 62 63 64 65 66 149.134034 195.332137 18.398174 121.462520 153.777652 45.349818 67 68 69 70 71 72 -124.422532 -204.260726 -145.205342 -119.804957 148.122321 -93.205897 73 74 75 76 77 78 -65.238845 -88.362037 -129.532158 -9.246989 28.338810 -240.907524 79 80 81 82 83 84 -16.678224 139.666337 -234.487642 228.394802 -184.933176 -28.666193 85 86 87 88 89 90 -14.845319 -199.483853 13.646527 -230.291792 81.857962 4.860818 91 92 93 94 95 96 -17.559034 179.618783 -94.363138 -106.097640 -107.534979 21.900007 97 98 99 100 101 102 -142.522114 81.209751 -34.323815 62.295644 -147.206044 -67.417971 103 104 105 106 107 108 66.112415 117.156705 244.820327 -145.019708 -22.671434 8.345306 109 110 111 112 113 114 -142.513254 154.846929 47.741408 -5.250102 -35.845112 -117.492487 115 116 117 118 119 120 99.593403 149.795051 79.603783 -106.925290 213.396123 -51.597815 121 122 123 124 125 126 -52.776777 -76.717847 -124.740444 38.561582 50.792408 -109.513841 127 128 129 130 131 132 97.323112 125.340787 -30.874241 -112.250838 28.087050 -21.835884 133 134 135 136 137 138 -54.720134 93.260781 -87.500796 24.472888 -41.541758 107.428710 139 140 141 142 143 144 -224.631733 -49.209466 -63.622072 118.202235 87.936531 16.885729 145 146 147 148 149 150 3.404292 -73.760814 141.323268 -59.244249 88.248924 181.402623 151 152 153 154 155 156 -155.569657 -328.526166 -19.955793 149.911989 22.402527 31.127072 157 158 159 160 161 162 8.770015 132.375378 -59.400035 156.352869 -35.914159 105.827993 163 164 165 166 167 168 32.130288 -4.830850 -126.535940 -225.420030 1.761681 70.022432 169 170 171 172 173 174 -21.733975 -105.449405 -36.659879 -76.997632 179.970481 20.438967 175 176 177 178 179 180 -191.810150 -192.074837 154.993155 74.334477 95.153539 2.628934 181 182 183 184 185 186 60.997820 -7.132007 -32.657434 39.536517 135.289041 80.382017 187 188 27.245104 -52.818816 > postscript(file="/var/www/html/rcomp/tmp/6vow61258751152.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 = 188 Frequency = 1 lag(myerror, k = 1) myerror 0 7.037835 NA 1 -98.331247 7.037835 2 -117.325401 -98.331247 3 -42.794803 -117.325401 4 -165.254264 -42.794803 5 -196.555340 -165.254264 6 145.254550 -196.555340 7 -79.041426 145.254550 8 -34.083291 -79.041426 9 171.087420 -34.083291 10 -28.154237 171.087420 11 -68.943562 -28.154237 12 -156.001393 -68.943562 13 -104.456935 -156.001393 14 130.549461 -104.456935 15 34.892228 130.549461 16 -123.098350 34.892228 17 74.557655 -123.098350 18 67.081018 74.557655 19 152.706477 67.081018 20 91.230387 152.706477 21 -110.882336 91.230387 22 -63.151544 -110.882336 23 11.916144 -63.151544 24 56.111818 11.916144 25 34.643474 56.111818 26 0.459169 34.643474 27 124.384106 0.459169 28 -277.557055 124.384106 29 77.319078 -277.557055 30 86.618978 77.319078 31 -118.689669 86.618978 32 267.580039 -118.689669 33 42.125992 267.580039 34 45.978952 42.125992 35 -99.395392 45.978952 36 227.000384 -99.395392 37 84.415753 227.000384 38 105.331312 84.415753 39 -192.382642 105.331312 40 -56.256421 -192.382642 41 39.582940 -56.256421 42 241.089876 39.582940 43 294.048755 241.089876 44 80.331486 294.048755 45 154.577464 80.331486 46 -204.181032 154.577464 47 292.712867 -204.181032 48 137.895615 292.712867 49 -22.390059 137.895615 50 164.690640 -22.390059 51 14.249854 164.690640 52 164.397885 14.249854 53 -5.263454 164.397885 54 -131.777414 -5.263454 55 -128.880938 -131.777414 56 -169.431718 -128.880938 57 -12.233581 -169.431718 58 -32.212320 -12.233581 59 -91.893747 -32.212320 60 149.134034 -91.893747 61 195.332137 149.134034 62 18.398174 195.332137 63 121.462520 18.398174 64 153.777652 121.462520 65 45.349818 153.777652 66 -124.422532 45.349818 67 -204.260726 -124.422532 68 -145.205342 -204.260726 69 -119.804957 -145.205342 70 148.122321 -119.804957 71 -93.205897 148.122321 72 -65.238845 -93.205897 73 -88.362037 -65.238845 74 -129.532158 -88.362037 75 -9.246989 -129.532158 76 28.338810 -9.246989 77 -240.907524 28.338810 78 -16.678224 -240.907524 79 139.666337 -16.678224 80 -234.487642 139.666337 81 228.394802 -234.487642 82 -184.933176 228.394802 83 -28.666193 -184.933176 84 -14.845319 -28.666193 85 -199.483853 -14.845319 86 13.646527 -199.483853 87 -230.291792 13.646527 88 81.857962 -230.291792 89 4.860818 81.857962 90 -17.559034 4.860818 91 179.618783 -17.559034 92 -94.363138 179.618783 93 -106.097640 -94.363138 94 -107.534979 -106.097640 95 21.900007 -107.534979 96 -142.522114 21.900007 97 81.209751 -142.522114 98 -34.323815 81.209751 99 62.295644 -34.323815 100 -147.206044 62.295644 101 -67.417971 -147.206044 102 66.112415 -67.417971 103 117.156705 66.112415 104 244.820327 117.156705 105 -145.019708 244.820327 106 -22.671434 -145.019708 107 8.345306 -22.671434 108 -142.513254 8.345306 109 154.846929 -142.513254 110 47.741408 154.846929 111 -5.250102 47.741408 112 -35.845112 -5.250102 113 -117.492487 -35.845112 114 99.593403 -117.492487 115 149.795051 99.593403 116 79.603783 149.795051 117 -106.925290 79.603783 118 213.396123 -106.925290 119 -51.597815 213.396123 120 -52.776777 -51.597815 121 -76.717847 -52.776777 122 -124.740444 -76.717847 123 38.561582 -124.740444 124 50.792408 38.561582 125 -109.513841 50.792408 126 97.323112 -109.513841 127 125.340787 97.323112 128 -30.874241 125.340787 129 -112.250838 -30.874241 130 28.087050 -112.250838 131 -21.835884 28.087050 132 -54.720134 -21.835884 133 93.260781 -54.720134 134 -87.500796 93.260781 135 24.472888 -87.500796 136 -41.541758 24.472888 137 107.428710 -41.541758 138 -224.631733 107.428710 139 -49.209466 -224.631733 140 -63.622072 -49.209466 141 118.202235 -63.622072 142 87.936531 118.202235 143 16.885729 87.936531 144 3.404292 16.885729 145 -73.760814 3.404292 146 141.323268 -73.760814 147 -59.244249 141.323268 148 88.248924 -59.244249 149 181.402623 88.248924 150 -155.569657 181.402623 151 -328.526166 -155.569657 152 -19.955793 -328.526166 153 149.911989 -19.955793 154 22.402527 149.911989 155 31.127072 22.402527 156 8.770015 31.127072 157 132.375378 8.770015 158 -59.400035 132.375378 159 156.352869 -59.400035 160 -35.914159 156.352869 161 105.827993 -35.914159 162 32.130288 105.827993 163 -4.830850 32.130288 164 -126.535940 -4.830850 165 -225.420030 -126.535940 166 1.761681 -225.420030 167 70.022432 1.761681 168 -21.733975 70.022432 169 -105.449405 -21.733975 170 -36.659879 -105.449405 171 -76.997632 -36.659879 172 179.970481 -76.997632 173 20.438967 179.970481 174 -191.810150 20.438967 175 -192.074837 -191.810150 176 154.993155 -192.074837 177 74.334477 154.993155 178 95.153539 74.334477 179 2.628934 95.153539 180 60.997820 2.628934 181 -7.132007 60.997820 182 -32.657434 -7.132007 183 39.536517 -32.657434 184 135.289041 39.536517 185 80.382017 135.289041 186 27.245104 80.382017 187 -52.818816 27.245104 188 NA -52.818816 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -98.331247 7.037835 [2,] -117.325401 -98.331247 [3,] -42.794803 -117.325401 [4,] -165.254264 -42.794803 [5,] -196.555340 -165.254264 [6,] 145.254550 -196.555340 [7,] -79.041426 145.254550 [8,] -34.083291 -79.041426 [9,] 171.087420 -34.083291 [10,] -28.154237 171.087420 [11,] -68.943562 -28.154237 [12,] -156.001393 -68.943562 [13,] -104.456935 -156.001393 [14,] 130.549461 -104.456935 [15,] 34.892228 130.549461 [16,] -123.098350 34.892228 [17,] 74.557655 -123.098350 [18,] 67.081018 74.557655 [19,] 152.706477 67.081018 [20,] 91.230387 152.706477 [21,] -110.882336 91.230387 [22,] -63.151544 -110.882336 [23,] 11.916144 -63.151544 [24,] 56.111818 11.916144 [25,] 34.643474 56.111818 [26,] 0.459169 34.643474 [27,] 124.384106 0.459169 [28,] -277.557055 124.384106 [29,] 77.319078 -277.557055 [30,] 86.618978 77.319078 [31,] -118.689669 86.618978 [32,] 267.580039 -118.689669 [33,] 42.125992 267.580039 [34,] 45.978952 42.125992 [35,] -99.395392 45.978952 [36,] 227.000384 -99.395392 [37,] 84.415753 227.000384 [38,] 105.331312 84.415753 [39,] -192.382642 105.331312 [40,] -56.256421 -192.382642 [41,] 39.582940 -56.256421 [42,] 241.089876 39.582940 [43,] 294.048755 241.089876 [44,] 80.331486 294.048755 [45,] 154.577464 80.331486 [46,] -204.181032 154.577464 [47,] 292.712867 -204.181032 [48,] 137.895615 292.712867 [49,] -22.390059 137.895615 [50,] 164.690640 -22.390059 [51,] 14.249854 164.690640 [52,] 164.397885 14.249854 [53,] -5.263454 164.397885 [54,] -131.777414 -5.263454 [55,] -128.880938 -131.777414 [56,] -169.431718 -128.880938 [57,] -12.233581 -169.431718 [58,] -32.212320 -12.233581 [59,] -91.893747 -32.212320 [60,] 149.134034 -91.893747 [61,] 195.332137 149.134034 [62,] 18.398174 195.332137 [63,] 121.462520 18.398174 [64,] 153.777652 121.462520 [65,] 45.349818 153.777652 [66,] -124.422532 45.349818 [67,] -204.260726 -124.422532 [68,] -145.205342 -204.260726 [69,] -119.804957 -145.205342 [70,] 148.122321 -119.804957 [71,] -93.205897 148.122321 [72,] -65.238845 -93.205897 [73,] -88.362037 -65.238845 [74,] -129.532158 -88.362037 [75,] -9.246989 -129.532158 [76,] 28.338810 -9.246989 [77,] -240.907524 28.338810 [78,] -16.678224 -240.907524 [79,] 139.666337 -16.678224 [80,] -234.487642 139.666337 [81,] 228.394802 -234.487642 [82,] -184.933176 228.394802 [83,] -28.666193 -184.933176 [84,] -14.845319 -28.666193 [85,] -199.483853 -14.845319 [86,] 13.646527 -199.483853 [87,] -230.291792 13.646527 [88,] 81.857962 -230.291792 [89,] 4.860818 81.857962 [90,] -17.559034 4.860818 [91,] 179.618783 -17.559034 [92,] -94.363138 179.618783 [93,] -106.097640 -94.363138 [94,] -107.534979 -106.097640 [95,] 21.900007 -107.534979 [96,] -142.522114 21.900007 [97,] 81.209751 -142.522114 [98,] -34.323815 81.209751 [99,] 62.295644 -34.323815 [100,] -147.206044 62.295644 [101,] -67.417971 -147.206044 [102,] 66.112415 -67.417971 [103,] 117.156705 66.112415 [104,] 244.820327 117.156705 [105,] -145.019708 244.820327 [106,] -22.671434 -145.019708 [107,] 8.345306 -22.671434 [108,] -142.513254 8.345306 [109,] 154.846929 -142.513254 [110,] 47.741408 154.846929 [111,] -5.250102 47.741408 [112,] -35.845112 -5.250102 [113,] -117.492487 -35.845112 [114,] 99.593403 -117.492487 [115,] 149.795051 99.593403 [116,] 79.603783 149.795051 [117,] -106.925290 79.603783 [118,] 213.396123 -106.925290 [119,] -51.597815 213.396123 [120,] -52.776777 -51.597815 [121,] -76.717847 -52.776777 [122,] -124.740444 -76.717847 [123,] 38.561582 -124.740444 [124,] 50.792408 38.561582 [125,] -109.513841 50.792408 [126,] 97.323112 -109.513841 [127,] 125.340787 97.323112 [128,] -30.874241 125.340787 [129,] -112.250838 -30.874241 [130,] 28.087050 -112.250838 [131,] -21.835884 28.087050 [132,] -54.720134 -21.835884 [133,] 93.260781 -54.720134 [134,] -87.500796 93.260781 [135,] 24.472888 -87.500796 [136,] -41.541758 24.472888 [137,] 107.428710 -41.541758 [138,] -224.631733 107.428710 [139,] -49.209466 -224.631733 [140,] -63.622072 -49.209466 [141,] 118.202235 -63.622072 [142,] 87.936531 118.202235 [143,] 16.885729 87.936531 [144,] 3.404292 16.885729 [145,] -73.760814 3.404292 [146,] 141.323268 -73.760814 [147,] -59.244249 141.323268 [148,] 88.248924 -59.244249 [149,] 181.402623 88.248924 [150,] -155.569657 181.402623 [151,] -328.526166 -155.569657 [152,] -19.955793 -328.526166 [153,] 149.911989 -19.955793 [154,] 22.402527 149.911989 [155,] 31.127072 22.402527 [156,] 8.770015 31.127072 [157,] 132.375378 8.770015 [158,] -59.400035 132.375378 [159,] 156.352869 -59.400035 [160,] -35.914159 156.352869 [161,] 105.827993 -35.914159 [162,] 32.130288 105.827993 [163,] -4.830850 32.130288 [164,] -126.535940 -4.830850 [165,] -225.420030 -126.535940 [166,] 1.761681 -225.420030 [167,] 70.022432 1.761681 [168,] -21.733975 70.022432 [169,] -105.449405 -21.733975 [170,] -36.659879 -105.449405 [171,] -76.997632 -36.659879 [172,] 179.970481 -76.997632 [173,] 20.438967 179.970481 [174,] -191.810150 20.438967 [175,] -192.074837 -191.810150 [176,] 154.993155 -192.074837 [177,] 74.334477 154.993155 [178,] 95.153539 74.334477 [179,] 2.628934 95.153539 [180,] 60.997820 2.628934 [181,] -7.132007 60.997820 [182,] -32.657434 -7.132007 [183,] 39.536517 -32.657434 [184,] 135.289041 39.536517 [185,] 80.382017 135.289041 [186,] 27.245104 80.382017 [187,] -52.818816 27.245104 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -98.331247 7.037835 2 -117.325401 -98.331247 3 -42.794803 -117.325401 4 -165.254264 -42.794803 5 -196.555340 -165.254264 6 145.254550 -196.555340 7 -79.041426 145.254550 8 -34.083291 -79.041426 9 171.087420 -34.083291 10 -28.154237 171.087420 11 -68.943562 -28.154237 12 -156.001393 -68.943562 13 -104.456935 -156.001393 14 130.549461 -104.456935 15 34.892228 130.549461 16 -123.098350 34.892228 17 74.557655 -123.098350 18 67.081018 74.557655 19 152.706477 67.081018 20 91.230387 152.706477 21 -110.882336 91.230387 22 -63.151544 -110.882336 23 11.916144 -63.151544 24 56.111818 11.916144 25 34.643474 56.111818 26 0.459169 34.643474 27 124.384106 0.459169 28 -277.557055 124.384106 29 77.319078 -277.557055 30 86.618978 77.319078 31 -118.689669 86.618978 32 267.580039 -118.689669 33 42.125992 267.580039 34 45.978952 42.125992 35 -99.395392 45.978952 36 227.000384 -99.395392 37 84.415753 227.000384 38 105.331312 84.415753 39 -192.382642 105.331312 40 -56.256421 -192.382642 41 39.582940 -56.256421 42 241.089876 39.582940 43 294.048755 241.089876 44 80.331486 294.048755 45 154.577464 80.331486 46 -204.181032 154.577464 47 292.712867 -204.181032 48 137.895615 292.712867 49 -22.390059 137.895615 50 164.690640 -22.390059 51 14.249854 164.690640 52 164.397885 14.249854 53 -5.263454 164.397885 54 -131.777414 -5.263454 55 -128.880938 -131.777414 56 -169.431718 -128.880938 57 -12.233581 -169.431718 58 -32.212320 -12.233581 59 -91.893747 -32.212320 60 149.134034 -91.893747 61 195.332137 149.134034 62 18.398174 195.332137 63 121.462520 18.398174 64 153.777652 121.462520 65 45.349818 153.777652 66 -124.422532 45.349818 67 -204.260726 -124.422532 68 -145.205342 -204.260726 69 -119.804957 -145.205342 70 148.122321 -119.804957 71 -93.205897 148.122321 72 -65.238845 -93.205897 73 -88.362037 -65.238845 74 -129.532158 -88.362037 75 -9.246989 -129.532158 76 28.338810 -9.246989 77 -240.907524 28.338810 78 -16.678224 -240.907524 79 139.666337 -16.678224 80 -234.487642 139.666337 81 228.394802 -234.487642 82 -184.933176 228.394802 83 -28.666193 -184.933176 84 -14.845319 -28.666193 85 -199.483853 -14.845319 86 13.646527 -199.483853 87 -230.291792 13.646527 88 81.857962 -230.291792 89 4.860818 81.857962 90 -17.559034 4.860818 91 179.618783 -17.559034 92 -94.363138 179.618783 93 -106.097640 -94.363138 94 -107.534979 -106.097640 95 21.900007 -107.534979 96 -142.522114 21.900007 97 81.209751 -142.522114 98 -34.323815 81.209751 99 62.295644 -34.323815 100 -147.206044 62.295644 101 -67.417971 -147.206044 102 66.112415 -67.417971 103 117.156705 66.112415 104 244.820327 117.156705 105 -145.019708 244.820327 106 -22.671434 -145.019708 107 8.345306 -22.671434 108 -142.513254 8.345306 109 154.846929 -142.513254 110 47.741408 154.846929 111 -5.250102 47.741408 112 -35.845112 -5.250102 113 -117.492487 -35.845112 114 99.593403 -117.492487 115 149.795051 99.593403 116 79.603783 149.795051 117 -106.925290 79.603783 118 213.396123 -106.925290 119 -51.597815 213.396123 120 -52.776777 -51.597815 121 -76.717847 -52.776777 122 -124.740444 -76.717847 123 38.561582 -124.740444 124 50.792408 38.561582 125 -109.513841 50.792408 126 97.323112 -109.513841 127 125.340787 97.323112 128 -30.874241 125.340787 129 -112.250838 -30.874241 130 28.087050 -112.250838 131 -21.835884 28.087050 132 -54.720134 -21.835884 133 93.260781 -54.720134 134 -87.500796 93.260781 135 24.472888 -87.500796 136 -41.541758 24.472888 137 107.428710 -41.541758 138 -224.631733 107.428710 139 -49.209466 -224.631733 140 -63.622072 -49.209466 141 118.202235 -63.622072 142 87.936531 118.202235 143 16.885729 87.936531 144 3.404292 16.885729 145 -73.760814 3.404292 146 141.323268 -73.760814 147 -59.244249 141.323268 148 88.248924 -59.244249 149 181.402623 88.248924 150 -155.569657 181.402623 151 -328.526166 -155.569657 152 -19.955793 -328.526166 153 149.911989 -19.955793 154 22.402527 149.911989 155 31.127072 22.402527 156 8.770015 31.127072 157 132.375378 8.770015 158 -59.400035 132.375378 159 156.352869 -59.400035 160 -35.914159 156.352869 161 105.827993 -35.914159 162 32.130288 105.827993 163 -4.830850 32.130288 164 -126.535940 -4.830850 165 -225.420030 -126.535940 166 1.761681 -225.420030 167 70.022432 1.761681 168 -21.733975 70.022432 169 -105.449405 -21.733975 170 -36.659879 -105.449405 171 -76.997632 -36.659879 172 179.970481 -76.997632 173 20.438967 179.970481 174 -191.810150 20.438967 175 -192.074837 -191.810150 176 154.993155 -192.074837 177 74.334477 154.993155 178 95.153539 74.334477 179 2.628934 95.153539 180 60.997820 2.628934 181 -7.132007 60.997820 182 -32.657434 -7.132007 183 39.536517 -32.657434 184 135.289041 39.536517 185 80.382017 135.289041 186 27.245104 80.382017 187 -52.818816 27.245104 > 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/7tb3w1258751152.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/860xm1258751152.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/9zukw1258751152.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10obow1258751152.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11rha31258751152.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/12p1as1258751152.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/136e3d1258751152.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/14v0w41258751152.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/15jfv81258751152.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16a65s1258751152.tab") + } > > system("convert tmp/1dziy1258751152.ps tmp/1dziy1258751152.png") > system("convert tmp/2op4n1258751152.ps tmp/2op4n1258751152.png") > system("convert tmp/3p8rf1258751152.ps tmp/3p8rf1258751152.png") > system("convert tmp/4e9ir1258751152.ps tmp/4e9ir1258751152.png") > system("convert tmp/5twv31258751152.ps tmp/5twv31258751152.png") > system("convert tmp/6vow61258751152.ps tmp/6vow61258751152.png") > system("convert tmp/7tb3w1258751152.ps tmp/7tb3w1258751152.png") > system("convert tmp/860xm1258751152.ps tmp/860xm1258751152.png") > system("convert tmp/9zukw1258751152.ps tmp/9zukw1258751152.png") > system("convert tmp/10obow1258751152.ps tmp/10obow1258751152.png") > > > proc.time() user system elapsed 4.969 1.812 5.469