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(25.94 + ,23688100 + ,39.18 + ,3940.35 + ,144.7 + ,28.66 + ,13741000 + ,35.78 + ,4696.69 + ,140.8 + ,33.95 + ,14143500 + ,42.54 + ,4572.83 + ,137.1 + ,31.01 + ,16763800 + ,27.92 + ,3860.66 + ,137.7 + ,21.00 + ,16634600 + ,25.05 + ,3400.91 + ,144.7 + ,26.19 + ,13693300 + ,32.03 + ,3966.11 + ,139.2 + ,25.41 + ,10545800 + ,27.95 + ,3766.99 + ,143.0 + ,30.47 + ,9409900 + ,27.95 + ,4206.35 + ,140.8 + ,12.88 + ,39182200 + ,24.15 + ,3672.82 + ,142.5 + ,9.78 + ,37005800 + ,27.57 + ,3369.63 + ,135.8 + ,8.25 + ,15818500 + ,22.97 + ,2597.93 + ,132.6 + ,7.44 + ,16952000 + ,17.37 + ,2470.52 + ,128.6 + ,10.81 + ,24563400 + ,24.45 + ,2772.73 + ,115.7 + ,9.12 + ,14163200 + ,23.62 + ,2151.83 + ,109.2 + ,11.03 + ,18184800 + ,21.90 + ,1840.26 + ,116.9 + ,12.74 + ,20810300 + ,27.12 + ,2116.24 + ,109.9 + ,9.98 + ,12843000 + ,27.70 + ,2110.49 + ,116.1 + ,11.62 + ,13866700 + ,29.23 + ,2160.54 + ,118.9 + ,9.40 + ,15119200 + ,26.50 + ,2027.13 + ,116.3 + ,9.27 + ,8301600 + ,22.84 + ,1805.43 + ,114.0 + ,7.76 + ,14039600 + ,20.49 + ,1498.80 + ,97.0 + ,8.78 + ,12139700 + ,23.28 + ,1690.20 + ,85.3 + ,10.65 + ,9649000 + ,25.71 + ,1930.58 + ,84.9 + ,10.95 + ,8513600 + ,26.52 + ,1950.40 + ,94.6 + ,12.36 + ,15278600 + ,25.51 + ,1934.03 + ,97.8 + ,10.85 + ,15590900 + ,23.36 + ,1731.49 + ,95.0 + ,11.84 + ,9691100 + ,24.15 + ,1845.35 + ,110.7 + ,12.14 + ,10882700 + ,20.92 + ,1688.23 + ,108.5 + ,11.65 + ,10294800 + ,20.38 + ,1615.73 + ,110.3 + ,8.86 + ,16031900 + ,21.90 + ,1463.21 + ,106.3 + ,7.63 + ,13683600 + ,19.21 + ,1328.26 + ,97.4 + ,7.38 + ,8677200 + ,19.65 + ,1314.85 + ,94.5 + ,7.25 + ,9874100 + ,17.51 + ,1172.06 + ,93.7 + ,8.03 + ,10725500 + ,21.41 + ,1329.75 + ,79.6 + ,7.75 + ,8348400 + ,23.09 + ,1478.78 + ,84.9 + ,7.16 + ,8046200 + ,20.70 + ,1335.51 + ,80.7 + ,7.18 + ,10862300 + ,19.00 + ,1320.91 + ,78.8 + ,7.51 + ,8100300 + ,19.04 + ,1337.52 + ,64.8 + ,7.07 + ,7287500 + ,19.45 + ,1341.17 + ,61.4 + ,7.11 + ,14002500 + ,20.54 + ,1464.31 + ,81.0 + ,8.98 + ,19037900 + ,19.77 + ,1595.91 + ,83.6 + ,9.53 + ,10774600 + ,20.60 + ,1622.80 + ,83.5 + ,10.54 + ,8960600 + ,21.21 + ,1735.02 + ,77.0 + ,11.31 + ,7773300 + ,21.30 + ,1810.45 + ,81.7 + ,10.36 + ,9579700 + ,22.33 + ,1786.94 + ,77.0 + ,11.44 + ,11270700 + ,21.12 + ,1932.21 + ,81.7 + ,10.45 + ,9492800 + ,20.77 + ,1960.26 + ,92.5 + ,10.69 + ,9136800 + ,22.11 + ,2003.37 + ,91.7 + ,11.28 + ,14487600 + ,22.34 + ,2066.15 + ,96.4 + ,11.96 + ,10133200 + ,21.43 + ,2029.82 + ,88.5 + ,13.52 + ,18659700 + ,20.14 + ,1994.22 + ,88.5 + ,12.89 + ,15980700 + ,21.11 + ,1920.15 + ,93.0 + ,14.03 + ,9732100 + ,21.19 + ,1986.74 + ,93.1 + ,16.27 + ,14626300 + ,23.07 + ,2047.79 + ,102.8 + ,16.17 + ,16904000 + ,23.01 + ,1887.36 + ,105.7 + ,17.25 + ,13616700 + ,22.12 + ,1838.10 + ,98.7 + ,19.38 + ,13772900 + ,22.40 + ,1896.84 + ,96.7 + ,26.20 + ,28749200 + ,22.66 + ,1974.99 + ,92.9 + ,33.53 + ,31408300 + ,24.21 + ,2096.81 + ,92.6 + ,32.20 + ,26342800 + ,24.13 + ,2175.44 + ,102.7 + ,38.45 + ,48909500 + ,23.73 + ,2062.41 + ,105.1 + ,44.86 + ,41542400 + ,22.79 + ,2051.72 + ,104.4 + ,41.67 + ,24857200 + ,21.89 + ,1999.23 + ,103.0 + ,36.06 + ,34093700 + ,22.92 + ,1921.65 + ,97.5 + ,39.76 + ,22555200 + ,23.44 + ,2068.22 + ,103.1 + ,36.81 + ,19067500 + ,22.57 + ,2056.96 + ,106.2 + ,42.65 + ,19029100 + ,23.27 + ,2184.83 + ,103.6 + ,46.89 + ,15223200 + ,24.95 + ,2152.09 + ,105.5 + ,53.61 + ,21903700 + ,23.45 + ,2151.69 + ,87.5 + ,57.59 + ,33306600 + ,23.42 + ,2120.30 + ,85.2 + ,67.82 + ,23898100 + ,25.30 + ,2232.82 + ,98.3 + ,71.89 + ,23279600 + ,23.90 + ,2205.32 + ,103.8 + ,75.51 + ,40699800 + ,25.73 + ,2305.82 + ,106.8 + ,68.49 + ,37646000 + ,24.64 + ,2281.39 + ,102.7 + ,62.72 + ,37277000 + ,24.95 + ,2339.79 + ,107.5 + ,70.39 + ,39246800 + ,22.15 + ,2322.57 + ,109.8 + ,59.77 + ,27418400 + ,20.85 + ,2178.88 + ,104.7 + ,57.27 + ,30318700 + ,21.45 + ,2172.09 + ,105.7 + ,67.96 + ,32808100 + ,22.15 + ,2091.47 + ,107.0 + ,67.85 + ,28668200 + ,23.75 + ,2183.75 + ,100.2 + ,76.98 + ,32370300 + ,25.27 + ,2258.43 + ,105.9 + ,81.08 + ,24171100 + ,26.53 + ,2366.71 + ,105.1 + ,91.66 + ,25009100 + ,27.22 + ,2431.77 + ,105.3 + ,84.84 + ,32084300 + ,27.69 + ,2415.29 + ,110.0 + ,85.73 + ,50117500 + ,28.61 + ,2463.93 + ,110.2 + ,84.61 + ,27522200 + ,26.21 + ,2416.15 + ,111.2 + ,92.91 + ,26816800 + ,25.93 + ,2421.64 + ,108.2 + ,99.80 + ,25136100 + ,27.86 + ,2525.09 + ,106.3 + ,121.19 + ,30295600 + ,28.65 + ,2604.52 + ,108.5 + ,122.04 + ,41526100 + ,27.51 + ,2603.23 + ,105.3 + ,131.76 + ,43845100 + ,27.06 + ,2546.27 + ,111.9 + ,138.48 + ,39188900 + ,26.91 + ,2596.36 + ,105.6 + ,153.47 + ,40496400 + ,27.60 + ,2701.50 + ,99.5 + ,189.95 + ,37438400 + ,34.48 + ,2859.12 + ,95.2 + ,182.22 + ,46553700 + ,31.58 + ,2660.96 + ,87.8 + ,198.08 + ,31771400 + ,33.46 + ,2652.28 + ,90.6 + ,135.36 + ,62108100 + ,30.64 + ,2389.86 + ,87.9 + ,125.02 + ,46645400 + ,25.66 + ,2271.48 + ,76.4 + ,143.50 + ,42313100 + ,26.78 + ,2279.10 + ,65.9 + ,173.95 + ,38841700 + ,26.91 + ,2412.80 + ,62.3 + ,188.75 + ,32650300 + ,26.82 + ,2522.66 + ,57.2 + ,167.44 + ,34281100 + ,26.05 + ,2292.98 + ,50.4 + ,158.95 + ,33096200 + ,24.36 + ,2325.55 + ,51.9 + ,169.53 + ,23273800 + ,25.94 + ,2367.52 + ,58.5 + ,113.66 + ,43697600 + ,25.37 + ,2091.88 + ,61.4 + ,107.59 + ,66902300 + ,21.23 + ,1720.95 + ,38.8 + ,92.67 + ,44957200 + ,19.35 + ,1535.57 + ,44.9 + ,85.35 + ,33800900 + ,18.61 + ,1577.03 + ,38.6 + ,90.13 + ,33487900 + ,16.37 + ,1476.42 + ,4.0 + ,89.31 + ,27394900 + ,15.56 + ,1377.84 + ,25.3 + ,105.12 + ,25963400 + ,17.70 + ,1528.59 + ,26.9 + ,125.83 + ,20952600 + ,19.52 + ,1717.30 + ,40.8 + ,135.81 + ,17702900 + ,20.26 + ,1774.33 + ,54.8 + ,142.43 + ,21282100 + ,23.05 + ,1835.04 + ,49.3 + ,163.39 + ,18449100 + ,22.81 + ,1978.50 + ,47.4 + ,168.21 + ,14415700 + ,24.04 + ,2009.06 + ,54.5 + ,185.35 + ,17906300 + ,25.08 + ,2122.42 + ,53.4 + ,188.50 + ,22197500 + ,27.04 + ,2045.11 + ,48.7 + ,199.91 + ,15856500 + ,28.81 + ,2144.60 + ,50.6 + ,210.73 + ,19068700 + ,29.86 + ,2269.15 + ,53.6 + ,192.06 + ,30855100 + ,27.61 + ,2147.35 + ,56.5 + ,204.62 + ,21209000 + ,28.22 + ,2238.26 + ,46.4 + ,235.00 + ,19541600 + ,28.83 + ,2397.96 + ,52.3 + ,261.09 + ,21955000 + ,30.06 + ,2461.19 + ,57.7 + ,256.88 + ,33725900 + ,25.51 + ,2257.04 + ,62.7 + ,251.53 + ,28192800 + ,22.75 + ,2109.24 + ,54.3 + ,257.25 + ,27377000 + ,25.52 + ,2254.70 + ,51.0 + ,243.10 + ,16228100 + ,23.33 + ,2114.03 + ,53.2 + ,283.75 + ,21278900 + ,24.34 + ,2368.62 + ,48.6 + ,300.98 + ,21457400 + ,26.51 + ,2507.41 + ,49.9) + ,dim=c(5 + ,130) + ,dimnames=list(c('Apple' + ,'Volume' + ,'Microsoft' + ,'NASDAQ' + ,'Consumentenvertrouwen') + ,1:130)) > y <- array(NA,dim=c(5,130),dimnames=list(c('Apple','Volume','Microsoft','NASDAQ','Consumentenvertrouwen'),1:130)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Apple Volume Microsoft NASDAQ Consumentenvertrouwen t 1 25.94 23688100 39.18 3940.35 144.7 1 2 28.66 13741000 35.78 4696.69 140.8 2 3 33.95 14143500 42.54 4572.83 137.1 3 4 31.01 16763800 27.92 3860.66 137.7 4 5 21.00 16634600 25.05 3400.91 144.7 5 6 26.19 13693300 32.03 3966.11 139.2 6 7 25.41 10545800 27.95 3766.99 143.0 7 8 30.47 9409900 27.95 4206.35 140.8 8 9 12.88 39182200 24.15 3672.82 142.5 9 10 9.78 37005800 27.57 3369.63 135.8 10 11 8.25 15818500 22.97 2597.93 132.6 11 12 7.44 16952000 17.37 2470.52 128.6 12 13 10.81 24563400 24.45 2772.73 115.7 13 14 9.12 14163200 23.62 2151.83 109.2 14 15 11.03 18184800 21.90 1840.26 116.9 15 16 12.74 20810300 27.12 2116.24 109.9 16 17 9.98 12843000 27.70 2110.49 116.1 17 18 11.62 13866700 29.23 2160.54 118.9 18 19 9.40 15119200 26.50 2027.13 116.3 19 20 9.27 8301600 22.84 1805.43 114.0 20 21 7.76 14039600 20.49 1498.80 97.0 21 22 8.78 12139700 23.28 1690.20 85.3 22 23 10.65 9649000 25.71 1930.58 84.9 23 24 10.95 8513600 26.52 1950.40 94.6 24 25 12.36 15278600 25.51 1934.03 97.8 25 26 10.85 15590900 23.36 1731.49 95.0 26 27 11.84 9691100 24.15 1845.35 110.7 27 28 12.14 10882700 20.92 1688.23 108.5 28 29 11.65 10294800 20.38 1615.73 110.3 29 30 8.86 16031900 21.90 1463.21 106.3 30 31 7.63 13683600 19.21 1328.26 97.4 31 32 7.38 8677200 19.65 1314.85 94.5 32 33 7.25 9874100 17.51 1172.06 93.7 33 34 8.03 10725500 21.41 1329.75 79.6 34 35 7.75 8348400 23.09 1478.78 84.9 35 36 7.16 8046200 20.70 1335.51 80.7 36 37 7.18 10862300 19.00 1320.91 78.8 37 38 7.51 8100300 19.04 1337.52 64.8 38 39 7.07 7287500 19.45 1341.17 61.4 39 40 7.11 14002500 20.54 1464.31 81.0 40 41 8.98 19037900 19.77 1595.91 83.6 41 42 9.53 10774600 20.60 1622.80 83.5 42 43 10.54 8960600 21.21 1735.02 77.0 43 44 11.31 7773300 21.30 1810.45 81.7 44 45 10.36 9579700 22.33 1786.94 77.0 45 46 11.44 11270700 21.12 1932.21 81.7 46 47 10.45 9492800 20.77 1960.26 92.5 47 48 10.69 9136800 22.11 2003.37 91.7 48 49 11.28 14487600 22.34 2066.15 96.4 49 50 11.96 10133200 21.43 2029.82 88.5 50 51 13.52 18659700 20.14 1994.22 88.5 51 52 12.89 15980700 21.11 1920.15 93.0 52 53 14.03 9732100 21.19 1986.74 93.1 53 54 16.27 14626300 23.07 2047.79 102.8 54 55 16.17 16904000 23.01 1887.36 105.7 55 56 17.25 13616700 22.12 1838.10 98.7 56 57 19.38 13772900 22.40 1896.84 96.7 57 58 26.20 28749200 22.66 1974.99 92.9 58 59 33.53 31408300 24.21 2096.81 92.6 59 60 32.20 26342800 24.13 2175.44 102.7 60 61 38.45 48909500 23.73 2062.41 105.1 61 62 44.86 41542400 22.79 2051.72 104.4 62 63 41.67 24857200 21.89 1999.23 103.0 63 64 36.06 34093700 22.92 1921.65 97.5 64 65 39.76 22555200 23.44 2068.22 103.1 65 66 36.81 19067500 22.57 2056.96 106.2 66 67 42.65 19029100 23.27 2184.83 103.6 67 68 46.89 15223200 24.95 2152.09 105.5 68 69 53.61 21903700 23.45 2151.69 87.5 69 70 57.59 33306600 23.42 2120.30 85.2 70 71 67.82 23898100 25.30 2232.82 98.3 71 72 71.89 23279600 23.90 2205.32 103.8 72 73 75.51 40699800 25.73 2305.82 106.8 73 74 68.49 37646000 24.64 2281.39 102.7 74 75 62.72 37277000 24.95 2339.79 107.5 75 76 70.39 39246800 22.15 2322.57 109.8 76 77 59.77 27418400 20.85 2178.88 104.7 77 78 57.27 30318700 21.45 2172.09 105.7 78 79 67.96 32808100 22.15 2091.47 107.0 79 80 67.85 28668200 23.75 2183.75 100.2 80 81 76.98 32370300 25.27 2258.43 105.9 81 82 81.08 24171100 26.53 2366.71 105.1 82 83 91.66 25009100 27.22 2431.77 105.3 83 84 84.84 32084300 27.69 2415.29 110.0 84 85 85.73 50117500 28.61 2463.93 110.2 85 86 84.61 27522200 26.21 2416.15 111.2 86 87 92.91 26816800 25.93 2421.64 108.2 87 88 99.80 25136100 27.86 2525.09 106.3 88 89 121.19 30295600 28.65 2604.52 108.5 89 90 122.04 41526100 27.51 2603.23 105.3 90 91 131.76 43845100 27.06 2546.27 111.9 91 92 138.48 39188900 26.91 2596.36 105.6 92 93 153.47 40496400 27.60 2701.50 99.5 93 94 189.95 37438400 34.48 2859.12 95.2 94 95 182.22 46553700 31.58 2660.96 87.8 95 96 198.08 31771400 33.46 2652.28 90.6 96 97 135.36 62108100 30.64 2389.86 87.9 97 98 125.02 46645400 25.66 2271.48 76.4 98 99 143.50 42313100 26.78 2279.10 65.9 99 100 173.95 38841700 26.91 2412.80 62.3 100 101 188.75 32650300 26.82 2522.66 57.2 101 102 167.44 34281100 26.05 2292.98 50.4 102 103 158.95 33096200 24.36 2325.55 51.9 103 104 169.53 23273800 25.94 2367.52 58.5 104 105 113.66 43697600 25.37 2091.88 61.4 105 106 107.59 66902300 21.23 1720.95 38.8 106 107 92.67 44957200 19.35 1535.57 44.9 107 108 85.35 33800900 18.61 1577.03 38.6 108 109 90.13 33487900 16.37 1476.42 4.0 109 110 89.31 27394900 15.56 1377.84 25.3 110 111 105.12 25963400 17.70 1528.59 26.9 111 112 125.83 20952600 19.52 1717.30 40.8 112 113 135.81 17702900 20.26 1774.33 54.8 113 114 142.43 21282100 23.05 1835.04 49.3 114 115 163.39 18449100 22.81 1978.50 47.4 115 116 168.21 14415700 24.04 2009.06 54.5 116 117 185.35 17906300 25.08 2122.42 53.4 117 118 188.50 22197500 27.04 2045.11 48.7 118 119 199.91 15856500 28.81 2144.60 50.6 119 120 210.73 19068700 29.86 2269.15 53.6 120 121 192.06 30855100 27.61 2147.35 56.5 121 122 204.62 21209000 28.22 2238.26 46.4 122 123 235.00 19541600 28.83 2397.96 52.3 123 124 261.09 21955000 30.06 2461.19 57.7 124 125 256.88 33725900 25.51 2257.04 62.7 125 126 251.53 28192800 22.75 2109.24 54.3 126 127 257.25 27377000 25.52 2254.70 51.0 127 128 243.10 16228100 23.33 2114.03 53.2 128 129 283.75 21278900 24.34 2368.62 48.6 129 130 300.98 21457400 26.51 2507.41 49.9 130 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Volume Microsoft -1.353e+02 -6.778e-07 4.103e+00 NASDAQ Consumentenvertrouwen t 2.735e-02 -4.888e-01 1.685e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -58.868 -20.678 -3.389 15.956 78.750 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.353e+02 1.918e+01 -7.053 1.09e-10 *** Volume -6.778e-07 2.439e-07 -2.779 0.00630 ** Microsoft 4.103e+00 9.056e-01 4.531 1.36e-05 *** NASDAQ 2.735e-02 6.566e-03 4.165 5.78e-05 *** Consumentenvertrouwen -4.888e-01 1.628e-01 -3.001 0.00325 ** t 1.685e+00 1.244e-01 13.548 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 26.48 on 124 degrees of freedom Multiple R-squared: 0.8853, Adjusted R-squared: 0.8807 F-statistic: 191.4 on 5 and 124 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,] 2.270654e-03 4.541309e-03 9.977293e-01 [2,] 7.836686e-04 1.567337e-03 9.992163e-01 [3,] 2.622332e-04 5.244663e-04 9.997378e-01 [4,] 4.540894e-05 9.081789e-05 9.999546e-01 [5,] 7.845400e-06 1.569080e-05 9.999922e-01 [6,] 1.129215e-06 2.258431e-06 9.999989e-01 [7,] 1.188929e-06 2.377857e-06 9.999988e-01 [8,] 3.376023e-07 6.752045e-07 9.999997e-01 [9,] 5.357655e-08 1.071531e-07 9.999999e-01 [10,] 7.909768e-09 1.581954e-08 1.000000e+00 [11,] 1.120259e-09 2.240518e-09 1.000000e+00 [12,] 1.703089e-10 3.406179e-10 1.000000e+00 [13,] 3.549435e-11 7.098870e-11 1.000000e+00 [14,] 4.883249e-12 9.766498e-12 1.000000e+00 [15,] 6.472378e-13 1.294476e-12 1.000000e+00 [16,] 7.888008e-14 1.577602e-13 1.000000e+00 [17,] 2.419247e-14 4.838494e-14 1.000000e+00 [18,] 6.456102e-15 1.291220e-14 1.000000e+00 [19,] 9.794224e-16 1.958845e-15 1.000000e+00 [20,] 3.111408e-16 6.222816e-16 1.000000e+00 [21,] 8.213833e-17 1.642767e-16 1.000000e+00 [22,] 1.705280e-17 3.410559e-17 1.000000e+00 [23,] 4.400473e-18 8.800946e-18 1.000000e+00 [24,] 1.010989e-18 2.021978e-18 1.000000e+00 [25,] 5.188629e-19 1.037726e-18 1.000000e+00 [26,] 9.674729e-20 1.934946e-19 1.000000e+00 [27,] 2.604995e-20 5.209990e-20 1.000000e+00 [28,] 6.960002e-21 1.392000e-20 1.000000e+00 [29,] 2.579224e-21 5.158448e-21 1.000000e+00 [30,] 6.669079e-22 1.333816e-21 1.000000e+00 [31,] 1.802711e-22 3.605422e-22 1.000000e+00 [32,] 8.298640e-23 1.659728e-22 1.000000e+00 [33,] 5.751107e-23 1.150221e-22 1.000000e+00 [34,] 2.637401e-23 5.274802e-23 1.000000e+00 [35,] 6.467098e-24 1.293420e-23 1.000000e+00 [36,] 1.490124e-24 2.980248e-24 1.000000e+00 [37,] 3.362501e-25 6.725002e-25 1.000000e+00 [38,] 5.166536e-26 1.033307e-25 1.000000e+00 [39,] 1.290054e-26 2.580107e-26 1.000000e+00 [40,] 2.880241e-27 5.760482e-27 1.000000e+00 [41,] 3.862704e-28 7.725407e-28 1.000000e+00 [42,] 5.165804e-29 1.033161e-28 1.000000e+00 [43,] 2.788829e-29 5.577658e-29 1.000000e+00 [44,] 6.456055e-30 1.291211e-29 1.000000e+00 [45,] 8.665588e-31 1.733118e-30 1.000000e+00 [46,] 2.165920e-31 4.331840e-31 1.000000e+00 [47,] 1.340294e-31 2.680588e-31 1.000000e+00 [48,] 1.025724e-31 2.051447e-31 1.000000e+00 [49,] 1.276992e-31 2.553984e-31 1.000000e+00 [50,] 1.700206e-27 3.400412e-27 1.000000e+00 [51,] 7.375909e-24 1.475182e-23 1.000000e+00 [52,] 3.887957e-23 7.775915e-23 1.000000e+00 [53,] 2.912708e-21 5.825417e-21 1.000000e+00 [54,] 1.617869e-18 3.235738e-18 1.000000e+00 [55,] 1.288482e-16 2.576964e-16 1.000000e+00 [56,] 1.003826e-15 2.007652e-15 1.000000e+00 [57,] 3.741995e-15 7.483989e-15 1.000000e+00 [58,] 5.480478e-15 1.096096e-14 1.000000e+00 [59,] 9.191653e-15 1.838331e-14 1.000000e+00 [60,] 3.646221e-14 7.292441e-14 1.000000e+00 [61,] 2.085401e-12 4.170803e-12 1.000000e+00 [62,] 1.238892e-10 2.477785e-10 1.000000e+00 [63,] 2.096185e-08 4.192370e-08 1.000000e+00 [64,] 4.510887e-06 9.021774e-06 9.999955e-01 [65,] 7.073937e-05 1.414787e-04 9.999293e-01 [66,] 2.058254e-04 4.116508e-04 9.997942e-01 [67,] 1.578685e-04 3.157370e-04 9.998421e-01 [68,] 2.004713e-04 4.009427e-04 9.997995e-01 [69,] 2.206154e-04 4.412307e-04 9.997794e-01 [70,] 1.857581e-04 3.715161e-04 9.998142e-01 [71,] 1.517036e-03 3.034072e-03 9.984830e-01 [72,] 3.356932e-03 6.713864e-03 9.966431e-01 [73,] 9.001954e-03 1.800391e-02 9.909980e-01 [74,] 1.367167e-02 2.734334e-02 9.863283e-01 [75,] 2.844413e-02 5.688826e-02 9.715559e-01 [76,] 2.552149e-02 5.104297e-02 9.744785e-01 [77,] 2.002965e-02 4.005930e-02 9.799703e-01 [78,] 1.636575e-02 3.273149e-02 9.836343e-01 [79,] 1.768749e-02 3.537499e-02 9.823125e-01 [80,] 2.569354e-02 5.138707e-02 9.743065e-01 [81,] 6.818205e-02 1.363641e-01 9.318180e-01 [82,] 1.642046e-01 3.284093e-01 8.357954e-01 [83,] 2.699825e-01 5.399650e-01 7.300175e-01 [84,] 4.757242e-01 9.514485e-01 5.242758e-01 [85,] 8.249461e-01 3.501078e-01 1.750539e-01 [86,] 9.460227e-01 1.079547e-01 5.397733e-02 [87,] 9.750740e-01 4.985204e-02 2.492602e-02 [88,] 9.996694e-01 6.611062e-04 3.305531e-04 [89,] 9.993989e-01 1.202122e-03 6.010609e-04 [90,] 9.993059e-01 1.388109e-03 6.940546e-04 [91,] 9.990126e-01 1.974753e-03 9.873767e-04 [92,] 9.994725e-01 1.054906e-03 5.274529e-04 [93,] 9.996914e-01 6.171353e-04 3.085677e-04 [94,] 9.999436e-01 1.128242e-04 5.641209e-05 [95,] 9.998929e-01 2.141378e-04 1.070689e-04 [96,] 9.999859e-01 2.813946e-05 1.406973e-05 [97,] 9.999831e-01 3.371412e-05 1.685706e-05 [98,] 9.999653e-01 6.930672e-05 3.465336e-05 [99,] 9.999445e-01 1.110323e-04 5.551615e-05 [100,] 9.999164e-01 1.672432e-04 8.362162e-05 [101,] 9.998023e-01 3.954726e-04 1.977363e-04 [102,] 9.995341e-01 9.317760e-04 4.658880e-04 [103,] 9.990029e-01 1.994230e-03 9.971150e-04 [104,] 9.978122e-01 4.375527e-03 2.187764e-03 [105,] 9.954363e-01 9.127367e-03 4.563683e-03 [106,] 9.901597e-01 1.968062e-02 9.840310e-03 [107,] 9.806656e-01 3.866879e-02 1.933440e-02 [108,] 9.661982e-01 6.760368e-02 3.380184e-02 [109,] 9.709557e-01 5.808855e-02 2.904428e-02 [110,] 9.559822e-01 8.803564e-02 4.401782e-02 [111,] 9.684314e-01 6.313727e-02 3.156863e-02 [112,] 9.658415e-01 6.831702e-02 3.415851e-02 [113,] 9.575494e-01 8.490125e-02 4.245063e-02 > postscript(file="/var/www/html/rcomp/tmp/17ry01292184662.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/27ry01292184662.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/www/html/rcomp/tmp/37ry01292184662.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/www/html/rcomp/tmp/4z0fk1292184662.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/www/html/rcomp/tmp/5z0fk1292184662.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 = 130 Frequency = 1 1 2 3 4 5 6 -22.23848555 -36.58558664 -58.86799387 18.04533233 34.03438739 -11.24210478 7 8 9 10 11 12 8.20426195 -2.28213834 29.63822553 14.36146321 35.20216456 57.98399290 13 14 15 16 17 18 21.20568565 27.99104219 50.28419354 19.69973431 10.66175273 5.03192895 19 20 21 22 23 24 15.55594571 29.07737179 39.49178280 15.13728973 -3.10707189 -4.38674970 25 26 27 28 29 30 6.07968189 16.08931711 12.71293999 28.61133423 31.11609117 26.50868463 31 32 33 34 35 36 32.38086016 24.19614485 35.48774503 7.95225642 -4.00331765 5.18939218 37 38 39 40 41 42 11.87951076 1.19128061 -4.92879407 -0.28334991 4.14582826 -6.78045607 43 44 45 46 47 48 -17.43425807 -19.28929268 -26.58073365 -22.75041688 -20.68307654 -29.43814083 49 50 51 52 53 54 -27.27006242 -30.36014810 -18.43887396 -22.32509341 -29.20622066 -29.97720044 55 56 57 58 59 60 -24.16731191 -25.42266881 -28.60489726 -18.38035887 -20.77172213 -24.10613172 61 62 63 64 65 66 1.66040555 5.19915913 -6.54111835 -12.36856262 -21.58000481 -23.18612257 67 68 69 70 71 72 -26.69757854 -31.79214902 -24.86063969 -14.97927806 -17.20074645 -6.05010742 73 74 75 76 77 78 -1.09915752 -8.73725243 -16.96575449 3.43890843 -10.11214219 -14.11903330 79 80 81 82 83 84 -3.45897910 -20.47298697 -16.01253728 -27.67790632 -22.72799219 -25.61822828 85 86 87 88 89 90 -19.19785295 -25.67476418 -20.00550166 -27.61735347 -8.75410003 1.17212176 91 92 93 94 95 96 17.40892365 15.45417745 20.95703565 19.03519028 29.50115219 27.54778121 97 98 99 100 101 102 1.13425348 -3.31981312 0.60238980 21.06474508 24.85506494 9.08291899 103 104 105 106 107 108 4.88177010 2.71335825 -29.70341816 -5.64315370 -21.35726749 -39.10084350 109 110 111 112 113 114 -41.18576125 -31.39058225 -30.35821333 -20.56536351 -12.22692655 -20.66309189 115 116 117 118 119 120 -7.17579945 -9.18770989 0.72764581 -3.12436469 -6.75293114 -1.68946219 121 122 123 124 125 126 -0.07442548 -5.66365149 17.91391918 39.81738004 68.59835042 69.07486876 127 128 129 130 55.59920065 46.11607262 75.14892603 78.74994379 > postscript(file="/var/www/html/rcomp/tmp/6z0fk1292184662.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 = 130 Frequency = 1 lag(myerror, k = 1) myerror 0 -22.23848555 NA 1 -36.58558664 -22.23848555 2 -58.86799387 -36.58558664 3 18.04533233 -58.86799387 4 34.03438739 18.04533233 5 -11.24210478 34.03438739 6 8.20426195 -11.24210478 7 -2.28213834 8.20426195 8 29.63822553 -2.28213834 9 14.36146321 29.63822553 10 35.20216456 14.36146321 11 57.98399290 35.20216456 12 21.20568565 57.98399290 13 27.99104219 21.20568565 14 50.28419354 27.99104219 15 19.69973431 50.28419354 16 10.66175273 19.69973431 17 5.03192895 10.66175273 18 15.55594571 5.03192895 19 29.07737179 15.55594571 20 39.49178280 29.07737179 21 15.13728973 39.49178280 22 -3.10707189 15.13728973 23 -4.38674970 -3.10707189 24 6.07968189 -4.38674970 25 16.08931711 6.07968189 26 12.71293999 16.08931711 27 28.61133423 12.71293999 28 31.11609117 28.61133423 29 26.50868463 31.11609117 30 32.38086016 26.50868463 31 24.19614485 32.38086016 32 35.48774503 24.19614485 33 7.95225642 35.48774503 34 -4.00331765 7.95225642 35 5.18939218 -4.00331765 36 11.87951076 5.18939218 37 1.19128061 11.87951076 38 -4.92879407 1.19128061 39 -0.28334991 -4.92879407 40 4.14582826 -0.28334991 41 -6.78045607 4.14582826 42 -17.43425807 -6.78045607 43 -19.28929268 -17.43425807 44 -26.58073365 -19.28929268 45 -22.75041688 -26.58073365 46 -20.68307654 -22.75041688 47 -29.43814083 -20.68307654 48 -27.27006242 -29.43814083 49 -30.36014810 -27.27006242 50 -18.43887396 -30.36014810 51 -22.32509341 -18.43887396 52 -29.20622066 -22.32509341 53 -29.97720044 -29.20622066 54 -24.16731191 -29.97720044 55 -25.42266881 -24.16731191 56 -28.60489726 -25.42266881 57 -18.38035887 -28.60489726 58 -20.77172213 -18.38035887 59 -24.10613172 -20.77172213 60 1.66040555 -24.10613172 61 5.19915913 1.66040555 62 -6.54111835 5.19915913 63 -12.36856262 -6.54111835 64 -21.58000481 -12.36856262 65 -23.18612257 -21.58000481 66 -26.69757854 -23.18612257 67 -31.79214902 -26.69757854 68 -24.86063969 -31.79214902 69 -14.97927806 -24.86063969 70 -17.20074645 -14.97927806 71 -6.05010742 -17.20074645 72 -1.09915752 -6.05010742 73 -8.73725243 -1.09915752 74 -16.96575449 -8.73725243 75 3.43890843 -16.96575449 76 -10.11214219 3.43890843 77 -14.11903330 -10.11214219 78 -3.45897910 -14.11903330 79 -20.47298697 -3.45897910 80 -16.01253728 -20.47298697 81 -27.67790632 -16.01253728 82 -22.72799219 -27.67790632 83 -25.61822828 -22.72799219 84 -19.19785295 -25.61822828 85 -25.67476418 -19.19785295 86 -20.00550166 -25.67476418 87 -27.61735347 -20.00550166 88 -8.75410003 -27.61735347 89 1.17212176 -8.75410003 90 17.40892365 1.17212176 91 15.45417745 17.40892365 92 20.95703565 15.45417745 93 19.03519028 20.95703565 94 29.50115219 19.03519028 95 27.54778121 29.50115219 96 1.13425348 27.54778121 97 -3.31981312 1.13425348 98 0.60238980 -3.31981312 99 21.06474508 0.60238980 100 24.85506494 21.06474508 101 9.08291899 24.85506494 102 4.88177010 9.08291899 103 2.71335825 4.88177010 104 -29.70341816 2.71335825 105 -5.64315370 -29.70341816 106 -21.35726749 -5.64315370 107 -39.10084350 -21.35726749 108 -41.18576125 -39.10084350 109 -31.39058225 -41.18576125 110 -30.35821333 -31.39058225 111 -20.56536351 -30.35821333 112 -12.22692655 -20.56536351 113 -20.66309189 -12.22692655 114 -7.17579945 -20.66309189 115 -9.18770989 -7.17579945 116 0.72764581 -9.18770989 117 -3.12436469 0.72764581 118 -6.75293114 -3.12436469 119 -1.68946219 -6.75293114 120 -0.07442548 -1.68946219 121 -5.66365149 -0.07442548 122 17.91391918 -5.66365149 123 39.81738004 17.91391918 124 68.59835042 39.81738004 125 69.07486876 68.59835042 126 55.59920065 69.07486876 127 46.11607262 55.59920065 128 75.14892603 46.11607262 129 78.74994379 75.14892603 130 NA 78.74994379 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -36.58558664 -22.23848555 [2,] -58.86799387 -36.58558664 [3,] 18.04533233 -58.86799387 [4,] 34.03438739 18.04533233 [5,] -11.24210478 34.03438739 [6,] 8.20426195 -11.24210478 [7,] -2.28213834 8.20426195 [8,] 29.63822553 -2.28213834 [9,] 14.36146321 29.63822553 [10,] 35.20216456 14.36146321 [11,] 57.98399290 35.20216456 [12,] 21.20568565 57.98399290 [13,] 27.99104219 21.20568565 [14,] 50.28419354 27.99104219 [15,] 19.69973431 50.28419354 [16,] 10.66175273 19.69973431 [17,] 5.03192895 10.66175273 [18,] 15.55594571 5.03192895 [19,] 29.07737179 15.55594571 [20,] 39.49178280 29.07737179 [21,] 15.13728973 39.49178280 [22,] -3.10707189 15.13728973 [23,] -4.38674970 -3.10707189 [24,] 6.07968189 -4.38674970 [25,] 16.08931711 6.07968189 [26,] 12.71293999 16.08931711 [27,] 28.61133423 12.71293999 [28,] 31.11609117 28.61133423 [29,] 26.50868463 31.11609117 [30,] 32.38086016 26.50868463 [31,] 24.19614485 32.38086016 [32,] 35.48774503 24.19614485 [33,] 7.95225642 35.48774503 [34,] -4.00331765 7.95225642 [35,] 5.18939218 -4.00331765 [36,] 11.87951076 5.18939218 [37,] 1.19128061 11.87951076 [38,] -4.92879407 1.19128061 [39,] -0.28334991 -4.92879407 [40,] 4.14582826 -0.28334991 [41,] -6.78045607 4.14582826 [42,] -17.43425807 -6.78045607 [43,] -19.28929268 -17.43425807 [44,] -26.58073365 -19.28929268 [45,] -22.75041688 -26.58073365 [46,] -20.68307654 -22.75041688 [47,] -29.43814083 -20.68307654 [48,] -27.27006242 -29.43814083 [49,] -30.36014810 -27.27006242 [50,] -18.43887396 -30.36014810 [51,] -22.32509341 -18.43887396 [52,] -29.20622066 -22.32509341 [53,] -29.97720044 -29.20622066 [54,] -24.16731191 -29.97720044 [55,] -25.42266881 -24.16731191 [56,] -28.60489726 -25.42266881 [57,] -18.38035887 -28.60489726 [58,] -20.77172213 -18.38035887 [59,] -24.10613172 -20.77172213 [60,] 1.66040555 -24.10613172 [61,] 5.19915913 1.66040555 [62,] -6.54111835 5.19915913 [63,] -12.36856262 -6.54111835 [64,] -21.58000481 -12.36856262 [65,] -23.18612257 -21.58000481 [66,] -26.69757854 -23.18612257 [67,] -31.79214902 -26.69757854 [68,] -24.86063969 -31.79214902 [69,] -14.97927806 -24.86063969 [70,] -17.20074645 -14.97927806 [71,] -6.05010742 -17.20074645 [72,] -1.09915752 -6.05010742 [73,] -8.73725243 -1.09915752 [74,] -16.96575449 -8.73725243 [75,] 3.43890843 -16.96575449 [76,] -10.11214219 3.43890843 [77,] -14.11903330 -10.11214219 [78,] -3.45897910 -14.11903330 [79,] -20.47298697 -3.45897910 [80,] -16.01253728 -20.47298697 [81,] -27.67790632 -16.01253728 [82,] -22.72799219 -27.67790632 [83,] -25.61822828 -22.72799219 [84,] -19.19785295 -25.61822828 [85,] -25.67476418 -19.19785295 [86,] -20.00550166 -25.67476418 [87,] -27.61735347 -20.00550166 [88,] -8.75410003 -27.61735347 [89,] 1.17212176 -8.75410003 [90,] 17.40892365 1.17212176 [91,] 15.45417745 17.40892365 [92,] 20.95703565 15.45417745 [93,] 19.03519028 20.95703565 [94,] 29.50115219 19.03519028 [95,] 27.54778121 29.50115219 [96,] 1.13425348 27.54778121 [97,] -3.31981312 1.13425348 [98,] 0.60238980 -3.31981312 [99,] 21.06474508 0.60238980 [100,] 24.85506494 21.06474508 [101,] 9.08291899 24.85506494 [102,] 4.88177010 9.08291899 [103,] 2.71335825 4.88177010 [104,] -29.70341816 2.71335825 [105,] -5.64315370 -29.70341816 [106,] -21.35726749 -5.64315370 [107,] -39.10084350 -21.35726749 [108,] -41.18576125 -39.10084350 [109,] -31.39058225 -41.18576125 [110,] -30.35821333 -31.39058225 [111,] -20.56536351 -30.35821333 [112,] -12.22692655 -20.56536351 [113,] -20.66309189 -12.22692655 [114,] -7.17579945 -20.66309189 [115,] -9.18770989 -7.17579945 [116,] 0.72764581 -9.18770989 [117,] -3.12436469 0.72764581 [118,] -6.75293114 -3.12436469 [119,] -1.68946219 -6.75293114 [120,] -0.07442548 -1.68946219 [121,] -5.66365149 -0.07442548 [122,] 17.91391918 -5.66365149 [123,] 39.81738004 17.91391918 [124,] 68.59835042 39.81738004 [125,] 69.07486876 68.59835042 [126,] 55.59920065 69.07486876 [127,] 46.11607262 55.59920065 [128,] 75.14892603 46.11607262 [129,] 78.74994379 75.14892603 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -36.58558664 -22.23848555 2 -58.86799387 -36.58558664 3 18.04533233 -58.86799387 4 34.03438739 18.04533233 5 -11.24210478 34.03438739 6 8.20426195 -11.24210478 7 -2.28213834 8.20426195 8 29.63822553 -2.28213834 9 14.36146321 29.63822553 10 35.20216456 14.36146321 11 57.98399290 35.20216456 12 21.20568565 57.98399290 13 27.99104219 21.20568565 14 50.28419354 27.99104219 15 19.69973431 50.28419354 16 10.66175273 19.69973431 17 5.03192895 10.66175273 18 15.55594571 5.03192895 19 29.07737179 15.55594571 20 39.49178280 29.07737179 21 15.13728973 39.49178280 22 -3.10707189 15.13728973 23 -4.38674970 -3.10707189 24 6.07968189 -4.38674970 25 16.08931711 6.07968189 26 12.71293999 16.08931711 27 28.61133423 12.71293999 28 31.11609117 28.61133423 29 26.50868463 31.11609117 30 32.38086016 26.50868463 31 24.19614485 32.38086016 32 35.48774503 24.19614485 33 7.95225642 35.48774503 34 -4.00331765 7.95225642 35 5.18939218 -4.00331765 36 11.87951076 5.18939218 37 1.19128061 11.87951076 38 -4.92879407 1.19128061 39 -0.28334991 -4.92879407 40 4.14582826 -0.28334991 41 -6.78045607 4.14582826 42 -17.43425807 -6.78045607 43 -19.28929268 -17.43425807 44 -26.58073365 -19.28929268 45 -22.75041688 -26.58073365 46 -20.68307654 -22.75041688 47 -29.43814083 -20.68307654 48 -27.27006242 -29.43814083 49 -30.36014810 -27.27006242 50 -18.43887396 -30.36014810 51 -22.32509341 -18.43887396 52 -29.20622066 -22.32509341 53 -29.97720044 -29.20622066 54 -24.16731191 -29.97720044 55 -25.42266881 -24.16731191 56 -28.60489726 -25.42266881 57 -18.38035887 -28.60489726 58 -20.77172213 -18.38035887 59 -24.10613172 -20.77172213 60 1.66040555 -24.10613172 61 5.19915913 1.66040555 62 -6.54111835 5.19915913 63 -12.36856262 -6.54111835 64 -21.58000481 -12.36856262 65 -23.18612257 -21.58000481 66 -26.69757854 -23.18612257 67 -31.79214902 -26.69757854 68 -24.86063969 -31.79214902 69 -14.97927806 -24.86063969 70 -17.20074645 -14.97927806 71 -6.05010742 -17.20074645 72 -1.09915752 -6.05010742 73 -8.73725243 -1.09915752 74 -16.96575449 -8.73725243 75 3.43890843 -16.96575449 76 -10.11214219 3.43890843 77 -14.11903330 -10.11214219 78 -3.45897910 -14.11903330 79 -20.47298697 -3.45897910 80 -16.01253728 -20.47298697 81 -27.67790632 -16.01253728 82 -22.72799219 -27.67790632 83 -25.61822828 -22.72799219 84 -19.19785295 -25.61822828 85 -25.67476418 -19.19785295 86 -20.00550166 -25.67476418 87 -27.61735347 -20.00550166 88 -8.75410003 -27.61735347 89 1.17212176 -8.75410003 90 17.40892365 1.17212176 91 15.45417745 17.40892365 92 20.95703565 15.45417745 93 19.03519028 20.95703565 94 29.50115219 19.03519028 95 27.54778121 29.50115219 96 1.13425348 27.54778121 97 -3.31981312 1.13425348 98 0.60238980 -3.31981312 99 21.06474508 0.60238980 100 24.85506494 21.06474508 101 9.08291899 24.85506494 102 4.88177010 9.08291899 103 2.71335825 4.88177010 104 -29.70341816 2.71335825 105 -5.64315370 -29.70341816 106 -21.35726749 -5.64315370 107 -39.10084350 -21.35726749 108 -41.18576125 -39.10084350 109 -31.39058225 -41.18576125 110 -30.35821333 -31.39058225 111 -20.56536351 -30.35821333 112 -12.22692655 -20.56536351 113 -20.66309189 -12.22692655 114 -7.17579945 -20.66309189 115 -9.18770989 -7.17579945 116 0.72764581 -9.18770989 117 -3.12436469 0.72764581 118 -6.75293114 -3.12436469 119 -1.68946219 -6.75293114 120 -0.07442548 -1.68946219 121 -5.66365149 -0.07442548 122 17.91391918 -5.66365149 123 39.81738004 17.91391918 124 68.59835042 39.81738004 125 69.07486876 68.59835042 126 55.59920065 69.07486876 127 46.11607262 55.59920065 128 75.14892603 46.11607262 129 78.74994379 75.14892603 > 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/7sawn1292184662.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/www/html/rcomp/tmp/831vq1292184662.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/www/html/rcomp/tmp/931vq1292184662.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/www/html/rcomp/tmp/10vsub1292184662.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/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/11ztbz1292184662.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/122t9n1292184662.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/139c6g1292184662.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/14k3o11292184662.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/155mmp1292184662.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/161wkg1292184662.tab") + } > > try(system("convert tmp/17ry01292184662.ps tmp/17ry01292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/27ry01292184662.ps tmp/27ry01292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/37ry01292184662.ps tmp/37ry01292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/4z0fk1292184662.ps tmp/4z0fk1292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/5z0fk1292184662.ps tmp/5z0fk1292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/6z0fk1292184662.ps tmp/6z0fk1292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/7sawn1292184662.ps tmp/7sawn1292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/831vq1292184662.ps tmp/831vq1292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/931vq1292184662.ps tmp/931vq1292184662.png",intern=TRUE)) character(0) > try(system("convert tmp/10vsub1292184662.ps tmp/10vsub1292184662.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.512 1.796 8.337