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 = '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 t 1 1.0 2.77 1 2 1.0 2.76 2 3 1.2 2.76 3 4 1.2 2.46 4 5 0.8 2.46 5 6 0.7 2.47 6 7 0.7 2.71 7 8 0.9 2.80 8 9 1.2 2.89 9 10 1.3 3.36 10 11 1.5 3.31 11 12 1.9 3.50 12 13 1.8 3.51 13 14 1.9 3.71 14 15 2.2 3.71 15 16 2.1 3.71 16 17 2.2 4.21 17 18 2.7 4.21 18 19 2.8 4.21 19 20 2.9 4.50 20 21 3.4 4.51 21 22 3.0 4.51 22 23 3.1 4.51 23 24 2.5 4.32 24 25 2.2 4.02 25 26 2.3 4.02 26 27 2.1 3.85 27 28 2.8 3.84 28 29 3.1 4.02 29 30 2.9 3.82 30 31 2.6 3.75 31 32 2.7 3.74 32 33 2.3 3.14 33 34 2.3 2.91 34 35 2.1 2.84 35 36 2.2 2.85 36 37 2.9 2.85 37 38 2.6 3.08 38 39 2.7 3.30 39 40 1.8 3.29 40 41 1.3 3.26 41 42 0.9 3.26 42 43 1.3 3.11 43 44 1.3 2.84 44 45 1.3 2.71 45 46 1.3 2.69 46 47 1.1 2.65 47 48 1.4 2.57 48 49 1.2 2.32 49 50 1.7 2.12 50 51 1.8 2.05 51 52 1.5 2.05 52 53 1.0 1.81 53 54 1.6 1.58 54 55 1.5 1.57 55 56 1.8 1.76 56 57 1.8 1.76 57 58 1.6 1.89 58 59 1.9 1.90 59 60 1.7 1.90 60 61 1.6 1.92 61 62 1.3 1.76 62 63 1.1 1.64 63 64 1.9 1.57 64 65 2.6 1.69 65 66 2.3 1.76 66 67 2.4 1.89 67 68 2.2 1.78 68 69 2.0 1.88 69 70 2.9 1.86 70 71 2.6 1.88 71 72 2.3 1.87 72 73 2.3 1.86 73 74 2.6 1.89 74 75 3.1 1.90 75 76 2.8 1.89 76 77 2.5 1.85 77 78 2.9 1.78 78 79 3.1 1.71 79 80 3.1 1.69 80 81 3.2 1.72 81 82 2.5 1.77 82 83 2.6 1.98 83 84 2.9 2.20 84 85 2.6 2.25 85 86 2.4 2.24 86 87 1.7 2.51 87 88 2.0 2.79 88 89 2.2 3.07 89 90 1.9 3.08 90 91 1.6 3.05 91 92 1.6 3.08 92 93 1.2 3.15 93 94 1.2 3.16 94 95 1.5 3.16 95 96 1.6 3.19 96 97 1.7 3.44 97 98 1.8 3.55 98 99 1.8 3.60 99 100 1.8 3.62 100 101 1.3 3.69 101 102 1.3 3.99 102 103 1.4 4.06 103 104 1.1 4.05 104 105 1.5 4.01 105 106 2.2 3.98 106 107 2.9 3.94 107 108 3.1 3.92 108 109 3.5 4.10 109 110 3.6 3.88 110 111 4.4 3.74 111 112 4.2 3.97 112 113 5.2 4.26 113 114 5.8 4.63 114 115 5.9 4.82 115 116 5.4 4.94 116 117 5.5 4.98 117 118 4.7 5.02 118 119 3.1 4.96 119 120 2.6 4.49 120 121 2.3 3.50 121 122 1.9 2.95 122 123 0.6 2.37 123 124 0.6 2.16 124 125 -0.4 2.08 125 126 -1.1 1.98 126 127 -1.7 1.98 127 128 -0.8 1.85 128 129 -1.2 1.82 129 130 -1.0 1.65 130 131 -0.1 1.59 131 132 0.3 1.56 132 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Nikkei DJ_Indust -1.771e+03 9.560e-02 3.371e-01 Goudprijs Conjunct_Seizoenzuiver Cons_vertrouw -3.863e-02 -5.283e+00 2.064e-01 Alg_consumptie_index_BE Gem_rente_kasbon_1j t -2.512e+01 2.223e+01 6.580e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -635.99 -177.61 19.65 190.95 1016.03 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.771e+03 3.706e+02 -4.777 4.96e-06 *** Nikkei 9.560e-02 1.918e-02 4.983 2.07e-06 *** DJ_Indust 3.371e-01 4.256e-02 7.920 1.20e-12 *** Goudprijs -3.863e-02 2.030e-02 -1.903 0.0594 . Conjunct_Seizoenzuiver -5.283e+00 7.911e+00 -0.668 0.5056 Cons_vertrouw 2.064e-01 7.021e+00 0.029 0.9766 Alg_consumptie_index_BE -2.512e+01 2.958e+01 -0.849 0.3974 Gem_rente_kasbon_1j 2.223e+01 4.456e+01 0.499 0.6188 t 6.580e+00 2.684e+00 2.452 0.0156 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 284.4 on 123 degrees of freedom Multiple R-squared: 0.866, Adjusted R-squared: 0.8573 F-statistic: 99.38 on 8 and 123 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,] 9.909769e-02 1.981954e-01 9.009023e-01 [2,] 4.146166e-02 8.292332e-02 9.585383e-01 [3,] 3.221304e-02 6.442608e-02 9.677870e-01 [4,] 2.552580e-02 5.105160e-02 9.744742e-01 [5,] 1.615203e-02 3.230405e-02 9.838480e-01 [6,] 9.807743e-03 1.961549e-02 9.901923e-01 [7,] 5.183151e-03 1.036630e-02 9.948168e-01 [8,] 6.419056e-03 1.283811e-02 9.935809e-01 [9,] 5.592166e-03 1.118433e-02 9.944078e-01 [10,] 3.784583e-03 7.569165e-03 9.962154e-01 [11,] 3.703212e-03 7.406423e-03 9.962968e-01 [12,] 2.179396e-03 4.358791e-03 9.978206e-01 [13,] 1.106455e-03 2.212909e-03 9.988935e-01 [14,] 5.358621e-04 1.071724e-03 9.994641e-01 [15,] 2.424292e-04 4.848584e-04 9.997576e-01 [16,] 1.032076e-04 2.064151e-04 9.998968e-01 [17,] 5.260614e-05 1.052123e-04 9.999474e-01 [18,] 4.299438e-05 8.598875e-05 9.999570e-01 [19,] 2.746910e-05 5.493820e-05 9.999725e-01 [20,] 2.184248e-05 4.368495e-05 9.999782e-01 [21,] 1.142248e-05 2.284496e-05 9.999886e-01 [22,] 6.452893e-06 1.290579e-05 9.999935e-01 [23,] 4.955962e-06 9.911924e-06 9.999950e-01 [24,] 2.984571e-06 5.969142e-06 9.999970e-01 [25,] 1.291136e-06 2.582271e-06 9.999987e-01 [26,] 5.869478e-07 1.173896e-06 9.999994e-01 [27,] 4.434899e-07 8.869797e-07 9.999996e-01 [28,] 2.382326e-07 4.764651e-07 9.999998e-01 [29,] 2.263645e-06 4.527290e-06 9.999977e-01 [30,] 3.690764e-06 7.381528e-06 9.999963e-01 [31,] 1.900823e-06 3.801647e-06 9.999981e-01 [32,] 9.282130e-07 1.856426e-06 9.999991e-01 [33,] 7.742754e-07 1.548551e-06 9.999992e-01 [34,] 7.783654e-07 1.556731e-06 9.999992e-01 [35,] 1.812131e-06 3.624262e-06 9.999982e-01 [36,] 2.735418e-06 5.470836e-06 9.999973e-01 [37,] 2.698119e-06 5.396238e-06 9.999973e-01 [38,] 3.759958e-06 7.519916e-06 9.999962e-01 [39,] 2.701966e-06 5.403931e-06 9.999973e-01 [40,] 1.759209e-06 3.518419e-06 9.999982e-01 [41,] 2.007639e-06 4.015277e-06 9.999980e-01 [42,] 2.938832e-06 5.877665e-06 9.999971e-01 [43,] 2.567031e-06 5.134062e-06 9.999974e-01 [44,] 4.483772e-06 8.967544e-06 9.999955e-01 [45,] 1.379029e-05 2.758059e-05 9.999862e-01 [46,] 2.040776e-05 4.081552e-05 9.999796e-01 [47,] 1.339388e-04 2.678776e-04 9.998661e-01 [48,] 1.610733e-04 3.221466e-04 9.998389e-01 [49,] 1.303214e-04 2.606427e-04 9.998697e-01 [50,] 1.849223e-04 3.698445e-04 9.998151e-01 [51,] 2.611078e-04 5.222156e-04 9.997389e-01 [52,] 1.555332e-03 3.110664e-03 9.984447e-01 [53,] 2.353449e-02 4.706898e-02 9.764655e-01 [54,] 8.781044e-02 1.756209e-01 9.121896e-01 [55,] 3.061825e-01 6.123649e-01 6.938175e-01 [56,] 6.044012e-01 7.911976e-01 3.955988e-01 [57,] 8.370156e-01 3.259688e-01 1.629844e-01 [58,] 9.648264e-01 7.034718e-02 3.517359e-02 [59,] 9.921604e-01 1.567914e-02 7.839572e-03 [60,] 9.984835e-01 3.032919e-03 1.516460e-03 [61,] 9.998707e-01 2.586029e-04 1.293015e-04 [62,] 9.999879e-01 2.427288e-05 1.213644e-05 [63,] 9.999987e-01 2.683933e-06 1.341967e-06 [64,] 9.999998e-01 4.476634e-07 2.238317e-07 [65,] 9.999999e-01 1.348261e-07 6.741304e-08 [66,] 1.000000e+00 7.499256e-08 3.749628e-08 [67,] 1.000000e+00 5.036382e-08 2.518191e-08 [68,] 1.000000e+00 5.238930e-08 2.619465e-08 [69,] 1.000000e+00 5.132956e-08 2.566478e-08 [70,] 1.000000e+00 2.800618e-08 1.400309e-08 [71,] 1.000000e+00 1.341974e-08 6.709869e-09 [72,] 1.000000e+00 2.012408e-08 1.006204e-08 [73,] 1.000000e+00 2.135277e-08 1.067638e-08 [74,] 1.000000e+00 1.437804e-08 7.189021e-09 [75,] 1.000000e+00 2.006505e-08 1.003253e-08 [76,] 1.000000e+00 3.419419e-08 1.709710e-08 [77,] 1.000000e+00 2.864042e-08 1.432021e-08 [78,] 1.000000e+00 5.187475e-09 2.593738e-09 [79,] 1.000000e+00 2.059632e-09 1.029816e-09 [80,] 1.000000e+00 1.478545e-09 7.392724e-10 [81,] 1.000000e+00 1.139858e-09 5.699292e-10 [82,] 1.000000e+00 1.386357e-09 6.931787e-10 [83,] 1.000000e+00 6.839178e-10 3.419589e-10 [84,] 1.000000e+00 1.660281e-10 8.301404e-11 [85,] 1.000000e+00 3.103178e-10 1.551589e-10 [86,] 1.000000e+00 6.863761e-10 3.431880e-10 [87,] 1.000000e+00 2.052331e-09 1.026166e-09 [88,] 1.000000e+00 6.841740e-09 3.420870e-09 [89,] 1.000000e+00 1.189745e-08 5.948724e-09 [90,] 1.000000e+00 1.387951e-08 6.939753e-09 [91,] 1.000000e+00 1.061962e-08 5.309808e-09 [92,] 1.000000e+00 8.673666e-09 4.336833e-09 [93,] 1.000000e+00 2.871399e-08 1.435700e-08 [94,] 1.000000e+00 9.245899e-08 4.622950e-08 [95,] 9.999999e-01 2.700411e-07 1.350205e-07 [96,] 9.999996e-01 8.416490e-07 4.208245e-07 [97,] 9.999994e-01 1.214889e-06 6.074447e-07 [98,] 9.999979e-01 4.283486e-06 2.141743e-06 [99,] 9.999971e-01 5.746797e-06 2.873398e-06 [100,] 9.999965e-01 6.960697e-06 3.480349e-06 [101,] 9.999871e-01 2.585932e-05 1.292966e-05 [102,] 9.999509e-01 9.822134e-05 4.911067e-05 [103,] 9.999740e-01 5.204011e-05 2.602006e-05 [104,] 9.998966e-01 2.068186e-04 1.034093e-04 [105,] 9.995859e-01 8.282735e-04 4.141368e-04 [106,] 9.986809e-01 2.638255e-03 1.319127e-03 [107,] 9.950925e-01 9.814907e-03 4.907454e-03 [108,] 9.986043e-01 2.791425e-03 1.395713e-03 [109,] 9.930404e-01 1.391919e-02 6.959596e-03 > postscript(file="/var/www/rcomp/tmp/17o3o1291648593.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/2ixkr1291648593.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/3ixkr1291648593.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/4ixkr1291648593.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/5so1t1291648593.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 7 1016.02544 920.12082 534.44906 206.67482 -36.31223 -77.42644 -366.38421 8 9 10 11 12 13 14 -342.31952 -103.92768 -140.51624 -116.17300 -288.05960 -550.27164 -570.89676 15 16 17 18 19 20 21 -603.25135 -635.99490 -299.06800 -249.21942 -176.30824 -113.93261 -168.94283 22 23 24 25 26 27 28 81.68343 108.71191 14.77159 14.47588 24.53618 147.47451 27.41144 29 30 31 32 33 34 35 -173.92358 -104.86693 126.23379 187.37422 466.47589 385.84401 216.69117 36 37 38 39 40 41 42 112.81903 265.09145 338.02859 -13.46152 159.88210 140.02641 141.89984 43 44 45 46 47 48 49 219.08183 155.43784 227.92395 177.78748 75.64628 79.98255 56.52410 50 51 52 53 54 55 56 77.85306 -82.26576 -18.99993 -60.18334 -246.80823 -326.57238 -268.66376 57 58 59 60 61 62 63 -351.16333 -417.66779 -317.37479 -435.27492 -493.93129 -416.70040 -422.70782 64 65 66 67 68 69 70 -405.24974 -280.07137 -387.24432 -294.64319 -184.70773 -109.97629 94.39579 71 72 73 74 75 76 77 32.19364 -26.59235 40.32066 54.83788 75.30952 238.34386 162.92138 78 79 80 81 82 83 84 164.25885 174.84153 221.53671 210.49775 267.78363 132.58939 125.61829 85 86 87 88 89 90 91 254.56359 371.41916 380.19307 287.96117 274.50381 207.17446 338.52808 92 93 94 95 96 97 98 342.03014 292.07899 252.45221 300.46388 252.50535 306.34313 297.52104 99 100 101 102 103 104 105 303.48116 354.93888 201.67879 51.67543 -86.09765 -177.42305 -137.14150 106 107 108 109 110 111 112 -156.34556 -80.71231 -149.87060 116.05648 78.31744 214.81210 74.53353 113 114 115 116 117 118 119 -75.85422 -137.06386 -261.82288 -362.49552 -241.19675 -79.17463 -119.38760 120 121 122 123 124 125 126 -284.81479 -103.88425 183.59456 135.51172 -54.11819 -71.39357 -214.63144 127 128 129 130 131 132 -224.10100 -261.19918 -178.16150 -114.89485 -139.58089 -185.30448 > postscript(file="/var/www/rcomp/tmp/6so1t1291648593.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 1016.02544 NA 1 920.12082 1016.02544 2 534.44906 920.12082 3 206.67482 534.44906 4 -36.31223 206.67482 5 -77.42644 -36.31223 6 -366.38421 -77.42644 7 -342.31952 -366.38421 8 -103.92768 -342.31952 9 -140.51624 -103.92768 10 -116.17300 -140.51624 11 -288.05960 -116.17300 12 -550.27164 -288.05960 13 -570.89676 -550.27164 14 -603.25135 -570.89676 15 -635.99490 -603.25135 16 -299.06800 -635.99490 17 -249.21942 -299.06800 18 -176.30824 -249.21942 19 -113.93261 -176.30824 20 -168.94283 -113.93261 21 81.68343 -168.94283 22 108.71191 81.68343 23 14.77159 108.71191 24 14.47588 14.77159 25 24.53618 14.47588 26 147.47451 24.53618 27 27.41144 147.47451 28 -173.92358 27.41144 29 -104.86693 -173.92358 30 126.23379 -104.86693 31 187.37422 126.23379 32 466.47589 187.37422 33 385.84401 466.47589 34 216.69117 385.84401 35 112.81903 216.69117 36 265.09145 112.81903 37 338.02859 265.09145 38 -13.46152 338.02859 39 159.88210 -13.46152 40 140.02641 159.88210 41 141.89984 140.02641 42 219.08183 141.89984 43 155.43784 219.08183 44 227.92395 155.43784 45 177.78748 227.92395 46 75.64628 177.78748 47 79.98255 75.64628 48 56.52410 79.98255 49 77.85306 56.52410 50 -82.26576 77.85306 51 -18.99993 -82.26576 52 -60.18334 -18.99993 53 -246.80823 -60.18334 54 -326.57238 -246.80823 55 -268.66376 -326.57238 56 -351.16333 -268.66376 57 -417.66779 -351.16333 58 -317.37479 -417.66779 59 -435.27492 -317.37479 60 -493.93129 -435.27492 61 -416.70040 -493.93129 62 -422.70782 -416.70040 63 -405.24974 -422.70782 64 -280.07137 -405.24974 65 -387.24432 -280.07137 66 -294.64319 -387.24432 67 -184.70773 -294.64319 68 -109.97629 -184.70773 69 94.39579 -109.97629 70 32.19364 94.39579 71 -26.59235 32.19364 72 40.32066 -26.59235 73 54.83788 40.32066 74 75.30952 54.83788 75 238.34386 75.30952 76 162.92138 238.34386 77 164.25885 162.92138 78 174.84153 164.25885 79 221.53671 174.84153 80 210.49775 221.53671 81 267.78363 210.49775 82 132.58939 267.78363 83 125.61829 132.58939 84 254.56359 125.61829 85 371.41916 254.56359 86 380.19307 371.41916 87 287.96117 380.19307 88 274.50381 287.96117 89 207.17446 274.50381 90 338.52808 207.17446 91 342.03014 338.52808 92 292.07899 342.03014 93 252.45221 292.07899 94 300.46388 252.45221 95 252.50535 300.46388 96 306.34313 252.50535 97 297.52104 306.34313 98 303.48116 297.52104 99 354.93888 303.48116 100 201.67879 354.93888 101 51.67543 201.67879 102 -86.09765 51.67543 103 -177.42305 -86.09765 104 -137.14150 -177.42305 105 -156.34556 -137.14150 106 -80.71231 -156.34556 107 -149.87060 -80.71231 108 116.05648 -149.87060 109 78.31744 116.05648 110 214.81210 78.31744 111 74.53353 214.81210 112 -75.85422 74.53353 113 -137.06386 -75.85422 114 -261.82288 -137.06386 115 -362.49552 -261.82288 116 -241.19675 -362.49552 117 -79.17463 -241.19675 118 -119.38760 -79.17463 119 -284.81479 -119.38760 120 -103.88425 -284.81479 121 183.59456 -103.88425 122 135.51172 183.59456 123 -54.11819 135.51172 124 -71.39357 -54.11819 125 -214.63144 -71.39357 126 -224.10100 -214.63144 127 -261.19918 -224.10100 128 -178.16150 -261.19918 129 -114.89485 -178.16150 130 -139.58089 -114.89485 131 -185.30448 -139.58089 132 NA -185.30448 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 920.12082 1016.02544 [2,] 534.44906 920.12082 [3,] 206.67482 534.44906 [4,] -36.31223 206.67482 [5,] -77.42644 -36.31223 [6,] -366.38421 -77.42644 [7,] -342.31952 -366.38421 [8,] -103.92768 -342.31952 [9,] -140.51624 -103.92768 [10,] -116.17300 -140.51624 [11,] -288.05960 -116.17300 [12,] -550.27164 -288.05960 [13,] -570.89676 -550.27164 [14,] -603.25135 -570.89676 [15,] -635.99490 -603.25135 [16,] -299.06800 -635.99490 [17,] -249.21942 -299.06800 [18,] -176.30824 -249.21942 [19,] -113.93261 -176.30824 [20,] -168.94283 -113.93261 [21,] 81.68343 -168.94283 [22,] 108.71191 81.68343 [23,] 14.77159 108.71191 [24,] 14.47588 14.77159 [25,] 24.53618 14.47588 [26,] 147.47451 24.53618 [27,] 27.41144 147.47451 [28,] -173.92358 27.41144 [29,] -104.86693 -173.92358 [30,] 126.23379 -104.86693 [31,] 187.37422 126.23379 [32,] 466.47589 187.37422 [33,] 385.84401 466.47589 [34,] 216.69117 385.84401 [35,] 112.81903 216.69117 [36,] 265.09145 112.81903 [37,] 338.02859 265.09145 [38,] -13.46152 338.02859 [39,] 159.88210 -13.46152 [40,] 140.02641 159.88210 [41,] 141.89984 140.02641 [42,] 219.08183 141.89984 [43,] 155.43784 219.08183 [44,] 227.92395 155.43784 [45,] 177.78748 227.92395 [46,] 75.64628 177.78748 [47,] 79.98255 75.64628 [48,] 56.52410 79.98255 [49,] 77.85306 56.52410 [50,] -82.26576 77.85306 [51,] -18.99993 -82.26576 [52,] -60.18334 -18.99993 [53,] -246.80823 -60.18334 [54,] -326.57238 -246.80823 [55,] -268.66376 -326.57238 [56,] -351.16333 -268.66376 [57,] -417.66779 -351.16333 [58,] -317.37479 -417.66779 [59,] -435.27492 -317.37479 [60,] -493.93129 -435.27492 [61,] -416.70040 -493.93129 [62,] -422.70782 -416.70040 [63,] -405.24974 -422.70782 [64,] -280.07137 -405.24974 [65,] -387.24432 -280.07137 [66,] -294.64319 -387.24432 [67,] -184.70773 -294.64319 [68,] -109.97629 -184.70773 [69,] 94.39579 -109.97629 [70,] 32.19364 94.39579 [71,] -26.59235 32.19364 [72,] 40.32066 -26.59235 [73,] 54.83788 40.32066 [74,] 75.30952 54.83788 [75,] 238.34386 75.30952 [76,] 162.92138 238.34386 [77,] 164.25885 162.92138 [78,] 174.84153 164.25885 [79,] 221.53671 174.84153 [80,] 210.49775 221.53671 [81,] 267.78363 210.49775 [82,] 132.58939 267.78363 [83,] 125.61829 132.58939 [84,] 254.56359 125.61829 [85,] 371.41916 254.56359 [86,] 380.19307 371.41916 [87,] 287.96117 380.19307 [88,] 274.50381 287.96117 [89,] 207.17446 274.50381 [90,] 338.52808 207.17446 [91,] 342.03014 338.52808 [92,] 292.07899 342.03014 [93,] 252.45221 292.07899 [94,] 300.46388 252.45221 [95,] 252.50535 300.46388 [96,] 306.34313 252.50535 [97,] 297.52104 306.34313 [98,] 303.48116 297.52104 [99,] 354.93888 303.48116 [100,] 201.67879 354.93888 [101,] 51.67543 201.67879 [102,] -86.09765 51.67543 [103,] -177.42305 -86.09765 [104,] -137.14150 -177.42305 [105,] -156.34556 -137.14150 [106,] -80.71231 -156.34556 [107,] -149.87060 -80.71231 [108,] 116.05648 -149.87060 [109,] 78.31744 116.05648 [110,] 214.81210 78.31744 [111,] 74.53353 214.81210 [112,] -75.85422 74.53353 [113,] -137.06386 -75.85422 [114,] -261.82288 -137.06386 [115,] -362.49552 -261.82288 [116,] -241.19675 -362.49552 [117,] -79.17463 -241.19675 [118,] -119.38760 -79.17463 [119,] -284.81479 -119.38760 [120,] -103.88425 -284.81479 [121,] 183.59456 -103.88425 [122,] 135.51172 183.59456 [123,] -54.11819 135.51172 [124,] -71.39357 -54.11819 [125,] -214.63144 -71.39357 [126,] -224.10100 -214.63144 [127,] -261.19918 -224.10100 [128,] -178.16150 -261.19918 [129,] -114.89485 -178.16150 [130,] -139.58089 -114.89485 [131,] -185.30448 -139.58089 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 920.12082 1016.02544 2 534.44906 920.12082 3 206.67482 534.44906 4 -36.31223 206.67482 5 -77.42644 -36.31223 6 -366.38421 -77.42644 7 -342.31952 -366.38421 8 -103.92768 -342.31952 9 -140.51624 -103.92768 10 -116.17300 -140.51624 11 -288.05960 -116.17300 12 -550.27164 -288.05960 13 -570.89676 -550.27164 14 -603.25135 -570.89676 15 -635.99490 -603.25135 16 -299.06800 -635.99490 17 -249.21942 -299.06800 18 -176.30824 -249.21942 19 -113.93261 -176.30824 20 -168.94283 -113.93261 21 81.68343 -168.94283 22 108.71191 81.68343 23 14.77159 108.71191 24 14.47588 14.77159 25 24.53618 14.47588 26 147.47451 24.53618 27 27.41144 147.47451 28 -173.92358 27.41144 29 -104.86693 -173.92358 30 126.23379 -104.86693 31 187.37422 126.23379 32 466.47589 187.37422 33 385.84401 466.47589 34 216.69117 385.84401 35 112.81903 216.69117 36 265.09145 112.81903 37 338.02859 265.09145 38 -13.46152 338.02859 39 159.88210 -13.46152 40 140.02641 159.88210 41 141.89984 140.02641 42 219.08183 141.89984 43 155.43784 219.08183 44 227.92395 155.43784 45 177.78748 227.92395 46 75.64628 177.78748 47 79.98255 75.64628 48 56.52410 79.98255 49 77.85306 56.52410 50 -82.26576 77.85306 51 -18.99993 -82.26576 52 -60.18334 -18.99993 53 -246.80823 -60.18334 54 -326.57238 -246.80823 55 -268.66376 -326.57238 56 -351.16333 -268.66376 57 -417.66779 -351.16333 58 -317.37479 -417.66779 59 -435.27492 -317.37479 60 -493.93129 -435.27492 61 -416.70040 -493.93129 62 -422.70782 -416.70040 63 -405.24974 -422.70782 64 -280.07137 -405.24974 65 -387.24432 -280.07137 66 -294.64319 -387.24432 67 -184.70773 -294.64319 68 -109.97629 -184.70773 69 94.39579 -109.97629 70 32.19364 94.39579 71 -26.59235 32.19364 72 40.32066 -26.59235 73 54.83788 40.32066 74 75.30952 54.83788 75 238.34386 75.30952 76 162.92138 238.34386 77 164.25885 162.92138 78 174.84153 164.25885 79 221.53671 174.84153 80 210.49775 221.53671 81 267.78363 210.49775 82 132.58939 267.78363 83 125.61829 132.58939 84 254.56359 125.61829 85 371.41916 254.56359 86 380.19307 371.41916 87 287.96117 380.19307 88 274.50381 287.96117 89 207.17446 274.50381 90 338.52808 207.17446 91 342.03014 338.52808 92 292.07899 342.03014 93 252.45221 292.07899 94 300.46388 252.45221 95 252.50535 300.46388 96 306.34313 252.50535 97 297.52104 306.34313 98 303.48116 297.52104 99 354.93888 303.48116 100 201.67879 354.93888 101 51.67543 201.67879 102 -86.09765 51.67543 103 -177.42305 -86.09765 104 -137.14150 -177.42305 105 -156.34556 -137.14150 106 -80.71231 -156.34556 107 -149.87060 -80.71231 108 116.05648 -149.87060 109 78.31744 116.05648 110 214.81210 78.31744 111 74.53353 214.81210 112 -75.85422 74.53353 113 -137.06386 -75.85422 114 -261.82288 -137.06386 115 -362.49552 -261.82288 116 -241.19675 -362.49552 117 -79.17463 -241.19675 118 -119.38760 -79.17463 119 -284.81479 -119.38760 120 -103.88425 -284.81479 121 183.59456 -103.88425 122 135.51172 183.59456 123 -54.11819 135.51172 124 -71.39357 -54.11819 125 -214.63144 -71.39357 126 -224.10100 -214.63144 127 -261.19918 -224.10100 128 -178.16150 -261.19918 129 -114.89485 -178.16150 130 -139.58089 -114.89485 131 -185.30448 -139.58089 > 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/73yiw1291648593.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/83yiw1291648593.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/9wpiz1291648593.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/10wpiz1291648593.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/11zqgn1291648593.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/12lqxb1291648593.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/139ru51291648593.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/14kitq1291648593.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/15njre1291648593.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/16kt7m1291648593.tab") + } > > try(system("convert tmp/17o3o1291648593.ps tmp/17o3o1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/2ixkr1291648593.ps tmp/2ixkr1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/3ixkr1291648593.ps tmp/3ixkr1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/4ixkr1291648593.ps tmp/4ixkr1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/5so1t1291648593.ps tmp/5so1t1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/6so1t1291648593.ps tmp/6so1t1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/73yiw1291648593.ps tmp/73yiw1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/83yiw1291648593.ps tmp/83yiw1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/9wpiz1291648593.ps tmp/9wpiz1291648593.png",intern=TRUE)) character(0) > try(system("convert tmp/10wpiz1291648593.ps tmp/10wpiz1291648593.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.320 1.810 6.187