R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(10.81 + ,-0.2643 + ,0 + ,0 + ,24563400 + ,24.45 + ,115.7 + ,9.12 + ,-0.2643 + ,0 + ,0 + ,14163200 + ,23.62 + ,109.2 + ,11.03 + ,-0.2643 + ,0 + ,0 + ,18184800 + ,21.90 + ,116.9 + ,12.74 + ,-0.1918 + ,0 + ,0 + ,20810300 + ,27.12 + ,109.9 + ,9.98 + ,-0.1918 + ,0 + ,0 + ,12843000 + ,27.70 + ,116.1 + ,11.62 + ,-0.1918 + ,0 + ,0 + ,13866700 + ,29.23 + ,118.9 + ,9.40 + ,-0.2246 + ,0 + ,0 + ,15119200 + ,26.50 + ,116.3 + ,9.27 + ,-0.2246 + ,0 + ,0 + ,8301600 + ,22.84 + ,114.0 + ,7.76 + ,-0.2246 + ,0 + ,0 + ,14039600 + ,20.49 + ,97.0 + ,8.78 + ,0.3654 + ,0 + ,0 + ,12139700 + ,23.28 + ,85.3 + ,10.65 + ,0.3654 + ,0 + ,0 + ,9649000 + ,25.71 + ,84.9 + ,10.95 + ,0.3654 + ,0 + ,0 + ,8513600 + ,26.52 + ,94.6 + ,12.36 + ,0.0447 + ,0 + ,0 + ,15278600 + ,25.51 + ,97.8 + ,10.85 + ,0.0447 + ,0 + ,0 + ,15590900 + ,23.36 + ,95.0 + ,11.84 + ,0.0447 + ,0 + ,0 + ,9691100 + ,24.15 + ,110.7 + ,12.14 + ,-0.0312 + ,0 + ,0 + ,10882700 + ,20.92 + ,108.5 + ,11.65 + ,-0.0312 + ,0 + ,0 + ,10294800 + ,20.38 + ,110.3 + ,8.86 + ,-0.0312 + ,0 + ,0 + ,16031900 + ,21.90 + ,106.3 + ,7.63 + ,-0.0048 + ,0 + ,0 + ,13683600 + ,19.21 + ,97.4 + ,7.38 + ,-0.0048 + ,0 + ,0 + ,8677200 + ,19.65 + ,94.5 + ,7.25 + ,-0.0048 + ,0 + ,0 + ,9874100 + ,17.51 + ,93.7 + ,8.03 + ,0.0705 + ,0 + ,0 + ,10725500 + ,21.41 + ,79.6 + ,7.75 + ,0.0705 + ,0 + ,0 + ,8348400 + ,23.09 + ,84.9 + ,7.16 + ,0.0705 + ,0 + ,0 + ,8046200 + ,20.70 + ,80.7 + ,7.18 + ,-0.0134 + ,0 + ,0 + ,10862300 + ,19.00 + ,78.8 + ,7.51 + ,-0.0134 + ,0 + ,0 + ,8100300 + ,19.04 + ,64.8 + ,7.07 + ,-0.0134 + ,0 + ,0 + ,7287500 + ,19.45 + ,61.4 + ,7.11 + ,0.0812 + ,0 + ,0 + ,14002500 + ,20.54 + ,81.0 + ,8.98 + ,0.0812 + ,0 + ,0 + ,19037900 + ,19.77 + ,83.6 + ,9.53 + ,0.0812 + ,0 + ,0 + ,10774600 + ,20.60 + ,83.5 + ,10.54 + ,0.1885 + ,0 + ,0 + ,8960600 + ,21.21 + ,77.0 + ,11.31 + ,0.1885 + ,0 + ,0 + ,7773300 + ,21.30 + ,81.7 + ,10.36 + ,0.1885 + ,0 + ,0 + ,9579700 + ,22.33 + ,77.0 + ,11.44 + ,0.3628 + ,0 + ,0 + ,11270700 + ,21.12 + ,81.7 + ,10.45 + ,0.3628 + ,0 + ,0 + ,9492800 + ,20.77 + ,92.5 + ,10.69 + ,0.3628 + ,0 + ,0 + ,9136800 + ,22.11 + ,91.7 + ,11.28 + ,0.2942 + ,0 + ,0 + ,14487600 + ,22.34 + ,96.4 + ,11.96 + ,0.2942 + ,0 + ,0 + ,10133200 + ,21.43 + ,88.5 + ,13.52 + ,0.2942 + ,0 + ,0 + ,18659700 + ,20.14 + ,88.5 + ,12.89 + ,0.3036 + ,0 + ,0 + ,15980700 + ,21.11 + ,93.0 + ,14.03 + ,0.3036 + ,0 + ,0 + ,9732100 + ,21.19 + ,93.1 + ,16.27 + ,0.3036 + ,0 + ,0 + ,14626300 + ,23.07 + ,102.8 + ,16.17 + ,0.3703 + ,0 + ,0 + ,16904000 + ,23.01 + ,105.7 + ,17.25 + ,0.3703 + ,0 + ,0 + ,13616700 + ,22.12 + ,98.7 + ,19.38 + ,0.3703 + ,0 + ,0 + ,13772900 + ,22.40 + ,96.7 + ,26.20 + ,0.7398 + ,0 + ,0 + ,28749200 + ,22.66 + ,92.9 + ,33.53 + ,0.7398 + ,0 + ,0 + ,31408300 + ,24.21 + ,92.6 + ,32.20 + ,0.7398 + ,0 + ,0 + ,26342800 + ,24.13 + ,102.7 + ,38.45 + ,0.6988 + ,0 + ,0 + ,48909500 + ,23.73 + ,105.1 + ,44.86 + ,0.6988 + ,0 + ,0 + ,41542400 + ,22.79 + ,104.4 + ,41.67 + ,0.6988 + ,0 + ,0 + ,24857200 + ,21.89 + ,103.0 + ,36.06 + ,0.7478 + ,0 + ,0 + ,34093700 + ,22.92 + ,97.5 + ,39.76 + ,0.7478 + ,0 + ,0 + ,22555200 + ,23.44 + ,103.1 + ,36.81 + ,0.7478 + ,0 + ,0 + ,19067500 + ,22.57 + ,106.2 + ,42.65 + ,0.5651 + ,0 + ,0 + ,19029100 + ,23.27 + ,103.6 + ,46.89 + ,0.5651 + ,0 + ,0 + ,15223200 + ,24.95 + ,105.5 + ,53.61 + ,0.5651 + ,0 + ,0 + ,21903700 + ,23.45 + ,87.5 + ,57.59 + ,0.6473 + ,0 + ,0 + ,33306600 + ,23.42 + ,85.2 + ,67.82 + ,0.6473 + ,0 + ,0 + ,23898100 + ,25.30 + ,98.3 + ,71.89 + ,0.6473 + ,0 + ,0 + ,23279600 + ,23.90 + ,103.8 + ,75.51 + ,0.3441 + ,0 + ,0 + ,40699800 + ,25.73 + ,106.8 + ,68.49 + ,0.3441 + ,0 + ,0 + ,37646000 + ,24.64 + ,102.7 + ,62.72 + ,0.3441 + ,0 + ,0 + ,37277000 + ,24.95 + ,107.5 + ,70.39 + ,0.2415 + ,0 + ,0 + ,39246800 + ,22.15 + ,109.8 + ,59.77 + ,0.2415 + ,0 + ,0 + ,27418400 + ,20.85 + ,104.7 + ,57.27 + ,0.2415 + ,0 + ,0 + ,30318700 + ,21.45 + ,105.7 + ,67.96 + ,0.3151 + ,0 + ,0 + ,32808100 + ,22.15 + ,107.0 + ,67.85 + ,0.3151 + ,0 + ,0 + ,28668200 + ,23.75 + ,100.2 + ,76.98 + ,0.3151 + ,0 + ,0 + ,32370300 + ,25.27 + ,105.9 + ,81.08 + ,0.239 + ,0 + ,0 + ,24171100 + ,26.53 + ,105.1 + ,91.66 + ,0.239 + ,0 + ,0 + ,25009100 + ,27.22 + ,105.3 + ,84.84 + ,0.239 + ,0 + ,0 + ,32084300 + ,27.69 + ,110.0 + ,85.73 + ,0.2127 + ,0 + ,0 + ,50117500 + ,28.61 + ,110.2 + ,84.61 + ,0.2127 + ,0 + ,0 + ,27522200 + ,26.21 + ,111.2 + ,92.91 + ,0.2127 + ,0 + ,0 + ,26816800 + ,25.93 + ,108.2 + ,99.80 + ,0.273 + ,0 + ,0 + ,25136100 + ,27.86 + ,106.3 + ,121.19 + ,0.273 + ,0 + ,0 + ,30295600 + ,28.65 + ,108.5 + ,122.04 + ,0.273 + ,0.273 + ,0 + ,41526100 + ,27.51 + ,105.3 + ,131.76 + ,0.3657 + ,0.3657 + ,0 + ,43845100 + ,27.06 + ,111.9 + ,138.48 + ,0.3657 + ,0.3657 + ,0 + ,39188900 + ,26.91 + ,105.6 + ,153.47 + ,0.3657 + ,0.3657 + ,0 + ,40496400 + ,27.60 + ,99.5 + ,189.95 + ,0.4643 + ,0.4643 + ,0 + ,37438400 + ,34.48 + ,95.2 + ,182.22 + ,0.4643 + ,0.4643 + ,0 + ,46553700 + ,31.58 + ,87.8 + ,198.08 + ,0.4643 + ,0.4643 + ,0 + ,31771400 + ,33.46 + ,90.6 + ,135.36 + ,0.5096 + ,0.5096 + ,0 + ,62108100 + ,30.64 + ,87.9 + ,125.02 + ,0.5096 + ,0.5096 + ,0 + ,46645400 + ,25.66 + ,76.4 + ,143.50 + ,0.5096 + ,0.5096 + ,0 + ,42313100 + ,26.78 + ,65.9 + ,173.95 + ,0.3592 + ,0.3592 + ,0 + ,38841700 + ,26.91 + ,62.3 + ,188.75 + ,0.3592 + ,0.3592 + ,0 + ,32650300 + ,26.82 + ,57.2 + ,167.44 + ,0.3592 + ,0.3592 + ,0 + ,34281100 + ,26.05 + ,50.4 + ,158.95 + ,0.7439 + ,0.7439 + ,0 + ,33096200 + ,24.36 + ,51.9 + ,169.53 + ,0.7439 + ,0.7439 + ,0 + ,23273800 + ,25.94 + ,58.5 + ,113.66 + ,0.7439 + ,0.7439 + ,0 + ,43697600 + ,25.37 + ,61.4 + ,107.59 + ,0.139 + ,0.139 + ,0 + ,66902300 + ,21.23 + ,38.8 + ,92.67 + ,0.139 + ,0.139 + ,0 + ,44957200 + ,19.35 + ,44.9 + ,85.35 + ,0.139 + ,0.139 + ,0 + ,33800900 + ,18.61 + ,38.6 + ,90.13 + ,0.1383 + ,0.1383 + ,0 + ,33487900 + ,16.37 + ,4.0 + ,89.31 + ,0.1383 + ,0.1383 + ,0 + ,27394900 + ,15.56 + ,25.3 + ,105.12 + ,0.1383 + ,0.1383 + ,0 + ,25963400 + ,17.70 + ,26.9 + ,125.83 + ,0.2874 + ,0.2874 + ,0 + ,20952600 + ,19.52 + ,40.8 + ,135.81 + ,0.2874 + ,0.2874 + ,0 + ,17702900 + ,20.26 + ,54.8 + ,142.43 + ,0.2874 + ,0.2874 + ,0 + ,21282100 + ,23.05 + ,49.3 + ,163.39 + ,0.0596 + ,0.0596 + ,0 + ,18449100 + ,22.81 + ,47.4 + ,168.21 + ,0.0596 + ,0.0596 + ,0 + ,14415700 + ,24.04 + ,54.5 + ,185.35 + ,0.0596 + ,0.0596 + ,0 + ,17906300 + ,25.08 + ,53.4 + ,188.50 + ,0.3201 + ,0.3201 + ,0 + ,22197500 + ,27.04 + ,48.7 + ,199.91 + ,0.3201 + ,0.3201 + ,0 + ,15856500 + ,28.81 + ,50.6 + ,210.73 + ,0.3201 + ,0.3201 + ,0 + ,19068700 + ,29.86 + ,53.6 + ,192.06 + ,0.486 + ,0.486 + ,0 + ,30855100 + ,27.61 + ,56.5 + ,204.62 + ,0.486 + ,0.486 + ,0 + ,21209000 + ,28.22 + ,46.4 + ,235.00 + ,0.486 + ,0.486 + ,0 + ,19541600 + ,28.83 + ,52.3 + ,261.09 + ,0.6129 + ,0.6129 + ,0.6129 + ,21955000 + ,30.06 + ,57.7 + ,256.88 + ,0.6129 + ,0.6129 + ,0.6129 + ,33725900 + ,25.51 + ,62.7 + ,251.53 + ,0.6129 + ,0.6129 + ,0.6129 + ,28192800 + ,22.75 + ,54.3 + ,257.25 + ,0.6665 + ,0.6665 + ,0.6665 + ,27377000 + ,25.52 + ,51.0 + ,243.10 + ,0.6665 + ,0.6665 + ,0.6665 + ,16228100 + ,23.33 + ,53.2 + ,283.75 + ,0.6665 + ,0.6665 + ,0.6665 + ,21278900 + ,24.34 + ,48.6) + ,dim=c(7 + ,117) + ,dimnames=list(c('Apple' + ,'Omzetgroei' + ,'Omzetgroei_iPhone' + ,'Omzetgroei_iPad' + ,'Volume' + ,'Microsoft' + ,'Consumentenvertrouwen') + ,1:117)) > y <- array(NA,dim=c(7,117),dimnames=list(c('Apple','Omzetgroei','Omzetgroei_iPhone','Omzetgroei_iPad','Volume','Microsoft','Consumentenvertrouwen'),1:117)) > 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 > 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 Omzetgroei Omzetgroei_iPhone Omzetgroei_iPad Volume Microsoft 1 10.81 -0.2643 0.0000 0.0000 24563400 24.45 2 9.12 -0.2643 0.0000 0.0000 14163200 23.62 3 11.03 -0.2643 0.0000 0.0000 18184800 21.90 4 12.74 -0.1918 0.0000 0.0000 20810300 27.12 5 9.98 -0.1918 0.0000 0.0000 12843000 27.70 6 11.62 -0.1918 0.0000 0.0000 13866700 29.23 7 9.40 -0.2246 0.0000 0.0000 15119200 26.50 8 9.27 -0.2246 0.0000 0.0000 8301600 22.84 9 7.76 -0.2246 0.0000 0.0000 14039600 20.49 10 8.78 0.3654 0.0000 0.0000 12139700 23.28 11 10.65 0.3654 0.0000 0.0000 9649000 25.71 12 10.95 0.3654 0.0000 0.0000 8513600 26.52 13 12.36 0.0447 0.0000 0.0000 15278600 25.51 14 10.85 0.0447 0.0000 0.0000 15590900 23.36 15 11.84 0.0447 0.0000 0.0000 9691100 24.15 16 12.14 -0.0312 0.0000 0.0000 10882700 20.92 17 11.65 -0.0312 0.0000 0.0000 10294800 20.38 18 8.86 -0.0312 0.0000 0.0000 16031900 21.90 19 7.63 -0.0048 0.0000 0.0000 13683600 19.21 20 7.38 -0.0048 0.0000 0.0000 8677200 19.65 21 7.25 -0.0048 0.0000 0.0000 9874100 17.51 22 8.03 0.0705 0.0000 0.0000 10725500 21.41 23 7.75 0.0705 0.0000 0.0000 8348400 23.09 24 7.16 0.0705 0.0000 0.0000 8046200 20.70 25 7.18 -0.0134 0.0000 0.0000 10862300 19.00 26 7.51 -0.0134 0.0000 0.0000 8100300 19.04 27 7.07 -0.0134 0.0000 0.0000 7287500 19.45 28 7.11 0.0812 0.0000 0.0000 14002500 20.54 29 8.98 0.0812 0.0000 0.0000 19037900 19.77 30 9.53 0.0812 0.0000 0.0000 10774600 20.60 31 10.54 0.1885 0.0000 0.0000 8960600 21.21 32 11.31 0.1885 0.0000 0.0000 7773300 21.30 33 10.36 0.1885 0.0000 0.0000 9579700 22.33 34 11.44 0.3628 0.0000 0.0000 11270700 21.12 35 10.45 0.3628 0.0000 0.0000 9492800 20.77 36 10.69 0.3628 0.0000 0.0000 9136800 22.11 37 11.28 0.2942 0.0000 0.0000 14487600 22.34 38 11.96 0.2942 0.0000 0.0000 10133200 21.43 39 13.52 0.2942 0.0000 0.0000 18659700 20.14 40 12.89 0.3036 0.0000 0.0000 15980700 21.11 41 14.03 0.3036 0.0000 0.0000 9732100 21.19 42 16.27 0.3036 0.0000 0.0000 14626300 23.07 43 16.17 0.3703 0.0000 0.0000 16904000 23.01 44 17.25 0.3703 0.0000 0.0000 13616700 22.12 45 19.38 0.3703 0.0000 0.0000 13772900 22.40 46 26.20 0.7398 0.0000 0.0000 28749200 22.66 47 33.53 0.7398 0.0000 0.0000 31408300 24.21 48 32.20 0.7398 0.0000 0.0000 26342800 24.13 49 38.45 0.6988 0.0000 0.0000 48909500 23.73 50 44.86 0.6988 0.0000 0.0000 41542400 22.79 51 41.67 0.6988 0.0000 0.0000 24857200 21.89 52 36.06 0.7478 0.0000 0.0000 34093700 22.92 53 39.76 0.7478 0.0000 0.0000 22555200 23.44 54 36.81 0.7478 0.0000 0.0000 19067500 22.57 55 42.65 0.5651 0.0000 0.0000 19029100 23.27 56 46.89 0.5651 0.0000 0.0000 15223200 24.95 57 53.61 0.5651 0.0000 0.0000 21903700 23.45 58 57.59 0.6473 0.0000 0.0000 33306600 23.42 59 67.82 0.6473 0.0000 0.0000 23898100 25.30 60 71.89 0.6473 0.0000 0.0000 23279600 23.90 61 75.51 0.3441 0.0000 0.0000 40699800 25.73 62 68.49 0.3441 0.0000 0.0000 37646000 24.64 63 62.72 0.3441 0.0000 0.0000 37277000 24.95 64 70.39 0.2415 0.0000 0.0000 39246800 22.15 65 59.77 0.2415 0.0000 0.0000 27418400 20.85 66 57.27 0.2415 0.0000 0.0000 30318700 21.45 67 67.96 0.3151 0.0000 0.0000 32808100 22.15 68 67.85 0.3151 0.0000 0.0000 28668200 23.75 69 76.98 0.3151 0.0000 0.0000 32370300 25.27 70 81.08 0.2390 0.0000 0.0000 24171100 26.53 71 91.66 0.2390 0.0000 0.0000 25009100 27.22 72 84.84 0.2390 0.0000 0.0000 32084300 27.69 73 85.73 0.2127 0.0000 0.0000 50117500 28.61 74 84.61 0.2127 0.0000 0.0000 27522200 26.21 75 92.91 0.2127 0.0000 0.0000 26816800 25.93 76 99.80 0.2730 0.0000 0.0000 25136100 27.86 77 121.19 0.2730 0.0000 0.0000 30295600 28.65 78 122.04 0.2730 0.2730 0.0000 41526100 27.51 79 131.76 0.3657 0.3657 0.0000 43845100 27.06 80 138.48 0.3657 0.3657 0.0000 39188900 26.91 81 153.47 0.3657 0.3657 0.0000 40496400 27.60 82 189.95 0.4643 0.4643 0.0000 37438400 34.48 83 182.22 0.4643 0.4643 0.0000 46553700 31.58 84 198.08 0.4643 0.4643 0.0000 31771400 33.46 85 135.36 0.5096 0.5096 0.0000 62108100 30.64 86 125.02 0.5096 0.5096 0.0000 46645400 25.66 87 143.50 0.5096 0.5096 0.0000 42313100 26.78 88 173.95 0.3592 0.3592 0.0000 38841700 26.91 89 188.75 0.3592 0.3592 0.0000 32650300 26.82 90 167.44 0.3592 0.3592 0.0000 34281100 26.05 91 158.95 0.7439 0.7439 0.0000 33096200 24.36 92 169.53 0.7439 0.7439 0.0000 23273800 25.94 93 113.66 0.7439 0.7439 0.0000 43697600 25.37 94 107.59 0.1390 0.1390 0.0000 66902300 21.23 95 92.67 0.1390 0.1390 0.0000 44957200 19.35 96 85.35 0.1390 0.1390 0.0000 33800900 18.61 97 90.13 0.1383 0.1383 0.0000 33487900 16.37 98 89.31 0.1383 0.1383 0.0000 27394900 15.56 99 105.12 0.1383 0.1383 0.0000 25963400 17.70 100 125.83 0.2874 0.2874 0.0000 20952600 19.52 101 135.81 0.2874 0.2874 0.0000 17702900 20.26 102 142.43 0.2874 0.2874 0.0000 21282100 23.05 103 163.39 0.0596 0.0596 0.0000 18449100 22.81 104 168.21 0.0596 0.0596 0.0000 14415700 24.04 105 185.35 0.0596 0.0596 0.0000 17906300 25.08 106 188.50 0.3201 0.3201 0.0000 22197500 27.04 107 199.91 0.3201 0.3201 0.0000 15856500 28.81 108 210.73 0.3201 0.3201 0.0000 19068700 29.86 109 192.06 0.4860 0.4860 0.0000 30855100 27.61 110 204.62 0.4860 0.4860 0.0000 21209000 28.22 111 235.00 0.4860 0.4860 0.0000 19541600 28.83 112 261.09 0.6129 0.6129 0.6129 21955000 30.06 113 256.88 0.6129 0.6129 0.6129 33725900 25.51 114 251.53 0.6129 0.6129 0.6129 28192800 22.75 115 257.25 0.6665 0.6665 0.6665 27377000 25.52 116 243.10 0.6665 0.6665 0.6665 16228100 23.33 117 283.75 0.6665 0.6665 0.6665 21278900 24.34 Consumentenvertrouwen t 1 115.7 1 2 109.2 2 3 116.9 3 4 109.9 4 5 116.1 5 6 118.9 6 7 116.3 7 8 114.0 8 9 97.0 9 10 85.3 10 11 84.9 11 12 94.6 12 13 97.8 13 14 95.0 14 15 110.7 15 16 108.5 16 17 110.3 17 18 106.3 18 19 97.4 19 20 94.5 20 21 93.7 21 22 79.6 22 23 84.9 23 24 80.7 24 25 78.8 25 26 64.8 26 27 61.4 27 28 81.0 28 29 83.6 29 30 83.5 30 31 77.0 31 32 81.7 32 33 77.0 33 34 81.7 34 35 92.5 35 36 91.7 36 37 96.4 37 38 88.5 38 39 88.5 39 40 93.0 40 41 93.1 41 42 102.8 42 43 105.7 43 44 98.7 44 45 96.7 45 46 92.9 46 47 92.6 47 48 102.7 48 49 105.1 49 50 104.4 50 51 103.0 51 52 97.5 52 53 103.1 53 54 106.2 54 55 103.6 55 56 105.5 56 57 87.5 57 58 85.2 58 59 98.3 59 60 103.8 60 61 106.8 61 62 102.7 62 63 107.5 63 64 109.8 64 65 104.7 65 66 105.7 66 67 107.0 67 68 100.2 68 69 105.9 69 70 105.1 70 71 105.3 71 72 110.0 72 73 110.2 73 74 111.2 74 75 108.2 75 76 106.3 76 77 108.5 77 78 105.3 78 79 111.9 79 80 105.6 80 81 99.5 81 82 95.2 82 83 87.8 83 84 90.6 84 85 87.9 85 86 76.4 86 87 65.9 87 88 62.3 88 89 57.2 89 90 50.4 90 91 51.9 91 92 58.5 92 93 61.4 93 94 38.8 94 95 44.9 95 96 38.6 96 97 4.0 97 98 25.3 98 99 26.9 99 100 40.8 100 101 54.8 101 102 49.3 102 103 47.4 103 104 54.5 104 105 53.4 105 106 48.7 106 107 50.6 107 108 53.6 108 109 56.5 109 110 46.4 110 111 52.3 111 112 57.7 112 113 62.7 113 114 54.3 114 115 51.0 115 116 53.2 116 117 48.6 117 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Omzetgroei Omzetgroei_iPhone -1.325e+02 -3.520e+01 7.511e+01 Omzetgroei_iPad Volume Microsoft 9.818e+01 -3.563e-07 5.897e+00 Consumentenvertrouwen t -1.351e-01 1.488e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -47.677 -9.703 -0.446 7.683 35.664 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.325e+02 1.030e+01 -12.857 < 2e-16 *** Omzetgroei -3.520e+01 6.039e+00 -5.828 5.79e-08 *** Omzetgroei_iPhone 7.511e+01 1.122e+01 6.696 9.68e-10 *** Omzetgroei_iPad 9.818e+01 1.161e+01 8.453 1.40e-13 *** Volume -3.563e-07 1.413e-07 -2.522 0.0131 * Microsoft 5.897e+00 5.532e-01 10.660 < 2e-16 *** Consumentenvertrouwen -1.351e-01 1.002e-01 -1.348 0.1803 t 1.488e+00 7.991e-02 18.619 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.77 on 109 degrees of freedom Multiple R-squared: 0.9691, Adjusted R-squared: 0.9671 F-statistic: 488.6 on 7 and 109 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.091116e-03 4.182232e-03 0.99790888 [2,] 2.052926e-04 4.105853e-04 0.99979471 [3,] 3.023750e-05 6.047499e-05 0.99996976 [4,] 2.653060e-06 5.306120e-06 0.99999735 [5,] 2.315207e-07 4.630414e-07 0.99999977 [6,] 2.652781e-08 5.305561e-08 0.99999997 [7,] 2.243339e-09 4.486678e-09 1.00000000 [8,] 5.472411e-09 1.094482e-08 0.99999999 [9,] 1.728813e-09 3.457626e-09 1.00000000 [10,] 2.518156e-10 5.036312e-10 1.00000000 [11,] 4.538344e-11 9.076687e-11 1.00000000 [12,] 5.312572e-12 1.062514e-11 1.00000000 [13,] 5.638502e-13 1.127700e-12 1.00000000 [14,] 5.588639e-14 1.117728e-13 1.00000000 [15,] 6.917674e-15 1.383535e-14 1.00000000 [16,] 2.878364e-15 5.756727e-15 1.00000000 [17,] 4.440425e-16 8.880850e-16 1.00000000 [18,] 8.368191e-17 1.673638e-16 1.00000000 [19,] 1.069807e-17 2.139613e-17 1.00000000 [20,] 1.566788e-18 3.133577e-18 1.00000000 [21,] 4.334856e-19 8.669711e-19 1.00000000 [22,] 1.280157e-19 2.560313e-19 1.00000000 [23,] 1.432666e-20 2.865332e-20 1.00000000 [24,] 1.684126e-21 3.368253e-21 1.00000000 [25,] 2.225103e-22 4.450206e-22 1.00000000 [26,] 2.549663e-23 5.099326e-23 1.00000000 [27,] 2.727301e-24 5.454603e-24 1.00000000 [28,] 3.460364e-25 6.920727e-25 1.00000000 [29,] 1.130353e-25 2.260706e-25 1.00000000 [30,] 1.152571e-26 2.305142e-26 1.00000000 [31,] 3.571126e-27 7.142253e-27 1.00000000 [32,] 9.526345e-28 1.905269e-27 1.00000000 [33,] 1.094937e-28 2.189873e-28 1.00000000 [34,] 7.731749e-29 1.546350e-28 1.00000000 [35,] 7.560849e-28 1.512170e-27 1.00000000 [36,] 3.072450e-26 6.144901e-26 1.00000000 [37,] 1.495425e-23 2.990851e-23 1.00000000 [38,] 4.619776e-23 9.239553e-23 1.00000000 [39,] 9.844128e-24 1.968826e-23 1.00000000 [40,] 3.068634e-21 6.137267e-21 1.00000000 [41,] 8.468115e-18 1.693623e-17 1.00000000 [42,] 2.470176e-18 4.940352e-18 1.00000000 [43,] 2.392273e-17 4.784546e-17 1.00000000 [44,] 3.198543e-17 6.397086e-17 1.00000000 [45,] 2.574376e-15 5.148753e-15 1.00000000 [46,] 3.551164e-13 7.102328e-13 1.00000000 [47,] 1.389945e-10 2.779891e-10 1.00000000 [48,] 1.784449e-09 3.568898e-09 1.00000000 [49,] 1.148822e-07 2.297644e-07 0.99999989 [50,] 1.251323e-05 2.502646e-05 0.99998749 [51,] 1.789336e-05 3.578672e-05 0.99998211 [52,] 1.445163e-05 2.890326e-05 0.99998555 [53,] 8.318150e-06 1.663630e-05 0.99999168 [54,] 1.390733e-05 2.781465e-05 0.99998609 [55,] 1.081444e-05 2.162889e-05 0.99998919 [56,] 6.623366e-06 1.324673e-05 0.99999338 [57,] 1.659571e-05 3.319142e-05 0.99998340 [58,] 1.359003e-05 2.718006e-05 0.99998641 [59,] 1.518753e-05 3.037505e-05 0.99998481 [60,] 1.170969e-05 2.341938e-05 0.99998829 [61,] 1.275383e-05 2.550766e-05 0.99998725 [62,] 8.169307e-06 1.633861e-05 0.99999183 [63,] 8.886772e-06 1.777354e-05 0.99999111 [64,] 6.414046e-06 1.282809e-05 0.99999359 [65,] 5.703058e-06 1.140612e-05 0.99999430 [66,] 7.937109e-06 1.587422e-05 0.99999206 [67,] 3.737084e-05 7.474168e-05 0.99996263 [68,] 3.049934e-05 6.099869e-05 0.99996950 [69,] 1.633670e-05 3.267340e-05 0.99998366 [70,] 1.008115e-05 2.016229e-05 0.99998992 [71,] 1.433368e-05 2.866735e-05 0.99998567 [72,] 1.872561e-05 3.745122e-05 0.99998127 [73,] 1.422593e-05 2.845186e-05 0.99998577 [74,] 1.767693e-05 3.535386e-05 0.99998232 [75,] 1.175806e-03 2.351612e-03 0.99882419 [76,] 2.220106e-03 4.440212e-03 0.99777989 [77,] 1.847794e-03 3.695588e-03 0.99815221 [78,] 4.917462e-03 9.834925e-03 0.99508254 [79,] 4.622766e-02 9.245533e-02 0.95377234 [80,] 8.923095e-02 1.784619e-01 0.91076905 [81,] 1.892825e-01 3.785650e-01 0.81071751 [82,] 8.491806e-01 3.016389e-01 0.15081944 [83,] 9.548179e-01 9.036416e-02 0.04518208 [84,] 9.520991e-01 9.580171e-02 0.04790086 [85,] 9.318971e-01 1.362057e-01 0.06810286 [86,] 9.211924e-01 1.576151e-01 0.07880757 [87,] 8.873714e-01 2.252572e-01 0.11262860 [88,] 8.387081e-01 3.225838e-01 0.16129188 [89,] 7.947625e-01 4.104751e-01 0.20523753 [90,] 7.268346e-01 5.463308e-01 0.27316541 [91,] 7.431488e-01 5.137023e-01 0.25685116 [92,] 6.997842e-01 6.004316e-01 0.30021581 [93,] 6.452739e-01 7.094521e-01 0.35472607 [94,] 5.334797e-01 9.330406e-01 0.46652029 [95,] 4.494797e-01 8.989595e-01 0.55052027 [96,] 3.518921e-01 7.037842e-01 0.64810792 > postscript(file="/var/www/rcomp/tmp/19v6y1293008006.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/rcomp/tmp/29v6y1293008006.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/rcomp/tmp/39v6y1293008006.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/rcomp/tmp/49v6y1293008006.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/rcomp/tmp/59v6y1293008006.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 = 117 Frequency = 1 1 2 3 4 5 6 12.6838479 9.8163414 22.8545021 -5.1634930 -14.8326324 -22.9595289 7 8 9 10 11 12 -11.6284058 5.5962234 16.2034965 17.7911935 2.9025006 -2.1556580 13 14 15 16 17 18 -4.7221200 4.6912232 -0.4459168 14.8690337 16.1092495 4.3719708 19 20 21 22 23 24 16.4065264 9.8983688 21.2181848 -1.4389251 -13.2443146 -1.9038548 25 26 27 28 29 30 4.4467259 0.1771866 -4.9173686 -4.4221678 2.6461059 -6.1439778 31 32 33 34 35 36 -7.9669985 -9.0035239 -17.5065128 -3.4068899 -2.9950060 -12.3795495 37 38 39 40 41 42 -14.5064294 -12.5671266 -1.8498626 -9.7033172 -12.7358655 -20.0151935 43 44 45 46 47 48 -17.6981959 -14.9749938 -16.1985167 5.4282587 3.0372736 0.2509909 49 50 51 52 53 54 14.2940999 22.0396980 16.5346256 7.6356238 3.4267380 3.2953184 55 56 57 58 59 60 -3.2755926 -11.5295012 2.4961601 11.8106385 7.8844044 19.2449538 61 62 63 64 65 66 6.5269927 2.8046156 -5.7641289 14.3307764 4.9850638 -1.3723140 67 68 69 70 71 72 7.3551700 -6.0715534 -5.3032671 -15.8291519 -10.4801786 -18.4034244 73 74 75 76 77 78 -18.8994110 -15.2707987 -7.4642115 -12.1762281 5.2031328 -5.6470500 79 80 81 82 83 84 3.2571232 6.8634778 15.9384807 4.7545412 14.8856365 13.2828722 85 86 87 88 89 90 -25.6590723 -15.1841252 -7.7588645 24.7158811 35.6635497 17.0685644 91 92 93 94 95 96 1.4833874 -1.3495585 -47.6769460 -1.4655146 -13.7824683 -23.0530794 97 98 99 100 101 102 -11.3107343 -8.1350805 -6.7260329 -4.0940098 0.7682667 -10.0195906 103 104 105 106 107 108 18.6932291 14.2944686 24.9090583 5.5107358 2.9928076 7.6832256 109 110 111 112 113 114 -1.2362487 1.4370476 26.9352377 -19.3638436 6.6387907 12.9697099 115 116 117 -7.2704831 -13.6694993 20.7150008 > postscript(file="/var/www/rcomp/tmp/6k4nj1293008006.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 = 117 Frequency = 1 lag(myerror, k = 1) myerror 0 12.6838479 NA 1 9.8163414 12.6838479 2 22.8545021 9.8163414 3 -5.1634930 22.8545021 4 -14.8326324 -5.1634930 5 -22.9595289 -14.8326324 6 -11.6284058 -22.9595289 7 5.5962234 -11.6284058 8 16.2034965 5.5962234 9 17.7911935 16.2034965 10 2.9025006 17.7911935 11 -2.1556580 2.9025006 12 -4.7221200 -2.1556580 13 4.6912232 -4.7221200 14 -0.4459168 4.6912232 15 14.8690337 -0.4459168 16 16.1092495 14.8690337 17 4.3719708 16.1092495 18 16.4065264 4.3719708 19 9.8983688 16.4065264 20 21.2181848 9.8983688 21 -1.4389251 21.2181848 22 -13.2443146 -1.4389251 23 -1.9038548 -13.2443146 24 4.4467259 -1.9038548 25 0.1771866 4.4467259 26 -4.9173686 0.1771866 27 -4.4221678 -4.9173686 28 2.6461059 -4.4221678 29 -6.1439778 2.6461059 30 -7.9669985 -6.1439778 31 -9.0035239 -7.9669985 32 -17.5065128 -9.0035239 33 -3.4068899 -17.5065128 34 -2.9950060 -3.4068899 35 -12.3795495 -2.9950060 36 -14.5064294 -12.3795495 37 -12.5671266 -14.5064294 38 -1.8498626 -12.5671266 39 -9.7033172 -1.8498626 40 -12.7358655 -9.7033172 41 -20.0151935 -12.7358655 42 -17.6981959 -20.0151935 43 -14.9749938 -17.6981959 44 -16.1985167 -14.9749938 45 5.4282587 -16.1985167 46 3.0372736 5.4282587 47 0.2509909 3.0372736 48 14.2940999 0.2509909 49 22.0396980 14.2940999 50 16.5346256 22.0396980 51 7.6356238 16.5346256 52 3.4267380 7.6356238 53 3.2953184 3.4267380 54 -3.2755926 3.2953184 55 -11.5295012 -3.2755926 56 2.4961601 -11.5295012 57 11.8106385 2.4961601 58 7.8844044 11.8106385 59 19.2449538 7.8844044 60 6.5269927 19.2449538 61 2.8046156 6.5269927 62 -5.7641289 2.8046156 63 14.3307764 -5.7641289 64 4.9850638 14.3307764 65 -1.3723140 4.9850638 66 7.3551700 -1.3723140 67 -6.0715534 7.3551700 68 -5.3032671 -6.0715534 69 -15.8291519 -5.3032671 70 -10.4801786 -15.8291519 71 -18.4034244 -10.4801786 72 -18.8994110 -18.4034244 73 -15.2707987 -18.8994110 74 -7.4642115 -15.2707987 75 -12.1762281 -7.4642115 76 5.2031328 -12.1762281 77 -5.6470500 5.2031328 78 3.2571232 -5.6470500 79 6.8634778 3.2571232 80 15.9384807 6.8634778 81 4.7545412 15.9384807 82 14.8856365 4.7545412 83 13.2828722 14.8856365 84 -25.6590723 13.2828722 85 -15.1841252 -25.6590723 86 -7.7588645 -15.1841252 87 24.7158811 -7.7588645 88 35.6635497 24.7158811 89 17.0685644 35.6635497 90 1.4833874 17.0685644 91 -1.3495585 1.4833874 92 -47.6769460 -1.3495585 93 -1.4655146 -47.6769460 94 -13.7824683 -1.4655146 95 -23.0530794 -13.7824683 96 -11.3107343 -23.0530794 97 -8.1350805 -11.3107343 98 -6.7260329 -8.1350805 99 -4.0940098 -6.7260329 100 0.7682667 -4.0940098 101 -10.0195906 0.7682667 102 18.6932291 -10.0195906 103 14.2944686 18.6932291 104 24.9090583 14.2944686 105 5.5107358 24.9090583 106 2.9928076 5.5107358 107 7.6832256 2.9928076 108 -1.2362487 7.6832256 109 1.4370476 -1.2362487 110 26.9352377 1.4370476 111 -19.3638436 26.9352377 112 6.6387907 -19.3638436 113 12.9697099 6.6387907 114 -7.2704831 12.9697099 115 -13.6694993 -7.2704831 116 20.7150008 -13.6694993 117 NA 20.7150008 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 9.8163414 12.6838479 [2,] 22.8545021 9.8163414 [3,] -5.1634930 22.8545021 [4,] -14.8326324 -5.1634930 [5,] -22.9595289 -14.8326324 [6,] -11.6284058 -22.9595289 [7,] 5.5962234 -11.6284058 [8,] 16.2034965 5.5962234 [9,] 17.7911935 16.2034965 [10,] 2.9025006 17.7911935 [11,] -2.1556580 2.9025006 [12,] -4.7221200 -2.1556580 [13,] 4.6912232 -4.7221200 [14,] -0.4459168 4.6912232 [15,] 14.8690337 -0.4459168 [16,] 16.1092495 14.8690337 [17,] 4.3719708 16.1092495 [18,] 16.4065264 4.3719708 [19,] 9.8983688 16.4065264 [20,] 21.2181848 9.8983688 [21,] -1.4389251 21.2181848 [22,] -13.2443146 -1.4389251 [23,] -1.9038548 -13.2443146 [24,] 4.4467259 -1.9038548 [25,] 0.1771866 4.4467259 [26,] -4.9173686 0.1771866 [27,] -4.4221678 -4.9173686 [28,] 2.6461059 -4.4221678 [29,] -6.1439778 2.6461059 [30,] -7.9669985 -6.1439778 [31,] -9.0035239 -7.9669985 [32,] -17.5065128 -9.0035239 [33,] -3.4068899 -17.5065128 [34,] -2.9950060 -3.4068899 [35,] -12.3795495 -2.9950060 [36,] -14.5064294 -12.3795495 [37,] -12.5671266 -14.5064294 [38,] -1.8498626 -12.5671266 [39,] -9.7033172 -1.8498626 [40,] -12.7358655 -9.7033172 [41,] -20.0151935 -12.7358655 [42,] -17.6981959 -20.0151935 [43,] -14.9749938 -17.6981959 [44,] -16.1985167 -14.9749938 [45,] 5.4282587 -16.1985167 [46,] 3.0372736 5.4282587 [47,] 0.2509909 3.0372736 [48,] 14.2940999 0.2509909 [49,] 22.0396980 14.2940999 [50,] 16.5346256 22.0396980 [51,] 7.6356238 16.5346256 [52,] 3.4267380 7.6356238 [53,] 3.2953184 3.4267380 [54,] -3.2755926 3.2953184 [55,] -11.5295012 -3.2755926 [56,] 2.4961601 -11.5295012 [57,] 11.8106385 2.4961601 [58,] 7.8844044 11.8106385 [59,] 19.2449538 7.8844044 [60,] 6.5269927 19.2449538 [61,] 2.8046156 6.5269927 [62,] -5.7641289 2.8046156 [63,] 14.3307764 -5.7641289 [64,] 4.9850638 14.3307764 [65,] -1.3723140 4.9850638 [66,] 7.3551700 -1.3723140 [67,] -6.0715534 7.3551700 [68,] -5.3032671 -6.0715534 [69,] -15.8291519 -5.3032671 [70,] -10.4801786 -15.8291519 [71,] -18.4034244 -10.4801786 [72,] -18.8994110 -18.4034244 [73,] -15.2707987 -18.8994110 [74,] -7.4642115 -15.2707987 [75,] -12.1762281 -7.4642115 [76,] 5.2031328 -12.1762281 [77,] -5.6470500 5.2031328 [78,] 3.2571232 -5.6470500 [79,] 6.8634778 3.2571232 [80,] 15.9384807 6.8634778 [81,] 4.7545412 15.9384807 [82,] 14.8856365 4.7545412 [83,] 13.2828722 14.8856365 [84,] -25.6590723 13.2828722 [85,] -15.1841252 -25.6590723 [86,] -7.7588645 -15.1841252 [87,] 24.7158811 -7.7588645 [88,] 35.6635497 24.7158811 [89,] 17.0685644 35.6635497 [90,] 1.4833874 17.0685644 [91,] -1.3495585 1.4833874 [92,] -47.6769460 -1.3495585 [93,] -1.4655146 -47.6769460 [94,] -13.7824683 -1.4655146 [95,] -23.0530794 -13.7824683 [96,] -11.3107343 -23.0530794 [97,] -8.1350805 -11.3107343 [98,] -6.7260329 -8.1350805 [99,] -4.0940098 -6.7260329 [100,] 0.7682667 -4.0940098 [101,] -10.0195906 0.7682667 [102,] 18.6932291 -10.0195906 [103,] 14.2944686 18.6932291 [104,] 24.9090583 14.2944686 [105,] 5.5107358 24.9090583 [106,] 2.9928076 5.5107358 [107,] 7.6832256 2.9928076 [108,] -1.2362487 7.6832256 [109,] 1.4370476 -1.2362487 [110,] 26.9352377 1.4370476 [111,] -19.3638436 26.9352377 [112,] 6.6387907 -19.3638436 [113,] 12.9697099 6.6387907 [114,] -7.2704831 12.9697099 [115,] -13.6694993 -7.2704831 [116,] 20.7150008 -13.6694993 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 9.8163414 12.6838479 2 22.8545021 9.8163414 3 -5.1634930 22.8545021 4 -14.8326324 -5.1634930 5 -22.9595289 -14.8326324 6 -11.6284058 -22.9595289 7 5.5962234 -11.6284058 8 16.2034965 5.5962234 9 17.7911935 16.2034965 10 2.9025006 17.7911935 11 -2.1556580 2.9025006 12 -4.7221200 -2.1556580 13 4.6912232 -4.7221200 14 -0.4459168 4.6912232 15 14.8690337 -0.4459168 16 16.1092495 14.8690337 17 4.3719708 16.1092495 18 16.4065264 4.3719708 19 9.8983688 16.4065264 20 21.2181848 9.8983688 21 -1.4389251 21.2181848 22 -13.2443146 -1.4389251 23 -1.9038548 -13.2443146 24 4.4467259 -1.9038548 25 0.1771866 4.4467259 26 -4.9173686 0.1771866 27 -4.4221678 -4.9173686 28 2.6461059 -4.4221678 29 -6.1439778 2.6461059 30 -7.9669985 -6.1439778 31 -9.0035239 -7.9669985 32 -17.5065128 -9.0035239 33 -3.4068899 -17.5065128 34 -2.9950060 -3.4068899 35 -12.3795495 -2.9950060 36 -14.5064294 -12.3795495 37 -12.5671266 -14.5064294 38 -1.8498626 -12.5671266 39 -9.7033172 -1.8498626 40 -12.7358655 -9.7033172 41 -20.0151935 -12.7358655 42 -17.6981959 -20.0151935 43 -14.9749938 -17.6981959 44 -16.1985167 -14.9749938 45 5.4282587 -16.1985167 46 3.0372736 5.4282587 47 0.2509909 3.0372736 48 14.2940999 0.2509909 49 22.0396980 14.2940999 50 16.5346256 22.0396980 51 7.6356238 16.5346256 52 3.4267380 7.6356238 53 3.2953184 3.4267380 54 -3.2755926 3.2953184 55 -11.5295012 -3.2755926 56 2.4961601 -11.5295012 57 11.8106385 2.4961601 58 7.8844044 11.8106385 59 19.2449538 7.8844044 60 6.5269927 19.2449538 61 2.8046156 6.5269927 62 -5.7641289 2.8046156 63 14.3307764 -5.7641289 64 4.9850638 14.3307764 65 -1.3723140 4.9850638 66 7.3551700 -1.3723140 67 -6.0715534 7.3551700 68 -5.3032671 -6.0715534 69 -15.8291519 -5.3032671 70 -10.4801786 -15.8291519 71 -18.4034244 -10.4801786 72 -18.8994110 -18.4034244 73 -15.2707987 -18.8994110 74 -7.4642115 -15.2707987 75 -12.1762281 -7.4642115 76 5.2031328 -12.1762281 77 -5.6470500 5.2031328 78 3.2571232 -5.6470500 79 6.8634778 3.2571232 80 15.9384807 6.8634778 81 4.7545412 15.9384807 82 14.8856365 4.7545412 83 13.2828722 14.8856365 84 -25.6590723 13.2828722 85 -15.1841252 -25.6590723 86 -7.7588645 -15.1841252 87 24.7158811 -7.7588645 88 35.6635497 24.7158811 89 17.0685644 35.6635497 90 1.4833874 17.0685644 91 -1.3495585 1.4833874 92 -47.6769460 -1.3495585 93 -1.4655146 -47.6769460 94 -13.7824683 -1.4655146 95 -23.0530794 -13.7824683 96 -11.3107343 -23.0530794 97 -8.1350805 -11.3107343 98 -6.7260329 -8.1350805 99 -4.0940098 -6.7260329 100 0.7682667 -4.0940098 101 -10.0195906 0.7682667 102 18.6932291 -10.0195906 103 14.2944686 18.6932291 104 24.9090583 14.2944686 105 5.5107358 24.9090583 106 2.9928076 5.5107358 107 7.6832256 2.9928076 108 -1.2362487 7.6832256 109 1.4370476 -1.2362487 110 26.9352377 1.4370476 111 -19.3638436 26.9352377 112 6.6387907 -19.3638436 113 12.9697099 6.6387907 114 -7.2704831 12.9697099 115 -13.6694993 -7.2704831 116 20.7150008 -13.6694993 > 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/rcomp/tmp/7uv441293008006.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/rcomp/tmp/8uv441293008006.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/rcomp/tmp/9uv441293008006.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/rcomp/tmp/10n4l61293008006.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11852u1293008006.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/rcomp/tmp/12cn001293008006.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/rcomp/tmp/13qxyr1293008006.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/rcomp/tmp/14bgff1293008006.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/rcomp/tmp/154pei1293008006.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/rcomp/tmp/16izu91293008006.tab") + } > > try(system("convert tmp/19v6y1293008006.ps tmp/19v6y1293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/29v6y1293008006.ps tmp/29v6y1293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/39v6y1293008006.ps tmp/39v6y1293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/49v6y1293008006.ps tmp/49v6y1293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/59v6y1293008006.ps tmp/59v6y1293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/6k4nj1293008006.ps tmp/6k4nj1293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/7uv441293008006.ps tmp/7uv441293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/8uv441293008006.ps tmp/8uv441293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/9uv441293008006.ps tmp/9uv441293008006.png",intern=TRUE)) character(0) > try(system("convert tmp/10n4l61293008006.ps tmp/10n4l61293008006.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.980 1.640 5.655