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(1 + ,501 + ,134 + ,368 + ,6.70 + ,8.50 + ,8.70 + ,2 + ,485 + ,124 + ,361 + ,6.80 + ,8.40 + ,8.60 + ,3 + ,464 + ,113 + ,351 + ,6.70 + ,8.40 + ,8.60 + ,4 + ,460 + ,109 + ,351 + ,6.60 + ,8.30 + ,8.50 + ,5 + ,467 + ,109 + ,358 + ,6.40 + ,8.20 + ,8.50 + ,6 + ,460 + ,106 + ,354 + ,6.30 + ,8.20 + ,8.50 + ,7 + ,448 + ,101 + ,347 + ,6.30 + ,8.10 + ,8.50 + ,8 + ,443 + ,98 + ,345 + ,6.50 + ,8.10 + ,8.50 + ,9 + ,436 + ,93 + ,343 + ,6.50 + ,8.10 + ,8.50 + ,10 + ,431 + ,91 + ,340 + ,6.40 + ,8.10 + ,8.50 + ,11 + ,484 + ,122 + ,362 + ,6.20 + ,8.10 + ,8.50 + ,12 + ,510 + ,139 + ,370 + ,6.20 + ,8.10 + ,8.60 + ,13 + ,513 + ,140 + ,373 + ,6.50 + ,8.10 + ,8.60 + ,14 + ,503 + ,132 + ,371 + ,7.00 + ,8.20 + ,8.60 + ,15 + ,471 + ,117 + ,354 + ,7.20 + ,8.20 + ,8.70 + ,16 + ,471 + ,114 + ,357 + ,7.30 + ,8.30 + ,8.70 + ,17 + ,476 + ,113 + ,363 + ,7.40 + ,8.20 + ,8.70 + ,18 + ,475 + ,110 + ,364 + ,7.40 + ,8.30 + ,8.80 + ,19 + ,470 + ,107 + ,363 + ,7.40 + ,8.30 + ,8.80 + ,20 + ,461 + ,103 + ,358 + ,7.30 + ,8.40 + ,8.90 + ,21 + ,455 + ,98 + ,357 + ,7.40 + ,8.50 + ,8.90 + ,22 + ,456 + ,98 + ,357 + ,7.40 + ,8.50 + ,8.90 + ,23 + ,517 + ,137 + ,380 + ,7.60 + ,8.60 + ,9.00 + ,24 + ,525 + ,148 + ,378 + ,7.60 + ,8.60 + ,9.00 + ,25 + ,523 + ,147 + ,376 + ,7.70 + ,8.70 + ,9.00 + ,26 + ,519 + ,139 + ,380 + ,7.70 + ,8.70 + ,9.00 + ,27 + ,509 + ,130 + ,379 + ,7.80 + ,8.80 + ,9.00 + ,28 + ,512 + ,128 + ,384 + ,7.80 + ,8.80 + ,9.00 + ,29 + ,519 + ,127 + ,392 + ,8.00 + ,8.90 + ,9.10 + ,30 + ,517 + ,123 + ,394 + ,8.10 + ,9.00 + ,9.10 + ,31 + ,510 + ,118 + ,392 + ,8.10 + ,9.00 + ,9.10 + ,32 + ,509 + ,114 + ,396 + ,8.20 + ,9.00 + ,9.10 + ,33 + ,501 + ,108 + ,392 + ,8.10 + ,9.00 + ,9.10 + ,34 + ,507 + ,111 + ,396 + ,8.10 + ,9.10 + ,9.10 + ,35 + ,569 + ,151 + ,419 + ,8.10 + ,9.10 + ,9.10 + ,36 + ,580 + ,159 + ,421 + ,8.10 + ,9.00 + ,9.10 + ,37 + ,578 + ,158 + ,420 + ,8.20 + ,9.10 + ,9.10 + ,38 + ,565 + ,148 + ,418 + ,8.20 + ,9.00 + ,9.10 + ,39 + ,547 + ,138 + ,410 + ,8.30 + ,9.10 + ,9.10 + ,40 + ,555 + ,137 + ,418 + ,8.40 + ,9.10 + ,9.20 + ,41 + ,562 + ,136 + ,426 + ,8.60 + ,9.20 + ,9.30 + ,42 + ,561 + ,133 + ,428 + ,8.60 + ,9.20 + ,9.30 + ,43 + ,555 + ,126 + ,430 + ,8.40 + ,9.20 + ,9.30 + ,44 + ,544 + ,120 + ,424 + ,8.00 + ,9.20 + ,9.20 + ,45 + ,537 + ,114 + ,423 + ,7.90 + ,9.20 + ,9.20 + ,46 + ,543 + ,116 + ,427 + ,8.10 + ,9.30 + ,9.20 + ,47 + ,594 + ,153 + ,441 + ,8.50 + ,9.30 + ,9.20 + ,48 + ,611 + ,162 + ,449 + ,8.80 + ,9.30 + ,9.20 + ,49 + ,613 + ,161 + ,452 + ,8.80 + ,9.30 + ,9.20 + ,50 + ,611 + ,149 + ,462 + ,8.50 + ,9.30 + ,9.20 + ,51 + ,594 + ,139 + ,455 + ,8.30 + ,9.40 + ,9.20 + ,52 + ,595 + ,135 + ,461 + ,8.30 + ,9.40 + ,9.20 + ,53 + ,591 + ,130 + ,461 + ,8.30 + ,9.30 + ,9.20 + ,54 + ,589 + ,127 + ,463 + ,8.40 + ,9.30 + ,9.20 + ,55 + ,584 + ,122 + ,462 + ,8.50 + ,9.30 + ,9.20 + ,56 + ,573 + ,117 + ,456 + ,8.50 + ,9.30 + ,9.20 + ,57 + ,567 + ,112 + ,455 + ,8.60 + ,9.20 + ,9.10 + ,58 + ,569 + ,113 + ,456 + ,8.50 + ,9.20 + ,9.10 + ,59 + ,621 + ,149 + ,472 + ,8.60 + ,9.20 + ,9.00 + ,60 + ,629 + ,157 + ,472 + ,8.60 + ,9.10 + ,8.90 + ,61 + ,628 + ,157 + ,471 + ,8.60 + ,9.10 + ,8.90 + ,62 + ,612 + ,147 + ,465 + ,8.50 + ,9.10 + ,9.00 + ,63 + ,595 + ,137 + ,459 + ,8.40 + ,9.10 + ,8.90 + ,64 + ,597 + ,132 + ,465 + ,8.40 + ,9.00 + ,8.80 + ,65 + ,593 + ,125 + ,468 + ,8.50 + ,8.90 + ,8.70 + ,66 + ,590 + ,123 + ,467 + ,8.50 + ,8.80 + ,8.60 + ,67 + ,580 + ,117 + ,463 + ,8.50 + ,8.70 + ,8.50 + ,68 + ,574 + ,114 + ,460 + ,8.60 + ,8.60 + ,8.50 + ,69 + ,573 + ,111 + ,462 + ,8.60 + ,8.60 + ,8.40 + ,70 + ,573 + ,112 + ,461 + ,8.40 + ,8.50 + ,8.30 + ,71 + ,620 + ,144 + ,476 + ,8.20 + ,8.40 + ,8.20 + ,72 + ,626 + ,150 + ,476 + ,8.00 + ,8.40 + ,8.20 + ,73 + ,620 + ,149 + ,471 + ,8.00 + ,8.30 + ,8.10 + ,74 + ,588 + ,134 + ,453 + ,8.00 + ,8.20 + ,8.00 + ,75 + ,566 + ,123 + ,443 + ,8.00 + ,8.20 + ,7.90 + ,76 + ,557 + ,116 + ,442 + ,7.90 + ,8.00 + ,7.80 + ,77 + ,561 + ,117 + ,444 + ,7.90 + ,7.90 + ,7.60 + ,78 + ,549 + ,111 + ,438 + ,7.90 + ,7.80 + ,7.50 + ,79 + ,532 + ,105 + ,427 + ,7.90 + ,7.70 + ,7.40 + ,80 + ,526 + ,102 + ,424 + ,8.00 + ,7.60 + ,7.30 + ,81 + ,511 + ,95 + ,416 + ,7.90 + ,7.60 + ,7.30 + ,82 + ,499 + ,93 + ,406 + ,7.40 + ,7.60 + ,7.20 + ,83 + ,555 + ,124 + ,431 + ,7.20 + ,7.60 + ,7.20 + ,84 + ,565 + ,130 + ,434 + ,7.00 + ,7.60 + ,7.20 + ,85 + ,542 + ,124 + ,418 + ,6.90 + ,7.50 + ,7.10 + ,86 + ,527 + ,115 + ,412 + ,7.10 + ,7.50 + ,7.00 + ,87 + ,510 + ,106 + ,404 + ,7.20 + ,7.40 + ,7.00 + ,88 + ,514 + ,105 + ,409 + ,7.20 + ,7.40 + ,6.90 + ,89 + ,517 + ,105 + ,412 + ,7.10 + ,7.40 + ,6.90 + ,90 + ,508 + ,101 + ,406 + ,6.90 + ,7.30 + ,6.80 + ,91 + ,493 + ,95 + ,398 + ,6.80 + ,7.30 + ,6.80 + ,92 + ,490 + ,93 + ,397 + ,6.80 + ,7.40 + ,6.80 + ,93 + ,469 + ,84 + ,385 + ,6.80 + ,7.50 + ,6.90 + ,94 + ,478 + ,87 + ,390 + ,6.90 + ,7.60 + ,7.00 + ,95 + ,528 + ,116 + ,413 + ,7.10 + ,7.60 + ,7.00 + ,96 + ,534 + ,120 + ,413 + ,7.20 + ,7.70 + ,7.10 + ,97 + ,518 + ,117 + ,401 + ,7.20 + ,7.70 + ,7.20 + ,98 + ,506 + ,109 + ,397 + ,7.10 + ,7.90 + ,7.30 + ,99 + ,502 + ,105 + ,397 + ,7.10 + ,8.10 + ,7.50 + ,100 + ,516 + ,107 + ,409 + ,7.20 + ,8.40 + ,7.70 + ,101 + ,528 + ,109 + ,419 + ,7.50 + ,8.70 + ,8.10 + ,102 + ,533 + ,109 + ,424 + ,7.70 + ,9.00 + ,8.40 + ,103 + ,536 + ,108 + ,428 + ,7.80 + ,9.30 + ,8.60 + ,104 + ,537 + ,107 + ,430 + ,7.70 + ,9.40 + ,8.80 + ,105 + ,524 + ,99 + ,424 + ,7.70 + ,9.50 + ,8.90 + ,106 + ,536 + ,103 + ,433 + ,7.80 + ,9.60 + ,9.10 + ,107 + ,587 + ,131 + ,456 + ,8.00 + ,9.80 + ,9.20 + ,108 + ,597 + ,137 + ,459 + ,8.10 + ,9.80 + ,9.30 + ,109 + ,581 + ,135 + ,446 + ,8.10 + ,9.90 + ,9.40 + ,110 + ,564 + ,124 + ,441 + ,8.00 + ,10.00 + ,9.40 + ,111 + ,558 + ,118 + ,439 + ,8.10 + ,10.00 + ,9.50 + ,112 + ,575 + ,121 + ,454 + ,8.20 + ,10.10 + ,9.50 + ,113 + ,580 + ,121 + ,460 + ,8.40 + ,10.10 + ,9.70 + ,114 + ,575 + ,118 + ,457 + ,8.50 + ,10.10 + ,9.70 + ,115 + ,563 + ,113 + ,451 + ,8.50 + ,10.10 + ,9.70 + ,116 + ,552 + ,107 + ,444 + ,8.50 + ,10.20 + ,9.70 + ,117 + ,537 + ,100 + ,437 + ,8.50 + ,10.20 + ,9.70 + ,118 + ,545 + ,102 + ,443 + ,8.50 + ,10.10 + ,9.60 + ,119 + ,601 + ,130 + ,471 + ,8.40 + ,10.10 + ,9.60 + ,120 + ,604 + ,136 + ,469 + ,8.30 + ,10.10 + ,9.60 + ,121 + ,586 + ,133 + ,454 + ,8.20 + ,10.10 + ,9.60 + ,122 + ,564 + ,120 + ,444 + ,8.10 + ,10.10 + ,9.60 + ,123 + ,549 + ,112 + ,436 + ,7.90 + ,10.10 + ,9.60 + ,124 + ,551 + ,109 + ,442 + ,7.60 + ,10.10 + ,9.60 + ,125 + ,556 + ,110 + ,446 + ,7.30 + ,10.00 + ,9.50 + ,126 + ,548 + ,106 + ,442 + ,7.10 + ,9.90 + ,9.50 + ,127 + ,540 + ,102 + ,438 + ,7.00 + ,9.90 + ,9.40 + ,128 + ,531 + ,98 + ,433 + ,7.10 + ,9.90 + ,9.40 + ,129 + ,521 + ,92 + ,428 + ,7.10 + ,9.90 + ,9.50 + ,130 + ,519 + ,92 + ,426 + ,7.10 + ,10.00 + ,9.50 + ,131 + ,572 + ,120 + ,452 + ,7.30 + ,10.10 + ,9.60 + ,132 + ,581 + ,127 + ,455 + ,7.30 + ,10.20 + ,9.70 + ,133 + ,563 + ,124 + ,439 + ,7.30 + ,10.30 + ,9.80 + ,134 + ,548 + ,114 + ,434 + ,7.20 + ,10.50 + ,9.90 + ,135 + ,539 + ,108 + ,431 + ,7.20 + ,10.60 + ,10.00 + ,136 + ,541 + ,106 + ,435 + ,7.10 + ,10.70 + ,10.00 + ,137 + ,562 + ,111 + ,450 + ,7.10 + ,10.80 + ,10.10 + ,138 + ,559 + ,110 + ,449 + ,7.10 + ,10.90 + ,10.20 + ,139 + ,546 + ,104 + ,442 + ,7.20 + ,11.00 + ,10.30 + ,140 + ,536 + ,100 + ,437 + ,7.30 + ,11.20 + ,10.30 + ,141 + ,528 + ,96 + ,431 + ,7.40 + ,11.30 + ,10.40 + ,142 + ,530 + ,98 + ,433 + ,7.40 + ,11.40 + ,10.50 + ,143 + ,582 + ,122 + ,460 + ,7.50 + ,11.50 + ,10.50 + ,144 + ,599 + ,134 + ,465 + ,7.40 + ,11.50 + ,10.60 + ,145 + ,584 + ,133 + ,451 + ,7.40 + ,11.60 + ,10.60) + ,dim=c(7 + ,145) + ,dimnames=list(c('t' + ,'Totaal' + ,'jongerdan25jaar' + ,'vanaf25jaar' + ,'Belgiƫ' + ,'Eurogebied' + ,'EU-27 ') + ,1:145)) > y <- array(NA,dim=c(7,145),dimnames=list(c('t','Totaal','jongerdan25jaar','vanaf25jaar','Belgiƫ','Eurogebied','EU-27 '),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 t jongerdan25jaar vanaf25jaar Belgi\303\253 Eurogebied EU-27\r 1 501 1 134 368 6.7 8.5 8.7 2 485 2 124 361 6.8 8.4 8.6 3 464 3 113 351 6.7 8.4 8.6 4 460 4 109 351 6.6 8.3 8.5 5 467 5 109 358 6.4 8.2 8.5 6 460 6 106 354 6.3 8.2 8.5 7 448 7 101 347 6.3 8.1 8.5 8 443 8 98 345 6.5 8.1 8.5 9 436 9 93 343 6.5 8.1 8.5 10 431 10 91 340 6.4 8.1 8.5 11 484 11 122 362 6.2 8.1 8.5 12 510 12 139 370 6.2 8.1 8.6 13 513 13 140 373 6.5 8.1 8.6 14 503 14 132 371 7.0 8.2 8.6 15 471 15 117 354 7.2 8.2 8.7 16 471 16 114 357 7.3 8.3 8.7 17 476 17 113 363 7.4 8.2 8.7 18 475 18 110 364 7.4 8.3 8.8 19 470 19 107 363 7.4 8.3 8.8 20 461 20 103 358 7.3 8.4 8.9 21 455 21 98 357 7.4 8.5 8.9 22 456 22 98 357 7.4 8.5 8.9 23 517 23 137 380 7.6 8.6 9.0 24 525 24 148 378 7.6 8.6 9.0 25 523 25 147 376 7.7 8.7 9.0 26 519 26 139 380 7.7 8.7 9.0 27 509 27 130 379 7.8 8.8 9.0 28 512 28 128 384 7.8 8.8 9.0 29 519 29 127 392 8.0 8.9 9.1 30 517 30 123 394 8.1 9.0 9.1 31 510 31 118 392 8.1 9.0 9.1 32 509 32 114 396 8.2 9.0 9.1 33 501 33 108 392 8.1 9.0 9.1 34 507 34 111 396 8.1 9.1 9.1 35 569 35 151 419 8.1 9.1 9.1 36 580 36 159 421 8.1 9.0 9.1 37 578 37 158 420 8.2 9.1 9.1 38 565 38 148 418 8.2 9.0 9.1 39 547 39 138 410 8.3 9.1 9.1 40 555 40 137 418 8.4 9.1 9.2 41 562 41 136 426 8.6 9.2 9.3 42 561 42 133 428 8.6 9.2 9.3 43 555 43 126 430 8.4 9.2 9.3 44 544 44 120 424 8.0 9.2 9.2 45 537 45 114 423 7.9 9.2 9.2 46 543 46 116 427 8.1 9.3 9.2 47 594 47 153 441 8.5 9.3 9.2 48 611 48 162 449 8.8 9.3 9.2 49 613 49 161 452 8.8 9.3 9.2 50 611 50 149 462 8.5 9.3 9.2 51 594 51 139 455 8.3 9.4 9.2 52 595 52 135 461 8.3 9.4 9.2 53 591 53 130 461 8.3 9.3 9.2 54 589 54 127 463 8.4 9.3 9.2 55 584 55 122 462 8.5 9.3 9.2 56 573 56 117 456 8.5 9.3 9.2 57 567 57 112 455 8.6 9.2 9.1 58 569 58 113 456 8.5 9.2 9.1 59 621 59 149 472 8.6 9.2 9.0 60 629 60 157 472 8.6 9.1 8.9 61 628 61 157 471 8.6 9.1 8.9 62 612 62 147 465 8.5 9.1 9.0 63 595 63 137 459 8.4 9.1 8.9 64 597 64 132 465 8.4 9.0 8.8 65 593 65 125 468 8.5 8.9 8.7 66 590 66 123 467 8.5 8.8 8.6 67 580 67 117 463 8.5 8.7 8.5 68 574 68 114 460 8.6 8.6 8.5 69 573 69 111 462 8.6 8.6 8.4 70 573 70 112 461 8.4 8.5 8.3 71 620 71 144 476 8.2 8.4 8.2 72 626 72 150 476 8.0 8.4 8.2 73 620 73 149 471 8.0 8.3 8.1 74 588 74 134 453 8.0 8.2 8.0 75 566 75 123 443 8.0 8.2 7.9 76 557 76 116 442 7.9 8.0 7.8 77 561 77 117 444 7.9 7.9 7.6 78 549 78 111 438 7.9 7.8 7.5 79 532 79 105 427 7.9 7.7 7.4 80 526 80 102 424 8.0 7.6 7.3 81 511 81 95 416 7.9 7.6 7.3 82 499 82 93 406 7.4 7.6 7.2 83 555 83 124 431 7.2 7.6 7.2 84 565 84 130 434 7.0 7.6 7.2 85 542 85 124 418 6.9 7.5 7.1 86 527 86 115 412 7.1 7.5 7.0 87 510 87 106 404 7.2 7.4 7.0 88 514 88 105 409 7.2 7.4 6.9 89 517 89 105 412 7.1 7.4 6.9 90 508 90 101 406 6.9 7.3 6.8 91 493 91 95 398 6.8 7.3 6.8 92 490 92 93 397 6.8 7.4 6.8 93 469 93 84 385 6.8 7.5 6.9 94 478 94 87 390 6.9 7.6 7.0 95 528 95 116 413 7.1 7.6 7.0 96 534 96 120 413 7.2 7.7 7.1 97 518 97 117 401 7.2 7.7 7.2 98 506 98 109 397 7.1 7.9 7.3 99 502 99 105 397 7.1 8.1 7.5 100 516 100 107 409 7.2 8.4 7.7 101 528 101 109 419 7.5 8.7 8.1 102 533 102 109 424 7.7 9.0 8.4 103 536 103 108 428 7.8 9.3 8.6 104 537 104 107 430 7.7 9.4 8.8 105 524 105 99 424 7.7 9.5 8.9 106 536 106 103 433 7.8 9.6 9.1 107 587 107 131 456 8.0 9.8 9.2 108 597 108 137 459 8.1 9.8 9.3 109 581 109 135 446 8.1 9.9 9.4 110 564 110 124 441 8.0 10.0 9.4 111 558 111 118 439 8.1 10.0 9.5 112 575 112 121 454 8.2 10.1 9.5 113 580 113 121 460 8.4 10.1 9.7 114 575 114 118 457 8.5 10.1 9.7 115 563 115 113 451 8.5 10.1 9.7 116 552 116 107 444 8.5 10.2 9.7 117 537 117 100 437 8.5 10.2 9.7 118 545 118 102 443 8.5 10.1 9.6 119 601 119 130 471 8.4 10.1 9.6 120 604 120 136 469 8.3 10.1 9.6 121 586 121 133 454 8.2 10.1 9.6 122 564 122 120 444 8.1 10.1 9.6 123 549 123 112 436 7.9 10.1 9.6 124 551 124 109 442 7.6 10.1 9.6 125 556 125 110 446 7.3 10.0 9.5 126 548 126 106 442 7.1 9.9 9.5 127 540 127 102 438 7.0 9.9 9.4 128 531 128 98 433 7.1 9.9 9.4 129 521 129 92 428 7.1 9.9 9.5 130 519 130 92 426 7.1 10.0 9.5 131 572 131 120 452 7.3 10.1 9.6 132 581 132 127 455 7.3 10.2 9.7 133 563 133 124 439 7.3 10.3 9.8 134 548 134 114 434 7.2 10.5 9.9 135 539 135 108 431 7.2 10.6 10.0 136 541 136 106 435 7.1 10.7 10.0 137 562 137 111 450 7.1 10.8 10.1 138 559 138 110 449 7.1 10.9 10.2 139 546 139 104 442 7.2 11.0 10.3 140 536 140 100 437 7.3 11.2 10.3 141 528 141 96 431 7.4 11.3 10.4 142 530 142 98 433 7.4 11.4 10.5 143 582 143 122 460 7.5 11.5 10.5 144 599 144 134 465 7.4 11.5 10.6 145 584 145 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) t jongerdan25jaar vanaf25jaar 1.374903 0.004627 0.995382 1.000427 `Belgi\\303\\253` Eurogebied `EU-27\\r` -0.076690 -0.471006 0.395748 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.10112 -0.15046 -0.01011 0.15433 1.11876 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.374903 0.658951 2.087 0.0388 * t 0.004627 0.003750 1.234 0.2194 jongerdan25jaar 0.995382 0.003406 292.280 <2e-16 *** vanaf25jaar 1.000427 0.002953 338.746 <2e-16 *** `Belgi\\303\\253` -0.076690 0.113077 -0.678 0.4988 Eurogebied -0.471006 0.369384 -1.275 0.2044 `EU-27\\r` 0.395748 0.347338 1.139 0.2565 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.5025 on 138 degrees of freedom Multiple R-squared: 0.9999, Adjusted R-squared: 0.9999 F-statistic: 1.951e+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.0996675469 0.199335094 0.9003325 [2,] 0.0533092302 0.106618460 0.9466908 [3,] 0.2651781327 0.530356265 0.7348219 [4,] 0.2174735286 0.434947057 0.7825265 [5,] 0.1637016797 0.327403359 0.8362983 [6,] 0.1057099597 0.211419919 0.8942900 [7,] 0.0830854925 0.166170985 0.9169145 [8,] 0.0651942340 0.130388468 0.9348058 [9,] 0.1853044539 0.370608908 0.8146955 [10,] 0.1840464041 0.368092808 0.8159536 [11,] 0.1536119652 0.307223930 0.8463880 [12,] 0.1083229882 0.216645976 0.8916770 [13,] 0.1755919947 0.351183989 0.8244080 [14,] 0.1488286434 0.297657287 0.8511714 [15,] 0.2670189688 0.534037938 0.7329810 [16,] 0.2476200559 0.495240112 0.7523799 [17,] 0.1927245384 0.385449077 0.8072755 [18,] 0.1473726297 0.294745259 0.8526274 [19,] 0.1137534970 0.227506994 0.8862465 [20,] 0.0863555751 0.172711150 0.9136444 [21,] 0.0629773795 0.125954759 0.9370226 [22,] 0.0452933642 0.090586728 0.9547066 [23,] 0.1267045975 0.253409195 0.8732954 [24,] 0.2581366544 0.516273309 0.7418633 [25,] 0.2120749614 0.424149923 0.7879250 [26,] 0.2573143258 0.514628652 0.7426857 [27,] 0.2317274365 0.463454873 0.7682726 [28,] 0.2087396716 0.417479343 0.7912603 [29,] 0.2841036088 0.568207218 0.7158964 [30,] 0.3362242844 0.672448569 0.6637757 [31,] 0.2908506530 0.581701306 0.7091493 [32,] 0.2454717574 0.490943515 0.7545282 [33,] 0.2032539465 0.406507893 0.7967461 [34,] 0.3346987355 0.669397471 0.6653013 [35,] 0.2868148980 0.573629796 0.7131851 [36,] 0.2418764778 0.483752956 0.7581235 [37,] 0.2029180137 0.405836027 0.7970820 [38,] 0.1903111913 0.380622383 0.8096888 [39,] 0.1799979845 0.359995969 0.8200020 [40,] 0.1593769182 0.318753836 0.8406231 [41,] 0.1328147054 0.265629411 0.8671853 [42,] 0.1082988386 0.216597677 0.8917012 [43,] 0.1623578410 0.324715682 0.8376422 [44,] 0.1328788193 0.265757639 0.8671212 [45,] 0.2036320179 0.407264036 0.7963680 [46,] 0.1721972000 0.344394400 0.8278028 [47,] 0.1420602306 0.284120461 0.8579398 [48,] 0.1152738691 0.230547738 0.8847261 [49,] 0.0926822606 0.185364521 0.9073177 [50,] 0.0740095075 0.148019015 0.9259905 [51,] 0.0580182004 0.116036401 0.9419818 [52,] 0.0450628162 0.090125632 0.9549372 [53,] 0.0345109974 0.069021995 0.9654890 [54,] 0.0834892686 0.166978537 0.9165107 [55,] 0.0667031508 0.133406302 0.9332968 [56,] 0.0522224288 0.104444858 0.9477776 [57,] 0.0404101794 0.080820359 0.9595898 [58,] 0.0310741416 0.062148283 0.9689259 [59,] 0.0240974919 0.048194984 0.9759025 [60,] 0.0179950819 0.035990164 0.9820049 [61,] 0.0133564779 0.026712956 0.9866435 [62,] 0.0096092722 0.019218544 0.9903907 [63,] 0.0068214291 0.013642858 0.9931786 [64,] 0.0047776452 0.009555290 0.9952224 [65,] 0.0091641983 0.018328397 0.9908358 [66,] 0.0071296238 0.014259248 0.9928704 [67,] 0.0321393233 0.064278647 0.9678607 [68,] 0.0243258534 0.048651707 0.9756741 [69,] 0.0182388143 0.036477629 0.9817612 [70,] 0.0136113934 0.027222787 0.9863886 [71,] 0.0099354894 0.019870979 0.9900645 [72,] 0.0073421520 0.014684304 0.9926578 [73,] 0.0058337230 0.011667446 0.9941663 [74,] 0.0042058820 0.008411764 0.9957941 [75,] 0.0087242218 0.017448444 0.9912758 [76,] 0.0065068542 0.013013708 0.9934931 [77,] 0.0046223546 0.009244709 0.9953776 [78,] 0.0033867639 0.006773528 0.9966132 [79,] 0.0023414110 0.004682822 0.9976586 [80,] 0.0016032919 0.003206584 0.9983967 [81,] 0.0030129280 0.006025856 0.9969871 [82,] 0.0022463103 0.004492621 0.9977537 [83,] 0.0015967697 0.003193539 0.9984032 [84,] 0.0012862386 0.002572477 0.9987138 [85,] 0.0018639188 0.003727838 0.9981361 [86,] 0.0061825854 0.012365171 0.9938174 [87,] 0.0157955290 0.031591058 0.9842045 [88,] 0.0117862159 0.023572432 0.9882138 [89,] 0.0084816585 0.016963317 0.9915183 [90,] 0.0061275347 0.012255069 0.9938725 [91,] 0.0042564575 0.008512915 0.9957435 [92,] 0.0029717480 0.005943496 0.9970283 [93,] 0.0020963153 0.004192631 0.9979037 [94,] 0.0015426738 0.003085348 0.9984573 [95,] 0.0013039509 0.002607902 0.9986960 [96,] 0.0014376184 0.002875237 0.9985624 [97,] 0.0011920738 0.002384148 0.9988079 [98,] 0.0007626116 0.001525223 0.9992374 [99,] 0.0029016058 0.005803212 0.9970984 [100,] 0.0021694656 0.004338931 0.9978305 [101,] 0.0090693606 0.018138721 0.9909306 [102,] 0.0150522105 0.030104421 0.9849478 [103,] 0.0118065564 0.023613113 0.9881934 [104,] 0.0200911318 0.040182264 0.9799089 [105,] 0.0148093084 0.029618617 0.9851907 [106,] 0.0365806662 0.073161332 0.9634193 [107,] 0.0692797759 0.138559552 0.9307202 [108,] 0.0505989959 0.101197992 0.9494010 [109,] 0.0362789591 0.072557918 0.9637210 [110,] 0.0319595920 0.063919184 0.9680404 [111,] 0.0337896202 0.067579240 0.9662104 [112,] 0.0538228099 0.107645620 0.9461772 [113,] 0.0406968433 0.081393687 0.9593032 [114,] 0.0721853235 0.144370647 0.9278147 [115,] 0.0597005523 0.119401105 0.9402994 [116,] 0.0578090355 0.115618071 0.9421910 [117,] 0.0606958121 0.121391624 0.9393042 [118,] 0.0473615335 0.094723067 0.9526385 [119,] 0.0300849097 0.060169819 0.9699151 [120,] 0.0256648535 0.051329707 0.9743351 [121,] 0.0224924342 0.044984868 0.9775076 [122,] 0.0161535145 0.032307029 0.9838465 [123,] 0.0367141602 0.073428320 0.9632858 [124,] 0.1311877779 0.262375556 0.8688122 [125,] 0.0743958095 0.148791619 0.9256042 [126,] 0.0499967890 0.099993578 0.9500032 > postscript(file="/var/wessaorg/rcomp/tmp/1y4zi1352148941.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/2g4x91352148941.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/3t2pv1352148941.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/4o5811352148941.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/5724p1352148941.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.843418863 0.108904725 0.050078585 0.011784861 -0.058268148 -0.082710748 7 8 9 10 11 12 -0.154540633 -0.156830011 -0.183693417 -0.203944781 -0.090139704 0.940751155 13 14 15 16 17 18 -0.037531141 0.007196640 -0.083681927 -0.048673782 -0.099911161 0.888706861 19 20 21 22 23 24 -0.129347250 -0.150455310 -0.122975995 0.872397249 0.060921574 -0.892052890 25 26 27 28 29 30 0.154325483 0.111046968 0.120054047 0.104057064 0.114261361 0.145078269 31 32 33 34 35 36 0.118214862 -0.898922462 1.062780761 0.117401482 -0.712319822 0.272043662 37 38 39 40 41 42 0.317995213 -0.779059077 -0.771682303 0.183752451 0.193956748 0.174622171 43 44 45 46 47 48 -0.878522552 0.100602260 0.061025017 0.126365590 0.317307329 0.373835394 49 50 51 52 53 54 0.363310113 0.275991564 0.259934650 -0.765725273 0.159457088 -0.852208533 55 56 57 58 59 60 0.128170194 0.103014075 0.075867025 0.067762551 0.269800532 0.294592471 61 62 63 64 65 66 0.290392537 0.194902357 -0.821438201 0.140758040 0.102667585 0.081705756 67 68 69 70 71 72 0.043552158 -0.013079942 0.007160293 -0.015285270 0.098599843 0.106343530 73 74 75 76 77 78 0.091707049 1.017966427 0.006384054 -1.092437612 -0.061250918 -0.098550873 79 80 81 82 83 84 -0.133716717 -0.150774005 -0.191981554 -0.200346173 -0.087821562 0.918641659 85 86 87 88 89 90 -0.122059031 -0.110774664 -0.192981007 -0.164785120 -0.178361297 0.778236955 91 92 93 94 95 96 -0.258352534 -0.224687997 -0.258229643 0.764058400 -1.101123641 0.927916571 97 98 99 100 101 102 -0.125017310 -0.117923840 -0.125971278 -0.056662683 -0.050312155 -0.019157780 103 104 105 106 107 108 0.039711214 -0.010105235 0.958410247 -0.055965751 0.128860514 1.118755790 109 110 111 112 113 114 0.117967378 -0.895892283 1.040720395 0.098315030 -0.972684369 0.017784119 115 116 117 118 119 120 -1.007372000 1.010381233 -0.023584182 -0.029061528 0.075997395 -0.907736318 121 122 123 124 125 126 -0.927483877 0.004453865 0.950959303 -0.093089428 -0.125338056 -0.209168259 127 128 129 130 131 132 -0.198654106 -0.211950033 0.718274156 0.761601633 -0.101953157 -1.068008189 133 134 135 136 137 138 -0.072134194 -0.073850020 -0.097378887 -0.073517415 0.946069571 -0.055222646 139 140 141 142 143 144 -0.069375269 -0.988470019 1.006186653 -0.982531852 0.166920157 0.168332232 145 0.212163513 > postscript(file="/var/wessaorg/rcomp/tmp/6nob81352148941.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.843418863 NA 1 0.108904725 -0.843418863 2 0.050078585 0.108904725 3 0.011784861 0.050078585 4 -0.058268148 0.011784861 5 -0.082710748 -0.058268148 6 -0.154540633 -0.082710748 7 -0.156830011 -0.154540633 8 -0.183693417 -0.156830011 9 -0.203944781 -0.183693417 10 -0.090139704 -0.203944781 11 0.940751155 -0.090139704 12 -0.037531141 0.940751155 13 0.007196640 -0.037531141 14 -0.083681927 0.007196640 15 -0.048673782 -0.083681927 16 -0.099911161 -0.048673782 17 0.888706861 -0.099911161 18 -0.129347250 0.888706861 19 -0.150455310 -0.129347250 20 -0.122975995 -0.150455310 21 0.872397249 -0.122975995 22 0.060921574 0.872397249 23 -0.892052890 0.060921574 24 0.154325483 -0.892052890 25 0.111046968 0.154325483 26 0.120054047 0.111046968 27 0.104057064 0.120054047 28 0.114261361 0.104057064 29 0.145078269 0.114261361 30 0.118214862 0.145078269 31 -0.898922462 0.118214862 32 1.062780761 -0.898922462 33 0.117401482 1.062780761 34 -0.712319822 0.117401482 35 0.272043662 -0.712319822 36 0.317995213 0.272043662 37 -0.779059077 0.317995213 38 -0.771682303 -0.779059077 39 0.183752451 -0.771682303 40 0.193956748 0.183752451 41 0.174622171 0.193956748 42 -0.878522552 0.174622171 43 0.100602260 -0.878522552 44 0.061025017 0.100602260 45 0.126365590 0.061025017 46 0.317307329 0.126365590 47 0.373835394 0.317307329 48 0.363310113 0.373835394 49 0.275991564 0.363310113 50 0.259934650 0.275991564 51 -0.765725273 0.259934650 52 0.159457088 -0.765725273 53 -0.852208533 0.159457088 54 0.128170194 -0.852208533 55 0.103014075 0.128170194 56 0.075867025 0.103014075 57 0.067762551 0.075867025 58 0.269800532 0.067762551 59 0.294592471 0.269800532 60 0.290392537 0.294592471 61 0.194902357 0.290392537 62 -0.821438201 0.194902357 63 0.140758040 -0.821438201 64 0.102667585 0.140758040 65 0.081705756 0.102667585 66 0.043552158 0.081705756 67 -0.013079942 0.043552158 68 0.007160293 -0.013079942 69 -0.015285270 0.007160293 70 0.098599843 -0.015285270 71 0.106343530 0.098599843 72 0.091707049 0.106343530 73 1.017966427 0.091707049 74 0.006384054 1.017966427 75 -1.092437612 0.006384054 76 -0.061250918 -1.092437612 77 -0.098550873 -0.061250918 78 -0.133716717 -0.098550873 79 -0.150774005 -0.133716717 80 -0.191981554 -0.150774005 81 -0.200346173 -0.191981554 82 -0.087821562 -0.200346173 83 0.918641659 -0.087821562 84 -0.122059031 0.918641659 85 -0.110774664 -0.122059031 86 -0.192981007 -0.110774664 87 -0.164785120 -0.192981007 88 -0.178361297 -0.164785120 89 0.778236955 -0.178361297 90 -0.258352534 0.778236955 91 -0.224687997 -0.258352534 92 -0.258229643 -0.224687997 93 0.764058400 -0.258229643 94 -1.101123641 0.764058400 95 0.927916571 -1.101123641 96 -0.125017310 0.927916571 97 -0.117923840 -0.125017310 98 -0.125971278 -0.117923840 99 -0.056662683 -0.125971278 100 -0.050312155 -0.056662683 101 -0.019157780 -0.050312155 102 0.039711214 -0.019157780 103 -0.010105235 0.039711214 104 0.958410247 -0.010105235 105 -0.055965751 0.958410247 106 0.128860514 -0.055965751 107 1.118755790 0.128860514 108 0.117967378 1.118755790 109 -0.895892283 0.117967378 110 1.040720395 -0.895892283 111 0.098315030 1.040720395 112 -0.972684369 0.098315030 113 0.017784119 -0.972684369 114 -1.007372000 0.017784119 115 1.010381233 -1.007372000 116 -0.023584182 1.010381233 117 -0.029061528 -0.023584182 118 0.075997395 -0.029061528 119 -0.907736318 0.075997395 120 -0.927483877 -0.907736318 121 0.004453865 -0.927483877 122 0.950959303 0.004453865 123 -0.093089428 0.950959303 124 -0.125338056 -0.093089428 125 -0.209168259 -0.125338056 126 -0.198654106 -0.209168259 127 -0.211950033 -0.198654106 128 0.718274156 -0.211950033 129 0.761601633 0.718274156 130 -0.101953157 0.761601633 131 -1.068008189 -0.101953157 132 -0.072134194 -1.068008189 133 -0.073850020 -0.072134194 134 -0.097378887 -0.073850020 135 -0.073517415 -0.097378887 136 0.946069571 -0.073517415 137 -0.055222646 0.946069571 138 -0.069375269 -0.055222646 139 -0.988470019 -0.069375269 140 1.006186653 -0.988470019 141 -0.982531852 1.006186653 142 0.166920157 -0.982531852 143 0.168332232 0.166920157 144 0.212163513 0.168332232 145 NA 0.212163513 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.108904725 -0.843418863 [2,] 0.050078585 0.108904725 [3,] 0.011784861 0.050078585 [4,] -0.058268148 0.011784861 [5,] -0.082710748 -0.058268148 [6,] -0.154540633 -0.082710748 [7,] -0.156830011 -0.154540633 [8,] -0.183693417 -0.156830011 [9,] -0.203944781 -0.183693417 [10,] -0.090139704 -0.203944781 [11,] 0.940751155 -0.090139704 [12,] -0.037531141 0.940751155 [13,] 0.007196640 -0.037531141 [14,] -0.083681927 0.007196640 [15,] -0.048673782 -0.083681927 [16,] -0.099911161 -0.048673782 [17,] 0.888706861 -0.099911161 [18,] -0.129347250 0.888706861 [19,] -0.150455310 -0.129347250 [20,] -0.122975995 -0.150455310 [21,] 0.872397249 -0.122975995 [22,] 0.060921574 0.872397249 [23,] -0.892052890 0.060921574 [24,] 0.154325483 -0.892052890 [25,] 0.111046968 0.154325483 [26,] 0.120054047 0.111046968 [27,] 0.104057064 0.120054047 [28,] 0.114261361 0.104057064 [29,] 0.145078269 0.114261361 [30,] 0.118214862 0.145078269 [31,] -0.898922462 0.118214862 [32,] 1.062780761 -0.898922462 [33,] 0.117401482 1.062780761 [34,] -0.712319822 0.117401482 [35,] 0.272043662 -0.712319822 [36,] 0.317995213 0.272043662 [37,] -0.779059077 0.317995213 [38,] -0.771682303 -0.779059077 [39,] 0.183752451 -0.771682303 [40,] 0.193956748 0.183752451 [41,] 0.174622171 0.193956748 [42,] -0.878522552 0.174622171 [43,] 0.100602260 -0.878522552 [44,] 0.061025017 0.100602260 [45,] 0.126365590 0.061025017 [46,] 0.317307329 0.126365590 [47,] 0.373835394 0.317307329 [48,] 0.363310113 0.373835394 [49,] 0.275991564 0.363310113 [50,] 0.259934650 0.275991564 [51,] -0.765725273 0.259934650 [52,] 0.159457088 -0.765725273 [53,] -0.852208533 0.159457088 [54,] 0.128170194 -0.852208533 [55,] 0.103014075 0.128170194 [56,] 0.075867025 0.103014075 [57,] 0.067762551 0.075867025 [58,] 0.269800532 0.067762551 [59,] 0.294592471 0.269800532 [60,] 0.290392537 0.294592471 [61,] 0.194902357 0.290392537 [62,] -0.821438201 0.194902357 [63,] 0.140758040 -0.821438201 [64,] 0.102667585 0.140758040 [65,] 0.081705756 0.102667585 [66,] 0.043552158 0.081705756 [67,] -0.013079942 0.043552158 [68,] 0.007160293 -0.013079942 [69,] -0.015285270 0.007160293 [70,] 0.098599843 -0.015285270 [71,] 0.106343530 0.098599843 [72,] 0.091707049 0.106343530 [73,] 1.017966427 0.091707049 [74,] 0.006384054 1.017966427 [75,] -1.092437612 0.006384054 [76,] -0.061250918 -1.092437612 [77,] -0.098550873 -0.061250918 [78,] -0.133716717 -0.098550873 [79,] -0.150774005 -0.133716717 [80,] -0.191981554 -0.150774005 [81,] -0.200346173 -0.191981554 [82,] -0.087821562 -0.200346173 [83,] 0.918641659 -0.087821562 [84,] -0.122059031 0.918641659 [85,] -0.110774664 -0.122059031 [86,] -0.192981007 -0.110774664 [87,] -0.164785120 -0.192981007 [88,] -0.178361297 -0.164785120 [89,] 0.778236955 -0.178361297 [90,] -0.258352534 0.778236955 [91,] -0.224687997 -0.258352534 [92,] -0.258229643 -0.224687997 [93,] 0.764058400 -0.258229643 [94,] -1.101123641 0.764058400 [95,] 0.927916571 -1.101123641 [96,] -0.125017310 0.927916571 [97,] -0.117923840 -0.125017310 [98,] -0.125971278 -0.117923840 [99,] -0.056662683 -0.125971278 [100,] -0.050312155 -0.056662683 [101,] -0.019157780 -0.050312155 [102,] 0.039711214 -0.019157780 [103,] -0.010105235 0.039711214 [104,] 0.958410247 -0.010105235 [105,] -0.055965751 0.958410247 [106,] 0.128860514 -0.055965751 [107,] 1.118755790 0.128860514 [108,] 0.117967378 1.118755790 [109,] -0.895892283 0.117967378 [110,] 1.040720395 -0.895892283 [111,] 0.098315030 1.040720395 [112,] -0.972684369 0.098315030 [113,] 0.017784119 -0.972684369 [114,] -1.007372000 0.017784119 [115,] 1.010381233 -1.007372000 [116,] -0.023584182 1.010381233 [117,] -0.029061528 -0.023584182 [118,] 0.075997395 -0.029061528 [119,] -0.907736318 0.075997395 [120,] -0.927483877 -0.907736318 [121,] 0.004453865 -0.927483877 [122,] 0.950959303 0.004453865 [123,] -0.093089428 0.950959303 [124,] -0.125338056 -0.093089428 [125,] -0.209168259 -0.125338056 [126,] -0.198654106 -0.209168259 [127,] -0.211950033 -0.198654106 [128,] 0.718274156 -0.211950033 [129,] 0.761601633 0.718274156 [130,] -0.101953157 0.761601633 [131,] -1.068008189 -0.101953157 [132,] -0.072134194 -1.068008189 [133,] -0.073850020 -0.072134194 [134,] -0.097378887 -0.073850020 [135,] -0.073517415 -0.097378887 [136,] 0.946069571 -0.073517415 [137,] -0.055222646 0.946069571 [138,] -0.069375269 -0.055222646 [139,] -0.988470019 -0.069375269 [140,] 1.006186653 -0.988470019 [141,] -0.982531852 1.006186653 [142,] 0.166920157 -0.982531852 [143,] 0.168332232 0.166920157 [144,] 0.212163513 0.168332232 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.108904725 -0.843418863 2 0.050078585 0.108904725 3 0.011784861 0.050078585 4 -0.058268148 0.011784861 5 -0.082710748 -0.058268148 6 -0.154540633 -0.082710748 7 -0.156830011 -0.154540633 8 -0.183693417 -0.156830011 9 -0.203944781 -0.183693417 10 -0.090139704 -0.203944781 11 0.940751155 -0.090139704 12 -0.037531141 0.940751155 13 0.007196640 -0.037531141 14 -0.083681927 0.007196640 15 -0.048673782 -0.083681927 16 -0.099911161 -0.048673782 17 0.888706861 -0.099911161 18 -0.129347250 0.888706861 19 -0.150455310 -0.129347250 20 -0.122975995 -0.150455310 21 0.872397249 -0.122975995 22 0.060921574 0.872397249 23 -0.892052890 0.060921574 24 0.154325483 -0.892052890 25 0.111046968 0.154325483 26 0.120054047 0.111046968 27 0.104057064 0.120054047 28 0.114261361 0.104057064 29 0.145078269 0.114261361 30 0.118214862 0.145078269 31 -0.898922462 0.118214862 32 1.062780761 -0.898922462 33 0.117401482 1.062780761 34 -0.712319822 0.117401482 35 0.272043662 -0.712319822 36 0.317995213 0.272043662 37 -0.779059077 0.317995213 38 -0.771682303 -0.779059077 39 0.183752451 -0.771682303 40 0.193956748 0.183752451 41 0.174622171 0.193956748 42 -0.878522552 0.174622171 43 0.100602260 -0.878522552 44 0.061025017 0.100602260 45 0.126365590 0.061025017 46 0.317307329 0.126365590 47 0.373835394 0.317307329 48 0.363310113 0.373835394 49 0.275991564 0.363310113 50 0.259934650 0.275991564 51 -0.765725273 0.259934650 52 0.159457088 -0.765725273 53 -0.852208533 0.159457088 54 0.128170194 -0.852208533 55 0.103014075 0.128170194 56 0.075867025 0.103014075 57 0.067762551 0.075867025 58 0.269800532 0.067762551 59 0.294592471 0.269800532 60 0.290392537 0.294592471 61 0.194902357 0.290392537 62 -0.821438201 0.194902357 63 0.140758040 -0.821438201 64 0.102667585 0.140758040 65 0.081705756 0.102667585 66 0.043552158 0.081705756 67 -0.013079942 0.043552158 68 0.007160293 -0.013079942 69 -0.015285270 0.007160293 70 0.098599843 -0.015285270 71 0.106343530 0.098599843 72 0.091707049 0.106343530 73 1.017966427 0.091707049 74 0.006384054 1.017966427 75 -1.092437612 0.006384054 76 -0.061250918 -1.092437612 77 -0.098550873 -0.061250918 78 -0.133716717 -0.098550873 79 -0.150774005 -0.133716717 80 -0.191981554 -0.150774005 81 -0.200346173 -0.191981554 82 -0.087821562 -0.200346173 83 0.918641659 -0.087821562 84 -0.122059031 0.918641659 85 -0.110774664 -0.122059031 86 -0.192981007 -0.110774664 87 -0.164785120 -0.192981007 88 -0.178361297 -0.164785120 89 0.778236955 -0.178361297 90 -0.258352534 0.778236955 91 -0.224687997 -0.258352534 92 -0.258229643 -0.224687997 93 0.764058400 -0.258229643 94 -1.101123641 0.764058400 95 0.927916571 -1.101123641 96 -0.125017310 0.927916571 97 -0.117923840 -0.125017310 98 -0.125971278 -0.117923840 99 -0.056662683 -0.125971278 100 -0.050312155 -0.056662683 101 -0.019157780 -0.050312155 102 0.039711214 -0.019157780 103 -0.010105235 0.039711214 104 0.958410247 -0.010105235 105 -0.055965751 0.958410247 106 0.128860514 -0.055965751 107 1.118755790 0.128860514 108 0.117967378 1.118755790 109 -0.895892283 0.117967378 110 1.040720395 -0.895892283 111 0.098315030 1.040720395 112 -0.972684369 0.098315030 113 0.017784119 -0.972684369 114 -1.007372000 0.017784119 115 1.010381233 -1.007372000 116 -0.023584182 1.010381233 117 -0.029061528 -0.023584182 118 0.075997395 -0.029061528 119 -0.907736318 0.075997395 120 -0.927483877 -0.907736318 121 0.004453865 -0.927483877 122 0.950959303 0.004453865 123 -0.093089428 0.950959303 124 -0.125338056 -0.093089428 125 -0.209168259 -0.125338056 126 -0.198654106 -0.209168259 127 -0.211950033 -0.198654106 128 0.718274156 -0.211950033 129 0.761601633 0.718274156 130 -0.101953157 0.761601633 131 -1.068008189 -0.101953157 132 -0.072134194 -1.068008189 133 -0.073850020 -0.072134194 134 -0.097378887 -0.073850020 135 -0.073517415 -0.097378887 136 0.946069571 -0.073517415 137 -0.055222646 0.946069571 138 -0.069375269 -0.055222646 139 -0.988470019 -0.069375269 140 1.006186653 -0.988470019 141 -0.982531852 1.006186653 142 0.166920157 -0.982531852 143 0.168332232 0.166920157 144 0.212163513 0.168332232 > 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/7driy1352148941.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/840251352148941.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/95vxd1352148941.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/10ots71352148941.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/11a12v1352148941.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/12538m1352148941.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/13cki71352148941.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/14seen1352148941.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/15ahe21352148941.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/16lyt31352148941.tab") + } > > try(system("convert tmp/1y4zi1352148941.ps tmp/1y4zi1352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/2g4x91352148941.ps tmp/2g4x91352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/3t2pv1352148941.ps tmp/3t2pv1352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/4o5811352148941.ps tmp/4o5811352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/5724p1352148941.ps tmp/5724p1352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/6nob81352148941.ps tmp/6nob81352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/7driy1352148941.ps tmp/7driy1352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/840251352148941.ps tmp/840251352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/95vxd1352148941.ps tmp/95vxd1352148941.png",intern=TRUE)) character(0) > try(system("convert tmp/10ots71352148941.ps tmp/10ots71352148941.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.356 0.906 8.259