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(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.2127 + ,0 + ,50117500 + ,28.61 + ,110.2 + ,84.61 + ,0.2127 + ,0.2127 + ,0 + ,27522200 + ,26.21 + ,111.2 + ,92.91 + ,0.2127 + ,0.2127 + ,0 + ,26816800 + ,25.93 + ,108.2 + ,99.80 + ,0.273 + ,0.273 + ,0 + ,25136100 + ,27.86 + ,106.3 + ,121.19 + ,0.273 + ,0.273 + ,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 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 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.2127 0.0000 50117500 28.61 74 84.61 0.2127 0.2127 0.0000 27522200 26.21 75 92.91 0.2127 0.2127 0.0000 26816800 25.93 76 99.80 0.2730 0.2730 0.0000 25136100 27.86 77 121.19 0.2730 0.2730 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.274e+02 -3.127e+01 6.350e+01 Omzetgroei_iPad Volume Microsoft 1.052e+02 -3.079e-07 6.186e+00 Consumentenvertrouwen t -2.546e-01 1.430e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -43.7520 -9.6857 -0.6614 9.3880 36.0196 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.274e+02 1.141e+01 -11.169 < 2e-16 *** Omzetgroei -3.127e+01 6.349e+00 -4.926 3.01e-06 *** Omzetgroei_iPhone 6.350e+01 1.218e+01 5.212 8.93e-07 *** Omzetgroei_iPad 1.052e+02 1.229e+01 8.564 7.88e-14 *** Volume -3.079e-07 1.496e-07 -2.058 0.0420 * Microsoft 6.186e+00 5.943e-01 10.409 < 2e-16 *** Consumentenvertrouwen -2.546e-01 1.011e-01 -2.519 0.0132 * t 1.430e+00 8.554e-02 16.723 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 14.64 on 109 degrees of freedom Multiple R-squared: 0.9651, Adjusted R-squared: 0.9629 F-statistic: 430.7 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,] 1.724217e-03 3.448434e-03 0.99827578 [2,] 1.590146e-04 3.180291e-04 0.99984099 [3,] 2.197811e-05 4.395623e-05 0.99997802 [4,] 1.807471e-06 3.614943e-06 0.99999819 [5,] 1.480959e-07 2.961917e-07 0.99999985 [6,] 1.624032e-08 3.248064e-08 0.99999998 [7,] 1.335238e-09 2.670475e-09 1.00000000 [8,] 3.134869e-09 6.269738e-09 1.00000000 [9,] 9.651494e-10 1.930299e-09 1.00000000 [10,] 1.372345e-10 2.744689e-10 1.00000000 [11,] 2.508934e-11 5.017868e-11 1.00000000 [12,] 2.807664e-12 5.615328e-12 1.00000000 [13,] 2.832810e-13 5.665620e-13 1.00000000 [14,] 2.697619e-14 5.395237e-14 1.00000000 [15,] 3.281260e-15 6.562520e-15 1.00000000 [16,] 1.314745e-15 2.629490e-15 1.00000000 [17,] 1.945474e-16 3.890948e-16 1.00000000 [18,] 3.565549e-17 7.131097e-17 1.00000000 [19,] 4.542234e-18 9.084467e-18 1.00000000 [20,] 6.633757e-19 1.326751e-18 1.00000000 [21,] 1.783271e-19 3.566542e-19 1.00000000 [22,] 5.166972e-20 1.033394e-19 1.00000000 [23,] 5.532819e-21 1.106564e-20 1.00000000 [24,] 6.298948e-22 1.259790e-21 1.00000000 [25,] 8.280067e-23 1.656013e-22 1.00000000 [26,] 9.133224e-24 1.826645e-23 1.00000000 [27,] 9.394420e-25 1.878884e-24 1.00000000 [28,] 1.159675e-25 2.319350e-25 1.00000000 [29,] 4.019456e-26 8.038912e-26 1.00000000 [30,] 4.231263e-27 8.462527e-27 1.00000000 [31,] 1.360310e-27 2.720619e-27 1.00000000 [32,] 3.321429e-28 6.642858e-28 1.00000000 [33,] 3.360454e-29 6.720908e-29 1.00000000 [34,] 2.085626e-29 4.171253e-29 1.00000000 [35,] 1.449231e-28 2.898461e-28 1.00000000 [36,] 5.680347e-27 1.136069e-26 1.00000000 [37,] 2.718299e-24 5.436598e-24 1.00000000 [38,] 8.204109e-24 1.640822e-23 1.00000000 [39,] 1.404022e-24 2.808045e-24 1.00000000 [40,] 2.923312e-22 5.846624e-22 1.00000000 [41,] 7.247649e-19 1.449530e-18 1.00000000 [42,] 1.749168e-19 3.498335e-19 1.00000000 [43,] 1.673593e-18 3.347187e-18 1.00000000 [44,] 2.121424e-18 4.242848e-18 1.00000000 [45,] 1.739388e-16 3.478776e-16 1.00000000 [46,] 2.310209e-14 4.620419e-14 1.00000000 [47,] 1.056059e-11 2.112119e-11 1.00000000 [48,] 1.222658e-10 2.445315e-10 1.00000000 [49,] 9.817431e-09 1.963486e-08 0.99999999 [50,] 4.132543e-07 8.265085e-07 0.99999959 [51,] 4.450904e-07 8.901808e-07 0.99999955 [52,] 2.564463e-07 5.128925e-07 0.99999974 [53,] 1.236837e-07 2.473674e-07 0.99999988 [54,] 1.852461e-07 3.704921e-07 0.99999981 [55,] 1.610493e-07 3.220986e-07 0.99999984 [56,] 1.007326e-07 2.014651e-07 0.99999990 [57,] 1.364428e-07 2.728856e-07 0.99999986 [58,] 8.002118e-08 1.600424e-07 0.99999992 [59,] 5.784132e-08 1.156826e-07 0.99999994 [60,] 3.568495e-08 7.136990e-08 0.99999996 [61,] 3.864856e-08 7.729712e-08 0.99999996 [62,] 1.735349e-08 3.470697e-08 0.99999998 [63,] 2.527767e-08 5.055534e-08 0.99999997 [64,] 5.049730e-08 1.009946e-07 0.99999995 [65,] 9.671224e-08 1.934245e-07 0.99999990 [66,] 1.338619e-06 2.677238e-06 0.99999866 [67,] 1.577410e-05 3.154820e-05 0.99998423 [68,] 2.462139e-05 4.924279e-05 0.99997538 [69,] 2.458230e-05 4.916461e-05 0.99997542 [70,] 3.408993e-05 6.817987e-05 0.99996591 [71,] 1.272392e-04 2.544785e-04 0.99987276 [72,] 4.900471e-04 9.800943e-04 0.99950995 [73,] 5.381760e-04 1.076352e-03 0.99946182 [74,] 1.106381e-03 2.212762e-03 0.99889362 [75,] 1.027384e-02 2.054769e-02 0.98972616 [76,] 1.313799e-02 2.627598e-02 0.98686201 [77,] 1.080925e-02 2.161849e-02 0.98919075 [78,] 2.268418e-02 4.536836e-02 0.97731582 [79,] 1.228613e-01 2.457225e-01 0.87713873 [80,] 1.989693e-01 3.979386e-01 0.80103072 [81,] 3.352822e-01 6.705643e-01 0.66471784 [82,] 9.199159e-01 1.601681e-01 0.08008405 [83,] 9.736292e-01 5.274151e-02 0.02637076 [84,] 9.724962e-01 5.500766e-02 0.02750383 [85,] 9.588669e-01 8.226622e-02 0.04113311 [86,] 9.503769e-01 9.924612e-02 0.04962306 [87,] 9.258641e-01 1.482719e-01 0.07413593 [88,] 8.883480e-01 2.233040e-01 0.11165201 [89,] 8.520412e-01 2.959177e-01 0.14795885 [90,] 7.946876e-01 4.106248e-01 0.20531239 [91,] 8.064044e-01 3.871911e-01 0.19359557 [92,] 7.659482e-01 4.681037e-01 0.23405184 [93,] 7.127243e-01 5.745514e-01 0.28727569 [94,] 6.047545e-01 7.904910e-01 0.39524551 [95,] 5.144890e-01 9.710221e-01 0.48551104 [96,] 4.088218e-01 8.176436e-01 0.59117820 > postscript(file="/var/www/html/rcomp/tmp/126xj1292318184.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/2cfw41292318184.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/3cfw41292318184.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/4cfw41292318184.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/55ow71292318184.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 14.3389080 11.4958787 25.8138285 -4.9037538 -13.5561701 -21.7829314 7 8 9 10 11 12 -9.8480999 8.5472795 17.5815460 14.7993826 -0.6614112 -4.6821332 13 14 15 16 17 18 -5.5865498 4.1558401 1.0098110 17.2928307 18.9900800 6.1148027 19 20 21 22 23 24 17.9308759 11.2489508 23.0910615 -2.6575904 -14.1426442 -2.5412946 25 26 27 28 29 30 4.3236452 -1.4392872 -6.9619078 -5.0786840 2.3362038 -6.2479380 31 32 33 34 35 36 -9.2997333 -9.6857140 -19.0782478 -4.7756299 -2.8284400 -12.6212817 37 38 39 40 41 42 -14.1857792 -12.6591536 -1.9248587 -9.3706126 -12.0541719 -18.8975203 43 44 45 46 47 48 -16.5313163 -14.1707303 -15.6643972 3.3151140 0.3687756 -0.8845787 49 50 51 52 53 54 12.6856029 21.0336059 16.4872712 6.0508294 2.9773642 3.6942348 55 56 57 58 59 60 -2.6137149 -10.8843583 1.1574406 9.3880329 6.9971821 19.5069782 61 62 63 64 65 66 7.0213030 3.3293592 -4.6801322 16.8633574 7.9144816 1.4199996 67 68 69 70 71 72 9.7484896 -4.6953326 -3.8072560 -14.0396855 -8.8494946 -16.6324221 73 74 75 76 77 78 -31.5912476 -25.9971399 -18.3765869 -27.8006086 -10.5793443 -1.4652750 79 80 81 82 83 84 9.0144304 12.1942696 20.3348724 7.6111194 17.3117418 16.2738935 85 86 87 88 89 90 -23.2405326 -11.8937984 -5.7797353 25.2980127 36.0196210 16.8129095 91 92 93 94 95 96 4.9640237 2.9964624 -43.7519742 -4.7563261 -14.6801281 -23.8917349 97 98 99 100 101 102 -15.5695847 -9.2617859 -8.1533415 -2.9412858 3.5949778 -8.7726378 103 104 105 106 107 108 18.2280562 14.5750649 24.6458139 5.9688921 3.5310644 8.1782028 109 110 111 112 113 114 1.0156260 2.8304356 28.9955399 -20.4072771 6.9949375 13.4452633 115 116 117 -7.8582494 -12.7637461 20.5917196 > postscript(file="/var/www/html/rcomp/tmp/65ow71292318184.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 14.3389080 NA 1 11.4958787 14.3389080 2 25.8138285 11.4958787 3 -4.9037538 25.8138285 4 -13.5561701 -4.9037538 5 -21.7829314 -13.5561701 6 -9.8480999 -21.7829314 7 8.5472795 -9.8480999 8 17.5815460 8.5472795 9 14.7993826 17.5815460 10 -0.6614112 14.7993826 11 -4.6821332 -0.6614112 12 -5.5865498 -4.6821332 13 4.1558401 -5.5865498 14 1.0098110 4.1558401 15 17.2928307 1.0098110 16 18.9900800 17.2928307 17 6.1148027 18.9900800 18 17.9308759 6.1148027 19 11.2489508 17.9308759 20 23.0910615 11.2489508 21 -2.6575904 23.0910615 22 -14.1426442 -2.6575904 23 -2.5412946 -14.1426442 24 4.3236452 -2.5412946 25 -1.4392872 4.3236452 26 -6.9619078 -1.4392872 27 -5.0786840 -6.9619078 28 2.3362038 -5.0786840 29 -6.2479380 2.3362038 30 -9.2997333 -6.2479380 31 -9.6857140 -9.2997333 32 -19.0782478 -9.6857140 33 -4.7756299 -19.0782478 34 -2.8284400 -4.7756299 35 -12.6212817 -2.8284400 36 -14.1857792 -12.6212817 37 -12.6591536 -14.1857792 38 -1.9248587 -12.6591536 39 -9.3706126 -1.9248587 40 -12.0541719 -9.3706126 41 -18.8975203 -12.0541719 42 -16.5313163 -18.8975203 43 -14.1707303 -16.5313163 44 -15.6643972 -14.1707303 45 3.3151140 -15.6643972 46 0.3687756 3.3151140 47 -0.8845787 0.3687756 48 12.6856029 -0.8845787 49 21.0336059 12.6856029 50 16.4872712 21.0336059 51 6.0508294 16.4872712 52 2.9773642 6.0508294 53 3.6942348 2.9773642 54 -2.6137149 3.6942348 55 -10.8843583 -2.6137149 56 1.1574406 -10.8843583 57 9.3880329 1.1574406 58 6.9971821 9.3880329 59 19.5069782 6.9971821 60 7.0213030 19.5069782 61 3.3293592 7.0213030 62 -4.6801322 3.3293592 63 16.8633574 -4.6801322 64 7.9144816 16.8633574 65 1.4199996 7.9144816 66 9.7484896 1.4199996 67 -4.6953326 9.7484896 68 -3.8072560 -4.6953326 69 -14.0396855 -3.8072560 70 -8.8494946 -14.0396855 71 -16.6324221 -8.8494946 72 -31.5912476 -16.6324221 73 -25.9971399 -31.5912476 74 -18.3765869 -25.9971399 75 -27.8006086 -18.3765869 76 -10.5793443 -27.8006086 77 -1.4652750 -10.5793443 78 9.0144304 -1.4652750 79 12.1942696 9.0144304 80 20.3348724 12.1942696 81 7.6111194 20.3348724 82 17.3117418 7.6111194 83 16.2738935 17.3117418 84 -23.2405326 16.2738935 85 -11.8937984 -23.2405326 86 -5.7797353 -11.8937984 87 25.2980127 -5.7797353 88 36.0196210 25.2980127 89 16.8129095 36.0196210 90 4.9640237 16.8129095 91 2.9964624 4.9640237 92 -43.7519742 2.9964624 93 -4.7563261 -43.7519742 94 -14.6801281 -4.7563261 95 -23.8917349 -14.6801281 96 -15.5695847 -23.8917349 97 -9.2617859 -15.5695847 98 -8.1533415 -9.2617859 99 -2.9412858 -8.1533415 100 3.5949778 -2.9412858 101 -8.7726378 3.5949778 102 18.2280562 -8.7726378 103 14.5750649 18.2280562 104 24.6458139 14.5750649 105 5.9688921 24.6458139 106 3.5310644 5.9688921 107 8.1782028 3.5310644 108 1.0156260 8.1782028 109 2.8304356 1.0156260 110 28.9955399 2.8304356 111 -20.4072771 28.9955399 112 6.9949375 -20.4072771 113 13.4452633 6.9949375 114 -7.8582494 13.4452633 115 -12.7637461 -7.8582494 116 20.5917196 -12.7637461 117 NA 20.5917196 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 11.4958787 14.3389080 [2,] 25.8138285 11.4958787 [3,] -4.9037538 25.8138285 [4,] -13.5561701 -4.9037538 [5,] -21.7829314 -13.5561701 [6,] -9.8480999 -21.7829314 [7,] 8.5472795 -9.8480999 [8,] 17.5815460 8.5472795 [9,] 14.7993826 17.5815460 [10,] -0.6614112 14.7993826 [11,] -4.6821332 -0.6614112 [12,] -5.5865498 -4.6821332 [13,] 4.1558401 -5.5865498 [14,] 1.0098110 4.1558401 [15,] 17.2928307 1.0098110 [16,] 18.9900800 17.2928307 [17,] 6.1148027 18.9900800 [18,] 17.9308759 6.1148027 [19,] 11.2489508 17.9308759 [20,] 23.0910615 11.2489508 [21,] -2.6575904 23.0910615 [22,] -14.1426442 -2.6575904 [23,] -2.5412946 -14.1426442 [24,] 4.3236452 -2.5412946 [25,] -1.4392872 4.3236452 [26,] -6.9619078 -1.4392872 [27,] -5.0786840 -6.9619078 [28,] 2.3362038 -5.0786840 [29,] -6.2479380 2.3362038 [30,] -9.2997333 -6.2479380 [31,] -9.6857140 -9.2997333 [32,] -19.0782478 -9.6857140 [33,] -4.7756299 -19.0782478 [34,] -2.8284400 -4.7756299 [35,] -12.6212817 -2.8284400 [36,] -14.1857792 -12.6212817 [37,] -12.6591536 -14.1857792 [38,] -1.9248587 -12.6591536 [39,] -9.3706126 -1.9248587 [40,] -12.0541719 -9.3706126 [41,] -18.8975203 -12.0541719 [42,] -16.5313163 -18.8975203 [43,] -14.1707303 -16.5313163 [44,] -15.6643972 -14.1707303 [45,] 3.3151140 -15.6643972 [46,] 0.3687756 3.3151140 [47,] -0.8845787 0.3687756 [48,] 12.6856029 -0.8845787 [49,] 21.0336059 12.6856029 [50,] 16.4872712 21.0336059 [51,] 6.0508294 16.4872712 [52,] 2.9773642 6.0508294 [53,] 3.6942348 2.9773642 [54,] -2.6137149 3.6942348 [55,] -10.8843583 -2.6137149 [56,] 1.1574406 -10.8843583 [57,] 9.3880329 1.1574406 [58,] 6.9971821 9.3880329 [59,] 19.5069782 6.9971821 [60,] 7.0213030 19.5069782 [61,] 3.3293592 7.0213030 [62,] -4.6801322 3.3293592 [63,] 16.8633574 -4.6801322 [64,] 7.9144816 16.8633574 [65,] 1.4199996 7.9144816 [66,] 9.7484896 1.4199996 [67,] -4.6953326 9.7484896 [68,] -3.8072560 -4.6953326 [69,] -14.0396855 -3.8072560 [70,] -8.8494946 -14.0396855 [71,] -16.6324221 -8.8494946 [72,] -31.5912476 -16.6324221 [73,] -25.9971399 -31.5912476 [74,] -18.3765869 -25.9971399 [75,] -27.8006086 -18.3765869 [76,] -10.5793443 -27.8006086 [77,] -1.4652750 -10.5793443 [78,] 9.0144304 -1.4652750 [79,] 12.1942696 9.0144304 [80,] 20.3348724 12.1942696 [81,] 7.6111194 20.3348724 [82,] 17.3117418 7.6111194 [83,] 16.2738935 17.3117418 [84,] -23.2405326 16.2738935 [85,] -11.8937984 -23.2405326 [86,] -5.7797353 -11.8937984 [87,] 25.2980127 -5.7797353 [88,] 36.0196210 25.2980127 [89,] 16.8129095 36.0196210 [90,] 4.9640237 16.8129095 [91,] 2.9964624 4.9640237 [92,] -43.7519742 2.9964624 [93,] -4.7563261 -43.7519742 [94,] -14.6801281 -4.7563261 [95,] -23.8917349 -14.6801281 [96,] -15.5695847 -23.8917349 [97,] -9.2617859 -15.5695847 [98,] -8.1533415 -9.2617859 [99,] -2.9412858 -8.1533415 [100,] 3.5949778 -2.9412858 [101,] -8.7726378 3.5949778 [102,] 18.2280562 -8.7726378 [103,] 14.5750649 18.2280562 [104,] 24.6458139 14.5750649 [105,] 5.9688921 24.6458139 [106,] 3.5310644 5.9688921 [107,] 8.1782028 3.5310644 [108,] 1.0156260 8.1782028 [109,] 2.8304356 1.0156260 [110,] 28.9955399 2.8304356 [111,] -20.4072771 28.9955399 [112,] 6.9949375 -20.4072771 [113,] 13.4452633 6.9949375 [114,] -7.8582494 13.4452633 [115,] -12.7637461 -7.8582494 [116,] 20.5917196 -12.7637461 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 11.4958787 14.3389080 2 25.8138285 11.4958787 3 -4.9037538 25.8138285 4 -13.5561701 -4.9037538 5 -21.7829314 -13.5561701 6 -9.8480999 -21.7829314 7 8.5472795 -9.8480999 8 17.5815460 8.5472795 9 14.7993826 17.5815460 10 -0.6614112 14.7993826 11 -4.6821332 -0.6614112 12 -5.5865498 -4.6821332 13 4.1558401 -5.5865498 14 1.0098110 4.1558401 15 17.2928307 1.0098110 16 18.9900800 17.2928307 17 6.1148027 18.9900800 18 17.9308759 6.1148027 19 11.2489508 17.9308759 20 23.0910615 11.2489508 21 -2.6575904 23.0910615 22 -14.1426442 -2.6575904 23 -2.5412946 -14.1426442 24 4.3236452 -2.5412946 25 -1.4392872 4.3236452 26 -6.9619078 -1.4392872 27 -5.0786840 -6.9619078 28 2.3362038 -5.0786840 29 -6.2479380 2.3362038 30 -9.2997333 -6.2479380 31 -9.6857140 -9.2997333 32 -19.0782478 -9.6857140 33 -4.7756299 -19.0782478 34 -2.8284400 -4.7756299 35 -12.6212817 -2.8284400 36 -14.1857792 -12.6212817 37 -12.6591536 -14.1857792 38 -1.9248587 -12.6591536 39 -9.3706126 -1.9248587 40 -12.0541719 -9.3706126 41 -18.8975203 -12.0541719 42 -16.5313163 -18.8975203 43 -14.1707303 -16.5313163 44 -15.6643972 -14.1707303 45 3.3151140 -15.6643972 46 0.3687756 3.3151140 47 -0.8845787 0.3687756 48 12.6856029 -0.8845787 49 21.0336059 12.6856029 50 16.4872712 21.0336059 51 6.0508294 16.4872712 52 2.9773642 6.0508294 53 3.6942348 2.9773642 54 -2.6137149 3.6942348 55 -10.8843583 -2.6137149 56 1.1574406 -10.8843583 57 9.3880329 1.1574406 58 6.9971821 9.3880329 59 19.5069782 6.9971821 60 7.0213030 19.5069782 61 3.3293592 7.0213030 62 -4.6801322 3.3293592 63 16.8633574 -4.6801322 64 7.9144816 16.8633574 65 1.4199996 7.9144816 66 9.7484896 1.4199996 67 -4.6953326 9.7484896 68 -3.8072560 -4.6953326 69 -14.0396855 -3.8072560 70 -8.8494946 -14.0396855 71 -16.6324221 -8.8494946 72 -31.5912476 -16.6324221 73 -25.9971399 -31.5912476 74 -18.3765869 -25.9971399 75 -27.8006086 -18.3765869 76 -10.5793443 -27.8006086 77 -1.4652750 -10.5793443 78 9.0144304 -1.4652750 79 12.1942696 9.0144304 80 20.3348724 12.1942696 81 7.6111194 20.3348724 82 17.3117418 7.6111194 83 16.2738935 17.3117418 84 -23.2405326 16.2738935 85 -11.8937984 -23.2405326 86 -5.7797353 -11.8937984 87 25.2980127 -5.7797353 88 36.0196210 25.2980127 89 16.8129095 36.0196210 90 4.9640237 16.8129095 91 2.9964624 4.9640237 92 -43.7519742 2.9964624 93 -4.7563261 -43.7519742 94 -14.6801281 -4.7563261 95 -23.8917349 -14.6801281 96 -15.5695847 -23.8917349 97 -9.2617859 -15.5695847 98 -8.1533415 -9.2617859 99 -2.9412858 -8.1533415 100 3.5949778 -2.9412858 101 -8.7726378 3.5949778 102 18.2280562 -8.7726378 103 14.5750649 18.2280562 104 24.6458139 14.5750649 105 5.9688921 24.6458139 106 3.5310644 5.9688921 107 8.1782028 3.5310644 108 1.0156260 8.1782028 109 2.8304356 1.0156260 110 28.9955399 2.8304356 111 -20.4072771 28.9955399 112 6.9949375 -20.4072771 113 13.4452633 6.9949375 114 -7.8582494 13.4452633 115 -12.7637461 -7.8582494 116 20.5917196 -12.7637461 > 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/7l02h1292318184.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/8l02h1292318184.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/997cd1292318184.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/1097cd1292318184.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/11u7bj1292318184.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/12x89p1292318184.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/1349oj1292318184.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/14x05l1292318184.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/1501mr1292318184.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/16eski1292318184.tab") + } > > try(system("convert tmp/126xj1292318184.ps tmp/126xj1292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/2cfw41292318184.ps tmp/2cfw41292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/3cfw41292318184.ps tmp/3cfw41292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/4cfw41292318184.ps tmp/4cfw41292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/55ow71292318184.ps tmp/55ow71292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/65ow71292318184.ps tmp/65ow71292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/7l02h1292318184.ps tmp/7l02h1292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/8l02h1292318184.ps tmp/8l02h1292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/997cd1292318184.ps tmp/997cd1292318184.png",intern=TRUE)) character(0) > try(system("convert tmp/1097cd1292318184.ps tmp/1097cd1292318184.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.455 1.757 9.108