R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(30/09/2000 + ,501 + ,134 + ,368 + ,6.7 + ,8.5 + ,8.7 + ,31/10/2000 + ,485 + ,124 + ,361 + ,6.8 + ,8.4 + ,8.6 + ,30/11/2000 + ,464 + ,113 + ,351 + ,6.7 + ,8.4 + ,8.6 + ,31/12/2000 + ,460 + ,109 + ,351 + ,6.6 + ,8.3 + ,8.5 + ,31/01/2001 + ,467 + ,109 + ,358 + ,6.4 + ,8.2 + ,8.5 + ,28/02/2001 + ,460 + ,106 + ,354 + ,6.3 + ,8.2 + ,8.5 + ,31/03/2001 + ,448 + ,101 + ,347 + ,6.3 + ,8.1 + ,8.5 + ,30/04/2001 + ,443 + ,98 + ,345 + ,6.5 + ,8.1 + ,8.5 + ,31/05/2001 + ,436 + ,93 + ,343 + ,6.5 + ,8.1 + ,8.5 + ,30/06/2001 + ,431 + ,91 + ,340 + ,6.4 + ,8.1 + ,8.5 + ,31/07/2001 + ,484 + ,122 + ,362 + ,6.2 + ,8.1 + ,8.5 + ,31/08/2001 + ,510 + ,139 + ,370 + ,6.2 + ,8.1 + ,8.6 + ,30/09/2001 + ,513 + ,140 + ,373 + ,6.5 + ,8.1 + ,8.6 + ,31/10/2001 + ,503 + ,132 + ,371 + ,7 + ,8.2 + ,8.6 + ,30/11/2001 + ,471 + ,117 + ,354 + ,7.2 + ,8.2 + ,8.7 + ,31/12/2001 + ,471 + ,114 + ,357 + ,7.3 + ,8.3 + ,8.7 + ,31/01/2002 + ,476 + ,113 + ,363 + ,7.4 + ,8.2 + ,8.7 + ,28/02/2002 + ,475 + ,110 + ,364 + ,7.4 + ,8.3 + ,8.8 + ,31/03/2002 + ,470 + ,107 + ,363 + ,7.4 + ,8.3 + ,8.8 + ,30/04/2002 + ,461 + ,103 + ,358 + ,7.3 + ,8.4 + ,8.9 + ,31/05/2002 + ,455 + ,98 + ,357 + ,7.4 + ,8.5 + ,8.9 + ,30/06/2002 + ,456 + ,98 + ,357 + ,7.4 + ,8.5 + ,8.9 + ,31/07/2002 + ,517 + ,137 + ,380 + ,7.6 + ,8.6 + ,9 + ,31/08/2002 + ,525 + ,148 + ,378 + ,7.6 + ,8.6 + ,9 + ,30/09/2002 + ,523 + ,147 + ,376 + ,7.7 + ,8.7 + ,9 + ,31/10/2002 + ,519 + ,139 + ,380 + ,7.7 + ,8.7 + ,9 + ,30/11/2002 + ,509 + ,130 + ,379 + ,7.8 + ,8.8 + ,9 + ,31/12/2002 + ,512 + ,128 + ,384 + ,7.8 + ,8.8 + ,9 + ,31/01/2003 + ,519 + ,127 + ,392 + ,8 + ,8.9 + ,9.1 + ,28/02/2003 + ,517 + ,123 + ,394 + ,8.1 + ,9 + ,9.1 + ,31/03/2003 + ,510 + ,118 + ,392 + ,8.1 + ,9 + ,9.1 + ,30/04/2003 + ,509 + ,114 + ,396 + ,8.2 + ,9 + ,9.1 + ,31/05/2003 + ,501 + ,108 + ,392 + ,8.1 + ,9 + ,9.1 + ,30/06/2003 + ,507 + ,111 + ,396 + ,8.1 + ,9.1 + ,9.1 + ,31/07/2003 + ,569 + ,151 + ,419 + ,8.1 + ,9.1 + ,9.1 + ,31/08/2003 + ,580 + ,159 + ,421 + ,8.1 + ,9 + ,9.1 + ,30/09/2003 + ,578 + ,158 + ,420 + ,8.2 + ,9.1 + ,9.1 + ,31/10/2003 + ,565 + ,148 + ,418 + ,8.2 + ,9 + ,9.1 + ,30/11/2003 + ,547 + ,138 + ,410 + ,8.3 + ,9.1 + ,9.1 + ,31/12/2003 + ,555 + ,137 + ,418 + ,8.4 + ,9.1 + ,9.2 + ,31/01/2004 + ,562 + ,136 + ,426 + ,8.6 + ,9.2 + ,9.3 + ,29/02/2004 + ,561 + ,133 + ,428 + ,8.6 + ,9.2 + ,9.3 + ,31/03/2004 + ,555 + ,126 + ,430 + ,8.4 + ,9.2 + ,9.3 + ,30/04/2004 + ,544 + ,120 + ,424 + ,8 + ,9.2 + ,9.2 + ,31/05/2004 + ,537 + ,114 + ,423 + ,7.9 + ,9.2 + ,9.2 + ,30/06/2004 + ,543 + ,116 + ,427 + ,8.1 + ,9.3 + ,9.2 + ,31/07/2004 + ,594 + ,153 + ,441 + ,8.5 + ,9.3 + ,9.2 + ,31/08/2004 + ,611 + ,162 + ,449 + ,8.8 + ,9.3 + ,9.2 + ,30/09/2004 + ,613 + ,161 + ,452 + ,8.8 + ,9.3 + ,9.2 + ,31/10/2004 + ,611 + ,149 + ,462 + ,8.5 + ,9.3 + ,9.2 + ,30/11/2004 + ,594 + ,139 + ,455 + ,8.3 + ,9.4 + ,9.2 + ,31/12/2004 + ,595 + ,135 + ,461 + ,8.3 + ,9.4 + ,9.2 + ,31/01/2005 + ,591 + ,130 + ,461 + ,8.3 + ,9.3 + ,9.2 + ,28/02/2005 + ,589 + ,127 + ,463 + ,8.4 + ,9.3 + ,9.2 + ,31/03/2005 + ,584 + ,122 + ,462 + ,8.5 + ,9.3 + ,9.2 + ,30/04/2005 + ,573 + ,117 + ,456 + ,8.5 + ,9.3 + ,9.2 + ,31/05/2005 + ,567 + ,112 + ,455 + ,8.6 + ,9.2 + ,9.1 + ,30/06/2005 + ,569 + ,113 + ,456 + ,8.5 + ,9.2 + ,9.1 + ,31/07/2005 + ,621 + ,149 + ,472 + ,8.6 + ,9.2 + ,9 + ,31/08/2005 + ,629 + ,157 + ,472 + ,8.6 + ,9.1 + ,8.9 + ,30/09/2005 + ,628 + ,157 + ,471 + ,8.6 + ,9.1 + ,8.9 + ,31/10/2005 + ,612 + ,147 + ,465 + ,8.5 + ,9.1 + ,9 + ,30/11/2005 + ,595 + ,137 + ,459 + ,8.4 + ,9.1 + ,8.9 + ,31/12/2005 + ,597 + ,132 + ,465 + ,8.4 + ,9 + ,8.8 + ,31/01/2006 + ,593 + ,125 + ,468 + ,8.5 + ,8.9 + ,8.7 + ,28/02/2006 + ,590 + ,123 + ,467 + ,8.5 + ,8.8 + ,8.6 + ,31/03/2006 + ,580 + ,117 + ,463 + ,8.5 + ,8.7 + ,8.5 + ,30/04/2006 + ,574 + ,114 + ,460 + ,8.6 + ,8.6 + ,8.5 + ,31/05/2006 + ,573 + ,111 + ,462 + ,8.6 + ,8.6 + ,8.4 + ,30/06/2006 + ,573 + ,112 + ,461 + ,8.4 + ,8.5 + ,8.3 + ,31/07/2006 + ,620 + ,144 + ,476 + ,8.2 + ,8.4 + ,8.2 + ,31/08/2006 + ,626 + ,150 + ,476 + ,8 + ,8.4 + ,8.2 + ,30/09/2006 + ,620 + ,149 + ,471 + ,8 + ,8.3 + ,8.1 + ,31/10/2006 + ,588 + ,134 + ,453 + ,8 + ,8.2 + ,8 + ,30/11/2006 + ,566 + ,123 + ,443 + ,8 + ,8.2 + ,7.9 + ,31/12/2006 + ,557 + ,116 + ,442 + ,7.9 + ,8 + ,7.8 + ,31/01/2007 + ,561 + ,117 + ,444 + ,7.9 + ,7.9 + ,7.6 + ,28/02/2007 + ,549 + ,111 + ,438 + ,7.9 + ,7.8 + ,7.5 + ,31/03/2007 + ,532 + ,105 + ,427 + ,7.9 + ,7.7 + ,7.4 + ,30/04/2007 + ,526 + ,102 + ,424 + ,8 + ,7.6 + ,7.3 + ,31/05/2007 + ,511 + ,95 + ,416 + ,7.9 + ,7.6 + ,7.3 + ,30/06/2007 + ,499 + ,93 + ,406 + ,7.4 + ,7.6 + ,7.2 + ,31/07/2007 + ,555 + ,124 + ,431 + ,7.2 + ,7.6 + ,7.2 + ,31/08/2007 + ,565 + ,130 + ,434 + ,7 + ,7.6 + ,7.2 + ,30/09/2007 + ,542 + ,124 + ,418 + ,6.9 + ,7.5 + ,7.1 + ,31/10/2007 + ,527 + ,115 + ,412 + ,7.1 + ,7.5 + ,7 + ,30/11/2007 + ,510 + ,106 + ,404 + ,7.2 + ,7.4 + ,7 + ,31/12/2007 + ,514 + ,105 + ,409 + ,7.2 + ,7.4 + ,6.9 + ,31/01/2008 + ,517 + ,105 + ,412 + ,7.1 + ,7.4 + ,6.9 + ,29/02/2008 + ,508 + ,101 + ,406 + ,6.9 + ,7.3 + ,6.8 + ,31/03/2008 + ,493 + ,95 + ,398 + ,6.8 + ,7.3 + ,6.8 + ,30/04/2008 + ,490 + ,93 + ,397 + ,6.8 + ,7.4 + ,6.8 + ,31/05/2008 + ,469 + ,84 + ,385 + ,6.8 + ,7.5 + ,6.9 + ,30/06/2008 + ,478 + ,87 + ,390 + ,6.9 + ,7.6 + ,7 + ,31/07/2008 + ,528 + ,116 + ,413 + ,7.1 + ,7.6 + ,7 + ,31/08/2008 + ,534 + ,120 + ,413 + ,7.2 + ,7.7 + ,7.1 + ,30/09/2008 + ,518 + ,117 + ,401 + ,7.2 + ,7.7 + ,7.2 + ,31/10/2008 + ,506 + ,109 + ,397 + ,7.1 + ,7.9 + ,7.3 + ,30/11/2008 + ,502 + ,105 + ,397 + ,7.1 + ,8.1 + ,7.5 + ,31/12/2008 + ,516 + ,107 + ,409 + ,7.2 + ,8.4 + ,7.7 + ,31/01/2009 + ,528 + ,109 + ,419 + ,7.5 + ,8.7 + ,8.1 + ,28/02/2009 + ,533 + ,109 + ,424 + ,7.7 + ,9 + ,8.4 + ,31/03/2009 + ,536 + ,108 + ,428 + ,7.8 + ,9.3 + ,8.6 + ,30/04/2009 + ,537 + ,107 + ,430 + ,7.7 + ,9.4 + ,8.8 + ,31/05/2009 + ,524 + ,99 + ,424 + ,7.7 + ,9.5 + ,8.9 + ,30/06/2009 + ,536 + ,103 + ,433 + ,7.8 + ,9.6 + ,9.1 + ,31/07/2009 + ,587 + ,131 + ,456 + ,8 + ,9.8 + ,9.2 + ,31/08/2009 + ,597 + ,137 + ,459 + ,8.1 + ,9.8 + ,9.3 + ,30/09/2009 + ,581 + ,135 + ,446 + ,8.1 + ,9.9 + ,9.4 + ,31/10/2009 + ,564 + ,124 + ,441 + ,8 + ,10 + ,9.4 + ,30/11/2009 + ,558 + ,118 + ,439 + ,8.1 + ,10 + ,9.5 + ,31/12/2009 + ,575 + ,121 + ,454 + ,8.2 + ,10.1 + ,9.5 + ,31/01/2010 + ,580 + ,121 + ,460 + ,8.4 + ,10.1 + ,9.7 + ,28/02/2010 + ,575 + ,118 + ,457 + ,8.5 + ,10.1 + ,9.7 + ,31/03/2010 + ,563 + ,113 + ,451 + ,8.5 + ,10.1 + ,9.7 + ,30/04/2010 + ,552 + ,107 + ,444 + ,8.5 + ,10.2 + ,9.7 + ,31/05/2010 + ,537 + ,100 + ,437 + ,8.5 + ,10.2 + ,9.7 + ,30/06/2010 + ,545 + ,102 + ,443 + ,8.5 + ,10.1 + ,9.6 + ,31/07/2010 + ,601 + ,130 + ,471 + ,8.4 + ,10.1 + ,9.6 + ,31/08/2010 + ,604 + ,136 + ,469 + ,8.3 + ,10.1 + ,9.6 + ,30/09/2010 + ,586 + ,133 + ,454 + ,8.2 + ,10.1 + ,9.6 + ,31/10/2010 + ,564 + ,120 + ,444 + ,8.1 + ,10.1 + ,9.6 + ,30/11/2010 + ,549 + ,112 + ,436 + ,7.9 + ,10.1 + ,9.6 + ,31/12/2010 + ,551 + ,109 + ,442 + ,7.6 + ,10.1 + ,9.6 + ,31/01/2011 + ,556 + ,110 + ,446 + ,7.3 + ,10 + ,9.5 + ,28/02/2011 + ,548 + ,106 + ,442 + ,7.1 + ,9.9 + ,9.5 + ,31/03/2011 + ,540 + ,102 + ,438 + ,7 + ,9.9 + ,9.4 + ,30/04/2011 + ,531 + ,98 + ,433 + ,7.1 + ,9.9 + ,9.4 + ,31/05/2011 + ,521 + ,92 + ,428 + ,7.1 + ,9.9 + ,9.5 + ,30/06/2011 + ,519 + ,92 + ,426 + ,7.1 + ,10 + ,9.5 + ,31/07/2011 + ,572 + ,120 + ,452 + ,7.3 + ,10.1 + ,9.6 + ,31/08/2011 + ,581 + ,127 + ,455 + ,7.3 + ,10.2 + ,9.7 + ,30/09/2011 + ,563 + ,124 + ,439 + ,7.3 + ,10.3 + ,9.8 + ,31/10/2011 + ,548 + ,114 + ,434 + ,7.2 + ,10.5 + ,9.9 + ,30/11/2011 + ,539 + ,108 + ,431 + ,7.2 + ,10.6 + ,10 + ,31/12/2011 + ,541 + ,106 + ,435 + ,7.1 + ,10.7 + ,10 + ,31/01/2012 + ,562 + ,111 + ,450 + ,7.1 + ,10.8 + ,10.1 + ,29/02/2012 + ,559 + ,110 + ,449 + ,7.1 + ,10.9 + ,10.2 + ,31/03/2012 + ,546 + ,104 + ,442 + ,7.2 + ,11 + ,10.3 + ,30/04/2012 + ,536 + ,100 + ,437 + ,7.3 + ,11.2 + ,10.3 + ,31/05/2012 + ,528 + ,96 + ,431 + ,7.4 + ,11.3 + ,10.4 + ,30/06/2012 + ,530 + ,98 + ,433 + ,7.4 + ,11.4 + ,10.5 + ,31/07/2012 + ,582 + ,122 + ,460 + ,7.5 + ,11.5 + ,10.5 + ,31/08/2012 + ,599 + ,134 + ,465 + ,7.4 + ,11.5 + ,10.6 + ,30/09/2012 + ,584 + ,133 + ,451 + ,7.4 + ,11.6 + ,10.6) + ,dim=c(7 + ,145) + ,dimnames=list(c('maand' + ,'Totaal' + ,'jongerdan25jaar' + ,'vanaf25jaar' + ,'België' + ,'Eurogebied' + ,'eu27 ') + ,1:145)) > y <- array(NA,dim=c(7,145),dimnames=list(c('maand','Totaal','jongerdan25jaar','vanaf25jaar','België','Eurogebied','eu27 '),1:145)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '2' > #'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, 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 Totaal maand jongerdan25jaar vanaf25jaar Belgi\353 Eurogebied eu27\r 1 501 0.001666667 134 368 6.7 8.5 8.7 2 485 0.001550000 124 361 6.8 8.4 8.6 3 464 0.001363636 113 351 6.7 8.4 8.6 4 460 0.001291667 109 351 6.6 8.3 8.5 5 467 0.015492254 109 358 6.4 8.2 8.5 6 460 0.006996502 106 354 6.3 8.2 8.5 7 448 0.005164085 101 347 6.3 8.1 8.5 8 443 0.003748126 98 345 6.5 8.1 8.5 9 436 0.003098451 93 343 6.5 8.1 8.5 10 431 0.002498751 91 340 6.4 8.1 8.5 11 484 0.002213179 122 362 6.2 8.1 8.5 12 510 0.001936532 139 370 6.2 8.1 8.6 13 513 0.001665834 140 373 6.5 8.1 8.6 14 503 0.001549225 132 371 7.0 8.2 8.6 15 471 0.001362955 117 354 7.2 8.2 8.7 16 471 0.001291021 114 357 7.3 8.3 8.7 17 476 0.015484515 113 363 7.4 8.2 8.7 18 475 0.006993007 110 364 7.4 8.3 8.8 19 470 0.005161505 107 363 7.4 8.3 8.8 20 461 0.003746254 103 358 7.3 8.4 8.9 21 455 0.003096903 98 357 7.4 8.5 8.9 22 456 0.002497502 98 357 7.4 8.5 8.9 23 517 0.002212074 137 380 7.6 8.6 9.0 24 525 0.001935564 148 378 7.6 8.6 9.0 25 523 0.001665002 147 376 7.7 8.7 9.0 26 519 0.001548452 139 380 7.7 8.7 9.0 27 509 0.001362274 130 379 7.8 8.8 9.0 28 512 0.001290376 128 384 7.8 8.8 9.0 29 519 0.015476785 127 392 8.0 8.9 9.1 30 517 0.006989516 123 394 8.1 9.0 9.1 31 510 0.005158928 118 392 8.1 9.0 9.1 32 509 0.003744383 114 396 8.2 9.0 9.1 33 501 0.003095357 108 392 8.1 9.0 9.1 34 507 0.002496256 111 396 8.1 9.1 9.1 35 569 0.002210969 151 419 8.1 9.1 9.1 36 580 0.001934598 159 421 8.1 9.0 9.1 37 578 0.001664170 158 420 8.2 9.1 9.1 38 565 0.001547678 148 418 8.2 9.0 9.1 39 547 0.001361594 138 410 8.3 9.1 9.1 40 555 0.001289732 137 418 8.4 9.1 9.2 41 562 0.015469062 136 426 8.6 9.2 9.3 42 561 0.007235529 133 428 8.6 9.2 9.3 43 555 0.005156354 126 430 8.4 9.2 9.3 44 544 0.003742515 120 424 8.0 9.2 9.2 45 537 0.003093812 114 423 7.9 9.2 9.2 46 543 0.002495010 116 427 8.1 9.3 9.2 47 594 0.002209866 153 441 8.5 9.3 9.2 48 611 0.001933633 162 449 8.8 9.3 9.2 49 613 0.001663340 161 452 8.8 9.3 9.2 50 611 0.001546906 149 462 8.5 9.3 9.2 51 594 0.001360915 139 455 8.3 9.4 9.2 52 595 0.001289088 135 461 8.3 9.4 9.2 53 591 0.015461347 130 461 8.3 9.3 9.2 54 589 0.006982544 127 463 8.4 9.3 9.2 55 584 0.005153782 122 462 8.5 9.3 9.2 56 573 0.003740648 117 456 8.5 9.3 9.2 57 567 0.003092269 112 455 8.6 9.2 9.1 58 569 0.002493766 113 456 8.5 9.2 9.1 59 621 0.002208764 149 472 8.6 9.2 9.0 60 629 0.001932668 157 472 8.6 9.1 8.9 61 628 0.001662510 157 471 8.6 9.1 8.9 62 612 0.001546135 147 465 8.5 9.1 9.0 63 595 0.001360236 137 459 8.4 9.1 8.9 64 597 0.001288446 132 465 8.4 9.0 8.8 65 593 0.015453639 125 468 8.5 8.9 8.7 66 590 0.006979063 123 467 8.5 8.8 8.6 67 580 0.005151213 117 463 8.5 8.7 8.5 68 574 0.003738784 114 460 8.6 8.6 8.5 69 573 0.003090728 111 462 8.6 8.6 8.4 70 573 0.002492522 112 461 8.4 8.5 8.3 71 620 0.002207663 144 476 8.2 8.4 8.2 72 626 0.001931705 150 476 8.0 8.4 8.2 73 620 0.001661682 149 471 8.0 8.3 8.1 74 588 0.001545364 134 453 8.0 8.2 8.0 75 566 0.001359558 123 443 8.0 8.2 7.9 76 557 0.001287803 116 442 7.9 8.0 7.8 77 561 0.015445939 117 444 7.9 7.9 7.6 78 549 0.006975585 111 438 7.9 7.8 7.5 79 532 0.005148646 105 427 7.9 7.7 7.4 80 526 0.003736921 102 424 8.0 7.6 7.3 81 511 0.003089188 95 416 7.9 7.6 7.3 82 499 0.002491281 93 406 7.4 7.6 7.2 83 555 0.002206563 124 431 7.2 7.6 7.2 84 565 0.001930742 130 434 7.0 7.6 7.2 85 542 0.001660854 124 418 6.9 7.5 7.1 86 527 0.001544594 115 412 7.1 7.5 7.0 87 510 0.001358880 106 404 7.2 7.4 7.0 88 514 0.001287162 105 409 7.2 7.4 6.9 89 517 0.015438247 105 412 7.1 7.4 6.9 90 508 0.007221116 101 406 6.9 7.3 6.8 91 493 0.005146082 95 398 6.8 7.3 6.8 92 490 0.003735060 93 397 6.8 7.4 6.8 93 469 0.003087649 84 385 6.8 7.5 6.9 94 478 0.002490040 87 390 6.9 7.6 7.0 95 528 0.002205464 116 413 7.1 7.6 7.0 96 534 0.001929781 120 413 7.2 7.7 7.1 97 518 0.001660027 117 401 7.2 7.7 7.2 98 506 0.001543825 109 397 7.1 7.9 7.3 99 502 0.001358204 105 397 7.1 8.1 7.5 100 516 0.001286521 107 409 7.2 8.4 7.7 101 528 0.015430562 109 419 7.5 8.7 8.1 102 533 0.006968641 109 424 7.7 9.0 8.4 103 536 0.005143521 108 428 7.8 9.3 8.6 104 537 0.003733201 107 430 7.7 9.4 8.8 105 524 0.003086112 99 424 7.7 9.5 8.9 106 536 0.002488800 103 433 7.8 9.6 9.1 107 587 0.002204366 131 456 8.0 9.8 9.2 108 597 0.001928820 137 459 8.1 9.8 9.3 109 581 0.001659200 135 446 8.1 9.9 9.4 110 564 0.001543056 124 441 8.0 10.0 9.4 111 558 0.001357527 118 439 8.1 10.0 9.5 112 575 0.001285880 121 454 8.2 10.1 9.5 113 580 0.015422886 121 460 8.4 10.1 9.7 114 575 0.006965174 118 457 8.5 10.1 9.7 115 563 0.005140962 113 451 8.5 10.1 9.7 116 552 0.003731343 107 444 8.5 10.2 9.7 117 537 0.003084577 100 437 8.5 10.2 9.7 118 545 0.002487562 102 443 8.5 10.1 9.6 119 601 0.002203269 130 471 8.4 10.1 9.6 120 604 0.001927861 136 469 8.3 10.1 9.6 121 586 0.001658375 133 454 8.2 10.1 9.6 122 564 0.001542289 120 444 8.1 10.1 9.6 123 549 0.001356852 112 436 7.9 10.1 9.6 124 551 0.001285240 109 442 7.6 10.1 9.6 125 556 0.015415216 110 446 7.3 10.0 9.5 126 548 0.006961711 106 442 7.1 9.9 9.5 127 540 0.005138405 102 438 7.0 9.9 9.4 128 531 0.003729488 98 433 7.1 9.9 9.4 129 521 0.003083043 92 428 7.1 9.9 9.5 130 519 0.002486325 92 426 7.1 10.0 9.5 131 572 0.002202174 120 452 7.3 10.1 9.6 132 581 0.001926902 127 455 7.3 10.2 9.7 133 563 0.001657550 124 439 7.3 10.3 9.8 134 548 0.001541522 114 434 7.2 10.5 9.9 135 539 0.001356177 108 431 7.2 10.6 10.0 136 541 0.001284601 106 435 7.1 10.7 10.0 137 562 0.015407555 111 450 7.1 10.8 10.1 138 559 0.007206759 110 449 7.1 10.9 10.2 139 546 0.005135852 104 442 7.2 11.0 10.3 140 536 0.003727634 100 437 7.3 11.2 10.3 141 528 0.003081511 96 431 7.4 11.3 10.4 142 530 0.002485089 98 433 7.4 11.4 10.5 143 582 0.002201079 122 460 7.5 11.5 10.5 144 599 0.001925944 134 465 7.4 11.5 10.6 145 584 0.001656726 133 451 7.4 11.6 10.6 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) maand jongerdan25jaar vanaf25jaar 1.24933 -1.50811 0.99370 1.00184 `Belgi\\353` Eurogebied `eu27\\r` -0.12009 -0.09617 0.05790 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.09765 -0.13044 -0.00502 0.14183 1.14799 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.249326 0.654923 1.908 0.0585 . maand -1.508111 11.405643 -0.132 0.8950 jongerdan25jaar 0.993701 0.003313 299.922 <2e-16 *** vanaf25jaar 1.001841 0.002804 357.313 <2e-16 *** `Belgi\\353` -0.120094 0.108289 -1.109 0.2693 Eurogebied -0.096165 0.208858 -0.460 0.6459 `eu27\\r` 0.057902 0.213170 0.272 0.7863 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.5052 on 138 degrees of freedom Multiple R-squared: 0.9999, Adjusted R-squared: 0.9999 F-statistic: 1.93e+05 on 6 and 138 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.099868151 0.199736302 0.9001318 [2,] 0.041295088 0.082590176 0.9587049 [3,] 0.143442506 0.286885012 0.8565575 [4,] 0.113892754 0.227785508 0.8861072 [5,] 0.096421379 0.192842759 0.9035786 [6,] 0.054118560 0.108237119 0.9458814 [7,] 0.080980396 0.161960792 0.9190196 [8,] 0.048622833 0.097245666 0.9513772 [9,] 0.211385077 0.422770153 0.7886149 [10,] 0.206278769 0.412557537 0.7937212 [11,] 0.160133283 0.320266565 0.8398667 [12,] 0.112314429 0.224628857 0.8876856 [13,] 0.229611800 0.459223600 0.7703882 [14,] 0.177579575 0.355159150 0.8224204 [15,] 0.222001378 0.444002756 0.7779986 [16,] 0.250061513 0.500123027 0.7499385 [17,] 0.198096277 0.396192555 0.8019037 [18,] 0.151509260 0.303018520 0.8484907 [19,] 0.116777966 0.233555931 0.8832220 [20,] 0.086058346 0.172116693 0.9139417 [21,] 0.064228398 0.128456796 0.9357716 [22,] 0.047240160 0.094480320 0.9527598 [23,] 0.142582531 0.285165062 0.8574175 [24,] 0.283941342 0.567882684 0.7160587 [25,] 0.233986223 0.467972447 0.7660138 [26,] 0.273627509 0.547255018 0.7263725 [27,] 0.249003173 0.498006346 0.7509968 [28,] 0.233597031 0.467194062 0.7664030 [29,] 0.306495516 0.612991032 0.6935045 [30,] 0.342594463 0.685188927 0.6574055 [31,] 0.295712764 0.591425528 0.7042872 [32,] 0.249300849 0.498601697 0.7506992 [33,] 0.206976878 0.413953755 0.7930231 [34,] 0.345180911 0.690361823 0.6548191 [35,] 0.300603005 0.601206010 0.6993970 [36,] 0.255807612 0.511615224 0.7441924 [37,] 0.219145726 0.438291453 0.7808543 [38,] 0.214460162 0.428920324 0.7855398 [39,] 0.206130341 0.412260683 0.7938697 [40,] 0.184543244 0.369086489 0.8154568 [41,] 0.153271432 0.306542864 0.8467286 [42,] 0.126532394 0.253064789 0.8734676 [43,] 0.187392915 0.374785829 0.8126071 [44,] 0.154947009 0.309894018 0.8450530 [45,] 0.230394123 0.460788245 0.7696059 [46,] 0.195796004 0.391592007 0.8042040 [47,] 0.163462616 0.326925232 0.8365374 [48,] 0.133853298 0.267706596 0.8661467 [49,] 0.108224348 0.216448696 0.8917757 [50,] 0.090863533 0.181727065 0.9091365 [51,] 0.074639671 0.149279343 0.9253603 [52,] 0.060318915 0.120637831 0.9396811 [53,] 0.047188226 0.094376453 0.9528118 [54,] 0.078328440 0.156656881 0.9216716 [55,] 0.061894807 0.123789613 0.9381052 [56,] 0.048109580 0.096219160 0.9518904 [57,] 0.036869598 0.073739197 0.9631304 [58,] 0.027948661 0.055897321 0.9720513 [59,] 0.021240377 0.042480755 0.9787596 [60,] 0.015690781 0.031381563 0.9843092 [61,] 0.011407018 0.022814036 0.9885930 [62,] 0.008222447 0.016444893 0.9917776 [63,] 0.005877072 0.011754144 0.9941229 [64,] 0.004141206 0.008282412 0.9958588 [65,] 0.011642082 0.023284164 0.9883579 [66,] 0.008532994 0.017065988 0.9914670 [67,] 0.027638269 0.055276539 0.9723617 [68,] 0.020688753 0.041377506 0.9793112 [69,] 0.015233200 0.030466400 0.9847668 [70,] 0.011113435 0.022226871 0.9888866 [71,] 0.008036125 0.016072250 0.9919639 [72,] 0.005858305 0.011716610 0.9941417 [73,] 0.004386726 0.008773453 0.9956133 [74,] 0.003072387 0.006144775 0.9969276 [75,] 0.009441040 0.018882081 0.9905590 [76,] 0.006706452 0.013412903 0.9932935 [77,] 0.004697185 0.009394370 0.9953028 [78,] 0.003340225 0.006680449 0.9966598 [79,] 0.002315418 0.004630836 0.9976846 [80,] 0.001563191 0.003126382 0.9984368 [81,] 0.003250387 0.006500774 0.9967496 [82,] 0.002321904 0.004643808 0.9976781 [83,] 0.001636976 0.003273952 0.9983630 [84,] 0.001306550 0.002613100 0.9986934 [85,] 0.002185945 0.004371890 0.9978141 [86,] 0.007194434 0.014388867 0.9928056 [87,] 0.016191322 0.032382643 0.9838087 [88,] 0.011680577 0.023361154 0.9883194 [89,] 0.008489702 0.016979404 0.9915103 [90,] 0.006455675 0.012911350 0.9935443 [91,] 0.004925142 0.009850284 0.9950749 [92,] 0.003479917 0.006959834 0.9965201 [93,] 0.002590254 0.005180508 0.9974097 [94,] 0.002061848 0.004123696 0.9979382 [95,] 0.001805072 0.003610144 0.9981949 [96,] 0.002593259 0.005186518 0.9974067 [97,] 0.001943188 0.003886376 0.9980568 [98,] 0.001256985 0.002513969 0.9987430 [99,] 0.006369226 0.012738452 0.9936308 [100,] 0.004541962 0.009083924 0.9954580 [101,] 0.012735546 0.025471093 0.9872645 [102,] 0.026046062 0.052092123 0.9739539 [103,] 0.018623091 0.037246181 0.9813769 [104,] 0.032136003 0.064272006 0.9678640 [105,] 0.023172405 0.046344811 0.9768276 [106,] 0.053219205 0.106438410 0.9467808 [107,] 0.092009727 0.184019454 0.9079903 [108,] 0.069901597 0.139803194 0.9300984 [109,] 0.051019166 0.102038331 0.9489808 [110,] 0.050604469 0.101208937 0.9493955 [111,] 0.047113125 0.094226249 0.9528869 [112,] 0.076272678 0.152545357 0.9237273 [113,] 0.061200952 0.122401903 0.9387990 [114,] 0.089735303 0.179470607 0.9102647 [115,] 0.067530238 0.135060477 0.9324698 [116,] 0.058486538 0.116973076 0.9415135 [117,] 0.044340411 0.088680822 0.9556596 [118,] 0.032489321 0.064978641 0.9675107 [119,] 0.026519694 0.053039388 0.9734803 [120,] 0.035409524 0.070819049 0.9645905 [121,] 0.075692833 0.151385665 0.9243072 [122,] 0.067133567 0.134267134 0.9328664 [123,] 0.083581481 0.167162962 0.9164185 [124,] 0.062754897 0.125509793 0.9372451 [125,] 0.040658816 0.081317633 0.9593412 [126,] 0.100405878 0.200811756 0.8995941 > postscript(file="/var/wessaorg/rcomp/tmp/1qmhu1352123336.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/wessaorg/rcomp/tmp/2atmi1352123336.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/wessaorg/rcomp/tmp/3m36v1352123336.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/wessaorg/rcomp/tmp/4r1301352123336.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/wessaorg/rcomp/tmp/58ikr1352123336.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 = 145 Frequency = 1 1 2 3 4 5 6 -0.962139570 -0.004229500 -0.067391519 -0.108530684 -0.133640020 -0.169992420 7 8 9 10 11 12 -0.200975954 -0.194305752 -0.223096224 -0.243083218 -0.112784232 0.973355022 13 14 15 16 17 18 0.009749545 0.032530610 -0.012697919 -0.015600870 -0.009149839 0.961132803 19 20 21 22 23 24 -0.058684006 -0.084989163 -0.093994625 0.905101412 0.135812994 -0.791635348 25 26 27 28 29 30 0.226966712 0.169035547 0.135533762 0.113620767 0.141830542 0.121779048 31 32 33 34 35 36 0.091207629 -0.931476770 1.025108437 0.045351839 -0.745482891 0.291190627 37 38 39 40 41 42 0.307951462 -0.761144961 -0.788055310 0.197025457 0.225224558 0.190228486 43 44 45 46 47 48 -0.884699864 0.044176596 -0.004761997 0.033202042 0.288082054 0.365650761 49 50 51 52 53 54 0.353420132 0.223217384 0.158437401 -0.877914335 0.102348958 -0.921007560 55 56 57 58 59 60 0.058591793 0.036015657 0.013568818 0.005114040 0.219774515 0.265921470 61 62 63 64 65 66 0.267355471 0.197441833 -0.860996331 0.092526937 0.072457478 0.045094543 67 68 69 70 71 72 0.008085061 -0.005023934 -0.022790100 -0.043397358 0.102265076 0.115622262 73 74 75 76 77 78 0.114297134 1.048960455 0.003598886 -1.064211155 -0.038279438 -0.081623697 79 80 81 82 83 84 -0.105741800 -0.113059573 -0.155405408 -0.204747325 -0.079971340 0.927861767 85 86 87 88 89 90 -0.096710434 -0.112716520 -0.152560603 -0.162384458 -0.158576782 0.787039370 91 92 93 94 95 96 -0.251160283 -0.254427751 -0.286169013 0.738454496 -1.097646073 0.942968793 97 98 99 100 101 102 -0.060027165 -0.101792977 -0.119615073 -0.099944281 -0.042713161 -0.029183910 103 104 105 106 107 108 -0.016322192 -0.042403949 0.921105408 -0.061127803 0.109915974 1.147987677 109 110 111 112 113 114 0.162748562 -0.899898203 1.071931886 0.084724474 -0.892565351 0.093317086 115 116 117 118 119 120 -0.929879002 1.052709385 0.020533027 0.017355165 0.129720823 -0.841228855 121 122 123 124 125 126 -0.844919408 0.079427139 1.019470341 -0.046610706 -0.066222822 -0.130436169 127 128 129 130 131 132 -0.157234325 -0.163337373 0.801312443 0.813711886 -0.030384700 -0.988406820 133 134 135 136 137 138 0.025580047 -0.026941494 -0.055662644 -0.078126672 0.950870763 -0.062127889 139 140 141 142 143 144 -0.074317514 -1.061186504 0.939528596 -1.048629973 0.074018099 0.122180925 145 0.150872716 > postscript(file="/var/wessaorg/rcomp/tmp/6uvjv1352123336.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 = 145 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.962139570 NA 1 -0.004229500 -0.962139570 2 -0.067391519 -0.004229500 3 -0.108530684 -0.067391519 4 -0.133640020 -0.108530684 5 -0.169992420 -0.133640020 6 -0.200975954 -0.169992420 7 -0.194305752 -0.200975954 8 -0.223096224 -0.194305752 9 -0.243083218 -0.223096224 10 -0.112784232 -0.243083218 11 0.973355022 -0.112784232 12 0.009749545 0.973355022 13 0.032530610 0.009749545 14 -0.012697919 0.032530610 15 -0.015600870 -0.012697919 16 -0.009149839 -0.015600870 17 0.961132803 -0.009149839 18 -0.058684006 0.961132803 19 -0.084989163 -0.058684006 20 -0.093994625 -0.084989163 21 0.905101412 -0.093994625 22 0.135812994 0.905101412 23 -0.791635348 0.135812994 24 0.226966712 -0.791635348 25 0.169035547 0.226966712 26 0.135533762 0.169035547 27 0.113620767 0.135533762 28 0.141830542 0.113620767 29 0.121779048 0.141830542 30 0.091207629 0.121779048 31 -0.931476770 0.091207629 32 1.025108437 -0.931476770 33 0.045351839 1.025108437 34 -0.745482891 0.045351839 35 0.291190627 -0.745482891 36 0.307951462 0.291190627 37 -0.761144961 0.307951462 38 -0.788055310 -0.761144961 39 0.197025457 -0.788055310 40 0.225224558 0.197025457 41 0.190228486 0.225224558 42 -0.884699864 0.190228486 43 0.044176596 -0.884699864 44 -0.004761997 0.044176596 45 0.033202042 -0.004761997 46 0.288082054 0.033202042 47 0.365650761 0.288082054 48 0.353420132 0.365650761 49 0.223217384 0.353420132 50 0.158437401 0.223217384 51 -0.877914335 0.158437401 52 0.102348958 -0.877914335 53 -0.921007560 0.102348958 54 0.058591793 -0.921007560 55 0.036015657 0.058591793 56 0.013568818 0.036015657 57 0.005114040 0.013568818 58 0.219774515 0.005114040 59 0.265921470 0.219774515 60 0.267355471 0.265921470 61 0.197441833 0.267355471 62 -0.860996331 0.197441833 63 0.092526937 -0.860996331 64 0.072457478 0.092526937 65 0.045094543 0.072457478 66 0.008085061 0.045094543 67 -0.005023934 0.008085061 68 -0.022790100 -0.005023934 69 -0.043397358 -0.022790100 70 0.102265076 -0.043397358 71 0.115622262 0.102265076 72 0.114297134 0.115622262 73 1.048960455 0.114297134 74 0.003598886 1.048960455 75 -1.064211155 0.003598886 76 -0.038279438 -1.064211155 77 -0.081623697 -0.038279438 78 -0.105741800 -0.081623697 79 -0.113059573 -0.105741800 80 -0.155405408 -0.113059573 81 -0.204747325 -0.155405408 82 -0.079971340 -0.204747325 83 0.927861767 -0.079971340 84 -0.096710434 0.927861767 85 -0.112716520 -0.096710434 86 -0.152560603 -0.112716520 87 -0.162384458 -0.152560603 88 -0.158576782 -0.162384458 89 0.787039370 -0.158576782 90 -0.251160283 0.787039370 91 -0.254427751 -0.251160283 92 -0.286169013 -0.254427751 93 0.738454496 -0.286169013 94 -1.097646073 0.738454496 95 0.942968793 -1.097646073 96 -0.060027165 0.942968793 97 -0.101792977 -0.060027165 98 -0.119615073 -0.101792977 99 -0.099944281 -0.119615073 100 -0.042713161 -0.099944281 101 -0.029183910 -0.042713161 102 -0.016322192 -0.029183910 103 -0.042403949 -0.016322192 104 0.921105408 -0.042403949 105 -0.061127803 0.921105408 106 0.109915974 -0.061127803 107 1.147987677 0.109915974 108 0.162748562 1.147987677 109 -0.899898203 0.162748562 110 1.071931886 -0.899898203 111 0.084724474 1.071931886 112 -0.892565351 0.084724474 113 0.093317086 -0.892565351 114 -0.929879002 0.093317086 115 1.052709385 -0.929879002 116 0.020533027 1.052709385 117 0.017355165 0.020533027 118 0.129720823 0.017355165 119 -0.841228855 0.129720823 120 -0.844919408 -0.841228855 121 0.079427139 -0.844919408 122 1.019470341 0.079427139 123 -0.046610706 1.019470341 124 -0.066222822 -0.046610706 125 -0.130436169 -0.066222822 126 -0.157234325 -0.130436169 127 -0.163337373 -0.157234325 128 0.801312443 -0.163337373 129 0.813711886 0.801312443 130 -0.030384700 0.813711886 131 -0.988406820 -0.030384700 132 0.025580047 -0.988406820 133 -0.026941494 0.025580047 134 -0.055662644 -0.026941494 135 -0.078126672 -0.055662644 136 0.950870763 -0.078126672 137 -0.062127889 0.950870763 138 -0.074317514 -0.062127889 139 -1.061186504 -0.074317514 140 0.939528596 -1.061186504 141 -1.048629973 0.939528596 142 0.074018099 -1.048629973 143 0.122180925 0.074018099 144 0.150872716 0.122180925 145 NA 0.150872716 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.004229500 -0.962139570 [2,] -0.067391519 -0.004229500 [3,] -0.108530684 -0.067391519 [4,] -0.133640020 -0.108530684 [5,] -0.169992420 -0.133640020 [6,] -0.200975954 -0.169992420 [7,] -0.194305752 -0.200975954 [8,] -0.223096224 -0.194305752 [9,] -0.243083218 -0.223096224 [10,] -0.112784232 -0.243083218 [11,] 0.973355022 -0.112784232 [12,] 0.009749545 0.973355022 [13,] 0.032530610 0.009749545 [14,] -0.012697919 0.032530610 [15,] -0.015600870 -0.012697919 [16,] -0.009149839 -0.015600870 [17,] 0.961132803 -0.009149839 [18,] -0.058684006 0.961132803 [19,] -0.084989163 -0.058684006 [20,] -0.093994625 -0.084989163 [21,] 0.905101412 -0.093994625 [22,] 0.135812994 0.905101412 [23,] -0.791635348 0.135812994 [24,] 0.226966712 -0.791635348 [25,] 0.169035547 0.226966712 [26,] 0.135533762 0.169035547 [27,] 0.113620767 0.135533762 [28,] 0.141830542 0.113620767 [29,] 0.121779048 0.141830542 [30,] 0.091207629 0.121779048 [31,] -0.931476770 0.091207629 [32,] 1.025108437 -0.931476770 [33,] 0.045351839 1.025108437 [34,] -0.745482891 0.045351839 [35,] 0.291190627 -0.745482891 [36,] 0.307951462 0.291190627 [37,] -0.761144961 0.307951462 [38,] -0.788055310 -0.761144961 [39,] 0.197025457 -0.788055310 [40,] 0.225224558 0.197025457 [41,] 0.190228486 0.225224558 [42,] -0.884699864 0.190228486 [43,] 0.044176596 -0.884699864 [44,] -0.004761997 0.044176596 [45,] 0.033202042 -0.004761997 [46,] 0.288082054 0.033202042 [47,] 0.365650761 0.288082054 [48,] 0.353420132 0.365650761 [49,] 0.223217384 0.353420132 [50,] 0.158437401 0.223217384 [51,] -0.877914335 0.158437401 [52,] 0.102348958 -0.877914335 [53,] -0.921007560 0.102348958 [54,] 0.058591793 -0.921007560 [55,] 0.036015657 0.058591793 [56,] 0.013568818 0.036015657 [57,] 0.005114040 0.013568818 [58,] 0.219774515 0.005114040 [59,] 0.265921470 0.219774515 [60,] 0.267355471 0.265921470 [61,] 0.197441833 0.267355471 [62,] -0.860996331 0.197441833 [63,] 0.092526937 -0.860996331 [64,] 0.072457478 0.092526937 [65,] 0.045094543 0.072457478 [66,] 0.008085061 0.045094543 [67,] -0.005023934 0.008085061 [68,] -0.022790100 -0.005023934 [69,] -0.043397358 -0.022790100 [70,] 0.102265076 -0.043397358 [71,] 0.115622262 0.102265076 [72,] 0.114297134 0.115622262 [73,] 1.048960455 0.114297134 [74,] 0.003598886 1.048960455 [75,] -1.064211155 0.003598886 [76,] -0.038279438 -1.064211155 [77,] -0.081623697 -0.038279438 [78,] -0.105741800 -0.081623697 [79,] -0.113059573 -0.105741800 [80,] -0.155405408 -0.113059573 [81,] -0.204747325 -0.155405408 [82,] -0.079971340 -0.204747325 [83,] 0.927861767 -0.079971340 [84,] -0.096710434 0.927861767 [85,] -0.112716520 -0.096710434 [86,] -0.152560603 -0.112716520 [87,] -0.162384458 -0.152560603 [88,] -0.158576782 -0.162384458 [89,] 0.787039370 -0.158576782 [90,] -0.251160283 0.787039370 [91,] -0.254427751 -0.251160283 [92,] -0.286169013 -0.254427751 [93,] 0.738454496 -0.286169013 [94,] -1.097646073 0.738454496 [95,] 0.942968793 -1.097646073 [96,] -0.060027165 0.942968793 [97,] -0.101792977 -0.060027165 [98,] -0.119615073 -0.101792977 [99,] -0.099944281 -0.119615073 [100,] -0.042713161 -0.099944281 [101,] -0.029183910 -0.042713161 [102,] -0.016322192 -0.029183910 [103,] -0.042403949 -0.016322192 [104,] 0.921105408 -0.042403949 [105,] -0.061127803 0.921105408 [106,] 0.109915974 -0.061127803 [107,] 1.147987677 0.109915974 [108,] 0.162748562 1.147987677 [109,] -0.899898203 0.162748562 [110,] 1.071931886 -0.899898203 [111,] 0.084724474 1.071931886 [112,] -0.892565351 0.084724474 [113,] 0.093317086 -0.892565351 [114,] -0.929879002 0.093317086 [115,] 1.052709385 -0.929879002 [116,] 0.020533027 1.052709385 [117,] 0.017355165 0.020533027 [118,] 0.129720823 0.017355165 [119,] -0.841228855 0.129720823 [120,] -0.844919408 -0.841228855 [121,] 0.079427139 -0.844919408 [122,] 1.019470341 0.079427139 [123,] -0.046610706 1.019470341 [124,] -0.066222822 -0.046610706 [125,] -0.130436169 -0.066222822 [126,] -0.157234325 -0.130436169 [127,] -0.163337373 -0.157234325 [128,] 0.801312443 -0.163337373 [129,] 0.813711886 0.801312443 [130,] -0.030384700 0.813711886 [131,] -0.988406820 -0.030384700 [132,] 0.025580047 -0.988406820 [133,] -0.026941494 0.025580047 [134,] -0.055662644 -0.026941494 [135,] -0.078126672 -0.055662644 [136,] 0.950870763 -0.078126672 [137,] -0.062127889 0.950870763 [138,] -0.074317514 -0.062127889 [139,] -1.061186504 -0.074317514 [140,] 0.939528596 -1.061186504 [141,] -1.048629973 0.939528596 [142,] 0.074018099 -1.048629973 [143,] 0.122180925 0.074018099 [144,] 0.150872716 0.122180925 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.004229500 -0.962139570 2 -0.067391519 -0.004229500 3 -0.108530684 -0.067391519 4 -0.133640020 -0.108530684 5 -0.169992420 -0.133640020 6 -0.200975954 -0.169992420 7 -0.194305752 -0.200975954 8 -0.223096224 -0.194305752 9 -0.243083218 -0.223096224 10 -0.112784232 -0.243083218 11 0.973355022 -0.112784232 12 0.009749545 0.973355022 13 0.032530610 0.009749545 14 -0.012697919 0.032530610 15 -0.015600870 -0.012697919 16 -0.009149839 -0.015600870 17 0.961132803 -0.009149839 18 -0.058684006 0.961132803 19 -0.084989163 -0.058684006 20 -0.093994625 -0.084989163 21 0.905101412 -0.093994625 22 0.135812994 0.905101412 23 -0.791635348 0.135812994 24 0.226966712 -0.791635348 25 0.169035547 0.226966712 26 0.135533762 0.169035547 27 0.113620767 0.135533762 28 0.141830542 0.113620767 29 0.121779048 0.141830542 30 0.091207629 0.121779048 31 -0.931476770 0.091207629 32 1.025108437 -0.931476770 33 0.045351839 1.025108437 34 -0.745482891 0.045351839 35 0.291190627 -0.745482891 36 0.307951462 0.291190627 37 -0.761144961 0.307951462 38 -0.788055310 -0.761144961 39 0.197025457 -0.788055310 40 0.225224558 0.197025457 41 0.190228486 0.225224558 42 -0.884699864 0.190228486 43 0.044176596 -0.884699864 44 -0.004761997 0.044176596 45 0.033202042 -0.004761997 46 0.288082054 0.033202042 47 0.365650761 0.288082054 48 0.353420132 0.365650761 49 0.223217384 0.353420132 50 0.158437401 0.223217384 51 -0.877914335 0.158437401 52 0.102348958 -0.877914335 53 -0.921007560 0.102348958 54 0.058591793 -0.921007560 55 0.036015657 0.058591793 56 0.013568818 0.036015657 57 0.005114040 0.013568818 58 0.219774515 0.005114040 59 0.265921470 0.219774515 60 0.267355471 0.265921470 61 0.197441833 0.267355471 62 -0.860996331 0.197441833 63 0.092526937 -0.860996331 64 0.072457478 0.092526937 65 0.045094543 0.072457478 66 0.008085061 0.045094543 67 -0.005023934 0.008085061 68 -0.022790100 -0.005023934 69 -0.043397358 -0.022790100 70 0.102265076 -0.043397358 71 0.115622262 0.102265076 72 0.114297134 0.115622262 73 1.048960455 0.114297134 74 0.003598886 1.048960455 75 -1.064211155 0.003598886 76 -0.038279438 -1.064211155 77 -0.081623697 -0.038279438 78 -0.105741800 -0.081623697 79 -0.113059573 -0.105741800 80 -0.155405408 -0.113059573 81 -0.204747325 -0.155405408 82 -0.079971340 -0.204747325 83 0.927861767 -0.079971340 84 -0.096710434 0.927861767 85 -0.112716520 -0.096710434 86 -0.152560603 -0.112716520 87 -0.162384458 -0.152560603 88 -0.158576782 -0.162384458 89 0.787039370 -0.158576782 90 -0.251160283 0.787039370 91 -0.254427751 -0.251160283 92 -0.286169013 -0.254427751 93 0.738454496 -0.286169013 94 -1.097646073 0.738454496 95 0.942968793 -1.097646073 96 -0.060027165 0.942968793 97 -0.101792977 -0.060027165 98 -0.119615073 -0.101792977 99 -0.099944281 -0.119615073 100 -0.042713161 -0.099944281 101 -0.029183910 -0.042713161 102 -0.016322192 -0.029183910 103 -0.042403949 -0.016322192 104 0.921105408 -0.042403949 105 -0.061127803 0.921105408 106 0.109915974 -0.061127803 107 1.147987677 0.109915974 108 0.162748562 1.147987677 109 -0.899898203 0.162748562 110 1.071931886 -0.899898203 111 0.084724474 1.071931886 112 -0.892565351 0.084724474 113 0.093317086 -0.892565351 114 -0.929879002 0.093317086 115 1.052709385 -0.929879002 116 0.020533027 1.052709385 117 0.017355165 0.020533027 118 0.129720823 0.017355165 119 -0.841228855 0.129720823 120 -0.844919408 -0.841228855 121 0.079427139 -0.844919408 122 1.019470341 0.079427139 123 -0.046610706 1.019470341 124 -0.066222822 -0.046610706 125 -0.130436169 -0.066222822 126 -0.157234325 -0.130436169 127 -0.163337373 -0.157234325 128 0.801312443 -0.163337373 129 0.813711886 0.801312443 130 -0.030384700 0.813711886 131 -0.988406820 -0.030384700 132 0.025580047 -0.988406820 133 -0.026941494 0.025580047 134 -0.055662644 -0.026941494 135 -0.078126672 -0.055662644 136 0.950870763 -0.078126672 137 -0.062127889 0.950870763 138 -0.074317514 -0.062127889 139 -1.061186504 -0.074317514 140 0.939528596 -1.061186504 141 -1.048629973 0.939528596 142 0.074018099 -1.048629973 143 0.122180925 0.074018099 144 0.150872716 0.122180925 > 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/wessaorg/rcomp/tmp/7sfwd1352123336.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/wessaorg/rcomp/tmp/89gpd1352123336.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/wessaorg/rcomp/tmp/9v98d1352123336.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/wessaorg/rcomp/tmp/1014t61352123336.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11k10p1352123336.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/wessaorg/rcomp/tmp/12x93n1352123337.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/wessaorg/rcomp/tmp/13rldy1352123337.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/wessaorg/rcomp/tmp/14m6uz1352123337.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/wessaorg/rcomp/tmp/15gmzx1352123337.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/wessaorg/rcomp/tmp/16t2br1352123337.tab") + } > > try(system("convert tmp/1qmhu1352123336.ps tmp/1qmhu1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/2atmi1352123336.ps tmp/2atmi1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/3m36v1352123336.ps tmp/3m36v1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/4r1301352123336.ps tmp/4r1301352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/58ikr1352123336.ps tmp/58ikr1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/6uvjv1352123336.ps tmp/6uvjv1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/7sfwd1352123336.ps tmp/7sfwd1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/89gpd1352123336.ps tmp/89gpd1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/9v98d1352123336.ps tmp/9v98d1352123336.png",intern=TRUE)) character(0) > try(system("convert tmp/1014t61352123336.ps tmp/1014t61352123336.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 9.370 1.411 10.774