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(13 + ,14 + ,5 + ,12 + ,18 + ,3 + ,15 + ,11 + ,0 + ,12 + ,12 + ,7 + ,10 + ,16 + ,4 + ,12 + ,18 + ,1 + ,15 + ,14 + ,6 + ,9 + ,14 + ,3 + ,12 + ,15 + ,12 + ,11 + ,15 + ,0 + ,11 + ,17 + ,5 + ,11 + ,19 + ,6 + ,15 + ,10 + ,6 + ,7 + ,16 + ,6 + ,11 + ,18 + ,2 + ,11 + ,14 + ,1 + ,10 + ,14 + ,5 + ,14 + ,17 + ,7 + ,10 + ,14 + ,3 + ,6 + ,16 + ,3 + ,11 + ,18 + ,3 + ,15 + ,11 + ,7 + ,11 + ,14 + ,8 + ,12 + ,12 + ,6 + ,14 + ,17 + ,3 + ,15 + ,9 + ,5 + ,9 + ,16 + ,5 + ,13 + ,14 + ,10 + ,13 + ,15 + ,2 + ,16 + ,11 + ,6 + ,13 + ,16 + ,4 + ,12 + ,13 + ,6 + ,14 + ,17 + ,8 + ,11 + ,15 + ,4 + ,9 + ,14 + ,5 + ,16 + ,16 + ,10 + ,12 + ,9 + ,6 + ,10 + ,15 + ,7 + ,13 + ,17 + ,4 + ,16 + ,13 + ,10 + ,14 + ,15 + ,4 + ,15 + ,16 + ,3 + ,5 + ,16 + ,3 + ,8 + ,12 + ,3 + ,11 + ,12 + ,3 + ,16 + ,11 + ,7 + ,17 + ,15 + ,15 + ,9 + ,15 + ,0 + ,9 + ,17 + ,0 + ,13 + ,13 + ,4 + ,10 + ,16 + ,5 + ,6 + ,14 + ,5 + ,12 + ,11 + ,2 + ,8 + ,12 + ,3 + ,14 + ,12 + ,0 + ,12 + ,15 + ,9 + ,11 + ,16 + ,2 + ,16 + ,15 + ,7 + ,8 + ,12 + ,7 + ,15 + ,12 + ,0 + ,7 + ,8 + ,0 + ,16 + ,13 + ,10 + ,14 + ,11 + ,2 + ,16 + ,14 + ,1 + ,9 + ,15 + ,8 + ,14 + ,10 + ,6 + ,11 + ,11 + ,11 + ,13 + ,12 + ,3 + ,15 + ,15 + ,8 + ,5 + ,15 + ,6 + ,15 + ,14 + ,9 + ,13 + ,16 + ,9 + ,11 + ,15 + ,8 + ,11 + ,15 + ,8 + ,12 + ,13 + ,7 + ,12 + ,12 + ,6 + ,12 + ,17 + ,5 + ,12 + ,13 + ,4 + ,14 + ,15 + ,6 + ,6 + ,13 + ,3 + ,7 + ,15 + ,2 + ,14 + ,16 + ,12 + ,14 + ,15 + ,8 + ,10 + ,16 + ,5 + ,13 + ,15 + ,9 + ,12 + ,14 + ,6 + ,9 + ,15 + ,5 + ,12 + ,14 + ,2 + ,16 + ,13 + ,4 + ,10 + ,7 + ,7 + ,14 + ,17 + ,5 + ,10 + ,13 + ,6 + ,16 + ,15 + ,7 + ,15 + ,14 + ,8 + ,12 + ,13 + ,6 + ,10 + ,16 + ,0 + ,8 + ,12 + ,1 + ,8 + ,14 + ,5 + ,11 + ,17 + ,5 + ,13 + ,15 + ,5 + ,16 + ,17 + ,7 + ,16 + ,12 + ,7 + ,14 + ,16 + ,1 + ,11 + ,11 + ,3 + ,4 + ,15 + ,4 + ,14 + ,9 + ,8 + ,9 + ,16 + ,6 + ,14 + ,15 + ,6 + ,8 + ,10 + ,2 + ,8 + ,10 + ,2 + ,11 + ,15 + ,3 + ,12 + ,11 + ,3 + ,11 + ,13 + ,0 + ,14 + ,14 + ,2 + ,15 + ,18 + ,8 + ,16 + ,16 + ,8 + ,16 + ,14 + ,0 + ,11 + ,14 + ,5 + ,14 + ,14 + ,9 + ,14 + ,14 + ,6 + ,12 + ,12 + ,6 + ,14 + ,14 + ,3 + ,8 + ,15 + ,9 + ,13 + ,15 + ,7 + ,16 + ,15 + ,8 + ,12 + ,13 + ,0 + ,16 + ,17 + ,7 + ,12 + ,17 + ,0 + ,11 + ,19 + ,5 + ,4 + ,15 + ,0 + ,16 + ,13 + ,14 + ,15 + ,9 + ,5 + ,10 + ,15 + ,2 + ,13 + ,15 + ,8 + ,15 + ,15 + ,4 + ,12 + ,16 + ,2 + ,14 + ,11 + ,6 + ,7 + ,14 + ,3 + ,19 + ,11 + ,5 + ,12 + ,15 + ,9 + ,12 + ,13 + ,3 + ,13 + ,15 + ,3 + ,15 + ,16 + ,0 + ,8 + ,14 + ,10 + ,12 + ,15 + ,4 + ,10 + ,16 + ,2 + ,8 + ,16 + ,3 + ,10 + ,11 + ,10 + ,15 + ,12 + ,7 + ,16 + ,9 + ,0 + ,13 + ,16 + ,6 + ,16 + ,13 + ,8 + ,9 + ,16 + ,0 + ,14 + ,12 + ,4 + ,14 + ,9 + ,10 + ,12 + ,13 + ,5) + ,dim=c(3 + ,156) + ,dimnames=list(c('IEP' + ,'HS' + ,'WP') + ,1:156)) > y <- array(NA,dim=c(3,156),dimnames=list(c('IEP','HS','WP'),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 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 HS IEP WP t 1 14 13 5 1 2 18 12 3 2 3 11 15 0 3 4 12 12 7 4 5 16 10 4 5 6 18 12 1 6 7 14 15 6 7 8 14 9 3 8 9 15 12 12 9 10 15 11 0 10 11 17 11 5 11 12 19 11 6 12 13 10 15 6 13 14 16 7 6 14 15 18 11 2 15 16 14 11 1 16 17 14 10 5 17 18 17 14 7 18 19 14 10 3 19 20 16 6 3 20 21 18 11 3 21 22 11 15 7 22 23 14 11 8 23 24 12 12 6 24 25 17 14 3 25 26 9 15 5 26 27 16 9 5 27 28 14 13 10 28 29 15 13 2 29 30 11 16 6 30 31 16 13 4 31 32 13 12 6 32 33 17 14 8 33 34 15 11 4 34 35 14 9 5 35 36 16 16 10 36 37 9 12 6 37 38 15 10 7 38 39 17 13 4 39 40 13 16 10 40 41 15 14 4 41 42 16 15 3 42 43 16 5 3 43 44 12 8 3 44 45 12 11 3 45 46 11 16 7 46 47 15 17 15 47 48 15 9 0 48 49 17 9 0 49 50 13 13 4 50 51 16 10 5 51 52 14 6 5 52 53 11 12 2 53 54 12 8 3 54 55 12 14 0 55 56 15 12 9 56 57 16 11 2 57 58 15 16 7 58 59 12 8 7 59 60 12 15 0 60 61 8 7 0 61 62 13 16 10 62 63 11 14 2 63 64 14 16 1 64 65 15 9 8 65 66 10 14 6 66 67 11 11 11 67 68 12 13 3 68 69 15 15 8 69 70 15 5 6 70 71 14 15 9 71 72 16 13 9 72 73 15 11 8 73 74 15 11 8 74 75 13 12 7 75 76 12 12 6 76 77 17 12 5 77 78 13 12 4 78 79 15 14 6 79 80 13 6 3 80 81 15 7 2 81 82 16 14 12 82 83 15 14 8 83 84 16 10 5 84 85 15 13 9 85 86 14 12 6 86 87 15 9 5 87 88 14 12 2 88 89 13 16 4 89 90 7 10 7 90 91 17 14 5 91 92 13 10 6 92 93 15 16 7 93 94 14 15 8 94 95 13 12 6 95 96 16 10 0 96 97 12 8 1 97 98 14 8 5 98 99 17 11 5 99 100 15 13 5 100 101 17 16 7 101 102 12 16 7 102 103 16 14 1 103 104 11 11 3 104 105 15 4 4 105 106 9 14 8 106 107 16 9 6 107 108 15 14 6 108 109 10 8 2 109 110 10 8 2 110 111 15 11 3 111 112 11 12 3 112 113 13 11 0 113 114 14 14 2 114 115 18 15 8 115 116 16 16 8 116 117 14 16 0 117 118 14 11 5 118 119 14 14 9 119 120 14 14 6 120 121 12 12 6 121 122 14 14 3 122 123 15 8 9 123 124 15 13 7 124 125 15 16 8 125 126 13 12 0 126 127 17 16 7 127 128 17 12 0 128 129 19 11 5 129 130 15 4 0 130 131 13 16 14 131 132 9 15 5 132 133 15 10 2 133 134 15 13 8 134 135 15 15 4 135 136 16 12 2 136 137 11 14 6 137 138 14 7 3 138 139 11 19 5 139 140 15 12 9 140 141 13 12 3 141 142 15 13 3 142 143 16 15 0 143 144 14 8 10 144 145 15 12 4 145 146 16 10 2 146 147 16 8 3 147 148 11 10 10 148 149 12 15 7 149 150 9 16 0 150 151 16 13 6 151 152 13 16 8 152 153 16 9 0 153 154 12 14 4 154 155 9 14 10 155 156 13 12 5 156 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) IEP WP t 15.352157 -0.079376 0.009400 -0.005156 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.1602 -1.4654 0.3546 1.4626 5.1391 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 15.352157 0.841111 18.252 <2e-16 *** IEP -0.079376 0.067010 -1.185 0.238 WP 0.009400 0.063034 0.149 0.882 t -0.005156 0.004168 -1.237 0.218 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.337 on 152 degrees of freedom Multiple R-squared: 0.02078, Adjusted R-squared: 0.001454 F-statistic: 1.075 on 3 and 152 DF, p-value: 0.3615 > 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.8098703 0.3802595 0.1901297 [2,] 0.8489848 0.3020304 0.1510152 [3,] 0.7802105 0.4395789 0.2197895 [4,] 0.6806848 0.6386305 0.3193152 [5,] 0.6240859 0.7518283 0.3759141 [6,] 0.6675690 0.6648620 0.3324310 [7,] 0.7605468 0.4789065 0.2394532 [8,] 0.7412305 0.5175391 0.2587695 [9,] 0.7439406 0.5121187 0.2560594 [10,] 0.7081684 0.5836632 0.2918316 [11,] 0.6669604 0.6660791 0.3330396 [12,] 0.7258970 0.5482060 0.2741030 [13,] 0.6972803 0.6054394 0.3027197 [14,] 0.6476550 0.7046900 0.3523450 [15,] 0.6740828 0.6518345 0.3259172 [16,] 0.6911699 0.6176602 0.3088301 [17,] 0.6335665 0.7328670 0.3664335 [18,] 0.6200770 0.7598459 0.3799230 [19,] 0.6805113 0.6389774 0.3194887 [20,] 0.7820436 0.4359127 0.2179564 [21,] 0.7407837 0.5184327 0.2592163 [22,] 0.6940473 0.6119055 0.3059527 [23,] 0.6507067 0.6985866 0.3492933 [24,] 0.6172996 0.7654008 0.3827004 [25,] 0.6119145 0.7761709 0.3880855 [26,] 0.5655261 0.8689477 0.4344739 [27,] 0.6547518 0.6904964 0.3452482 [28,] 0.6027440 0.7945119 0.3972560 [29,] 0.5711567 0.8576866 0.4288433 [30,] 0.6173769 0.7652462 0.3826231 [31,] 0.7939239 0.4121521 0.2060761 [32,] 0.7551348 0.4897304 0.2448652 [33,] 0.7864953 0.4270095 0.2135047 [34,] 0.7467420 0.5065161 0.2532580 [35,] 0.7145496 0.5709009 0.2854504 [36,] 0.7116713 0.5766575 0.2883287 [37,] 0.6812944 0.6374112 0.3187056 [38,] 0.7170584 0.5658832 0.2829416 [39,] 0.7120264 0.5759472 0.2879736 [40,] 0.7024353 0.5951293 0.2975647 [41,] 0.6969072 0.6061856 0.3030928 [42,] 0.6565917 0.6868167 0.3434083 [43,] 0.6699606 0.6600788 0.3300394 [44,] 0.6278842 0.7442317 0.3721158 [45,] 0.6082699 0.7834601 0.3917301 [46,] 0.5740626 0.8518749 0.4259374 [47,] 0.5921265 0.8157470 0.4078735 [48,] 0.5899905 0.8200190 0.4100095 [49,] 0.5535511 0.8928978 0.4464489 [50,] 0.5213867 0.9572266 0.4786133 [51,] 0.5210440 0.9579120 0.4789560 [52,] 0.5066269 0.9867463 0.4933731 [53,] 0.5030041 0.9939917 0.4969959 [54,] 0.4656620 0.9313241 0.5343380 [55,] 0.7171987 0.5656025 0.2828013 [56,] 0.6777171 0.6445658 0.3222829 [57,] 0.6748458 0.6503083 0.3251542 [58,] 0.6469584 0.7060832 0.3530416 [59,] 0.6136356 0.7727287 0.3863644 [60,] 0.6620697 0.6758606 0.3379303 [61,] 0.6767844 0.6464313 0.3232156 [62,] 0.6566535 0.6866929 0.3433465 [63,] 0.6460012 0.7079976 0.3539988 [64,] 0.6082633 0.7834734 0.3917367 [65,] 0.5733569 0.8532861 0.4266431 [66,] 0.5810303 0.8379394 0.4189697 [67,] 0.5496510 0.9006980 0.4503490 [68,] 0.5170699 0.9658602 0.4829301 [69,] 0.4768533 0.9537066 0.5231467 [70,] 0.4579159 0.9158319 0.5420841 [71,] 0.5096201 0.9807598 0.4903799 [72,] 0.4707834 0.9415667 0.5292166 [73,] 0.4456977 0.8913954 0.5543023 [74,] 0.4128272 0.8256544 0.5871728 [75,] 0.3759180 0.7518360 0.6240820 [76,] 0.3748889 0.7497778 0.6251111 [77,] 0.3473220 0.6946440 0.6526780 [78,] 0.3387199 0.6774397 0.6612801 [79,] 0.3094710 0.6189420 0.6905290 [80,] 0.2701698 0.5403397 0.7298302 [81,] 0.2398058 0.4796116 0.7601942 [82,] 0.2066424 0.4132848 0.7933576 [83,] 0.1774382 0.3548764 0.8225618 [84,] 0.4956138 0.9912276 0.5043862 [85,] 0.5422186 0.9155629 0.4577814 [86,] 0.5053376 0.9893248 0.4946624 [87,] 0.4762470 0.9524941 0.5237530 [88,] 0.4306843 0.8613687 0.5693157 [89,] 0.3921571 0.7843142 0.6078429 [90,] 0.3803924 0.7607849 0.6196076 [91,] 0.3769223 0.7538445 0.6230777 [92,] 0.3342962 0.6685923 0.6657038 [93,] 0.3598085 0.7196170 0.6401915 [94,] 0.3265232 0.6530463 0.6734768 [95,] 0.3790103 0.7580206 0.6209897 [96,] 0.3498138 0.6996276 0.6501862 [97,] 0.3486902 0.6973804 0.6513098 [98,] 0.3718694 0.7437388 0.6281306 [99,] 0.3276790 0.6553580 0.6723210 [100,] 0.4763649 0.9527299 0.5236351 [101,] 0.4520038 0.9040076 0.5479962 [102,] 0.4143202 0.8286404 0.5856798 [103,] 0.5481996 0.9036008 0.4518004 [104,] 0.7277553 0.5444895 0.2722447 [105,] 0.6892821 0.6214358 0.3107179 [106,] 0.7716954 0.4566092 0.2283046 [107,] 0.7852699 0.4294601 0.2147301 [108,] 0.7590614 0.4818773 0.2409386 [109,] 0.8275588 0.3448823 0.1724412 [110,] 0.8247510 0.3504980 0.1752490 [111,] 0.7904301 0.4191399 0.2095699 [112,] 0.7607819 0.4784362 0.2392181 [113,] 0.7149275 0.5701449 0.2850725 [114,] 0.6671772 0.6656455 0.3328228 [115,] 0.7023967 0.5952067 0.2976033 [116,] 0.6628654 0.6742692 0.3371346 [117,] 0.6195890 0.7608221 0.3804110 [118,] 0.5651381 0.8697238 0.4348619 [119,] 0.5173035 0.9653930 0.4826965 [120,] 0.5408061 0.9183878 0.4591939 [121,] 0.5958345 0.8083310 0.4041655 [122,] 0.5775233 0.8449535 0.4224767 [123,] 0.7453736 0.5092528 0.2546264 [124,] 0.7524787 0.4950426 0.2475213 [125,] 0.7341234 0.5317531 0.2658766 [126,] 0.8789655 0.2420690 0.1210345 [127,] 0.8499187 0.3001627 0.1500813 [128,] 0.8212471 0.3575057 0.1787529 [129,] 0.7928429 0.4143141 0.2071571 [130,] 0.7570639 0.4858721 0.2429361 [131,] 0.7580925 0.4838151 0.2419075 [132,] 0.7989163 0.4021674 0.2010837 [133,] 0.7519092 0.4961817 0.2480908 [134,] 0.7029485 0.5941029 0.2970515 [135,] 0.6969790 0.6060421 0.3030210 [136,] 0.6102649 0.7794702 0.3897351 [137,] 0.5706458 0.8587084 0.4293542 [138,] 0.4803217 0.9606435 0.5196783 [139,] 0.3919387 0.7838774 0.6080613 [140,] 0.3080751 0.6161503 0.6919249 [141,] 0.2179239 0.4358478 0.7820761 [142,] 0.4410936 0.8821871 0.5589064 [143,] 0.3748516 0.7497032 0.6251484 > postscript(file="/var/www/html/freestat/rcomp/tmp/1ptt41292935039.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/2ikap1292935039.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/3ikap1292935039.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/4ikap1292935039.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/5bcrs1292935039.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 -0.36211669 3.58246398 -3.14605192 -2.44482497 1.42978014 3.62188844 7 8 9 10 11 12 -0.18182935 -0.62472743 0.53395384 0.57253687 2.53069168 4.52644744 13 14 15 16 17 18 -4.15089337 1.21925625 3.57951638 -0.40592739 -0.51774813 2.78611058 19 20 21 22 23 24 -0.48863567 1.19901714 3.60105212 -3.11388964 -0.43563707 -2.33230480 25 26 27 28 29 30 2.85980350 -5.07446518 1.45443603 -0.26990596 0.81045192 -2.98386564 31 32 33 34 35 36 1.80196344 -1.29105683 2.85405029 0.65867984 -0.50431599 2.00946940 37 38 39 40 41 42 -5.26527685 0.57172732 2.84321141 -0.96990662 0.93289920 2.02683123 43 44 45 46 47 48 1.23822926 -2.51848735 -2.27520396 -2.91076993 1.09855998 0.60971314 49 50 51 52 53 54 2.61486914 -1.10007262 1.65755575 -0.65479144 -3.14517996 -2.46692739 55 56 57 58 59 60 -1.95731590 0.80448638 1.79606823 1.15110203 -2.47874835 -1.85216012 61 62 63 64 65 66 -6.48201050 -0.85647469 -2.93486840 0.23843942 0.62216319 -3.95700136 67 68 69 70 71 72 -3.23697393 -1.99786445 1.11904196 0.34924046 0.11995372 1.96635812 73 74 75 76 77 78 0.82216276 0.82731875 -1.07874922 -2.06419298 2.95036325 -1.03508052 79 80 81 82 83 84 1.11002660 -1.49162307 0.60230896 2.06909317 1.11185011 1.82770363 85 86 87 88 89 90 1.03338607 -0.01263302 0.76379582 0.03527992 -0.66086137 -7.16016086 91 92 93 94 95 96 3.18129879 -1.14044863 1.33156191 0.24794187 -0.96622905 1.93657677 97 98 99 100 101 102 -2.22641906 -0.25886401 2.98441937 1.14832696 3.37280988 -1.62203413 103 104 105 106 107 108 2.28077169 -2.97100017 0.46912501 -4.76956197 1.85751552 1.25955050 109 110 111 112 113 114 -4.17394734 -4.16879135 1.06509180 -2.85037640 -0.89639550 0.32808742 115 116 117 118 119 120 4.35621780 2.44074959 0.52110747 0.08238331 0.28806575 0.32142245 121 122 123 124 125 126 -1.83217314 0.35993515 0.83243496 1.25327041 1.48715356 -0.74999174 127 128 129 130 131 132 3.50686579 3.26032025 5.13909927 0.63562587 -0.53831188 -4.52792956 133 134 135 136 137 138 1.10854817 1.29543014 1.49693867 2.28276775 -2.59092561 -0.11319948 139 140 141 142 143 144 -2.17433439 1.23759008 -0.70085250 1.38367929 2.57578759 -0.06868935 145 146 147 148 149 150 1.31037125 2.17557612 2.01258029 -2.88931377 -1.45907809 -4.30874464 151 152 153 154 155 156 2.40188255 -0.37363454 2.15109277 -1.48447319 -4.53571861 -0.64231303 > postscript(file="/var/www/html/freestat/rcomp/tmp/6bcrs1292935039.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 -0.36211669 NA 1 3.58246398 -0.36211669 2 -3.14605192 3.58246398 3 -2.44482497 -3.14605192 4 1.42978014 -2.44482497 5 3.62188844 1.42978014 6 -0.18182935 3.62188844 7 -0.62472743 -0.18182935 8 0.53395384 -0.62472743 9 0.57253687 0.53395384 10 2.53069168 0.57253687 11 4.52644744 2.53069168 12 -4.15089337 4.52644744 13 1.21925625 -4.15089337 14 3.57951638 1.21925625 15 -0.40592739 3.57951638 16 -0.51774813 -0.40592739 17 2.78611058 -0.51774813 18 -0.48863567 2.78611058 19 1.19901714 -0.48863567 20 3.60105212 1.19901714 21 -3.11388964 3.60105212 22 -0.43563707 -3.11388964 23 -2.33230480 -0.43563707 24 2.85980350 -2.33230480 25 -5.07446518 2.85980350 26 1.45443603 -5.07446518 27 -0.26990596 1.45443603 28 0.81045192 -0.26990596 29 -2.98386564 0.81045192 30 1.80196344 -2.98386564 31 -1.29105683 1.80196344 32 2.85405029 -1.29105683 33 0.65867984 2.85405029 34 -0.50431599 0.65867984 35 2.00946940 -0.50431599 36 -5.26527685 2.00946940 37 0.57172732 -5.26527685 38 2.84321141 0.57172732 39 -0.96990662 2.84321141 40 0.93289920 -0.96990662 41 2.02683123 0.93289920 42 1.23822926 2.02683123 43 -2.51848735 1.23822926 44 -2.27520396 -2.51848735 45 -2.91076993 -2.27520396 46 1.09855998 -2.91076993 47 0.60971314 1.09855998 48 2.61486914 0.60971314 49 -1.10007262 2.61486914 50 1.65755575 -1.10007262 51 -0.65479144 1.65755575 52 -3.14517996 -0.65479144 53 -2.46692739 -3.14517996 54 -1.95731590 -2.46692739 55 0.80448638 -1.95731590 56 1.79606823 0.80448638 57 1.15110203 1.79606823 58 -2.47874835 1.15110203 59 -1.85216012 -2.47874835 60 -6.48201050 -1.85216012 61 -0.85647469 -6.48201050 62 -2.93486840 -0.85647469 63 0.23843942 -2.93486840 64 0.62216319 0.23843942 65 -3.95700136 0.62216319 66 -3.23697393 -3.95700136 67 -1.99786445 -3.23697393 68 1.11904196 -1.99786445 69 0.34924046 1.11904196 70 0.11995372 0.34924046 71 1.96635812 0.11995372 72 0.82216276 1.96635812 73 0.82731875 0.82216276 74 -1.07874922 0.82731875 75 -2.06419298 -1.07874922 76 2.95036325 -2.06419298 77 -1.03508052 2.95036325 78 1.11002660 -1.03508052 79 -1.49162307 1.11002660 80 0.60230896 -1.49162307 81 2.06909317 0.60230896 82 1.11185011 2.06909317 83 1.82770363 1.11185011 84 1.03338607 1.82770363 85 -0.01263302 1.03338607 86 0.76379582 -0.01263302 87 0.03527992 0.76379582 88 -0.66086137 0.03527992 89 -7.16016086 -0.66086137 90 3.18129879 -7.16016086 91 -1.14044863 3.18129879 92 1.33156191 -1.14044863 93 0.24794187 1.33156191 94 -0.96622905 0.24794187 95 1.93657677 -0.96622905 96 -2.22641906 1.93657677 97 -0.25886401 -2.22641906 98 2.98441937 -0.25886401 99 1.14832696 2.98441937 100 3.37280988 1.14832696 101 -1.62203413 3.37280988 102 2.28077169 -1.62203413 103 -2.97100017 2.28077169 104 0.46912501 -2.97100017 105 -4.76956197 0.46912501 106 1.85751552 -4.76956197 107 1.25955050 1.85751552 108 -4.17394734 1.25955050 109 -4.16879135 -4.17394734 110 1.06509180 -4.16879135 111 -2.85037640 1.06509180 112 -0.89639550 -2.85037640 113 0.32808742 -0.89639550 114 4.35621780 0.32808742 115 2.44074959 4.35621780 116 0.52110747 2.44074959 117 0.08238331 0.52110747 118 0.28806575 0.08238331 119 0.32142245 0.28806575 120 -1.83217314 0.32142245 121 0.35993515 -1.83217314 122 0.83243496 0.35993515 123 1.25327041 0.83243496 124 1.48715356 1.25327041 125 -0.74999174 1.48715356 126 3.50686579 -0.74999174 127 3.26032025 3.50686579 128 5.13909927 3.26032025 129 0.63562587 5.13909927 130 -0.53831188 0.63562587 131 -4.52792956 -0.53831188 132 1.10854817 -4.52792956 133 1.29543014 1.10854817 134 1.49693867 1.29543014 135 2.28276775 1.49693867 136 -2.59092561 2.28276775 137 -0.11319948 -2.59092561 138 -2.17433439 -0.11319948 139 1.23759008 -2.17433439 140 -0.70085250 1.23759008 141 1.38367929 -0.70085250 142 2.57578759 1.38367929 143 -0.06868935 2.57578759 144 1.31037125 -0.06868935 145 2.17557612 1.31037125 146 2.01258029 2.17557612 147 -2.88931377 2.01258029 148 -1.45907809 -2.88931377 149 -4.30874464 -1.45907809 150 2.40188255 -4.30874464 151 -0.37363454 2.40188255 152 2.15109277 -0.37363454 153 -1.48447319 2.15109277 154 -4.53571861 -1.48447319 155 -0.64231303 -4.53571861 156 NA -0.64231303 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.58246398 -0.36211669 [2,] -3.14605192 3.58246398 [3,] -2.44482497 -3.14605192 [4,] 1.42978014 -2.44482497 [5,] 3.62188844 1.42978014 [6,] -0.18182935 3.62188844 [7,] -0.62472743 -0.18182935 [8,] 0.53395384 -0.62472743 [9,] 0.57253687 0.53395384 [10,] 2.53069168 0.57253687 [11,] 4.52644744 2.53069168 [12,] -4.15089337 4.52644744 [13,] 1.21925625 -4.15089337 [14,] 3.57951638 1.21925625 [15,] -0.40592739 3.57951638 [16,] -0.51774813 -0.40592739 [17,] 2.78611058 -0.51774813 [18,] -0.48863567 2.78611058 [19,] 1.19901714 -0.48863567 [20,] 3.60105212 1.19901714 [21,] -3.11388964 3.60105212 [22,] -0.43563707 -3.11388964 [23,] -2.33230480 -0.43563707 [24,] 2.85980350 -2.33230480 [25,] -5.07446518 2.85980350 [26,] 1.45443603 -5.07446518 [27,] -0.26990596 1.45443603 [28,] 0.81045192 -0.26990596 [29,] -2.98386564 0.81045192 [30,] 1.80196344 -2.98386564 [31,] -1.29105683 1.80196344 [32,] 2.85405029 -1.29105683 [33,] 0.65867984 2.85405029 [34,] -0.50431599 0.65867984 [35,] 2.00946940 -0.50431599 [36,] -5.26527685 2.00946940 [37,] 0.57172732 -5.26527685 [38,] 2.84321141 0.57172732 [39,] -0.96990662 2.84321141 [40,] 0.93289920 -0.96990662 [41,] 2.02683123 0.93289920 [42,] 1.23822926 2.02683123 [43,] -2.51848735 1.23822926 [44,] -2.27520396 -2.51848735 [45,] -2.91076993 -2.27520396 [46,] 1.09855998 -2.91076993 [47,] 0.60971314 1.09855998 [48,] 2.61486914 0.60971314 [49,] -1.10007262 2.61486914 [50,] 1.65755575 -1.10007262 [51,] -0.65479144 1.65755575 [52,] -3.14517996 -0.65479144 [53,] -2.46692739 -3.14517996 [54,] -1.95731590 -2.46692739 [55,] 0.80448638 -1.95731590 [56,] 1.79606823 0.80448638 [57,] 1.15110203 1.79606823 [58,] -2.47874835 1.15110203 [59,] -1.85216012 -2.47874835 [60,] -6.48201050 -1.85216012 [61,] -0.85647469 -6.48201050 [62,] -2.93486840 -0.85647469 [63,] 0.23843942 -2.93486840 [64,] 0.62216319 0.23843942 [65,] -3.95700136 0.62216319 [66,] -3.23697393 -3.95700136 [67,] -1.99786445 -3.23697393 [68,] 1.11904196 -1.99786445 [69,] 0.34924046 1.11904196 [70,] 0.11995372 0.34924046 [71,] 1.96635812 0.11995372 [72,] 0.82216276 1.96635812 [73,] 0.82731875 0.82216276 [74,] -1.07874922 0.82731875 [75,] -2.06419298 -1.07874922 [76,] 2.95036325 -2.06419298 [77,] -1.03508052 2.95036325 [78,] 1.11002660 -1.03508052 [79,] -1.49162307 1.11002660 [80,] 0.60230896 -1.49162307 [81,] 2.06909317 0.60230896 [82,] 1.11185011 2.06909317 [83,] 1.82770363 1.11185011 [84,] 1.03338607 1.82770363 [85,] -0.01263302 1.03338607 [86,] 0.76379582 -0.01263302 [87,] 0.03527992 0.76379582 [88,] -0.66086137 0.03527992 [89,] -7.16016086 -0.66086137 [90,] 3.18129879 -7.16016086 [91,] -1.14044863 3.18129879 [92,] 1.33156191 -1.14044863 [93,] 0.24794187 1.33156191 [94,] -0.96622905 0.24794187 [95,] 1.93657677 -0.96622905 [96,] -2.22641906 1.93657677 [97,] -0.25886401 -2.22641906 [98,] 2.98441937 -0.25886401 [99,] 1.14832696 2.98441937 [100,] 3.37280988 1.14832696 [101,] -1.62203413 3.37280988 [102,] 2.28077169 -1.62203413 [103,] -2.97100017 2.28077169 [104,] 0.46912501 -2.97100017 [105,] -4.76956197 0.46912501 [106,] 1.85751552 -4.76956197 [107,] 1.25955050 1.85751552 [108,] -4.17394734 1.25955050 [109,] -4.16879135 -4.17394734 [110,] 1.06509180 -4.16879135 [111,] -2.85037640 1.06509180 [112,] -0.89639550 -2.85037640 [113,] 0.32808742 -0.89639550 [114,] 4.35621780 0.32808742 [115,] 2.44074959 4.35621780 [116,] 0.52110747 2.44074959 [117,] 0.08238331 0.52110747 [118,] 0.28806575 0.08238331 [119,] 0.32142245 0.28806575 [120,] -1.83217314 0.32142245 [121,] 0.35993515 -1.83217314 [122,] 0.83243496 0.35993515 [123,] 1.25327041 0.83243496 [124,] 1.48715356 1.25327041 [125,] -0.74999174 1.48715356 [126,] 3.50686579 -0.74999174 [127,] 3.26032025 3.50686579 [128,] 5.13909927 3.26032025 [129,] 0.63562587 5.13909927 [130,] -0.53831188 0.63562587 [131,] -4.52792956 -0.53831188 [132,] 1.10854817 -4.52792956 [133,] 1.29543014 1.10854817 [134,] 1.49693867 1.29543014 [135,] 2.28276775 1.49693867 [136,] -2.59092561 2.28276775 [137,] -0.11319948 -2.59092561 [138,] -2.17433439 -0.11319948 [139,] 1.23759008 -2.17433439 [140,] -0.70085250 1.23759008 [141,] 1.38367929 -0.70085250 [142,] 2.57578759 1.38367929 [143,] -0.06868935 2.57578759 [144,] 1.31037125 -0.06868935 [145,] 2.17557612 1.31037125 [146,] 2.01258029 2.17557612 [147,] -2.88931377 2.01258029 [148,] -1.45907809 -2.88931377 [149,] -4.30874464 -1.45907809 [150,] 2.40188255 -4.30874464 [151,] -0.37363454 2.40188255 [152,] 2.15109277 -0.37363454 [153,] -1.48447319 2.15109277 [154,] -4.53571861 -1.48447319 [155,] -0.64231303 -4.53571861 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.58246398 -0.36211669 2 -3.14605192 3.58246398 3 -2.44482497 -3.14605192 4 1.42978014 -2.44482497 5 3.62188844 1.42978014 6 -0.18182935 3.62188844 7 -0.62472743 -0.18182935 8 0.53395384 -0.62472743 9 0.57253687 0.53395384 10 2.53069168 0.57253687 11 4.52644744 2.53069168 12 -4.15089337 4.52644744 13 1.21925625 -4.15089337 14 3.57951638 1.21925625 15 -0.40592739 3.57951638 16 -0.51774813 -0.40592739 17 2.78611058 -0.51774813 18 -0.48863567 2.78611058 19 1.19901714 -0.48863567 20 3.60105212 1.19901714 21 -3.11388964 3.60105212 22 -0.43563707 -3.11388964 23 -2.33230480 -0.43563707 24 2.85980350 -2.33230480 25 -5.07446518 2.85980350 26 1.45443603 -5.07446518 27 -0.26990596 1.45443603 28 0.81045192 -0.26990596 29 -2.98386564 0.81045192 30 1.80196344 -2.98386564 31 -1.29105683 1.80196344 32 2.85405029 -1.29105683 33 0.65867984 2.85405029 34 -0.50431599 0.65867984 35 2.00946940 -0.50431599 36 -5.26527685 2.00946940 37 0.57172732 -5.26527685 38 2.84321141 0.57172732 39 -0.96990662 2.84321141 40 0.93289920 -0.96990662 41 2.02683123 0.93289920 42 1.23822926 2.02683123 43 -2.51848735 1.23822926 44 -2.27520396 -2.51848735 45 -2.91076993 -2.27520396 46 1.09855998 -2.91076993 47 0.60971314 1.09855998 48 2.61486914 0.60971314 49 -1.10007262 2.61486914 50 1.65755575 -1.10007262 51 -0.65479144 1.65755575 52 -3.14517996 -0.65479144 53 -2.46692739 -3.14517996 54 -1.95731590 -2.46692739 55 0.80448638 -1.95731590 56 1.79606823 0.80448638 57 1.15110203 1.79606823 58 -2.47874835 1.15110203 59 -1.85216012 -2.47874835 60 -6.48201050 -1.85216012 61 -0.85647469 -6.48201050 62 -2.93486840 -0.85647469 63 0.23843942 -2.93486840 64 0.62216319 0.23843942 65 -3.95700136 0.62216319 66 -3.23697393 -3.95700136 67 -1.99786445 -3.23697393 68 1.11904196 -1.99786445 69 0.34924046 1.11904196 70 0.11995372 0.34924046 71 1.96635812 0.11995372 72 0.82216276 1.96635812 73 0.82731875 0.82216276 74 -1.07874922 0.82731875 75 -2.06419298 -1.07874922 76 2.95036325 -2.06419298 77 -1.03508052 2.95036325 78 1.11002660 -1.03508052 79 -1.49162307 1.11002660 80 0.60230896 -1.49162307 81 2.06909317 0.60230896 82 1.11185011 2.06909317 83 1.82770363 1.11185011 84 1.03338607 1.82770363 85 -0.01263302 1.03338607 86 0.76379582 -0.01263302 87 0.03527992 0.76379582 88 -0.66086137 0.03527992 89 -7.16016086 -0.66086137 90 3.18129879 -7.16016086 91 -1.14044863 3.18129879 92 1.33156191 -1.14044863 93 0.24794187 1.33156191 94 -0.96622905 0.24794187 95 1.93657677 -0.96622905 96 -2.22641906 1.93657677 97 -0.25886401 -2.22641906 98 2.98441937 -0.25886401 99 1.14832696 2.98441937 100 3.37280988 1.14832696 101 -1.62203413 3.37280988 102 2.28077169 -1.62203413 103 -2.97100017 2.28077169 104 0.46912501 -2.97100017 105 -4.76956197 0.46912501 106 1.85751552 -4.76956197 107 1.25955050 1.85751552 108 -4.17394734 1.25955050 109 -4.16879135 -4.17394734 110 1.06509180 -4.16879135 111 -2.85037640 1.06509180 112 -0.89639550 -2.85037640 113 0.32808742 -0.89639550 114 4.35621780 0.32808742 115 2.44074959 4.35621780 116 0.52110747 2.44074959 117 0.08238331 0.52110747 118 0.28806575 0.08238331 119 0.32142245 0.28806575 120 -1.83217314 0.32142245 121 0.35993515 -1.83217314 122 0.83243496 0.35993515 123 1.25327041 0.83243496 124 1.48715356 1.25327041 125 -0.74999174 1.48715356 126 3.50686579 -0.74999174 127 3.26032025 3.50686579 128 5.13909927 3.26032025 129 0.63562587 5.13909927 130 -0.53831188 0.63562587 131 -4.52792956 -0.53831188 132 1.10854817 -4.52792956 133 1.29543014 1.10854817 134 1.49693867 1.29543014 135 2.28276775 1.49693867 136 -2.59092561 2.28276775 137 -0.11319948 -2.59092561 138 -2.17433439 -0.11319948 139 1.23759008 -2.17433439 140 -0.70085250 1.23759008 141 1.38367929 -0.70085250 142 2.57578759 1.38367929 143 -0.06868935 2.57578759 144 1.31037125 -0.06868935 145 2.17557612 1.31037125 146 2.01258029 2.17557612 147 -2.88931377 2.01258029 148 -1.45907809 -2.88931377 149 -4.30874464 -1.45907809 150 2.40188255 -4.30874464 151 -0.37363454 2.40188255 152 2.15109277 -0.37363454 153 -1.48447319 2.15109277 154 -4.53571861 -1.48447319 155 -0.64231303 -4.53571861 > 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/7l39v1292935039.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/8l39v1292935039.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/9wc8g1292935039.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/10wc8g1292935039.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/11hd6m1292935039.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/12lv5a1292935039.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/13se231292935039.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/14k5j61292935039.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/1566hu1292935039.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/167j4r1292935039.tab") + } > > try(system("convert tmp/1ptt41292935039.ps tmp/1ptt41292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/2ikap1292935039.ps tmp/2ikap1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/3ikap1292935039.ps tmp/3ikap1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/4ikap1292935039.ps tmp/4ikap1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/5bcrs1292935039.ps tmp/5bcrs1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/6bcrs1292935039.ps tmp/6bcrs1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/7l39v1292935039.ps tmp/7l39v1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/8l39v1292935039.ps tmp/8l39v1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/9wc8g1292935039.ps tmp/9wc8g1292935039.png",intern=TRUE)) character(0) > try(system("convert tmp/10wc8g1292935039.ps tmp/10wc8g1292935039.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.958 2.854 32.140