R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(3484.74 + ,13830.14 + ,9349.44 + ,7977 + ,-5.6 + ,6 + ,1 + ,3.17 + ,3411.13 + ,14153.22 + ,9327.78 + ,8241 + ,-6.2 + ,3 + ,1 + ,3.17 + ,3288.18 + ,15418.03 + ,9753.63 + ,8444 + ,-7.1 + ,2 + ,1.2 + ,3.36 + ,3280.37 + ,16666.97 + ,10443.5 + ,8490 + ,-1.4 + ,2 + ,1.2 + ,3.11 + ,3173.95 + ,16505.21 + ,10853.87 + ,8388 + ,-0.1 + ,2 + ,0.8 + ,3.11 + ,3165.26 + ,17135.96 + ,10704.02 + ,8099 + ,-0.9 + ,-8 + ,0.7 + ,3.57 + ,3092.71 + ,18033.25 + ,11052.23 + ,7984 + ,0 + ,0 + ,0.7 + ,4.04 + ,3053.05 + ,17671 + ,10935.47 + ,7786 + ,0.1 + ,-2 + ,0.9 + ,4.21 + ,3181.96 + ,17544.22 + ,10714.03 + ,8086 + ,2.6 + ,3 + ,1.2 + ,4.36 + ,2999.93 + ,17677.9 + ,10394.48 + ,9315 + ,6 + ,5 + ,1.3 + ,4.75 + ,3249.57 + ,18470.97 + ,10817.9 + ,9113 + ,6.4 + ,8 + ,1.5 + ,4.43 + ,3210.52 + ,18409.96 + ,11251.2 + ,9023 + ,8.6 + ,8 + ,1.9 + ,4.7 + ,3030.29 + ,18941.6 + ,11281.26 + ,9026 + ,6.4 + ,9 + ,1.8 + ,4.81 + ,2803.47 + ,19685.53 + ,10539.68 + ,9787 + ,7.7 + ,11 + ,1.9 + ,5.01 + ,2767.63 + ,19834.71 + ,10483.39 + ,9536 + ,9.2 + ,13 + ,2.2 + ,5 + ,2882.6 + ,19598.93 + ,10947.43 + ,9490 + ,8.6 + ,12 + ,2.1 + ,4.81 + ,2863.36 + ,17039.97 + ,10580.27 + ,9736 + ,7.4 + ,13 + ,2.2 + ,5.11 + ,2897.06 + ,16969.28 + ,10582.92 + ,9694 + ,8.6 + ,15 + ,2.7 + ,5.1 + ,3012.61 + ,16973.38 + ,10654.41 + ,9647 + ,6.2 + ,13 + ,2.8 + ,5.11 + ,3142.95 + ,16329.89 + ,11014.51 + ,9753 + ,6 + ,16 + ,2.9 + ,5.21 + ,3032.93 + ,16153.34 + ,10967.87 + ,10070 + ,6.6 + ,10 + ,3.4 + ,5.21 + ,3045.78 + ,15311.7 + ,10433.56 + ,10137 + ,5.1 + ,14 + ,3 + ,5.21 + ,3110.52 + ,14760.87 + ,10665.78 + ,9984 + ,4.7 + ,14 + ,3.1 + ,5.06 + ,3013.24 + ,14452.93 + ,10666.71 + ,9732 + ,5 + ,15 + ,2.5 + ,4.58 + ,2987.1 + ,13720.95 + ,10682.74 + ,9103 + ,3.6 + ,13 + ,2.2 + ,4.37 + ,2995.55 + ,13266.27 + ,10777.22 + ,9155 + ,1.9 + ,8 + ,2.3 + ,4.37 + ,2833.18 + ,12708.47 + ,10052.6 + ,9308 + ,-0.1 + ,7 + ,2.1 + ,4.23 + ,2848.96 + ,13411.84 + ,10213.97 + ,9394 + ,-5.7 + ,3 + ,2.8 + ,4.23 + ,2794.83 + ,13975.55 + ,10546.82 + ,9948 + ,-5.6 + ,3 + ,3.1 + ,4.37 + ,2845.26 + ,12974.89 + ,10767.2 + ,10177 + ,-6.4 + ,4 + ,2.9 + ,4.31 + ,2915.02 + ,12151.11 + ,10444.5 + ,10002 + ,-7.7 + ,4 + ,2.6 + ,4.31 + ,2892.63 + ,11576.21 + ,10314.68 + ,9728 + ,-8 + ,0 + ,2.7 + ,4.28 + ,2604.42 + ,9996.83 + ,9042.56 + ,10002 + ,-11.9 + ,-4 + ,2.3 + ,3.98 + ,2641.65 + ,10438.9 + ,9220.75 + ,10063 + ,-15.4 + ,-14 + ,2.3 + ,3.79 + ,2659.81 + ,10511.22 + ,9721.84 + ,10018 + ,-15.5 + ,-18 + ,2.1 + ,3.55 + ,2638.53 + ,10496.2 + ,9978.53 + ,9960 + ,-13.4 + ,-8 + ,2.2 + ,4 + ,2720.25 + ,10300.79 + ,9923.81 + ,10236 + ,-10.9 + ,-1 + ,2.9 + ,4.02 + ,2745.88 + ,9981.65 + ,9892.56 + ,10893 + ,-10.8 + ,1 + ,2.6 + ,4.21 + ,2735.7 + ,11448.79 + ,10500.98 + ,10756 + ,-7.3 + ,2 + ,2.7 + ,4.5 + ,2811.7 + ,11384.49 + ,10179.35 + ,10940 + ,-6.5 + ,0 + ,1.8 + ,4.52 + ,2799.43 + ,11717.46 + ,10080.48 + ,10997 + ,-5.1 + ,1 + ,1.3 + ,4.45 + ,2555.28 + ,10965.88 + ,9492.44 + ,10827 + ,-5.3 + ,0 + ,0.9 + ,4.28 + ,2304.98 + ,10352.27 + ,8616.49 + ,10166 + ,-6.8 + ,-1 + ,1.3 + ,4.08 + ,2214.95 + ,9751.2 + ,8685.4 + ,10186 + ,-8.4 + ,-3 + ,1.3 + ,3.8 + ,2065.81 + ,9354.01 + ,8160.67 + ,10457 + ,-8.4 + ,-3 + ,1.3 + ,3.58 + ,1940.49 + ,8792.5 + ,8048.1 + ,10368 + ,-9.7 + ,-3 + ,1.3 + ,3.58 + ,2042 + ,8721.14 + ,8641.21 + ,10244 + ,-8.8 + ,-4 + ,1.1 + ,3.58 + ,1995.37 + ,8692.94 + ,8526.63 + ,10511 + ,-9.6 + ,-8 + ,1.4 + ,3.54 + ,1946.81 + ,8570.73 + ,8474.21 + ,10812 + ,-11.5 + ,-9 + ,1.2 + ,3.19 + ,1765.9 + ,8538.47 + ,7916.13 + ,10738 + ,-11 + ,-13 + ,1.7 + ,2.91 + ,1635.25 + ,8169.75 + ,7977.64 + ,10171 + ,-14.9 + ,-18 + ,1.8 + ,2.87 + ,1833.42 + ,7905.84 + ,8334.59 + ,9721 + ,-16.2 + ,-11 + ,1.5 + ,3.1 + ,1910.43 + ,8145.82 + ,8623.36 + ,9897 + ,-14.4 + ,-9 + ,1 + ,2.6 + ,1959.67 + ,8895.71 + ,9098.03 + ,9828 + ,-17.3 + ,-10 + ,1.6 + ,2.33 + ,1969.6 + ,9676.31 + ,9154.34 + ,9924 + ,-15.7 + ,-13 + ,1.5 + ,2.62 + ,2061.41 + ,9884.59 + ,9284.73 + ,10371 + ,-12.6 + ,-11 + ,1.8 + ,3.05 + ,2093.48 + ,10637.44 + ,9492.49 + ,10846 + ,-9.4 + ,-5 + ,1.8 + ,3.05 + ,2120.88 + ,10717.13 + ,9682.35 + ,10413 + ,-8.1 + ,-15 + ,1.6 + ,3.22 + ,2174.56 + ,10205.29 + ,9762.12 + ,10709 + ,-5.4 + ,-6 + ,1.9 + ,3.24 + ,2196.72 + ,10295.98 + ,10124.63 + ,10662 + ,-4.6 + ,-6 + ,1.7 + ,3.24 + ,2350.44 + ,10892.76 + ,10540.05 + ,10570 + ,-4.9 + ,-3 + ,1.6 + ,3.38 + ,2440.25 + ,10631.92 + ,10601.61 + ,10297 + ,-4 + ,-1 + ,1.3 + ,3.35 + ,2408.64 + ,11441.08 + ,10323.73 + ,10635 + ,-3.1 + ,-3 + ,1.1 + ,3.22 + ,2472.81 + ,11950.95 + ,10418.4 + ,10872 + ,-1.3 + ,-4 + ,1.9 + ,3.06 + ,2407.6 + ,11037.54 + ,10092.96 + ,10296 + ,0 + ,-6 + ,2.6 + ,3.17 + ,2454.62 + ,11527.72 + ,10364.91 + ,10383 + ,-0.4 + ,0 + ,2.3 + ,3.19 + ,2448.05 + ,11383.89 + ,10152.09 + ,10431 + ,3 + ,-4 + ,2.4 + ,3.35 + ,2497.84 + ,10989.34 + ,10032.8 + ,10574 + ,0.4 + ,-2 + ,2.2 + ,3.24 + ,2645.64 + ,11079.42 + ,10204.59 + ,10653 + ,1.2 + ,-2 + ,2 + ,3.23 + ,2756.76 + ,11028.93 + ,10001.6 + ,10805 + ,0.6 + ,-6 + ,2.9 + ,3.31 + ,2849.27 + ,10973 + ,10411.75 + ,10872 + ,-1.3 + ,-7 + ,2.6 + ,3.25 + ,2921.44 + ,11068.05 + ,10673.38 + ,10625 + ,-3.2 + ,-6 + ,2.3 + ,3.2 + ,2981.85 + ,11394.84 + ,10539.51 + ,10407 + ,-1.8 + ,-6 + ,2.3 + ,3.1 + ,3080.58 + ,11545.71 + ,10723.78 + ,10463 + ,-3.6 + ,-3 + ,2.6 + ,2.93 + ,3106.22 + ,11809.38 + ,10682.06 + ,10556 + ,-4.2 + ,-2 + ,3.1 + ,2.92 + ,3119.31 + ,11395.64 + ,10283.19 + ,10646 + ,-6.9 + ,-5 + ,2.8 + ,2.9 + ,3061.26 + ,11082.38 + ,10377.18 + ,10702 + ,-8 + ,-11 + ,2.5 + ,2.87 + ,3097.31 + ,11402.75 + ,10486.64 + ,11353 + ,-7.5 + ,-11 + ,2.9 + ,2.76 + ,3161.69 + ,11716.87 + ,10545.38 + ,11346 + ,-8.2 + ,-11 + ,3.1 + ,2.67 + ,3257.16 + ,12204.98 + ,10554.27 + ,11451 + ,-7.6 + ,-10 + ,3.1 + ,2.75 + ,3277.01 + ,12986.62 + ,10532.54 + ,11964 + ,-3.7 + ,-14 + ,3.2 + ,2.72 + ,3295.32 + ,13392.79 + ,10324.31 + ,12574 + ,-1.7 + ,-8 + ,2.5 + ,2.72 + ,3363.99 + ,14368.05 + ,10695.25 + ,13031 + ,-0.7 + ,-9 + ,2.6 + ,2.86 + ,3494.17 + ,15650.83 + ,10827.81 + ,13812 + ,0.2 + ,-5 + ,2.9 + ,2.99 + ,3667.03 + ,16102.64 + ,10872.48 + ,14544 + ,0.6 + ,-1 + ,2.6 + ,3.07 + ,3813.06 + ,16187.64 + ,10971.19 + ,14931 + ,2.2 + ,-2 + ,2.4 + ,2.96 + ,3917.96 + ,16311.54 + ,11145.65 + ,14886 + ,3.3 + ,-5 + ,1.7 + ,3.04 + ,3895.51 + ,17232.97 + ,11234.68 + ,16005 + ,5.3 + ,-4 + ,2 + ,3.3 + ,3801.06 + ,16397.83 + ,11333.88 + ,17064 + ,5.5 + ,-6 + ,2.2 + ,3.48 + ,3570.12 + ,14990.31 + ,10997.97 + ,15168 + ,6.3 + ,-2 + ,1.9 + ,3.46 + ,3701.61 + ,15147.55 + ,11036.89 + ,16050 + ,7.7 + ,-2 + ,1.6 + ,3.57 + ,3862.27 + ,15786.78 + ,11257.35 + ,15839 + ,6.5 + ,-2 + ,1.6 + ,3.6 + ,3970.1 + ,15934.09 + ,11533.59 + ,15137 + ,5.5 + ,-2 + ,1.2 + ,3.51 + ,4138.52 + ,16519.44 + ,11963.12 + ,14954 + ,6.9 + ,2 + ,1.2 + ,3.52 + ,4199.75 + ,16101.07 + ,12185.15 + ,15648 + ,5.7 + ,1 + ,1.5 + ,3.49 + ,4290.89 + ,16775.08 + ,12377.62 + ,15305 + ,6.9 + ,-8 + ,1.6 + ,3.5 + ,4443.91 + ,17286.32 + ,12512.89 + ,15579 + ,6.1 + ,-1 + ,1.7 + ,3.64 + ,4502.64 + ,17741.23 + ,12631.48 + ,16348 + ,4.8 + ,1 + ,1.8 + ,3.94 + ,4356.98 + ,17128.37 + ,12268.53 + ,15928 + ,3.7 + ,-1 + ,1.8 + ,3.94 + ,4591.27 + ,17460.53 + ,12754.8 + ,16171 + ,5.8 + ,2 + ,1.8 + ,3.91 + ,4696.96 + ,17611.14 + ,13407.75 + ,15937 + ,6.8 + ,2 + ,1.3 + ,3.88 + ,4621.4 + ,18001.37 + ,13480.21 + ,15713 + ,8.5 + ,1 + ,1.3 + ,4.21 + ,4562.84 + ,17974.77 + ,13673.28 + ,15594 + ,7.2 + ,-1 + ,1.4 + ,4.39 + ,4202.52 + ,16460.95 + ,13239.71 + ,15683 + ,5 + ,-2 + ,1.1 + ,4.33 + ,4296.49 + ,16235.39 + ,13557.69 + ,16438 + ,4.7 + ,-2 + ,1.5 + ,4.27 + ,4435.23 + ,16903.36 + ,13901.28 + ,17032 + ,2.3 + ,-1 + ,2.2 + ,4.29 + ,4105.18 + ,15543.76 + ,13200.58 + ,17696 + ,2.4 + ,-8 + ,2.9 + ,4.18 + ,4116.68 + ,15532.18 + ,13406.97 + ,17745 + ,0.1 + ,-4 + ,3.1 + ,4.14 + ,3844.49 + ,13731.31 + ,12538.12 + ,19394 + ,1.9 + ,-6 + ,3.5 + ,4.23 + ,3720.98 + ,13547.84 + ,12419.57 + ,20148 + ,1.7 + ,-3 + ,3.6 + ,4.07 + ,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.66 + ,3801.06 + ,13995.33 + ,12812.48 + ,18441 + ,0.5 + ,-9 + ,5.2 + ,3.92 + ,3504.37 + ,14084.6 + ,12056.67 + ,18391 + ,-1.3 + ,-11 + ,5.8 + ,4.45 + ,3032.6 + ,13168.91 + ,11322.38 + ,19178 + ,-3.3 + ,-13 + ,5.9 + ,4.92 + ,3047.03 + ,12989.35 + ,11530.75 + ,18079 + ,-2.8 + ,-11 + ,5.4 + ,4.9 + ,2962.34 + ,12123.53 + ,11114.08 + ,18483 + ,-8 + ,-9 + ,5.5 + ,4.54 + ,2197.82 + ,9117.03 + ,9181.73 + ,19644 + ,-13.9 + ,-17 + ,4.7 + ,4.53 + ,2014.45 + ,8531.45 + ,8614.55 + ,19195 + ,-21.9 + ,-22 + ,3.1 + ,4.14 + ,1862.83 + ,8460.94 + ,8595.56 + ,19650 + ,-28.8 + ,-25 + ,2.6 + ,4.05 + ,1905.41 + ,8331.49 + ,8396.2 + ,20830 + ,-27.6 + ,-20 + ,2.3 + ,3.92 + ,1810.99 + ,7694.78 + ,7690.5 + ,23595 + ,-31.4 + ,-24 + ,1.9 + ,3.68 + ,1670.07 + ,7764.58 + ,7235.47 + ,22937 + ,-31.8 + ,-24 + ,0.6 + ,3.35 + ,1864.44 + ,8767.96 + ,7992.12 + ,21814 + ,-29.4 + ,-22 + ,0.6 + ,3.38 + ,2052.02 + ,9304.43 + ,8398.37 + ,21928 + ,-27.6 + ,-19 + ,-0.4 + ,3.44 + ,2029.6 + ,9810.31 + ,8593 + ,21777 + ,-23.6 + ,-18 + ,-1.1 + ,3.5 + ,2070.83 + ,9691.12 + ,8679.75 + ,21383 + ,-22.8 + ,-17 + ,-1.7 + ,3.54 + ,2293.41 + ,10430.35 + ,9374.63 + ,21467 + ,-18.2 + ,-11 + ,-0.8 + ,3.52 + ,2443.27 + ,10302.87 + ,9634.97 + ,22052 + ,-17.8 + ,-11 + ,-1.2 + ,3.53 + ,2513.17 + ,10066.24 + ,9857.34 + ,22680 + ,-14.2 + ,-12 + ,-1 + ,3.55 + ,2466.92 + ,9633.83 + ,10238.83 + ,24320 + ,-8.8 + ,-10 + ,-0.1 + ,3.37 + ,2502.66 + ,10169.02 + ,10433.44 + ,24977 + ,-7.9 + ,-15 + ,0.3 + ,3.36) + ,dim=c(8 + ,132) + ,dimnames=list(c('BEL_20' + ,'Nikkei' + ,'DJ_Indust' + ,'Goudprijs' + ,'Conjunct_Seizoenzuiver' + ,'Cons_vertrouw' + ,'Alg_consumptie_index_BE' + ,'Gem_rente_kasbon_5j') + ,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_5j'),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 Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x 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_5j t 1 1.0 3.17 1 2 1.0 3.17 2 3 1.2 3.36 3 4 1.2 3.11 4 5 0.8 3.11 5 6 0.7 3.57 6 7 0.7 4.04 7 8 0.9 4.21 8 9 1.2 4.36 9 10 1.3 4.75 10 11 1.5 4.43 11 12 1.9 4.70 12 13 1.8 4.81 13 14 1.9 5.01 14 15 2.2 5.00 15 16 2.1 4.81 16 17 2.2 5.11 17 18 2.7 5.10 18 19 2.8 5.11 19 20 2.9 5.21 20 21 3.4 5.21 21 22 3.0 5.21 22 23 3.1 5.06 23 24 2.5 4.58 24 25 2.2 4.37 25 26 2.3 4.37 26 27 2.1 4.23 27 28 2.8 4.23 28 29 3.1 4.37 29 30 2.9 4.31 30 31 2.6 4.31 31 32 2.7 4.28 32 33 2.3 3.98 33 34 2.3 3.79 34 35 2.1 3.55 35 36 2.2 4.00 36 37 2.9 4.02 37 38 2.6 4.21 38 39 2.7 4.50 39 40 1.8 4.52 40 41 1.3 4.45 41 42 0.9 4.28 42 43 1.3 4.08 43 44 1.3 3.80 44 45 1.3 3.58 45 46 1.3 3.58 46 47 1.1 3.58 47 48 1.4 3.54 48 49 1.2 3.19 49 50 1.7 2.91 50 51 1.8 2.87 51 52 1.5 3.10 52 53 1.0 2.60 53 54 1.6 2.33 54 55 1.5 2.62 55 56 1.8 3.05 56 57 1.8 3.05 57 58 1.6 3.22 58 59 1.9 3.24 59 60 1.7 3.24 60 61 1.6 3.38 61 62 1.3 3.35 62 63 1.1 3.22 63 64 1.9 3.06 64 65 2.6 3.17 65 66 2.3 3.19 66 67 2.4 3.35 67 68 2.2 3.24 68 69 2.0 3.23 69 70 2.9 3.31 70 71 2.6 3.25 71 72 2.3 3.20 72 73 2.3 3.10 73 74 2.6 2.93 74 75 3.1 2.92 75 76 2.8 2.90 76 77 2.5 2.87 77 78 2.9 2.76 78 79 3.1 2.67 79 80 3.1 2.75 80 81 3.2 2.72 81 82 2.5 2.72 82 83 2.6 2.86 83 84 2.9 2.99 84 85 2.6 3.07 85 86 2.4 2.96 86 87 1.7 3.04 87 88 2.0 3.30 88 89 2.2 3.48 89 90 1.9 3.46 90 91 1.6 3.57 91 92 1.6 3.60 92 93 1.2 3.51 93 94 1.2 3.52 94 95 1.5 3.49 95 96 1.6 3.50 96 97 1.7 3.64 97 98 1.8 3.94 98 99 1.8 3.94 99 100 1.8 3.91 100 101 1.3 3.88 101 102 1.3 4.21 102 103 1.4 4.39 103 104 1.1 4.33 104 105 1.5 4.27 105 106 2.2 4.29 106 107 2.9 4.18 107 108 3.1 4.14 108 109 3.5 4.23 109 110 3.6 4.07 110 111 4.4 3.74 111 112 4.2 3.66 112 113 5.2 3.92 113 114 5.8 4.45 114 115 5.9 4.92 115 116 5.4 4.90 116 117 5.5 4.54 117 118 4.7 4.53 118 119 3.1 4.14 119 120 2.6 4.05 120 121 2.3 3.92 121 122 1.9 3.68 122 123 0.6 3.35 123 124 0.6 3.38 124 125 -0.4 3.44 125 126 -1.1 3.50 126 127 -1.7 3.54 127 128 -0.8 3.52 128 129 -1.2 3.53 129 130 -1.0 3.55 130 131 -0.1 3.37 131 132 0.3 3.36 132 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Nikkei DJ_Indust -1.453e+03 9.933e-02 3.616e-01 Goudprijs Conjunct_Seizoenzuiver Cons_vertrouw 1.626e-02 -1.168e+01 1.436e+01 Alg_consumptie_index_BE Gem_rente_kasbon_5j t 3.509e+01 -2.687e+02 1.109e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -594.672 -160.913 9.237 169.097 717.744 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.453e+03 3.386e+02 -4.292 3.56e-05 *** Nikkei 9.933e-02 1.744e-02 5.695 8.58e-08 *** DJ_Indust 3.616e-01 3.876e-02 9.328 5.67e-16 *** Goudprijs 1.626e-02 1.942e-02 0.838 0.4038 Conjunct_Seizoenzuiver -1.168e+01 7.124e+00 -1.639 0.1037 Cons_vertrouw 1.436e+01 6.637e+00 2.163 0.0325 * Alg_consumptie_index_BE 3.509e+01 2.302e+01 1.524 0.1300 Gem_rente_kasbon_5j -2.687e+02 5.610e+01 -4.791 4.70e-06 *** t 1.109e+00 2.561e+00 0.433 0.6657 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 261.4 on 123 degrees of freedom Multiple R-squared: 0.8869, Adjusted R-squared: 0.8795 F-statistic: 120.5 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,] 4.765751e-02 9.531501e-02 9.523425e-01 [2,] 2.021091e-02 4.042183e-02 9.797891e-01 [3,] 3.395080e-02 6.790161e-02 9.660492e-01 [4,] 3.180803e-02 6.361606e-02 9.681920e-01 [5,] 2.085549e-02 4.171098e-02 9.791445e-01 [6,] 1.340675e-02 2.681351e-02 9.865932e-01 [7,] 7.900953e-03 1.580191e-02 9.920990e-01 [8,] 8.180634e-03 1.636127e-02 9.918194e-01 [9,] 7.192952e-03 1.438590e-02 9.928070e-01 [10,] 4.738457e-03 9.476914e-03 9.952615e-01 [11,] 4.058275e-03 8.116550e-03 9.959417e-01 [12,] 2.449289e-03 4.898577e-03 9.975507e-01 [13,] 1.274195e-03 2.548390e-03 9.987258e-01 [14,] 6.173152e-04 1.234630e-03 9.993827e-01 [15,] 2.810503e-04 5.621007e-04 9.997189e-01 [16,] 1.202762e-04 2.405523e-04 9.998797e-01 [17,] 6.267286e-05 1.253457e-04 9.999373e-01 [18,] 5.274415e-05 1.054883e-04 9.999473e-01 [19,] 3.585489e-05 7.170978e-05 9.999641e-01 [20,] 2.788127e-05 5.576254e-05 9.999721e-01 [21,] 1.452817e-05 2.905634e-05 9.999855e-01 [22,] 8.300347e-06 1.660069e-05 9.999917e-01 [23,] 6.765606e-06 1.353121e-05 9.999932e-01 [24,] 4.277707e-06 8.555414e-06 9.999957e-01 [25,] 1.931183e-06 3.862367e-06 9.999981e-01 [26,] 8.757220e-07 1.751444e-06 9.999991e-01 [27,] 6.431314e-07 1.286263e-06 9.999994e-01 [28,] 3.517266e-07 7.034532e-07 9.999996e-01 [29,] 3.196984e-06 6.393967e-06 9.999968e-01 [30,] 6.998833e-06 1.399767e-05 9.999930e-01 [31,] 3.949281e-06 7.898561e-06 9.999961e-01 [32,] 2.368218e-06 4.736436e-06 9.999976e-01 [33,] 2.439611e-06 4.879221e-06 9.999976e-01 [34,] 2.896318e-06 5.792635e-06 9.999971e-01 [35,] 9.588479e-06 1.917696e-05 9.999904e-01 [36,] 2.392200e-05 4.784399e-05 9.999761e-01 [37,] 4.636473e-05 9.272945e-05 9.999536e-01 [38,] 8.228423e-05 1.645685e-04 9.999177e-01 [39,] 8.683825e-05 1.736765e-04 9.999132e-01 [40,] 6.902421e-05 1.380484e-04 9.999310e-01 [41,] 1.563031e-04 3.126061e-04 9.998437e-01 [42,] 2.331631e-04 4.663262e-04 9.997668e-01 [43,] 2.373796e-04 4.747592e-04 9.997626e-01 [44,] 4.376236e-04 8.752472e-04 9.995624e-01 [45,] 1.013169e-03 2.026339e-03 9.989868e-01 [46,] 1.475413e-03 2.950826e-03 9.985246e-01 [47,] 6.153527e-03 1.230705e-02 9.938465e-01 [48,] 7.503703e-03 1.500741e-02 9.924963e-01 [49,] 6.361311e-03 1.272262e-02 9.936387e-01 [50,] 7.337151e-03 1.467430e-02 9.926628e-01 [51,] 8.889906e-03 1.777981e-02 9.911101e-01 [52,] 2.568405e-02 5.136809e-02 9.743160e-01 [53,] 1.613115e-01 3.226230e-01 8.386885e-01 [54,] 3.787796e-01 7.575592e-01 6.212204e-01 [55,] 6.957846e-01 6.084307e-01 3.042154e-01 [56,] 8.716830e-01 2.566339e-01 1.283170e-01 [57,] 9.562453e-01 8.750943e-02 4.375472e-02 [58,] 9.884994e-01 2.300127e-02 1.150064e-02 [59,] 9.976621e-01 4.675882e-03 2.337941e-03 [60,] 9.992918e-01 1.416375e-03 7.081876e-04 [61,] 9.998523e-01 2.953898e-04 1.476949e-04 [62,] 9.999694e-01 6.125111e-05 3.062555e-05 [63,] 9.999929e-01 1.424647e-05 7.123233e-06 [64,] 9.999981e-01 3.738629e-06 1.869314e-06 [65,] 9.999993e-01 1.404137e-06 7.020683e-07 [66,] 9.999996e-01 8.756413e-07 4.378207e-07 [67,] 9.999996e-01 8.310719e-07 4.155360e-07 [68,] 9.999995e-01 1.055564e-06 5.277819e-07 [69,] 9.999994e-01 1.274664e-06 6.373318e-07 [70,] 9.999992e-01 1.592774e-06 7.963872e-07 [71,] 9.999990e-01 2.029575e-06 1.014787e-06 [72,] 9.999988e-01 2.411036e-06 1.205518e-06 [73,] 9.999997e-01 6.282345e-07 3.141172e-07 [74,] 9.999999e-01 1.451774e-07 7.258872e-08 [75,] 1.000000e+00 9.436403e-08 4.718202e-08 [76,] 9.999999e-01 1.303557e-07 6.517787e-08 [77,] 1.000000e+00 4.841593e-08 2.420796e-08 [78,] 1.000000e+00 6.184876e-09 3.092438e-09 [79,] 1.000000e+00 1.163034e-09 5.815168e-10 [80,] 1.000000e+00 1.105082e-09 5.525408e-10 [81,] 1.000000e+00 8.929081e-10 4.464541e-10 [82,] 1.000000e+00 6.836306e-10 3.418153e-10 [83,] 1.000000e+00 1.166190e-10 5.830951e-11 [84,] 1.000000e+00 1.005654e-11 5.028268e-12 [85,] 1.000000e+00 1.075700e-11 5.378501e-12 [86,] 1.000000e+00 8.630374e-12 4.315187e-12 [87,] 1.000000e+00 2.033770e-11 1.016885e-11 [88,] 1.000000e+00 6.532109e-11 3.266054e-11 [89,] 1.000000e+00 2.004779e-10 1.002389e-10 [90,] 1.000000e+00 6.363809e-10 3.181905e-10 [91,] 1.000000e+00 1.736842e-09 8.684210e-10 [92,] 1.000000e+00 3.515088e-09 1.757544e-09 [93,] 1.000000e+00 1.262348e-08 6.311738e-09 [94,] 1.000000e+00 4.586605e-08 2.293303e-08 [95,] 9.999999e-01 1.406416e-07 7.032081e-08 [96,] 9.999998e-01 4.491830e-07 2.245915e-07 [97,] 9.999996e-01 8.203620e-07 4.101810e-07 [98,] 9.999991e-01 1.702513e-06 8.512567e-07 [99,] 9.999984e-01 3.148125e-06 1.574063e-06 [100,] 9.999980e-01 3.988281e-06 1.994141e-06 [101,] 9.999922e-01 1.554341e-05 7.771705e-06 [102,] 9.999783e-01 4.345934e-05 2.172967e-05 [103,] 9.999554e-01 8.912201e-05 4.456100e-05 [104,] 9.998166e-01 3.667225e-04 1.833613e-04 [105,] 9.993154e-01 1.369154e-03 6.845768e-04 [106,] 9.980508e-01 3.898378e-03 1.949189e-03 [107,] 9.927955e-01 1.440909e-02 7.204546e-03 [108,] 9.992415e-01 1.516914e-03 7.584571e-04 [109,] 9.947159e-01 1.056821e-02 5.284105e-03 > postscript(file="/var/www/html/rcomp/tmp/1926s1291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2ku6d1291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3ku6d1291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4ku6d1291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5d35g1291653511.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 717.744002 650.530102 291.431083 -92.381807 -301.358905 -53.580756 7 8 9 10 11 12 -318.436994 -209.231895 -6.438907 5.002455 -106.483285 -211.581843 13 14 15 16 17 18 -463.625754 -472.960041 -524.698147 -594.671654 -183.314429 -178.904733 19 20 21 22 23 24 -90.095052 -50.916561 -57.202250 169.357552 157.729600 -25.107741 25 26 27 28 29 30 -8.761513 57.151033 169.009960 21.525621 -190.813054 -158.312145 31 32 33 34 35 36 107.049333 234.405150 502.808372 481.209497 309.383875 195.007646 37 38 39 40 41 42 219.848687 310.730966 36.871217 306.465768 295.560556 320.729317 43 44 45 46 47 48 386.825018 264.926062 280.343837 236.664206 163.582493 182.538294 49 50 51 52 53 54 64.191008 58.851943 -37.326113 20.863324 -158.878945 -468.883432 55 56 57 58 59 60 -416.329246 -288.210358 -463.649267 -295.445040 -328.509662 -430.428297 61 62 63 64 65 66 -491.255795 -410.201742 -417.012219 -478.380038 -278.022748 -455.459993 67 68 69 70 71 72 -236.057446 -188.992839 -100.982555 125.310830 59.434271 -8.990828 73 74 75 76 77 78 59.276425 -45.932988 -75.613096 136.922722 149.733898 64.923633 79 80 81 82 83 84 36.485480 91.589047 123.594995 127.608455 16.875705 -64.614942 85 86 87 88 89 90 13.472418 118.456840 249.559486 152.426335 159.134704 176.276635 91 92 93 94 95 96 319.056968 332.871665 314.656972 233.093742 224.952365 326.403239 97 98 99 100 101 102 298.445226 288.711681 356.761411 350.552773 229.028238 213.932606 103 104 105 106 107 108 147.422261 74.766237 29.107665 -95.086872 -1.080833 -167.016549 109 110 111 112 113 114 85.817243 -81.882612 -66.701355 -104.715445 -188.227029 -91.700623 115 116 117 118 119 120 -92.739111 -129.758050 -175.147247 109.061754 124.828226 -65.586037 121 122 123 124 125 126 -40.534029 99.977546 78.511760 -75.861800 -62.271232 -130.932700 127 128 129 130 131 132 -77.144121 -251.108998 -171.956198 -115.529658 -330.159933 -364.183947 > postscript(file="/var/www/html/rcomp/tmp/6d35g1291653511.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 717.744002 NA 1 650.530102 717.744002 2 291.431083 650.530102 3 -92.381807 291.431083 4 -301.358905 -92.381807 5 -53.580756 -301.358905 6 -318.436994 -53.580756 7 -209.231895 -318.436994 8 -6.438907 -209.231895 9 5.002455 -6.438907 10 -106.483285 5.002455 11 -211.581843 -106.483285 12 -463.625754 -211.581843 13 -472.960041 -463.625754 14 -524.698147 -472.960041 15 -594.671654 -524.698147 16 -183.314429 -594.671654 17 -178.904733 -183.314429 18 -90.095052 -178.904733 19 -50.916561 -90.095052 20 -57.202250 -50.916561 21 169.357552 -57.202250 22 157.729600 169.357552 23 -25.107741 157.729600 24 -8.761513 -25.107741 25 57.151033 -8.761513 26 169.009960 57.151033 27 21.525621 169.009960 28 -190.813054 21.525621 29 -158.312145 -190.813054 30 107.049333 -158.312145 31 234.405150 107.049333 32 502.808372 234.405150 33 481.209497 502.808372 34 309.383875 481.209497 35 195.007646 309.383875 36 219.848687 195.007646 37 310.730966 219.848687 38 36.871217 310.730966 39 306.465768 36.871217 40 295.560556 306.465768 41 320.729317 295.560556 42 386.825018 320.729317 43 264.926062 386.825018 44 280.343837 264.926062 45 236.664206 280.343837 46 163.582493 236.664206 47 182.538294 163.582493 48 64.191008 182.538294 49 58.851943 64.191008 50 -37.326113 58.851943 51 20.863324 -37.326113 52 -158.878945 20.863324 53 -468.883432 -158.878945 54 -416.329246 -468.883432 55 -288.210358 -416.329246 56 -463.649267 -288.210358 57 -295.445040 -463.649267 58 -328.509662 -295.445040 59 -430.428297 -328.509662 60 -491.255795 -430.428297 61 -410.201742 -491.255795 62 -417.012219 -410.201742 63 -478.380038 -417.012219 64 -278.022748 -478.380038 65 -455.459993 -278.022748 66 -236.057446 -455.459993 67 -188.992839 -236.057446 68 -100.982555 -188.992839 69 125.310830 -100.982555 70 59.434271 125.310830 71 -8.990828 59.434271 72 59.276425 -8.990828 73 -45.932988 59.276425 74 -75.613096 -45.932988 75 136.922722 -75.613096 76 149.733898 136.922722 77 64.923633 149.733898 78 36.485480 64.923633 79 91.589047 36.485480 80 123.594995 91.589047 81 127.608455 123.594995 82 16.875705 127.608455 83 -64.614942 16.875705 84 13.472418 -64.614942 85 118.456840 13.472418 86 249.559486 118.456840 87 152.426335 249.559486 88 159.134704 152.426335 89 176.276635 159.134704 90 319.056968 176.276635 91 332.871665 319.056968 92 314.656972 332.871665 93 233.093742 314.656972 94 224.952365 233.093742 95 326.403239 224.952365 96 298.445226 326.403239 97 288.711681 298.445226 98 356.761411 288.711681 99 350.552773 356.761411 100 229.028238 350.552773 101 213.932606 229.028238 102 147.422261 213.932606 103 74.766237 147.422261 104 29.107665 74.766237 105 -95.086872 29.107665 106 -1.080833 -95.086872 107 -167.016549 -1.080833 108 85.817243 -167.016549 109 -81.882612 85.817243 110 -66.701355 -81.882612 111 -104.715445 -66.701355 112 -188.227029 -104.715445 113 -91.700623 -188.227029 114 -92.739111 -91.700623 115 -129.758050 -92.739111 116 -175.147247 -129.758050 117 109.061754 -175.147247 118 124.828226 109.061754 119 -65.586037 124.828226 120 -40.534029 -65.586037 121 99.977546 -40.534029 122 78.511760 99.977546 123 -75.861800 78.511760 124 -62.271232 -75.861800 125 -130.932700 -62.271232 126 -77.144121 -130.932700 127 -251.108998 -77.144121 128 -171.956198 -251.108998 129 -115.529658 -171.956198 130 -330.159933 -115.529658 131 -364.183947 -330.159933 132 NA -364.183947 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 650.530102 717.744002 [2,] 291.431083 650.530102 [3,] -92.381807 291.431083 [4,] -301.358905 -92.381807 [5,] -53.580756 -301.358905 [6,] -318.436994 -53.580756 [7,] -209.231895 -318.436994 [8,] -6.438907 -209.231895 [9,] 5.002455 -6.438907 [10,] -106.483285 5.002455 [11,] -211.581843 -106.483285 [12,] -463.625754 -211.581843 [13,] -472.960041 -463.625754 [14,] -524.698147 -472.960041 [15,] -594.671654 -524.698147 [16,] -183.314429 -594.671654 [17,] -178.904733 -183.314429 [18,] -90.095052 -178.904733 [19,] -50.916561 -90.095052 [20,] -57.202250 -50.916561 [21,] 169.357552 -57.202250 [22,] 157.729600 169.357552 [23,] -25.107741 157.729600 [24,] -8.761513 -25.107741 [25,] 57.151033 -8.761513 [26,] 169.009960 57.151033 [27,] 21.525621 169.009960 [28,] -190.813054 21.525621 [29,] -158.312145 -190.813054 [30,] 107.049333 -158.312145 [31,] 234.405150 107.049333 [32,] 502.808372 234.405150 [33,] 481.209497 502.808372 [34,] 309.383875 481.209497 [35,] 195.007646 309.383875 [36,] 219.848687 195.007646 [37,] 310.730966 219.848687 [38,] 36.871217 310.730966 [39,] 306.465768 36.871217 [40,] 295.560556 306.465768 [41,] 320.729317 295.560556 [42,] 386.825018 320.729317 [43,] 264.926062 386.825018 [44,] 280.343837 264.926062 [45,] 236.664206 280.343837 [46,] 163.582493 236.664206 [47,] 182.538294 163.582493 [48,] 64.191008 182.538294 [49,] 58.851943 64.191008 [50,] -37.326113 58.851943 [51,] 20.863324 -37.326113 [52,] -158.878945 20.863324 [53,] -468.883432 -158.878945 [54,] -416.329246 -468.883432 [55,] -288.210358 -416.329246 [56,] -463.649267 -288.210358 [57,] -295.445040 -463.649267 [58,] -328.509662 -295.445040 [59,] -430.428297 -328.509662 [60,] -491.255795 -430.428297 [61,] -410.201742 -491.255795 [62,] -417.012219 -410.201742 [63,] -478.380038 -417.012219 [64,] -278.022748 -478.380038 [65,] -455.459993 -278.022748 [66,] -236.057446 -455.459993 [67,] -188.992839 -236.057446 [68,] -100.982555 -188.992839 [69,] 125.310830 -100.982555 [70,] 59.434271 125.310830 [71,] -8.990828 59.434271 [72,] 59.276425 -8.990828 [73,] -45.932988 59.276425 [74,] -75.613096 -45.932988 [75,] 136.922722 -75.613096 [76,] 149.733898 136.922722 [77,] 64.923633 149.733898 [78,] 36.485480 64.923633 [79,] 91.589047 36.485480 [80,] 123.594995 91.589047 [81,] 127.608455 123.594995 [82,] 16.875705 127.608455 [83,] -64.614942 16.875705 [84,] 13.472418 -64.614942 [85,] 118.456840 13.472418 [86,] 249.559486 118.456840 [87,] 152.426335 249.559486 [88,] 159.134704 152.426335 [89,] 176.276635 159.134704 [90,] 319.056968 176.276635 [91,] 332.871665 319.056968 [92,] 314.656972 332.871665 [93,] 233.093742 314.656972 [94,] 224.952365 233.093742 [95,] 326.403239 224.952365 [96,] 298.445226 326.403239 [97,] 288.711681 298.445226 [98,] 356.761411 288.711681 [99,] 350.552773 356.761411 [100,] 229.028238 350.552773 [101,] 213.932606 229.028238 [102,] 147.422261 213.932606 [103,] 74.766237 147.422261 [104,] 29.107665 74.766237 [105,] -95.086872 29.107665 [106,] -1.080833 -95.086872 [107,] -167.016549 -1.080833 [108,] 85.817243 -167.016549 [109,] -81.882612 85.817243 [110,] -66.701355 -81.882612 [111,] -104.715445 -66.701355 [112,] -188.227029 -104.715445 [113,] -91.700623 -188.227029 [114,] -92.739111 -91.700623 [115,] -129.758050 -92.739111 [116,] -175.147247 -129.758050 [117,] 109.061754 -175.147247 [118,] 124.828226 109.061754 [119,] -65.586037 124.828226 [120,] -40.534029 -65.586037 [121,] 99.977546 -40.534029 [122,] 78.511760 99.977546 [123,] -75.861800 78.511760 [124,] -62.271232 -75.861800 [125,] -130.932700 -62.271232 [126,] -77.144121 -130.932700 [127,] -251.108998 -77.144121 [128,] -171.956198 -251.108998 [129,] -115.529658 -171.956198 [130,] -330.159933 -115.529658 [131,] -364.183947 -330.159933 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 650.530102 717.744002 2 291.431083 650.530102 3 -92.381807 291.431083 4 -301.358905 -92.381807 5 -53.580756 -301.358905 6 -318.436994 -53.580756 7 -209.231895 -318.436994 8 -6.438907 -209.231895 9 5.002455 -6.438907 10 -106.483285 5.002455 11 -211.581843 -106.483285 12 -463.625754 -211.581843 13 -472.960041 -463.625754 14 -524.698147 -472.960041 15 -594.671654 -524.698147 16 -183.314429 -594.671654 17 -178.904733 -183.314429 18 -90.095052 -178.904733 19 -50.916561 -90.095052 20 -57.202250 -50.916561 21 169.357552 -57.202250 22 157.729600 169.357552 23 -25.107741 157.729600 24 -8.761513 -25.107741 25 57.151033 -8.761513 26 169.009960 57.151033 27 21.525621 169.009960 28 -190.813054 21.525621 29 -158.312145 -190.813054 30 107.049333 -158.312145 31 234.405150 107.049333 32 502.808372 234.405150 33 481.209497 502.808372 34 309.383875 481.209497 35 195.007646 309.383875 36 219.848687 195.007646 37 310.730966 219.848687 38 36.871217 310.730966 39 306.465768 36.871217 40 295.560556 306.465768 41 320.729317 295.560556 42 386.825018 320.729317 43 264.926062 386.825018 44 280.343837 264.926062 45 236.664206 280.343837 46 163.582493 236.664206 47 182.538294 163.582493 48 64.191008 182.538294 49 58.851943 64.191008 50 -37.326113 58.851943 51 20.863324 -37.326113 52 -158.878945 20.863324 53 -468.883432 -158.878945 54 -416.329246 -468.883432 55 -288.210358 -416.329246 56 -463.649267 -288.210358 57 -295.445040 -463.649267 58 -328.509662 -295.445040 59 -430.428297 -328.509662 60 -491.255795 -430.428297 61 -410.201742 -491.255795 62 -417.012219 -410.201742 63 -478.380038 -417.012219 64 -278.022748 -478.380038 65 -455.459993 -278.022748 66 -236.057446 -455.459993 67 -188.992839 -236.057446 68 -100.982555 -188.992839 69 125.310830 -100.982555 70 59.434271 125.310830 71 -8.990828 59.434271 72 59.276425 -8.990828 73 -45.932988 59.276425 74 -75.613096 -45.932988 75 136.922722 -75.613096 76 149.733898 136.922722 77 64.923633 149.733898 78 36.485480 64.923633 79 91.589047 36.485480 80 123.594995 91.589047 81 127.608455 123.594995 82 16.875705 127.608455 83 -64.614942 16.875705 84 13.472418 -64.614942 85 118.456840 13.472418 86 249.559486 118.456840 87 152.426335 249.559486 88 159.134704 152.426335 89 176.276635 159.134704 90 319.056968 176.276635 91 332.871665 319.056968 92 314.656972 332.871665 93 233.093742 314.656972 94 224.952365 233.093742 95 326.403239 224.952365 96 298.445226 326.403239 97 288.711681 298.445226 98 356.761411 288.711681 99 350.552773 356.761411 100 229.028238 350.552773 101 213.932606 229.028238 102 147.422261 213.932606 103 74.766237 147.422261 104 29.107665 74.766237 105 -95.086872 29.107665 106 -1.080833 -95.086872 107 -167.016549 -1.080833 108 85.817243 -167.016549 109 -81.882612 85.817243 110 -66.701355 -81.882612 111 -104.715445 -66.701355 112 -188.227029 -104.715445 113 -91.700623 -188.227029 114 -92.739111 -91.700623 115 -129.758050 -92.739111 116 -175.147247 -129.758050 117 109.061754 -175.147247 118 124.828226 109.061754 119 -65.586037 124.828226 120 -40.534029 -65.586037 121 99.977546 -40.534029 122 78.511760 99.977546 123 -75.861800 78.511760 124 -62.271232 -75.861800 125 -130.932700 -62.271232 126 -77.144121 -130.932700 127 -251.108998 -77.144121 128 -171.956198 -251.108998 129 -115.529658 -171.956198 130 -330.159933 -115.529658 131 -364.183947 -330.159933 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7nc411291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8nc411291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9yllm1291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10yllm1291653511.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11j4ka1291653511.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12440g1291653511.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/13t5fr1291653511.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/14mxxu1291653511.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/158fd01291653511.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16l7b91291653511.tab") + } > > try(system("convert tmp/1926s1291653511.ps tmp/1926s1291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/2ku6d1291653511.ps tmp/2ku6d1291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/3ku6d1291653511.ps tmp/3ku6d1291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/4ku6d1291653511.ps tmp/4ku6d1291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/5d35g1291653511.ps tmp/5d35g1291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/6d35g1291653511.ps tmp/6d35g1291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/7nc411291653511.ps tmp/7nc411291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/8nc411291653511.ps tmp/8nc411291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/9yllm1291653511.ps tmp/9yllm1291653511.png",intern=TRUE)) character(0) > try(system("convert tmp/10yllm1291653511.ps tmp/10yllm1291653511.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.780 1.730 8.647