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(3.04 + ,493 + ,9 + ,3.030 + ,9.026 + ,25.64 + ,104.8 + ,3.28 + ,481 + ,11 + ,2.803 + ,9.787 + ,27.97 + ,105.2 + ,3.51 + ,462 + ,13 + ,2.768 + ,9.536 + ,27.62 + ,105.6 + ,3.69 + ,457 + ,12 + ,2.883 + ,9.490 + ,23.31 + ,105.8 + ,3.92 + ,442 + ,13 + ,2.863 + ,9.736 + ,29.07 + ,106.1 + ,4.29 + ,439 + ,15 + ,2.897 + ,9.694 + ,29.58 + ,106.5 + ,4.31 + ,488 + ,13 + ,3.013 + ,9.647 + ,28.63 + ,106.71 + ,4.42 + ,521 + ,16 + ,3.143 + ,9.753 + ,29.92 + ,106.68 + ,4.59 + ,501 + ,10 + ,3.033 + ,10.070 + ,32.68 + ,107.41 + ,4.76 + ,485 + ,14 + ,3.046 + ,10.137 + ,31.54 + ,107.15 + ,4.83 + ,464 + ,14 + ,3.111 + ,9.984 + ,32.43 + ,107.5 + ,4.83 + ,460 + ,45 + ,3.013 + ,9.732 + ,26.54 + ,107.22 + ,4.76 + ,467 + ,13 + ,2.987 + ,9.103 + ,25.85 + ,107.11 + ,4.99 + ,460 + ,8 + ,2.996 + ,9.155 + ,27.60 + ,107.57 + ,4.78 + ,448 + ,7 + ,2.833 + ,9.308 + ,25.71 + ,107.81 + ,5.06 + ,443 + ,3 + ,2.849 + ,9.394 + ,25.38 + ,108.75 + ,4.65 + ,436 + ,3 + ,2.795 + ,9.948 + ,28.57 + ,109.43 + ,4.54 + ,431 + ,4 + ,2.845 + ,10.177 + ,27.64 + ,109.62 + ,4.51 + ,484 + ,4 + ,2.915 + ,10.002 + ,25.36 + ,109.54 + ,4.49 + ,510 + ,0 + ,2.893 + ,9.728 + ,25.90 + ,109.53 + ,3.99 + ,513 + ,-4 + ,2.604 + ,10.002 + ,26.29 + ,109.84 + ,3.97 + ,503 + ,-14 + ,2.642 + ,10.063 + ,21.74 + ,109.67 + ,3.51 + ,471 + ,-18 + ,2.660 + ,10.018 + ,19.20 + ,109.79 + ,3.34 + ,471 + ,-8 + ,2.639 + ,9.960 + ,19.32 + ,109.56 + ,3.29 + ,476 + ,-1 + ,2.720 + ,10.236 + ,19.82 + ,110.22 + ,3.28 + ,475 + ,1 + ,2.746 + ,10.893 + ,20.36 + ,110.4 + ,3.26 + ,470 + ,2 + ,2.736 + ,10.756 + ,24.31 + ,110.69 + ,3.32 + ,461 + ,0 + ,2.812 + ,10.940 + ,25.97 + ,110.72 + ,3.31 + ,455 + ,1 + ,2.799 + ,10.997 + ,25.61 + ,110.89 + ,3.35 + ,456 + ,0 + ,2.555 + ,10.827 + ,24.67 + ,110.58 + ,3.30 + ,517 + ,-1 + ,2.305 + ,10.166 + ,25.59 + ,110.94 + ,3.29 + ,525 + ,-3 + ,2.215 + ,10.186 + ,26.09 + ,110.91 + ,3.32 + ,523 + ,-3 + ,2.066 + ,10.457 + ,28.37 + ,111.22 + ,3.30 + ,519 + ,-3 + ,1.940 + ,10.368 + ,27.34 + ,111.09 + ,3.30 + ,509 + ,-4 + ,2.042 + ,10.244 + ,24.46 + ,111 + ,3.09 + ,512 + ,-8 + ,1.995 + ,10.511 + ,27.46 + ,111.06 + ,2.79 + ,519 + ,-9 + ,1.947 + ,10.812 + ,30.23 + ,111.55 + ,2.76 + ,517 + ,-13 + ,1.766 + ,10.738 + ,32.33 + ,112.32 + ,2.75 + ,510 + ,-18 + ,1.635 + ,10.171 + ,29.87 + ,112.64 + ,2.56 + ,509 + ,-11 + ,1.833 + ,9.721 + ,24.87 + ,112.36 + ,2.56 + ,501 + ,-9 + ,1.910 + ,9.897 + ,25.48 + ,112.04 + ,2.21 + ,507 + ,-10 + ,1.960 + ,9.828 + ,27.28 + ,112.37 + ,2.08 + ,569 + ,-13 + ,1.970 + ,9.924 + ,28.24 + ,112.59 + ,2.10 + ,580 + ,-11 + ,2.061 + ,10.371 + ,29.58 + ,112.89 + ,2.02 + ,578 + ,-5 + ,2.093 + ,10.846 + ,26.95 + ,113.22 + ,2.01 + ,565 + ,-15 + ,2.121 + ,10.413 + ,29.08 + ,112.85 + ,1.97 + ,547 + ,-6 + ,2.175 + ,10.709 + ,28.76 + ,113.06 + ,2.06 + ,555 + ,-6 + ,2.197 + ,10.662 + ,29.59 + ,112.99 + ,2.02 + ,562 + ,-3 + ,2.350 + ,10.570 + ,30.70 + ,113.32 + ,2.03 + ,561 + ,-1 + ,2.440 + ,10.297 + ,30.52 + ,113.74 + ,2.01 + ,555 + ,-3 + ,2.409 + ,10.635 + ,32.67 + ,113.91 + ,2.08 + ,544 + ,-4 + ,2.473 + ,10.872 + ,33.19 + ,114.52 + ,2.02 + ,537 + ,-6 + ,2.408 + ,10.296 + ,37.13 + ,114.96 + ,2.03 + ,543 + ,0 + ,2.455 + ,10.383 + ,35.54 + ,114.91 + ,2.07 + ,594 + ,-4 + ,2.448 + ,10.431 + ,37.75 + ,115.3 + ,2.04 + ,611 + ,-2 + ,2.498 + ,10.574 + ,41.84 + ,115.44 + ,2.05 + ,613 + ,-2 + ,2.646 + ,10.653 + ,42.94 + ,115.52 + ,2.11 + ,611 + ,-6 + ,2.757 + ,10.805 + ,49.14 + ,116.08 + ,2.09 + ,594 + ,-7 + ,2.849 + ,10.872 + ,44.61 + ,115.94 + ,2.05 + ,595 + ,-6 + ,2.921 + ,10.625 + ,40.22 + ,115.56 + ,2.08 + ,591 + ,-6 + ,2.982 + ,10.407 + ,44.23 + ,115.88 + ,2.06 + ,589 + ,-3 + ,3.081 + ,10.463 + ,45.85 + ,116.66 + ,2.06 + ,584 + ,-2 + ,3.106 + ,10.556 + ,53.38 + ,117.41 + ,2.08 + ,573 + ,-5 + ,3.119 + ,10.646 + ,53.26 + ,117.68 + ,2.07 + ,567 + ,-11 + ,3.061 + ,10.702 + ,51.80 + ,117.85 + ,2.06 + ,569 + ,-11 + ,3.097 + ,11.353 + ,55.30 + ,118.21 + ,2.07 + ,621 + ,-11 + ,3.162 + ,11.346 + ,57.81 + ,118.92 + ,2.06 + ,629 + ,-10 + ,3.257 + ,11.451 + ,63.96 + ,119.03 + ,2.09 + ,628 + ,-14 + ,3.277 + ,11.964 + ,63.77 + ,119.17 + ,2.07 + ,612 + ,-8 + ,3.295 + ,12.574 + ,59.15 + ,118.95 + ,2.09 + ,595 + ,-9 + ,3.364 + ,13.031 + ,56.12 + ,118.92 + ,2.28 + ,597 + ,-5 + ,3.494 + ,13.812 + ,57.42 + ,118.9 + ,2.33 + ,593 + ,-1 + ,3.667 + ,14.544 + ,63.52 + ,118.92 + ,2.35 + ,590 + ,-2 + ,3.813 + ,14.931 + ,61.71 + ,119.44 + ,2.52 + ,580 + ,-5 + ,3.918 + ,14.886 + ,63.01 + ,119.40 + ,2.63 + ,574 + ,-4 + ,3.896 + ,16.005 + ,68.18 + ,119.98 + ,2.58 + ,573 + ,-6 + ,3.801 + ,17.064 + ,72.03 + ,120.43 + ,2.70 + ,573 + ,-2 + ,3.570 + ,15.168 + ,69.75 + ,120.41 + ,2.81 + ,620 + ,-2 + ,3.702 + ,16.050 + ,74.41 + ,120.82 + ,2.97 + ,626 + ,-2 + ,3.862 + ,15.839 + ,74.33 + ,120.97 + ,3.04 + ,620 + ,-2 + ,3.970 + ,15.137 + ,64.24 + ,120.63 + ,3.28 + ,588 + ,2 + ,4.139 + ,14.954 + ,60.03 + ,120.38 + ,3.33 + ,566 + ,1 + ,4.200 + ,15.648 + ,59.44 + ,120.68 + ,3.50 + ,557 + ,-8 + ,4.291 + ,15.305 + ,62.50 + ,120.84 + ,3.56 + ,561 + ,-1 + ,4.444 + ,15.579 + ,55.04 + ,120.90 + ,3.57 + ,549 + ,1 + ,4.503 + ,16.348 + ,58.34 + ,121.56 + ,3.69 + ,532 + ,-1 + ,4.357 + ,15.928 + ,61.92 + ,121.57 + ,3.82 + ,526 + ,2 + ,4.591 + ,16.171 + ,67.65 + ,122.12 + ,3.79 + ,511 + ,2 + ,4.697 + ,15.937 + ,67.68 + ,121.97 + ,3.96 + ,499 + ,1 + ,4.621 + ,15.713 + ,70.30 + ,121.96 + ,4.06 + ,555 + ,-1 + ,4.563 + ,15.594 + ,75.26 + ,122.48 + ,4.05 + ,565 + ,-2 + ,4.203 + ,15.683 + ,71.44 + ,122.33 + ,4.03 + ,542 + ,-2 + ,4.296 + ,16.438 + ,76.36 + ,122.44 + ,3.94 + ,527 + ,-1 + ,4.435 + ,17.032 + ,81.71 + ,123.08 + ,4.02 + ,510 + ,-8 + ,4.105 + ,17.696 + ,92.60 + ,124.23 + ,3.88 + ,514 + ,-4 + ,4.117 + ,17.745 + ,90.60 + ,124.58 + ,4.02 + ,517 + ,-6 + ,3.844 + ,19.394 + ,92.23 + ,125.08 + ,4.03 + ,508 + ,-3 + ,3.721 + ,20.148 + ,94.09 + ,125.98 + ,4.09 + ,493 + ,-3 + ,3.674 + ,20.108 + ,102.79 + ,126.90 + ,3.99 + ,490 + ,-7 + ,3.858 + ,18.584 + ,109.65 + ,127.19 + ,4.01 + ,469 + ,-9 + ,3.801 + ,18.441 + ,124.05 + ,128.33 + ,4.01 + ,478 + ,-11 + ,3.504 + ,18.391 + ,132.69 + ,129.04 + ,4.19 + ,528 + ,-13 + ,3.033 + ,19.178 + ,135.81 + ,129.72 + ,4.30 + ,534 + ,-11 + ,3.047 + ,18.079 + ,116.07 + ,128.92 + ,4.27 + ,518 + ,-9 + ,2.962 + ,18.483 + ,101.42 + ,129.13 + ,3.82 + ,506 + ,-17 + ,2.198 + ,19.644 + ,75.73 + ,128.90 + ,3.15 + ,502 + ,-22 + ,2.014 + ,19.195 + ,55.48 + ,128.13 + ,2.49 + ,516 + ,-25 + ,1.863 + ,19.650 + ,43.80 + ,127.85 + ,1.81 + ,528 + ,-20 + ,1.905 + ,20.830 + ,45.29 + ,127.98 + ,1.26 + ,533 + ,-24 + ,1.811 + ,23.595 + ,44.01 + ,128.42 + ,1.06 + ,536 + ,-24 + ,1.670 + ,22.937 + ,47.48 + ,127.68 + ,0.84 + ,537 + ,-22 + ,1.864 + ,21.814 + ,51.07 + ,127.95 + ,0.78 + ,524 + ,-19 + ,2.052 + ,21.928 + ,57.84 + ,127.85 + ,0.70 + ,536 + ,-18 + ,2.030 + ,21.777 + ,69.04 + ,127.61 + ,0.36 + ,587 + ,-17 + ,2.071 + ,21.383 + ,65.61 + ,127.53 + ,0.35 + ,597 + ,-11 + ,2.293 + ,21.467 + ,72.87 + ,127.92 + ,0.36 + ,581 + ,-11 + ,2.443 + ,22.052 + ,68.41 + ,127.59 + ,0.36 + ,564 + ,-12 + ,2.513 + ,22.680 + ,73.25 + ,127.65 + ,0.36 + ,558 + ,-10 + ,2.467 + ,24.320 + ,77.43 + ,127.98 + ,0.35 + ,575 + ,-15 + ,2.503 + ,24.977 + ,75.28 + ,128.19 + ,0.34 + ,580 + ,-15 + ,2.540 + ,25.204 + ,77.33 + ,128.77 + ,0.34 + ,575 + ,-15 + ,2.483 + ,25.739 + ,74.31 + ,129.31 + ,0.35 + ,563 + ,-13 + ,2.626 + ,26.434 + ,79.70 + ,129.80 + ,0.35 + ,552 + ,-8 + ,2.656 + ,27.525 + ,85.47 + ,130.24 + ,0.34 + ,537 + ,-13 + ,2.447 + ,30.695 + ,77.98 + ,130.76 + ,0.35 + ,545 + ,-9 + ,2.467 + ,32.436 + ,75.69 + ,130.75 + ,0.48 + ,601 + ,-7 + ,2.462 + ,30.160 + ,75.20 + ,130.81 + ,0.43 + ,604 + ,-4 + ,2.505 + ,30.236 + ,77.21 + ,130.89 + ,0.45 + ,586 + ,-4 + ,2.579 + ,31.293 + ,77.85 + ,131.30 + ,0.70 + ,564 + ,-2 + ,2.649 + ,31.077 + ,83.53 + ,131.49 + ,0.59 + ,549 + ,0 + ,2.637 + ,32.226 + ,85.99 + ,131.65) + ,dim=c(7 + ,131) + ,dimnames=list(c('Eonia' + ,'Werkloosheid' + ,'Consumentenvertrouwen' + ,'BEL20' + ,'Goudprijs' + ,'Olieprijs' + ,'CPI') + ,1:131)) > y <- array(NA,dim=c(7,131),dimnames=list(c('Eonia','Werkloosheid','Consumentenvertrouwen','BEL20','Goudprijs','Olieprijs','CPI'),1:131)) > 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 = '4' > #'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 BEL20 Eonia Werkloosheid Consumentenvertrouwen Goudprijs Olieprijs CPI 1 3.030 3.04 493 9 9.026 25.64 104.80 2 2.803 3.28 481 11 9.787 27.97 105.20 3 2.768 3.51 462 13 9.536 27.62 105.60 4 2.883 3.69 457 12 9.490 23.31 105.80 5 2.863 3.92 442 13 9.736 29.07 106.10 6 2.897 4.29 439 15 9.694 29.58 106.50 7 3.013 4.31 488 13 9.647 28.63 106.71 8 3.143 4.42 521 16 9.753 29.92 106.68 9 3.033 4.59 501 10 10.070 32.68 107.41 10 3.046 4.76 485 14 10.137 31.54 107.15 11 3.111 4.83 464 14 9.984 32.43 107.50 12 3.013 4.83 460 45 9.732 26.54 107.22 13 2.987 4.76 467 13 9.103 25.85 107.11 14 2.996 4.99 460 8 9.155 27.60 107.57 15 2.833 4.78 448 7 9.308 25.71 107.81 16 2.849 5.06 443 3 9.394 25.38 108.75 17 2.795 4.65 436 3 9.948 28.57 109.43 18 2.845 4.54 431 4 10.177 27.64 109.62 19 2.915 4.51 484 4 10.002 25.36 109.54 20 2.893 4.49 510 0 9.728 25.90 109.53 21 2.604 3.99 513 -4 10.002 26.29 109.84 22 2.642 3.97 503 -14 10.063 21.74 109.67 23 2.660 3.51 471 -18 10.018 19.20 109.79 24 2.639 3.34 471 -8 9.960 19.32 109.56 25 2.720 3.29 476 -1 10.236 19.82 110.22 26 2.746 3.28 475 1 10.893 20.36 110.40 27 2.736 3.26 470 2 10.756 24.31 110.69 28 2.812 3.32 461 0 10.940 25.97 110.72 29 2.799 3.31 455 1 10.997 25.61 110.89 30 2.555 3.35 456 0 10.827 24.67 110.58 31 2.305 3.30 517 -1 10.166 25.59 110.94 32 2.215 3.29 525 -3 10.186 26.09 110.91 33 2.066 3.32 523 -3 10.457 28.37 111.22 34 1.940 3.30 519 -3 10.368 27.34 111.09 35 2.042 3.30 509 -4 10.244 24.46 111.00 36 1.995 3.09 512 -8 10.511 27.46 111.06 37 1.947 2.79 519 -9 10.812 30.23 111.55 38 1.766 2.76 517 -13 10.738 32.33 112.32 39 1.635 2.75 510 -18 10.171 29.87 112.64 40 1.833 2.56 509 -11 9.721 24.87 112.36 41 1.910 2.56 501 -9 9.897 25.48 112.04 42 1.960 2.21 507 -10 9.828 27.28 112.37 43 1.970 2.08 569 -13 9.924 28.24 112.59 44 2.061 2.10 580 -11 10.371 29.58 112.89 45 2.093 2.02 578 -5 10.846 26.95 113.22 46 2.121 2.01 565 -15 10.413 29.08 112.85 47 2.175 1.97 547 -6 10.709 28.76 113.06 48 2.197 2.06 555 -6 10.662 29.59 112.99 49 2.350 2.02 562 -3 10.570 30.70 113.32 50 2.440 2.03 561 -1 10.297 30.52 113.74 51 2.409 2.01 555 -3 10.635 32.67 113.91 52 2.473 2.08 544 -4 10.872 33.19 114.52 53 2.408 2.02 537 -6 10.296 37.13 114.96 54 2.455 2.03 543 0 10.383 35.54 114.91 55 2.448 2.07 594 -4 10.431 37.75 115.30 56 2.498 2.04 611 -2 10.574 41.84 115.44 57 2.646 2.05 613 -2 10.653 42.94 115.52 58 2.757 2.11 611 -6 10.805 49.14 116.08 59 2.849 2.09 594 -7 10.872 44.61 115.94 60 2.921 2.05 595 -6 10.625 40.22 115.56 61 2.982 2.08 591 -6 10.407 44.23 115.88 62 3.081 2.06 589 -3 10.463 45.85 116.66 63 3.106 2.06 584 -2 10.556 53.38 117.41 64 3.119 2.08 573 -5 10.646 53.26 117.68 65 3.061 2.07 567 -11 10.702 51.80 117.85 66 3.097 2.06 569 -11 11.353 55.30 118.21 67 3.162 2.07 621 -11 11.346 57.81 118.92 68 3.257 2.06 629 -10 11.451 63.96 119.03 69 3.277 2.09 628 -14 11.964 63.77 119.17 70 3.295 2.07 612 -8 12.574 59.15 118.95 71 3.364 2.09 595 -9 13.031 56.12 118.92 72 3.494 2.28 597 -5 13.812 57.42 118.90 73 3.667 2.33 593 -1 14.544 63.52 118.92 74 3.813 2.35 590 -2 14.931 61.71 119.44 75 3.918 2.52 580 -5 14.886 63.01 119.40 76 3.896 2.63 574 -4 16.005 68.18 119.98 77 3.801 2.58 573 -6 17.064 72.03 120.43 78 3.570 2.70 573 -2 15.168 69.75 120.41 79 3.702 2.81 620 -2 16.050 74.41 120.82 80 3.862 2.97 626 -2 15.839 74.33 120.97 81 3.970 3.04 620 -2 15.137 64.24 120.63 82 4.139 3.28 588 2 14.954 60.03 120.38 83 4.200 3.33 566 1 15.648 59.44 120.68 84 4.291 3.50 557 -8 15.305 62.50 120.84 85 4.444 3.56 561 -1 15.579 55.04 120.90 86 4.503 3.57 549 1 16.348 58.34 121.56 87 4.357 3.69 532 -1 15.928 61.92 121.57 88 4.591 3.82 526 2 16.171 67.65 122.12 89 4.697 3.79 511 2 15.937 67.68 121.97 90 4.621 3.96 499 1 15.713 70.30 121.96 91 4.563 4.06 555 -1 15.594 75.26 122.48 92 4.203 4.05 565 -2 15.683 71.44 122.33 93 4.296 4.03 542 -2 16.438 76.36 122.44 94 4.435 3.94 527 -1 17.032 81.71 123.08 95 4.105 4.02 510 -8 17.696 92.60 124.23 96 4.117 3.88 514 -4 17.745 90.60 124.58 97 3.844 4.02 517 -6 19.394 92.23 125.08 98 3.721 4.03 508 -3 20.148 94.09 125.98 99 3.674 4.09 493 -3 20.108 102.79 126.90 100 3.858 3.99 490 -7 18.584 109.65 127.19 101 3.801 4.01 469 -9 18.441 124.05 128.33 102 3.504 4.01 478 -11 18.391 132.69 129.04 103 3.033 4.19 528 -13 19.178 135.81 129.72 104 3.047 4.30 534 -11 18.079 116.07 128.92 105 2.962 4.27 518 -9 18.483 101.42 129.13 106 2.198 3.82 506 -17 19.644 75.73 128.90 107 2.014 3.15 502 -22 19.195 55.48 128.13 108 1.863 2.49 516 -25 19.650 43.80 127.85 109 1.905 1.81 528 -20 20.830 45.29 127.98 110 1.811 1.26 533 -24 23.595 44.01 128.42 111 1.670 1.06 536 -24 22.937 47.48 127.68 112 1.864 0.84 537 -22 21.814 51.07 127.95 113 2.052 0.78 524 -19 21.928 57.84 127.85 114 2.030 0.70 536 -18 21.777 69.04 127.61 115 2.071 0.36 587 -17 21.383 65.61 127.53 116 2.293 0.35 597 -11 21.467 72.87 127.92 117 2.443 0.36 581 -11 22.052 68.41 127.59 118 2.513 0.36 564 -12 22.680 73.25 127.65 119 2.467 0.36 558 -10 24.320 77.43 127.98 120 2.503 0.35 575 -15 24.977 75.28 128.19 121 2.540 0.34 580 -15 25.204 77.33 128.77 122 2.483 0.34 575 -15 25.739 74.31 129.31 123 2.626 0.35 563 -13 26.434 79.70 129.80 124 2.656 0.35 552 -8 27.525 85.47 130.24 125 2.447 0.34 537 -13 30.695 77.98 130.76 126 2.467 0.35 545 -9 32.436 75.69 130.75 127 2.462 0.48 601 -7 30.160 75.20 130.81 128 2.505 0.43 604 -4 30.236 77.21 130.89 129 2.579 0.45 586 -4 31.293 77.85 131.30 130 2.649 0.70 564 -2 31.077 83.53 131.49 131 2.637 0.59 549 0 32.226 85.99 131.65 t 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 84 84 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 100 100 101 101 102 102 103 103 104 104 105 105 106 106 107 107 108 108 109 109 110 110 111 111 112 112 113 113 114 114 115 115 116 116 117 117 118 118 119 119 120 120 121 121 122 122 123 123 124 124 125 125 126 126 127 127 128 128 129 129 130 130 131 131 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Eonia Werkloosheid 33.6449842 0.4642603 0.0034927 Consumentenvertrouwen Goudprijs Olieprijs 0.0201134 -0.0005438 0.0181403 CPI t -0.3340700 0.0719137 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.90625 -0.26449 -0.02716 0.30197 0.78311 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 33.6449842 5.7394120 5.862 3.93e-08 *** Eonia 0.4642603 0.0546817 8.490 5.59e-14 *** Werkloosheid 0.0034927 0.0011744 2.974 0.00354 ** Consumentenvertrouwen 0.0201134 0.0060964 3.299 0.00127 ** Goudprijs -0.0005438 0.0186282 -0.029 0.97676 Olieprijs 0.0181403 0.0035240 5.148 1.01e-06 *** CPI -0.3340700 0.0543041 -6.152 9.88e-09 *** t 0.0719137 0.0096391 7.461 1.35e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3697 on 123 degrees of freedom Multiple R-squared: 0.7756, Adjusted R-squared: 0.7628 F-statistic: 60.73 on 7 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,] 2.268653e-03 4.537306e-03 9.977313e-01 [2,] 3.238139e-04 6.476279e-04 9.996762e-01 [3,] 2.252716e-03 4.505431e-03 9.977473e-01 [4,] 5.438542e-04 1.087708e-03 9.994561e-01 [5,] 1.124369e-04 2.248738e-04 9.998876e-01 [6,] 2.196662e-05 4.393323e-05 9.999780e-01 [7,] 6.819833e-06 1.363967e-05 9.999932e-01 [8,] 3.620370e-06 7.240741e-06 9.999964e-01 [9,] 6.917858e-07 1.383572e-06 9.999993e-01 [10,] 2.259537e-07 4.519075e-07 9.999998e-01 [11,] 5.779948e-07 1.155990e-06 9.999994e-01 [12,] 1.477108e-07 2.954216e-07 9.999999e-01 [13,] 3.259213e-07 6.518425e-07 9.999997e-01 [14,] 1.609481e-07 3.218963e-07 9.999998e-01 [15,] 1.187961e-07 2.375922e-07 9.999999e-01 [16,] 6.167289e-08 1.233458e-07 9.999999e-01 [17,] 2.427074e-08 4.854148e-08 1.000000e+00 [18,] 1.476818e-08 2.953636e-08 1.000000e+00 [19,] 8.953889e-09 1.790778e-08 1.000000e+00 [20,] 2.645492e-08 5.290983e-08 1.000000e+00 [21,] 4.945832e-07 9.891664e-07 9.999995e-01 [22,] 1.014946e-06 2.029893e-06 9.999990e-01 [23,] 3.249748e-06 6.499496e-06 9.999968e-01 [24,] 1.086398e-05 2.172797e-05 9.999891e-01 [25,] 8.892193e-06 1.778439e-05 9.999911e-01 [26,] 4.897319e-06 9.794638e-06 9.999951e-01 [27,] 2.296949e-06 4.593897e-06 9.999977e-01 [28,] 1.062491e-06 2.124982e-06 9.999989e-01 [29,] 4.508420e-07 9.016839e-07 9.999995e-01 [30,] 3.663686e-07 7.327371e-07 9.999996e-01 [31,] 4.325883e-07 8.651766e-07 9.999996e-01 [32,] 1.874195e-06 3.748389e-06 9.999981e-01 [33,] 6.471149e-06 1.294230e-05 9.999935e-01 [34,] 1.477170e-05 2.954340e-05 9.999852e-01 [35,] 1.095391e-05 2.190781e-05 9.999890e-01 [36,] 5.153156e-05 1.030631e-04 9.999485e-01 [37,] 1.200639e-04 2.401279e-04 9.998799e-01 [38,] 4.383291e-04 8.766582e-04 9.995617e-01 [39,] 2.261766e-03 4.523531e-03 9.977382e-01 [40,] 7.869992e-03 1.573998e-02 9.921300e-01 [41,] 2.095749e-02 4.191499e-02 9.790425e-01 [42,] 3.618868e-02 7.237736e-02 9.638113e-01 [43,] 4.938853e-02 9.877706e-02 9.506115e-01 [44,] 7.113149e-02 1.422630e-01 9.288685e-01 [45,] 1.049862e-01 2.099724e-01 8.950138e-01 [46,] 1.886268e-01 3.772535e-01 8.113732e-01 [47,] 3.497443e-01 6.994885e-01 6.502557e-01 [48,] 4.774185e-01 9.548371e-01 5.225815e-01 [49,] 6.710386e-01 6.579227e-01 3.289614e-01 [50,] 9.150732e-01 1.698537e-01 8.492685e-02 [51,] 9.856068e-01 2.878639e-02 1.439319e-02 [52,] 9.936972e-01 1.260565e-02 6.302823e-03 [53,] 9.954256e-01 9.148793e-03 4.574397e-03 [54,] 9.963346e-01 7.330820e-03 3.665410e-03 [55,] 9.963358e-01 7.328376e-03 3.664188e-03 [56,] 9.960581e-01 7.883744e-03 3.941872e-03 [57,] 9.947425e-01 1.051499e-02 5.257496e-03 [58,] 9.932761e-01 1.344780e-02 6.723900e-03 [59,] 9.941729e-01 1.165416e-02 5.827082e-03 [60,] 9.921416e-01 1.571687e-02 7.858435e-03 [61,] 9.911013e-01 1.779732e-02 8.898658e-03 [62,] 9.899747e-01 2.005068e-02 1.002534e-02 [63,] 9.920987e-01 1.580254e-02 7.901270e-03 [64,] 9.893231e-01 2.135372e-02 1.067686e-02 [65,] 9.866246e-01 2.675080e-02 1.337540e-02 [66,] 9.821146e-01 3.577078e-02 1.788539e-02 [67,] 9.812116e-01 3.757676e-02 1.878838e-02 [68,] 9.944618e-01 1.107645e-02 5.538226e-03 [69,] 9.968227e-01 6.354668e-03 3.177334e-03 [70,] 9.966713e-01 6.657302e-03 3.328651e-03 [71,] 9.966344e-01 6.731207e-03 3.365604e-03 [72,] 9.989424e-01 2.115197e-03 1.057599e-03 [73,] 9.997092e-01 5.815950e-04 2.907975e-04 [74,] 9.997264e-01 5.471430e-04 2.735715e-04 [75,] 9.997779e-01 4.441024e-04 2.220512e-04 [76,] 9.997096e-01 5.808370e-04 2.904185e-04 [77,] 9.995217e-01 9.566874e-04 4.783437e-04 [78,] 9.992513e-01 1.497429e-03 7.487144e-04 [79,] 9.991862e-01 1.627696e-03 8.138481e-04 [80,] 9.988386e-01 2.322773e-03 1.161386e-03 [81,] 9.994036e-01 1.192715e-03 5.963575e-04 [82,] 9.991320e-01 1.735940e-03 8.679702e-04 [83,] 9.987328e-01 2.534356e-03 1.267178e-03 [84,] 9.988266e-01 2.346895e-03 1.173447e-03 [85,] 9.993410e-01 1.317965e-03 6.589825e-04 [86,] 9.997079e-01 5.842880e-04 2.921440e-04 [87,] 9.998485e-01 3.029388e-04 1.514694e-04 [88,] 9.999172e-01 1.655912e-04 8.279562e-05 [89,] 9.999362e-01 1.275849e-04 6.379243e-05 [90,] 9.999779e-01 4.417828e-05 2.208914e-05 [91,] 9.999993e-01 1.416234e-06 7.081171e-07 [92,] 9.999999e-01 2.735009e-07 1.367504e-07 [93,] 9.999999e-01 1.465005e-07 7.325027e-08 [94,] 9.999999e-01 2.890000e-07 1.445000e-07 [95,] 9.999999e-01 1.020391e-07 5.101956e-08 [96,] 9.999999e-01 2.350607e-07 1.175304e-07 [97,] 9.999996e-01 8.045374e-07 4.022687e-07 [98,] 9.999985e-01 2.923376e-06 1.461688e-06 [99,] 9.999985e-01 2.962253e-06 1.481127e-06 [100,] 9.999999e-01 1.208765e-07 6.043827e-08 [101,] 9.999998e-01 4.338365e-07 2.169183e-07 [102,] 9.999990e-01 1.922525e-06 9.612623e-07 [103,] 9.999994e-01 1.180380e-06 5.901898e-07 [104,] 9.999970e-01 6.061981e-06 3.030990e-06 [105,] 9.999991e-01 1.754317e-06 8.771587e-07 [106,] 9.999984e-01 3.245621e-06 1.622810e-06 [107,] 9.999860e-01 2.803139e-05 1.401569e-05 [108,] 9.999179e-01 1.641089e-04 8.205444e-05 [109,] 9.995450e-01 9.100289e-04 4.550145e-04 [110,] 9.961194e-01 7.761272e-03 3.880636e-03 > postscript(file="/var/www/rcomp/tmp/1hkf71293038783.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/2hkf71293038783.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/3hkf71293038783.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/4abws1293038783.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/5abws1293038783.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 = 131 Frequency = 1 1 2 3 4 5 6 0.549138387 0.232263108 0.184545402 0.326615758 0.156066213 0.040981305 7 8 9 10 11 12 0.032227730 -0.169720295 -0.046047363 -0.274596759 -0.139964892 -0.906251536 13 14 15 16 17 18 -0.377061745 -0.299784540 -0.260632181 -0.028562804 0.229920488 0.336894086 19 20 21 22 23 24 0.178332656 0.070061085 0.107888709 0.345100913 0.783108198 0.488940773 25 26 27 28 29 30 0.574549084 0.547238094 0.497111368 0.525012540 0.508937920 0.104472239 31 32 33 34 35 36 -0.283955062 -0.448022687 -0.613529644 -0.812980127 -0.705742665 -0.691418129 37 38 39 40 41 42 -0.562780286 -0.495228355 -0.417264211 -0.343351727 -0.468422561 -0.251135225 43 44 45 46 47 48 -0.352771523 -0.345461170 -0.303718185 -0.258930507 -0.300304206 -0.458410108 49 50 51 52 53 54 -0.353485265 -0.233349305 -0.247820738 -0.035220650 -0.004398251 -0.163404079 55 56 57 58 59 60 -0.268340855 -0.403276328 -0.332003898 -0.158642618 -0.014338901 -0.066733040 61 62 63 64 65 66 -0.043562525 0.170672094 0.235114985 0.358100884 0.457773562 0.476644994 67 68 69 70 71 72 0.475120274 0.380035660 0.448635721 0.349855534 0.462338085 0.314936905 73 74 75 76 77 78 0.222751053 0.524904569 0.537364299 0.493808498 0.474894270 0.069463582 79 80 81 82 83 84 -0.032762850 0.011532429 0.105147494 0.114879211 0.289007137 0.439379198 85 86 87 88 89 90 0.493365676 0.638536674 0.402684795 0.544960064 0.594583225 0.378781228 91 92 93 94 95 96 0.130750814 -0.292100215 -0.233488121 0.024736189 -0.027155227 0.036735031 97 98 99 100 101 102 -0.205063699 -0.166193509 -0.111070188 0.109982613 0.204898864 -0.074792776 103 104 105 106 107 108 -0.664685547 -0.744614113 -0.535812544 -0.570168831 -0.290626483 -0.077099525 109 110 111 112 113 114 0.083245858 0.407378996 -0.033677403 0.171291168 0.144143417 -0.258086346 115 116 117 118 119 120 -0.294112662 -0.296357102 -0.196048735 -0.185886215 -0.287761997 -0.168329071 121 122 123 124 125 126 -0.059367488 0.064655038 0.199080579 0.137934431 0.325932370 0.200128191 127 128 129 130 131 -0.145263628 -0.231477713 -0.049873801 -0.170920465 -0.182150517 > postscript(file="/var/www/rcomp/tmp/6abws1293038783.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 = 131 Frequency = 1 lag(myerror, k = 1) myerror 0 0.549138387 NA 1 0.232263108 0.549138387 2 0.184545402 0.232263108 3 0.326615758 0.184545402 4 0.156066213 0.326615758 5 0.040981305 0.156066213 6 0.032227730 0.040981305 7 -0.169720295 0.032227730 8 -0.046047363 -0.169720295 9 -0.274596759 -0.046047363 10 -0.139964892 -0.274596759 11 -0.906251536 -0.139964892 12 -0.377061745 -0.906251536 13 -0.299784540 -0.377061745 14 -0.260632181 -0.299784540 15 -0.028562804 -0.260632181 16 0.229920488 -0.028562804 17 0.336894086 0.229920488 18 0.178332656 0.336894086 19 0.070061085 0.178332656 20 0.107888709 0.070061085 21 0.345100913 0.107888709 22 0.783108198 0.345100913 23 0.488940773 0.783108198 24 0.574549084 0.488940773 25 0.547238094 0.574549084 26 0.497111368 0.547238094 27 0.525012540 0.497111368 28 0.508937920 0.525012540 29 0.104472239 0.508937920 30 -0.283955062 0.104472239 31 -0.448022687 -0.283955062 32 -0.613529644 -0.448022687 33 -0.812980127 -0.613529644 34 -0.705742665 -0.812980127 35 -0.691418129 -0.705742665 36 -0.562780286 -0.691418129 37 -0.495228355 -0.562780286 38 -0.417264211 -0.495228355 39 -0.343351727 -0.417264211 40 -0.468422561 -0.343351727 41 -0.251135225 -0.468422561 42 -0.352771523 -0.251135225 43 -0.345461170 -0.352771523 44 -0.303718185 -0.345461170 45 -0.258930507 -0.303718185 46 -0.300304206 -0.258930507 47 -0.458410108 -0.300304206 48 -0.353485265 -0.458410108 49 -0.233349305 -0.353485265 50 -0.247820738 -0.233349305 51 -0.035220650 -0.247820738 52 -0.004398251 -0.035220650 53 -0.163404079 -0.004398251 54 -0.268340855 -0.163404079 55 -0.403276328 -0.268340855 56 -0.332003898 -0.403276328 57 -0.158642618 -0.332003898 58 -0.014338901 -0.158642618 59 -0.066733040 -0.014338901 60 -0.043562525 -0.066733040 61 0.170672094 -0.043562525 62 0.235114985 0.170672094 63 0.358100884 0.235114985 64 0.457773562 0.358100884 65 0.476644994 0.457773562 66 0.475120274 0.476644994 67 0.380035660 0.475120274 68 0.448635721 0.380035660 69 0.349855534 0.448635721 70 0.462338085 0.349855534 71 0.314936905 0.462338085 72 0.222751053 0.314936905 73 0.524904569 0.222751053 74 0.537364299 0.524904569 75 0.493808498 0.537364299 76 0.474894270 0.493808498 77 0.069463582 0.474894270 78 -0.032762850 0.069463582 79 0.011532429 -0.032762850 80 0.105147494 0.011532429 81 0.114879211 0.105147494 82 0.289007137 0.114879211 83 0.439379198 0.289007137 84 0.493365676 0.439379198 85 0.638536674 0.493365676 86 0.402684795 0.638536674 87 0.544960064 0.402684795 88 0.594583225 0.544960064 89 0.378781228 0.594583225 90 0.130750814 0.378781228 91 -0.292100215 0.130750814 92 -0.233488121 -0.292100215 93 0.024736189 -0.233488121 94 -0.027155227 0.024736189 95 0.036735031 -0.027155227 96 -0.205063699 0.036735031 97 -0.166193509 -0.205063699 98 -0.111070188 -0.166193509 99 0.109982613 -0.111070188 100 0.204898864 0.109982613 101 -0.074792776 0.204898864 102 -0.664685547 -0.074792776 103 -0.744614113 -0.664685547 104 -0.535812544 -0.744614113 105 -0.570168831 -0.535812544 106 -0.290626483 -0.570168831 107 -0.077099525 -0.290626483 108 0.083245858 -0.077099525 109 0.407378996 0.083245858 110 -0.033677403 0.407378996 111 0.171291168 -0.033677403 112 0.144143417 0.171291168 113 -0.258086346 0.144143417 114 -0.294112662 -0.258086346 115 -0.296357102 -0.294112662 116 -0.196048735 -0.296357102 117 -0.185886215 -0.196048735 118 -0.287761997 -0.185886215 119 -0.168329071 -0.287761997 120 -0.059367488 -0.168329071 121 0.064655038 -0.059367488 122 0.199080579 0.064655038 123 0.137934431 0.199080579 124 0.325932370 0.137934431 125 0.200128191 0.325932370 126 -0.145263628 0.200128191 127 -0.231477713 -0.145263628 128 -0.049873801 -0.231477713 129 -0.170920465 -0.049873801 130 -0.182150517 -0.170920465 131 NA -0.182150517 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.232263108 0.549138387 [2,] 0.184545402 0.232263108 [3,] 0.326615758 0.184545402 [4,] 0.156066213 0.326615758 [5,] 0.040981305 0.156066213 [6,] 0.032227730 0.040981305 [7,] -0.169720295 0.032227730 [8,] -0.046047363 -0.169720295 [9,] -0.274596759 -0.046047363 [10,] -0.139964892 -0.274596759 [11,] -0.906251536 -0.139964892 [12,] -0.377061745 -0.906251536 [13,] -0.299784540 -0.377061745 [14,] -0.260632181 -0.299784540 [15,] -0.028562804 -0.260632181 [16,] 0.229920488 -0.028562804 [17,] 0.336894086 0.229920488 [18,] 0.178332656 0.336894086 [19,] 0.070061085 0.178332656 [20,] 0.107888709 0.070061085 [21,] 0.345100913 0.107888709 [22,] 0.783108198 0.345100913 [23,] 0.488940773 0.783108198 [24,] 0.574549084 0.488940773 [25,] 0.547238094 0.574549084 [26,] 0.497111368 0.547238094 [27,] 0.525012540 0.497111368 [28,] 0.508937920 0.525012540 [29,] 0.104472239 0.508937920 [30,] -0.283955062 0.104472239 [31,] -0.448022687 -0.283955062 [32,] -0.613529644 -0.448022687 [33,] -0.812980127 -0.613529644 [34,] -0.705742665 -0.812980127 [35,] -0.691418129 -0.705742665 [36,] -0.562780286 -0.691418129 [37,] -0.495228355 -0.562780286 [38,] -0.417264211 -0.495228355 [39,] -0.343351727 -0.417264211 [40,] -0.468422561 -0.343351727 [41,] -0.251135225 -0.468422561 [42,] -0.352771523 -0.251135225 [43,] -0.345461170 -0.352771523 [44,] -0.303718185 -0.345461170 [45,] -0.258930507 -0.303718185 [46,] -0.300304206 -0.258930507 [47,] -0.458410108 -0.300304206 [48,] -0.353485265 -0.458410108 [49,] -0.233349305 -0.353485265 [50,] -0.247820738 -0.233349305 [51,] -0.035220650 -0.247820738 [52,] -0.004398251 -0.035220650 [53,] -0.163404079 -0.004398251 [54,] -0.268340855 -0.163404079 [55,] -0.403276328 -0.268340855 [56,] -0.332003898 -0.403276328 [57,] -0.158642618 -0.332003898 [58,] -0.014338901 -0.158642618 [59,] -0.066733040 -0.014338901 [60,] -0.043562525 -0.066733040 [61,] 0.170672094 -0.043562525 [62,] 0.235114985 0.170672094 [63,] 0.358100884 0.235114985 [64,] 0.457773562 0.358100884 [65,] 0.476644994 0.457773562 [66,] 0.475120274 0.476644994 [67,] 0.380035660 0.475120274 [68,] 0.448635721 0.380035660 [69,] 0.349855534 0.448635721 [70,] 0.462338085 0.349855534 [71,] 0.314936905 0.462338085 [72,] 0.222751053 0.314936905 [73,] 0.524904569 0.222751053 [74,] 0.537364299 0.524904569 [75,] 0.493808498 0.537364299 [76,] 0.474894270 0.493808498 [77,] 0.069463582 0.474894270 [78,] -0.032762850 0.069463582 [79,] 0.011532429 -0.032762850 [80,] 0.105147494 0.011532429 [81,] 0.114879211 0.105147494 [82,] 0.289007137 0.114879211 [83,] 0.439379198 0.289007137 [84,] 0.493365676 0.439379198 [85,] 0.638536674 0.493365676 [86,] 0.402684795 0.638536674 [87,] 0.544960064 0.402684795 [88,] 0.594583225 0.544960064 [89,] 0.378781228 0.594583225 [90,] 0.130750814 0.378781228 [91,] -0.292100215 0.130750814 [92,] -0.233488121 -0.292100215 [93,] 0.024736189 -0.233488121 [94,] -0.027155227 0.024736189 [95,] 0.036735031 -0.027155227 [96,] -0.205063699 0.036735031 [97,] -0.166193509 -0.205063699 [98,] -0.111070188 -0.166193509 [99,] 0.109982613 -0.111070188 [100,] 0.204898864 0.109982613 [101,] -0.074792776 0.204898864 [102,] -0.664685547 -0.074792776 [103,] -0.744614113 -0.664685547 [104,] -0.535812544 -0.744614113 [105,] -0.570168831 -0.535812544 [106,] -0.290626483 -0.570168831 [107,] -0.077099525 -0.290626483 [108,] 0.083245858 -0.077099525 [109,] 0.407378996 0.083245858 [110,] -0.033677403 0.407378996 [111,] 0.171291168 -0.033677403 [112,] 0.144143417 0.171291168 [113,] -0.258086346 0.144143417 [114,] -0.294112662 -0.258086346 [115,] -0.296357102 -0.294112662 [116,] -0.196048735 -0.296357102 [117,] -0.185886215 -0.196048735 [118,] -0.287761997 -0.185886215 [119,] -0.168329071 -0.287761997 [120,] -0.059367488 -0.168329071 [121,] 0.064655038 -0.059367488 [122,] 0.199080579 0.064655038 [123,] 0.137934431 0.199080579 [124,] 0.325932370 0.137934431 [125,] 0.200128191 0.325932370 [126,] -0.145263628 0.200128191 [127,] -0.231477713 -0.145263628 [128,] -0.049873801 -0.231477713 [129,] -0.170920465 -0.049873801 [130,] -0.182150517 -0.170920465 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.232263108 0.549138387 2 0.184545402 0.232263108 3 0.326615758 0.184545402 4 0.156066213 0.326615758 5 0.040981305 0.156066213 6 0.032227730 0.040981305 7 -0.169720295 0.032227730 8 -0.046047363 -0.169720295 9 -0.274596759 -0.046047363 10 -0.139964892 -0.274596759 11 -0.906251536 -0.139964892 12 -0.377061745 -0.906251536 13 -0.299784540 -0.377061745 14 -0.260632181 -0.299784540 15 -0.028562804 -0.260632181 16 0.229920488 -0.028562804 17 0.336894086 0.229920488 18 0.178332656 0.336894086 19 0.070061085 0.178332656 20 0.107888709 0.070061085 21 0.345100913 0.107888709 22 0.783108198 0.345100913 23 0.488940773 0.783108198 24 0.574549084 0.488940773 25 0.547238094 0.574549084 26 0.497111368 0.547238094 27 0.525012540 0.497111368 28 0.508937920 0.525012540 29 0.104472239 0.508937920 30 -0.283955062 0.104472239 31 -0.448022687 -0.283955062 32 -0.613529644 -0.448022687 33 -0.812980127 -0.613529644 34 -0.705742665 -0.812980127 35 -0.691418129 -0.705742665 36 -0.562780286 -0.691418129 37 -0.495228355 -0.562780286 38 -0.417264211 -0.495228355 39 -0.343351727 -0.417264211 40 -0.468422561 -0.343351727 41 -0.251135225 -0.468422561 42 -0.352771523 -0.251135225 43 -0.345461170 -0.352771523 44 -0.303718185 -0.345461170 45 -0.258930507 -0.303718185 46 -0.300304206 -0.258930507 47 -0.458410108 -0.300304206 48 -0.353485265 -0.458410108 49 -0.233349305 -0.353485265 50 -0.247820738 -0.233349305 51 -0.035220650 -0.247820738 52 -0.004398251 -0.035220650 53 -0.163404079 -0.004398251 54 -0.268340855 -0.163404079 55 -0.403276328 -0.268340855 56 -0.332003898 -0.403276328 57 -0.158642618 -0.332003898 58 -0.014338901 -0.158642618 59 -0.066733040 -0.014338901 60 -0.043562525 -0.066733040 61 0.170672094 -0.043562525 62 0.235114985 0.170672094 63 0.358100884 0.235114985 64 0.457773562 0.358100884 65 0.476644994 0.457773562 66 0.475120274 0.476644994 67 0.380035660 0.475120274 68 0.448635721 0.380035660 69 0.349855534 0.448635721 70 0.462338085 0.349855534 71 0.314936905 0.462338085 72 0.222751053 0.314936905 73 0.524904569 0.222751053 74 0.537364299 0.524904569 75 0.493808498 0.537364299 76 0.474894270 0.493808498 77 0.069463582 0.474894270 78 -0.032762850 0.069463582 79 0.011532429 -0.032762850 80 0.105147494 0.011532429 81 0.114879211 0.105147494 82 0.289007137 0.114879211 83 0.439379198 0.289007137 84 0.493365676 0.439379198 85 0.638536674 0.493365676 86 0.402684795 0.638536674 87 0.544960064 0.402684795 88 0.594583225 0.544960064 89 0.378781228 0.594583225 90 0.130750814 0.378781228 91 -0.292100215 0.130750814 92 -0.233488121 -0.292100215 93 0.024736189 -0.233488121 94 -0.027155227 0.024736189 95 0.036735031 -0.027155227 96 -0.205063699 0.036735031 97 -0.166193509 -0.205063699 98 -0.111070188 -0.166193509 99 0.109982613 -0.111070188 100 0.204898864 0.109982613 101 -0.074792776 0.204898864 102 -0.664685547 -0.074792776 103 -0.744614113 -0.664685547 104 -0.535812544 -0.744614113 105 -0.570168831 -0.535812544 106 -0.290626483 -0.570168831 107 -0.077099525 -0.290626483 108 0.083245858 -0.077099525 109 0.407378996 0.083245858 110 -0.033677403 0.407378996 111 0.171291168 -0.033677403 112 0.144143417 0.171291168 113 -0.258086346 0.144143417 114 -0.294112662 -0.258086346 115 -0.296357102 -0.294112662 116 -0.196048735 -0.296357102 117 -0.185886215 -0.196048735 118 -0.287761997 -0.185886215 119 -0.168329071 -0.287761997 120 -0.059367488 -0.168329071 121 0.064655038 -0.059367488 122 0.199080579 0.064655038 123 0.137934431 0.199080579 124 0.325932370 0.137934431 125 0.200128191 0.325932370 126 -0.145263628 0.200128191 127 -0.231477713 -0.145263628 128 -0.049873801 -0.231477713 129 -0.170920465 -0.049873801 130 -0.182150517 -0.170920465 > 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/732ev1293038783.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/8dcvy1293038783.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/9dcvy1293038783.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/10dcvy1293038783.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/11r3t71293038783.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/12kvar1293038783.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/13rw731293038783.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/14jn6o1293038783.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/15n54u1293038783.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/161fkl1293038783.tab") + } > > try(system("convert tmp/1hkf71293038783.ps tmp/1hkf71293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/2hkf71293038783.ps tmp/2hkf71293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/3hkf71293038783.ps tmp/3hkf71293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/4abws1293038783.ps tmp/4abws1293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/5abws1293038783.ps tmp/5abws1293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/6abws1293038783.ps tmp/6abws1293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/732ev1293038783.ps tmp/732ev1293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/8dcvy1293038783.ps tmp/8dcvy1293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/9dcvy1293038783.ps tmp/9dcvy1293038783.png",intern=TRUE)) character(0) > try(system("convert tmp/10dcvy1293038783.ps tmp/10dcvy1293038783.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.160 1.850 6.039