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(2293.41 + ,10430.35 + ,9374.63 + ,21467 + ,-18.2 + ,-11 + ,-0.8 + ,3.52 + ,2443.27 + ,2513.17 + ,2466.92 + ,2502.66 + ,2070.83 + ,9691.12 + ,8679.75 + ,21383 + ,-22.8 + ,-17 + ,-1.7 + ,3.54 + ,2293.41 + ,2443.27 + ,2513.17 + ,2466.92 + ,2029.6 + ,9810.31 + ,8593 + ,21777 + ,-23.6 + ,-18 + ,-1.1 + ,3.5 + ,2070.83 + ,2293.41 + ,2443.27 + ,2513.17 + ,2052.02 + ,9304.43 + ,8398.37 + ,21928 + ,-27.6 + ,-19 + ,-0.4 + ,3.44 + ,2029.6 + ,2070.83 + ,2293.41 + ,2443.27 + ,1864.44 + ,8767.96 + ,7992.12 + ,21814 + ,-29.4 + ,-22 + ,0.6 + ,3.38 + ,2052.02 + ,2029.6 + ,2070.83 + ,2293.41 + ,1670.07 + ,7764.58 + ,7235.47 + ,22937 + ,-31.8 + ,-24 + ,0.6 + ,3.35 + ,1864.44 + ,2052.02 + ,2029.6 + ,2070.83 + ,1810.99 + ,7694.78 + ,7690.5 + ,23595 + ,-31.4 + ,-24 + ,1.9 + ,3.68 + ,1670.07 + ,1864.44 + ,2052.02 + ,2029.6 + ,1905.41 + ,8331.49 + ,8396.2 + ,20830 + ,-27.6 + ,-20 + ,2.3 + ,3.92 + ,1810.99 + ,1670.07 + ,1864.44 + ,2052.02 + ,1862.83 + ,8460.94 + ,8595.56 + ,19650 + ,-28.8 + ,-25 + ,2.6 + ,4.05 + ,1905.41 + ,1810.99 + ,1670.07 + ,1864.44 + ,2014.45 + ,8531.45 + ,8614.55 + ,19195 + ,-21.9 + ,-22 + ,3.1 + ,4.14 + ,1862.83 + ,1905.41 + ,1810.99 + ,1670.07 + ,2197.82 + ,9117.03 + ,9181.73 + ,19644 + ,-13.9 + ,-17 + ,4.7 + ,4.53 + ,2014.45 + ,1862.83 + ,1905.41 + ,1810.99 + ,2962.34 + ,12123.53 + ,11114.08 + ,18483 + ,-8 + ,-9 + ,5.5 + ,4.54 + ,2197.82 + ,2014.45 + ,1862.83 + ,1905.41 + ,3047.03 + ,12989.35 + ,11530.75 + ,18079 + ,-2.8 + ,-11 + ,5.4 + ,4.9 + ,2962.34 + ,2197.82 + ,2014.45 + ,1862.83 + ,3032.6 + ,13168.91 + ,11322.38 + ,19178 + ,-3.3 + ,-13 + ,5.9 + ,4.92 + ,3047.03 + ,2962.34 + ,2197.82 + ,2014.45 + ,3504.37 + ,14084.6 + ,12056.67 + ,18391 + ,-1.3 + ,-11 + ,5.8 + ,4.45 + ,3032.6 + ,3047.03 + ,2962.34 + ,2197.82 + ,3801.06 + ,13995.33 + ,12812.48 + ,18441 + ,0.5 + ,-9 + ,5.2 + ,3.92 + ,3504.37 + ,3032.6 + ,3047.03 + ,2962.34 + ,3857.62 + ,13357.7 + ,12656.63 + ,18584 + ,-1.9 + ,-7 + ,4.2 + ,3.66 + ,3801.06 + ,3504.37 + ,3032.6 + ,3047.03 + ,3674.4 + ,12602.93 + ,12193.88 + ,20108 + ,2 + ,-3 + ,4.4 + ,3.74 + ,3857.62 + ,3801.06 + ,3504.37 + ,3032.6 + ,3720.98 + ,13547.84 + ,12419.57 + ,20148 + ,1.7 + ,-3 + ,3.6 + ,4.07 + ,3674.4 + ,3857.62 + ,3801.06 + ,3504.37 + ,3844.49 + ,13731.31 + ,12538.12 + ,19394 + ,1.9 + ,-6 + ,3.5 + ,4.23 + ,3720.98 + ,3674.4 + ,3857.62 + ,3801.06 + ,4116.68 + ,15532.18 + ,13406.97 + ,17745 + ,0.1 + ,-4 + ,3.1 + ,4.14 + ,3844.49 + ,3720.98 + ,3674.4 + ,3857.62 + ,4105.18 + ,15543.76 + ,13200.58 + ,17696 + ,2.4 + ,-8 + ,2.9 + ,4.18 + ,4116.68 + ,3844.49 + ,3720.98 + ,3674.4 + ,4435.23 + ,16903.36 + ,13901.28 + ,17032 + ,2.3 + ,-1 + ,2.2 + ,4.29 + ,4105.18 + ,4116.68 + ,3844.49 + ,3720.98 + ,4296.49 + ,16235.39 + ,13557.69 + ,16438 + ,4.7 + ,-2 + ,1.5 + ,4.27 + ,4435.23 + ,4105.18 + ,4116.68 + ,3844.49 + ,4202.52 + ,16460.95 + ,13239.71 + ,15683 + ,5 + ,-2 + ,1.1 + ,4.33 + ,4296.49 + ,4435.23 + ,4105.18 + ,4116.68 + ,4562.84 + ,17974.77 + ,13673.28 + ,15594 + ,7.2 + ,-1 + ,1.4 + ,4.39 + ,4202.52 + ,4296.49 + ,4435.23 + ,4105.18 + ,4621.4 + ,18001.37 + ,13480.21 + ,15713 + ,8.5 + ,1 + ,1.3 + ,4.21 + ,4562.84 + ,4202.52 + ,4296.49 + ,4435.23 + ,4696.96 + ,17611.14 + ,13407.75 + ,15937 + ,6.8 + ,2 + ,1.3 + ,3.88 + ,4621.4 + ,4562.84 + ,4202.52 + ,4296.49 + ,4591.27 + ,17460.53 + ,12754.8 + ,16171 + ,5.8 + ,2 + ,1.8 + ,3.91 + ,4696.96 + ,4621.4 + ,4562.84 + ,4202.52 + ,4356.98 + ,17128.37 + ,12268.53 + ,15928 + ,3.7 + ,-1 + ,1.8 + ,3.94 + ,4591.27 + ,4696.96 + ,4621.4 + ,4562.84 + ,4502.64 + ,17741.23 + ,12631.48 + ,16348 + ,4.8 + ,1 + ,1.8 + ,3.94 + ,4356.98 + ,4591.27 + ,4696.96 + ,4621.4 + ,4443.91 + ,17286.32 + ,12512.89 + ,15579 + ,6.1 + ,-1 + ,1.7 + ,3.64 + ,4502.64 + ,4356.98 + ,4591.27 + ,4696.96 + ,4290.89 + ,16775.08 + ,12377.62 + ,15305 + ,6.9 + ,-8 + ,1.6 + ,3.5 + ,4443.91 + ,4502.64 + ,4356.98 + ,4591.27 + ,4199.75 + ,16101.07 + ,12185.15 + ,15648 + ,5.7 + ,1 + ,1.5 + ,3.49 + ,4290.89 + ,4443.91 + ,4502.64 + ,4356.98 + ,4138.52 + ,16519.44 + ,11963.12 + ,14954 + ,6.9 + ,2 + ,1.2 + ,3.52 + ,4199.75 + ,4290.89 + ,4443.91 + ,4502.64 + ,3970.1 + ,15934.09 + ,11533.59 + ,15137 + ,5.5 + ,-2 + ,1.2 + ,3.51 + ,4138.52 + ,4199.75 + ,4290.89 + ,4443.91 + ,3862.27 + ,15786.78 + ,11257.35 + ,15839 + ,6.5 + ,-2 + ,1.6 + ,3.6 + ,3970.1 + ,4138.52 + ,4199.75 + ,4290.89 + ,3701.61 + ,15147.55 + ,11036.89 + ,16050 + ,7.7 + ,-2 + ,1.6 + ,3.57 + ,3862.27 + ,3970.1 + ,4138.52 + ,4199.75 + ,3570.12 + ,14990.31 + ,10997.97 + ,15168 + ,6.3 + ,-2 + ,1.9 + ,3.46 + ,3701.61 + ,3862.27 + ,3970.1 + ,4138.52 + ,3801.06 + ,16397.83 + ,11333.88 + ,17064 + ,5.5 + ,-6 + ,2.2 + ,3.48 + ,3570.12 + ,3701.61 + ,3862.27 + ,3970.1 + ,3895.51 + ,17232.97 + ,11234.68 + ,16005 + ,5.3 + ,-4 + ,2 + ,3.3 + ,3801.06 + ,3570.12 + ,3701.61 + ,3862.27 + ,3917.96 + ,16311.54 + ,11145.65 + ,14886 + ,3.3 + ,-5 + ,1.7 + ,3.04 + ,3895.51 + ,3801.06 + ,3570.12 + ,3701.61 + ,3813.06 + ,16187.64 + ,10971.19 + ,14931 + ,2.2 + ,-2 + ,2.4 + ,2.96 + ,3917.96 + ,3895.51 + ,3801.06 + ,3570.12 + ,3667.03 + ,16102.64 + ,10872.48 + ,14544 + ,0.6 + ,-1 + ,2.6 + ,3.07 + ,3813.06 + ,3917.96 + ,3895.51 + ,3801.06 + ,3494.17 + ,15650.83 + ,10827.81 + ,13812 + ,0.2 + ,-5 + ,2.9 + ,2.99 + ,3667.03 + ,3813.06 + ,3917.96 + ,3895.51 + ,3363.99 + ,14368.05 + ,10695.25 + ,13031 + ,-0.7 + ,-9 + ,2.6 + ,2.86 + ,3494.17 + ,3667.03 + ,3813.06 + ,3917.96 + ,3295.32 + ,13392.79 + ,10324.31 + ,12574 + ,-1.7 + ,-8 + ,2.5 + ,2.72 + ,3363.99 + ,3494.17 + ,3667.03 + ,3813.06 + ,3277.01 + ,12986.62 + ,10532.54 + ,11964 + ,-3.7 + ,-14 + ,3.2 + ,2.72 + ,3295.32 + ,3363.99 + ,3494.17 + ,3667.03 + ,3257.16 + ,12204.98 + ,10554.27 + ,11451 + ,-7.6 + ,-10 + ,3.1 + ,2.75 + ,3277.01 + ,3295.32 + ,3363.99 + ,3494.17 + ,3161.69 + ,11716.87 + ,10545.38 + ,11346 + ,-8.2 + ,-11 + ,3.1 + ,2.67 + ,3257.16 + ,3277.01 + ,3295.32 + ,3363.99 + ,3097.31 + ,11402.75 + ,10486.64 + ,11353 + ,-7.5 + ,-11 + ,2.9 + ,2.76 + ,3161.69 + ,3257.16 + ,3277.01 + ,3295.32 + ,3061.26 + ,11082.38 + ,10377.18 + ,10702 + ,-8 + ,-11 + ,2.5 + ,2.87 + ,3097.31 + ,3161.69 + ,3257.16 + ,3277.01 + ,3119.31 + ,11395.64 + ,10283.19 + ,10646 + ,-6.9 + ,-5 + ,2.8 + ,2.9 + ,3061.26 + ,3097.31 + ,3161.69 + ,3257.16 + ,3106.22 + ,11809.38 + ,10682.06 + ,10556 + ,-4.2 + ,-2 + ,3.1 + ,2.92 + ,3119.31 + ,3061.26 + ,3097.31 + ,3161.69 + ,3080.58 + ,11545.71 + ,10723.78 + ,10463 + ,-3.6 + ,-3 + ,2.6 + ,2.93 + ,3106.22 + ,3119.31 + ,3061.26 + ,3097.31 + ,2981.85 + ,11394.84 + ,10539.51 + ,10407 + ,-1.8 + ,-6 + ,2.3 + ,3.1 + ,3080.58 + ,3106.22 + ,3119.31 + ,3061.26 + ,2921.44 + ,11068.05 + ,10673.38 + ,10625 + ,-3.2 + ,-6 + ,2.3 + ,3.2 + ,2981.85 + ,3080.58 + ,3106.22 + ,3119.31 + ,2849.27 + ,10973 + ,10411.75 + ,10872 + ,-1.3 + ,-7 + ,2.6 + ,3.25 + ,2921.44 + ,2981.85 + ,3080.58 + ,3106.22 + ,2756.76 + ,11028.93 + ,10001.6 + ,10805 + ,0.6 + ,-6 + ,2.9 + ,3.31 + ,2849.27 + ,2921.44 + ,2981.85 + ,3080.58 + ,2645.64 + ,11079.42 + ,10204.59 + ,10653 + ,1.2 + ,-2 + ,2 + ,3.23 + ,2756.76 + ,2849.27 + ,2921.44 + ,2981.85 + ,2497.84 + ,10989.34 + ,10032.8 + ,10574 + ,0.4 + ,-2 + ,2.2 + ,3.24 + ,2645.64 + ,2756.76 + ,2849.27 + ,2921.44 + ,2448.05 + ,11383.89 + ,10152.09 + ,10431 + ,3 + ,-4 + ,2.4 + ,3.35 + ,2497.84 + ,2645.64 + ,2756.76 + ,2849.27 + ,2454.62 + ,11527.72 + ,10364.91 + ,10383 + ,-0.4 + ,0 + ,2.3 + ,3.19 + ,2448.05 + ,2497.84 + ,2645.64 + ,2756.76 + ,2407.6 + ,11037.54 + ,10092.96 + ,10296 + ,0 + ,-6 + ,2.6 + ,3.17 + ,2454.62 + ,2448.05 + ,2497.84 + ,2645.64 + ,2472.81 + ,11950.95 + ,10418.4 + ,10872 + ,-1.3 + ,-4 + ,1.9 + ,3.06 + ,2407.6 + ,2454.62 + ,2448.05 + ,2497.84 + ,2408.64 + ,11441.08 + ,10323.73 + ,10635 + ,-3.1 + ,-3 + ,1.1 + ,3.22 + ,2472.81 + ,2407.6 + ,2454.62 + ,2448.05 + ,2440.25 + ,10631.92 + ,10601.61 + ,10297 + ,-4 + ,-1 + ,1.3 + ,3.35 + ,2408.64 + ,2472.81 + ,2407.6 + ,2454.62 + ,2350.44 + ,10892.76 + ,10540.05 + ,10570 + ,-4.9 + ,-3 + ,1.6 + ,3.38 + ,2440.25 + ,2408.64 + ,2472.81 + ,2407.6) + ,dim=c(12 + ,68) + ,dimnames=list(c('BEL_20' + ,'Nikkei' + ,'DJ_Indust' + ,'Goudprijs' + ,'Conjunct_Seizoenzuiver' + ,'Cons_vertrouw' + ,'Alg_consumptie_index_BE' + ,'Gem_rente_kasbon_5j' + ,'Y1' + ,'Y2' + ,'Y3' + ,'Y4') + ,1:68)) > y <- array(NA,dim=c(12,68),dimnames=list(c('BEL_20','Nikkei','DJ_Indust','Goudprijs','Conjunct_Seizoenzuiver','Cons_vertrouw','Alg_consumptie_index_BE','Gem_rente_kasbon_5j','Y1','Y2','Y3','Y4'),1:68)) > 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 = 'Include Monthly 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 2293.41 10430.35 9374.63 21467 -18.2 -11 2 2070.83 9691.12 8679.75 21383 -22.8 -17 3 2029.60 9810.31 8593.00 21777 -23.6 -18 4 2052.02 9304.43 8398.37 21928 -27.6 -19 5 1864.44 8767.96 7992.12 21814 -29.4 -22 6 1670.07 7764.58 7235.47 22937 -31.8 -24 7 1810.99 7694.78 7690.50 23595 -31.4 -24 8 1905.41 8331.49 8396.20 20830 -27.6 -20 9 1862.83 8460.94 8595.56 19650 -28.8 -25 10 2014.45 8531.45 8614.55 19195 -21.9 -22 11 2197.82 9117.03 9181.73 19644 -13.9 -17 12 2962.34 12123.53 11114.08 18483 -8.0 -9 13 3047.03 12989.35 11530.75 18079 -2.8 -11 14 3032.60 13168.91 11322.38 19178 -3.3 -13 15 3504.37 14084.60 12056.67 18391 -1.3 -11 16 3801.06 13995.33 12812.48 18441 0.5 -9 17 3857.62 13357.70 12656.63 18584 -1.9 -7 18 3674.40 12602.93 12193.88 20108 2.0 -3 19 3720.98 13547.84 12419.57 20148 1.7 -3 20 3844.49 13731.31 12538.12 19394 1.9 -6 21 4116.68 15532.18 13406.97 17745 0.1 -4 22 4105.18 15543.76 13200.58 17696 2.4 -8 23 4435.23 16903.36 13901.28 17032 2.3 -1 24 4296.49 16235.39 13557.69 16438 4.7 -2 25 4202.52 16460.95 13239.71 15683 5.0 -2 26 4562.84 17974.77 13673.28 15594 7.2 -1 27 4621.40 18001.37 13480.21 15713 8.5 1 28 4696.96 17611.14 13407.75 15937 6.8 2 29 4591.27 17460.53 12754.80 16171 5.8 2 30 4356.98 17128.37 12268.53 15928 3.7 -1 31 4502.64 17741.23 12631.48 16348 4.8 1 32 4443.91 17286.32 12512.89 15579 6.1 -1 33 4290.89 16775.08 12377.62 15305 6.9 -8 34 4199.75 16101.07 12185.15 15648 5.7 1 35 4138.52 16519.44 11963.12 14954 6.9 2 36 3970.10 15934.09 11533.59 15137 5.5 -2 37 3862.27 15786.78 11257.35 15839 6.5 -2 38 3701.61 15147.55 11036.89 16050 7.7 -2 39 3570.12 14990.31 10997.97 15168 6.3 -2 40 3801.06 16397.83 11333.88 17064 5.5 -6 41 3895.51 17232.97 11234.68 16005 5.3 -4 42 3917.96 16311.54 11145.65 14886 3.3 -5 43 3813.06 16187.64 10971.19 14931 2.2 -2 44 3667.03 16102.64 10872.48 14544 0.6 -1 45 3494.17 15650.83 10827.81 13812 0.2 -5 46 3363.99 14368.05 10695.25 13031 -0.7 -9 47 3295.32 13392.79 10324.31 12574 -1.7 -8 48 3277.01 12986.62 10532.54 11964 -3.7 -14 49 3257.16 12204.98 10554.27 11451 -7.6 -10 50 3161.69 11716.87 10545.38 11346 -8.2 -11 51 3097.31 11402.75 10486.64 11353 -7.5 -11 52 3061.26 11082.38 10377.18 10702 -8.0 -11 53 3119.31 11395.64 10283.19 10646 -6.9 -5 54 3106.22 11809.38 10682.06 10556 -4.2 -2 55 3080.58 11545.71 10723.78 10463 -3.6 -3 56 2981.85 11394.84 10539.51 10407 -1.8 -6 57 2921.44 11068.05 10673.38 10625 -3.2 -6 58 2849.27 10973.00 10411.75 10872 -1.3 -7 59 2756.76 11028.93 10001.60 10805 0.6 -6 60 2645.64 11079.42 10204.59 10653 1.2 -2 61 2497.84 10989.34 10032.80 10574 0.4 -2 62 2448.05 11383.89 10152.09 10431 3.0 -4 63 2454.62 11527.72 10364.91 10383 -0.4 0 64 2407.60 11037.54 10092.96 10296 0.0 -6 65 2472.81 11950.95 10418.40 10872 -1.3 -4 66 2408.64 11441.08 10323.73 10635 -3.1 -3 67 2440.25 10631.92 10601.61 10297 -4.0 -1 68 2350.44 10892.76 10540.05 10570 -4.9 -3 Alg_consumptie_index_BE Gem_rente_kasbon_5j Y1 Y2 Y3 Y4 1 -0.8 3.52 2443.27 2513.17 2466.92 2502.66 2 -1.7 3.54 2293.41 2443.27 2513.17 2466.92 3 -1.1 3.50 2070.83 2293.41 2443.27 2513.17 4 -0.4 3.44 2029.60 2070.83 2293.41 2443.27 5 0.6 3.38 2052.02 2029.60 2070.83 2293.41 6 0.6 3.35 1864.44 2052.02 2029.60 2070.83 7 1.9 3.68 1670.07 1864.44 2052.02 2029.60 8 2.3 3.92 1810.99 1670.07 1864.44 2052.02 9 2.6 4.05 1905.41 1810.99 1670.07 1864.44 10 3.1 4.14 1862.83 1905.41 1810.99 1670.07 11 4.7 4.53 2014.45 1862.83 1905.41 1810.99 12 5.5 4.54 2197.82 2014.45 1862.83 1905.41 13 5.4 4.90 2962.34 2197.82 2014.45 1862.83 14 5.9 4.92 3047.03 2962.34 2197.82 2014.45 15 5.8 4.45 3032.60 3047.03 2962.34 2197.82 16 5.2 3.92 3504.37 3032.60 3047.03 2962.34 17 4.2 3.66 3801.06 3504.37 3032.60 3047.03 18 4.4 3.74 3857.62 3801.06 3504.37 3032.60 19 3.6 4.07 3674.40 3857.62 3801.06 3504.37 20 3.5 4.23 3720.98 3674.40 3857.62 3801.06 21 3.1 4.14 3844.49 3720.98 3674.40 3857.62 22 2.9 4.18 4116.68 3844.49 3720.98 3674.40 23 2.2 4.29 4105.18 4116.68 3844.49 3720.98 24 1.5 4.27 4435.23 4105.18 4116.68 3844.49 25 1.1 4.33 4296.49 4435.23 4105.18 4116.68 26 1.4 4.39 4202.52 4296.49 4435.23 4105.18 27 1.3 4.21 4562.84 4202.52 4296.49 4435.23 28 1.3 3.88 4621.40 4562.84 4202.52 4296.49 29 1.8 3.91 4696.96 4621.40 4562.84 4202.52 30 1.8 3.94 4591.27 4696.96 4621.40 4562.84 31 1.8 3.94 4356.98 4591.27 4696.96 4621.40 32 1.7 3.64 4502.64 4356.98 4591.27 4696.96 33 1.6 3.50 4443.91 4502.64 4356.98 4591.27 34 1.5 3.49 4290.89 4443.91 4502.64 4356.98 35 1.2 3.52 4199.75 4290.89 4443.91 4502.64 36 1.2 3.51 4138.52 4199.75 4290.89 4443.91 37 1.6 3.60 3970.10 4138.52 4199.75 4290.89 38 1.6 3.57 3862.27 3970.10 4138.52 4199.75 39 1.9 3.46 3701.61 3862.27 3970.10 4138.52 40 2.2 3.48 3570.12 3701.61 3862.27 3970.10 41 2.0 3.30 3801.06 3570.12 3701.61 3862.27 42 1.7 3.04 3895.51 3801.06 3570.12 3701.61 43 2.4 2.96 3917.96 3895.51 3801.06 3570.12 44 2.6 3.07 3813.06 3917.96 3895.51 3801.06 45 2.9 2.99 3667.03 3813.06 3917.96 3895.51 46 2.6 2.86 3494.17 3667.03 3813.06 3917.96 47 2.5 2.72 3363.99 3494.17 3667.03 3813.06 48 3.2 2.72 3295.32 3363.99 3494.17 3667.03 49 3.1 2.75 3277.01 3295.32 3363.99 3494.17 50 3.1 2.67 3257.16 3277.01 3295.32 3363.99 51 2.9 2.76 3161.69 3257.16 3277.01 3295.32 52 2.5 2.87 3097.31 3161.69 3257.16 3277.01 53 2.8 2.90 3061.26 3097.31 3161.69 3257.16 54 3.1 2.92 3119.31 3061.26 3097.31 3161.69 55 2.6 2.93 3106.22 3119.31 3061.26 3097.31 56 2.3 3.10 3080.58 3106.22 3119.31 3061.26 57 2.3 3.20 2981.85 3080.58 3106.22 3119.31 58 2.6 3.25 2921.44 2981.85 3080.58 3106.22 59 2.9 3.31 2849.27 2921.44 2981.85 3080.58 60 2.0 3.23 2756.76 2849.27 2921.44 2981.85 61 2.2 3.24 2645.64 2756.76 2849.27 2921.44 62 2.4 3.35 2497.84 2645.64 2756.76 2849.27 63 2.3 3.19 2448.05 2497.84 2645.64 2756.76 64 2.6 3.17 2454.62 2448.05 2497.84 2645.64 65 1.9 3.06 2407.60 2454.62 2448.05 2497.84 66 1.1 3.22 2472.81 2407.60 2454.62 2448.05 67 1.3 3.35 2408.64 2472.81 2407.60 2454.62 68 1.6 3.38 2440.25 2408.64 2472.81 2407.60 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 1 0 0 0 0 0 0 0 0 0 0 1 2 0 1 0 0 0 0 0 0 0 0 0 2 3 0 0 1 0 0 0 0 0 0 0 0 3 4 0 0 0 1 0 0 0 0 0 0 0 4 5 0 0 0 0 1 0 0 0 0 0 0 5 6 0 0 0 0 0 1 0 0 0 0 0 6 7 0 0 0 0 0 0 1 0 0 0 0 7 8 0 0 0 0 0 0 0 1 0 0 0 8 9 0 0 0 0 0 0 0 0 1 0 0 9 10 0 0 0 0 0 0 0 0 0 1 0 10 11 0 0 0 0 0 0 0 0 0 0 1 11 12 0 0 0 0 0 0 0 0 0 0 0 12 13 1 0 0 0 0 0 0 0 0 0 0 13 14 0 1 0 0 0 0 0 0 0 0 0 14 15 0 0 1 0 0 0 0 0 0 0 0 15 16 0 0 0 1 0 0 0 0 0 0 0 16 17 0 0 0 0 1 0 0 0 0 0 0 17 18 0 0 0 0 0 1 0 0 0 0 0 18 19 0 0 0 0 0 0 1 0 0 0 0 19 20 0 0 0 0 0 0 0 1 0 0 0 20 21 0 0 0 0 0 0 0 0 1 0 0 21 22 0 0 0 0 0 0 0 0 0 1 0 22 23 0 0 0 0 0 0 0 0 0 0 1 23 24 0 0 0 0 0 0 0 0 0 0 0 24 25 1 0 0 0 0 0 0 0 0 0 0 25 26 0 1 0 0 0 0 0 0 0 0 0 26 27 0 0 1 0 0 0 0 0 0 0 0 27 28 0 0 0 1 0 0 0 0 0 0 0 28 29 0 0 0 0 1 0 0 0 0 0 0 29 30 0 0 0 0 0 1 0 0 0 0 0 30 31 0 0 0 0 0 0 1 0 0 0 0 31 32 0 0 0 0 0 0 0 1 0 0 0 32 33 0 0 0 0 0 0 0 0 1 0 0 33 34 0 0 0 0 0 0 0 0 0 1 0 34 35 0 0 0 0 0 0 0 0 0 0 1 35 36 0 0 0 0 0 0 0 0 0 0 0 36 37 1 0 0 0 0 0 0 0 0 0 0 37 38 0 1 0 0 0 0 0 0 0 0 0 38 39 0 0 1 0 0 0 0 0 0 0 0 39 40 0 0 0 1 0 0 0 0 0 0 0 40 41 0 0 0 0 1 0 0 0 0 0 0 41 42 0 0 0 0 0 1 0 0 0 0 0 42 43 0 0 0 0 0 0 1 0 0 0 0 43 44 0 0 0 0 0 0 0 1 0 0 0 44 45 0 0 0 0 0 0 0 0 1 0 0 45 46 0 0 0 0 0 0 0 0 0 1 0 46 47 0 0 0 0 0 0 0 0 0 0 1 47 48 0 0 0 0 0 0 0 0 0 0 0 48 49 1 0 0 0 0 0 0 0 0 0 0 49 50 0 1 0 0 0 0 0 0 0 0 0 50 51 0 0 1 0 0 0 0 0 0 0 0 51 52 0 0 0 1 0 0 0 0 0 0 0 52 53 0 0 0 0 1 0 0 0 0 0 0 53 54 0 0 0 0 0 1 0 0 0 0 0 54 55 0 0 0 0 0 0 1 0 0 0 0 55 56 0 0 0 0 0 0 0 1 0 0 0 56 57 0 0 0 0 0 0 0 0 1 0 0 57 58 0 0 0 0 0 0 0 0 0 1 0 58 59 0 0 0 0 0 0 0 0 0 0 1 59 60 0 0 0 0 0 0 0 0 0 0 0 60 61 1 0 0 0 0 0 0 0 0 0 0 61 62 0 1 0 0 0 0 0 0 0 0 0 62 63 0 0 1 0 0 0 0 0 0 0 0 63 64 0 0 0 1 0 0 0 0 0 0 0 64 65 0 0 0 0 1 0 0 0 0 0 0 65 66 0 0 0 0 0 1 0 0 0 0 0 66 67 0 0 0 0 0 0 1 0 0 0 0 67 68 0 0 0 0 0 0 0 1 0 0 0 68 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Nikkei DJ_Indust -4.372e+02 8.225e-02 1.576e-01 Goudprijs Conjunct_Seizoenzuiver Cons_vertrouw -3.563e-02 -4.971e+00 -5.058e-01 Alg_consumptie_index_BE Gem_rente_kasbon_5j Y1 5.582e+01 -3.284e+01 2.735e-01 Y2 Y3 Y4 -3.351e-03 1.190e-01 1.418e-01 M1 M2 M3 -5.372e+01 -4.017e+01 -2.681e+01 M4 M5 M6 5.333e+01 5.998e+01 4.995e+01 M7 M8 M9 7.631e+01 -6.061e+00 -7.705e+01 M10 M11 t -1.806e+01 1.763e+01 -9.752e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -147.45 -44.70 3.25 41.09 163.07 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -4.372e+02 5.575e+02 -0.784 0.4372 Nikkei 8.225e-02 1.240e-02 6.630 3.99e-08 *** DJ_Indust 1.576e-01 2.436e-02 6.470 6.87e-08 *** Goudprijs -3.563e-02 1.501e-02 -2.374 0.0220 * Conjunct_Seizoenzuiver -4.971e+00 5.318e+00 -0.935 0.3551 Cons_vertrouw -5.058e-01 5.081e+00 -0.100 0.9212 Alg_consumptie_index_BE 5.582e+01 1.196e+01 4.669 2.86e-05 *** Gem_rente_kasbon_5j -3.284e+01 4.463e+01 -0.736 0.4657 Y1 2.735e-01 1.059e-01 2.582 0.0132 * Y2 -3.351e-03 1.092e-01 -0.031 0.9757 Y3 1.190e-01 1.084e-01 1.097 0.2784 Y4 1.418e-01 7.886e-02 1.798 0.0790 . M1 -5.372e+01 5.038e+01 -1.066 0.2921 M2 -4.017e+01 5.143e+01 -0.781 0.4390 M3 -2.681e+01 5.017e+01 -0.534 0.5958 M4 5.333e+01 5.158e+01 1.034 0.3069 M5 5.998e+01 5.641e+01 1.063 0.2934 M6 4.995e+01 5.976e+01 0.836 0.4077 M7 7.631e+01 6.106e+01 1.250 0.2180 M8 -6.061e+00 5.575e+01 -0.109 0.9139 M9 -7.705e+01 5.490e+01 -1.403 0.1675 M10 -1.806e+01 5.320e+01 -0.340 0.7358 M11 1.763e+01 5.206e+01 0.339 0.7364 t -9.752e+00 3.709e+00 -2.629 0.0117 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 81.02 on 44 degrees of freedom Multiple R-squared: 0.994, Adjusted R-squared: 0.9909 F-statistic: 319.1 on 23 and 44 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.5790317 0.8419365884 0.4209682942 [2,] 0.6408512 0.7182976842 0.3591488421 [3,] 0.5475411 0.9049178408 0.4524589204 [4,] 0.7867525 0.4264950566 0.2132475283 [5,] 0.7887203 0.4225593547 0.2112796774 [6,] 0.8983987 0.2032025560 0.1016012780 [7,] 0.8293635 0.3412729965 0.1706364983 [8,] 0.9411475 0.1177049914 0.0588524957 [9,] 0.9201308 0.1597384311 0.0798692155 [10,] 0.8630241 0.2739517571 0.1369758786 [11,] 0.7714304 0.4571392590 0.2285696295 [12,] 0.7271688 0.5456624636 0.2728312318 [13,] 0.9997655 0.0004690728 0.0002345364 [14,] 0.9991798 0.0016404533 0.0008202267 [15,] 0.9950382 0.0099235240 0.0049617620 > postscript(file="/var/www/html/rcomp/tmp/1ceao1291584636.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/255991291584636.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/355991291584636.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/455991291584636.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/5fw8c1291584636.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 = 68 Frequency = 1 1 2 3 4 5 6 -20.6802764 -14.4032640 -18.4833785 -11.9368033 -119.1190411 22.0301437 7 8 9 10 11 12 99.7743894 10.5908405 -31.9670002 79.0285743 7.8407925 137.5752282 13 14 15 16 17 18 -43.8107613 -99.4759269 37.9593605 -67.2760347 20.9866940 -8.8106317 19 20 21 22 23 24 -88.5924031 14.5550432 15.2445814 -47.3689698 39.2929012 -74.4987868 25 26 27 28 29 30 -72.7101719 72.0533929 37.4671786 91.4092726 30.5569849 -128.5087378 31 32 33 34 35 36 -39.1922898 -14.6779142 27.4851252 46.4971230 -29.8651198 -14.8638646 37 38 39 40 41 42 85.4542156 69.9530816 -32.5206728 76.9346631 59.7623649 163.0672072 43 44 45 46 47 48 20.5492930 -54.8114934 -128.6685029 -147.4469688 -55.8639729 -60.3742124 49 50 51 52 53 54 59.8145100 24.2291044 47.1462596 6.8268121 71.5869385 -17.7843299 55 56 57 58 59 60 -0.3271783 67.4605790 117.9057964 69.2902413 38.5953990 12.1616356 61 62 63 64 65 66 -8.0675160 -52.3563880 -71.5687474 -95.9579099 -63.7739413 -29.9936515 67 68 7.7881887 -23.1170551 > postscript(file="/var/www/html/rcomp/tmp/6fw8c1291584636.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 = 68 Frequency = 1 lag(myerror, k = 1) myerror 0 -20.6802764 NA 1 -14.4032640 -20.6802764 2 -18.4833785 -14.4032640 3 -11.9368033 -18.4833785 4 -119.1190411 -11.9368033 5 22.0301437 -119.1190411 6 99.7743894 22.0301437 7 10.5908405 99.7743894 8 -31.9670002 10.5908405 9 79.0285743 -31.9670002 10 7.8407925 79.0285743 11 137.5752282 7.8407925 12 -43.8107613 137.5752282 13 -99.4759269 -43.8107613 14 37.9593605 -99.4759269 15 -67.2760347 37.9593605 16 20.9866940 -67.2760347 17 -8.8106317 20.9866940 18 -88.5924031 -8.8106317 19 14.5550432 -88.5924031 20 15.2445814 14.5550432 21 -47.3689698 15.2445814 22 39.2929012 -47.3689698 23 -74.4987868 39.2929012 24 -72.7101719 -74.4987868 25 72.0533929 -72.7101719 26 37.4671786 72.0533929 27 91.4092726 37.4671786 28 30.5569849 91.4092726 29 -128.5087378 30.5569849 30 -39.1922898 -128.5087378 31 -14.6779142 -39.1922898 32 27.4851252 -14.6779142 33 46.4971230 27.4851252 34 -29.8651198 46.4971230 35 -14.8638646 -29.8651198 36 85.4542156 -14.8638646 37 69.9530816 85.4542156 38 -32.5206728 69.9530816 39 76.9346631 -32.5206728 40 59.7623649 76.9346631 41 163.0672072 59.7623649 42 20.5492930 163.0672072 43 -54.8114934 20.5492930 44 -128.6685029 -54.8114934 45 -147.4469688 -128.6685029 46 -55.8639729 -147.4469688 47 -60.3742124 -55.8639729 48 59.8145100 -60.3742124 49 24.2291044 59.8145100 50 47.1462596 24.2291044 51 6.8268121 47.1462596 52 71.5869385 6.8268121 53 -17.7843299 71.5869385 54 -0.3271783 -17.7843299 55 67.4605790 -0.3271783 56 117.9057964 67.4605790 57 69.2902413 117.9057964 58 38.5953990 69.2902413 59 12.1616356 38.5953990 60 -8.0675160 12.1616356 61 -52.3563880 -8.0675160 62 -71.5687474 -52.3563880 63 -95.9579099 -71.5687474 64 -63.7739413 -95.9579099 65 -29.9936515 -63.7739413 66 7.7881887 -29.9936515 67 -23.1170551 7.7881887 68 NA -23.1170551 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -14.4032640 -20.6802764 [2,] -18.4833785 -14.4032640 [3,] -11.9368033 -18.4833785 [4,] -119.1190411 -11.9368033 [5,] 22.0301437 -119.1190411 [6,] 99.7743894 22.0301437 [7,] 10.5908405 99.7743894 [8,] -31.9670002 10.5908405 [9,] 79.0285743 -31.9670002 [10,] 7.8407925 79.0285743 [11,] 137.5752282 7.8407925 [12,] -43.8107613 137.5752282 [13,] -99.4759269 -43.8107613 [14,] 37.9593605 -99.4759269 [15,] -67.2760347 37.9593605 [16,] 20.9866940 -67.2760347 [17,] -8.8106317 20.9866940 [18,] -88.5924031 -8.8106317 [19,] 14.5550432 -88.5924031 [20,] 15.2445814 14.5550432 [21,] -47.3689698 15.2445814 [22,] 39.2929012 -47.3689698 [23,] -74.4987868 39.2929012 [24,] -72.7101719 -74.4987868 [25,] 72.0533929 -72.7101719 [26,] 37.4671786 72.0533929 [27,] 91.4092726 37.4671786 [28,] 30.5569849 91.4092726 [29,] -128.5087378 30.5569849 [30,] -39.1922898 -128.5087378 [31,] -14.6779142 -39.1922898 [32,] 27.4851252 -14.6779142 [33,] 46.4971230 27.4851252 [34,] -29.8651198 46.4971230 [35,] -14.8638646 -29.8651198 [36,] 85.4542156 -14.8638646 [37,] 69.9530816 85.4542156 [38,] -32.5206728 69.9530816 [39,] 76.9346631 -32.5206728 [40,] 59.7623649 76.9346631 [41,] 163.0672072 59.7623649 [42,] 20.5492930 163.0672072 [43,] -54.8114934 20.5492930 [44,] -128.6685029 -54.8114934 [45,] -147.4469688 -128.6685029 [46,] -55.8639729 -147.4469688 [47,] -60.3742124 -55.8639729 [48,] 59.8145100 -60.3742124 [49,] 24.2291044 59.8145100 [50,] 47.1462596 24.2291044 [51,] 6.8268121 47.1462596 [52,] 71.5869385 6.8268121 [53,] -17.7843299 71.5869385 [54,] -0.3271783 -17.7843299 [55,] 67.4605790 -0.3271783 [56,] 117.9057964 67.4605790 [57,] 69.2902413 117.9057964 [58,] 38.5953990 69.2902413 [59,] 12.1616356 38.5953990 [60,] -8.0675160 12.1616356 [61,] -52.3563880 -8.0675160 [62,] -71.5687474 -52.3563880 [63,] -95.9579099 -71.5687474 [64,] -63.7739413 -95.9579099 [65,] -29.9936515 -63.7739413 [66,] 7.7881887 -29.9936515 [67,] -23.1170551 7.7881887 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -14.4032640 -20.6802764 2 -18.4833785 -14.4032640 3 -11.9368033 -18.4833785 4 -119.1190411 -11.9368033 5 22.0301437 -119.1190411 6 99.7743894 22.0301437 7 10.5908405 99.7743894 8 -31.9670002 10.5908405 9 79.0285743 -31.9670002 10 7.8407925 79.0285743 11 137.5752282 7.8407925 12 -43.8107613 137.5752282 13 -99.4759269 -43.8107613 14 37.9593605 -99.4759269 15 -67.2760347 37.9593605 16 20.9866940 -67.2760347 17 -8.8106317 20.9866940 18 -88.5924031 -8.8106317 19 14.5550432 -88.5924031 20 15.2445814 14.5550432 21 -47.3689698 15.2445814 22 39.2929012 -47.3689698 23 -74.4987868 39.2929012 24 -72.7101719 -74.4987868 25 72.0533929 -72.7101719 26 37.4671786 72.0533929 27 91.4092726 37.4671786 28 30.5569849 91.4092726 29 -128.5087378 30.5569849 30 -39.1922898 -128.5087378 31 -14.6779142 -39.1922898 32 27.4851252 -14.6779142 33 46.4971230 27.4851252 34 -29.8651198 46.4971230 35 -14.8638646 -29.8651198 36 85.4542156 -14.8638646 37 69.9530816 85.4542156 38 -32.5206728 69.9530816 39 76.9346631 -32.5206728 40 59.7623649 76.9346631 41 163.0672072 59.7623649 42 20.5492930 163.0672072 43 -54.8114934 20.5492930 44 -128.6685029 -54.8114934 45 -147.4469688 -128.6685029 46 -55.8639729 -147.4469688 47 -60.3742124 -55.8639729 48 59.8145100 -60.3742124 49 24.2291044 59.8145100 50 47.1462596 24.2291044 51 6.8268121 47.1462596 52 71.5869385 6.8268121 53 -17.7843299 71.5869385 54 -0.3271783 -17.7843299 55 67.4605790 -0.3271783 56 117.9057964 67.4605790 57 69.2902413 117.9057964 58 38.5953990 69.2902413 59 12.1616356 38.5953990 60 -8.0675160 12.1616356 61 -52.3563880 -8.0675160 62 -71.5687474 -52.3563880 63 -95.9579099 -71.5687474 64 -63.7739413 -95.9579099 65 -29.9936515 -63.7739413 66 7.7881887 -29.9936515 67 -23.1170551 7.7881887 > 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/78nqf1291584636.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/88nqf1291584636.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/9jx701291584636.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/10jx701291584636.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/11mx561291584636.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/1207lw1291584636.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/137qi81291584636.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/14zzhb1291584636.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/15liyh1291584636.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/16zrwq1291584636.tab") + } > > try(system("convert tmp/1ceao1291584636.ps tmp/1ceao1291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/255991291584636.ps tmp/255991291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/355991291584636.ps tmp/355991291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/455991291584636.ps tmp/455991291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/5fw8c1291584636.ps tmp/5fw8c1291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/6fw8c1291584636.ps tmp/6fw8c1291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/78nqf1291584636.ps tmp/78nqf1291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/88nqf1291584636.ps tmp/88nqf1291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/9jx701291584636.ps tmp/9jx701291584636.png",intern=TRUE)) character(0) > try(system("convert tmp/10jx701291584636.ps tmp/10jx701291584636.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.615 1.640 6.016