R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(549 + ,3 + ,0 + ,1 + ,564 + ,3.1 + ,-2 + ,1 + ,586 + ,2.9 + ,-4 + ,1 + ,604 + ,2.4 + ,-4 + ,1 + ,601 + ,2.4 + ,-7 + ,1 + ,545 + ,2.7 + ,-9 + ,1 + ,537 + ,2.5 + ,-13 + ,1 + ,552 + ,2.1 + ,-8 + ,1 + ,563 + ,1.9 + ,-13 + ,1 + ,575 + ,0.8 + ,-15 + ,1 + ,580 + ,0.8 + ,-15 + ,1 + ,575 + ,0.3 + ,-15 + ,1 + ,558 + ,0 + ,-10 + ,1 + ,564 + ,-0.9 + ,-12 + ,1 + ,581 + ,-1 + ,-11 + ,1 + ,597 + ,-0.7 + ,-11 + ,1 + ,587 + ,-1.7 + ,-17 + ,1 + ,536 + ,-1 + ,-18 + ,1 + ,524 + ,-0.2 + ,-19 + ,1.09 + ,537 + ,0.7 + ,-22 + ,1.31 + ,536 + ,0.6 + ,-24 + ,1.66 + ,533 + ,1.9 + ,-24 + ,2 + ,528 + ,2.1 + ,-20 + ,2.31 + ,516 + ,2.7 + ,-25 + ,2.75 + ,502 + ,3.2 + ,-22 + ,3.42 + ,506 + ,4.8 + ,-17 + ,3.97 + ,518 + ,5.5 + ,-9 + ,4.25 + ,534 + ,5.4 + ,-11 + ,4.25 + ,528 + ,5.9 + ,-13 + ,4.18 + ,478 + ,5.8 + ,-11 + ,4 + ,469 + ,5.1 + ,-9 + ,4 + ,490 + ,4.1 + ,-7 + ,4 + ,493 + ,4.4 + ,-3 + ,4 + ,508 + ,3.6 + ,-3 + ,4 + ,517 + ,3.5 + ,-6 + ,4 + ,514 + ,3.1 + ,-4 + ,4 + ,510 + ,2.9 + ,-8 + ,4 + ,527 + ,2.2 + ,-1 + ,4 + ,542 + ,1.4 + ,-2 + ,4 + ,565 + ,1.2 + ,-2 + ,4 + ,555 + ,1.3 + ,-1 + ,4 + ,499 + ,1.3 + ,1 + ,3.9 + ,511 + ,1.3 + ,2 + ,3.75 + ,526 + ,1.8 + ,2 + ,3.75 + ,532 + ,1.8 + ,-1 + ,3.65 + ,549 + ,1.8 + ,1 + ,3.5 + ,561 + ,1.7 + ,-1 + ,3.5 + ,557 + ,2.1 + ,-8 + ,3.39 + ,566 + ,2 + ,1 + ,3.25 + ,588 + ,1.7 + ,2 + ,3.17 + ,620 + ,1.9 + ,-2 + ,3 + ,626 + ,2.3 + ,-2 + ,2.93 + ,620 + ,2.4 + ,-2 + ,2.75 + ,573 + ,2.5 + ,-2 + ,2.64 + ,573 + ,2.8 + ,-6 + ,2.5 + ,574 + ,2.6 + ,-4 + ,2.5 + ,580 + ,2.2 + ,-5 + ,2.45 + ,590 + ,2.8 + ,-2 + ,2.25 + ,593 + ,2.8 + ,-1 + ,2.25 + ,597 + ,2.8 + ,-5 + ,2.21 + ,595 + ,2.3 + ,-9 + ,2 + ,612 + ,2.2 + ,-8 + ,2 + ,628 + ,3 + ,-14 + ,2 + ,629 + ,2.9 + ,-10 + ,2 + ,621 + ,2.7 + ,-11 + ,2 + ,569 + ,2.7 + ,-11 + ,2 + ,567 + ,2.3 + ,-11 + ,2 + ,573 + ,2.4 + ,-5 + ,2 + ,584 + ,2.8 + ,-2 + ,2 + ,589 + ,2.3 + ,-3 + ,2 + ,591 + ,2 + ,-6 + ,2 + ,595 + ,1.9 + ,-6 + ,2 + ,594 + ,2.3 + ,-7 + ,2 + ,611 + ,2.7 + ,-6 + ,2 + ,613 + ,1.8 + ,-2 + ,2 + ,611 + ,2 + ,-2 + ,2 + ,594 + ,2.1 + ,-4 + ,2 + ,543 + ,2 + ,0 + ,2 + ,537 + ,2.4 + ,-6 + ,2 + ,544 + ,1.7 + ,-4 + ,2 + ,555 + ,1 + ,-3 + ,2 + ,561 + ,1.2 + ,-1 + ,2 + ,562 + ,1.4 + ,-3 + ,2 + ,555 + ,1.7 + ,-6 + ,2 + ,547 + ,1.8 + ,-6 + ,2 + ,565 + ,1.4 + ,-15 + ,2 + ,578 + ,1.7 + ,-5 + ,2 + ,580 + ,1.6 + ,-11 + ,2 + ,569 + ,1.4 + ,-13 + ,2 + ,507 + ,1.5 + ,-10 + ,2.1 + ,501 + ,0.9 + ,-9 + ,2.5 + ,509 + ,1.5 + ,-11 + ,2.5 + ,510 + ,1.7 + ,-18 + ,2.55 + ,517 + ,1.6 + ,-13 + ,2.75 + ,519 + ,1.2 + ,-9 + ,2.75 + ,512 + ,1.3 + ,-8 + ,2.85 + ,509 + ,1.1 + ,-4 + ,3.25 + ,519 + ,1.3 + ,-3 + ,3.25 + ,523 + ,1.2 + ,-3 + ,3.25 + ,525 + ,1.3 + ,-3 + ,3.25 + ,517 + ,1.1 + ,-1 + ,3.25 + ,456 + ,0.8 + ,0 + ,3.25 + ,455 + ,1.4 + ,1 + ,3.25 + ,461 + ,1.6 + ,0 + ,3.25 + ,470 + ,2.5 + ,2 + ,3.25 + ,475 + ,2.5 + ,1 + ,3.25 + ,476 + ,2.6 + ,-1 + ,3.25 + ,471 + ,2 + ,-8 + ,3.25 + ,471 + ,1.8 + ,-18 + ,3.39 + ,503 + ,1.9 + ,-14 + ,3.75 + ,513 + ,1.9 + ,-4 + ,4.03 + ,510 + ,2.5 + ,0 + ,4.49 + ,484 + ,2.8 + ,4 + ,4.5 + ,431 + ,3 + ,4 + ,4.5 + ,436 + ,3.1 + ,3 + ,4.58 + ,443 + ,2.9 + ,3 + ,4.75 + ,448 + ,2.2 + ,7 + ,4.75 + ,460 + ,2.5 + ,8 + ,4.75 + ,467 + ,2.7 + ,13 + ,4.75 + ,460 + ,3 + ,15 + ,4.75 + ,464 + ,3.7 + ,14 + ,4.75 + ,485 + ,3.7 + ,14 + ,4.7 + ,501 + ,4 + ,10 + ,4.5 + ,521 + ,3.5 + ,16 + ,4.25 + ,488 + ,1.7 + ,13 + ,4.25 + ,439 + ,3 + ,15 + ,4.11 + ,442 + ,2.4 + ,13 + ,3.75 + ,457 + ,2.3 + ,12 + ,3.51 + ,462 + ,2.5 + ,13 + ,3.37 + ,481 + ,2.1 + ,11 + ,3.21 + ,493 + ,0.3 + ,9 + ,3) + ,dim=c(4 + ,131) + ,dimnames=list(c('Werkl' + ,'HICP' + ,'cons' + ,'Rente') + ,1:131)) > y <- array(NA,dim=c(4,131),dimnames=list(c('Werkl','HICP','cons','Rente'),1:131)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Werkl HICP cons Rente M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 549 3.0 0 1.00 1 0 0 0 0 0 0 0 0 0 0 2 564 3.1 -2 1.00 0 1 0 0 0 0 0 0 0 0 0 3 586 2.9 -4 1.00 0 0 1 0 0 0 0 0 0 0 0 4 604 2.4 -4 1.00 0 0 0 1 0 0 0 0 0 0 0 5 601 2.4 -7 1.00 0 0 0 0 1 0 0 0 0 0 0 6 545 2.7 -9 1.00 0 0 0 0 0 1 0 0 0 0 0 7 537 2.5 -13 1.00 0 0 0 0 0 0 1 0 0 0 0 8 552 2.1 -8 1.00 0 0 0 0 0 0 0 1 0 0 0 9 563 1.9 -13 1.00 0 0 0 0 0 0 0 0 1 0 0 10 575 0.8 -15 1.00 0 0 0 0 0 0 0 0 0 1 0 11 580 0.8 -15 1.00 0 0 0 0 0 0 0 0 0 0 1 12 575 0.3 -15 1.00 0 0 0 0 0 0 0 0 0 0 0 13 558 0.0 -10 1.00 1 0 0 0 0 0 0 0 0 0 0 14 564 -0.9 -12 1.00 0 1 0 0 0 0 0 0 0 0 0 15 581 -1.0 -11 1.00 0 0 1 0 0 0 0 0 0 0 0 16 597 -0.7 -11 1.00 0 0 0 1 0 0 0 0 0 0 0 17 587 -1.7 -17 1.00 0 0 0 0 1 0 0 0 0 0 0 18 536 -1.0 -18 1.00 0 0 0 0 0 1 0 0 0 0 0 19 524 -0.2 -19 1.09 0 0 0 0 0 0 1 0 0 0 0 20 537 0.7 -22 1.31 0 0 0 0 0 0 0 1 0 0 0 21 536 0.6 -24 1.66 0 0 0 0 0 0 0 0 1 0 0 22 533 1.9 -24 2.00 0 0 0 0 0 0 0 0 0 1 0 23 528 2.1 -20 2.31 0 0 0 0 0 0 0 0 0 0 1 24 516 2.7 -25 2.75 0 0 0 0 0 0 0 0 0 0 0 25 502 3.2 -22 3.42 1 0 0 0 0 0 0 0 0 0 0 26 506 4.8 -17 3.97 0 1 0 0 0 0 0 0 0 0 0 27 518 5.5 -9 4.25 0 0 1 0 0 0 0 0 0 0 0 28 534 5.4 -11 4.25 0 0 0 1 0 0 0 0 0 0 0 29 528 5.9 -13 4.18 0 0 0 0 1 0 0 0 0 0 0 30 478 5.8 -11 4.00 0 0 0 0 0 1 0 0 0 0 0 31 469 5.1 -9 4.00 0 0 0 0 0 0 1 0 0 0 0 32 490 4.1 -7 4.00 0 0 0 0 0 0 0 1 0 0 0 33 493 4.4 -3 4.00 0 0 0 0 0 0 0 0 1 0 0 34 508 3.6 -3 4.00 0 0 0 0 0 0 0 0 0 1 0 35 517 3.5 -6 4.00 0 0 0 0 0 0 0 0 0 0 1 36 514 3.1 -4 4.00 0 0 0 0 0 0 0 0 0 0 0 37 510 2.9 -8 4.00 1 0 0 0 0 0 0 0 0 0 0 38 527 2.2 -1 4.00 0 1 0 0 0 0 0 0 0 0 0 39 542 1.4 -2 4.00 0 0 1 0 0 0 0 0 0 0 0 40 565 1.2 -2 4.00 0 0 0 1 0 0 0 0 0 0 0 41 555 1.3 -1 4.00 0 0 0 0 1 0 0 0 0 0 0 42 499 1.3 1 3.90 0 0 0 0 0 1 0 0 0 0 0 43 511 1.3 2 3.75 0 0 0 0 0 0 1 0 0 0 0 44 526 1.8 2 3.75 0 0 0 0 0 0 0 1 0 0 0 45 532 1.8 -1 3.65 0 0 0 0 0 0 0 0 1 0 0 46 549 1.8 1 3.50 0 0 0 0 0 0 0 0 0 1 0 47 561 1.7 -1 3.50 0 0 0 0 0 0 0 0 0 0 1 48 557 2.1 -8 3.39 0 0 0 0 0 0 0 0 0 0 0 49 566 2.0 1 3.25 1 0 0 0 0 0 0 0 0 0 0 50 588 1.7 2 3.17 0 1 0 0 0 0 0 0 0 0 0 51 620 1.9 -2 3.00 0 0 1 0 0 0 0 0 0 0 0 52 626 2.3 -2 2.93 0 0 0 1 0 0 0 0 0 0 0 53 620 2.4 -2 2.75 0 0 0 0 1 0 0 0 0 0 0 54 573 2.5 -2 2.64 0 0 0 0 0 1 0 0 0 0 0 55 573 2.8 -6 2.50 0 0 0 0 0 0 1 0 0 0 0 56 574 2.6 -4 2.50 0 0 0 0 0 0 0 1 0 0 0 57 580 2.2 -5 2.45 0 0 0 0 0 0 0 0 1 0 0 58 590 2.8 -2 2.25 0 0 0 0 0 0 0 0 0 1 0 59 593 2.8 -1 2.25 0 0 0 0 0 0 0 0 0 0 1 60 597 2.8 -5 2.21 0 0 0 0 0 0 0 0 0 0 0 61 595 2.3 -9 2.00 1 0 0 0 0 0 0 0 0 0 0 62 612 2.2 -8 2.00 0 1 0 0 0 0 0 0 0 0 0 63 628 3.0 -14 2.00 0 0 1 0 0 0 0 0 0 0 0 64 629 2.9 -10 2.00 0 0 0 1 0 0 0 0 0 0 0 65 621 2.7 -11 2.00 0 0 0 0 1 0 0 0 0 0 0 66 569 2.7 -11 2.00 0 0 0 0 0 1 0 0 0 0 0 67 567 2.3 -11 2.00 0 0 0 0 0 0 1 0 0 0 0 68 573 2.4 -5 2.00 0 0 0 0 0 0 0 1 0 0 0 69 584 2.8 -2 2.00 0 0 0 0 0 0 0 0 1 0 0 70 589 2.3 -3 2.00 0 0 0 0 0 0 0 0 0 1 0 71 591 2.0 -6 2.00 0 0 0 0 0 0 0 0 0 0 1 72 595 1.9 -6 2.00 0 0 0 0 0 0 0 0 0 0 0 73 594 2.3 -7 2.00 1 0 0 0 0 0 0 0 0 0 0 74 611 2.7 -6 2.00 0 1 0 0 0 0 0 0 0 0 0 75 613 1.8 -2 2.00 0 0 1 0 0 0 0 0 0 0 0 76 611 2.0 -2 2.00 0 0 0 1 0 0 0 0 0 0 0 77 594 2.1 -4 2.00 0 0 0 0 1 0 0 0 0 0 0 78 543 2.0 0 2.00 0 0 0 0 0 1 0 0 0 0 0 79 537 2.4 -6 2.00 0 0 0 0 0 0 1 0 0 0 0 80 544 1.7 -4 2.00 0 0 0 0 0 0 0 1 0 0 0 81 555 1.0 -3 2.00 0 0 0 0 0 0 0 0 1 0 0 82 561 1.2 -1 2.00 0 0 0 0 0 0 0 0 0 1 0 83 562 1.4 -3 2.00 0 0 0 0 0 0 0 0 0 0 1 84 555 1.7 -6 2.00 0 0 0 0 0 0 0 0 0 0 0 85 547 1.8 -6 2.00 1 0 0 0 0 0 0 0 0 0 0 86 565 1.4 -15 2.00 0 1 0 0 0 0 0 0 0 0 0 87 578 1.7 -5 2.00 0 0 1 0 0 0 0 0 0 0 0 88 580 1.6 -11 2.00 0 0 0 1 0 0 0 0 0 0 0 89 569 1.4 -13 2.00 0 0 0 0 1 0 0 0 0 0 0 90 507 1.5 -10 2.10 0 0 0 0 0 1 0 0 0 0 0 91 501 0.9 -9 2.50 0 0 0 0 0 0 1 0 0 0 0 92 509 1.5 -11 2.50 0 0 0 0 0 0 0 1 0 0 0 93 510 1.7 -18 2.55 0 0 0 0 0 0 0 0 1 0 0 94 517 1.6 -13 2.75 0 0 0 0 0 0 0 0 0 1 0 95 519 1.2 -9 2.75 0 0 0 0 0 0 0 0 0 0 1 96 512 1.3 -8 2.85 0 0 0 0 0 0 0 0 0 0 0 97 509 1.1 -4 3.25 1 0 0 0 0 0 0 0 0 0 0 98 519 1.3 -3 3.25 0 1 0 0 0 0 0 0 0 0 0 99 523 1.2 -3 3.25 0 0 1 0 0 0 0 0 0 0 0 100 525 1.3 -3 3.25 0 0 0 1 0 0 0 0 0 0 0 101 517 1.1 -1 3.25 0 0 0 0 1 0 0 0 0 0 0 102 456 0.8 0 3.25 0 0 0 0 0 1 0 0 0 0 0 103 455 1.4 1 3.25 0 0 0 0 0 0 1 0 0 0 0 104 461 1.6 0 3.25 0 0 0 0 0 0 0 1 0 0 0 105 470 2.5 2 3.25 0 0 0 0 0 0 0 0 1 0 0 106 475 2.5 1 3.25 0 0 0 0 0 0 0 0 0 1 0 107 476 2.6 -1 3.25 0 0 0 0 0 0 0 0 0 0 1 108 471 2.0 -8 3.25 0 0 0 0 0 0 0 0 0 0 0 109 471 1.8 -18 3.39 1 0 0 0 0 0 0 0 0 0 0 110 503 1.9 -14 3.75 0 1 0 0 0 0 0 0 0 0 0 111 513 1.9 -4 4.03 0 0 1 0 0 0 0 0 0 0 0 112 510 2.5 0 4.49 0 0 0 1 0 0 0 0 0 0 0 113 484 2.8 4 4.50 0 0 0 0 1 0 0 0 0 0 0 114 431 3.0 4 4.50 0 0 0 0 0 1 0 0 0 0 0 115 436 3.1 3 4.58 0 0 0 0 0 0 1 0 0 0 0 116 443 2.9 3 4.75 0 0 0 0 0 0 0 1 0 0 0 117 448 2.2 7 4.75 0 0 0 0 0 0 0 0 1 0 0 118 460 2.5 8 4.75 0 0 0 0 0 0 0 0 0 1 0 119 467 2.7 13 4.75 0 0 0 0 0 0 0 0 0 0 1 120 460 3.0 15 4.75 0 0 0 0 0 0 0 0 0 0 0 121 464 3.7 14 4.75 1 0 0 0 0 0 0 0 0 0 0 122 485 3.7 14 4.70 0 1 0 0 0 0 0 0 0 0 0 123 501 4.0 10 4.50 0 0 1 0 0 0 0 0 0 0 0 124 521 3.5 16 4.25 0 0 0 1 0 0 0 0 0 0 0 125 488 1.7 13 4.25 0 0 0 0 1 0 0 0 0 0 0 126 439 3.0 15 4.11 0 0 0 0 0 1 0 0 0 0 0 127 442 2.4 13 3.75 0 0 0 0 0 0 1 0 0 0 0 128 457 2.3 12 3.51 0 0 0 0 0 0 0 1 0 0 0 129 462 2.5 13 3.37 0 0 0 0 0 0 0 0 1 0 0 130 481 2.1 11 3.21 0 0 0 0 0 0 0 0 0 1 0 131 493 0.3 9 3.00 0 0 0 0 0 0 0 0 0 0 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) HICP cons Rente M1 M2 615.25740 6.80817 0.04323 -33.32762 -5.64522 12.96323 M3 M4 M5 M6 M7 M8 27.80677 37.14547 25.34355 -30.81866 -33.00610 -22.04162 M9 M10 M11 -15.54375 -5.62545 0.36993 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -51.912 -20.965 -9.265 28.909 64.070 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 615.25740 13.57542 45.321 < 2e-16 *** HICP 6.80817 2.48255 2.742 0.00707 ** cons 0.04323 0.36976 0.117 0.90713 Rente -33.32762 3.16788 -10.520 < 2e-16 *** M1 -5.64522 13.30223 -0.424 0.67207 M2 12.96323 13.30279 0.974 0.33185 M3 27.80677 13.33445 2.085 0.03923 * M4 37.14547 13.35045 2.782 0.00630 ** M5 25.34355 13.31599 1.903 0.05949 . M6 -30.81866 13.35873 -2.307 0.02283 * M7 -33.00610 13.32187 -2.478 0.01467 * M8 -22.04162 13.34388 -1.652 0.10128 M9 -15.54375 13.33304 -1.166 0.24608 M10 -5.62545 13.35149 -0.421 0.67429 M11 0.36993 13.35183 0.028 0.97794 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 30.41 on 116 degrees of freedom Multiple R-squared: 0.667, Adjusted R-squared: 0.6268 F-statistic: 16.6 on 14 and 116 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,] 9.947051e-03 1.989410e-02 9.900529e-01 [2,] 1.602877e-03 3.205753e-03 9.983971e-01 [3,] 2.586737e-04 5.173474e-04 9.997413e-01 [4,] 1.116281e-04 2.232561e-04 9.998884e-01 [5,] 1.754239e-05 3.508477e-05 9.999825e-01 [6,] 3.343978e-06 6.687955e-06 9.999967e-01 [7,] 1.009694e-06 2.019389e-06 9.999990e-01 [8,] 6.568729e-05 1.313746e-04 9.999343e-01 [9,] 5.389852e-05 1.077970e-04 9.999461e-01 [10,] 1.542999e-05 3.085998e-05 9.999846e-01 [11,] 4.174101e-06 8.348202e-06 9.999958e-01 [12,] 1.110018e-06 2.220035e-06 9.999989e-01 [13,] 3.158795e-07 6.317591e-07 9.999997e-01 [14,] 9.955668e-08 1.991134e-07 9.999999e-01 [15,] 2.352915e-08 4.705830e-08 1.000000e+00 [16,] 8.238000e-09 1.647600e-08 1.000000e+00 [17,] 1.864339e-09 3.728678e-09 1.000000e+00 [18,] 6.039395e-10 1.207879e-09 1.000000e+00 [19,] 1.574691e-10 3.149382e-10 1.000000e+00 [20,] 3.146380e-10 6.292759e-10 1.000000e+00 [21,] 3.405146e-10 6.810293e-10 1.000000e+00 [22,] 1.802505e-10 3.605010e-10 1.000000e+00 [23,] 2.018289e-10 4.036578e-10 1.000000e+00 [24,] 1.026759e-10 2.053518e-10 1.000000e+00 [25,] 4.580780e-11 9.161561e-11 1.000000e+00 [26,] 7.737902e-11 1.547580e-10 1.000000e+00 [27,] 1.100765e-10 2.201530e-10 1.000000e+00 [28,] 1.309880e-10 2.619759e-10 1.000000e+00 [29,] 2.161332e-10 4.322663e-10 1.000000e+00 [30,] 1.669798e-09 3.339596e-09 1.000000e+00 [31,] 2.094034e-08 4.188067e-08 1.000000e+00 [32,] 9.341174e-07 1.868235e-06 9.999991e-01 [33,] 4.972111e-05 9.944222e-05 9.999503e-01 [34,] 8.729786e-03 1.745957e-02 9.912702e-01 [35,] 5.844489e-02 1.168898e-01 9.415551e-01 [36,] 1.576868e-01 3.153735e-01 8.423132e-01 [37,] 3.781633e-01 7.563266e-01 6.218367e-01 [38,] 6.353567e-01 7.292866e-01 3.646433e-01 [39,] 7.393366e-01 5.213269e-01 2.606634e-01 [40,] 8.377697e-01 3.244605e-01 1.622303e-01 [41,] 8.458864e-01 3.082272e-01 1.541136e-01 [42,] 8.343518e-01 3.312964e-01 1.656482e-01 [43,] 8.491490e-01 3.017020e-01 1.508510e-01 [44,] 9.030053e-01 1.939895e-01 9.699473e-02 [45,] 9.416034e-01 1.167932e-01 5.839659e-02 [46,] 9.710171e-01 5.796574e-02 2.898287e-02 [47,] 9.724138e-01 5.517232e-02 2.758616e-02 [48,] 9.738272e-01 5.234560e-02 2.617280e-02 [49,] 9.787494e-01 4.250120e-02 2.125060e-02 [50,] 9.847148e-01 3.057040e-02 1.528520e-02 [51,] 9.850983e-01 2.980341e-02 1.490170e-02 [52,] 9.853008e-01 2.939848e-02 1.469924e-02 [53,] 9.868900e-01 2.621995e-02 1.310997e-02 [54,] 9.891393e-01 2.172131e-02 1.086066e-02 [55,] 9.943299e-01 1.134029e-02 5.670147e-03 [56,] 9.970774e-01 5.845173e-03 2.922587e-03 [57,] 9.980316e-01 3.936779e-03 1.968390e-03 [58,] 9.982864e-01 3.427169e-03 1.713585e-03 [59,] 9.979038e-01 4.192330e-03 2.096165e-03 [60,] 9.975163e-01 4.967342e-03 2.483671e-03 [61,] 9.980892e-01 3.821685e-03 1.910843e-03 [62,] 9.979121e-01 4.175813e-03 2.087906e-03 [63,] 9.981453e-01 3.709350e-03 1.854675e-03 [64,] 9.992356e-01 1.528771e-03 7.643854e-04 [65,] 9.996733e-01 6.534740e-04 3.267370e-04 [66,] 9.998266e-01 3.467483e-04 1.733741e-04 [67,] 9.998983e-01 2.033060e-04 1.016530e-04 [68,] 9.998779e-01 2.441444e-04 1.220722e-04 [69,] 9.997989e-01 4.022914e-04 2.011457e-04 [70,] 9.997560e-01 4.880230e-04 2.440115e-04 [71,] 9.996015e-01 7.969738e-04 3.984869e-04 [72,] 9.996221e-01 7.557213e-04 3.778606e-04 [73,] 9.996874e-01 6.251285e-04 3.125643e-04 [74,] 9.998116e-01 3.768384e-04 1.884192e-04 [75,] 9.999112e-01 1.775627e-04 8.878136e-05 [76,] 9.999527e-01 9.461181e-05 4.730591e-05 [77,] 9.999887e-01 2.260862e-05 1.130431e-05 [78,] 9.999987e-01 2.674902e-06 1.337451e-06 [79,] 1.000000e+00 7.580024e-08 3.790012e-08 [80,] 1.000000e+00 1.137506e-09 5.687528e-10 [81,] 1.000000e+00 1.651883e-09 8.259413e-10 [82,] 1.000000e+00 6.097820e-09 3.048910e-09 [83,] 1.000000e+00 1.087751e-08 5.438753e-09 [84,] 1.000000e+00 5.794003e-10 2.897001e-10 [85,] 1.000000e+00 1.773460e-09 8.867302e-10 [86,] 1.000000e+00 6.206314e-09 3.103157e-09 [87,] 1.000000e+00 2.977527e-08 1.488763e-08 [88,] 1.000000e+00 2.552917e-08 1.276458e-08 [89,] 9.999999e-01 1.429299e-07 7.146494e-08 [90,] 9.999997e-01 5.845907e-07 2.922953e-07 [91,] 9.999985e-01 3.096526e-06 1.548263e-06 [92,] 9.999980e-01 4.060778e-06 2.030389e-06 [93,] 9.999863e-01 2.744960e-05 1.372480e-05 [94,] 9.999352e-01 1.296010e-04 6.480051e-05 [95,] 9.999138e-01 1.724038e-04 8.620191e-05 [96,] 9.989151e-01 2.169840e-03 1.084920e-03 > postscript(file="/var/www/html/rcomp/tmp/1witq1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2witq1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3witq1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4p9at1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5p9at1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 131 Frequency = 1 1 2 3 4 5 6 -47.7090774 -51.9118866 -43.3073369 -31.2419496 -22.3103465 -24.1041256 7 8 9 10 11 12 -28.3821422 -21.8394992 -15.7595898 -6.1024464 -7.0978194 -8.3238080 13 14 15 16 17 18 -17.8522805 -24.2469192 -21.4528722 -16.8340213 -7.9645620 -7.5248379 19 20 21 22 23 24 -19.7412251 -16.3713000 -11.4372275 -21.8747609 -24.0731211 -24.9078035 25 26 27 28 29 30 -14.4668525 -21.8543282 -20.4776848 -13.0491087 -12.8977524 -12.1401485 31 32 33 34 35 36 -14.2734510 2.4837799 -3.2294527 7.2987824 11.1139121 11.1206493 37 38 39 40 41 42 14.3004166 17.1550870 22.8013105 37.8242466 38.9021186 35.6451148 43 44 45 46 47 48 44.7901790 45.4216112 41.7206678 43.7167671 50.4886682 40.7718881 49 50 51 52 53 54 51.0430010 53.7675652 64.0696090 55.6747096 54.7968392 59.6121993 55 56 57 58 59 60 55.2642312 46.5749257 47.1771743 36.3787619 33.3401604 36.5498960 61 62 63 64 65 66 36.7733150 35.8024543 31.7717476 23.9409525 29.1477327 33.3099477 67 68 69 70 71 72 36.2206511 30.3159802 31.9651591 30.4941716 28.6709354 33.7216786 73 74 75 76 77 78 35.6868579 31.3119120 24.4228098 11.7224777 5.9300353 11.6001531 79 80 81 82 83 84 5.3236913 6.0384710 15.2630946 9.8967021 3.6261521 -4.9166873 85 86 87 88 89 90 -7.9522854 -5.4484095 -9.7666875 -16.1651973 -13.9151885 -17.2307146 91 92 93 94 95 96 -3.6705592 -10.6334870 -15.5240078 -11.3121115 -12.7571304 -16.7784883 97 98 99 100 101 102 0.3864972 -9.6268146 -19.7895391 -27.8090541 -22.7319595 -25.5705220 103 104 105 106 107 108 -28.5112176 -34.7941058 -38.5057836 -43.3808563 -48.9705893 -49.2131611 109 110 111 112 113 114 -37.1081564 -12.5723949 -8.5164892 -9.7823002 -25.8624718 -24.0618910 115 116 117 118 119 120 -14.8458350 -11.7829887 -8.6880508 -8.6920318 -9.2651815 -18.0241636 121 122 123 124 125 126 -13.1014355 -12.3762654 -19.7548672 -14.2807552 -23.0944451 -29.5351752 127 128 129 130 131 -32.1743225 -35.4133873 -42.9819836 -36.4229782 -25.0759865 > postscript(file="/var/www/html/rcomp/tmp/6p9at1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 131 Frequency = 1 lag(myerror, k = 1) myerror 0 -47.7090774 NA 1 -51.9118866 -47.7090774 2 -43.3073369 -51.9118866 3 -31.2419496 -43.3073369 4 -22.3103465 -31.2419496 5 -24.1041256 -22.3103465 6 -28.3821422 -24.1041256 7 -21.8394992 -28.3821422 8 -15.7595898 -21.8394992 9 -6.1024464 -15.7595898 10 -7.0978194 -6.1024464 11 -8.3238080 -7.0978194 12 -17.8522805 -8.3238080 13 -24.2469192 -17.8522805 14 -21.4528722 -24.2469192 15 -16.8340213 -21.4528722 16 -7.9645620 -16.8340213 17 -7.5248379 -7.9645620 18 -19.7412251 -7.5248379 19 -16.3713000 -19.7412251 20 -11.4372275 -16.3713000 21 -21.8747609 -11.4372275 22 -24.0731211 -21.8747609 23 -24.9078035 -24.0731211 24 -14.4668525 -24.9078035 25 -21.8543282 -14.4668525 26 -20.4776848 -21.8543282 27 -13.0491087 -20.4776848 28 -12.8977524 -13.0491087 29 -12.1401485 -12.8977524 30 -14.2734510 -12.1401485 31 2.4837799 -14.2734510 32 -3.2294527 2.4837799 33 7.2987824 -3.2294527 34 11.1139121 7.2987824 35 11.1206493 11.1139121 36 14.3004166 11.1206493 37 17.1550870 14.3004166 38 22.8013105 17.1550870 39 37.8242466 22.8013105 40 38.9021186 37.8242466 41 35.6451148 38.9021186 42 44.7901790 35.6451148 43 45.4216112 44.7901790 44 41.7206678 45.4216112 45 43.7167671 41.7206678 46 50.4886682 43.7167671 47 40.7718881 50.4886682 48 51.0430010 40.7718881 49 53.7675652 51.0430010 50 64.0696090 53.7675652 51 55.6747096 64.0696090 52 54.7968392 55.6747096 53 59.6121993 54.7968392 54 55.2642312 59.6121993 55 46.5749257 55.2642312 56 47.1771743 46.5749257 57 36.3787619 47.1771743 58 33.3401604 36.3787619 59 36.5498960 33.3401604 60 36.7733150 36.5498960 61 35.8024543 36.7733150 62 31.7717476 35.8024543 63 23.9409525 31.7717476 64 29.1477327 23.9409525 65 33.3099477 29.1477327 66 36.2206511 33.3099477 67 30.3159802 36.2206511 68 31.9651591 30.3159802 69 30.4941716 31.9651591 70 28.6709354 30.4941716 71 33.7216786 28.6709354 72 35.6868579 33.7216786 73 31.3119120 35.6868579 74 24.4228098 31.3119120 75 11.7224777 24.4228098 76 5.9300353 11.7224777 77 11.6001531 5.9300353 78 5.3236913 11.6001531 79 6.0384710 5.3236913 80 15.2630946 6.0384710 81 9.8967021 15.2630946 82 3.6261521 9.8967021 83 -4.9166873 3.6261521 84 -7.9522854 -4.9166873 85 -5.4484095 -7.9522854 86 -9.7666875 -5.4484095 87 -16.1651973 -9.7666875 88 -13.9151885 -16.1651973 89 -17.2307146 -13.9151885 90 -3.6705592 -17.2307146 91 -10.6334870 -3.6705592 92 -15.5240078 -10.6334870 93 -11.3121115 -15.5240078 94 -12.7571304 -11.3121115 95 -16.7784883 -12.7571304 96 0.3864972 -16.7784883 97 -9.6268146 0.3864972 98 -19.7895391 -9.6268146 99 -27.8090541 -19.7895391 100 -22.7319595 -27.8090541 101 -25.5705220 -22.7319595 102 -28.5112176 -25.5705220 103 -34.7941058 -28.5112176 104 -38.5057836 -34.7941058 105 -43.3808563 -38.5057836 106 -48.9705893 -43.3808563 107 -49.2131611 -48.9705893 108 -37.1081564 -49.2131611 109 -12.5723949 -37.1081564 110 -8.5164892 -12.5723949 111 -9.7823002 -8.5164892 112 -25.8624718 -9.7823002 113 -24.0618910 -25.8624718 114 -14.8458350 -24.0618910 115 -11.7829887 -14.8458350 116 -8.6880508 -11.7829887 117 -8.6920318 -8.6880508 118 -9.2651815 -8.6920318 119 -18.0241636 -9.2651815 120 -13.1014355 -18.0241636 121 -12.3762654 -13.1014355 122 -19.7548672 -12.3762654 123 -14.2807552 -19.7548672 124 -23.0944451 -14.2807552 125 -29.5351752 -23.0944451 126 -32.1743225 -29.5351752 127 -35.4133873 -32.1743225 128 -42.9819836 -35.4133873 129 -36.4229782 -42.9819836 130 -25.0759865 -36.4229782 131 NA -25.0759865 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -51.9118866 -47.7090774 [2,] -43.3073369 -51.9118866 [3,] -31.2419496 -43.3073369 [4,] -22.3103465 -31.2419496 [5,] -24.1041256 -22.3103465 [6,] -28.3821422 -24.1041256 [7,] -21.8394992 -28.3821422 [8,] -15.7595898 -21.8394992 [9,] -6.1024464 -15.7595898 [10,] -7.0978194 -6.1024464 [11,] -8.3238080 -7.0978194 [12,] -17.8522805 -8.3238080 [13,] -24.2469192 -17.8522805 [14,] -21.4528722 -24.2469192 [15,] -16.8340213 -21.4528722 [16,] -7.9645620 -16.8340213 [17,] -7.5248379 -7.9645620 [18,] -19.7412251 -7.5248379 [19,] -16.3713000 -19.7412251 [20,] -11.4372275 -16.3713000 [21,] -21.8747609 -11.4372275 [22,] -24.0731211 -21.8747609 [23,] -24.9078035 -24.0731211 [24,] -14.4668525 -24.9078035 [25,] -21.8543282 -14.4668525 [26,] -20.4776848 -21.8543282 [27,] -13.0491087 -20.4776848 [28,] -12.8977524 -13.0491087 [29,] -12.1401485 -12.8977524 [30,] -14.2734510 -12.1401485 [31,] 2.4837799 -14.2734510 [32,] -3.2294527 2.4837799 [33,] 7.2987824 -3.2294527 [34,] 11.1139121 7.2987824 [35,] 11.1206493 11.1139121 [36,] 14.3004166 11.1206493 [37,] 17.1550870 14.3004166 [38,] 22.8013105 17.1550870 [39,] 37.8242466 22.8013105 [40,] 38.9021186 37.8242466 [41,] 35.6451148 38.9021186 [42,] 44.7901790 35.6451148 [43,] 45.4216112 44.7901790 [44,] 41.7206678 45.4216112 [45,] 43.7167671 41.7206678 [46,] 50.4886682 43.7167671 [47,] 40.7718881 50.4886682 [48,] 51.0430010 40.7718881 [49,] 53.7675652 51.0430010 [50,] 64.0696090 53.7675652 [51,] 55.6747096 64.0696090 [52,] 54.7968392 55.6747096 [53,] 59.6121993 54.7968392 [54,] 55.2642312 59.6121993 [55,] 46.5749257 55.2642312 [56,] 47.1771743 46.5749257 [57,] 36.3787619 47.1771743 [58,] 33.3401604 36.3787619 [59,] 36.5498960 33.3401604 [60,] 36.7733150 36.5498960 [61,] 35.8024543 36.7733150 [62,] 31.7717476 35.8024543 [63,] 23.9409525 31.7717476 [64,] 29.1477327 23.9409525 [65,] 33.3099477 29.1477327 [66,] 36.2206511 33.3099477 [67,] 30.3159802 36.2206511 [68,] 31.9651591 30.3159802 [69,] 30.4941716 31.9651591 [70,] 28.6709354 30.4941716 [71,] 33.7216786 28.6709354 [72,] 35.6868579 33.7216786 [73,] 31.3119120 35.6868579 [74,] 24.4228098 31.3119120 [75,] 11.7224777 24.4228098 [76,] 5.9300353 11.7224777 [77,] 11.6001531 5.9300353 [78,] 5.3236913 11.6001531 [79,] 6.0384710 5.3236913 [80,] 15.2630946 6.0384710 [81,] 9.8967021 15.2630946 [82,] 3.6261521 9.8967021 [83,] -4.9166873 3.6261521 [84,] -7.9522854 -4.9166873 [85,] -5.4484095 -7.9522854 [86,] -9.7666875 -5.4484095 [87,] -16.1651973 -9.7666875 [88,] -13.9151885 -16.1651973 [89,] -17.2307146 -13.9151885 [90,] -3.6705592 -17.2307146 [91,] -10.6334870 -3.6705592 [92,] -15.5240078 -10.6334870 [93,] -11.3121115 -15.5240078 [94,] -12.7571304 -11.3121115 [95,] -16.7784883 -12.7571304 [96,] 0.3864972 -16.7784883 [97,] -9.6268146 0.3864972 [98,] -19.7895391 -9.6268146 [99,] -27.8090541 -19.7895391 [100,] -22.7319595 -27.8090541 [101,] -25.5705220 -22.7319595 [102,] -28.5112176 -25.5705220 [103,] -34.7941058 -28.5112176 [104,] -38.5057836 -34.7941058 [105,] -43.3808563 -38.5057836 [106,] -48.9705893 -43.3808563 [107,] -49.2131611 -48.9705893 [108,] -37.1081564 -49.2131611 [109,] -12.5723949 -37.1081564 [110,] -8.5164892 -12.5723949 [111,] -9.7823002 -8.5164892 [112,] -25.8624718 -9.7823002 [113,] -24.0618910 -25.8624718 [114,] -14.8458350 -24.0618910 [115,] -11.7829887 -14.8458350 [116,] -8.6880508 -11.7829887 [117,] -8.6920318 -8.6880508 [118,] -9.2651815 -8.6920318 [119,] -18.0241636 -9.2651815 [120,] -13.1014355 -18.0241636 [121,] -12.3762654 -13.1014355 [122,] -19.7548672 -12.3762654 [123,] -14.2807552 -19.7548672 [124,] -23.0944451 -14.2807552 [125,] -29.5351752 -23.0944451 [126,] -32.1743225 -29.5351752 [127,] -35.4133873 -32.1743225 [128,] -42.9819836 -35.4133873 [129,] -36.4229782 -42.9819836 [130,] -25.0759865 -36.4229782 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -51.9118866 -47.7090774 2 -43.3073369 -51.9118866 3 -31.2419496 -43.3073369 4 -22.3103465 -31.2419496 5 -24.1041256 -22.3103465 6 -28.3821422 -24.1041256 7 -21.8394992 -28.3821422 8 -15.7595898 -21.8394992 9 -6.1024464 -15.7595898 10 -7.0978194 -6.1024464 11 -8.3238080 -7.0978194 12 -17.8522805 -8.3238080 13 -24.2469192 -17.8522805 14 -21.4528722 -24.2469192 15 -16.8340213 -21.4528722 16 -7.9645620 -16.8340213 17 -7.5248379 -7.9645620 18 -19.7412251 -7.5248379 19 -16.3713000 -19.7412251 20 -11.4372275 -16.3713000 21 -21.8747609 -11.4372275 22 -24.0731211 -21.8747609 23 -24.9078035 -24.0731211 24 -14.4668525 -24.9078035 25 -21.8543282 -14.4668525 26 -20.4776848 -21.8543282 27 -13.0491087 -20.4776848 28 -12.8977524 -13.0491087 29 -12.1401485 -12.8977524 30 -14.2734510 -12.1401485 31 2.4837799 -14.2734510 32 -3.2294527 2.4837799 33 7.2987824 -3.2294527 34 11.1139121 7.2987824 35 11.1206493 11.1139121 36 14.3004166 11.1206493 37 17.1550870 14.3004166 38 22.8013105 17.1550870 39 37.8242466 22.8013105 40 38.9021186 37.8242466 41 35.6451148 38.9021186 42 44.7901790 35.6451148 43 45.4216112 44.7901790 44 41.7206678 45.4216112 45 43.7167671 41.7206678 46 50.4886682 43.7167671 47 40.7718881 50.4886682 48 51.0430010 40.7718881 49 53.7675652 51.0430010 50 64.0696090 53.7675652 51 55.6747096 64.0696090 52 54.7968392 55.6747096 53 59.6121993 54.7968392 54 55.2642312 59.6121993 55 46.5749257 55.2642312 56 47.1771743 46.5749257 57 36.3787619 47.1771743 58 33.3401604 36.3787619 59 36.5498960 33.3401604 60 36.7733150 36.5498960 61 35.8024543 36.7733150 62 31.7717476 35.8024543 63 23.9409525 31.7717476 64 29.1477327 23.9409525 65 33.3099477 29.1477327 66 36.2206511 33.3099477 67 30.3159802 36.2206511 68 31.9651591 30.3159802 69 30.4941716 31.9651591 70 28.6709354 30.4941716 71 33.7216786 28.6709354 72 35.6868579 33.7216786 73 31.3119120 35.6868579 74 24.4228098 31.3119120 75 11.7224777 24.4228098 76 5.9300353 11.7224777 77 11.6001531 5.9300353 78 5.3236913 11.6001531 79 6.0384710 5.3236913 80 15.2630946 6.0384710 81 9.8967021 15.2630946 82 3.6261521 9.8967021 83 -4.9166873 3.6261521 84 -7.9522854 -4.9166873 85 -5.4484095 -7.9522854 86 -9.7666875 -5.4484095 87 -16.1651973 -9.7666875 88 -13.9151885 -16.1651973 89 -17.2307146 -13.9151885 90 -3.6705592 -17.2307146 91 -10.6334870 -3.6705592 92 -15.5240078 -10.6334870 93 -11.3121115 -15.5240078 94 -12.7571304 -11.3121115 95 -16.7784883 -12.7571304 96 0.3864972 -16.7784883 97 -9.6268146 0.3864972 98 -19.7895391 -9.6268146 99 -27.8090541 -19.7895391 100 -22.7319595 -27.8090541 101 -25.5705220 -22.7319595 102 -28.5112176 -25.5705220 103 -34.7941058 -28.5112176 104 -38.5057836 -34.7941058 105 -43.3808563 -38.5057836 106 -48.9705893 -43.3808563 107 -49.2131611 -48.9705893 108 -37.1081564 -49.2131611 109 -12.5723949 -37.1081564 110 -8.5164892 -12.5723949 111 -9.7823002 -8.5164892 112 -25.8624718 -9.7823002 113 -24.0618910 -25.8624718 114 -14.8458350 -24.0618910 115 -11.7829887 -14.8458350 116 -8.6880508 -11.7829887 117 -8.6920318 -8.6880508 118 -9.2651815 -8.6920318 119 -18.0241636 -9.2651815 120 -13.1014355 -18.0241636 121 -12.3762654 -13.1014355 122 -19.7548672 -12.3762654 123 -14.2807552 -19.7548672 124 -23.0944451 -14.2807552 125 -29.5351752 -23.0944451 126 -32.1743225 -29.5351752 127 -35.4133873 -32.1743225 128 -42.9819836 -35.4133873 129 -36.4229782 -42.9819836 130 -25.0759865 -36.4229782 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/70i9v1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8barh1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9barh1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10barh1293397020.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11ea7m1293397020.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12hs6s1293397020.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/13ou341293397020.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/14z32p1293397020.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/15kljd1293397020.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16ydhm1293397020.tab") + } > try(system("convert tmp/1witq1293397020.ps tmp/1witq1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/2witq1293397020.ps tmp/2witq1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/3witq1293397020.ps tmp/3witq1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/4p9at1293397020.ps tmp/4p9at1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/5p9at1293397020.ps tmp/5p9at1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/6p9at1293397020.ps tmp/6p9at1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/70i9v1293397020.ps tmp/70i9v1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/8barh1293397020.ps tmp/8barh1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/9barh1293397020.ps tmp/9barh1293397020.png",intern=TRUE)) character(0) > try(system("convert tmp/10barh1293397020.ps tmp/10barh1293397020.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.533 1.723 7.822