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(384 + ,257.9 + ,367.6 + ,275.8 + ,457.1 + ,319.4 + ,429.4 + ,299.8 + ,442.2 + ,331.1 + ,507.5 + ,339.3 + ,348.5 + ,209.6 + ,393.2 + ,280.9 + ,426.8 + ,285.5 + ,403 + ,247.6 + ,454.8 + ,275.1 + ,413 + ,262.3 + ,388.9 + ,267.8 + ,406.5 + ,448.2 + ,447.4 + ,563.4 + ,474.4 + ,346.6 + ,428.5 + ,455.1 + ,472.8 + ,424.4 + ,411 + ,381.2 + ,463.9 + ,382.9 + ,497.3 + ,466.6 + ,474 + ,400.2 + ,518.1 + ,493.6 + ,566 + ,367.5 + ,509.4 + ,307.1 + ,445.1 + ,316.7 + ,466.6 + ,314.2 + ,600.5 + ,403.7 + ,538.7 + ,370.6 + ,548 + ,343.7 + ,591.9 + ,383 + ,547.3 + ,365.4 + ,610.2 + ,417.2 + ,621.6 + ,411 + ,582.4 + ,420.8 + ,635.8 + ,493 + ,663.9 + ,471.8 + ,624.2 + ,452.4 + ,654.1 + ,464.8 + ,723.5 + ,541.5 + ,641.2 + ,484 + ,565.5 + ,449.4 + ,698.6 + ,436.8 + ,651 + ,490 + ,721.6 + ,475.4 + ,643.5 + ,393.6 + ,604 + ,486.8 + ,618.2 + ,536.7 + ,783.5 + ,467 + ,672.9 + ,475.5 + ,726.7 + ,532.8 + ,738.6 + ,554.1 + ,692.2 + ,507.3 + ,669.5 + ,455.2 + ,546.2 + ,465.3 + ,715 + ,563.2 + ,789.8 + ,680.1 + ,684 + ,518.2 + ,639 + ,426.6 + ,768.5 + ,612.4 + ,643.8 + ,518.1 + ,623 + ,540 + ,692.8 + ,541.7 + ,936.5 + ,627.6 + ,795.9 + ,637 + ,695.7 + ,564.2 + ,648.3 + ,665 + ,675.2 + ,703.2 + ,826.5 + ,824.4 + ,742.4 + ,700.3 + ,793.9 + ,1219.6 + ,685.3 + ,764.7 + ,756.1 + ,479.9 + ,704 + ,543.4 + ,860.6 + ,593.3 + ,795.9 + ,584.3 + ,816.7 + ,645.9 + ,777.9 + ,548.9 + ,746.4 + ,421.8 + ,694.7 + ,460.3 + ,909.2 + ,553.4 + ,783.6 + ,424.4 + ,730.4 + ,470.2 + ,847.7 + ,547.2 + ,758.7 + ,444.8 + ,839.2 + ,526.7 + ,784.8 + ,598.3 + ,906.1 + ,543.5 + ,838.2 + ,641.2 + ,729 + ,525 + ,768.1 + ,521.5 + ,710.5 + ,551.8 + ,863 + ,543.7 + ,778.3 + ,472.1 + ,827.7 + ,488 + ,853.1 + ,642.8 + ,859.3 + ,601.7 + ,779.2 + ,553.9 + ,724.6 + ,522.5 + ,829.2 + ,568.4 + ,862.9 + ,675.4 + ,601.6 + ,499.1 + ,964.9 + ,549.4 + ,766.3 + ,531.2 + ,847.8 + ,583.3 + ,992.7 + ,526.5 + ,865.3 + ,513.2 + ,1054.1 + ,729.1 + ,972.5 + ,753.7 + ,857.4 + ,571.7 + ,1043.3 + ,680.9 + ,1061 + ,757.6 + ,989.4 + ,805.4 + ,963.2 + ,687.7 + ,1181.9 + ,950.8 + ,1256.4 + ,1062 + ,1492.7 + ,1110.6 + ,1360.8 + ,1098.9 + ,1342.8 + ,1067 + ,1464 + ,1360.1) + ,dim=c(2 + ,120) + ,dimnames=list(c('yt' + ,'xt') + ,1:120)) > y <- array(NA,dim=c(2,120),dimnames=list(c('yt','xt'),1:120)) > 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 yt xt M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 384.0 257.9 1 0 0 0 0 0 0 0 0 0 0 2 367.6 275.8 0 1 0 0 0 0 0 0 0 0 0 3 457.1 319.4 0 0 1 0 0 0 0 0 0 0 0 4 429.4 299.8 0 0 0 1 0 0 0 0 0 0 0 5 442.2 331.1 0 0 0 0 1 0 0 0 0 0 0 6 507.5 339.3 0 0 0 0 0 1 0 0 0 0 0 7 348.5 209.6 0 0 0 0 0 0 1 0 0 0 0 8 393.2 280.9 0 0 0 0 0 0 0 1 0 0 0 9 426.8 285.5 0 0 0 0 0 0 0 0 1 0 0 10 403.0 247.6 0 0 0 0 0 0 0 0 0 1 0 11 454.8 275.1 0 0 0 0 0 0 0 0 0 0 1 12 413.0 262.3 0 0 0 0 0 0 0 0 0 0 0 13 388.9 267.8 1 0 0 0 0 0 0 0 0 0 0 14 406.5 448.2 0 1 0 0 0 0 0 0 0 0 0 15 447.4 563.4 0 0 1 0 0 0 0 0 0 0 0 16 474.4 346.6 0 0 0 1 0 0 0 0 0 0 0 17 428.5 455.1 0 0 0 0 1 0 0 0 0 0 0 18 472.8 424.4 0 0 0 0 0 1 0 0 0 0 0 19 411.0 381.2 0 0 0 0 0 0 1 0 0 0 0 20 463.9 382.9 0 0 0 0 0 0 0 1 0 0 0 21 497.3 466.6 0 0 0 0 0 0 0 0 1 0 0 22 474.0 400.2 0 0 0 0 0 0 0 0 0 1 0 23 518.1 493.6 0 0 0 0 0 0 0 0 0 0 1 24 566.0 367.5 0 0 0 0 0 0 0 0 0 0 0 25 509.4 307.1 1 0 0 0 0 0 0 0 0 0 0 26 445.1 316.7 0 1 0 0 0 0 0 0 0 0 0 27 466.6 314.2 0 0 1 0 0 0 0 0 0 0 0 28 600.5 403.7 0 0 0 1 0 0 0 0 0 0 0 29 538.7 370.6 0 0 0 0 1 0 0 0 0 0 0 30 548.0 343.7 0 0 0 0 0 1 0 0 0 0 0 31 591.9 383.0 0 0 0 0 0 0 1 0 0 0 0 32 547.3 365.4 0 0 0 0 0 0 0 1 0 0 0 33 610.2 417.2 0 0 0 0 0 0 0 0 1 0 0 34 621.6 411.0 0 0 0 0 0 0 0 0 0 1 0 35 582.4 420.8 0 0 0 0 0 0 0 0 0 0 1 36 635.8 493.0 0 0 0 0 0 0 0 0 0 0 0 37 663.9 471.8 1 0 0 0 0 0 0 0 0 0 0 38 624.2 452.4 0 1 0 0 0 0 0 0 0 0 0 39 654.1 464.8 0 0 1 0 0 0 0 0 0 0 0 40 723.5 541.5 0 0 0 1 0 0 0 0 0 0 0 41 641.2 484.0 0 0 0 0 1 0 0 0 0 0 0 42 565.5 449.4 0 0 0 0 0 1 0 0 0 0 0 43 698.6 436.8 0 0 0 0 0 0 1 0 0 0 0 44 651.0 490.0 0 0 0 0 0 0 0 1 0 0 0 45 721.6 475.4 0 0 0 0 0 0 0 0 1 0 0 46 643.5 393.6 0 0 0 0 0 0 0 0 0 1 0 47 604.0 486.8 0 0 0 0 0 0 0 0 0 0 1 48 618.2 536.7 0 0 0 0 0 0 0 0 0 0 0 49 783.5 467.0 1 0 0 0 0 0 0 0 0 0 0 50 672.9 475.5 0 1 0 0 0 0 0 0 0 0 0 51 726.7 532.8 0 0 1 0 0 0 0 0 0 0 0 52 738.6 554.1 0 0 0 1 0 0 0 0 0 0 0 53 692.2 507.3 0 0 0 0 1 0 0 0 0 0 0 54 669.5 455.2 0 0 0 0 0 1 0 0 0 0 0 55 546.2 465.3 0 0 0 0 0 0 1 0 0 0 0 56 715.0 563.2 0 0 0 0 0 0 0 1 0 0 0 57 789.8 680.1 0 0 0 0 0 0 0 0 1 0 0 58 684.0 518.2 0 0 0 0 0 0 0 0 0 1 0 59 639.0 426.6 0 0 0 0 0 0 0 0 0 0 1 60 768.5 612.4 0 0 0 0 0 0 0 0 0 0 0 61 643.8 518.1 1 0 0 0 0 0 0 0 0 0 0 62 623.0 540.0 0 1 0 0 0 0 0 0 0 0 0 63 692.8 541.7 0 0 1 0 0 0 0 0 0 0 0 64 936.5 627.6 0 0 0 1 0 0 0 0 0 0 0 65 795.9 637.0 0 0 0 0 1 0 0 0 0 0 0 66 695.7 564.2 0 0 0 0 0 1 0 0 0 0 0 67 648.3 665.0 0 0 0 0 0 0 1 0 0 0 0 68 675.2 703.2 0 0 0 0 0 0 0 1 0 0 0 69 826.5 824.4 0 0 0 0 0 0 0 0 1 0 0 70 742.4 700.3 0 0 0 0 0 0 0 0 0 1 0 71 793.9 1219.6 0 0 0 0 0 0 0 0 0 0 1 72 685.3 764.7 0 0 0 0 0 0 0 0 0 0 0 73 756.1 479.9 1 0 0 0 0 0 0 0 0 0 0 74 704.0 543.4 0 1 0 0 0 0 0 0 0 0 0 75 860.6 593.3 0 0 1 0 0 0 0 0 0 0 0 76 795.9 584.3 0 0 0 1 0 0 0 0 0 0 0 77 816.7 645.9 0 0 0 0 1 0 0 0 0 0 0 78 777.9 548.9 0 0 0 0 0 1 0 0 0 0 0 79 746.4 421.8 0 0 0 0 0 0 1 0 0 0 0 80 694.7 460.3 0 0 0 0 0 0 0 1 0 0 0 81 909.2 553.4 0 0 0 0 0 0 0 0 1 0 0 82 783.6 424.4 0 0 0 0 0 0 0 0 0 1 0 83 730.4 470.2 0 0 0 0 0 0 0 0 0 0 1 84 847.7 547.2 0 0 0 0 0 0 0 0 0 0 0 85 758.7 444.8 1 0 0 0 0 0 0 0 0 0 0 86 839.2 526.7 0 1 0 0 0 0 0 0 0 0 0 87 784.8 598.3 0 0 1 0 0 0 0 0 0 0 0 88 906.1 543.5 0 0 0 1 0 0 0 0 0 0 0 89 838.2 641.2 0 0 0 0 1 0 0 0 0 0 0 90 729.0 525.0 0 0 0 0 0 1 0 0 0 0 0 91 768.1 521.5 0 0 0 0 0 0 1 0 0 0 0 92 710.5 551.8 0 0 0 0 0 0 0 1 0 0 0 93 863.0 543.7 0 0 0 0 0 0 0 0 1 0 0 94 778.3 472.1 0 0 0 0 0 0 0 0 0 1 0 95 827.7 488.0 0 0 0 0 0 0 0 0 0 0 1 96 853.1 642.8 0 0 0 0 0 0 0 0 0 0 0 97 859.3 601.7 1 0 0 0 0 0 0 0 0 0 0 98 779.2 553.9 0 1 0 0 0 0 0 0 0 0 0 99 724.6 522.5 0 0 1 0 0 0 0 0 0 0 0 100 829.2 568.4 0 0 0 1 0 0 0 0 0 0 0 101 862.9 675.4 0 0 0 0 1 0 0 0 0 0 0 102 601.6 499.1 0 0 0 0 0 1 0 0 0 0 0 103 964.9 549.4 0 0 0 0 0 0 1 0 0 0 0 104 766.3 531.2 0 0 0 0 0 0 0 1 0 0 0 105 847.8 583.3 0 0 0 0 0 0 0 0 1 0 0 106 992.7 526.5 0 0 0 0 0 0 0 0 0 1 0 107 865.3 513.2 0 0 0 0 0 0 0 0 0 0 1 108 1054.1 729.1 0 0 0 0 0 0 0 0 0 0 0 109 972.5 753.7 1 0 0 0 0 0 0 0 0 0 0 110 857.4 571.7 0 1 0 0 0 0 0 0 0 0 0 111 1043.3 680.9 0 0 1 0 0 0 0 0 0 0 0 112 1061.0 757.6 0 0 0 1 0 0 0 0 0 0 0 113 989.4 805.4 0 0 0 0 1 0 0 0 0 0 0 114 963.2 687.7 0 0 0 0 0 1 0 0 0 0 0 115 1181.9 950.8 0 0 0 0 0 0 1 0 0 0 0 116 1256.4 1062.0 0 0 0 0 0 0 0 1 0 0 0 117 1492.7 1110.6 0 0 0 0 0 0 0 0 1 0 0 118 1360.8 1098.9 0 0 0 0 0 0 0 0 0 1 0 119 1342.8 1067.0 0 0 0 0 0 0 0 0 0 0 1 120 1464.0 1360.1 0 0 0 0 0 0 0 0 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) xt M1 M2 M3 M4 169.8037 0.9829 53.0506 -0.2691 11.6519 65.9460 M5 M6 M7 M8 M9 M10 -11.0060 7.8579 30.8704 -12.3136 44.8369 68.1972 M11 -10.0189 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -564.60 -54.95 11.45 60.12 237.21 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 169.80367 52.29321 3.247 0.00156 ** xt 0.98288 0.05744 17.112 < 2e-16 *** M1 53.05057 54.20138 0.979 0.32990 M2 -0.26915 54.06377 -0.005 0.99604 M3 11.65194 53.69827 0.217 0.82863 M4 65.94597 53.63133 1.230 0.22154 M5 -11.00604 53.44542 -0.206 0.83724 M6 7.85788 53.93860 0.146 0.88445 M7 30.87043 53.81168 0.574 0.56739 M8 -12.31358 53.52979 -0.230 0.81851 M9 44.83691 53.30921 0.841 0.40218 M10 68.19724 53.65466 1.271 0.20647 M11 -10.01886 53.32958 -0.188 0.85134 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 119.1 on 107 degrees of freedom Multiple R-squared: 0.7459, Adjusted R-squared: 0.7174 F-statistic: 26.18 on 12 and 107 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.886082e-03 1.977216e-02 0.99011392 [2,] 2.112279e-03 4.224558e-03 0.99788772 [3,] 7.374830e-04 1.474966e-03 0.99926252 [4,] 4.912365e-04 9.824731e-04 0.99950876 [5,] 3.432214e-04 6.864428e-04 0.99965678 [6,] 1.540196e-04 3.080392e-04 0.99984598 [7,] 6.839042e-05 1.367808e-04 0.99993161 [8,] 1.897549e-05 3.795098e-05 0.99998102 [9,] 1.673668e-04 3.347335e-04 0.99983263 [10,] 4.754340e-04 9.508681e-04 0.99952457 [11,] 3.769726e-04 7.539451e-04 0.99962303 [12,] 2.057150e-04 4.114300e-04 0.99979429 [13,] 5.646665e-04 1.129333e-03 0.99943533 [14,] 7.776014e-04 1.555203e-03 0.99922240 [15,] 5.238651e-04 1.047730e-03 0.99947613 [16,] 2.814622e-03 5.629245e-03 0.99718538 [17,] 2.771000e-03 5.541999e-03 0.99722900 [18,] 3.787555e-03 7.575111e-03 0.99621244 [19,] 5.732741e-03 1.146548e-02 0.99426726 [20,] 4.289108e-03 8.578216e-03 0.99571089 [21,] 2.914008e-03 5.828017e-03 0.99708599 [22,] 3.760553e-03 7.521105e-03 0.99623945 [23,] 5.757451e-03 1.151490e-02 0.99424255 [24,] 8.191245e-03 1.638249e-02 0.99180875 [25,] 6.940636e-03 1.388127e-02 0.99305936 [26,] 5.975985e-03 1.195197e-02 0.99402401 [27,] 3.864547e-03 7.729094e-03 0.99613545 [28,] 5.459255e-03 1.091851e-02 0.99454074 [29,] 3.809115e-03 7.618230e-03 0.99619089 [30,] 4.228175e-03 8.456349e-03 0.99577183 [31,] 3.802193e-03 7.604386e-03 0.99619781 [32,] 2.498593e-03 4.997186e-03 0.99750141 [33,] 1.976640e-03 3.953280e-03 0.99802336 [34,] 3.150863e-03 6.301726e-03 0.99684914 [35,] 2.933856e-03 5.867711e-03 0.99706614 [36,] 2.592779e-03 5.185558e-03 0.99740722 [37,] 1.839924e-03 3.679849e-03 0.99816008 [38,] 1.385754e-03 2.771508e-03 0.99861425 [39,] 1.004279e-03 2.008558e-03 0.99899572 [40,] 1.036439e-03 2.072878e-03 0.99896356 [41,] 6.279257e-04 1.255851e-03 0.99937207 [42,] 5.100488e-04 1.020098e-03 0.99948995 [43,] 3.824774e-04 7.649548e-04 0.99961752 [44,] 2.919553e-04 5.839105e-04 0.99970804 [45,] 1.768323e-04 3.536645e-04 0.99982317 [46,] 1.492703e-04 2.985406e-04 0.99985073 [47,] 1.177815e-04 2.355630e-04 0.99988222 [48,] 8.340905e-05 1.668181e-04 0.99991659 [49,] 9.981521e-05 1.996304e-04 0.99990018 [50,] 5.888631e-05 1.177726e-04 0.99994111 [51,] 3.457835e-05 6.915669e-05 0.99996542 [52,] 1.596214e-04 3.192429e-04 0.99984038 [53,] 3.464691e-04 6.929382e-04 0.99965353 [54,] 9.815887e-04 1.963177e-03 0.99901841 [55,] 2.577460e-03 5.154920e-03 0.99742254 [56,] 8.121355e-01 3.757291e-01 0.18786453 [57,] 9.861508e-01 2.769842e-02 0.01384921 [58,] 9.834558e-01 3.308836e-02 0.01654418 [59,] 9.871150e-01 2.576995e-02 0.01288498 [60,] 9.878713e-01 2.425738e-02 0.01212869 [61,] 9.885725e-01 2.285505e-02 0.01142752 [62,] 9.849127e-01 3.017468e-02 0.01508734 [63,] 9.812301e-01 3.753975e-02 0.01876988 [64,] 9.814131e-01 3.717371e-02 0.01858686 [65,] 9.758219e-01 4.835629e-02 0.02417814 [66,] 9.782545e-01 4.349103e-02 0.02174551 [67,] 9.761907e-01 4.761859e-02 0.02380929 [68,] 9.784645e-01 4.307108e-02 0.02153554 [69,] 9.776011e-01 4.479783e-02 0.02239891 [70,] 9.722910e-01 5.541797e-02 0.02770898 [71,] 9.715955e-01 5.680893e-02 0.02840447 [72,] 9.687553e-01 6.248940e-02 0.03124470 [73,] 9.660665e-01 6.786697e-02 0.03393349 [74,] 9.507133e-01 9.857345e-02 0.04928672 [75,] 9.276717e-01 1.446566e-01 0.07232828 [76,] 9.222863e-01 1.554275e-01 0.07771375 [77,] 9.044963e-01 1.910074e-01 0.09550369 [78,] 8.779149e-01 2.441702e-01 0.12208510 [79,] 8.683151e-01 2.633697e-01 0.13168486 [80,] 8.411004e-01 3.177993e-01 0.15889963 [81,] 7.965359e-01 4.069282e-01 0.20346410 [82,] 7.253290e-01 5.493419e-01 0.27467096 [83,] 6.570008e-01 6.859985e-01 0.34299923 [84,] 7.067566e-01 5.864868e-01 0.29324340 [85,] 6.283758e-01 7.432485e-01 0.37162424 [86,] 5.131755e-01 9.736491e-01 0.48682454 [87,] 6.224176e-01 7.551647e-01 0.37758237 [88,] 5.919574e-01 8.160853e-01 0.40804265 [89,] 4.423954e-01 8.847907e-01 0.55760463 > postscript(file="/var/www/html/rcomp/tmp/1nazs1259328404.ps",horizontal=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/2k9b11259328404.ps",horizontal=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/3r63c1259328404.ps",horizontal=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/4zcsq1259328404.ps",horizontal=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/5xhbm1259328404.ps",horizontal=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 = 120 Frequency = 1 1 2 3 4 5 6 -92.3385710 -73.0123799 -38.2869704 -101.0165791 -42.0286660 -3.6521899 7 8 9 10 11 12 -58.1854072 -40.3806297 -68.4523606 -78.3616003 24.6253491 -14.6126699 13 14 15 16 17 18 -97.1690671 -203.5606135 -287.8092964 -102.0152876 -177.6055858 -121.9951405 19 20 21 22 23 24 -164.3473381 -69.9342250 -175.9516361 -157.3488419 -126.8335781 34.9885240 25 26 27 28 29 30 -15.2961876 -35.7121058 -23.6760028 -32.0376434 15.6476378 32.5231452 31 32 33 34 35 36 14.7834808 30.6661468 -14.4974439 -20.3639284 9.0199683 -18.5627134 37 38 39 40 41 42 -22.6762577 10.0112973 15.8025124 -44.4782849 6.6892289 -53.8671002 43 44 45 46 47 48 68.6046237 11.8994999 39.6990341 18.6381555 -34.2500051 -79.1144988 49 50 51 52 53 54 101.6415586 36.0068066 21.5667822 -41.7625525 34.7881625 44.4322052 55 56 57 58 59 60 -111.8074103 3.9528021 -93.2961714 -63.3284913 59.9192737 -3.2183926 61 62 63 64 65 66 -88.2835269 -77.2888493 -21.0808355 83.8958862 11.0088359 -36.5015388 67 68 69 70 71 72 -205.9882239 -173.4501718 -198.4255224 -183.9106453 -564.6032859 -236.1107707 73 74 75 76 77 78 61.5624274 0.3693642 96.0026398 -14.1454798 23.0612183 60.7365005 79 80 81 82 83 84 131.1477995 84.7909880 150.6345200 128.4655012 108.4657761 140.0652782 85 86 87 88 89 90 98.6614587 151.9834333 15.2882479 136.1559584 49.1807467 35.3272939 91 92 93 94 95 96 54.8548244 10.6576157 113.9684404 76.2822022 188.2705408 51.5021045 97 98 99 100 101 102 45.0478401 65.2491412 29.5904295 34.7822866 40.2663059 -66.6161559 103 104 105 106 107 108 224.2325175 86.7049105 59.8464563 237.2136181 201.1020055 167.6796999 109 110 111 112 113 114 8.8503255 125.9539059 192.6024933 80.6216961 38.9921158 109.6129806 115 116 117 118 119 120 46.7051336 55.0930635 186.4746837 42.7140303 134.2839557 -42.6165613 > postscript(file="/var/www/html/rcomp/tmp/6n8qw1259328404.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 120 Frequency = 1 lag(myerror, k = 1) myerror 0 -92.3385710 NA 1 -73.0123799 -92.3385710 2 -38.2869704 -73.0123799 3 -101.0165791 -38.2869704 4 -42.0286660 -101.0165791 5 -3.6521899 -42.0286660 6 -58.1854072 -3.6521899 7 -40.3806297 -58.1854072 8 -68.4523606 -40.3806297 9 -78.3616003 -68.4523606 10 24.6253491 -78.3616003 11 -14.6126699 24.6253491 12 -97.1690671 -14.6126699 13 -203.5606135 -97.1690671 14 -287.8092964 -203.5606135 15 -102.0152876 -287.8092964 16 -177.6055858 -102.0152876 17 -121.9951405 -177.6055858 18 -164.3473381 -121.9951405 19 -69.9342250 -164.3473381 20 -175.9516361 -69.9342250 21 -157.3488419 -175.9516361 22 -126.8335781 -157.3488419 23 34.9885240 -126.8335781 24 -15.2961876 34.9885240 25 -35.7121058 -15.2961876 26 -23.6760028 -35.7121058 27 -32.0376434 -23.6760028 28 15.6476378 -32.0376434 29 32.5231452 15.6476378 30 14.7834808 32.5231452 31 30.6661468 14.7834808 32 -14.4974439 30.6661468 33 -20.3639284 -14.4974439 34 9.0199683 -20.3639284 35 -18.5627134 9.0199683 36 -22.6762577 -18.5627134 37 10.0112973 -22.6762577 38 15.8025124 10.0112973 39 -44.4782849 15.8025124 40 6.6892289 -44.4782849 41 -53.8671002 6.6892289 42 68.6046237 -53.8671002 43 11.8994999 68.6046237 44 39.6990341 11.8994999 45 18.6381555 39.6990341 46 -34.2500051 18.6381555 47 -79.1144988 -34.2500051 48 101.6415586 -79.1144988 49 36.0068066 101.6415586 50 21.5667822 36.0068066 51 -41.7625525 21.5667822 52 34.7881625 -41.7625525 53 44.4322052 34.7881625 54 -111.8074103 44.4322052 55 3.9528021 -111.8074103 56 -93.2961714 3.9528021 57 -63.3284913 -93.2961714 58 59.9192737 -63.3284913 59 -3.2183926 59.9192737 60 -88.2835269 -3.2183926 61 -77.2888493 -88.2835269 62 -21.0808355 -77.2888493 63 83.8958862 -21.0808355 64 11.0088359 83.8958862 65 -36.5015388 11.0088359 66 -205.9882239 -36.5015388 67 -173.4501718 -205.9882239 68 -198.4255224 -173.4501718 69 -183.9106453 -198.4255224 70 -564.6032859 -183.9106453 71 -236.1107707 -564.6032859 72 61.5624274 -236.1107707 73 0.3693642 61.5624274 74 96.0026398 0.3693642 75 -14.1454798 96.0026398 76 23.0612183 -14.1454798 77 60.7365005 23.0612183 78 131.1477995 60.7365005 79 84.7909880 131.1477995 80 150.6345200 84.7909880 81 128.4655012 150.6345200 82 108.4657761 128.4655012 83 140.0652782 108.4657761 84 98.6614587 140.0652782 85 151.9834333 98.6614587 86 15.2882479 151.9834333 87 136.1559584 15.2882479 88 49.1807467 136.1559584 89 35.3272939 49.1807467 90 54.8548244 35.3272939 91 10.6576157 54.8548244 92 113.9684404 10.6576157 93 76.2822022 113.9684404 94 188.2705408 76.2822022 95 51.5021045 188.2705408 96 45.0478401 51.5021045 97 65.2491412 45.0478401 98 29.5904295 65.2491412 99 34.7822866 29.5904295 100 40.2663059 34.7822866 101 -66.6161559 40.2663059 102 224.2325175 -66.6161559 103 86.7049105 224.2325175 104 59.8464563 86.7049105 105 237.2136181 59.8464563 106 201.1020055 237.2136181 107 167.6796999 201.1020055 108 8.8503255 167.6796999 109 125.9539059 8.8503255 110 192.6024933 125.9539059 111 80.6216961 192.6024933 112 38.9921158 80.6216961 113 109.6129806 38.9921158 114 46.7051336 109.6129806 115 55.0930635 46.7051336 116 186.4746837 55.0930635 117 42.7140303 186.4746837 118 134.2839557 42.7140303 119 -42.6165613 134.2839557 120 NA -42.6165613 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -73.0123799 -92.3385710 [2,] -38.2869704 -73.0123799 [3,] -101.0165791 -38.2869704 [4,] -42.0286660 -101.0165791 [5,] -3.6521899 -42.0286660 [6,] -58.1854072 -3.6521899 [7,] -40.3806297 -58.1854072 [8,] -68.4523606 -40.3806297 [9,] -78.3616003 -68.4523606 [10,] 24.6253491 -78.3616003 [11,] -14.6126699 24.6253491 [12,] -97.1690671 -14.6126699 [13,] -203.5606135 -97.1690671 [14,] -287.8092964 -203.5606135 [15,] -102.0152876 -287.8092964 [16,] -177.6055858 -102.0152876 [17,] -121.9951405 -177.6055858 [18,] -164.3473381 -121.9951405 [19,] -69.9342250 -164.3473381 [20,] -175.9516361 -69.9342250 [21,] -157.3488419 -175.9516361 [22,] -126.8335781 -157.3488419 [23,] 34.9885240 -126.8335781 [24,] -15.2961876 34.9885240 [25,] -35.7121058 -15.2961876 [26,] -23.6760028 -35.7121058 [27,] -32.0376434 -23.6760028 [28,] 15.6476378 -32.0376434 [29,] 32.5231452 15.6476378 [30,] 14.7834808 32.5231452 [31,] 30.6661468 14.7834808 [32,] -14.4974439 30.6661468 [33,] -20.3639284 -14.4974439 [34,] 9.0199683 -20.3639284 [35,] -18.5627134 9.0199683 [36,] -22.6762577 -18.5627134 [37,] 10.0112973 -22.6762577 [38,] 15.8025124 10.0112973 [39,] -44.4782849 15.8025124 [40,] 6.6892289 -44.4782849 [41,] -53.8671002 6.6892289 [42,] 68.6046237 -53.8671002 [43,] 11.8994999 68.6046237 [44,] 39.6990341 11.8994999 [45,] 18.6381555 39.6990341 [46,] -34.2500051 18.6381555 [47,] -79.1144988 -34.2500051 [48,] 101.6415586 -79.1144988 [49,] 36.0068066 101.6415586 [50,] 21.5667822 36.0068066 [51,] -41.7625525 21.5667822 [52,] 34.7881625 -41.7625525 [53,] 44.4322052 34.7881625 [54,] -111.8074103 44.4322052 [55,] 3.9528021 -111.8074103 [56,] -93.2961714 3.9528021 [57,] -63.3284913 -93.2961714 [58,] 59.9192737 -63.3284913 [59,] -3.2183926 59.9192737 [60,] -88.2835269 -3.2183926 [61,] -77.2888493 -88.2835269 [62,] -21.0808355 -77.2888493 [63,] 83.8958862 -21.0808355 [64,] 11.0088359 83.8958862 [65,] -36.5015388 11.0088359 [66,] -205.9882239 -36.5015388 [67,] -173.4501718 -205.9882239 [68,] -198.4255224 -173.4501718 [69,] -183.9106453 -198.4255224 [70,] -564.6032859 -183.9106453 [71,] -236.1107707 -564.6032859 [72,] 61.5624274 -236.1107707 [73,] 0.3693642 61.5624274 [74,] 96.0026398 0.3693642 [75,] -14.1454798 96.0026398 [76,] 23.0612183 -14.1454798 [77,] 60.7365005 23.0612183 [78,] 131.1477995 60.7365005 [79,] 84.7909880 131.1477995 [80,] 150.6345200 84.7909880 [81,] 128.4655012 150.6345200 [82,] 108.4657761 128.4655012 [83,] 140.0652782 108.4657761 [84,] 98.6614587 140.0652782 [85,] 151.9834333 98.6614587 [86,] 15.2882479 151.9834333 [87,] 136.1559584 15.2882479 [88,] 49.1807467 136.1559584 [89,] 35.3272939 49.1807467 [90,] 54.8548244 35.3272939 [91,] 10.6576157 54.8548244 [92,] 113.9684404 10.6576157 [93,] 76.2822022 113.9684404 [94,] 188.2705408 76.2822022 [95,] 51.5021045 188.2705408 [96,] 45.0478401 51.5021045 [97,] 65.2491412 45.0478401 [98,] 29.5904295 65.2491412 [99,] 34.7822866 29.5904295 [100,] 40.2663059 34.7822866 [101,] -66.6161559 40.2663059 [102,] 224.2325175 -66.6161559 [103,] 86.7049105 224.2325175 [104,] 59.8464563 86.7049105 [105,] 237.2136181 59.8464563 [106,] 201.1020055 237.2136181 [107,] 167.6796999 201.1020055 [108,] 8.8503255 167.6796999 [109,] 125.9539059 8.8503255 [110,] 192.6024933 125.9539059 [111,] 80.6216961 192.6024933 [112,] 38.9921158 80.6216961 [113,] 109.6129806 38.9921158 [114,] 46.7051336 109.6129806 [115,] 55.0930635 46.7051336 [116,] 186.4746837 55.0930635 [117,] 42.7140303 186.4746837 [118,] 134.2839557 42.7140303 [119,] -42.6165613 134.2839557 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -73.0123799 -92.3385710 2 -38.2869704 -73.0123799 3 -101.0165791 -38.2869704 4 -42.0286660 -101.0165791 5 -3.6521899 -42.0286660 6 -58.1854072 -3.6521899 7 -40.3806297 -58.1854072 8 -68.4523606 -40.3806297 9 -78.3616003 -68.4523606 10 24.6253491 -78.3616003 11 -14.6126699 24.6253491 12 -97.1690671 -14.6126699 13 -203.5606135 -97.1690671 14 -287.8092964 -203.5606135 15 -102.0152876 -287.8092964 16 -177.6055858 -102.0152876 17 -121.9951405 -177.6055858 18 -164.3473381 -121.9951405 19 -69.9342250 -164.3473381 20 -175.9516361 -69.9342250 21 -157.3488419 -175.9516361 22 -126.8335781 -157.3488419 23 34.9885240 -126.8335781 24 -15.2961876 34.9885240 25 -35.7121058 -15.2961876 26 -23.6760028 -35.7121058 27 -32.0376434 -23.6760028 28 15.6476378 -32.0376434 29 32.5231452 15.6476378 30 14.7834808 32.5231452 31 30.6661468 14.7834808 32 -14.4974439 30.6661468 33 -20.3639284 -14.4974439 34 9.0199683 -20.3639284 35 -18.5627134 9.0199683 36 -22.6762577 -18.5627134 37 10.0112973 -22.6762577 38 15.8025124 10.0112973 39 -44.4782849 15.8025124 40 6.6892289 -44.4782849 41 -53.8671002 6.6892289 42 68.6046237 -53.8671002 43 11.8994999 68.6046237 44 39.6990341 11.8994999 45 18.6381555 39.6990341 46 -34.2500051 18.6381555 47 -79.1144988 -34.2500051 48 101.6415586 -79.1144988 49 36.0068066 101.6415586 50 21.5667822 36.0068066 51 -41.7625525 21.5667822 52 34.7881625 -41.7625525 53 44.4322052 34.7881625 54 -111.8074103 44.4322052 55 3.9528021 -111.8074103 56 -93.2961714 3.9528021 57 -63.3284913 -93.2961714 58 59.9192737 -63.3284913 59 -3.2183926 59.9192737 60 -88.2835269 -3.2183926 61 -77.2888493 -88.2835269 62 -21.0808355 -77.2888493 63 83.8958862 -21.0808355 64 11.0088359 83.8958862 65 -36.5015388 11.0088359 66 -205.9882239 -36.5015388 67 -173.4501718 -205.9882239 68 -198.4255224 -173.4501718 69 -183.9106453 -198.4255224 70 -564.6032859 -183.9106453 71 -236.1107707 -564.6032859 72 61.5624274 -236.1107707 73 0.3693642 61.5624274 74 96.0026398 0.3693642 75 -14.1454798 96.0026398 76 23.0612183 -14.1454798 77 60.7365005 23.0612183 78 131.1477995 60.7365005 79 84.7909880 131.1477995 80 150.6345200 84.7909880 81 128.4655012 150.6345200 82 108.4657761 128.4655012 83 140.0652782 108.4657761 84 98.6614587 140.0652782 85 151.9834333 98.6614587 86 15.2882479 151.9834333 87 136.1559584 15.2882479 88 49.1807467 136.1559584 89 35.3272939 49.1807467 90 54.8548244 35.3272939 91 10.6576157 54.8548244 92 113.9684404 10.6576157 93 76.2822022 113.9684404 94 188.2705408 76.2822022 95 51.5021045 188.2705408 96 45.0478401 51.5021045 97 65.2491412 45.0478401 98 29.5904295 65.2491412 99 34.7822866 29.5904295 100 40.2663059 34.7822866 101 -66.6161559 40.2663059 102 224.2325175 -66.6161559 103 86.7049105 224.2325175 104 59.8464563 86.7049105 105 237.2136181 59.8464563 106 201.1020055 237.2136181 107 167.6796999 201.1020055 108 8.8503255 167.6796999 109 125.9539059 8.8503255 110 192.6024933 125.9539059 111 80.6216961 192.6024933 112 38.9921158 80.6216961 113 109.6129806 38.9921158 114 46.7051336 109.6129806 115 55.0930635 46.7051336 116 186.4746837 55.0930635 117 42.7140303 186.4746837 118 134.2839557 42.7140303 119 -42.6165613 134.2839557 > 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/7jhax1259328404.ps",horizontal=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/8apy61259328404.ps",horizontal=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/95d711259328404.ps",horizontal=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/100lb71259328404.ps",horizontal=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/11simw1259328404.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/12qshk1259328404.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/13fylh1259328404.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/14ppl91259328404.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/15eqip1259328404.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/16xckt1259328404.tab") + } > system("convert tmp/1nazs1259328404.ps tmp/1nazs1259328404.png") > system("convert tmp/2k9b11259328404.ps tmp/2k9b11259328404.png") > system("convert tmp/3r63c1259328404.ps tmp/3r63c1259328404.png") > system("convert tmp/4zcsq1259328404.ps tmp/4zcsq1259328404.png") > system("convert tmp/5xhbm1259328404.ps tmp/5xhbm1259328404.png") > system("convert tmp/6n8qw1259328404.ps tmp/6n8qw1259328404.png") > system("convert tmp/7jhax1259328404.ps tmp/7jhax1259328404.png") > system("convert tmp/8apy61259328404.ps tmp/8apy61259328404.png") > system("convert tmp/95d711259328404.ps tmp/95d711259328404.png") > system("convert tmp/100lb71259328404.ps tmp/100lb71259328404.png") > > > proc.time() user system elapsed 3.247 1.693 3.769