R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(121.79 + ,125.10 + ,138.82 + ,107.35 + ,139.63 + ,114.29 + ,103.40 + ,125.16 + ,89.25 + ,110.87 + ,119.79 + ,126.75 + ,125.84 + ,121.57 + ,123.99 + ,138.32 + ,106.99 + ,139.66 + ,114.08 + ,103.26 + ,125.75 + ,88.72 + ,110.79 + ,119.24 + ,126.69 + ,125.67 + ,121.36 + ,123.72 + ,138.32 + ,106.81 + ,139.31 + ,114.02 + ,103.24 + ,124.73 + ,88.77 + ,110.84 + ,119.24 + ,128.16 + ,125.24 + ,120.83 + ,123.24 + ,136.96 + ,106.41 + ,138.50 + ,113.74 + ,103.29 + ,122.95 + ,88.94 + ,111.01 + ,119.24 + ,128.17 + ,125.02 + ,120.61 + ,123.23 + ,136.56 + ,106.41 + ,138.31 + ,113.76 + ,103.38 + ,122.58 + ,88.94 + ,111.35 + ,119.24 + ,126.06 + ,124.73 + ,120.89 + ,123.40 + ,135.48 + ,106.32 + ,139.47 + ,113.65 + ,103.81 + ,123.56 + ,89.35 + ,110.94 + ,119.24 + ,125.41 + ,124.70 + ,120.93 + ,122.96 + ,132.88 + ,106.15 + ,140.05 + ,113.60 + ,103.96 + ,125.03 + ,89.34 + ,109.86 + ,119.24 + ,125.37 + ,124.30 + ,120.85 + ,122.97 + ,132.11 + ,106.00 + ,140.03 + ,113.42 + ,104.23 + ,124.52 + ,90.20 + ,110.52 + ,119.24 + ,124.15 + ,124.25 + ,120.59 + ,122.85 + ,132.06 + ,105.96 + ,139.39 + ,113.51 + ,104.07 + ,123.24 + ,90.21 + ,111.30 + ,119.24 + ,124.04 + ,123.95 + ,119.88 + ,121.81 + ,132.00 + ,106.53 + ,138.38 + ,113.11 + ,104.02 + ,122.81 + ,90.75 + ,109.33 + ,119.24 + ,123.31 + ,123.78 + ,119.01 + ,121.52 + ,131.99 + ,106.52 + ,137.30 + ,112.99 + ,103.35 + ,121.56 + ,86.76 + ,108.42 + ,119.24 + ,123.82 + ,121.14 + ,118.96 + ,121.54 + ,131.96 + ,106.46 + ,137.32 + ,112.84 + ,103.29 + ,121.86 + ,86.74 + ,108.23 + ,119.24 + ,123.01 + ,121.01 + ,118.49 + ,120.58 + ,131.89 + ,106.27 + ,136.29 + ,112.42 + ,103.30 + ,121.83 + ,86.74 + ,107.64 + ,119.24 + ,123.25 + ,120.69 + ,118.31 + ,120.17 + ,131.89 + ,105.83 + ,136.43 + ,112.00 + ,103.34 + ,121.84 + ,86.72 + ,107.54 + ,115.72 + ,123.09 + ,120.35 + ,117.99 + ,120.02 + ,131.72 + ,105.46 + ,135.13 + ,111.72 + ,103.34 + ,121.15 + ,87.50 + ,107.23 + ,115.72 + ,124.60 + ,119.91 + ,118.09 + ,120.49 + ,131.61 + ,105.10 + ,135.29 + ,111.67 + ,103.32 + ,121.01 + ,87.51 + ,107.36 + ,115.72 + ,124.94 + ,119.79 + ,117.95 + ,120.38 + ,131.38 + ,105.09 + ,135.52 + ,111.55 + ,103.22 + ,121.08 + ,87.86 + ,107.58 + ,115.72 + ,122.46 + ,119.58 + ,117.59 + ,120.09 + ,130.79 + ,105.04 + ,133.84 + ,111.33 + ,103.21 + ,121.55 + ,87.86 + ,107.27 + ,115.72 + ,121.91 + ,119.50 + ,117.20 + ,119.62 + ,130.14 + ,104.87 + ,132.91 + ,111.06 + ,103.15 + ,121.27 + ,87.86 + ,106.52 + ,115.72 + ,122.29 + ,119.33 + ,116.91 + ,118.93 + ,130.13 + ,104.67 + ,132.15 + ,110.97 + ,103.37 + ,120.38 + ,87.81 + ,108.01 + ,115.72 + ,121.49 + ,119.17 + ,116.33 + ,119.09 + ,130.24 + ,104.54 + ,130.11 + ,110.81 + ,103.44 + ,118.61 + ,87.81 + ,108.53 + ,115.72 + ,120.84 + ,118.94 + ,115.66 + ,118.59 + ,130.23 + ,104.90 + ,128.42 + ,110.62 + ,103.28 + ,118.17 + ,88.67 + ,107.09 + ,115.72 + ,120.33 + ,118.15 + ,115.00 + ,117.87 + ,130.23 + ,104.90 + ,127.53 + ,110.71 + ,103.12 + ,117.17 + ,88.35 + ,105.59 + ,115.72 + ,120.76 + ,117.34 + ,114.55 + ,117.74 + ,130.23 + ,104.89 + ,126.35 + ,110.51 + ,103.12 + ,115.67 + ,87.62 + ,106.27 + ,115.72 + ,120.09 + ,117.19 + ,114.41 + ,117.61 + ,130.23 + ,104.80 + ,125.99 + ,110.50 + ,103.11 + ,115.05 + ,87.59 + ,106.63 + ,115.72 + ,120.39 + ,117.02 + ,114.25 + ,117.55 + ,130.22 + ,104.41 + ,125.56 + ,110.37 + ,103.11 + ,114.90 + ,87.58 + ,106.61 + ,116.29 + ,120.21 + ,116.77 + ,113.89 + ,117.06 + ,130.21 + ,104.31 + ,124.35 + ,110.38 + ,103.06 + ,114.68 + ,87.51 + ,106.15 + ,116.29 + ,121.01 + ,116.46 + ,113.82 + ,117.08 + ,130.17 + ,103.88 + ,124.02 + ,110.26 + ,103.03 + ,114.61 + ,87.40 + ,106.11 + ,116.29 + ,121.40 + ,116.48 + ,113.77 + ,117.21 + ,130.07 + ,103.88 + ,124.29 + ,110.28 + ,103.15 + ,114.82 + ,87.48 + ,106.34 + ,116.29 + ,118.89 + ,116.30 + ,113.78 + ,117.58 + ,130.01 + ,103.86 + ,124.12 + ,110.25 + ,103.13 + ,114.97 + ,86.08 + ,106.71 + ,116.29 + ,119.00 + ,115.61 + ,113.33 + ,117.27 + ,128.23 + ,103.89 + ,123.41 + ,110.09 + ,103.11 + ,114.24 + ,86.79 + ,105.50 + ,116.29 + ,118.82 + ,115.50 + ,112.94 + ,117.14 + ,127.80 + ,103.98 + ,122.26 + ,110.01 + ,103.24 + ,112.97 + ,86.58 + ,106.06 + ,116.29 + ,118.17 + ,115.45 + ,112.52 + ,116.52 + ,127.76 + ,103.98 + ,120.74 + ,109.75 + ,103.20 + ,111.47 + ,86.60 + ,107.89 + ,116.29 + ,118.04 + ,115.13 + ,112.05 + ,116.16 + ,127.75 + ,104.29 + ,120.34 + ,109.57 + ,103.83 + ,111.52 + ,86.71 + ,105.41 + ,116.29 + ,117.34 + ,114.84 + ,111.54 + ,114.79 + ,127.41 + ,104.29 + ,119.04 + ,109.59 + ,103.50 + ,110.57 + ,86.98 + ,105.87 + ,116.29 + ,118.00 + ,114.91 + ,111.36 + ,114.97 + ,125.81 + ,104.24 + ,118.76 + ,109.45 + ,103.50 + ,110.62 + ,86.62 + ,105.20 + ,116.29 + ,117.36 + ,114.83 + ,111.07 + ,114.66 + ,125.57 + ,103.98 + ,118.06 + ,109.21 + ,103.52 + ,109.38 + ,89.60 + ,105.06 + ,116.29 + ,117.66 + ,114.78 + ,111.02 + ,114.30 + ,125.55 + ,103.54 + ,117.76 + ,109.00 + ,103.54 + ,110.03 + ,89.56 + ,105.16 + ,111.29 + ,117.83 + ,114.94 + ,111.31 + ,114.48 + ,125.51 + ,103.44 + ,119.02 + ,108.83 + ,103.48 + ,110.64 + ,89.66 + ,104.55 + ,111.29 + ,118.77 + ,114.74 + ,110.97 + ,114.96 + ,125.45 + ,103.32 + ,117.29 + ,108.62 + ,103.53 + ,109.53 + ,89.67 + ,104.83 + ,111.29 + ,118.84 + ,114.63 + ,111.04 + ,115.44 + ,125.29 + ,103.30 + ,117.58 + ,108.56 + ,104.60 + ,109.72 + ,89.69 + ,105.01 + ,111.29 + ,116.63 + ,114.69 + ,111.25 + ,116.38 + ,125.10 + ,103.26 + ,119.98 + ,108.41 + ,104.61 + ,108.24 + ,89.69 + ,104.53 + ,111.29 + ,116.18 + ,114.49 + ,111.33 + ,116.50 + ,124.74 + ,103.14 + ,121.08 + ,108.27 + ,104.99 + ,108.00 + ,90.28 + ,103.78 + ,111.29 + ,116.46 + ,114.27 + ,111.10 + ,116.20 + ,123.61 + ,103.11 + ,121.18 + ,108.03 + ,104.85 + ,107.10 + ,90.09 + ,104.25 + ,111.29 + ,115.65 + ,114.17 + ,111.74 + ,116.37 + ,122.85 + ,102.91 + ,124.36 + ,107.67 + ,105.29 + ,107.03 + ,90.09 + ,105.81 + ,111.29 + ,115.39 + ,113.73 + ,111.36 + ,116.46 + ,122.84 + ,103.23 + ,125.80 + ,107.31 + ,105.22 + ,105.95 + ,88.53 + ,103.42 + ,111.29 + ,114.54 + ,113.25 + ,111.25 + ,115.07 + ,122.83 + ,103.23 + ,125.69 + ,107.14 + ,103.38 + ,106.62 + ,89.73 + ,104.44 + ,111.29 + ,115.11 + ,112.63 + ,111.49 + ,115.03 + ,122.83 + ,103.14 + ,126.27 + ,107.02 + ,103.38 + ,108.90 + ,89.47 + ,103.35 + ,111.29 + ,114.51 + ,112.62 + ,112.16 + ,115.15 + ,122.83 + ,102.91 + ,127.54 + ,106.79 + ,103.30 + ,112.12 + ,89.60 + ,103.19 + ,111.29 + ,114.66 + ,112.42 + ,112.36 + ,114.71 + ,122.81 + ,102.42 + ,128.57 + ,106.49 + ,103.27 + ,114.11 + ,88.90 + ,102.99 + ,109.47 + ,113.81 + ,112.11 + ,112.18 + ,114.67 + ,122.80 + ,102.10 + ,127.03 + ,106.14 + ,103.47 + ,114.51 + ,89.60 + ,102.40 + ,109.47 + ,115.35 + ,111.94 + ,112.87 + ,115.49 + ,122.75 + ,102.07 + ,128.41 + ,105.94 + ,103.30 + ,116.86 + ,89.22 + ,102.49 + ,109.47 + ,115.07 + ,111.85 + ,112.28 + ,114.65 + ,122.72 + ,102.06 + ,127.68 + ,105.87 + ,103.29 + ,116.21 + ,89.61 + ,102.45 + ,109.47 + ,112.87 + ,110.96 + ,111.66 + ,114.92 + ,122.44 + ,101.98 + ,125.68 + ,105.71 + ,103.27 + ,114.74 + ,89.60 + ,102.21 + ,109.47 + ,111.83 + ,110.87 + ,110.67 + ,114.17 + ,121.28 + ,101.83 + ,123.67 + ,105.48 + ,103.78 + ,112.86 + ,89.60 + ,100.80 + ,109.47 + ,111.44 + ,110.64 + ,110.42 + ,112.80 + ,119.78 + ,101.75 + ,122.87 + ,105.31 + ,103.69 + ,112.38 + ,90.13 + ,102.99 + ,109.47 + ,111.20 + ,110.32 + ,109.62 + ,112.28 + ,119.78 + ,101.56 + ,120.13 + ,105.09 + ,103.60 + ,110.76 + ,90.10 + ,103.75 + ,109.47 + ,110.44 + ,110.02 + ,108.84 + ,112.05 + ,119.78 + ,101.66 + ,117.44 + ,104.88 + ,104.36 + ,110.78 + ,89.98 + ,101.69 + ,109.47 + ,109.57 + ,109.68 + ,108.40 + ,111.03 + ,119.77 + ,101.65 + ,115.65 + ,104.76 + ,104.10 + ,110.76 + ,89.97 + ,102.39 + ,109.47 + ,109.74 + ,109.20 + ,108.10 + ,110.40 + ,119.77 + ,101.61 + ,114.97 + ,104.62 + ,104.03 + ,111.69 + ,89.96 + ,101.30 + ,109.47 + ,108.81 + ,109.10 + ,107.10 + ,109.08 + ,119.73 + ,101.52 + ,112.47 + ,104.49 + ,104.00 + ,109.55 + ,90.14 + ,101.33 + ,109.47 + ,108.81 + ,108.99 + ,106.54 + ,107.89 + ,119.67 + ,101.31 + ,111.55 + ,104.29 + ,104.32 + ,108.65 + ,90.03 + ,101.22 + ,107.35 + ,108.81 + ,108.88 + ,106.44 + ,107.26 + ,119.67 + ,101.19 + ,111.07 + ,104.22 + ,104.31 + ,108.39 + ,91.22 + ,101.09 + ,107.35 + ,110.56 + ,108.94 + ,106.57 + ,107.76 + ,119.50 + ,101.11 + ,110.73 + ,103.69 + ,104.30 + ,109.02 + ,91.63 + ,101.23 + ,107.35 + ,110.69 + ,108.92 + ,106.12 + ,107.32 + ,119.39 + ,101.10 + ,110.43 + ,103.11 + ,104.23 + ,108.43 + ,91.98 + ,100.87 + ,107.35 + ,108.76 + ,108.65 + ,106.13 + ,107.15 + ,119.28 + ,101.07 + ,110.71 + ,102.95 + ,105.02 + ,108.12 + ,94.09 + ,100.82 + ,107.35 + ,108.29 + ,108.58 + ,106.26 + ,108.04 + ,117.00 + ,100.98 + ,111.21 + ,102.75 + ,105.18 + ,107.90 + ,95.02 + ,100.28 + ,107.35 + ,108.20 + ,108.45 + ,105.78 + ,106.52 + ,113.14 + ,100.93 + ,111.02 + ,102.61 + ,105.33 + ,107.01 + ,94.78 + ,101.27 + ,107.35 + ,107.58 + ,107.79 + ,105.77 + ,106.62 + ,107.46 + ,100.92 + ,111.92 + ,102.43 + ,105.39 + ,105.68 + ,94.69 + ,102.68 + ,107.35 + ,107.35 + ,107.16 + ,105.20 + ,106.47 + ,107.41 + ,101.02 + ,111.08 + ,102.15 + ,105.26 + ,105.16 + ,94.67 + ,100.84 + ,107.35 + ,106.42 + ,106.98 + ,105.15 + ,105.46 + ,107.39 + ,101.01 + ,111.26 + ,102.03 + ,104.64 + ,106.52 + ,94.79 + ,101.03 + ,107.35 + ,106.38 + ,105.66 + ,105.01 + ,106.13 + ,107.31 + ,100.97 + ,110.75 + ,101.94 + ,104.62 + ,106.25 + ,94.51 + ,100.11 + ,107.35 + ,106.30 + ,105.61 + ,104.75 + ,105.15 + ,107.27 + ,100.89 + ,110.58 + ,101.73 + ,104.59 + ,106.15 + ,94.49 + ,100.11 + ,107.35 + ,106.32 + ,105.46 + ,104.96 + ,105.39 + ,106.90 + ,100.62 + ,110.93 + ,101.63 + ,104.57 + ,107.20 + ,94.29 + ,100.05 + ,104.85 + ,106.58 + ,105.28 + ,105.26 + ,104.57 + ,105.54 + ,100.53 + ,111.45 + ,101.49 + ,104.49 + ,109.21 + ,94.96 + ,100.04 + ,104.85 + ,107.77 + ,105.09 + ,105.13 + ,104.29 + ,105.17 + ,100.48 + ,111.33 + ,101.42 + ,104.45 + ,109.09 + ,95.02 + ,99.98 + ,104.85 + ,107.63 + ,104.99 + ,104.77 + ,104.09 + ,105.17 + ,100.48 + ,110.71 + ,101.36 + ,104.74 + ,108.49 + ,95.08 + ,100.18 + ,104.85 + ,105.87 + ,104.47 + ,104.79 + ,104.51 + ,105.16 + ,100.47 + ,110.59 + ,101.30 + ,105.08 + ,108.50 + ,95.23 + ,100.16 + ,104.85 + ,105.20 + ,104.36 + ,104.40 + ,103.39 + ,105.16 + ,100.52 + ,110.25 + ,101.12 + ,105.01 + ,108.03 + ,95.35 + ,99.94 + ,104.85 + ,105.25 + ,104.10 + ,103.89 + ,102.71 + ,105.16 + ,100.49 + ,109.43 + ,100.88 + ,105.06 + ,106.61 + ,95.46 + ,100.30 + ,104.85 + ,104.51 + ,103.98 + ,103.93 + ,102.62 + ,105.16 + ,100.47 + ,108.62 + ,100.89 + ,105.06 + ,106.35 + ,96.15 + ,102.01 + ,104.85 + ,104.35 + ,103.87 + ,103.48 + ,101.94 + ,105.16 + ,100.44 + ,108.42 + ,100.76 + ,105.01 + ,106.34 + ,96.84 + ,100.17 + ,104.85 + ,103.75 + ,103.51) + ,dim=c(13 + ,82) + ,dimnames=list(c('Algemeen_indexcijfer' + ,'Voedingsmiddelen_en_dranken' + ,'Tabak' + ,'Kleding_en_schoeisel' + ,'Huisv_wat_elektr_gas_ed' + ,'Stoff_huish_app_&_ond_won.' + ,'Gezondheidsuitgaven' + ,'Vervoer' + ,'Communicatie' + ,'Recreatie_en_cultuur' + ,'Onderwijs' + ,'Hotels_cafés_en_restaurants' + ,'Diverse_goederen_&_diensten') + ,1:82)) > y <- array(NA,dim=c(13,82),dimnames=list(c('Algemeen_indexcijfer','Voedingsmiddelen_en_dranken','Tabak','Kleding_en_schoeisel','Huisv_wat_elektr_gas_ed','Stoff_huish_app_&_ond_won.','Gezondheidsuitgaven','Vervoer','Communicatie','Recreatie_en_cultuur','Onderwijs','Hotels_cafés_en_restaurants','Diverse_goederen_&_diensten'),1:82)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Algemeen_indexcijfer Voedingsmiddelen_en_dranken Tabak Kleding_en_schoeisel 1 121.79 125.10 138.82 107.35 2 121.57 123.99 138.32 106.99 3 121.36 123.72 138.32 106.81 4 120.83 123.24 136.96 106.41 5 120.61 123.23 136.56 106.41 6 120.89 123.40 135.48 106.32 7 120.93 122.96 132.88 106.15 8 120.85 122.97 132.11 106.00 9 120.59 122.85 132.06 105.96 10 119.88 121.81 132.00 106.53 11 119.01 121.52 131.99 106.52 12 118.96 121.54 131.96 106.46 13 118.49 120.58 131.89 106.27 14 118.31 120.17 131.89 105.83 15 117.99 120.02 131.72 105.46 16 118.09 120.49 131.61 105.10 17 117.95 120.38 131.38 105.09 18 117.59 120.09 130.79 105.04 19 117.20 119.62 130.14 104.87 20 116.91 118.93 130.13 104.67 21 116.33 119.09 130.24 104.54 22 115.66 118.59 130.23 104.90 23 115.00 117.87 130.23 104.90 24 114.55 117.74 130.23 104.89 25 114.41 117.61 130.23 104.80 26 114.25 117.55 130.22 104.41 27 113.89 117.06 130.21 104.31 28 113.82 117.08 130.17 103.88 29 113.77 117.21 130.07 103.88 30 113.78 117.58 130.01 103.86 31 113.33 117.27 128.23 103.89 32 112.94 117.14 127.80 103.98 33 112.52 116.52 127.76 103.98 34 112.05 116.16 127.75 104.29 35 111.54 114.79 127.41 104.29 36 111.36 114.97 125.81 104.24 37 111.07 114.66 125.57 103.98 38 111.02 114.30 125.55 103.54 39 111.31 114.48 125.51 103.44 40 110.97 114.96 125.45 103.32 41 111.04 115.44 125.29 103.30 42 111.25 116.38 125.10 103.26 43 111.33 116.50 124.74 103.14 44 111.10 116.20 123.61 103.11 45 111.74 116.37 122.85 102.91 46 111.36 116.46 122.84 103.23 47 111.25 115.07 122.83 103.23 48 111.49 115.03 122.83 103.14 49 112.16 115.15 122.83 102.91 50 112.36 114.71 122.81 102.42 51 112.18 114.67 122.80 102.10 52 112.87 115.49 122.75 102.07 53 112.28 114.65 122.72 102.06 54 111.66 114.92 122.44 101.98 55 110.67 114.17 121.28 101.83 56 110.42 112.80 119.78 101.75 57 109.62 112.28 119.78 101.56 58 108.84 112.05 119.78 101.66 59 108.40 111.03 119.77 101.65 60 108.10 110.40 119.77 101.61 61 107.10 109.08 119.73 101.52 62 106.54 107.89 119.67 101.31 63 106.44 107.26 119.67 101.19 64 106.57 107.76 119.50 101.11 65 106.12 107.32 119.39 101.10 66 106.13 107.15 119.28 101.07 67 106.26 108.04 117.00 100.98 68 105.78 106.52 113.14 100.93 69 105.77 106.62 107.46 100.92 70 105.20 106.47 107.41 101.02 71 105.15 105.46 107.39 101.01 72 105.01 106.13 107.31 100.97 73 104.75 105.15 107.27 100.89 74 104.96 105.39 106.90 100.62 75 105.26 104.57 105.54 100.53 76 105.13 104.29 105.17 100.48 77 104.77 104.09 105.17 100.48 78 104.79 104.51 105.16 100.47 79 104.40 103.39 105.16 100.52 80 103.89 102.71 105.16 100.49 81 103.93 102.62 105.16 100.47 82 103.48 101.94 105.16 100.44 Huisv_wat_elektr_gas_ed Stoff_huish_app_&_ond_won. Gezondheidsuitgaven 1 139.63 114.29 103.40 2 139.66 114.08 103.26 3 139.31 114.02 103.24 4 138.50 113.74 103.29 5 138.31 113.76 103.38 6 139.47 113.65 103.81 7 140.05 113.60 103.96 8 140.03 113.42 104.23 9 139.39 113.51 104.07 10 138.38 113.11 104.02 11 137.30 112.99 103.35 12 137.32 112.84 103.29 13 136.29 112.42 103.30 14 136.43 112.00 103.34 15 135.13 111.72 103.34 16 135.29 111.67 103.32 17 135.52 111.55 103.22 18 133.84 111.33 103.21 19 132.91 111.06 103.15 20 132.15 110.97 103.37 21 130.11 110.81 103.44 22 128.42 110.62 103.28 23 127.53 110.71 103.12 24 126.35 110.51 103.12 25 125.99 110.50 103.11 26 125.56 110.37 103.11 27 124.35 110.38 103.06 28 124.02 110.26 103.03 29 124.29 110.28 103.15 30 124.12 110.25 103.13 31 123.41 110.09 103.11 32 122.26 110.01 103.24 33 120.74 109.75 103.20 34 120.34 109.57 103.83 35 119.04 109.59 103.50 36 118.76 109.45 103.50 37 118.06 109.21 103.52 38 117.76 109.00 103.54 39 119.02 108.83 103.48 40 117.29 108.62 103.53 41 117.58 108.56 104.60 42 119.98 108.41 104.61 43 121.08 108.27 104.99 44 121.18 108.03 104.85 45 124.36 107.67 105.29 46 125.80 107.31 105.22 47 125.69 107.14 103.38 48 126.27 107.02 103.38 49 127.54 106.79 103.30 50 128.57 106.49 103.27 51 127.03 106.14 103.47 52 128.41 105.94 103.30 53 127.68 105.87 103.29 54 125.68 105.71 103.27 55 123.67 105.48 103.78 56 122.87 105.31 103.69 57 120.13 105.09 103.60 58 117.44 104.88 104.36 59 115.65 104.76 104.10 60 114.97 104.62 104.03 61 112.47 104.49 104.00 62 111.55 104.29 104.32 63 111.07 104.22 104.31 64 110.73 103.69 104.30 65 110.43 103.11 104.23 66 110.71 102.95 105.02 67 111.21 102.75 105.18 68 111.02 102.61 105.33 69 111.92 102.43 105.39 70 111.08 102.15 105.26 71 111.26 102.03 104.64 72 110.75 101.94 104.62 73 110.58 101.73 104.59 74 110.93 101.63 104.57 75 111.45 101.49 104.49 76 111.33 101.42 104.45 77 110.71 101.36 104.74 78 110.59 101.30 105.08 79 110.25 101.12 105.01 80 109.43 100.88 105.06 81 108.62 100.89 105.06 82 108.42 100.76 105.01 Vervoer Communicatie Recreatie_en_cultuur Onderwijs 1 125.16 89.25 110.87 119.79 2 125.75 88.72 110.79 119.24 3 124.73 88.77 110.84 119.24 4 122.95 88.94 111.01 119.24 5 122.58 88.94 111.35 119.24 6 123.56 89.35 110.94 119.24 7 125.03 89.34 109.86 119.24 8 124.52 90.20 110.52 119.24 9 123.24 90.21 111.30 119.24 10 122.81 90.75 109.33 119.24 11 121.56 86.76 108.42 119.24 12 121.86 86.74 108.23 119.24 13 121.83 86.74 107.64 119.24 14 121.84 86.72 107.54 115.72 15 121.15 87.50 107.23 115.72 16 121.01 87.51 107.36 115.72 17 121.08 87.86 107.58 115.72 18 121.55 87.86 107.27 115.72 19 121.27 87.86 106.52 115.72 20 120.38 87.81 108.01 115.72 21 118.61 87.81 108.53 115.72 22 118.17 88.67 107.09 115.72 23 117.17 88.35 105.59 115.72 24 115.67 87.62 106.27 115.72 25 115.05 87.59 106.63 115.72 26 114.90 87.58 106.61 116.29 27 114.68 87.51 106.15 116.29 28 114.61 87.40 106.11 116.29 29 114.82 87.48 106.34 116.29 30 114.97 86.08 106.71 116.29 31 114.24 86.79 105.50 116.29 32 112.97 86.58 106.06 116.29 33 111.47 86.60 107.89 116.29 34 111.52 86.71 105.41 116.29 35 110.57 86.98 105.87 116.29 36 110.62 86.62 105.20 116.29 37 109.38 89.60 105.06 116.29 38 110.03 89.56 105.16 111.29 39 110.64 89.66 104.55 111.29 40 109.53 89.67 104.83 111.29 41 109.72 89.69 105.01 111.29 42 108.24 89.69 104.53 111.29 43 108.00 90.28 103.78 111.29 44 107.10 90.09 104.25 111.29 45 107.03 90.09 105.81 111.29 46 105.95 88.53 103.42 111.29 47 106.62 89.73 104.44 111.29 48 108.90 89.47 103.35 111.29 49 112.12 89.60 103.19 111.29 50 114.11 88.90 102.99 109.47 51 114.51 89.60 102.40 109.47 52 116.86 89.22 102.49 109.47 53 116.21 89.61 102.45 109.47 54 114.74 89.60 102.21 109.47 55 112.86 89.60 100.80 109.47 56 112.38 90.13 102.99 109.47 57 110.76 90.10 103.75 109.47 58 110.78 89.98 101.69 109.47 59 110.76 89.97 102.39 109.47 60 111.69 89.96 101.30 109.47 61 109.55 90.14 101.33 109.47 62 108.65 90.03 101.22 107.35 63 108.39 91.22 101.09 107.35 64 109.02 91.63 101.23 107.35 65 108.43 91.98 100.87 107.35 66 108.12 94.09 100.82 107.35 67 107.90 95.02 100.28 107.35 68 107.01 94.78 101.27 107.35 69 105.68 94.69 102.68 107.35 70 105.16 94.67 100.84 107.35 71 106.52 94.79 101.03 107.35 72 106.25 94.51 100.11 107.35 73 106.15 94.49 100.11 107.35 74 107.20 94.29 100.05 104.85 75 109.21 94.96 100.04 104.85 76 109.09 95.02 99.98 104.85 77 108.49 95.08 100.18 104.85 78 108.50 95.23 100.16 104.85 79 108.03 95.35 99.94 104.85 80 106.61 95.46 100.30 104.85 81 106.35 96.15 102.01 104.85 82 106.34 96.84 100.17 104.85 Hotels_caf\303\251s_en_restaurants Diverse_goederen_&_diensten 1 126.75 125.84 2 126.69 125.67 3 128.16 125.24 4 128.17 125.02 5 126.06 124.73 6 125.41 124.70 7 125.37 124.30 8 124.15 124.25 9 124.04 123.95 10 123.31 123.78 11 123.82 121.14 12 123.01 121.01 13 123.25 120.69 14 123.09 120.35 15 124.60 119.91 16 124.94 119.79 17 122.46 119.58 18 121.91 119.50 19 122.29 119.33 20 121.49 119.17 21 120.84 118.94 22 120.33 118.15 23 120.76 117.34 24 120.09 117.19 25 120.39 117.02 26 120.21 116.77 27 121.01 116.46 28 121.40 116.48 29 118.89 116.30 30 119.00 115.61 31 118.82 115.50 32 118.17 115.45 33 118.04 115.13 34 117.34 114.84 35 118.00 114.91 36 117.36 114.83 37 117.66 114.78 38 117.83 114.94 39 118.77 114.74 40 118.84 114.63 41 116.63 114.69 42 116.18 114.49 43 116.46 114.27 44 115.65 114.17 45 115.39 113.73 46 114.54 113.25 47 115.11 112.63 48 114.51 112.62 49 114.66 112.42 50 113.81 112.11 51 115.35 111.94 52 115.07 111.85 53 112.87 110.96 54 111.83 110.87 55 111.44 110.64 56 111.20 110.32 57 110.44 110.02 58 109.57 109.68 59 109.74 109.20 60 108.81 109.10 61 108.81 108.99 62 108.81 108.88 63 110.56 108.94 64 110.69 108.92 65 108.76 108.65 66 108.29 108.58 67 108.20 108.45 68 107.58 107.79 69 107.35 107.16 70 106.42 106.98 71 106.38 105.66 72 106.30 105.61 73 106.32 105.46 74 106.58 105.28 75 107.77 105.09 76 107.63 104.99 77 105.87 104.47 78 105.20 104.36 79 105.25 104.10 80 104.51 103.98 81 104.35 103.87 82 103.75 103.51 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Voedingsmiddelen_en_dranken 0.337765 0.192251 Tabak Kleding_en_schoeisel 0.009930 0.060412 Huisv_wat_elektr_gas_ed `Stoff_huish_app_&_ond_won.` 0.156811 0.073152 Gezondheidsuitgaven Vervoer 0.041061 0.156328 Communicatie Recreatie_en_cultuur 0.035877 0.123698 Onderwijs `Hotels_caf\\303\\251s_en_restaurants` 0.005539 0.069958 `Diverse_goederen_&_diensten` 0.071649 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.0082554 -0.0021369 -0.0003613 0.0025690 0.0068040 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.3377645 0.1982273 1.704 0.0929 Voedingsmiddelen_en_dranken 0.1922506 0.0006818 281.980 <2e-16 Tabak 0.0099300 0.0002985 33.266 <2e-16 Kleding_en_schoeisel 0.0604115 0.0016665 36.250 <2e-16 Huisv_wat_elektr_gas_ed 0.1568111 0.0002653 591.176 <2e-16 `Stoff_huish_app_&_ond_won.` 0.0731521 0.0017076 42.840 <2e-16 Gezondheidsuitgaven 0.0410610 0.0013197 31.114 <2e-16 Vervoer 0.1563276 0.0002465 634.316 <2e-16 Communicatie 0.0358769 0.0005986 59.935 <2e-16 Recreatie_en_cultuur 0.1236984 0.0005921 208.918 <2e-16 Onderwijs 0.0055387 0.0004682 11.831 <2e-16 `Hotels_caf\\303\\251s_en_restaurants` 0.0699584 0.0004772 146.615 <2e-16 `Diverse_goederen_&_diensten` 0.0716489 0.0010810 66.281 <2e-16 (Intercept) . Voedingsmiddelen_en_dranken *** Tabak *** Kleding_en_schoeisel *** Huisv_wat_elektr_gas_ed *** `Stoff_huish_app_&_ond_won.` *** Gezondheidsuitgaven *** Vervoer *** Communicatie *** Recreatie_en_cultuur *** Onderwijs *** `Hotels_caf\\303\\251s_en_restaurants` *** `Diverse_goederen_&_diensten` *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.003397 on 69 degrees of freedom Multiple R-squared: 1, Adjusted R-squared: 1 F-statistic: 1.659e+07 on 12 and 69 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.4172944 0.8345888 0.5827056 [2,] 0.3314260 0.6628520 0.6685740 [3,] 0.7681963 0.4636075 0.2318037 [4,] 0.6843461 0.6313078 0.3156539 [5,] 0.6724935 0.6550129 0.3275065 [6,] 0.5839805 0.8320390 0.4160195 [7,] 0.5726899 0.8546201 0.4273101 [8,] 0.5332934 0.9334131 0.4667066 [9,] 0.6172415 0.7655169 0.3827585 [10,] 0.5475186 0.9049628 0.4524814 [11,] 0.5175566 0.9648867 0.4824434 [12,] 0.5155811 0.9688378 0.4844189 [13,] 0.4297630 0.8595260 0.5702370 [14,] 0.3642101 0.7284201 0.6357899 [15,] 0.4166056 0.8332113 0.5833944 [16,] 0.3616328 0.7232656 0.6383672 [17,] 0.3378065 0.6756129 0.6621935 [18,] 0.3891117 0.7782233 0.6108883 [19,] 0.5445883 0.9108234 0.4554117 [20,] 0.5236908 0.9526183 0.4763092 [21,] 0.5560829 0.8878341 0.4439171 [22,] 0.5059162 0.9881675 0.4940838 [23,] 0.4454672 0.8909344 0.5545328 [24,] 0.3903531 0.7807062 0.6096469 [25,] 0.4586507 0.9173013 0.5413493 [26,] 0.4497181 0.8994361 0.5502819 [27,] 0.4974406 0.9948812 0.5025594 [28,] 0.4825060 0.9650120 0.5174940 [29,] 0.4361057 0.8722115 0.5638943 [30,] 0.4886094 0.9772188 0.5113906 [31,] 0.5229719 0.9540563 0.4770281 [32,] 0.5391505 0.9216990 0.4608495 [33,] 0.4673061 0.9346122 0.5326939 [34,] 0.6282907 0.7434187 0.3717093 [35,] 0.6336156 0.7327688 0.3663844 [36,] 0.5981786 0.8036428 0.4018214 [37,] 0.5200539 0.9598923 0.4799461 [38,] 0.5149630 0.9700740 0.4850370 [39,] 0.4615583 0.9231167 0.5384417 [40,] 0.3865156 0.7730313 0.6134844 [41,] 0.3195201 0.6390402 0.6804799 [42,] 0.5072632 0.9854736 0.4927368 [43,] 0.4318509 0.8637018 0.5681491 [44,] 0.4693710 0.9387421 0.5306290 [45,] 0.4141106 0.8282212 0.5858894 [46,] 0.4237890 0.8475780 0.5762110 [47,] 0.5547369 0.8905262 0.4452631 [48,] 0.5893024 0.8213953 0.4106976 [49,] 0.6834619 0.6330763 0.3165381 [50,] 0.5635203 0.8729593 0.4364797 [51,] 0.6694148 0.6611705 0.3305852 > postscript(file="/var/wessaorg/rcomp/tmp/1vl0j1353250279.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/wessaorg/rcomp/tmp/25hig1353250279.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/wessaorg/rcomp/tmp/31n271353250279.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/wessaorg/rcomp/tmp/4j7l41353250279.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/wessaorg/rcomp/tmp/5aqki1353250279.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 = 82 Frequency = 1 1 2 3 4 5 6.804047e-03 -5.770696e-04 -8.255430e-03 3.339418e-03 -1.956403e-03 6 7 8 9 10 4.401887e-04 3.275742e-03 -5.581210e-04 -1.783938e-03 -1.205971e-03 11 12 13 14 15 -4.506440e-03 -8.260456e-04 1.546013e-03 6.520560e-04 1.984000e-03 16 17 18 19 20 4.114078e-03 2.796945e-03 -3.542866e-03 3.730090e-03 -6.633124e-04 21 22 23 24 25 -1.608531e-03 -3.315646e-03 -4.037978e-03 5.412413e-03 -1.903005e-03 26 27 28 29 30 3.859915e-03 -4.684710e-03 7.227814e-04 2.336530e-03 -4.565996e-03 31 32 33 34 35 3.551692e-03 4.078706e-03 2.114285e-03 -2.522271e-03 9.140409e-04 36 37 38 39 40 -2.151554e-03 -1.114879e-03 -1.751841e-03 2.476321e-03 4.147008e-03 41 42 43 44 45 -2.734062e-03 1.620319e-03 -3.180210e-03 -1.643391e-03 2.599951e-03 46 47 48 49 50 3.763102e-03 -3.090108e-03 -1.711549e-03 -4.338453e-03 2.231805e-03 51 52 53 54 55 -1.985471e-03 -9.434553e-04 1.697182e-03 2.603727e-03 5.200756e-04 56 57 58 59 60 5.228136e-05 -4.068507e-03 1.307109e-03 -2.352900e-03 2.959961e-03 61 62 63 64 65 -2.411955e-03 3.277177e-03 -2.486215e-04 -5.531193e-03 1.673934e-03 66 67 68 69 70 -5.377693e-04 -4.738859e-04 2.916861e-03 -1.768542e-03 -3.362784e-03 71 72 73 74 75 4.584426e-03 1.601597e-03 4.187410e-03 2.927215e-04 2.208188e-03 76 77 78 79 80 -6.988831e-04 -5.256030e-03 -5.769507e-03 -2.598826e-03 -2.093097e-03 81 82 6.143772e-03 3.793340e-03 > postscript(file="/var/wessaorg/rcomp/tmp/6snib1353250279.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 = 82 Frequency = 1 lag(myerror, k = 1) myerror 0 6.804047e-03 NA 1 -5.770696e-04 6.804047e-03 2 -8.255430e-03 -5.770696e-04 3 3.339418e-03 -8.255430e-03 4 -1.956403e-03 3.339418e-03 5 4.401887e-04 -1.956403e-03 6 3.275742e-03 4.401887e-04 7 -5.581210e-04 3.275742e-03 8 -1.783938e-03 -5.581210e-04 9 -1.205971e-03 -1.783938e-03 10 -4.506440e-03 -1.205971e-03 11 -8.260456e-04 -4.506440e-03 12 1.546013e-03 -8.260456e-04 13 6.520560e-04 1.546013e-03 14 1.984000e-03 6.520560e-04 15 4.114078e-03 1.984000e-03 16 2.796945e-03 4.114078e-03 17 -3.542866e-03 2.796945e-03 18 3.730090e-03 -3.542866e-03 19 -6.633124e-04 3.730090e-03 20 -1.608531e-03 -6.633124e-04 21 -3.315646e-03 -1.608531e-03 22 -4.037978e-03 -3.315646e-03 23 5.412413e-03 -4.037978e-03 24 -1.903005e-03 5.412413e-03 25 3.859915e-03 -1.903005e-03 26 -4.684710e-03 3.859915e-03 27 7.227814e-04 -4.684710e-03 28 2.336530e-03 7.227814e-04 29 -4.565996e-03 2.336530e-03 30 3.551692e-03 -4.565996e-03 31 4.078706e-03 3.551692e-03 32 2.114285e-03 4.078706e-03 33 -2.522271e-03 2.114285e-03 34 9.140409e-04 -2.522271e-03 35 -2.151554e-03 9.140409e-04 36 -1.114879e-03 -2.151554e-03 37 -1.751841e-03 -1.114879e-03 38 2.476321e-03 -1.751841e-03 39 4.147008e-03 2.476321e-03 40 -2.734062e-03 4.147008e-03 41 1.620319e-03 -2.734062e-03 42 -3.180210e-03 1.620319e-03 43 -1.643391e-03 -3.180210e-03 44 2.599951e-03 -1.643391e-03 45 3.763102e-03 2.599951e-03 46 -3.090108e-03 3.763102e-03 47 -1.711549e-03 -3.090108e-03 48 -4.338453e-03 -1.711549e-03 49 2.231805e-03 -4.338453e-03 50 -1.985471e-03 2.231805e-03 51 -9.434553e-04 -1.985471e-03 52 1.697182e-03 -9.434553e-04 53 2.603727e-03 1.697182e-03 54 5.200756e-04 2.603727e-03 55 5.228136e-05 5.200756e-04 56 -4.068507e-03 5.228136e-05 57 1.307109e-03 -4.068507e-03 58 -2.352900e-03 1.307109e-03 59 2.959961e-03 -2.352900e-03 60 -2.411955e-03 2.959961e-03 61 3.277177e-03 -2.411955e-03 62 -2.486215e-04 3.277177e-03 63 -5.531193e-03 -2.486215e-04 64 1.673934e-03 -5.531193e-03 65 -5.377693e-04 1.673934e-03 66 -4.738859e-04 -5.377693e-04 67 2.916861e-03 -4.738859e-04 68 -1.768542e-03 2.916861e-03 69 -3.362784e-03 -1.768542e-03 70 4.584426e-03 -3.362784e-03 71 1.601597e-03 4.584426e-03 72 4.187410e-03 1.601597e-03 73 2.927215e-04 4.187410e-03 74 2.208188e-03 2.927215e-04 75 -6.988831e-04 2.208188e-03 76 -5.256030e-03 -6.988831e-04 77 -5.769507e-03 -5.256030e-03 78 -2.598826e-03 -5.769507e-03 79 -2.093097e-03 -2.598826e-03 80 6.143772e-03 -2.093097e-03 81 3.793340e-03 6.143772e-03 82 NA 3.793340e-03 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -5.770696e-04 6.804047e-03 [2,] -8.255430e-03 -5.770696e-04 [3,] 3.339418e-03 -8.255430e-03 [4,] -1.956403e-03 3.339418e-03 [5,] 4.401887e-04 -1.956403e-03 [6,] 3.275742e-03 4.401887e-04 [7,] -5.581210e-04 3.275742e-03 [8,] -1.783938e-03 -5.581210e-04 [9,] -1.205971e-03 -1.783938e-03 [10,] -4.506440e-03 -1.205971e-03 [11,] -8.260456e-04 -4.506440e-03 [12,] 1.546013e-03 -8.260456e-04 [13,] 6.520560e-04 1.546013e-03 [14,] 1.984000e-03 6.520560e-04 [15,] 4.114078e-03 1.984000e-03 [16,] 2.796945e-03 4.114078e-03 [17,] -3.542866e-03 2.796945e-03 [18,] 3.730090e-03 -3.542866e-03 [19,] -6.633124e-04 3.730090e-03 [20,] -1.608531e-03 -6.633124e-04 [21,] -3.315646e-03 -1.608531e-03 [22,] -4.037978e-03 -3.315646e-03 [23,] 5.412413e-03 -4.037978e-03 [24,] -1.903005e-03 5.412413e-03 [25,] 3.859915e-03 -1.903005e-03 [26,] -4.684710e-03 3.859915e-03 [27,] 7.227814e-04 -4.684710e-03 [28,] 2.336530e-03 7.227814e-04 [29,] -4.565996e-03 2.336530e-03 [30,] 3.551692e-03 -4.565996e-03 [31,] 4.078706e-03 3.551692e-03 [32,] 2.114285e-03 4.078706e-03 [33,] -2.522271e-03 2.114285e-03 [34,] 9.140409e-04 -2.522271e-03 [35,] -2.151554e-03 9.140409e-04 [36,] -1.114879e-03 -2.151554e-03 [37,] -1.751841e-03 -1.114879e-03 [38,] 2.476321e-03 -1.751841e-03 [39,] 4.147008e-03 2.476321e-03 [40,] -2.734062e-03 4.147008e-03 [41,] 1.620319e-03 -2.734062e-03 [42,] -3.180210e-03 1.620319e-03 [43,] -1.643391e-03 -3.180210e-03 [44,] 2.599951e-03 -1.643391e-03 [45,] 3.763102e-03 2.599951e-03 [46,] -3.090108e-03 3.763102e-03 [47,] -1.711549e-03 -3.090108e-03 [48,] -4.338453e-03 -1.711549e-03 [49,] 2.231805e-03 -4.338453e-03 [50,] -1.985471e-03 2.231805e-03 [51,] -9.434553e-04 -1.985471e-03 [52,] 1.697182e-03 -9.434553e-04 [53,] 2.603727e-03 1.697182e-03 [54,] 5.200756e-04 2.603727e-03 [55,] 5.228136e-05 5.200756e-04 [56,] -4.068507e-03 5.228136e-05 [57,] 1.307109e-03 -4.068507e-03 [58,] -2.352900e-03 1.307109e-03 [59,] 2.959961e-03 -2.352900e-03 [60,] -2.411955e-03 2.959961e-03 [61,] 3.277177e-03 -2.411955e-03 [62,] -2.486215e-04 3.277177e-03 [63,] -5.531193e-03 -2.486215e-04 [64,] 1.673934e-03 -5.531193e-03 [65,] -5.377693e-04 1.673934e-03 [66,] -4.738859e-04 -5.377693e-04 [67,] 2.916861e-03 -4.738859e-04 [68,] -1.768542e-03 2.916861e-03 [69,] -3.362784e-03 -1.768542e-03 [70,] 4.584426e-03 -3.362784e-03 [71,] 1.601597e-03 4.584426e-03 [72,] 4.187410e-03 1.601597e-03 [73,] 2.927215e-04 4.187410e-03 [74,] 2.208188e-03 2.927215e-04 [75,] -6.988831e-04 2.208188e-03 [76,] -5.256030e-03 -6.988831e-04 [77,] -5.769507e-03 -5.256030e-03 [78,] -2.598826e-03 -5.769507e-03 [79,] -2.093097e-03 -2.598826e-03 [80,] 6.143772e-03 -2.093097e-03 [81,] 3.793340e-03 6.143772e-03 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -5.770696e-04 6.804047e-03 2 -8.255430e-03 -5.770696e-04 3 3.339418e-03 -8.255430e-03 4 -1.956403e-03 3.339418e-03 5 4.401887e-04 -1.956403e-03 6 3.275742e-03 4.401887e-04 7 -5.581210e-04 3.275742e-03 8 -1.783938e-03 -5.581210e-04 9 -1.205971e-03 -1.783938e-03 10 -4.506440e-03 -1.205971e-03 11 -8.260456e-04 -4.506440e-03 12 1.546013e-03 -8.260456e-04 13 6.520560e-04 1.546013e-03 14 1.984000e-03 6.520560e-04 15 4.114078e-03 1.984000e-03 16 2.796945e-03 4.114078e-03 17 -3.542866e-03 2.796945e-03 18 3.730090e-03 -3.542866e-03 19 -6.633124e-04 3.730090e-03 20 -1.608531e-03 -6.633124e-04 21 -3.315646e-03 -1.608531e-03 22 -4.037978e-03 -3.315646e-03 23 5.412413e-03 -4.037978e-03 24 -1.903005e-03 5.412413e-03 25 3.859915e-03 -1.903005e-03 26 -4.684710e-03 3.859915e-03 27 7.227814e-04 -4.684710e-03 28 2.336530e-03 7.227814e-04 29 -4.565996e-03 2.336530e-03 30 3.551692e-03 -4.565996e-03 31 4.078706e-03 3.551692e-03 32 2.114285e-03 4.078706e-03 33 -2.522271e-03 2.114285e-03 34 9.140409e-04 -2.522271e-03 35 -2.151554e-03 9.140409e-04 36 -1.114879e-03 -2.151554e-03 37 -1.751841e-03 -1.114879e-03 38 2.476321e-03 -1.751841e-03 39 4.147008e-03 2.476321e-03 40 -2.734062e-03 4.147008e-03 41 1.620319e-03 -2.734062e-03 42 -3.180210e-03 1.620319e-03 43 -1.643391e-03 -3.180210e-03 44 2.599951e-03 -1.643391e-03 45 3.763102e-03 2.599951e-03 46 -3.090108e-03 3.763102e-03 47 -1.711549e-03 -3.090108e-03 48 -4.338453e-03 -1.711549e-03 49 2.231805e-03 -4.338453e-03 50 -1.985471e-03 2.231805e-03 51 -9.434553e-04 -1.985471e-03 52 1.697182e-03 -9.434553e-04 53 2.603727e-03 1.697182e-03 54 5.200756e-04 2.603727e-03 55 5.228136e-05 5.200756e-04 56 -4.068507e-03 5.228136e-05 57 1.307109e-03 -4.068507e-03 58 -2.352900e-03 1.307109e-03 59 2.959961e-03 -2.352900e-03 60 -2.411955e-03 2.959961e-03 61 3.277177e-03 -2.411955e-03 62 -2.486215e-04 3.277177e-03 63 -5.531193e-03 -2.486215e-04 64 1.673934e-03 -5.531193e-03 65 -5.377693e-04 1.673934e-03 66 -4.738859e-04 -5.377693e-04 67 2.916861e-03 -4.738859e-04 68 -1.768542e-03 2.916861e-03 69 -3.362784e-03 -1.768542e-03 70 4.584426e-03 -3.362784e-03 71 1.601597e-03 4.584426e-03 72 4.187410e-03 1.601597e-03 73 2.927215e-04 4.187410e-03 74 2.208188e-03 2.927215e-04 75 -6.988831e-04 2.208188e-03 76 -5.256030e-03 -6.988831e-04 77 -5.769507e-03 -5.256030e-03 78 -2.598826e-03 -5.769507e-03 79 -2.093097e-03 -2.598826e-03 80 6.143772e-03 -2.093097e-03 81 3.793340e-03 6.143772e-03 > 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/wessaorg/rcomp/tmp/7xcpb1353250279.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/wessaorg/rcomp/tmp/8xtya1353250279.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/wessaorg/rcomp/tmp/9gstb1353250279.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/wessaorg/rcomp/tmp/10dbrv1353250279.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11xsz11353250279.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/wessaorg/rcomp/tmp/12k3ow1353250279.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/wessaorg/rcomp/tmp/13far61353250279.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/wessaorg/rcomp/tmp/14enfb1353250279.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/wessaorg/rcomp/tmp/1598mt1353250279.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/wessaorg/rcomp/tmp/16tyfm1353250279.tab") + } > > try(system("convert tmp/1vl0j1353250279.ps tmp/1vl0j1353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/25hig1353250279.ps tmp/25hig1353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/31n271353250279.ps tmp/31n271353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/4j7l41353250279.ps tmp/4j7l41353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/5aqki1353250279.ps tmp/5aqki1353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/6snib1353250279.ps tmp/6snib1353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/7xcpb1353250279.ps tmp/7xcpb1353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/8xtya1353250279.ps tmp/8xtya1353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/9gstb1353250279.ps tmp/9gstb1353250279.png",intern=TRUE)) character(0) > try(system("convert tmp/10dbrv1353250279.ps tmp/10dbrv1353250279.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.883 0.885 7.794