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(3484.74 + ,13830.14 + ,9349.44 + ,7977 + ,-5.6 + ,6 + ,1 + ,2.77 + ,3411.13 + ,14153.22 + ,9327.78 + ,8241 + ,-6.2 + ,3 + ,1 + ,2.76 + ,3288.18 + ,15418.03 + ,9753.63 + ,8444 + ,-7.1 + ,2 + ,1.2 + ,2.76 + ,3280.37 + ,16666.97 + ,10443.5 + ,8490 + ,-1.4 + ,2 + ,1.2 + ,2.46 + ,3173.95 + ,16505.21 + ,10853.87 + ,8388 + ,-0.1 + ,2 + ,0.8 + ,2.46 + ,3165.26 + ,17135.96 + ,10704.02 + ,8099 + ,-0.9 + ,-8 + ,0.7 + ,2.47 + ,3092.71 + ,18033.25 + ,11052.23 + ,7984 + ,0 + ,0 + ,0.7 + ,2.71 + ,3053.05 + ,17671 + ,10935.47 + ,7786 + ,0.1 + ,-2 + ,0.9 + ,2.8 + ,3181.96 + ,17544.22 + ,10714.03 + ,8086 + ,2.6 + ,3 + ,1.2 + ,2.89 + ,2999.93 + ,17677.9 + ,10394.48 + ,9315 + ,6 + ,5 + ,1.3 + ,3.36 + ,3249.57 + ,18470.97 + ,10817.9 + ,9113 + ,6.4 + ,8 + ,1.5 + ,3.31 + ,3210.52 + ,18409.96 + ,11251.2 + ,9023 + ,8.6 + ,8 + ,1.9 + ,3.5 + ,3030.29 + ,18941.6 + ,11281.26 + ,9026 + ,6.4 + ,9 + ,1.8 + ,3.51 + ,2803.47 + ,19685.53 + ,10539.68 + ,9787 + ,7.7 + ,11 + ,1.9 + ,3.71 + ,2767.63 + ,19834.71 + ,10483.39 + ,9536 + ,9.2 + ,13 + ,2.2 + ,3.71 + ,2882.6 + ,19598.93 + ,10947.43 + ,9490 + ,8.6 + ,12 + ,2.1 + ,3.71 + ,2863.36 + ,17039.97 + ,10580.27 + ,9736 + ,7.4 + ,13 + ,2.2 + ,4.21 + ,2897.06 + ,16969.28 + ,10582.92 + ,9694 + ,8.6 + ,15 + ,2.7 + ,4.21 + ,3012.61 + ,16973.38 + ,10654.41 + ,9647 + ,6.2 + ,13 + ,2.8 + ,4.21 + ,3142.95 + ,16329.89 + ,11014.51 + ,9753 + ,6 + ,16 + ,2.9 + ,4.5 + ,3032.93 + ,16153.34 + ,10967.87 + ,10070 + ,6.6 + ,10 + ,3.4 + ,4.51 + ,3045.78 + ,15311.7 + ,10433.56 + ,10137 + ,5.1 + ,14 + ,3 + ,4.51 + ,3110.52 + ,14760.87 + ,10665.78 + ,9984 + ,4.7 + ,14 + ,3.1 + ,4.51 + ,3013.24 + ,14452.93 + ,10666.71 + ,9732 + ,5 + ,15 + ,2.5 + ,4.32 + ,2987.1 + ,13720.95 + ,10682.74 + ,9103 + ,3.6 + ,13 + ,2.2 + ,4.02 + ,2995.55 + ,13266.27 + ,10777.22 + ,9155 + ,1.9 + ,8 + ,2.3 + ,4.02 + ,2833.18 + ,12708.47 + ,10052.6 + ,9308 + ,-0.1 + ,7 + ,2.1 + ,3.85 + ,2848.96 + ,13411.84 + ,10213.97 + ,9394 + ,-5.7 + ,3 + ,2.8 + ,3.84 + ,2794.83 + ,13975.55 + ,10546.82 + ,9948 + ,-5.6 + ,3 + ,3.1 + ,4.02 + ,2845.26 + ,12974.89 + ,10767.2 + ,10177 + ,-6.4 + ,4 + ,2.9 + ,3.82 + ,2915.02 + ,12151.11 + ,10444.5 + ,10002 + ,-7.7 + ,4 + ,2.6 + ,3.75 + ,2892.63 + ,11576.21 + ,10314.68 + ,9728 + ,-8 + ,0 + ,2.7 + ,3.74 + ,2604.42 + ,9996.83 + ,9042.56 + ,10002 + ,-11.9 + ,-4 + ,2.3 + ,3.14 + ,2641.65 + ,10438.9 + ,9220.75 + ,10063 + ,-15.4 + ,-14 + ,2.3 + ,2.91 + ,2659.81 + ,10511.22 + ,9721.84 + ,10018 + ,-15.5 + ,-18 + ,2.1 + ,2.84 + ,2638.53 + ,10496.2 + ,9978.53 + ,9960 + ,-13.4 + ,-8 + ,2.2 + ,2.85 + ,2720.25 + ,10300.79 + ,9923.81 + ,10236 + ,-10.9 + ,-1 + ,2.9 + ,2.85 + ,2745.88 + ,9981.65 + ,9892.56 + ,10893 + ,-10.8 + ,1 + ,2.6 + ,3.08 + ,2735.7 + ,11448.79 + ,10500.98 + ,10756 + ,-7.3 + ,2 + ,2.7 + ,3.3 + ,2811.7 + ,11384.49 + ,10179.35 + ,10940 + ,-6.5 + ,0 + ,1.8 + ,3.29 + ,2799.43 + ,11717.46 + ,10080.48 + ,10997 + ,-5.1 + ,1 + ,1.3 + ,3.26 + ,2555.28 + ,10965.88 + ,9492.44 + ,10827 + ,-5.3 + ,0 + ,0.9 + ,3.26 + ,2304.98 + ,10352.27 + ,8616.49 + ,10166 + ,-6.8 + ,-1 + ,1.3 + ,3.11 + ,2214.95 + ,9751.2 + ,8685.4 + ,10186 + ,-8.4 + ,-3 + ,1.3 + ,2.84 + ,2065.81 + ,9354.01 + ,8160.67 + ,10457 + ,-8.4 + ,-3 + ,1.3 + ,2.71 + ,1940.49 + ,8792.5 + ,8048.1 + ,10368 + ,-9.7 + ,-3 + ,1.3 + ,2.69 + ,2042 + ,8721.14 + ,8641.21 + ,10244 + ,-8.8 + ,-4 + ,1.1 + ,2.65 + ,1995.37 + ,8692.94 + ,8526.63 + ,10511 + ,-9.6 + ,-8 + ,1.4 + ,2.57 + ,1946.81 + ,8570.73 + ,8474.21 + ,10812 + ,-11.5 + ,-9 + ,1.2 + ,2.32 + ,1765.9 + ,8538.47 + ,7916.13 + ,10738 + ,-11 + ,-13 + ,1.7 + ,2.12 + ,1635.25 + ,8169.75 + ,7977.64 + ,10171 + ,-14.9 + ,-18 + ,1.8 + ,2.05 + ,1833.42 + ,7905.84 + ,8334.59 + ,9721 + ,-16.2 + ,-11 + ,1.5 + ,2.05 + ,1910.43 + ,8145.82 + ,8623.36 + ,9897 + ,-14.4 + ,-9 + ,1 + ,1.81 + ,1959.67 + ,8895.71 + ,9098.03 + ,9828 + ,-17.3 + ,-10 + ,1.6 + ,1.58 + ,1969.6 + ,9676.31 + ,9154.34 + ,9924 + ,-15.7 + ,-13 + ,1.5 + ,1.57 + ,2061.41 + ,9884.59 + ,9284.73 + ,10371 + ,-12.6 + ,-11 + ,1.8 + ,1.76 + ,2093.48 + ,10637.44 + ,9492.49 + ,10846 + ,-9.4 + ,-5 + ,1.8 + ,1.76 + ,2120.88 + ,10717.13 + ,9682.35 + ,10413 + ,-8.1 + ,-15 + ,1.6 + ,1.89 + ,2174.56 + ,10205.29 + ,9762.12 + ,10709 + ,-5.4 + ,-6 + ,1.9 + ,1.9 + ,2196.72 + ,10295.98 + ,10124.63 + ,10662 + ,-4.6 + ,-6 + ,1.7 + ,1.9 + ,2350.44 + ,10892.76 + ,10540.05 + ,10570 + ,-4.9 + ,-3 + ,1.6 + ,1.92 + ,2440.25 + ,10631.92 + ,10601.61 + ,10297 + ,-4 + ,-1 + ,1.3 + ,1.76 + ,2408.64 + ,11441.08 + ,10323.73 + ,10635 + ,-3.1 + ,-3 + ,1.1 + ,1.64 + ,2472.81 + ,11950.95 + ,10418.4 + ,10872 + ,-1.3 + ,-4 + ,1.9 + ,1.57 + ,2407.6 + ,11037.54 + ,10092.96 + ,10296 + ,0 + ,-6 + ,2.6 + ,1.69 + ,2454.62 + ,11527.72 + ,10364.91 + ,10383 + ,-0.4 + ,0 + ,2.3 + ,1.76 + ,2448.05 + ,11383.89 + ,10152.09 + ,10431 + ,3 + ,-4 + ,2.4 + ,1.89 + ,2497.84 + ,10989.34 + ,10032.8 + ,10574 + ,0.4 + ,-2 + ,2.2 + ,1.78 + ,2645.64 + ,11079.42 + ,10204.59 + ,10653 + ,1.2 + ,-2 + ,2 + ,1.88 + ,2756.76 + ,11028.93 + ,10001.6 + ,10805 + ,0.6 + ,-6 + ,2.9 + ,1.86 + ,2849.27 + ,10973 + ,10411.75 + ,10872 + ,-1.3 + ,-7 + ,2.6 + ,1.88 + ,2921.44 + ,11068.05 + ,10673.38 + ,10625 + ,-3.2 + ,-6 + ,2.3 + ,1.87 + ,2981.85 + ,11394.84 + ,10539.51 + ,10407 + ,-1.8 + ,-6 + ,2.3 + ,1.86 + ,3080.58 + ,11545.71 + ,10723.78 + ,10463 + ,-3.6 + ,-3 + ,2.6 + ,1.89 + ,3106.22 + ,11809.38 + ,10682.06 + ,10556 + ,-4.2 + ,-2 + ,3.1 + ,1.9 + ,3119.31 + ,11395.64 + ,10283.19 + ,10646 + ,-6.9 + ,-5 + ,2.8 + ,1.89 + ,3061.26 + ,11082.38 + ,10377.18 + ,10702 + ,-8 + ,-11 + ,2.5 + ,1.85 + ,3097.31 + ,11402.75 + ,10486.64 + ,11353 + ,-7.5 + ,-11 + ,2.9 + ,1.78 + ,3161.69 + ,11716.87 + ,10545.38 + ,11346 + ,-8.2 + ,-11 + ,3.1 + ,1.71 + ,3257.16 + ,12204.98 + ,10554.27 + ,11451 + ,-7.6 + ,-10 + ,3.1 + ,1.69 + ,3277.01 + ,12986.62 + ,10532.54 + ,11964 + ,-3.7 + ,-14 + ,3.2 + ,1.72 + ,3295.32 + ,13392.79 + ,10324.31 + ,12574 + ,-1.7 + ,-8 + ,2.5 + ,1.77 + ,3363.99 + ,14368.05 + ,10695.25 + ,13031 + ,-0.7 + ,-9 + ,2.6 + ,1.98 + ,3494.17 + ,15650.83 + ,10827.81 + ,13812 + ,0.2 + ,-5 + ,2.9 + ,2.2 + ,3667.03 + ,16102.64 + ,10872.48 + ,14544 + ,0.6 + ,-1 + ,2.6 + ,2.25 + ,3813.06 + ,16187.64 + ,10971.19 + ,14931 + ,2.2 + ,-2 + ,2.4 + ,2.24 + ,3917.96 + ,16311.54 + ,11145.65 + ,14886 + ,3.3 + ,-5 + ,1.7 + ,2.51 + ,3895.51 + ,17232.97 + ,11234.68 + ,16005 + ,5.3 + ,-4 + ,2 + ,2.79 + ,3801.06 + ,16397.83 + ,11333.88 + ,17064 + ,5.5 + ,-6 + ,2.2 + ,3.07 + ,3570.12 + ,14990.31 + ,10997.97 + ,15168 + ,6.3 + ,-2 + ,1.9 + ,3.08 + ,3701.61 + ,15147.55 + ,11036.89 + ,16050 + ,7.7 + ,-2 + ,1.6 + ,3.05 + ,3862.27 + ,15786.78 + ,11257.35 + ,15839 + ,6.5 + ,-2 + ,1.6 + ,3.08 + ,3970.1 + ,15934.09 + ,11533.59 + ,15137 + ,5.5 + ,-2 + ,1.2 + ,3.15 + ,4138.52 + ,16519.44 + ,11963.12 + ,14954 + ,6.9 + ,2 + ,1.2 + ,3.16 + ,4199.75 + ,16101.07 + ,12185.15 + ,15648 + ,5.7 + ,1 + ,1.5 + ,3.16 + ,4290.89 + ,16775.08 + ,12377.62 + ,15305 + ,6.9 + ,-8 + ,1.6 + ,3.19 + ,4443.91 + ,17286.32 + ,12512.89 + ,15579 + ,6.1 + ,-1 + ,1.7 + ,3.44 + ,4502.64 + ,17741.23 + ,12631.48 + ,16348 + ,4.8 + ,1 + ,1.8 + ,3.55 + ,4356.98 + ,17128.37 + ,12268.53 + ,15928 + ,3.7 + ,-1 + ,1.8 + ,3.6 + ,4591.27 + ,17460.53 + ,12754.8 + ,16171 + ,5.8 + ,2 + ,1.8 + ,3.62 + ,4696.96 + ,17611.14 + ,13407.75 + ,15937 + ,6.8 + ,2 + ,1.3 + ,3.69 + ,4621.4 + ,18001.37 + ,13480.21 + ,15713 + ,8.5 + ,1 + ,1.3 + ,3.99 + ,4562.84 + ,17974.77 + ,13673.28 + ,15594 + ,7.2 + ,-1 + ,1.4 + ,4.06 + ,4202.52 + ,16460.95 + ,13239.71 + ,15683 + ,5 + ,-2 + ,1.1 + ,4.05 + ,4296.49 + ,16235.39 + ,13557.69 + ,16438 + ,4.7 + ,-2 + ,1.5 + ,4.01 + ,4435.23 + ,16903.36 + ,13901.28 + ,17032 + ,2.3 + ,-1 + ,2.2 + ,3.98 + ,4105.18 + ,15543.76 + ,13200.58 + ,17696 + ,2.4 + ,-8 + ,2.9 + ,3.94 + ,4116.68 + ,15532.18 + ,13406.97 + ,17745 + ,0.1 + ,-4 + ,3.1 + ,3.92 + ,3844.49 + ,13731.31 + ,12538.12 + ,19394 + ,1.9 + ,-6 + ,3.5 + ,4.1 + ,3720.98 + ,13547.84 + ,12419.57 + ,20148 + ,1.7 + ,-3 + ,3.6 + ,3.88 + ,3674.4 + ,12602.93 + ,12193.88 + ,20108 + ,2 + ,-3 + ,4.4 + ,3.74 + ,3857.62 + ,13357.7 + ,12656.63 + ,18584 + ,-1.9 + ,-7 + ,4.2 + ,3.97 + ,3801.06 + ,13995.33 + ,12812.48 + ,18441 + ,0.5 + ,-9 + ,5.2 + ,4.26 + ,3504.37 + ,14084.6 + ,12056.67 + ,18391 + ,-1.3 + ,-11 + ,5.8 + ,4.63 + ,3032.6 + ,13168.91 + ,11322.38 + ,19178 + ,-3.3 + ,-13 + ,5.9 + ,4.82 + ,3047.03 + ,12989.35 + ,11530.75 + ,18079 + ,-2.8 + ,-11 + ,5.4 + ,4.94 + ,2962.34 + ,12123.53 + ,11114.08 + ,18483 + ,-8 + ,-9 + ,5.5 + ,4.98 + ,2197.82 + ,9117.03 + ,9181.73 + ,19644 + ,-13.9 + ,-17 + ,4.7 + ,5.02 + ,2014.45 + ,8531.45 + ,8614.55 + ,19195 + ,-21.9 + ,-22 + ,3.1 + ,4.96 + ,1862.83 + ,8460.94 + ,8595.56 + ,19650 + ,-28.8 + ,-25 + ,2.6 + ,4.49 + ,1905.41 + ,8331.49 + ,8396.2 + ,20830 + ,-27.6 + ,-20 + ,2.3 + ,3.5 + ,1810.99 + ,7694.78 + ,7690.5 + ,23595 + ,-31.4 + ,-24 + ,1.9 + ,2.95 + ,1670.07 + ,7764.58 + ,7235.47 + ,22937 + ,-31.8 + ,-24 + ,0.6 + ,2.37 + ,1864.44 + ,8767.96 + ,7992.12 + ,21814 + ,-29.4 + ,-22 + ,0.6 + ,2.16 + ,2052.02 + ,9304.43 + ,8398.37 + ,21928 + ,-27.6 + ,-19 + ,-0.4 + ,2.08 + ,2029.6 + ,9810.31 + ,8593 + ,21777 + ,-23.6 + ,-18 + ,-1.1 + ,1.98 + ,2070.83 + ,9691.12 + ,8679.75 + ,21383 + ,-22.8 + ,-17 + ,-1.7 + ,1.98 + ,2293.41 + ,10430.35 + ,9374.63 + ,21467 + ,-18.2 + ,-11 + ,-0.8 + ,1.85 + ,2443.27 + ,10302.87 + ,9634.97 + ,22052 + ,-17.8 + ,-11 + ,-1.2 + ,1.82 + ,2513.17 + ,10066.24 + ,9857.34 + ,22680 + ,-14.2 + ,-12 + ,-1 + ,1.65 + ,2466.92 + ,9633.83 + ,10238.83 + ,24320 + ,-8.8 + ,-10 + ,-0.1 + ,1.59 + ,2502.66 + ,10169.02 + ,10433.44 + ,24977 + ,-7.9 + ,-15 + ,0.3 + ,1.56) + ,dim=c(8 + ,132) + ,dimnames=list(c('BEL_20' + ,'Nikkei' + ,'DJ_Indust' + ,'Goudprijs' + ,'Conjunct_Seizoenzuiver' + ,'Cons_vertrouw' + ,'Alg_consumptie_index_BE' + ,'Gem_rente_kasbon_1j') + ,1:132)) > y <- array(NA,dim=c(8,132),dimnames=list(c('BEL_20','Nikkei','DJ_Indust','Goudprijs','Conjunct_Seizoenzuiver','Cons_vertrouw','Alg_consumptie_index_BE','Gem_rente_kasbon_1j'),1:132)) > 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' > #'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 BEL_20 Nikkei DJ_Indust Goudprijs Conjunct_Seizoenzuiver Cons_vertrouw 1 3484.74 13830.14 9349.44 7977 -5.6 6 2 3411.13 14153.22 9327.78 8241 -6.2 3 3 3288.18 15418.03 9753.63 8444 -7.1 2 4 3280.37 16666.97 10443.50 8490 -1.4 2 5 3173.95 16505.21 10853.87 8388 -0.1 2 6 3165.26 17135.96 10704.02 8099 -0.9 -8 7 3092.71 18033.25 11052.23 7984 0.0 0 8 3053.05 17671.00 10935.47 7786 0.1 -2 9 3181.96 17544.22 10714.03 8086 2.6 3 10 2999.93 17677.90 10394.48 9315 6.0 5 11 3249.57 18470.97 10817.90 9113 6.4 8 12 3210.52 18409.96 11251.20 9023 8.6 8 13 3030.29 18941.60 11281.26 9026 6.4 9 14 2803.47 19685.53 10539.68 9787 7.7 11 15 2767.63 19834.71 10483.39 9536 9.2 13 16 2882.60 19598.93 10947.43 9490 8.6 12 17 2863.36 17039.97 10580.27 9736 7.4 13 18 2897.06 16969.28 10582.92 9694 8.6 15 19 3012.61 16973.38 10654.41 9647 6.2 13 20 3142.95 16329.89 11014.51 9753 6.0 16 21 3032.93 16153.34 10967.87 10070 6.6 10 22 3045.78 15311.70 10433.56 10137 5.1 14 23 3110.52 14760.87 10665.78 9984 4.7 14 24 3013.24 14452.93 10666.71 9732 5.0 15 25 2987.10 13720.95 10682.74 9103 3.6 13 26 2995.55 13266.27 10777.22 9155 1.9 8 27 2833.18 12708.47 10052.60 9308 -0.1 7 28 2848.96 13411.84 10213.97 9394 -5.7 3 29 2794.83 13975.55 10546.82 9948 -5.6 3 30 2845.26 12974.89 10767.20 10177 -6.4 4 31 2915.02 12151.11 10444.50 10002 -7.7 4 32 2892.63 11576.21 10314.68 9728 -8.0 0 33 2604.42 9996.83 9042.56 10002 -11.9 -4 34 2641.65 10438.90 9220.75 10063 -15.4 -14 35 2659.81 10511.22 9721.84 10018 -15.5 -18 36 2638.53 10496.20 9978.53 9960 -13.4 -8 37 2720.25 10300.79 9923.81 10236 -10.9 -1 38 2745.88 9981.65 9892.56 10893 -10.8 1 39 2735.70 11448.79 10500.98 10756 -7.3 2 40 2811.70 11384.49 10179.35 10940 -6.5 0 41 2799.43 11717.46 10080.48 10997 -5.1 1 42 2555.28 10965.88 9492.44 10827 -5.3 0 43 2304.98 10352.27 8616.49 10166 -6.8 -1 44 2214.95 9751.20 8685.40 10186 -8.4 -3 45 2065.81 9354.01 8160.67 10457 -8.4 -3 46 1940.49 8792.50 8048.10 10368 -9.7 -3 47 2042.00 8721.14 8641.21 10244 -8.8 -4 48 1995.37 8692.94 8526.63 10511 -9.6 -8 49 1946.81 8570.73 8474.21 10812 -11.5 -9 50 1765.90 8538.47 7916.13 10738 -11.0 -13 51 1635.25 8169.75 7977.64 10171 -14.9 -18 52 1833.42 7905.84 8334.59 9721 -16.2 -11 53 1910.43 8145.82 8623.36 9897 -14.4 -9 54 1959.67 8895.71 9098.03 9828 -17.3 -10 55 1969.60 9676.31 9154.34 9924 -15.7 -13 56 2061.41 9884.59 9284.73 10371 -12.6 -11 57 2093.48 10637.44 9492.49 10846 -9.4 -5 58 2120.88 10717.13 9682.35 10413 -8.1 -15 59 2174.56 10205.29 9762.12 10709 -5.4 -6 60 2196.72 10295.98 10124.63 10662 -4.6 -6 61 2350.44 10892.76 10540.05 10570 -4.9 -3 62 2440.25 10631.92 10601.61 10297 -4.0 -1 63 2408.64 11441.08 10323.73 10635 -3.1 -3 64 2472.81 11950.95 10418.40 10872 -1.3 -4 65 2407.60 11037.54 10092.96 10296 0.0 -6 66 2454.62 11527.72 10364.91 10383 -0.4 0 67 2448.05 11383.89 10152.09 10431 3.0 -4 68 2497.84 10989.34 10032.80 10574 0.4 -2 69 2645.64 11079.42 10204.59 10653 1.2 -2 70 2756.76 11028.93 10001.60 10805 0.6 -6 71 2849.27 10973.00 10411.75 10872 -1.3 -7 72 2921.44 11068.05 10673.38 10625 -3.2 -6 73 2981.85 11394.84 10539.51 10407 -1.8 -6 74 3080.58 11545.71 10723.78 10463 -3.6 -3 75 3106.22 11809.38 10682.06 10556 -4.2 -2 76 3119.31 11395.64 10283.19 10646 -6.9 -5 77 3061.26 11082.38 10377.18 10702 -8.0 -11 78 3097.31 11402.75 10486.64 11353 -7.5 -11 79 3161.69 11716.87 10545.38 11346 -8.2 -11 80 3257.16 12204.98 10554.27 11451 -7.6 -10 81 3277.01 12986.62 10532.54 11964 -3.7 -14 82 3295.32 13392.79 10324.31 12574 -1.7 -8 83 3363.99 14368.05 10695.25 13031 -0.7 -9 84 3494.17 15650.83 10827.81 13812 0.2 -5 85 3667.03 16102.64 10872.48 14544 0.6 -1 86 3813.06 16187.64 10971.19 14931 2.2 -2 87 3917.96 16311.54 11145.65 14886 3.3 -5 88 3895.51 17232.97 11234.68 16005 5.3 -4 89 3801.06 16397.83 11333.88 17064 5.5 -6 90 3570.12 14990.31 10997.97 15168 6.3 -2 91 3701.61 15147.55 11036.89 16050 7.7 -2 92 3862.27 15786.78 11257.35 15839 6.5 -2 93 3970.10 15934.09 11533.59 15137 5.5 -2 94 4138.52 16519.44 11963.12 14954 6.9 2 95 4199.75 16101.07 12185.15 15648 5.7 1 96 4290.89 16775.08 12377.62 15305 6.9 -8 97 4443.91 17286.32 12512.89 15579 6.1 -1 98 4502.64 17741.23 12631.48 16348 4.8 1 99 4356.98 17128.37 12268.53 15928 3.7 -1 100 4591.27 17460.53 12754.80 16171 5.8 2 101 4696.96 17611.14 13407.75 15937 6.8 2 102 4621.40 18001.37 13480.21 15713 8.5 1 103 4562.84 17974.77 13673.28 15594 7.2 -1 104 4202.52 16460.95 13239.71 15683 5.0 -2 105 4296.49 16235.39 13557.69 16438 4.7 -2 106 4435.23 16903.36 13901.28 17032 2.3 -1 107 4105.18 15543.76 13200.58 17696 2.4 -8 108 4116.68 15532.18 13406.97 17745 0.1 -4 109 3844.49 13731.31 12538.12 19394 1.9 -6 110 3720.98 13547.84 12419.57 20148 1.7 -3 111 3674.40 12602.93 12193.88 20108 2.0 -3 112 3857.62 13357.70 12656.63 18584 -1.9 -7 113 3801.06 13995.33 12812.48 18441 0.5 -9 114 3504.37 14084.60 12056.67 18391 -1.3 -11 115 3032.60 13168.91 11322.38 19178 -3.3 -13 116 3047.03 12989.35 11530.75 18079 -2.8 -11 117 2962.34 12123.53 11114.08 18483 -8.0 -9 118 2197.82 9117.03 9181.73 19644 -13.9 -17 119 2014.45 8531.45 8614.55 19195 -21.9 -22 120 1862.83 8460.94 8595.56 19650 -28.8 -25 121 1905.41 8331.49 8396.20 20830 -27.6 -20 122 1810.99 7694.78 7690.50 23595 -31.4 -24 123 1670.07 7764.58 7235.47 22937 -31.8 -24 124 1864.44 8767.96 7992.12 21814 -29.4 -22 125 2052.02 9304.43 8398.37 21928 -27.6 -19 126 2029.60 9810.31 8593.00 21777 -23.6 -18 127 2070.83 9691.12 8679.75 21383 -22.8 -17 128 2293.41 10430.35 9374.63 21467 -18.2 -11 129 2443.27 10302.87 9634.97 22052 -17.8 -11 130 2513.17 10066.24 9857.34 22680 -14.2 -12 131 2466.92 9633.83 10238.83 24320 -8.8 -10 132 2502.66 10169.02 10433.44 24977 -7.9 -15 Alg_consumptie_index_BE Gem_rente_kasbon_1j 1 1.0 2.77 2 1.0 2.76 3 1.2 2.76 4 1.2 2.46 5 0.8 2.46 6 0.7 2.47 7 0.7 2.71 8 0.9 2.80 9 1.2 2.89 10 1.3 3.36 11 1.5 3.31 12 1.9 3.50 13 1.8 3.51 14 1.9 3.71 15 2.2 3.71 16 2.1 3.71 17 2.2 4.21 18 2.7 4.21 19 2.8 4.21 20 2.9 4.50 21 3.4 4.51 22 3.0 4.51 23 3.1 4.51 24 2.5 4.32 25 2.2 4.02 26 2.3 4.02 27 2.1 3.85 28 2.8 3.84 29 3.1 4.02 30 2.9 3.82 31 2.6 3.75 32 2.7 3.74 33 2.3 3.14 34 2.3 2.91 35 2.1 2.84 36 2.2 2.85 37 2.9 2.85 38 2.6 3.08 39 2.7 3.30 40 1.8 3.29 41 1.3 3.26 42 0.9 3.26 43 1.3 3.11 44 1.3 2.84 45 1.3 2.71 46 1.3 2.69 47 1.1 2.65 48 1.4 2.57 49 1.2 2.32 50 1.7 2.12 51 1.8 2.05 52 1.5 2.05 53 1.0 1.81 54 1.6 1.58 55 1.5 1.57 56 1.8 1.76 57 1.8 1.76 58 1.6 1.89 59 1.9 1.90 60 1.7 1.90 61 1.6 1.92 62 1.3 1.76 63 1.1 1.64 64 1.9 1.57 65 2.6 1.69 66 2.3 1.76 67 2.4 1.89 68 2.2 1.78 69 2.0 1.88 70 2.9 1.86 71 2.6 1.88 72 2.3 1.87 73 2.3 1.86 74 2.6 1.89 75 3.1 1.90 76 2.8 1.89 77 2.5 1.85 78 2.9 1.78 79 3.1 1.71 80 3.1 1.69 81 3.2 1.72 82 2.5 1.77 83 2.6 1.98 84 2.9 2.20 85 2.6 2.25 86 2.4 2.24 87 1.7 2.51 88 2.0 2.79 89 2.2 3.07 90 1.9 3.08 91 1.6 3.05 92 1.6 3.08 93 1.2 3.15 94 1.2 3.16 95 1.5 3.16 96 1.6 3.19 97 1.7 3.44 98 1.8 3.55 99 1.8 3.60 100 1.8 3.62 101 1.3 3.69 102 1.3 3.99 103 1.4 4.06 104 1.1 4.05 105 1.5 4.01 106 2.2 3.98 107 2.9 3.94 108 3.1 3.92 109 3.5 4.10 110 3.6 3.88 111 4.4 3.74 112 4.2 3.97 113 5.2 4.26 114 5.8 4.63 115 5.9 4.82 116 5.4 4.94 117 5.5 4.98 118 4.7 5.02 119 3.1 4.96 120 2.6 4.49 121 2.3 3.50 122 1.9 2.95 123 0.6 2.37 124 0.6 2.16 125 -0.4 2.08 126 -1.1 1.98 127 -1.7 1.98 128 -0.8 1.85 129 -1.2 1.82 130 -1.0 1.65 131 -0.1 1.59 132 0.3 1.56 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Nikkei DJ_Indust -2.047e+03 7.233e-02 3.863e-01 Goudprijs Conjunct_Seizoenzuiver Cons_vertrouw 5.862e-03 1.073e+00 -7.032e+00 Alg_consumptie_index_BE Gem_rente_kasbon_1j -1.461e+01 -1.294e+01 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -618.69 -177.60 5.93 200.52 971.70 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -2.047e+03 3.601e+02 -5.685 8.88e-08 *** Nikkei 7.233e-02 1.700e-02 4.253 4.11e-05 *** DJ_Indust 3.863e-01 3.828e-02 10.093 < 2e-16 *** Goudprijs 5.862e-03 9.282e-03 0.632 0.529 Conjunct_Seizoenzuiver 1.073e+00 7.624e+00 0.141 0.888 Cons_vertrouw -7.032e+00 6.498e+00 -1.082 0.281 Alg_consumptie_index_BE -1.461e+01 2.985e+01 -0.489 0.625 Gem_rente_kasbon_1j -1.294e+01 4.303e+01 -0.301 0.764 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 290.1 on 124 degrees of freedom Multiple R-squared: 0.8595, Adjusted R-squared: 0.8515 F-statistic: 108.3 on 7 and 124 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.087509304 1.750186e-01 9.124907e-01 [2,] 0.033576034 6.715207e-02 9.664240e-01 [3,] 0.016102700 3.220540e-02 9.838973e-01 [4,] 0.015219058 3.043812e-02 9.847809e-01 [5,] 0.014718642 2.943728e-02 9.852814e-01 [6,] 0.010886395 2.177279e-02 9.891136e-01 [7,] 0.028398782 5.679756e-02 9.716012e-01 [8,] 0.028080836 5.616167e-02 9.719192e-01 [9,] 0.020050434 4.010087e-02 9.799496e-01 [10,] 0.016985284 3.397057e-02 9.830147e-01 [11,] 0.012607100 2.521420e-02 9.873929e-01 [12,] 0.007376989 1.475398e-02 9.926230e-01 [13,] 0.004118515 8.237030e-03 9.958815e-01 [14,] 0.004956140 9.912279e-03 9.950439e-01 [15,] 0.010636893 2.127379e-02 9.893631e-01 [16,] 0.011278016 2.255603e-02 9.887220e-01 [17,] 0.030410125 6.082025e-02 9.695899e-01 [18,] 0.064868721 1.297374e-01 9.351313e-01 [19,] 0.078376598 1.567532e-01 9.216234e-01 [20,] 0.073003716 1.460074e-01 9.269963e-01 [21,] 0.053287596 1.065752e-01 9.467124e-01 [22,] 0.037140974 7.428195e-02 9.628590e-01 [23,] 0.061231168 1.224623e-01 9.387688e-01 [24,] 0.049961194 9.992239e-02 9.500388e-01 [25,] 0.043221804 8.644361e-02 9.567782e-01 [26,] 0.038562619 7.712524e-02 9.614374e-01 [27,] 0.031630221 6.326044e-02 9.683698e-01 [28,] 0.028426449 5.685290e-02 9.715736e-01 [29,] 0.020646627 4.129325e-02 9.793534e-01 [30,] 0.019242953 3.848591e-02 9.807570e-01 [31,] 0.013643864 2.728773e-02 9.863561e-01 [32,] 0.013877954 2.775591e-02 9.861220e-01 [33,] 0.047385531 9.477106e-02 9.526145e-01 [34,] 0.093668040 1.873361e-01 9.063320e-01 [35,] 0.117210975 2.344220e-01 8.827890e-01 [36,] 0.173169281 3.463386e-01 8.268307e-01 [37,] 0.208701135 4.174023e-01 7.912989e-01 [38,] 0.192991055 3.859821e-01 8.070089e-01 [39,] 0.178885770 3.577715e-01 8.211142e-01 [40,] 0.152984206 3.059684e-01 8.470158e-01 [41,] 0.150801804 3.016036e-01 8.491982e-01 [42,] 0.272337182 5.446744e-01 7.276628e-01 [43,] 0.349649548 6.992991e-01 6.503505e-01 [44,] 0.409701101 8.194022e-01 5.902989e-01 [45,] 0.407462717 8.149254e-01 5.925373e-01 [46,] 0.376273291 7.525466e-01 6.237267e-01 [47,] 0.398009950 7.960199e-01 6.019901e-01 [48,] 0.462217417 9.244348e-01 5.377826e-01 [49,] 0.486591096 9.731822e-01 5.134089e-01 [50,] 0.501008723 9.979826e-01 4.989913e-01 [51,] 0.546449993 9.071000e-01 4.535500e-01 [52,] 0.546215729 9.075685e-01 4.537843e-01 [53,] 0.647870402 7.042592e-01 3.521296e-01 [54,] 0.868235524 2.635290e-01 1.317645e-01 [55,] 0.937231687 1.255366e-01 6.276831e-02 [56,] 0.980454475 3.909105e-02 1.954552e-02 [57,] 0.995137090 9.725820e-03 4.862910e-03 [58,] 0.998453539 3.092922e-03 1.546461e-03 [59,] 0.999524550 9.508997e-04 4.754499e-04 [60,] 0.999872620 2.547596e-04 1.273798e-04 [61,] 0.999942475 1.150494e-04 5.752469e-05 [62,] 0.999963007 7.398659e-05 3.699330e-05 [63,] 0.999975854 4.829226e-05 2.414613e-05 [64,] 0.999983285 3.343039e-05 1.671520e-05 [65,] 0.999989960 2.007947e-05 1.003973e-05 [66,] 0.999992910 1.417922e-05 7.089608e-06 [67,] 0.999994429 1.114283e-05 5.571416e-06 [68,] 0.999995890 8.220014e-06 4.110007e-06 [69,] 0.999996080 7.840564e-06 3.920282e-06 [70,] 0.999996822 6.355004e-06 3.177502e-06 [71,] 0.999998224 3.551981e-06 1.775990e-06 [72,] 0.999999105 1.790560e-06 8.952802e-07 [73,] 0.999998828 2.343766e-06 1.171883e-06 [74,] 0.999998757 2.485045e-06 1.242523e-06 [75,] 0.999998958 2.084067e-06 1.042034e-06 [76,] 0.999998630 2.740407e-06 1.370203e-06 [77,] 0.999997953 4.094784e-06 2.047392e-06 [78,] 0.999997368 5.264587e-06 2.632293e-06 [79,] 0.999995485 9.029009e-06 4.514504e-06 [80,] 0.999994503 1.099373e-05 5.496866e-06 [81,] 0.999989818 2.036403e-05 1.018201e-05 [82,] 0.999980982 3.803562e-05 1.901781e-05 [83,] 0.999964670 7.066042e-05 3.533021e-05 [84,] 0.999946466 1.070688e-04 5.353441e-05 [85,] 0.999895311 2.093770e-04 1.046885e-04 [86,] 0.999852332 2.953367e-04 1.476683e-04 [87,] 0.999772067 4.558667e-04 2.279334e-04 [88,] 0.999574978 8.500446e-04 4.250223e-04 [89,] 0.999391906 1.216188e-03 6.080940e-04 [90,] 0.999534500 9.310003e-04 4.655002e-04 [91,] 0.999682267 6.354667e-04 3.177333e-04 [92,] 0.999706163 5.876738e-04 2.938369e-04 [93,] 0.999641695 7.166102e-04 3.583051e-04 [94,] 0.999472738 1.054524e-03 5.272621e-04 [95,] 0.999251375 1.497250e-03 7.486251e-04 [96,] 0.998779200 2.441601e-03 1.220800e-03 [97,] 0.998707080 2.585840e-03 1.292920e-03 [98,] 0.997968901 4.062198e-03 2.031099e-03 [99,] 0.998890846 2.218309e-03 1.109154e-03 [100,] 0.998995504 2.008991e-03 1.004496e-03 [101,] 0.999372528 1.254944e-03 6.274720e-04 [102,] 0.999727913 5.441737e-04 2.720868e-04 [103,] 0.999929087 1.418257e-04 7.091287e-05 [104,] 0.999994285 1.142986e-05 5.714930e-06 [105,] 0.999975129 4.974254e-05 2.487127e-05 [106,] 0.999895406 2.091887e-04 1.045944e-04 [107,] 0.999704121 5.917578e-04 2.958789e-04 [108,] 0.998793722 2.412556e-03 1.206278e-03 [109,] 0.999712456 5.750884e-04 2.875442e-04 [110,] 0.998254941 3.490119e-03 1.745059e-03 [111,] 0.989773644 2.045271e-02 1.022636e-02 > postscript(file="/var/www/rcomp/tmp/14p5p1291643802.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/2wg4s1291643802.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/3wg4s1291643802.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/4wg4s1291643802.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/57p4d1291643802.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 = 132 Frequency = 1 1 2 3 4 5 6 971.697753 860.959282 477.684237 102.769638 -157.121624 -222.639808 7 8 9 10 11 12 -435.538429 -412.816054 -152.927555 -210.429290 -157.596556 -353.153758 13 14 15 16 17 18 -575.404894 -557.295832 -563.872313 -618.691530 -296.203510 -238.087967 19 20 21 22 23 24 -160.203349 -96.530477 -213.022377 90.611217 108.269464 29.866308 25 26 27 28 29 30 33.338421 5.997370 152.996375 43.039864 -177.088920 -138.380297 31 32 33 34 35 36 112.756725 157.231416 435.533204 302.058052 89.827728 40.466179 37 38 39 40 41 42 212.606242 282.088586 -60.858988 114.762547 114.106726 139.818531 43 44 45 46 47 48 274.644038 185.510446 264.536325 224.974007 91.810749 65.997829 49 50 51 52 53 54 33.613848 47.116539 -107.721035 20.516057 -30.695438 -216.788454 55 56 57 58 59 60 -310.035785 -268.704088 -335.373945 -457.496684 -334.447535 -462.393114 61 62 63 64 65 66 -491.563459 -398.423452 -402.695133 -411.545986 -285.273486 -340.131494 67 68 69 70 71 72 -282.998323 -146.918103 -74.947331 102.756834 31.357380 1.588891 73 74 75 76 77 78 89.724577 133.826528 171.077117 344.942135 227.001632 198.179529 79 80 81 82 83 84 219.956546 282.202021 220.441856 316.704725 164.932384 180.934384 85 86 87 88 89 90 323.530249 411.211016 411.008856 293.851580 207.541141 242.299275 91 92 93 94 95 96 335.937460 368.110397 358.821975 346.799886 347.087293 254.410990 97 98 99 100 101 102 371.367782 365.217171 394.321237 434.411559 270.866661 135.428575 103 104 105 106 107 108 -5.396724 -98.437903 -109.770747 -136.112535 -140.651628 -175.073683 109 110 111 112 113 114 1.144799 -47.793879 70.944021 5.854575 -154.469937 -163.925710 115 116 117 118 119 120 -298.414050 -337.274787 -179.124331 -47.602909 -17.603798 -186.530986 121 122 123 124 125 126 -47.810838 123.222428 130.828028 -24.321291 -29.630211 -171.722547 127 128 129 130 131 132 -155.666672 -206.764984 -158.347206 -171.090420 -322.412779 -435.082268 > postscript(file="/var/www/rcomp/tmp/67p4d1291643802.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 = 132 Frequency = 1 lag(myerror, k = 1) myerror 0 971.697753 NA 1 860.959282 971.697753 2 477.684237 860.959282 3 102.769638 477.684237 4 -157.121624 102.769638 5 -222.639808 -157.121624 6 -435.538429 -222.639808 7 -412.816054 -435.538429 8 -152.927555 -412.816054 9 -210.429290 -152.927555 10 -157.596556 -210.429290 11 -353.153758 -157.596556 12 -575.404894 -353.153758 13 -557.295832 -575.404894 14 -563.872313 -557.295832 15 -618.691530 -563.872313 16 -296.203510 -618.691530 17 -238.087967 -296.203510 18 -160.203349 -238.087967 19 -96.530477 -160.203349 20 -213.022377 -96.530477 21 90.611217 -213.022377 22 108.269464 90.611217 23 29.866308 108.269464 24 33.338421 29.866308 25 5.997370 33.338421 26 152.996375 5.997370 27 43.039864 152.996375 28 -177.088920 43.039864 29 -138.380297 -177.088920 30 112.756725 -138.380297 31 157.231416 112.756725 32 435.533204 157.231416 33 302.058052 435.533204 34 89.827728 302.058052 35 40.466179 89.827728 36 212.606242 40.466179 37 282.088586 212.606242 38 -60.858988 282.088586 39 114.762547 -60.858988 40 114.106726 114.762547 41 139.818531 114.106726 42 274.644038 139.818531 43 185.510446 274.644038 44 264.536325 185.510446 45 224.974007 264.536325 46 91.810749 224.974007 47 65.997829 91.810749 48 33.613848 65.997829 49 47.116539 33.613848 50 -107.721035 47.116539 51 20.516057 -107.721035 52 -30.695438 20.516057 53 -216.788454 -30.695438 54 -310.035785 -216.788454 55 -268.704088 -310.035785 56 -335.373945 -268.704088 57 -457.496684 -335.373945 58 -334.447535 -457.496684 59 -462.393114 -334.447535 60 -491.563459 -462.393114 61 -398.423452 -491.563459 62 -402.695133 -398.423452 63 -411.545986 -402.695133 64 -285.273486 -411.545986 65 -340.131494 -285.273486 66 -282.998323 -340.131494 67 -146.918103 -282.998323 68 -74.947331 -146.918103 69 102.756834 -74.947331 70 31.357380 102.756834 71 1.588891 31.357380 72 89.724577 1.588891 73 133.826528 89.724577 74 171.077117 133.826528 75 344.942135 171.077117 76 227.001632 344.942135 77 198.179529 227.001632 78 219.956546 198.179529 79 282.202021 219.956546 80 220.441856 282.202021 81 316.704725 220.441856 82 164.932384 316.704725 83 180.934384 164.932384 84 323.530249 180.934384 85 411.211016 323.530249 86 411.008856 411.211016 87 293.851580 411.008856 88 207.541141 293.851580 89 242.299275 207.541141 90 335.937460 242.299275 91 368.110397 335.937460 92 358.821975 368.110397 93 346.799886 358.821975 94 347.087293 346.799886 95 254.410990 347.087293 96 371.367782 254.410990 97 365.217171 371.367782 98 394.321237 365.217171 99 434.411559 394.321237 100 270.866661 434.411559 101 135.428575 270.866661 102 -5.396724 135.428575 103 -98.437903 -5.396724 104 -109.770747 -98.437903 105 -136.112535 -109.770747 106 -140.651628 -136.112535 107 -175.073683 -140.651628 108 1.144799 -175.073683 109 -47.793879 1.144799 110 70.944021 -47.793879 111 5.854575 70.944021 112 -154.469937 5.854575 113 -163.925710 -154.469937 114 -298.414050 -163.925710 115 -337.274787 -298.414050 116 -179.124331 -337.274787 117 -47.602909 -179.124331 118 -17.603798 -47.602909 119 -186.530986 -17.603798 120 -47.810838 -186.530986 121 123.222428 -47.810838 122 130.828028 123.222428 123 -24.321291 130.828028 124 -29.630211 -24.321291 125 -171.722547 -29.630211 126 -155.666672 -171.722547 127 -206.764984 -155.666672 128 -158.347206 -206.764984 129 -171.090420 -158.347206 130 -322.412779 -171.090420 131 -435.082268 -322.412779 132 NA -435.082268 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 860.959282 971.697753 [2,] 477.684237 860.959282 [3,] 102.769638 477.684237 [4,] -157.121624 102.769638 [5,] -222.639808 -157.121624 [6,] -435.538429 -222.639808 [7,] -412.816054 -435.538429 [8,] -152.927555 -412.816054 [9,] -210.429290 -152.927555 [10,] -157.596556 -210.429290 [11,] -353.153758 -157.596556 [12,] -575.404894 -353.153758 [13,] -557.295832 -575.404894 [14,] -563.872313 -557.295832 [15,] -618.691530 -563.872313 [16,] -296.203510 -618.691530 [17,] -238.087967 -296.203510 [18,] -160.203349 -238.087967 [19,] -96.530477 -160.203349 [20,] -213.022377 -96.530477 [21,] 90.611217 -213.022377 [22,] 108.269464 90.611217 [23,] 29.866308 108.269464 [24,] 33.338421 29.866308 [25,] 5.997370 33.338421 [26,] 152.996375 5.997370 [27,] 43.039864 152.996375 [28,] -177.088920 43.039864 [29,] -138.380297 -177.088920 [30,] 112.756725 -138.380297 [31,] 157.231416 112.756725 [32,] 435.533204 157.231416 [33,] 302.058052 435.533204 [34,] 89.827728 302.058052 [35,] 40.466179 89.827728 [36,] 212.606242 40.466179 [37,] 282.088586 212.606242 [38,] -60.858988 282.088586 [39,] 114.762547 -60.858988 [40,] 114.106726 114.762547 [41,] 139.818531 114.106726 [42,] 274.644038 139.818531 [43,] 185.510446 274.644038 [44,] 264.536325 185.510446 [45,] 224.974007 264.536325 [46,] 91.810749 224.974007 [47,] 65.997829 91.810749 [48,] 33.613848 65.997829 [49,] 47.116539 33.613848 [50,] -107.721035 47.116539 [51,] 20.516057 -107.721035 [52,] -30.695438 20.516057 [53,] -216.788454 -30.695438 [54,] -310.035785 -216.788454 [55,] -268.704088 -310.035785 [56,] -335.373945 -268.704088 [57,] -457.496684 -335.373945 [58,] -334.447535 -457.496684 [59,] -462.393114 -334.447535 [60,] -491.563459 -462.393114 [61,] -398.423452 -491.563459 [62,] -402.695133 -398.423452 [63,] -411.545986 -402.695133 [64,] -285.273486 -411.545986 [65,] -340.131494 -285.273486 [66,] -282.998323 -340.131494 [67,] -146.918103 -282.998323 [68,] -74.947331 -146.918103 [69,] 102.756834 -74.947331 [70,] 31.357380 102.756834 [71,] 1.588891 31.357380 [72,] 89.724577 1.588891 [73,] 133.826528 89.724577 [74,] 171.077117 133.826528 [75,] 344.942135 171.077117 [76,] 227.001632 344.942135 [77,] 198.179529 227.001632 [78,] 219.956546 198.179529 [79,] 282.202021 219.956546 [80,] 220.441856 282.202021 [81,] 316.704725 220.441856 [82,] 164.932384 316.704725 [83,] 180.934384 164.932384 [84,] 323.530249 180.934384 [85,] 411.211016 323.530249 [86,] 411.008856 411.211016 [87,] 293.851580 411.008856 [88,] 207.541141 293.851580 [89,] 242.299275 207.541141 [90,] 335.937460 242.299275 [91,] 368.110397 335.937460 [92,] 358.821975 368.110397 [93,] 346.799886 358.821975 [94,] 347.087293 346.799886 [95,] 254.410990 347.087293 [96,] 371.367782 254.410990 [97,] 365.217171 371.367782 [98,] 394.321237 365.217171 [99,] 434.411559 394.321237 [100,] 270.866661 434.411559 [101,] 135.428575 270.866661 [102,] -5.396724 135.428575 [103,] -98.437903 -5.396724 [104,] -109.770747 -98.437903 [105,] -136.112535 -109.770747 [106,] -140.651628 -136.112535 [107,] -175.073683 -140.651628 [108,] 1.144799 -175.073683 [109,] -47.793879 1.144799 [110,] 70.944021 -47.793879 [111,] 5.854575 70.944021 [112,] -154.469937 5.854575 [113,] -163.925710 -154.469937 [114,] -298.414050 -163.925710 [115,] -337.274787 -298.414050 [116,] -179.124331 -337.274787 [117,] -47.602909 -179.124331 [118,] -17.603798 -47.602909 [119,] -186.530986 -17.603798 [120,] -47.810838 -186.530986 [121,] 123.222428 -47.810838 [122,] 130.828028 123.222428 [123,] -24.321291 130.828028 [124,] -29.630211 -24.321291 [125,] -171.722547 -29.630211 [126,] -155.666672 -171.722547 [127,] -206.764984 -155.666672 [128,] -158.347206 -206.764984 [129,] -171.090420 -158.347206 [130,] -322.412779 -171.090420 [131,] -435.082268 -322.412779 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 860.959282 971.697753 2 477.684237 860.959282 3 102.769638 477.684237 4 -157.121624 102.769638 5 -222.639808 -157.121624 6 -435.538429 -222.639808 7 -412.816054 -435.538429 8 -152.927555 -412.816054 9 -210.429290 -152.927555 10 -157.596556 -210.429290 11 -353.153758 -157.596556 12 -575.404894 -353.153758 13 -557.295832 -575.404894 14 -563.872313 -557.295832 15 -618.691530 -563.872313 16 -296.203510 -618.691530 17 -238.087967 -296.203510 18 -160.203349 -238.087967 19 -96.530477 -160.203349 20 -213.022377 -96.530477 21 90.611217 -213.022377 22 108.269464 90.611217 23 29.866308 108.269464 24 33.338421 29.866308 25 5.997370 33.338421 26 152.996375 5.997370 27 43.039864 152.996375 28 -177.088920 43.039864 29 -138.380297 -177.088920 30 112.756725 -138.380297 31 157.231416 112.756725 32 435.533204 157.231416 33 302.058052 435.533204 34 89.827728 302.058052 35 40.466179 89.827728 36 212.606242 40.466179 37 282.088586 212.606242 38 -60.858988 282.088586 39 114.762547 -60.858988 40 114.106726 114.762547 41 139.818531 114.106726 42 274.644038 139.818531 43 185.510446 274.644038 44 264.536325 185.510446 45 224.974007 264.536325 46 91.810749 224.974007 47 65.997829 91.810749 48 33.613848 65.997829 49 47.116539 33.613848 50 -107.721035 47.116539 51 20.516057 -107.721035 52 -30.695438 20.516057 53 -216.788454 -30.695438 54 -310.035785 -216.788454 55 -268.704088 -310.035785 56 -335.373945 -268.704088 57 -457.496684 -335.373945 58 -334.447535 -457.496684 59 -462.393114 -334.447535 60 -491.563459 -462.393114 61 -398.423452 -491.563459 62 -402.695133 -398.423452 63 -411.545986 -402.695133 64 -285.273486 -411.545986 65 -340.131494 -285.273486 66 -282.998323 -340.131494 67 -146.918103 -282.998323 68 -74.947331 -146.918103 69 102.756834 -74.947331 70 31.357380 102.756834 71 1.588891 31.357380 72 89.724577 1.588891 73 133.826528 89.724577 74 171.077117 133.826528 75 344.942135 171.077117 76 227.001632 344.942135 77 198.179529 227.001632 78 219.956546 198.179529 79 282.202021 219.956546 80 220.441856 282.202021 81 316.704725 220.441856 82 164.932384 316.704725 83 180.934384 164.932384 84 323.530249 180.934384 85 411.211016 323.530249 86 411.008856 411.211016 87 293.851580 411.008856 88 207.541141 293.851580 89 242.299275 207.541141 90 335.937460 242.299275 91 368.110397 335.937460 92 358.821975 368.110397 93 346.799886 358.821975 94 347.087293 346.799886 95 254.410990 347.087293 96 371.367782 254.410990 97 365.217171 371.367782 98 394.321237 365.217171 99 434.411559 394.321237 100 270.866661 434.411559 101 135.428575 270.866661 102 -5.396724 135.428575 103 -98.437903 -5.396724 104 -109.770747 -98.437903 105 -136.112535 -109.770747 106 -140.651628 -136.112535 107 -175.073683 -140.651628 108 1.144799 -175.073683 109 -47.793879 1.144799 110 70.944021 -47.793879 111 5.854575 70.944021 112 -154.469937 5.854575 113 -163.925710 -154.469937 114 -298.414050 -163.925710 115 -337.274787 -298.414050 116 -179.124331 -337.274787 117 -47.602909 -179.124331 118 -17.603798 -47.602909 119 -186.530986 -17.603798 120 -47.810838 -186.530986 121 123.222428 -47.810838 122 130.828028 123.222428 123 -24.321291 130.828028 124 -29.630211 -24.321291 125 -171.722547 -29.630211 126 -155.666672 -171.722547 127 -206.764984 -155.666672 128 -158.347206 -206.764984 129 -171.090420 -158.347206 130 -322.412779 -171.090420 131 -435.082268 -322.412779 > 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/70glf1291643802.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/80glf1291643802.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/9b8211291643802.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/10b8211291643802.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/11w8161291643802.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/12i9hu1291643802.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/13oawo1291643802.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/14zjvr1291643802.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/15kkuf1291643802.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/1662al1291643802.tab") + } > > try(system("convert tmp/14p5p1291643802.ps tmp/14p5p1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/2wg4s1291643802.ps tmp/2wg4s1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/3wg4s1291643802.ps tmp/3wg4s1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/4wg4s1291643802.ps tmp/4wg4s1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/57p4d1291643802.ps tmp/57p4d1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/67p4d1291643802.ps tmp/67p4d1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/70glf1291643802.ps tmp/70glf1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/80glf1291643802.ps tmp/80glf1291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/9b8211291643802.ps tmp/9b8211291643802.png",intern=TRUE)) character(0) > try(system("convert tmp/10b8211291643802.ps tmp/10b8211291643802.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.330 1.760 6.077