R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(5 + ,13 + ,14 + ,3 + ,12 + ,18 + ,0 + ,15 + ,11 + ,7 + ,12 + ,12 + ,4 + ,10 + ,16 + ,1 + ,12 + ,18 + ,6 + ,15 + ,14 + ,3 + ,9 + ,14 + ,12 + ,12 + ,15 + ,0 + ,11 + ,15 + ,5 + ,11 + ,17 + ,6 + ,11 + ,19 + ,6 + ,15 + ,10 + ,6 + ,7 + ,16 + ,2 + ,11 + ,18 + ,1 + ,11 + ,14 + ,5 + ,10 + ,14 + ,7 + ,14 + ,17 + ,3 + ,10 + ,14 + ,3 + ,6 + ,16 + ,3 + ,11 + ,18 + ,7 + ,15 + ,11 + ,8 + ,11 + ,14 + ,6 + ,12 + ,12 + ,3 + ,14 + ,17 + ,5 + ,15 + ,9 + ,5 + ,9 + ,16 + ,10 + ,13 + ,14 + ,2 + ,13 + ,15 + ,6 + ,16 + ,11 + ,4 + ,13 + ,16 + ,6 + ,12 + ,13 + ,8 + ,14 + ,17 + ,4 + ,11 + ,15 + ,5 + ,9 + ,14 + ,10 + ,16 + ,16 + ,6 + ,12 + ,9 + ,7 + ,10 + ,15 + ,4 + ,13 + ,17 + ,10 + ,16 + ,13 + ,4 + ,14 + ,15 + ,3 + ,15 + ,16 + ,3 + ,5 + ,16 + ,3 + ,8 + ,12 + ,3 + ,11 + ,12 + ,7 + ,16 + ,11 + ,15 + ,17 + ,15 + ,0 + ,9 + ,15 + ,0 + ,9 + ,17 + ,4 + ,13 + ,13 + ,5 + ,10 + ,16 + ,5 + ,6 + ,14 + ,2 + ,12 + ,11 + ,3 + ,8 + ,12 + ,0 + ,14 + ,12 + ,9 + ,12 + ,15 + ,2 + ,11 + ,16 + ,7 + ,16 + ,15 + ,7 + ,8 + ,12 + ,0 + ,15 + ,12 + ,0 + ,7 + ,8 + ,10 + ,16 + ,13 + ,2 + ,14 + ,11 + ,1 + ,16 + ,14 + ,8 + ,9 + ,15 + ,6 + ,14 + ,10 + ,11 + ,11 + ,11 + ,3 + ,13 + ,12 + ,8 + ,15 + ,15 + ,6 + ,5 + ,15 + ,9 + ,15 + ,14 + ,9 + ,13 + ,16 + ,8 + ,11 + ,15 + ,8 + ,11 + ,15 + ,7 + ,12 + ,13 + ,6 + ,12 + ,12 + ,5 + ,12 + ,17 + ,4 + ,12 + ,13 + ,6 + ,14 + ,15 + ,3 + ,6 + ,13 + ,2 + ,7 + ,15 + ,12 + ,14 + ,16 + ,8 + ,14 + ,15 + ,5 + ,10 + ,16 + ,9 + ,13 + ,15 + ,6 + ,12 + ,14 + ,5 + ,9 + ,15 + ,2 + ,12 + ,14 + ,4 + ,16 + ,13 + ,7 + ,10 + ,7 + ,5 + ,14 + ,17 + ,6 + ,10 + ,13 + ,7 + ,16 + ,15 + ,8 + ,15 + ,14 + ,6 + ,12 + ,13 + ,0 + ,10 + ,16 + ,1 + ,8 + ,12 + ,5 + ,8 + ,14 + ,5 + ,11 + ,17 + ,5 + ,13 + ,15 + ,7 + ,16 + ,17 + ,7 + ,16 + ,12 + ,1 + ,14 + ,16 + ,3 + ,11 + ,11 + ,4 + ,4 + ,15 + ,8 + ,14 + ,9 + ,6 + ,9 + ,16 + ,6 + ,14 + ,15 + ,2 + ,8 + ,10 + ,2 + ,8 + ,10 + ,3 + ,11 + ,15 + ,3 + ,12 + ,11 + ,0 + ,11 + ,13 + ,2 + ,14 + ,14 + ,8 + ,15 + ,18 + ,8 + ,16 + ,16 + ,0 + ,16 + ,14 + ,5 + ,11 + ,14 + ,9 + ,14 + ,14 + ,6 + ,14 + ,14 + ,6 + ,12 + ,12 + ,3 + ,14 + ,14 + ,9 + ,8 + ,15 + ,7 + ,13 + ,15 + ,8 + ,16 + ,15 + ,0 + ,12 + ,13 + ,7 + ,16 + ,17 + ,0 + ,12 + ,17 + ,5 + ,11 + ,19 + ,0 + ,4 + ,15 + ,14 + ,16 + ,13 + ,5 + ,15 + ,9 + ,2 + ,10 + ,15 + ,8 + ,13 + ,15 + ,4 + ,15 + ,15 + ,2 + ,12 + ,16 + ,6 + ,14 + ,11 + ,3 + ,7 + ,14 + ,5 + ,19 + ,11 + ,9 + ,12 + ,15 + ,3 + ,12 + ,13 + ,3 + ,13 + ,15 + ,0 + ,15 + ,16 + ,10 + ,8 + ,14 + ,4 + ,12 + ,15 + ,2 + ,10 + ,16 + ,3 + ,8 + ,16 + ,10 + ,10 + ,11 + ,7 + ,15 + ,12 + ,0 + ,16 + ,9 + ,6 + ,13 + ,16 + ,8 + ,16 + ,13 + ,0 + ,9 + ,16 + ,4 + ,14 + ,12 + ,10 + ,14 + ,9 + ,5 + ,12 + ,13) + ,dim=c(3 + ,156) + ,dimnames=list(c('WP' + ,'IEP' + ,'HS') + ,1:156)) > y <- array(NA,dim=c(3,156),dimnames=list(c('WP','IEP','HS'),1:156)) > 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 = 'Do not include Seasonal Dummies' > par1 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > 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 IEP WP HS t 1 13 5 14 1 2 12 3 18 2 3 15 0 11 3 4 12 7 12 4 5 10 4 16 5 6 12 1 18 6 7 15 6 14 7 8 9 3 14 8 9 12 12 15 9 10 11 0 15 10 11 11 5 17 11 12 11 6 19 12 13 15 6 10 13 14 7 6 16 14 15 11 2 18 15 16 11 1 14 16 17 10 5 14 17 18 14 7 17 18 19 10 3 14 19 20 6 3 16 20 21 11 3 18 21 22 15 7 11 22 23 11 8 14 23 24 12 6 12 24 25 14 3 17 25 26 15 5 9 26 27 9 5 16 27 28 13 10 14 28 29 13 2 15 29 30 16 6 11 30 31 13 4 16 31 32 12 6 13 32 33 14 8 17 33 34 11 4 15 34 35 9 5 14 35 36 16 10 16 36 37 12 6 9 37 38 10 7 15 38 39 13 4 17 39 40 16 10 13 40 41 14 4 15 41 42 15 3 16 42 43 5 3 16 43 44 8 3 12 44 45 11 3 12 45 46 16 7 11 46 47 17 15 15 47 48 9 0 15 48 49 9 0 17 49 50 13 4 13 50 51 10 5 16 51 52 6 5 14 52 53 12 2 11 53 54 8 3 12 54 55 14 0 12 55 56 12 9 15 56 57 11 2 16 57 58 16 7 15 58 59 8 7 12 59 60 15 0 12 60 61 7 0 8 61 62 16 10 13 62 63 14 2 11 63 64 16 1 14 64 65 9 8 15 65 66 14 6 10 66 67 11 11 11 67 68 13 3 12 68 69 15 8 15 69 70 5 6 15 70 71 15 9 14 71 72 13 9 16 72 73 11 8 15 73 74 11 8 15 74 75 12 7 13 75 76 12 6 12 76 77 12 5 17 77 78 12 4 13 78 79 14 6 15 79 80 6 3 13 80 81 7 2 15 81 82 14 12 16 82 83 14 8 15 83 84 10 5 16 84 85 13 9 15 85 86 12 6 14 86 87 9 5 15 87 88 12 2 14 88 89 16 4 13 89 90 10 7 7 90 91 14 5 17 91 92 10 6 13 92 93 16 7 15 93 94 15 8 14 94 95 12 6 13 95 96 10 0 16 96 97 8 1 12 97 98 8 5 14 98 99 11 5 17 99 100 13 5 15 100 101 16 7 17 101 102 16 7 12 102 103 14 1 16 103 104 11 3 11 104 105 4 4 15 105 106 14 8 9 106 107 9 6 16 107 108 14 6 15 108 109 8 2 10 109 110 8 2 10 110 111 11 3 15 111 112 12 3 11 112 113 11 0 13 113 114 14 2 14 114 115 15 8 18 115 116 16 8 16 116 117 16 0 14 117 118 11 5 14 118 119 14 9 14 119 120 14 6 14 120 121 12 6 12 121 122 14 3 14 122 123 8 9 15 123 124 13 7 15 124 125 16 8 15 125 126 12 0 13 126 127 16 7 17 127 128 12 0 17 128 129 11 5 19 129 130 4 0 15 130 131 16 14 13 131 132 15 5 9 132 133 10 2 15 133 134 13 8 15 134 135 15 4 15 135 136 12 2 16 136 137 14 6 11 137 138 7 3 14 138 139 19 5 11 139 140 12 9 15 140 141 12 3 13 141 142 13 3 15 142 143 15 0 16 143 144 8 10 14 144 145 12 4 15 145 146 10 2 16 146 147 8 3 16 147 148 10 10 11 148 149 15 7 12 149 150 16 0 9 150 151 13 6 16 151 152 16 8 13 152 153 9 0 16 153 154 14 4 12 154 155 14 10 9 155 156 12 5 13 156 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) WP HS t 11.966264 0.272511 -0.115233 0.004207 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.7696 -1.5668 0.1215 2.1096 6.3540 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 11.966264 1.528418 7.829 7.8e-13 *** WP 0.272511 0.072667 3.750 0.000251 *** HS -0.115233 0.097281 -1.185 0.238048 t 0.004207 0.005035 0.836 0.404728 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.816 on 152 degrees of freedom Multiple R-squared: 0.09839, Adjusted R-squared: 0.0806 F-statistic: 5.529 on 3 and 152 DF, p-value: 0.001249 > 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.30785753 0.61571507 0.6921425 [2,] 0.43067967 0.86135934 0.5693203 [3,] 0.30724043 0.61448086 0.6927596 [4,] 0.19608896 0.39217791 0.8039110 [5,] 0.12121665 0.24243330 0.8787834 [6,] 0.07560303 0.15120606 0.9243970 [7,] 0.06360935 0.12721870 0.9363907 [8,] 0.13651418 0.27302836 0.8634858 [9,] 0.10393600 0.20787200 0.8960640 [10,] 0.06635939 0.13271877 0.9336406 [11,] 0.04381900 0.08763801 0.9561810 [12,] 0.08852950 0.17705900 0.9114705 [13,] 0.06355059 0.12710118 0.9364494 [14,] 0.11045673 0.22091346 0.8895433 [15,] 0.09705995 0.19411991 0.9029400 [16,] 0.11249364 0.22498729 0.8875064 [17,] 0.08146667 0.16293333 0.9185333 [18,] 0.05698771 0.11397542 0.9430123 [19,] 0.09668211 0.19336422 0.9033179 [20,] 0.08219872 0.16439743 0.9178013 [21,] 0.06983628 0.13967256 0.9301637 [22,] 0.05309335 0.10618671 0.9469066 [23,] 0.04675489 0.09350978 0.9532451 [24,] 0.05154310 0.10308620 0.9484569 [25,] 0.04273538 0.08547076 0.9572646 [26,] 0.03093737 0.06187474 0.9690626 [27,] 0.03081783 0.06163567 0.9691822 [28,] 0.02263314 0.04526628 0.9773669 [29,] 0.02780104 0.05560207 0.9721990 [30,] 0.03995142 0.07990284 0.9600486 [31,] 0.03426795 0.06853590 0.9657321 [32,] 0.03067703 0.06135407 0.9693230 [33,] 0.02654487 0.05308973 0.9734551 [34,] 0.02686898 0.05373796 0.9731310 [35,] 0.02415373 0.04830746 0.9758463 [36,] 0.02968394 0.05936788 0.9703161 [37,] 0.11816539 0.23633077 0.8818346 [38,] 0.15065829 0.30131659 0.8493417 [39,] 0.12324816 0.24649632 0.8767518 [40,] 0.12997241 0.25994481 0.8700276 [41,] 0.12415943 0.24831887 0.8758406 [42,] 0.10312295 0.20624591 0.8968770 [43,] 0.08263813 0.16527626 0.9173619 [44,] 0.06832782 0.13665565 0.9316722 [45,] 0.05676006 0.11352012 0.9432399 [46,] 0.12360000 0.24719999 0.8764000 [47,] 0.10143023 0.20286046 0.8985698 [48,] 0.11035911 0.22071823 0.8896409 [49,] 0.13063451 0.26126902 0.8693655 [50,] 0.10671971 0.21343943 0.8932803 [51,] 0.08763594 0.17527187 0.9123641 [52,] 0.11123871 0.22247742 0.8887613 [53,] 0.15663372 0.31326744 0.8433663 [54,] 0.20715820 0.41431639 0.7928418 [55,] 0.25197707 0.50395414 0.7480229 [56,] 0.25155244 0.50310488 0.7484476 [57,] 0.25192708 0.50385417 0.7480729 [58,] 0.36944594 0.73889187 0.6305541 [59,] 0.38983704 0.77967408 0.6101630 [60,] 0.36012201 0.72024402 0.6398780 [61,] 0.35655015 0.71310030 0.6434498 [62,] 0.33055540 0.66111080 0.6694446 [63,] 0.32760583 0.65521165 0.6723942 [64,] 0.53516120 0.92967760 0.4648388 [65,] 0.52174620 0.95650760 0.4782538 [66,] 0.47732249 0.95464499 0.5226775 [67,] 0.43946453 0.87892905 0.5605355 [68,] 0.40216542 0.80433084 0.5978346 [69,] 0.35785169 0.71570337 0.6421483 [70,] 0.31534470 0.63068940 0.6846553 [71,] 0.27921187 0.55842373 0.7207881 [72,] 0.24322590 0.48645180 0.7567741 [73,] 0.23114333 0.46228666 0.7688567 [74,] 0.31679777 0.63359554 0.6832022 [75,] 0.34084385 0.68168771 0.6591561 [76,] 0.30258807 0.60517615 0.6974119 [77,] 0.27736646 0.55473292 0.7226335 [78,] 0.24862131 0.49724262 0.7513787 [79,] 0.21408720 0.42817441 0.7859128 [80,] 0.18193744 0.36387489 0.8180626 [81,] 0.17640874 0.35281748 0.8235913 [82,] 0.15331675 0.30663350 0.8466832 [83,] 0.19817777 0.39635553 0.8018222 [84,] 0.20337563 0.40675127 0.7966244 [85,] 0.19859379 0.39718758 0.8014062 [86,] 0.18493067 0.36986135 0.8150693 [87,] 0.20939234 0.41878468 0.7906077 [88,] 0.19982523 0.39965046 0.8001748 [89,] 0.16822515 0.33645030 0.8317748 [90,] 0.14008143 0.28016286 0.8599186 [91,] 0.14105130 0.28210260 0.8589487 [92,] 0.16422699 0.32845398 0.8357730 [93,] 0.13796514 0.27593028 0.8620349 [94,] 0.11750068 0.23500136 0.8824993 [95,] 0.13901133 0.27802266 0.8609887 [96,] 0.14897024 0.29794049 0.8510298 [97,] 0.16305289 0.32610578 0.8369471 [98,] 0.13589081 0.27178163 0.8641092 [99,] 0.34872406 0.69744813 0.6512759 [100,] 0.30550015 0.61100030 0.6944999 [101,] 0.31398612 0.62797223 0.6860139 [102,] 0.28602274 0.57204548 0.7139773 [103,] 0.33571509 0.67143018 0.6642849 [104,] 0.43146648 0.86293296 0.5685335 [105,] 0.39481484 0.78962969 0.6051852 [106,] 0.36981085 0.73962170 0.6301892 [107,] 0.34902348 0.69804695 0.6509765 [108,] 0.32250643 0.64501285 0.6774936 [109,] 0.31656185 0.63312371 0.6834381 [110,] 0.33197105 0.66394211 0.6680289 [111,] 0.39290529 0.78581057 0.6070947 [112,] 0.35895283 0.71790567 0.6410472 [113,] 0.31077671 0.62155342 0.6892233 [114,] 0.27166482 0.54332965 0.7283352 [115,] 0.24127398 0.48254797 0.7587260 [116,] 0.21367875 0.42735750 0.7863213 [117,] 0.31960980 0.63921960 0.6803902 [118,] 0.26983356 0.53966712 0.7301664 [119,] 0.26796880 0.53593761 0.7320312 [120,] 0.22435243 0.44870485 0.7756476 [121,] 0.28164188 0.56328376 0.7183581 [122,] 0.25072804 0.50145609 0.7492720 [123,] 0.21915103 0.43830207 0.7808490 [124,] 0.56184071 0.87631858 0.4381593 [125,] 0.56248400 0.87503199 0.4375160 [126,] 0.50915380 0.98169241 0.4908462 [127,] 0.49213965 0.98427931 0.5078603 [128,] 0.43348824 0.86697648 0.5665118 [129,] 0.44787485 0.89574969 0.5521252 [130,] 0.38209700 0.76419401 0.6179030 [131,] 0.31337891 0.62675781 0.6866211 [132,] 0.57034524 0.85930952 0.4296548 [133,] 0.70068964 0.59862072 0.2993104 [134,] 0.64815434 0.70369132 0.3518457 [135,] 0.56942155 0.86115691 0.4305785 [136,] 0.50001773 0.99996453 0.4999823 [137,] 0.65026780 0.69946440 0.3497322 [138,] 0.65822503 0.68354994 0.3417750 [139,] 0.57749640 0.84500720 0.4225036 [140,] 0.45894845 0.91789691 0.5410515 [141,] 0.44330128 0.88660255 0.5566987 [142,] 0.88268623 0.23462754 0.1173138 [143,] 0.82833285 0.34333430 0.1716671 > postscript(file="/var/www/rcomp/tmp/1h43n1292940178.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/rcomp/tmp/2se2q1292940178.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/rcomp/tmp/3se2q1292940178.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/rcomp/tmp/4se2q1292940178.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/rcomp/tmp/5se2q1292940178.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 = 156 Frequency = 1 1 2 3 4 5 6 1.28024261 1.28198985 4.28868118 -0.50786653 -1.23360873 1.81018243 7 8 9 10 11 12 2.98248926 -2.20418620 -1.54575502 0.72016452 -0.41612877 -0.46237983 13 14 15 16 17 18 2.49631321 -4.81649403 0.49980769 0.30717785 -1.78707150 2.00940020 19 20 21 22 23 24 -1.25046465 -5.02420516 0.20205434 2.30117178 -1.62984596 -0.31949861 25 26 27 28 29 30 3.06999250 2.59889774 -2.59867619 -0.19590273 2.09520790 3.54002528 31 32 33 34 35 36 1.65700583 -0.23792235 1.67378266 -0.47084888 -2.86279988 3.00090684 37 38 39 40 41 42 -0.71989127 -2.30520907 1.73858209 2.63837837 2.49970120 3.88323794 43 44 45 46 47 48 -6.12096919 -3.58610958 -0.59031672 3.20020061 2.47684229 -1.43970650 49 50 51 52 53 54 -1.21344700 1.23137038 -1.69964736 -5.93432112 0.53330347 -3.62818090 55 56 57 58 59 60 3.18514363 -0.92595856 0.09264151 3.61064829 -4.73925879 4.16410797 61 62 63 64 65 66 -4.30103242 2.54582146 2.49123215 5.10523552 -3.69131219 1.27333522 67 68 69 70 71 72 -2.97819138 1.31291925 2.29185928 -7.16732674 1.89570115 0.12196064 73 74 75 76 77 78 -1.72496925 -1.72917638 -0.69133958 -0.53826948 0.30620052 0.11357069 79 80 81 82 83 84 1.79480907 -5.62233302 -4.12356297 0.26235766 1.23295943 -1.83848272 85 86 87 88 89 90 -0.04796539 -0.34987417 -2.96633743 0.73175379 4.06729224 -3.44584645 91 92 93 94 95 96 2.24730067 -2.49035027 3.46339867 2.07144767 -0.50297167 -0.52641552 97 98 99 100 101 102 -3.26406647 -4.12784919 -0.78635638 0.97896986 3.66020824 3.07983454 103 104 105 106 107 108 3.17162400 -0.95377082 -7.76955525 0.44479551 -3.20775731 1.67280224 109 110 111 112 113 114 -3.81752924 -3.82173637 -0.52228748 0.01257213 0.05636329 2.62236836 115 116 117 118 119 120 2.44403115 3.20935739 5.15476808 -1.21199183 0.69375881 1.50708335 121 122 123 124 125 126 -0.72759041 2.31620075 -5.20783640 0.33297758 3.05625989 1.00167057 127 128 129 130 131 132 3.55082281 1.45418957 -0.68210371 -6.78469132 1.16548713 2.15294175 133 134 135 136 137 138 -1.34233383 0.01839570 3.10423079 0.76027809 1.08986216 -4.75111336 139 140 141 142 143 144 6.35395845 -1.27935765 0.12103193 1.34729142 4.27584927 -5.68393005 145 146 147 148 149 150 0.06215947 -1.28179323 -3.55851092 -4.04645852 1.88209933 4.43976615 151 152 153 154 155 156 0.60712888 2.71220070 -1.76622205 1.67859534 -0.30637507 -0.48709616 > postscript(file="/var/www/rcomp/tmp/6kn2b1292940178.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 1.28024261 NA 1 1.28198985 1.28024261 2 4.28868118 1.28198985 3 -0.50786653 4.28868118 4 -1.23360873 -0.50786653 5 1.81018243 -1.23360873 6 2.98248926 1.81018243 7 -2.20418620 2.98248926 8 -1.54575502 -2.20418620 9 0.72016452 -1.54575502 10 -0.41612877 0.72016452 11 -0.46237983 -0.41612877 12 2.49631321 -0.46237983 13 -4.81649403 2.49631321 14 0.49980769 -4.81649403 15 0.30717785 0.49980769 16 -1.78707150 0.30717785 17 2.00940020 -1.78707150 18 -1.25046465 2.00940020 19 -5.02420516 -1.25046465 20 0.20205434 -5.02420516 21 2.30117178 0.20205434 22 -1.62984596 2.30117178 23 -0.31949861 -1.62984596 24 3.06999250 -0.31949861 25 2.59889774 3.06999250 26 -2.59867619 2.59889774 27 -0.19590273 -2.59867619 28 2.09520790 -0.19590273 29 3.54002528 2.09520790 30 1.65700583 3.54002528 31 -0.23792235 1.65700583 32 1.67378266 -0.23792235 33 -0.47084888 1.67378266 34 -2.86279988 -0.47084888 35 3.00090684 -2.86279988 36 -0.71989127 3.00090684 37 -2.30520907 -0.71989127 38 1.73858209 -2.30520907 39 2.63837837 1.73858209 40 2.49970120 2.63837837 41 3.88323794 2.49970120 42 -6.12096919 3.88323794 43 -3.58610958 -6.12096919 44 -0.59031672 -3.58610958 45 3.20020061 -0.59031672 46 2.47684229 3.20020061 47 -1.43970650 2.47684229 48 -1.21344700 -1.43970650 49 1.23137038 -1.21344700 50 -1.69964736 1.23137038 51 -5.93432112 -1.69964736 52 0.53330347 -5.93432112 53 -3.62818090 0.53330347 54 3.18514363 -3.62818090 55 -0.92595856 3.18514363 56 0.09264151 -0.92595856 57 3.61064829 0.09264151 58 -4.73925879 3.61064829 59 4.16410797 -4.73925879 60 -4.30103242 4.16410797 61 2.54582146 -4.30103242 62 2.49123215 2.54582146 63 5.10523552 2.49123215 64 -3.69131219 5.10523552 65 1.27333522 -3.69131219 66 -2.97819138 1.27333522 67 1.31291925 -2.97819138 68 2.29185928 1.31291925 69 -7.16732674 2.29185928 70 1.89570115 -7.16732674 71 0.12196064 1.89570115 72 -1.72496925 0.12196064 73 -1.72917638 -1.72496925 74 -0.69133958 -1.72917638 75 -0.53826948 -0.69133958 76 0.30620052 -0.53826948 77 0.11357069 0.30620052 78 1.79480907 0.11357069 79 -5.62233302 1.79480907 80 -4.12356297 -5.62233302 81 0.26235766 -4.12356297 82 1.23295943 0.26235766 83 -1.83848272 1.23295943 84 -0.04796539 -1.83848272 85 -0.34987417 -0.04796539 86 -2.96633743 -0.34987417 87 0.73175379 -2.96633743 88 4.06729224 0.73175379 89 -3.44584645 4.06729224 90 2.24730067 -3.44584645 91 -2.49035027 2.24730067 92 3.46339867 -2.49035027 93 2.07144767 3.46339867 94 -0.50297167 2.07144767 95 -0.52641552 -0.50297167 96 -3.26406647 -0.52641552 97 -4.12784919 -3.26406647 98 -0.78635638 -4.12784919 99 0.97896986 -0.78635638 100 3.66020824 0.97896986 101 3.07983454 3.66020824 102 3.17162400 3.07983454 103 -0.95377082 3.17162400 104 -7.76955525 -0.95377082 105 0.44479551 -7.76955525 106 -3.20775731 0.44479551 107 1.67280224 -3.20775731 108 -3.81752924 1.67280224 109 -3.82173637 -3.81752924 110 -0.52228748 -3.82173637 111 0.01257213 -0.52228748 112 0.05636329 0.01257213 113 2.62236836 0.05636329 114 2.44403115 2.62236836 115 3.20935739 2.44403115 116 5.15476808 3.20935739 117 -1.21199183 5.15476808 118 0.69375881 -1.21199183 119 1.50708335 0.69375881 120 -0.72759041 1.50708335 121 2.31620075 -0.72759041 122 -5.20783640 2.31620075 123 0.33297758 -5.20783640 124 3.05625989 0.33297758 125 1.00167057 3.05625989 126 3.55082281 1.00167057 127 1.45418957 3.55082281 128 -0.68210371 1.45418957 129 -6.78469132 -0.68210371 130 1.16548713 -6.78469132 131 2.15294175 1.16548713 132 -1.34233383 2.15294175 133 0.01839570 -1.34233383 134 3.10423079 0.01839570 135 0.76027809 3.10423079 136 1.08986216 0.76027809 137 -4.75111336 1.08986216 138 6.35395845 -4.75111336 139 -1.27935765 6.35395845 140 0.12103193 -1.27935765 141 1.34729142 0.12103193 142 4.27584927 1.34729142 143 -5.68393005 4.27584927 144 0.06215947 -5.68393005 145 -1.28179323 0.06215947 146 -3.55851092 -1.28179323 147 -4.04645852 -3.55851092 148 1.88209933 -4.04645852 149 4.43976615 1.88209933 150 0.60712888 4.43976615 151 2.71220070 0.60712888 152 -1.76622205 2.71220070 153 1.67859534 -1.76622205 154 -0.30637507 1.67859534 155 -0.48709616 -0.30637507 156 NA -0.48709616 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.28198985 1.28024261 [2,] 4.28868118 1.28198985 [3,] -0.50786653 4.28868118 [4,] -1.23360873 -0.50786653 [5,] 1.81018243 -1.23360873 [6,] 2.98248926 1.81018243 [7,] -2.20418620 2.98248926 [8,] -1.54575502 -2.20418620 [9,] 0.72016452 -1.54575502 [10,] -0.41612877 0.72016452 [11,] -0.46237983 -0.41612877 [12,] 2.49631321 -0.46237983 [13,] -4.81649403 2.49631321 [14,] 0.49980769 -4.81649403 [15,] 0.30717785 0.49980769 [16,] -1.78707150 0.30717785 [17,] 2.00940020 -1.78707150 [18,] -1.25046465 2.00940020 [19,] -5.02420516 -1.25046465 [20,] 0.20205434 -5.02420516 [21,] 2.30117178 0.20205434 [22,] -1.62984596 2.30117178 [23,] -0.31949861 -1.62984596 [24,] 3.06999250 -0.31949861 [25,] 2.59889774 3.06999250 [26,] -2.59867619 2.59889774 [27,] -0.19590273 -2.59867619 [28,] 2.09520790 -0.19590273 [29,] 3.54002528 2.09520790 [30,] 1.65700583 3.54002528 [31,] -0.23792235 1.65700583 [32,] 1.67378266 -0.23792235 [33,] -0.47084888 1.67378266 [34,] -2.86279988 -0.47084888 [35,] 3.00090684 -2.86279988 [36,] -0.71989127 3.00090684 [37,] -2.30520907 -0.71989127 [38,] 1.73858209 -2.30520907 [39,] 2.63837837 1.73858209 [40,] 2.49970120 2.63837837 [41,] 3.88323794 2.49970120 [42,] -6.12096919 3.88323794 [43,] -3.58610958 -6.12096919 [44,] -0.59031672 -3.58610958 [45,] 3.20020061 -0.59031672 [46,] 2.47684229 3.20020061 [47,] -1.43970650 2.47684229 [48,] -1.21344700 -1.43970650 [49,] 1.23137038 -1.21344700 [50,] -1.69964736 1.23137038 [51,] -5.93432112 -1.69964736 [52,] 0.53330347 -5.93432112 [53,] -3.62818090 0.53330347 [54,] 3.18514363 -3.62818090 [55,] -0.92595856 3.18514363 [56,] 0.09264151 -0.92595856 [57,] 3.61064829 0.09264151 [58,] -4.73925879 3.61064829 [59,] 4.16410797 -4.73925879 [60,] -4.30103242 4.16410797 [61,] 2.54582146 -4.30103242 [62,] 2.49123215 2.54582146 [63,] 5.10523552 2.49123215 [64,] -3.69131219 5.10523552 [65,] 1.27333522 -3.69131219 [66,] -2.97819138 1.27333522 [67,] 1.31291925 -2.97819138 [68,] 2.29185928 1.31291925 [69,] -7.16732674 2.29185928 [70,] 1.89570115 -7.16732674 [71,] 0.12196064 1.89570115 [72,] -1.72496925 0.12196064 [73,] -1.72917638 -1.72496925 [74,] -0.69133958 -1.72917638 [75,] -0.53826948 -0.69133958 [76,] 0.30620052 -0.53826948 [77,] 0.11357069 0.30620052 [78,] 1.79480907 0.11357069 [79,] -5.62233302 1.79480907 [80,] -4.12356297 -5.62233302 [81,] 0.26235766 -4.12356297 [82,] 1.23295943 0.26235766 [83,] -1.83848272 1.23295943 [84,] -0.04796539 -1.83848272 [85,] -0.34987417 -0.04796539 [86,] -2.96633743 -0.34987417 [87,] 0.73175379 -2.96633743 [88,] 4.06729224 0.73175379 [89,] -3.44584645 4.06729224 [90,] 2.24730067 -3.44584645 [91,] -2.49035027 2.24730067 [92,] 3.46339867 -2.49035027 [93,] 2.07144767 3.46339867 [94,] -0.50297167 2.07144767 [95,] -0.52641552 -0.50297167 [96,] -3.26406647 -0.52641552 [97,] -4.12784919 -3.26406647 [98,] -0.78635638 -4.12784919 [99,] 0.97896986 -0.78635638 [100,] 3.66020824 0.97896986 [101,] 3.07983454 3.66020824 [102,] 3.17162400 3.07983454 [103,] -0.95377082 3.17162400 [104,] -7.76955525 -0.95377082 [105,] 0.44479551 -7.76955525 [106,] -3.20775731 0.44479551 [107,] 1.67280224 -3.20775731 [108,] -3.81752924 1.67280224 [109,] -3.82173637 -3.81752924 [110,] -0.52228748 -3.82173637 [111,] 0.01257213 -0.52228748 [112,] 0.05636329 0.01257213 [113,] 2.62236836 0.05636329 [114,] 2.44403115 2.62236836 [115,] 3.20935739 2.44403115 [116,] 5.15476808 3.20935739 [117,] -1.21199183 5.15476808 [118,] 0.69375881 -1.21199183 [119,] 1.50708335 0.69375881 [120,] -0.72759041 1.50708335 [121,] 2.31620075 -0.72759041 [122,] -5.20783640 2.31620075 [123,] 0.33297758 -5.20783640 [124,] 3.05625989 0.33297758 [125,] 1.00167057 3.05625989 [126,] 3.55082281 1.00167057 [127,] 1.45418957 3.55082281 [128,] -0.68210371 1.45418957 [129,] -6.78469132 -0.68210371 [130,] 1.16548713 -6.78469132 [131,] 2.15294175 1.16548713 [132,] -1.34233383 2.15294175 [133,] 0.01839570 -1.34233383 [134,] 3.10423079 0.01839570 [135,] 0.76027809 3.10423079 [136,] 1.08986216 0.76027809 [137,] -4.75111336 1.08986216 [138,] 6.35395845 -4.75111336 [139,] -1.27935765 6.35395845 [140,] 0.12103193 -1.27935765 [141,] 1.34729142 0.12103193 [142,] 4.27584927 1.34729142 [143,] -5.68393005 4.27584927 [144,] 0.06215947 -5.68393005 [145,] -1.28179323 0.06215947 [146,] -3.55851092 -1.28179323 [147,] -4.04645852 -3.55851092 [148,] 1.88209933 -4.04645852 [149,] 4.43976615 1.88209933 [150,] 0.60712888 4.43976615 [151,] 2.71220070 0.60712888 [152,] -1.76622205 2.71220070 [153,] 1.67859534 -1.76622205 [154,] -0.30637507 1.67859534 [155,] -0.48709616 -0.30637507 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.28198985 1.28024261 2 4.28868118 1.28198985 3 -0.50786653 4.28868118 4 -1.23360873 -0.50786653 5 1.81018243 -1.23360873 6 2.98248926 1.81018243 7 -2.20418620 2.98248926 8 -1.54575502 -2.20418620 9 0.72016452 -1.54575502 10 -0.41612877 0.72016452 11 -0.46237983 -0.41612877 12 2.49631321 -0.46237983 13 -4.81649403 2.49631321 14 0.49980769 -4.81649403 15 0.30717785 0.49980769 16 -1.78707150 0.30717785 17 2.00940020 -1.78707150 18 -1.25046465 2.00940020 19 -5.02420516 -1.25046465 20 0.20205434 -5.02420516 21 2.30117178 0.20205434 22 -1.62984596 2.30117178 23 -0.31949861 -1.62984596 24 3.06999250 -0.31949861 25 2.59889774 3.06999250 26 -2.59867619 2.59889774 27 -0.19590273 -2.59867619 28 2.09520790 -0.19590273 29 3.54002528 2.09520790 30 1.65700583 3.54002528 31 -0.23792235 1.65700583 32 1.67378266 -0.23792235 33 -0.47084888 1.67378266 34 -2.86279988 -0.47084888 35 3.00090684 -2.86279988 36 -0.71989127 3.00090684 37 -2.30520907 -0.71989127 38 1.73858209 -2.30520907 39 2.63837837 1.73858209 40 2.49970120 2.63837837 41 3.88323794 2.49970120 42 -6.12096919 3.88323794 43 -3.58610958 -6.12096919 44 -0.59031672 -3.58610958 45 3.20020061 -0.59031672 46 2.47684229 3.20020061 47 -1.43970650 2.47684229 48 -1.21344700 -1.43970650 49 1.23137038 -1.21344700 50 -1.69964736 1.23137038 51 -5.93432112 -1.69964736 52 0.53330347 -5.93432112 53 -3.62818090 0.53330347 54 3.18514363 -3.62818090 55 -0.92595856 3.18514363 56 0.09264151 -0.92595856 57 3.61064829 0.09264151 58 -4.73925879 3.61064829 59 4.16410797 -4.73925879 60 -4.30103242 4.16410797 61 2.54582146 -4.30103242 62 2.49123215 2.54582146 63 5.10523552 2.49123215 64 -3.69131219 5.10523552 65 1.27333522 -3.69131219 66 -2.97819138 1.27333522 67 1.31291925 -2.97819138 68 2.29185928 1.31291925 69 -7.16732674 2.29185928 70 1.89570115 -7.16732674 71 0.12196064 1.89570115 72 -1.72496925 0.12196064 73 -1.72917638 -1.72496925 74 -0.69133958 -1.72917638 75 -0.53826948 -0.69133958 76 0.30620052 -0.53826948 77 0.11357069 0.30620052 78 1.79480907 0.11357069 79 -5.62233302 1.79480907 80 -4.12356297 -5.62233302 81 0.26235766 -4.12356297 82 1.23295943 0.26235766 83 -1.83848272 1.23295943 84 -0.04796539 -1.83848272 85 -0.34987417 -0.04796539 86 -2.96633743 -0.34987417 87 0.73175379 -2.96633743 88 4.06729224 0.73175379 89 -3.44584645 4.06729224 90 2.24730067 -3.44584645 91 -2.49035027 2.24730067 92 3.46339867 -2.49035027 93 2.07144767 3.46339867 94 -0.50297167 2.07144767 95 -0.52641552 -0.50297167 96 -3.26406647 -0.52641552 97 -4.12784919 -3.26406647 98 -0.78635638 -4.12784919 99 0.97896986 -0.78635638 100 3.66020824 0.97896986 101 3.07983454 3.66020824 102 3.17162400 3.07983454 103 -0.95377082 3.17162400 104 -7.76955525 -0.95377082 105 0.44479551 -7.76955525 106 -3.20775731 0.44479551 107 1.67280224 -3.20775731 108 -3.81752924 1.67280224 109 -3.82173637 -3.81752924 110 -0.52228748 -3.82173637 111 0.01257213 -0.52228748 112 0.05636329 0.01257213 113 2.62236836 0.05636329 114 2.44403115 2.62236836 115 3.20935739 2.44403115 116 5.15476808 3.20935739 117 -1.21199183 5.15476808 118 0.69375881 -1.21199183 119 1.50708335 0.69375881 120 -0.72759041 1.50708335 121 2.31620075 -0.72759041 122 -5.20783640 2.31620075 123 0.33297758 -5.20783640 124 3.05625989 0.33297758 125 1.00167057 3.05625989 126 3.55082281 1.00167057 127 1.45418957 3.55082281 128 -0.68210371 1.45418957 129 -6.78469132 -0.68210371 130 1.16548713 -6.78469132 131 2.15294175 1.16548713 132 -1.34233383 2.15294175 133 0.01839570 -1.34233383 134 3.10423079 0.01839570 135 0.76027809 3.10423079 136 1.08986216 0.76027809 137 -4.75111336 1.08986216 138 6.35395845 -4.75111336 139 -1.27935765 6.35395845 140 0.12103193 -1.27935765 141 1.34729142 0.12103193 142 4.27584927 1.34729142 143 -5.68393005 4.27584927 144 0.06215947 -5.68393005 145 -1.28179323 0.06215947 146 -3.55851092 -1.28179323 147 -4.04645852 -3.55851092 148 1.88209933 -4.04645852 149 4.43976615 1.88209933 150 0.60712888 4.43976615 151 2.71220070 0.60712888 152 -1.76622205 2.71220070 153 1.67859534 -1.76622205 154 -0.30637507 1.67859534 155 -0.48709616 -0.30637507 > 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/rcomp/tmp/7de1w1292940178.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/rcomp/tmp/8de1w1292940178.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/rcomp/tmp/9o5iz1292940178.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/rcomp/tmp/10o5iz1292940178.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11r6z51292940178.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/rcomp/tmp/12nyin1292940179.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/rcomp/tmp/131qgw1292940179.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/rcomp/tmp/14n9wk1292940179.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/rcomp/tmp/158rv81292940179.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/rcomp/tmp/16tste1292940179.tab") + } > > try(system("convert tmp/1h43n1292940178.ps tmp/1h43n1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/2se2q1292940178.ps tmp/2se2q1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/3se2q1292940178.ps tmp/3se2q1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/4se2q1292940178.ps tmp/4se2q1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/5se2q1292940178.ps tmp/5se2q1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/6kn2b1292940178.ps tmp/6kn2b1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/7de1w1292940178.ps tmp/7de1w1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/8de1w1292940178.ps tmp/8de1w1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/9o5iz1292940178.ps tmp/9o5iz1292940178.png",intern=TRUE)) character(0) > try(system("convert tmp/10o5iz1292940178.ps tmp/10o5iz1292940178.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.350 1.940 6.328