R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(40399 + ,44164 + ,44496 + ,43110 + ,43880 + ,36763 + ,40399 + ,44164 + ,44496 + ,43110 + ,37903 + ,36763 + ,40399 + ,44164 + ,44496 + ,35532 + ,37903 + ,36763 + ,40399 + ,44164 + ,35533 + ,35532 + ,37903 + ,36763 + ,40399 + ,32110 + ,35533 + ,35532 + ,37903 + ,36763 + ,33374 + ,32110 + ,35533 + ,35532 + ,37903 + ,35462 + ,33374 + ,32110 + ,35533 + ,35532 + ,33508 + ,35462 + ,33374 + ,32110 + ,35533 + ,36080 + ,33508 + ,35462 + ,33374 + ,32110 + ,34560 + ,36080 + ,33508 + ,35462 + ,33374 + ,38737 + ,34560 + ,36080 + ,33508 + ,35462 + ,38144 + ,38737 + ,34560 + ,36080 + ,33508 + ,37594 + ,38144 + ,38737 + ,34560 + ,36080 + ,36424 + ,37594 + ,38144 + ,38737 + ,34560 + ,36843 + ,36424 + ,37594 + ,38144 + ,38737 + ,37246 + ,36843 + ,36424 + ,37594 + ,38144 + ,38661 + ,37246 + ,36843 + ,36424 + ,37594 + ,40454 + ,38661 + ,37246 + ,36843 + ,36424 + ,44928 + ,40454 + ,38661 + ,37246 + ,36843 + ,48441 + ,44928 + ,40454 + ,38661 + ,37246 + ,48140 + ,48441 + ,44928 + ,40454 + ,38661 + ,45998 + ,48140 + ,48441 + ,44928 + ,40454 + ,47369 + ,45998 + ,48140 + ,48441 + ,44928 + ,49554 + ,47369 + ,45998 + ,48140 + ,48441 + ,47510 + ,49554 + ,47369 + ,45998 + ,48140 + ,44873 + ,47510 + ,49554 + ,47369 + ,45998 + ,45344 + ,44873 + ,47510 + ,49554 + ,47369 + ,42413 + ,45344 + ,44873 + ,47510 + ,49554 + ,36912 + ,42413 + ,45344 + ,44873 + ,47510 + ,43452 + ,36912 + ,42413 + ,45344 + ,44873 + ,42142 + ,43452 + ,36912 + ,42413 + ,45344 + ,44382 + ,42142 + ,43452 + ,36912 + ,42413 + ,43636 + ,44382 + ,42142 + ,43452 + ,36912 + ,44167 + ,43636 + ,44382 + ,42142 + ,43452 + ,44423 + ,44167 + ,43636 + ,44382 + ,42142 + ,42868 + ,44423 + ,44167 + ,43636 + ,44382 + ,43908 + ,42868 + ,44423 + ,44167 + ,43636 + ,42013 + ,43908 + ,42868 + ,44423 + ,44167 + ,38846 + ,42013 + ,43908 + ,42868 + ,44423 + ,35087 + ,38846 + ,42013 + ,43908 + ,42868 + ,33026 + ,35087 + ,38846 + ,42013 + ,43908 + ,34646 + ,33026 + ,35087 + ,38846 + ,42013 + ,37135 + ,34646 + ,33026 + ,35087 + ,38846 + ,37985 + ,37135 + ,34646 + ,33026 + ,35087 + ,43121 + ,37985 + ,37135 + ,34646 + ,33026 + ,43722 + ,43121 + ,37985 + ,37135 + ,34646 + ,43630 + ,43722 + ,43121 + ,37985 + ,37135 + ,42234 + ,43630 + ,43722 + ,43121 + ,37985 + ,39351 + ,42234 + ,43630 + ,43722 + ,43121 + ,39327 + ,39351 + ,42234 + ,43630 + ,43722 + ,35704 + ,39327 + ,39351 + ,42234 + ,43630 + ,30466 + ,35704 + ,39327 + ,39351 + ,42234 + ,28155 + ,30466 + ,35704 + ,39327 + ,39351 + ,29257 + ,28155 + ,30466 + ,35704 + ,39327 + ,29998 + ,29257 + ,28155 + ,30466 + ,35704 + ,32529 + ,29998 + ,29257 + ,28155 + ,30466 + ,34787 + ,32529 + ,29998 + ,29257 + ,28155 + ,33855 + ,34787 + ,32529 + ,29998 + ,29257 + ,34556 + ,33855 + ,34787 + ,32529 + ,29998 + ,31348 + ,34556 + ,33855 + ,34787 + ,32529 + ,30805 + ,31348 + ,34556 + ,33855 + ,34787 + ,28353 + ,30805 + ,31348 + ,34556 + ,33855 + ,24514 + ,28353 + ,30805 + ,31348 + ,34556 + ,21106 + ,24514 + ,28353 + ,30805 + ,31348 + ,21346 + ,21106 + ,24514 + ,28353 + ,30805 + ,23335 + ,21346 + ,21106 + ,24514 + ,28353 + ,24379 + ,23335 + ,21346 + ,21106 + ,24514 + ,26290 + ,24379 + ,23335 + ,21346 + ,21106 + ,30084 + ,26290 + ,24379 + ,23335 + ,21346 + ,29429 + ,30084 + ,26290 + ,24379 + ,23335 + ,30632 + ,29429 + ,30084 + ,26290 + ,24379 + ,27349 + ,30632 + ,29429 + ,30084 + ,26290 + ,27264 + ,27349 + ,30632 + ,29429 + ,30084 + ,27474 + ,27264 + ,27349 + ,30632 + ,29429 + ,24482 + ,27474 + ,27264 + ,27349 + ,30632 + ,21453 + ,24482 + ,27474 + ,27264 + ,27349 + ,18788 + ,21453 + ,24482 + ,27474 + ,27264 + ,19282 + ,18788 + ,21453 + ,24482 + ,27474 + ,19713 + ,19282 + ,18788 + ,21453 + ,24482 + ,21917 + ,19713 + ,19282 + ,18788 + ,21453 + ,23812 + ,21917 + ,19713 + ,19282 + ,18788 + ,23785 + ,23812 + ,21917 + ,19713 + ,19282 + ,24696 + ,23785 + ,23812 + ,21917 + ,19713 + ,24562 + ,24696 + ,23785 + ,23812 + ,21917 + ,23580 + ,24562 + ,24696 + ,23785 + ,23812 + ,24939 + ,23580 + ,24562 + ,24696 + ,23785 + ,23899 + ,24939 + ,23580 + ,24562 + ,24696 + ,21454 + ,23899 + ,24939 + ,23580 + ,24562 + ,19761 + ,21454 + ,23899 + ,24939 + ,23580 + ,19815 + ,19761 + ,21454 + ,23899 + ,24939 + ,20780 + ,19815 + ,19761 + ,21454 + ,23899 + ,23462 + ,20780 + ,19815 + ,19761 + ,21454 + ,25005 + ,23462 + ,20780 + ,19815 + ,19761 + ,24725 + ,25005 + ,23462 + ,20780 + ,19815 + ,26198 + ,24725 + ,25005 + ,23462 + ,20780 + ,27543 + ,26198 + ,24725 + ,25005 + ,23462 + ,26471 + ,27543 + ,26198 + ,24725 + ,25005 + ,26558 + ,26471 + ,27543 + ,26198 + ,24725 + ,25317 + ,26558 + ,26471 + ,27543 + ,26198 + ,22896 + ,25317 + ,26558 + ,26471 + ,27543 + ,22248 + ,22896 + ,25317 + ,26558 + ,26471 + ,23406 + ,22248 + ,22896 + ,25317 + ,26558 + ,25073 + ,23406 + ,22248 + ,22896 + ,25317 + ,27691 + ,25073 + ,23406 + ,22248 + ,22896 + ,30599 + ,27691 + ,25073 + ,23406 + ,22248 + ,31948 + ,30599 + ,27691 + ,25073 + ,23406 + ,32946 + ,31948 + ,30599 + ,27691 + ,25073 + ,34012 + ,32946 + ,31948 + ,30599 + ,27691 + ,32936 + ,34012 + ,32946 + ,31948 + ,30599 + ,32974 + ,32936 + ,34012 + ,32946 + ,31948 + ,30951 + ,32974 + ,32936 + ,34012 + ,32946 + ,29812 + ,30951 + ,32974 + ,32936 + ,34012 + ,29010 + ,29812 + ,30951 + ,32974 + ,32936 + ,31068 + ,29010 + ,29812 + ,30951 + ,32974 + ,32447 + ,31068 + ,29010 + ,29812 + ,30951 + ,34844 + ,32447 + ,31068 + ,29010 + ,29812 + ,35676 + ,34844 + ,32447 + ,31068 + ,29010 + ,35387 + ,35676 + ,34844 + ,32447 + ,31068 + ,36488 + ,35387 + ,35676 + ,34844 + ,32447 + ,35652 + ,36488 + ,35387 + ,35676 + ,34844 + ,33488 + ,35652 + ,36488 + ,35387 + ,35676 + ,32914 + ,33488 + ,35652 + ,36488 + ,35387 + ,29781 + ,32914 + ,33488 + ,35652 + ,36488 + ,27951 + ,29781 + ,32914 + ,33488 + ,35652) + ,dim=c(5 + ,125) + ,dimnames=list(c('OPENVAC' + ,'X1' + ,'X2' + ,'X3' + ,'X4') + ,1:125)) > y <- array(NA,dim=c(5,125),dimnames=list(c('OPENVAC','X1','X2','X3','X4'),1:125)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '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 OPENVAC X1 X2 X3 X4 1 40399 44164 44496 43110 43880 2 36763 40399 44164 44496 43110 3 37903 36763 40399 44164 44496 4 35532 37903 36763 40399 44164 5 35533 35532 37903 36763 40399 6 32110 35533 35532 37903 36763 7 33374 32110 35533 35532 37903 8 35462 33374 32110 35533 35532 9 33508 35462 33374 32110 35533 10 36080 33508 35462 33374 32110 11 34560 36080 33508 35462 33374 12 38737 34560 36080 33508 35462 13 38144 38737 34560 36080 33508 14 37594 38144 38737 34560 36080 15 36424 37594 38144 38737 34560 16 36843 36424 37594 38144 38737 17 37246 36843 36424 37594 38144 18 38661 37246 36843 36424 37594 19 40454 38661 37246 36843 36424 20 44928 40454 38661 37246 36843 21 48441 44928 40454 38661 37246 22 48140 48441 44928 40454 38661 23 45998 48140 48441 44928 40454 24 47369 45998 48140 48441 44928 25 49554 47369 45998 48140 48441 26 47510 49554 47369 45998 48140 27 44873 47510 49554 47369 45998 28 45344 44873 47510 49554 47369 29 42413 45344 44873 47510 49554 30 36912 42413 45344 44873 47510 31 43452 36912 42413 45344 44873 32 42142 43452 36912 42413 45344 33 44382 42142 43452 36912 42413 34 43636 44382 42142 43452 36912 35 44167 43636 44382 42142 43452 36 44423 44167 43636 44382 42142 37 42868 44423 44167 43636 44382 38 43908 42868 44423 44167 43636 39 42013 43908 42868 44423 44167 40 38846 42013 43908 42868 44423 41 35087 38846 42013 43908 42868 42 33026 35087 38846 42013 43908 43 34646 33026 35087 38846 42013 44 37135 34646 33026 35087 38846 45 37985 37135 34646 33026 35087 46 43121 37985 37135 34646 33026 47 43722 43121 37985 37135 34646 48 43630 43722 43121 37985 37135 49 42234 43630 43722 43121 37985 50 39351 42234 43630 43722 43121 51 39327 39351 42234 43630 43722 52 35704 39327 39351 42234 43630 53 30466 35704 39327 39351 42234 54 28155 30466 35704 39327 39351 55 29257 28155 30466 35704 39327 56 29998 29257 28155 30466 35704 57 32529 29998 29257 28155 30466 58 34787 32529 29998 29257 28155 59 33855 34787 32529 29998 29257 60 34556 33855 34787 32529 29998 61 31348 34556 33855 34787 32529 62 30805 31348 34556 33855 34787 63 28353 30805 31348 34556 33855 64 24514 28353 30805 31348 34556 65 21106 24514 28353 30805 31348 66 21346 21106 24514 28353 30805 67 23335 21346 21106 24514 28353 68 24379 23335 21346 21106 24514 69 26290 24379 23335 21346 21106 70 30084 26290 24379 23335 21346 71 29429 30084 26290 24379 23335 72 30632 29429 30084 26290 24379 73 27349 30632 29429 30084 26290 74 27264 27349 30632 29429 30084 75 27474 27264 27349 30632 29429 76 24482 27474 27264 27349 30632 77 21453 24482 27474 27264 27349 78 18788 21453 24482 27474 27264 79 19282 18788 21453 24482 27474 80 19713 19282 18788 21453 24482 81 21917 19713 19282 18788 21453 82 23812 21917 19713 19282 18788 83 23785 23812 21917 19713 19282 84 24696 23785 23812 21917 19713 85 24562 24696 23785 23812 21917 86 23580 24562 24696 23785 23812 87 24939 23580 24562 24696 23785 88 23899 24939 23580 24562 24696 89 21454 23899 24939 23580 24562 90 19761 21454 23899 24939 23580 91 19815 19761 21454 23899 24939 92 20780 19815 19761 21454 23899 93 23462 20780 19815 19761 21454 94 25005 23462 20780 19815 19761 95 24725 25005 23462 20780 19815 96 26198 24725 25005 23462 20780 97 27543 26198 24725 25005 23462 98 26471 27543 26198 24725 25005 99 26558 26471 27543 26198 24725 100 25317 26558 26471 27543 26198 101 22896 25317 26558 26471 27543 102 22248 22896 25317 26558 26471 103 23406 22248 22896 25317 26558 104 25073 23406 22248 22896 25317 105 27691 25073 23406 22248 22896 106 30599 27691 25073 23406 22248 107 31948 30599 27691 25073 23406 108 32946 31948 30599 27691 25073 109 34012 32946 31948 30599 27691 110 32936 34012 32946 31948 30599 111 32974 32936 34012 32946 31948 112 30951 32974 32936 34012 32946 113 29812 30951 32974 32936 34012 114 29010 29812 30951 32974 32936 115 31068 29010 29812 30951 32974 116 32447 31068 29010 29812 30951 117 34844 32447 31068 29010 29812 118 35676 34844 32447 31068 29010 119 35387 35676 34844 32447 31068 120 36488 35387 35676 34844 32447 121 35652 36488 35387 35676 34844 122 33488 35652 36488 35387 35676 123 32914 33488 35652 36488 35387 124 29781 32914 33488 35652 36488 125 27951 29781 32914 33488 35652 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X1 X2 X3 X4 1842.18557 1.17684 -0.06814 -0.19423 0.02689 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -4315.2 -1540.2 66.4 1177.9 8661.2 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1842.18557 832.19132 2.214 0.0287 * X1 1.17684 0.09136 12.881 <2e-16 *** X2 -0.06814 0.13984 -0.487 0.6269 X3 -0.19423 0.13992 -1.388 0.1677 X4 0.02689 0.09104 0.295 0.7682 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2074 on 120 degrees of freedom Multiple R-squared: 0.9319, Adjusted R-squared: 0.9296 F-statistic: 410.3 on 4 and 120 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.7033897 5.932205e-01 2.966103e-01 [2,] 0.5637749 8.724502e-01 4.362251e-01 [3,] 0.5961303 8.077394e-01 4.038697e-01 [4,] 0.4694554 9.389109e-01 5.305446e-01 [5,] 0.6583536 6.832928e-01 3.416464e-01 [6,] 0.6493539 7.012921e-01 3.506461e-01 [7,] 0.5509366 8.981269e-01 4.490634e-01 [8,] 0.4575188 9.150376e-01 5.424812e-01 [9,] 0.3787347 7.574695e-01 6.212653e-01 [10,] 0.3242709 6.485419e-01 6.757291e-01 [11,] 0.3280786 6.561572e-01 6.719214e-01 [12,] 0.4118304 8.236608e-01 5.881696e-01 [13,] 0.8070114 3.859772e-01 1.929886e-01 [14,] 0.8970103 2.059793e-01 1.029897e-01 [15,] 0.8628911 2.742178e-01 1.371089e-01 [16,] 0.8304965 3.390069e-01 1.695035e-01 [17,] 0.8855432 2.289135e-01 1.144568e-01 [18,] 0.9293567 1.412866e-01 7.064329e-02 [19,] 0.9164525 1.670949e-01 8.354747e-02 [20,] 0.9029439 1.941122e-01 9.705608e-02 [21,] 0.8998836 2.002327e-01 1.001164e-01 [22,] 0.8860035 2.279930e-01 1.139965e-01 [23,] 0.9452289 1.095422e-01 5.477108e-02 [24,] 0.9997211 5.577883e-04 2.788942e-04 [25,] 0.9996269 7.461028e-04 3.730514e-04 [26,] 0.9996939 6.121023e-04 3.060511e-04 [27,] 0.9994987 1.002647e-03 5.013237e-04 [28,] 0.9992980 1.403912e-03 7.019560e-04 [29,] 0.9990240 1.952020e-03 9.760100e-04 [30,] 0.9985313 2.937404e-03 1.468702e-03 [31,] 0.9986576 2.684726e-03 1.342363e-03 [32,] 0.9980885 3.822917e-03 1.911458e-03 [33,] 0.9982764 3.447102e-03 1.723551e-03 [34,] 0.9987532 2.493558e-03 1.246779e-03 [35,] 0.9983348 3.330346e-03 1.665173e-03 [36,] 0.9987229 2.554199e-03 1.277099e-03 [37,] 0.9988783 2.243483e-03 1.121742e-03 [38,] 0.9982548 3.490343e-03 1.745171e-03 [39,] 0.9998292 3.416310e-04 1.708155e-04 [40,] 0.9997165 5.670085e-04 2.835042e-04 [41,] 0.9995677 8.645239e-04 4.322619e-04 [42,] 0.9993912 1.217654e-03 6.088272e-04 [43,] 0.9992581 1.483718e-03 7.418588e-04 [44,] 0.9994022 1.195629e-03 5.978143e-04 [45,] 0.9994950 1.009959e-03 5.049797e-04 [46,] 0.9998853 2.293450e-04 1.146725e-04 [47,] 0.9998599 2.802103e-04 1.401052e-04 [48,] 0.9998975 2.049715e-04 1.024858e-04 [49,] 0.9998342 3.315400e-04 1.657700e-04 [50,] 0.9998273 3.454695e-04 1.727348e-04 [51,] 0.9997912 4.176958e-04 2.088479e-04 [52,] 0.9998007 3.985292e-04 1.992646e-04 [53,] 0.9997529 4.941600e-04 2.470800e-04 [54,] 0.9998747 2.505330e-04 1.252665e-04 [55,] 0.9998373 3.254920e-04 1.627460e-04 [56,] 0.9998289 3.422055e-04 1.711027e-04 [57,] 0.9999319 1.361852e-04 6.809258e-05 [58,] 0.9999467 1.066434e-04 5.332168e-05 [59,] 0.9999292 1.416976e-04 7.084880e-05 [60,] 0.9999192 1.615748e-04 8.078741e-05 [61,] 0.9998646 2.707015e-04 1.353508e-04 [62,] 0.9997860 4.279519e-04 2.139760e-04 [63,] 0.9998788 2.424651e-04 1.212326e-04 [64,] 0.9999113 1.773343e-04 8.866717e-05 [65,] 0.9998726 2.548928e-04 1.274464e-04 [66,] 0.9999729 5.417791e-05 2.708895e-05 [67,] 0.9999684 6.311553e-05 3.155776e-05 [68,] 0.9999435 1.129011e-04 5.645055e-05 [69,] 0.9999866 2.677458e-05 1.338729e-05 [70,] 0.9999893 2.138585e-05 1.069292e-05 [71,] 0.9999879 2.416324e-05 1.208162e-05 [72,] 0.9999820 3.600592e-05 1.800296e-05 [73,] 0.9999669 6.620557e-05 3.310279e-05 [74,] 0.9999533 9.349534e-05 4.674767e-05 [75,] 0.9999147 1.705021e-04 8.525105e-05 [76,] 0.9999010 1.979032e-04 9.895161e-05 [77,] 0.9998238 3.524880e-04 1.762440e-04 [78,] 0.9997272 5.455143e-04 2.727572e-04 [79,] 0.9996602 6.796203e-04 3.398101e-04 [80,] 0.9995874 8.251713e-04 4.125857e-04 [81,] 0.9996671 6.658553e-04 3.329277e-04 [82,] 0.9998553 2.893439e-04 1.446719e-04 [83,] 0.9997987 4.025319e-04 2.012660e-04 [84,] 0.9996225 7.549037e-04 3.774519e-04 [85,] 0.9993118 1.376461e-03 6.882303e-04 [86,] 0.9990975 1.804986e-03 9.024930e-04 [87,] 0.9984758 3.048353e-03 1.524176e-03 [88,] 0.9988802 2.239597e-03 1.119798e-03 [89,] 0.9981496 3.700793e-03 1.850396e-03 [90,] 0.9967975 6.404918e-03 3.202459e-03 [91,] 0.9984238 3.152429e-03 1.576214e-03 [92,] 0.9971168 5.766355e-03 2.883178e-03 [93,] 0.9967583 6.483356e-03 3.241678e-03 [94,] 0.9993174 1.365131e-03 6.825656e-04 [95,] 0.9990610 1.877947e-03 9.389737e-04 [96,] 0.9981170 3.766032e-03 1.883016e-03 [97,] 0.9966900 6.619911e-03 3.309955e-03 [98,] 0.9940040 1.199200e-02 5.996001e-03 [99,] 0.9890800 2.183994e-02 1.091997e-02 [100,] 0.9874446 2.511081e-02 1.255541e-02 [101,] 0.9861427 2.771464e-02 1.385732e-02 [102,] 0.9755764 4.884714e-02 2.442357e-02 [103,] 0.9782031 4.359386e-02 2.179693e-02 [104,] 0.9587832 8.243351e-02 4.121676e-02 [105,] 0.9608924 7.821520e-02 3.910760e-02 [106,] 0.9343435 1.313129e-01 6.565645e-02 [107,] 0.9260040 1.479921e-01 7.399603e-02 [108,] 0.9233160 1.533680e-01 7.668399e-02 [109,] 0.8618304 2.763391e-01 1.381696e-01 [110,] 0.9568685 8.626307e-02 4.313154e-02 > postscript(file="/var/www/html/freestat/rcomp/tmp/1tpkf1293183464.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/freestat/rcomp/tmp/2tpkf1293183464.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/freestat/rcomp/tmp/3mgj01293183464.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/freestat/rcomp/tmp/4mgj01293183464.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/freestat/rcomp/tmp/5mgj01293183464.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 = 125 Frequency = 1 1 2 3 4 5 6 -3191.476744 -2129.406184 2931.260942 -1751.447894 512.521860 -2754.028563 7 8 9 10 11 12 2047.171992 2478.350019 -2511.630888 2839.733363 -1468.668921 4236.710412 13 14 15 16 17 18 -823.403548 -755.300836 -466.275456 1064.650993 803.948969 1560.774111 19 20 21 22 23 24 1828.855781 4356.219410 2990.237151 -829.910188 -1557.522120 2875.782521 25 26 27 28 29 30 3148.458183 -1781.454182 -1540.226630 2282.336975 -1838.402398 -4315.230207 31 32 33 34 35 36 8661.205687 -1302.101294 1935.545653 -117.645458 1013.616801 1064.185239 37 38 39 40 41 42 -961.028293 2049.590608 -1139.833334 -2314.775742 -2232.054689 -481.167754 43 44 45 46 47 48 2743.969067 2541.097278 273.107940 4948.474661 3.050410 -348.080871 49 50 51 52 53 54 -620.143276 -1887.917395 1351.743644 -2708.137908 -4206.530532 -527.286228 55 56 57 58 59 60 2234.399696 601.086611 2027.118556 1633.223685 -1669.309734 754.039352 61 62 63 64 65 66 -2971.911733 66.405498 -1803.955524 -3436.298526 -2512.719972 1014.684495 67 68 69 70 71 72 1809.294633 -29.790876 926.379003 2922.459039 -1917.939587 657.521345 73 74 75 76 77 78 -3400.315892 230.972211 568.565818 -3346.369374 -2768.202450 -2029.374329 79 80 81 82 83 84 807.704375 -32.125267 1262.140600 760.373014 -1276.114876 212.284670 85 86 87 88 89 90 -686.846825 -1505.271957 1177.919873 -1578.837117 -2894.455530 -1490.595853 91 92 93 94 95 96 150.637725 489.793760 1776.736818 285.232200 -1441.887469 960.749435 97 98 99 100 101 102 780.774487 -1869.570103 -135.720698 -1330.519525 -2529.519488 -367.242327 103 104 105 106 107 108 1144.995630 968.199768 1642.559101 1825.539960 223.344127 295.623161 109 110 111 112 113 114 773.494275 -1305.181158 229.302654 -1731.522174 -724.850836 -287.973229 115 116 117 118 119 120 2242.283964 977.873639 1767.106317 293.491790 -598.791537 1327.500317 121 122 123 124 125 -726.740198 -1910.385891 226.938522 -2569.998398 -1149.923810 > postscript(file="/var/www/html/freestat/rcomp/tmp/6x81l1293183464.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 = 125 Frequency = 1 lag(myerror, k = 1) myerror 0 -3191.476744 NA 1 -2129.406184 -3191.476744 2 2931.260942 -2129.406184 3 -1751.447894 2931.260942 4 512.521860 -1751.447894 5 -2754.028563 512.521860 6 2047.171992 -2754.028563 7 2478.350019 2047.171992 8 -2511.630888 2478.350019 9 2839.733363 -2511.630888 10 -1468.668921 2839.733363 11 4236.710412 -1468.668921 12 -823.403548 4236.710412 13 -755.300836 -823.403548 14 -466.275456 -755.300836 15 1064.650993 -466.275456 16 803.948969 1064.650993 17 1560.774111 803.948969 18 1828.855781 1560.774111 19 4356.219410 1828.855781 20 2990.237151 4356.219410 21 -829.910188 2990.237151 22 -1557.522120 -829.910188 23 2875.782521 -1557.522120 24 3148.458183 2875.782521 25 -1781.454182 3148.458183 26 -1540.226630 -1781.454182 27 2282.336975 -1540.226630 28 -1838.402398 2282.336975 29 -4315.230207 -1838.402398 30 8661.205687 -4315.230207 31 -1302.101294 8661.205687 32 1935.545653 -1302.101294 33 -117.645458 1935.545653 34 1013.616801 -117.645458 35 1064.185239 1013.616801 36 -961.028293 1064.185239 37 2049.590608 -961.028293 38 -1139.833334 2049.590608 39 -2314.775742 -1139.833334 40 -2232.054689 -2314.775742 41 -481.167754 -2232.054689 42 2743.969067 -481.167754 43 2541.097278 2743.969067 44 273.107940 2541.097278 45 4948.474661 273.107940 46 3.050410 4948.474661 47 -348.080871 3.050410 48 -620.143276 -348.080871 49 -1887.917395 -620.143276 50 1351.743644 -1887.917395 51 -2708.137908 1351.743644 52 -4206.530532 -2708.137908 53 -527.286228 -4206.530532 54 2234.399696 -527.286228 55 601.086611 2234.399696 56 2027.118556 601.086611 57 1633.223685 2027.118556 58 -1669.309734 1633.223685 59 754.039352 -1669.309734 60 -2971.911733 754.039352 61 66.405498 -2971.911733 62 -1803.955524 66.405498 63 -3436.298526 -1803.955524 64 -2512.719972 -3436.298526 65 1014.684495 -2512.719972 66 1809.294633 1014.684495 67 -29.790876 1809.294633 68 926.379003 -29.790876 69 2922.459039 926.379003 70 -1917.939587 2922.459039 71 657.521345 -1917.939587 72 -3400.315892 657.521345 73 230.972211 -3400.315892 74 568.565818 230.972211 75 -3346.369374 568.565818 76 -2768.202450 -3346.369374 77 -2029.374329 -2768.202450 78 807.704375 -2029.374329 79 -32.125267 807.704375 80 1262.140600 -32.125267 81 760.373014 1262.140600 82 -1276.114876 760.373014 83 212.284670 -1276.114876 84 -686.846825 212.284670 85 -1505.271957 -686.846825 86 1177.919873 -1505.271957 87 -1578.837117 1177.919873 88 -2894.455530 -1578.837117 89 -1490.595853 -2894.455530 90 150.637725 -1490.595853 91 489.793760 150.637725 92 1776.736818 489.793760 93 285.232200 1776.736818 94 -1441.887469 285.232200 95 960.749435 -1441.887469 96 780.774487 960.749435 97 -1869.570103 780.774487 98 -135.720698 -1869.570103 99 -1330.519525 -135.720698 100 -2529.519488 -1330.519525 101 -367.242327 -2529.519488 102 1144.995630 -367.242327 103 968.199768 1144.995630 104 1642.559101 968.199768 105 1825.539960 1642.559101 106 223.344127 1825.539960 107 295.623161 223.344127 108 773.494275 295.623161 109 -1305.181158 773.494275 110 229.302654 -1305.181158 111 -1731.522174 229.302654 112 -724.850836 -1731.522174 113 -287.973229 -724.850836 114 2242.283964 -287.973229 115 977.873639 2242.283964 116 1767.106317 977.873639 117 293.491790 1767.106317 118 -598.791537 293.491790 119 1327.500317 -598.791537 120 -726.740198 1327.500317 121 -1910.385891 -726.740198 122 226.938522 -1910.385891 123 -2569.998398 226.938522 124 -1149.923810 -2569.998398 125 NA -1149.923810 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -2129.406184 -3191.476744 [2,] 2931.260942 -2129.406184 [3,] -1751.447894 2931.260942 [4,] 512.521860 -1751.447894 [5,] -2754.028563 512.521860 [6,] 2047.171992 -2754.028563 [7,] 2478.350019 2047.171992 [8,] -2511.630888 2478.350019 [9,] 2839.733363 -2511.630888 [10,] -1468.668921 2839.733363 [11,] 4236.710412 -1468.668921 [12,] -823.403548 4236.710412 [13,] -755.300836 -823.403548 [14,] -466.275456 -755.300836 [15,] 1064.650993 -466.275456 [16,] 803.948969 1064.650993 [17,] 1560.774111 803.948969 [18,] 1828.855781 1560.774111 [19,] 4356.219410 1828.855781 [20,] 2990.237151 4356.219410 [21,] -829.910188 2990.237151 [22,] -1557.522120 -829.910188 [23,] 2875.782521 -1557.522120 [24,] 3148.458183 2875.782521 [25,] -1781.454182 3148.458183 [26,] -1540.226630 -1781.454182 [27,] 2282.336975 -1540.226630 [28,] -1838.402398 2282.336975 [29,] -4315.230207 -1838.402398 [30,] 8661.205687 -4315.230207 [31,] -1302.101294 8661.205687 [32,] 1935.545653 -1302.101294 [33,] -117.645458 1935.545653 [34,] 1013.616801 -117.645458 [35,] 1064.185239 1013.616801 [36,] -961.028293 1064.185239 [37,] 2049.590608 -961.028293 [38,] -1139.833334 2049.590608 [39,] -2314.775742 -1139.833334 [40,] -2232.054689 -2314.775742 [41,] -481.167754 -2232.054689 [42,] 2743.969067 -481.167754 [43,] 2541.097278 2743.969067 [44,] 273.107940 2541.097278 [45,] 4948.474661 273.107940 [46,] 3.050410 4948.474661 [47,] -348.080871 3.050410 [48,] -620.143276 -348.080871 [49,] -1887.917395 -620.143276 [50,] 1351.743644 -1887.917395 [51,] -2708.137908 1351.743644 [52,] -4206.530532 -2708.137908 [53,] -527.286228 -4206.530532 [54,] 2234.399696 -527.286228 [55,] 601.086611 2234.399696 [56,] 2027.118556 601.086611 [57,] 1633.223685 2027.118556 [58,] -1669.309734 1633.223685 [59,] 754.039352 -1669.309734 [60,] -2971.911733 754.039352 [61,] 66.405498 -2971.911733 [62,] -1803.955524 66.405498 [63,] -3436.298526 -1803.955524 [64,] -2512.719972 -3436.298526 [65,] 1014.684495 -2512.719972 [66,] 1809.294633 1014.684495 [67,] -29.790876 1809.294633 [68,] 926.379003 -29.790876 [69,] 2922.459039 926.379003 [70,] -1917.939587 2922.459039 [71,] 657.521345 -1917.939587 [72,] -3400.315892 657.521345 [73,] 230.972211 -3400.315892 [74,] 568.565818 230.972211 [75,] -3346.369374 568.565818 [76,] -2768.202450 -3346.369374 [77,] -2029.374329 -2768.202450 [78,] 807.704375 -2029.374329 [79,] -32.125267 807.704375 [80,] 1262.140600 -32.125267 [81,] 760.373014 1262.140600 [82,] -1276.114876 760.373014 [83,] 212.284670 -1276.114876 [84,] -686.846825 212.284670 [85,] -1505.271957 -686.846825 [86,] 1177.919873 -1505.271957 [87,] -1578.837117 1177.919873 [88,] -2894.455530 -1578.837117 [89,] -1490.595853 -2894.455530 [90,] 150.637725 -1490.595853 [91,] 489.793760 150.637725 [92,] 1776.736818 489.793760 [93,] 285.232200 1776.736818 [94,] -1441.887469 285.232200 [95,] 960.749435 -1441.887469 [96,] 780.774487 960.749435 [97,] -1869.570103 780.774487 [98,] -135.720698 -1869.570103 [99,] -1330.519525 -135.720698 [100,] -2529.519488 -1330.519525 [101,] -367.242327 -2529.519488 [102,] 1144.995630 -367.242327 [103,] 968.199768 1144.995630 [104,] 1642.559101 968.199768 [105,] 1825.539960 1642.559101 [106,] 223.344127 1825.539960 [107,] 295.623161 223.344127 [108,] 773.494275 295.623161 [109,] -1305.181158 773.494275 [110,] 229.302654 -1305.181158 [111,] -1731.522174 229.302654 [112,] -724.850836 -1731.522174 [113,] -287.973229 -724.850836 [114,] 2242.283964 -287.973229 [115,] 977.873639 2242.283964 [116,] 1767.106317 977.873639 [117,] 293.491790 1767.106317 [118,] -598.791537 293.491790 [119,] 1327.500317 -598.791537 [120,] -726.740198 1327.500317 [121,] -1910.385891 -726.740198 [122,] 226.938522 -1910.385891 [123,] -2569.998398 226.938522 [124,] -1149.923810 -2569.998398 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -2129.406184 -3191.476744 2 2931.260942 -2129.406184 3 -1751.447894 2931.260942 4 512.521860 -1751.447894 5 -2754.028563 512.521860 6 2047.171992 -2754.028563 7 2478.350019 2047.171992 8 -2511.630888 2478.350019 9 2839.733363 -2511.630888 10 -1468.668921 2839.733363 11 4236.710412 -1468.668921 12 -823.403548 4236.710412 13 -755.300836 -823.403548 14 -466.275456 -755.300836 15 1064.650993 -466.275456 16 803.948969 1064.650993 17 1560.774111 803.948969 18 1828.855781 1560.774111 19 4356.219410 1828.855781 20 2990.237151 4356.219410 21 -829.910188 2990.237151 22 -1557.522120 -829.910188 23 2875.782521 -1557.522120 24 3148.458183 2875.782521 25 -1781.454182 3148.458183 26 -1540.226630 -1781.454182 27 2282.336975 -1540.226630 28 -1838.402398 2282.336975 29 -4315.230207 -1838.402398 30 8661.205687 -4315.230207 31 -1302.101294 8661.205687 32 1935.545653 -1302.101294 33 -117.645458 1935.545653 34 1013.616801 -117.645458 35 1064.185239 1013.616801 36 -961.028293 1064.185239 37 2049.590608 -961.028293 38 -1139.833334 2049.590608 39 -2314.775742 -1139.833334 40 -2232.054689 -2314.775742 41 -481.167754 -2232.054689 42 2743.969067 -481.167754 43 2541.097278 2743.969067 44 273.107940 2541.097278 45 4948.474661 273.107940 46 3.050410 4948.474661 47 -348.080871 3.050410 48 -620.143276 -348.080871 49 -1887.917395 -620.143276 50 1351.743644 -1887.917395 51 -2708.137908 1351.743644 52 -4206.530532 -2708.137908 53 -527.286228 -4206.530532 54 2234.399696 -527.286228 55 601.086611 2234.399696 56 2027.118556 601.086611 57 1633.223685 2027.118556 58 -1669.309734 1633.223685 59 754.039352 -1669.309734 60 -2971.911733 754.039352 61 66.405498 -2971.911733 62 -1803.955524 66.405498 63 -3436.298526 -1803.955524 64 -2512.719972 -3436.298526 65 1014.684495 -2512.719972 66 1809.294633 1014.684495 67 -29.790876 1809.294633 68 926.379003 -29.790876 69 2922.459039 926.379003 70 -1917.939587 2922.459039 71 657.521345 -1917.939587 72 -3400.315892 657.521345 73 230.972211 -3400.315892 74 568.565818 230.972211 75 -3346.369374 568.565818 76 -2768.202450 -3346.369374 77 -2029.374329 -2768.202450 78 807.704375 -2029.374329 79 -32.125267 807.704375 80 1262.140600 -32.125267 81 760.373014 1262.140600 82 -1276.114876 760.373014 83 212.284670 -1276.114876 84 -686.846825 212.284670 85 -1505.271957 -686.846825 86 1177.919873 -1505.271957 87 -1578.837117 1177.919873 88 -2894.455530 -1578.837117 89 -1490.595853 -2894.455530 90 150.637725 -1490.595853 91 489.793760 150.637725 92 1776.736818 489.793760 93 285.232200 1776.736818 94 -1441.887469 285.232200 95 960.749435 -1441.887469 96 780.774487 960.749435 97 -1869.570103 780.774487 98 -135.720698 -1869.570103 99 -1330.519525 -135.720698 100 -2529.519488 -1330.519525 101 -367.242327 -2529.519488 102 1144.995630 -367.242327 103 968.199768 1144.995630 104 1642.559101 968.199768 105 1825.539960 1642.559101 106 223.344127 1825.539960 107 295.623161 223.344127 108 773.494275 295.623161 109 -1305.181158 773.494275 110 229.302654 -1305.181158 111 -1731.522174 229.302654 112 -724.850836 -1731.522174 113 -287.973229 -724.850836 114 2242.283964 -287.973229 115 977.873639 2242.283964 116 1767.106317 977.873639 117 293.491790 1767.106317 118 -598.791537 293.491790 119 1327.500317 -598.791537 120 -726.740198 1327.500317 121 -1910.385891 -726.740198 122 226.938522 -1910.385891 123 -2569.998398 226.938522 124 -1149.923810 -2569.998398 > 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/freestat/rcomp/tmp/7x81l1293183464.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/freestat/rcomp/tmp/88z0o1293183464.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/freestat/rcomp/tmp/98z0o1293183464.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/freestat/rcomp/tmp/1008z91293183464.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/114ryf1293183464.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/freestat/rcomp/tmp/12w0f01293183464.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/freestat/rcomp/tmp/13l1cc1293183464.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/freestat/rcomp/tmp/14wstx1293183464.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/freestat/rcomp/tmp/15ztsl1293183464.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/freestat/rcomp/tmp/16d2pt1293183464.tab") + } > > try(system("convert tmp/1tpkf1293183464.ps tmp/1tpkf1293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/2tpkf1293183464.ps tmp/2tpkf1293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/3mgj01293183464.ps tmp/3mgj01293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/4mgj01293183464.ps tmp/4mgj01293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/5mgj01293183464.ps tmp/5mgj01293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/6x81l1293183464.ps tmp/6x81l1293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/7x81l1293183464.ps tmp/7x81l1293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/88z0o1293183464.ps tmp/88z0o1293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/98z0o1293183464.ps tmp/98z0o1293183464.png",intern=TRUE)) character(0) > try(system("convert tmp/1008z91293183464.ps tmp/1008z91293183464.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.082 2.665 7.727