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(621 + ,0 + ,0 + ,587 + ,0 + ,0 + ,655 + ,0 + ,0 + ,517 + ,0 + ,0 + ,646 + ,0 + ,0 + ,657 + ,0 + ,0 + ,382 + ,0 + ,0 + ,345 + ,0 + ,0 + ,625 + ,0 + ,0 + ,654 + ,0 + ,0 + ,606 + ,0 + ,0 + ,510 + ,0 + ,0 + ,614 + ,0 + ,0 + ,647 + ,0 + ,0 + ,580 + ,0 + ,0 + ,614 + ,0 + ,0 + ,636 + ,0 + ,0 + ,388 + ,0 + ,0 + ,356 + ,0 + ,0 + ,639 + ,0 + ,0 + ,753 + ,0 + ,0 + ,611 + ,0 + ,0 + ,639 + ,0 + ,0 + ,630 + ,0 + ,0 + ,586 + ,0 + ,0 + ,695 + ,0 + ,0 + ,552 + ,0 + ,0 + ,619 + ,0 + ,0 + ,681 + ,0 + ,0 + ,421 + ,0 + ,0 + ,307 + ,0 + ,0 + ,754 + ,0 + ,0 + ,690 + ,0 + ,0 + ,644 + ,0 + ,0 + ,643 + ,0 + ,0 + ,608 + ,0 + ,0 + ,651 + ,0 + ,0 + ,691 + ,0 + ,0 + ,627 + ,0 + ,0 + ,634 + ,0 + ,0 + ,731 + ,0 + ,0 + ,475 + ,0 + ,0 + ,337 + ,0 + ,0 + ,803 + ,0 + ,0 + ,722 + ,0 + ,0 + ,590 + ,0 + ,0 + ,724 + ,0 + ,0 + ,627 + ,0 + ,0 + ,696 + ,0 + ,0 + ,825 + ,0 + ,0 + ,677 + ,0 + ,0 + ,656 + ,0 + ,0 + ,785 + ,0 + ,0 + ,412 + ,0 + ,0 + ,352 + ,0 + ,0 + ,839 + ,0 + ,0 + ,729 + ,0 + ,0 + ,696 + ,0 + ,0 + ,641 + ,0 + ,0 + ,695 + ,0 + ,0 + ,638 + ,0 + ,0 + ,762 + ,0 + ,0 + ,635 + ,0 + ,0 + ,721 + ,0 + ,0 + ,854 + ,0 + ,0 + ,418 + ,0 + ,0 + ,367 + ,0 + ,0 + ,824 + ,0 + ,0 + ,687 + ,0 + ,0 + ,601 + ,0 + ,0 + ,676 + ,0 + ,0 + ,740 + ,0 + ,0 + ,691 + ,0 + ,0 + ,683 + ,0 + ,0 + ,594 + ,0 + ,0 + ,729 + ,0 + ,0 + ,731 + ,0 + ,0 + ,386 + ,0 + ,0 + ,331 + ,0 + ,0 + ,706 + ,0 + ,0 + ,715 + ,0 + ,0 + ,657 + ,0 + ,0 + ,653 + ,0 + ,0 + ,642 + ,0 + ,0 + ,643 + ,0 + ,0 + ,718 + ,0 + ,0 + ,654 + ,0 + ,0 + ,632 + ,0 + ,0 + ,731 + ,0 + ,0 + ,392 + ,0 + ,0 + ,344 + ,0 + ,0 + ,792 + ,0 + ,0 + ,852 + ,0 + ,0 + ,649 + ,0 + ,0 + ,629 + ,0 + ,0 + ,685 + ,0 + ,0 + ,617 + ,0 + ,0 + ,715 + ,0 + ,0 + ,715 + ,0 + ,0 + ,629 + ,0 + ,0 + ,916 + ,0 + ,0 + ,531 + ,1 + ,0 + ,357 + ,1 + ,0 + ,917 + ,1 + ,0 + ,828 + ,1 + ,0 + ,708 + ,1 + ,0 + ,858 + ,1 + ,0 + ,775 + ,1 + ,0 + ,785 + ,1 + ,0 + ,1006 + ,1 + ,0 + ,789 + ,1 + ,0 + ,734 + ,1 + ,0 + ,906 + ,1 + ,0 + ,532 + ,1 + ,0 + ,387 + ,1 + ,0 + ,991 + ,1 + ,1 + ,841 + ,1 + ,1 + ,892 + ,1 + ,1 + ,782 + ,1 + ,1 + ,813 + ,1 + ,1 + ,793 + ,1 + ,1 + ,978 + ,1 + ,1 + ,775 + ,1 + ,1 + ,797 + ,1 + ,1 + ,946 + ,1 + ,1 + ,594 + ,1 + ,1 + ,438 + ,1 + ,1 + ,1022 + ,1 + ,1 + ,868 + ,1 + ,1 + ,795 + ,1 + ,1) + ,dim=c(3 + ,130) + ,dimnames=list(c('Y' + ,'X1' + ,'X2') + ,1:130)) > y <- array(NA,dim=c(3,130),dimnames=list(c('Y','X1','X2'),1:130)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Y X1 X2 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 621 0 0 1 0 0 0 0 0 0 0 0 0 0 1 2 587 0 0 0 1 0 0 0 0 0 0 0 0 0 2 3 655 0 0 0 0 1 0 0 0 0 0 0 0 0 3 4 517 0 0 0 0 0 1 0 0 0 0 0 0 0 4 5 646 0 0 0 0 0 0 1 0 0 0 0 0 0 5 6 657 0 0 0 0 0 0 0 1 0 0 0 0 0 6 7 382 0 0 0 0 0 0 0 0 1 0 0 0 0 7 8 345 0 0 0 0 0 0 0 0 0 1 0 0 0 8 9 625 0 0 0 0 0 0 0 0 0 0 1 0 0 9 10 654 0 0 0 0 0 0 0 0 0 0 0 1 0 10 11 606 0 0 0 0 0 0 0 0 0 0 0 0 1 11 12 510 0 0 0 0 0 0 0 0 0 0 0 0 0 12 13 614 0 0 1 0 0 0 0 0 0 0 0 0 0 13 14 647 0 0 0 1 0 0 0 0 0 0 0 0 0 14 15 580 0 0 0 0 1 0 0 0 0 0 0 0 0 15 16 614 0 0 0 0 0 1 0 0 0 0 0 0 0 16 17 636 0 0 0 0 0 0 1 0 0 0 0 0 0 17 18 388 0 0 0 0 0 0 0 1 0 0 0 0 0 18 19 356 0 0 0 0 0 0 0 0 1 0 0 0 0 19 20 639 0 0 0 0 0 0 0 0 0 1 0 0 0 20 21 753 0 0 0 0 0 0 0 0 0 0 1 0 0 21 22 611 0 0 0 0 0 0 0 0 0 0 0 1 0 22 23 639 0 0 0 0 0 0 0 0 0 0 0 0 1 23 24 630 0 0 0 0 0 0 0 0 0 0 0 0 0 24 25 586 0 0 1 0 0 0 0 0 0 0 0 0 0 25 26 695 0 0 0 1 0 0 0 0 0 0 0 0 0 26 27 552 0 0 0 0 1 0 0 0 0 0 0 0 0 27 28 619 0 0 0 0 0 1 0 0 0 0 0 0 0 28 29 681 0 0 0 0 0 0 1 0 0 0 0 0 0 29 30 421 0 0 0 0 0 0 0 1 0 0 0 0 0 30 31 307 0 0 0 0 0 0 0 0 1 0 0 0 0 31 32 754 0 0 0 0 0 0 0 0 0 1 0 0 0 32 33 690 0 0 0 0 0 0 0 0 0 0 1 0 0 33 34 644 0 0 0 0 0 0 0 0 0 0 0 1 0 34 35 643 0 0 0 0 0 0 0 0 0 0 0 0 1 35 36 608 0 0 0 0 0 0 0 0 0 0 0 0 0 36 37 651 0 0 1 0 0 0 0 0 0 0 0 0 0 37 38 691 0 0 0 1 0 0 0 0 0 0 0 0 0 38 39 627 0 0 0 0 1 0 0 0 0 0 0 0 0 39 40 634 0 0 0 0 0 1 0 0 0 0 0 0 0 40 41 731 0 0 0 0 0 0 1 0 0 0 0 0 0 41 42 475 0 0 0 0 0 0 0 1 0 0 0 0 0 42 43 337 0 0 0 0 0 0 0 0 1 0 0 0 0 43 44 803 0 0 0 0 0 0 0 0 0 1 0 0 0 44 45 722 0 0 0 0 0 0 0 0 0 0 1 0 0 45 46 590 0 0 0 0 0 0 0 0 0 0 0 1 0 46 47 724 0 0 0 0 0 0 0 0 0 0 0 0 1 47 48 627 0 0 0 0 0 0 0 0 0 0 0 0 0 48 49 696 0 0 1 0 0 0 0 0 0 0 0 0 0 49 50 825 0 0 0 1 0 0 0 0 0 0 0 0 0 50 51 677 0 0 0 0 1 0 0 0 0 0 0 0 0 51 52 656 0 0 0 0 0 1 0 0 0 0 0 0 0 52 53 785 0 0 0 0 0 0 1 0 0 0 0 0 0 53 54 412 0 0 0 0 0 0 0 1 0 0 0 0 0 54 55 352 0 0 0 0 0 0 0 0 1 0 0 0 0 55 56 839 0 0 0 0 0 0 0 0 0 1 0 0 0 56 57 729 0 0 0 0 0 0 0 0 0 0 1 0 0 57 58 696 0 0 0 0 0 0 0 0 0 0 0 1 0 58 59 641 0 0 0 0 0 0 0 0 0 0 0 0 1 59 60 695 0 0 0 0 0 0 0 0 0 0 0 0 0 60 61 638 0 0 1 0 0 0 0 0 0 0 0 0 0 61 62 762 0 0 0 1 0 0 0 0 0 0 0 0 0 62 63 635 0 0 0 0 1 0 0 0 0 0 0 0 0 63 64 721 0 0 0 0 0 1 0 0 0 0 0 0 0 64 65 854 0 0 0 0 0 0 1 0 0 0 0 0 0 65 66 418 0 0 0 0 0 0 0 1 0 0 0 0 0 66 67 367 0 0 0 0 0 0 0 0 1 0 0 0 0 67 68 824 0 0 0 0 0 0 0 0 0 1 0 0 0 68 69 687 0 0 0 0 0 0 0 0 0 0 1 0 0 69 70 601 0 0 0 0 0 0 0 0 0 0 0 1 0 70 71 676 0 0 0 0 0 0 0 0 0 0 0 0 1 71 72 740 0 0 0 0 0 0 0 0 0 0 0 0 0 72 73 691 0 0 1 0 0 0 0 0 0 0 0 0 0 73 74 683 0 0 0 1 0 0 0 0 0 0 0 0 0 74 75 594 0 0 0 0 1 0 0 0 0 0 0 0 0 75 76 729 0 0 0 0 0 1 0 0 0 0 0 0 0 76 77 731 0 0 0 0 0 0 1 0 0 0 0 0 0 77 78 386 0 0 0 0 0 0 0 1 0 0 0 0 0 78 79 331 0 0 0 0 0 0 0 0 1 0 0 0 0 79 80 706 0 0 0 0 0 0 0 0 0 1 0 0 0 80 81 715 0 0 0 0 0 0 0 0 0 0 1 0 0 81 82 657 0 0 0 0 0 0 0 0 0 0 0 1 0 82 83 653 0 0 0 0 0 0 0 0 0 0 0 0 1 83 84 642 0 0 0 0 0 0 0 0 0 0 0 0 0 84 85 643 0 0 1 0 0 0 0 0 0 0 0 0 0 85 86 718 0 0 0 1 0 0 0 0 0 0 0 0 0 86 87 654 0 0 0 0 1 0 0 0 0 0 0 0 0 87 88 632 0 0 0 0 0 1 0 0 0 0 0 0 0 88 89 731 0 0 0 0 0 0 1 0 0 0 0 0 0 89 90 392 0 0 0 0 0 0 0 1 0 0 0 0 0 90 91 344 0 0 0 0 0 0 0 0 1 0 0 0 0 91 92 792 0 0 0 0 0 0 0 0 0 1 0 0 0 92 93 852 0 0 0 0 0 0 0 0 0 0 1 0 0 93 94 649 0 0 0 0 0 0 0 0 0 0 0 1 0 94 95 629 0 0 0 0 0 0 0 0 0 0 0 0 1 95 96 685 0 0 0 0 0 0 0 0 0 0 0 0 0 96 97 617 0 0 1 0 0 0 0 0 0 0 0 0 0 97 98 715 0 0 0 1 0 0 0 0 0 0 0 0 0 98 99 715 0 0 0 0 1 0 0 0 0 0 0 0 0 99 100 629 0 0 0 0 0 1 0 0 0 0 0 0 0 100 101 916 0 0 0 0 0 0 1 0 0 0 0 0 0 101 102 531 1 0 0 0 0 0 0 1 0 0 0 0 0 102 103 357 1 0 0 0 0 0 0 0 1 0 0 0 0 103 104 917 1 0 0 0 0 0 0 0 0 1 0 0 0 104 105 828 1 0 0 0 0 0 0 0 0 0 1 0 0 105 106 708 1 0 0 0 0 0 0 0 0 0 0 1 0 106 107 858 1 0 0 0 0 0 0 0 0 0 0 0 1 107 108 775 1 0 0 0 0 0 0 0 0 0 0 0 0 108 109 785 1 0 1 0 0 0 0 0 0 0 0 0 0 109 110 1006 1 0 0 1 0 0 0 0 0 0 0 0 0 110 111 789 1 0 0 0 1 0 0 0 0 0 0 0 0 111 112 734 1 0 0 0 0 1 0 0 0 0 0 0 0 112 113 906 1 0 0 0 0 0 1 0 0 0 0 0 0 113 114 532 1 0 0 0 0 0 0 1 0 0 0 0 0 114 115 387 1 0 0 0 0 0 0 0 1 0 0 0 0 115 116 991 1 1 0 0 0 0 0 0 0 1 0 0 0 116 117 841 1 1 0 0 0 0 0 0 0 0 1 0 0 117 118 892 1 1 0 0 0 0 0 0 0 0 0 1 0 118 119 782 1 1 0 0 0 0 0 0 0 0 0 0 1 119 120 813 1 1 0 0 0 0 0 0 0 0 0 0 0 120 121 793 1 1 1 0 0 0 0 0 0 0 0 0 0 121 122 978 1 1 0 1 0 0 0 0 0 0 0 0 0 122 123 775 1 1 0 0 1 0 0 0 0 0 0 0 0 123 124 797 1 1 0 0 0 1 0 0 0 0 0 0 0 124 125 946 1 1 0 0 0 0 1 0 0 0 0 0 0 125 126 594 1 1 0 0 0 0 0 1 0 0 0 0 0 126 127 438 1 1 0 0 0 0 0 0 1 0 0 0 0 127 128 1022 1 1 0 0 0 0 0 0 0 1 0 0 0 128 129 868 1 1 0 0 0 0 0 0 0 0 1 0 0 129 130 795 1 1 0 0 0 0 0 0 0 0 0 1 0 130 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X1 X2 M1 M2 M3 592.9122 79.5172 36.6462 0.6440 88.0983 -8.6293 M4 M5 M6 M7 M8 M9 -6.9023 108.6428 -204.6772 -319.0411 101.6271 71.4450 M10 M11 t -3.3735 13.5094 0.9094 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -356.814 -38.892 -6.842 30.884 263.309 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 592.9122 24.9353 23.778 < 2e-16 *** X1 79.5172 23.6513 3.362 0.001051 ** X2 36.6462 25.6840 1.427 0.156345 M1 0.6440 29.7285 0.022 0.982753 M2 88.0983 29.7225 2.964 0.003692 ** M3 -8.6293 29.7183 -0.290 0.772057 M4 -6.9023 29.7159 -0.232 0.816736 M5 108.6428 29.7154 3.656 0.000388 *** M6 -204.6772 29.7713 -6.875 3.40e-10 *** M7 -319.0411 29.7648 -10.719 < 2e-16 *** M8 101.6271 29.7643 3.414 0.000884 *** M9 71.4450 29.7591 2.401 0.017964 * M10 -3.3735 29.7557 -0.113 0.909932 M11 13.5094 30.4143 0.444 0.657748 t 0.9094 0.2318 3.924 0.000149 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 68.01 on 115 degrees of freedom Multiple R-squared: 0.8278, Adjusted R-squared: 0.8068 F-statistic: 39.48 on 14 and 115 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.9985884 2.823267e-03 1.411633e-03 [2,] 0.9965767 6.846606e-03 3.423303e-03 [3,] 0.9999951 9.812307e-06 4.906153e-06 [4,] 0.9999947 1.056106e-05 5.280529e-06 [5,] 0.9999885 2.307688e-05 1.153844e-05 [6,] 0.9999707 5.855470e-05 2.927735e-05 [7,] 0.9999612 7.756707e-05 3.878353e-05 [8,] 0.9999404 1.191362e-04 5.956809e-05 [9,] 0.9999023 1.953523e-04 9.767617e-05 [10,] 0.9999179 1.641151e-04 8.205757e-05 [11,] 0.9998459 3.082575e-04 1.541287e-04 [12,] 0.9998149 3.701111e-04 1.850555e-04 [13,] 0.9998643 2.714545e-04 1.357273e-04 [14,] 0.9998091 3.818127e-04 1.909064e-04 [15,] 0.9999922 1.566910e-05 7.834550e-06 [16,] 0.9999851 2.976110e-05 1.488055e-05 [17,] 0.9999701 5.983492e-05 2.991746e-05 [18,] 0.9999430 1.139704e-04 5.698521e-05 [19,] 0.9999143 1.713887e-04 8.569435e-05 [20,] 0.9998412 3.175974e-04 1.587987e-04 [21,] 0.9998112 3.776424e-04 1.888212e-04 [22,] 0.9996793 6.413518e-04 3.206759e-04 [23,] 0.9994800 1.039920e-03 5.199599e-04 [24,] 0.9994206 1.158795e-03 5.793976e-04 [25,] 0.9992790 1.442049e-03 7.210247e-04 [26,] 0.9989323 2.135301e-03 1.067651e-03 [27,] 0.9996703 6.593167e-04 3.296583e-04 [28,] 0.9994457 1.108523e-03 5.542616e-04 [29,] 0.9995250 9.499146e-04 4.749573e-04 [30,] 0.9994102 1.179598e-03 5.897992e-04 [31,] 0.9992317 1.536601e-03 7.683006e-04 [32,] 0.9988655 2.268915e-03 1.134457e-03 [33,] 0.9990962 1.807615e-03 9.038076e-04 [34,] 0.9985863 2.827405e-03 1.413702e-03 [35,] 0.9977700 4.460029e-03 2.230014e-03 [36,] 0.9969124 6.175169e-03 3.087584e-03 [37,] 0.9976205 4.759013e-03 2.379507e-03 [38,] 0.9969256 6.148765e-03 3.074382e-03 [39,] 0.9978590 4.282054e-03 2.141027e-03 [40,] 0.9967721 6.455796e-03 3.227898e-03 [41,] 0.9957341 8.531896e-03 4.265948e-03 [42,] 0.9946758 1.064836e-02 5.324179e-03 [43,] 0.9925917 1.481654e-02 7.408268e-03 [44,] 0.9904906 1.901887e-02 9.509437e-03 [45,] 0.9861812 2.763758e-02 1.381879e-02 [46,] 0.9817861 3.642772e-02 1.821386e-02 [47,] 0.9809662 3.806754e-02 1.903377e-02 [48,] 0.9827848 3.443035e-02 1.721518e-02 [49,] 0.9836330 3.273409e-02 1.636704e-02 [50,] 0.9854313 2.913737e-02 1.456868e-02 [51,] 0.9841080 3.178395e-02 1.589198e-02 [52,] 0.9812677 3.746466e-02 1.873233e-02 [53,] 0.9798772 4.024569e-02 2.012285e-02 [54,] 0.9736327 5.273465e-02 2.636733e-02 [55,] 0.9796998 4.060044e-02 2.030022e-02 [56,] 0.9797247 4.055059e-02 2.027530e-02 [57,] 0.9809266 3.814678e-02 1.907339e-02 [58,] 0.9793555 4.128908e-02 2.064454e-02 [59,] 0.9896872 2.062554e-02 1.031277e-02 [60,] 0.9867551 2.648979e-02 1.324490e-02 [61,] 0.9866018 2.679643e-02 1.339822e-02 [62,] 0.9884115 2.317697e-02 1.158848e-02 [63,] 0.9906270 1.874600e-02 9.372999e-03 [64,] 0.9862579 2.748420e-02 1.374210e-02 [65,] 0.9807602 3.847955e-02 1.923978e-02 [66,] 0.9732665 5.346694e-02 2.673347e-02 [67,] 0.9627525 7.449508e-02 3.724754e-02 [68,] 0.9510665 9.786695e-02 4.893348e-02 [69,] 0.9489218 1.021564e-01 5.107822e-02 [70,] 0.9293414 1.413173e-01 7.065864e-02 [71,] 0.9093013 1.813974e-01 9.069869e-02 [72,] 0.9201682 1.596636e-01 7.983178e-02 [73,] 0.9123012 1.753977e-01 8.769883e-02 [74,] 0.9091403 1.817195e-01 9.085974e-02 [75,] 0.8947303 2.105394e-01 1.052697e-01 [76,] 0.9636531 7.269381e-02 3.634690e-02 [77,] 0.9468189 1.063621e-01 5.318107e-02 [78,] 0.9400762 1.198477e-01 5.992385e-02 [79,] 0.9157551 1.684899e-01 8.424493e-02 [80,] 0.8980957 2.038085e-01 1.019043e-01 [81,] 0.9882396 2.352088e-02 1.176044e-02 [82,] 0.9802974 3.940513e-02 1.970256e-02 [83,] 0.9875320 2.493604e-02 1.246802e-02 [84,] 0.9819951 3.600988e-02 1.800494e-02 [85,] 0.9685787 6.284250e-02 3.142125e-02 [86,] 0.9503127 9.937469e-02 4.968735e-02 [87,] 0.9438083 1.123834e-01 5.619168e-02 [88,] 0.9078395 1.843211e-01 9.216054e-02 [89,] 0.9633501 7.329971e-02 3.664986e-02 [90,] 0.9811214 3.775730e-02 1.887865e-02 [91,] 0.9602392 7.952160e-02 3.976080e-02 [92,] 0.9231664 1.536671e-01 7.683356e-02 [93,] 0.9155922 1.688155e-01 8.440777e-02 [94,] 0.8923226 2.153548e-01 1.076774e-01 [95,] 0.7765773 4.468454e-01 2.234227e-01 > postscript(file="/var/www/html/rcomp/tmp/16o0n1293556659.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/26o0n1293556659.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/3zfz81293556659.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/4zfz81293556659.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/5zfz81293556659.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 = 130 Frequency = 1 1 2 3 4 5 6 26.534364 -95.829273 67.988909 -72.647455 -60.102000 263.308654 7 8 9 10 11 12 101.763200 -356.814421 -47.541694 55.367397 -10.424881 -93.824881 13 14 15 16 17 18 8.621683 -46.741953 -17.923772 13.439865 -81.014681 -16.604026 19 20 21 22 23 24 64.850519 -73.727102 69.545625 1.454716 11.662439 15.262439 25 26 27 28 29 30 -30.290998 -9.654634 -56.836452 7.527184 -46.927361 5.483293 31 32 33 34 35 36 4.937839 30.360218 -4.367055 23.542036 4.749758 -17.650242 37 38 39 40 41 42 23.796322 -24.567315 7.250867 11.614504 -7.840042 48.570613 43 44 45 46 47 48 24.025158 68.447537 16.720264 -41.370645 74.837078 -9.562922 49 50 51 52 53 54 57.883641 98.520005 46.338187 22.701823 35.247278 -25.342068 55 56 57 58 59 60 28.112477 93.534856 12.807584 53.716675 -19.075603 47.524397 61 62 63 64 65 66 -11.029039 24.607324 -6.574494 76.789142 93.334597 -30.254749 67 68 69 70 71 72 32.199797 67.622176 -40.105097 -52.196006 5.011716 81.611716 73 74 75 76 77 78 31.058280 -65.305356 -58.487175 73.876462 -40.578084 -73.167429 79 80 81 82 83 84 -14.712884 -61.290505 -23.017777 -7.108687 -28.900964 -27.300964 85 86 87 88 89 90 -27.854401 -41.218037 -9.399855 -34.036219 -51.490764 -78.080110 91 92 93 94 95 96 -12.625564 13.796815 103.069542 -26.021367 -63.813645 4.786355 97 98 99 100 101 102 -64.767081 -55.130718 40.687464 -47.948899 122.596555 -29.509989 103 104 105 106 107 108 -90.055444 48.366935 -11.360337 -57.451247 74.756476 4.356476 109 110 111 112 113 114 12.803039 145.439403 24.257585 -33.378779 22.166676 -39.422670 115 116 117 118 119 120 -70.968124 74.808086 -45.919187 78.989904 -48.802374 -5.202374 121 122 123 124 125 126 -26.755810 69.880554 -37.301265 -17.937628 14.607826 -24.981519 127 128 129 130 -67.526974 94.895405 -29.831868 -28.922777 > postscript(file="/var/www/html/rcomp/tmp/6zfz81293556659.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 = 130 Frequency = 1 lag(myerror, k = 1) myerror 0 26.534364 NA 1 -95.829273 26.534364 2 67.988909 -95.829273 3 -72.647455 67.988909 4 -60.102000 -72.647455 5 263.308654 -60.102000 6 101.763200 263.308654 7 -356.814421 101.763200 8 -47.541694 -356.814421 9 55.367397 -47.541694 10 -10.424881 55.367397 11 -93.824881 -10.424881 12 8.621683 -93.824881 13 -46.741953 8.621683 14 -17.923772 -46.741953 15 13.439865 -17.923772 16 -81.014681 13.439865 17 -16.604026 -81.014681 18 64.850519 -16.604026 19 -73.727102 64.850519 20 69.545625 -73.727102 21 1.454716 69.545625 22 11.662439 1.454716 23 15.262439 11.662439 24 -30.290998 15.262439 25 -9.654634 -30.290998 26 -56.836452 -9.654634 27 7.527184 -56.836452 28 -46.927361 7.527184 29 5.483293 -46.927361 30 4.937839 5.483293 31 30.360218 4.937839 32 -4.367055 30.360218 33 23.542036 -4.367055 34 4.749758 23.542036 35 -17.650242 4.749758 36 23.796322 -17.650242 37 -24.567315 23.796322 38 7.250867 -24.567315 39 11.614504 7.250867 40 -7.840042 11.614504 41 48.570613 -7.840042 42 24.025158 48.570613 43 68.447537 24.025158 44 16.720264 68.447537 45 -41.370645 16.720264 46 74.837078 -41.370645 47 -9.562922 74.837078 48 57.883641 -9.562922 49 98.520005 57.883641 50 46.338187 98.520005 51 22.701823 46.338187 52 35.247278 22.701823 53 -25.342068 35.247278 54 28.112477 -25.342068 55 93.534856 28.112477 56 12.807584 93.534856 57 53.716675 12.807584 58 -19.075603 53.716675 59 47.524397 -19.075603 60 -11.029039 47.524397 61 24.607324 -11.029039 62 -6.574494 24.607324 63 76.789142 -6.574494 64 93.334597 76.789142 65 -30.254749 93.334597 66 32.199797 -30.254749 67 67.622176 32.199797 68 -40.105097 67.622176 69 -52.196006 -40.105097 70 5.011716 -52.196006 71 81.611716 5.011716 72 31.058280 81.611716 73 -65.305356 31.058280 74 -58.487175 -65.305356 75 73.876462 -58.487175 76 -40.578084 73.876462 77 -73.167429 -40.578084 78 -14.712884 -73.167429 79 -61.290505 -14.712884 80 -23.017777 -61.290505 81 -7.108687 -23.017777 82 -28.900964 -7.108687 83 -27.300964 -28.900964 84 -27.854401 -27.300964 85 -41.218037 -27.854401 86 -9.399855 -41.218037 87 -34.036219 -9.399855 88 -51.490764 -34.036219 89 -78.080110 -51.490764 90 -12.625564 -78.080110 91 13.796815 -12.625564 92 103.069542 13.796815 93 -26.021367 103.069542 94 -63.813645 -26.021367 95 4.786355 -63.813645 96 -64.767081 4.786355 97 -55.130718 -64.767081 98 40.687464 -55.130718 99 -47.948899 40.687464 100 122.596555 -47.948899 101 -29.509989 122.596555 102 -90.055444 -29.509989 103 48.366935 -90.055444 104 -11.360337 48.366935 105 -57.451247 -11.360337 106 74.756476 -57.451247 107 4.356476 74.756476 108 12.803039 4.356476 109 145.439403 12.803039 110 24.257585 145.439403 111 -33.378779 24.257585 112 22.166676 -33.378779 113 -39.422670 22.166676 114 -70.968124 -39.422670 115 74.808086 -70.968124 116 -45.919187 74.808086 117 78.989904 -45.919187 118 -48.802374 78.989904 119 -5.202374 -48.802374 120 -26.755810 -5.202374 121 69.880554 -26.755810 122 -37.301265 69.880554 123 -17.937628 -37.301265 124 14.607826 -17.937628 125 -24.981519 14.607826 126 -67.526974 -24.981519 127 94.895405 -67.526974 128 -29.831868 94.895405 129 -28.922777 -29.831868 130 NA -28.922777 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -95.829273 26.534364 [2,] 67.988909 -95.829273 [3,] -72.647455 67.988909 [4,] -60.102000 -72.647455 [5,] 263.308654 -60.102000 [6,] 101.763200 263.308654 [7,] -356.814421 101.763200 [8,] -47.541694 -356.814421 [9,] 55.367397 -47.541694 [10,] -10.424881 55.367397 [11,] -93.824881 -10.424881 [12,] 8.621683 -93.824881 [13,] -46.741953 8.621683 [14,] -17.923772 -46.741953 [15,] 13.439865 -17.923772 [16,] -81.014681 13.439865 [17,] -16.604026 -81.014681 [18,] 64.850519 -16.604026 [19,] -73.727102 64.850519 [20,] 69.545625 -73.727102 [21,] 1.454716 69.545625 [22,] 11.662439 1.454716 [23,] 15.262439 11.662439 [24,] -30.290998 15.262439 [25,] -9.654634 -30.290998 [26,] -56.836452 -9.654634 [27,] 7.527184 -56.836452 [28,] -46.927361 7.527184 [29,] 5.483293 -46.927361 [30,] 4.937839 5.483293 [31,] 30.360218 4.937839 [32,] -4.367055 30.360218 [33,] 23.542036 -4.367055 [34,] 4.749758 23.542036 [35,] -17.650242 4.749758 [36,] 23.796322 -17.650242 [37,] -24.567315 23.796322 [38,] 7.250867 -24.567315 [39,] 11.614504 7.250867 [40,] -7.840042 11.614504 [41,] 48.570613 -7.840042 [42,] 24.025158 48.570613 [43,] 68.447537 24.025158 [44,] 16.720264 68.447537 [45,] -41.370645 16.720264 [46,] 74.837078 -41.370645 [47,] -9.562922 74.837078 [48,] 57.883641 -9.562922 [49,] 98.520005 57.883641 [50,] 46.338187 98.520005 [51,] 22.701823 46.338187 [52,] 35.247278 22.701823 [53,] -25.342068 35.247278 [54,] 28.112477 -25.342068 [55,] 93.534856 28.112477 [56,] 12.807584 93.534856 [57,] 53.716675 12.807584 [58,] -19.075603 53.716675 [59,] 47.524397 -19.075603 [60,] -11.029039 47.524397 [61,] 24.607324 -11.029039 [62,] -6.574494 24.607324 [63,] 76.789142 -6.574494 [64,] 93.334597 76.789142 [65,] -30.254749 93.334597 [66,] 32.199797 -30.254749 [67,] 67.622176 32.199797 [68,] -40.105097 67.622176 [69,] -52.196006 -40.105097 [70,] 5.011716 -52.196006 [71,] 81.611716 5.011716 [72,] 31.058280 81.611716 [73,] -65.305356 31.058280 [74,] -58.487175 -65.305356 [75,] 73.876462 -58.487175 [76,] -40.578084 73.876462 [77,] -73.167429 -40.578084 [78,] -14.712884 -73.167429 [79,] -61.290505 -14.712884 [80,] -23.017777 -61.290505 [81,] -7.108687 -23.017777 [82,] -28.900964 -7.108687 [83,] -27.300964 -28.900964 [84,] -27.854401 -27.300964 [85,] -41.218037 -27.854401 [86,] -9.399855 -41.218037 [87,] -34.036219 -9.399855 [88,] -51.490764 -34.036219 [89,] -78.080110 -51.490764 [90,] -12.625564 -78.080110 [91,] 13.796815 -12.625564 [92,] 103.069542 13.796815 [93,] -26.021367 103.069542 [94,] -63.813645 -26.021367 [95,] 4.786355 -63.813645 [96,] -64.767081 4.786355 [97,] -55.130718 -64.767081 [98,] 40.687464 -55.130718 [99,] -47.948899 40.687464 [100,] 122.596555 -47.948899 [101,] -29.509989 122.596555 [102,] -90.055444 -29.509989 [103,] 48.366935 -90.055444 [104,] -11.360337 48.366935 [105,] -57.451247 -11.360337 [106,] 74.756476 -57.451247 [107,] 4.356476 74.756476 [108,] 12.803039 4.356476 [109,] 145.439403 12.803039 [110,] 24.257585 145.439403 [111,] -33.378779 24.257585 [112,] 22.166676 -33.378779 [113,] -39.422670 22.166676 [114,] -70.968124 -39.422670 [115,] 74.808086 -70.968124 [116,] -45.919187 74.808086 [117,] 78.989904 -45.919187 [118,] -48.802374 78.989904 [119,] -5.202374 -48.802374 [120,] -26.755810 -5.202374 [121,] 69.880554 -26.755810 [122,] -37.301265 69.880554 [123,] -17.937628 -37.301265 [124,] 14.607826 -17.937628 [125,] -24.981519 14.607826 [126,] -67.526974 -24.981519 [127,] 94.895405 -67.526974 [128,] -29.831868 94.895405 [129,] -28.922777 -29.831868 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -95.829273 26.534364 2 67.988909 -95.829273 3 -72.647455 67.988909 4 -60.102000 -72.647455 5 263.308654 -60.102000 6 101.763200 263.308654 7 -356.814421 101.763200 8 -47.541694 -356.814421 9 55.367397 -47.541694 10 -10.424881 55.367397 11 -93.824881 -10.424881 12 8.621683 -93.824881 13 -46.741953 8.621683 14 -17.923772 -46.741953 15 13.439865 -17.923772 16 -81.014681 13.439865 17 -16.604026 -81.014681 18 64.850519 -16.604026 19 -73.727102 64.850519 20 69.545625 -73.727102 21 1.454716 69.545625 22 11.662439 1.454716 23 15.262439 11.662439 24 -30.290998 15.262439 25 -9.654634 -30.290998 26 -56.836452 -9.654634 27 7.527184 -56.836452 28 -46.927361 7.527184 29 5.483293 -46.927361 30 4.937839 5.483293 31 30.360218 4.937839 32 -4.367055 30.360218 33 23.542036 -4.367055 34 4.749758 23.542036 35 -17.650242 4.749758 36 23.796322 -17.650242 37 -24.567315 23.796322 38 7.250867 -24.567315 39 11.614504 7.250867 40 -7.840042 11.614504 41 48.570613 -7.840042 42 24.025158 48.570613 43 68.447537 24.025158 44 16.720264 68.447537 45 -41.370645 16.720264 46 74.837078 -41.370645 47 -9.562922 74.837078 48 57.883641 -9.562922 49 98.520005 57.883641 50 46.338187 98.520005 51 22.701823 46.338187 52 35.247278 22.701823 53 -25.342068 35.247278 54 28.112477 -25.342068 55 93.534856 28.112477 56 12.807584 93.534856 57 53.716675 12.807584 58 -19.075603 53.716675 59 47.524397 -19.075603 60 -11.029039 47.524397 61 24.607324 -11.029039 62 -6.574494 24.607324 63 76.789142 -6.574494 64 93.334597 76.789142 65 -30.254749 93.334597 66 32.199797 -30.254749 67 67.622176 32.199797 68 -40.105097 67.622176 69 -52.196006 -40.105097 70 5.011716 -52.196006 71 81.611716 5.011716 72 31.058280 81.611716 73 -65.305356 31.058280 74 -58.487175 -65.305356 75 73.876462 -58.487175 76 -40.578084 73.876462 77 -73.167429 -40.578084 78 -14.712884 -73.167429 79 -61.290505 -14.712884 80 -23.017777 -61.290505 81 -7.108687 -23.017777 82 -28.900964 -7.108687 83 -27.300964 -28.900964 84 -27.854401 -27.300964 85 -41.218037 -27.854401 86 -9.399855 -41.218037 87 -34.036219 -9.399855 88 -51.490764 -34.036219 89 -78.080110 -51.490764 90 -12.625564 -78.080110 91 13.796815 -12.625564 92 103.069542 13.796815 93 -26.021367 103.069542 94 -63.813645 -26.021367 95 4.786355 -63.813645 96 -64.767081 4.786355 97 -55.130718 -64.767081 98 40.687464 -55.130718 99 -47.948899 40.687464 100 122.596555 -47.948899 101 -29.509989 122.596555 102 -90.055444 -29.509989 103 48.366935 -90.055444 104 -11.360337 48.366935 105 -57.451247 -11.360337 106 74.756476 -57.451247 107 4.356476 74.756476 108 12.803039 4.356476 109 145.439403 12.803039 110 24.257585 145.439403 111 -33.378779 24.257585 112 22.166676 -33.378779 113 -39.422670 22.166676 114 -70.968124 -39.422670 115 74.808086 -70.968124 116 -45.919187 74.808086 117 78.989904 -45.919187 118 -48.802374 78.989904 119 -5.202374 -48.802374 120 -26.755810 -5.202374 121 69.880554 -26.755810 122 -37.301265 69.880554 123 -17.937628 -37.301265 124 14.607826 -17.937628 125 -24.981519 14.607826 126 -67.526974 -24.981519 127 94.895405 -67.526974 128 -29.831868 94.895405 129 -28.922777 -29.831868 > 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/7rogt1293556659.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/8kgxe1293556659.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/9kgxe1293556659.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/10v7xh1293556659.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/11gpd41293556659.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/12rhd71293556659.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/13xhrj1293556659.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/14jiq71293556659.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/15u97a1293556659.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/16q1nj1293556659.tab") + } > > try(system("convert tmp/16o0n1293556659.ps tmp/16o0n1293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/26o0n1293556659.ps tmp/26o0n1293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/3zfz81293556659.ps tmp/3zfz81293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/4zfz81293556659.ps tmp/4zfz81293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/5zfz81293556659.ps tmp/5zfz81293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/6zfz81293556659.ps tmp/6zfz81293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/7rogt1293556659.ps tmp/7rogt1293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/8kgxe1293556659.ps tmp/8kgxe1293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/9kgxe1293556659.ps tmp/9kgxe1293556659.png",intern=TRUE)) character(0) > try(system("convert tmp/10v7xh1293556659.ps tmp/10v7xh1293556659.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.553 1.727 10.024