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(2938,2909,3141,2427,3059,2918,2901,2823,2798,2892,2967,2397,3458,3024,3100,2904,3056,2771,2897,2772,2857,3020,2648,2364,3194,3013,2560,3074,2746,2846,3184,2354,3080,2963,2430,2296,2416,2647,2789,2685,2666,2882,2953,2127,2563,3061,2809,2861,2781,2555,3206,2570,2410,3195,2736,2743,2934,2668,2907,2866,2983,2878,3225,2515,3193,2663,2908,2896,2853,3028,3053,2455,3401,2969,3243,2849,3296,3121,3194,3023,2984,3525,3116,2383,3294,2882,2820,2583,2803,2767,2945,2716,2644,2956,2598,2171,2994,2645,2724,2550,2707,2679,2878,2307,2496,2637,2436,2426,2607,2533,2888,2520,2229,2804,2661,2547,2509,2465,2629,2706,2666,2432,2836,2888,2566,2802,2611,2683,2675,2434,2693,2619,2903,2550,2900,2456,2912,2883,2464,2655,2447,2592,2698,2274,2901,2397,3004,2614,2882,2671,2761,2806,2414,2673,2748,2112,2903,2633,2684,2861,2504,2708,2961,2535,2688,2699,2469,2585,2582,2480,2709,2441,2182,2585,2881,2422,2690,2659,2535,2613),dim=c(1,180),dimnames=list(c('Echtscheidingen'),1:180)) > y <- array(NA,dim=c(1,180),dimnames=list(c('Echtscheidingen'),1:180)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Echtscheidingen M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 2938 1 0 0 0 0 0 0 0 0 0 0 1 2 2909 0 1 0 0 0 0 0 0 0 0 0 2 3 3141 0 0 1 0 0 0 0 0 0 0 0 3 4 2427 0 0 0 1 0 0 0 0 0 0 0 4 5 3059 0 0 0 0 1 0 0 0 0 0 0 5 6 2918 0 0 0 0 0 1 0 0 0 0 0 6 7 2901 0 0 0 0 0 0 1 0 0 0 0 7 8 2823 0 0 0 0 0 0 0 1 0 0 0 8 9 2798 0 0 0 0 0 0 0 0 1 0 0 9 10 2892 0 0 0 0 0 0 0 0 0 1 0 10 11 2967 0 0 0 0 0 0 0 0 0 0 1 11 12 2397 0 0 0 0 0 0 0 0 0 0 0 12 13 3458 1 0 0 0 0 0 0 0 0 0 0 13 14 3024 0 1 0 0 0 0 0 0 0 0 0 14 15 3100 0 0 1 0 0 0 0 0 0 0 0 15 16 2904 0 0 0 1 0 0 0 0 0 0 0 16 17 3056 0 0 0 0 1 0 0 0 0 0 0 17 18 2771 0 0 0 0 0 1 0 0 0 0 0 18 19 2897 0 0 0 0 0 0 1 0 0 0 0 19 20 2772 0 0 0 0 0 0 0 1 0 0 0 20 21 2857 0 0 0 0 0 0 0 0 1 0 0 21 22 3020 0 0 0 0 0 0 0 0 0 1 0 22 23 2648 0 0 0 0 0 0 0 0 0 0 1 23 24 2364 0 0 0 0 0 0 0 0 0 0 0 24 25 3194 1 0 0 0 0 0 0 0 0 0 0 25 26 3013 0 1 0 0 0 0 0 0 0 0 0 26 27 2560 0 0 1 0 0 0 0 0 0 0 0 27 28 3074 0 0 0 1 0 0 0 0 0 0 0 28 29 2746 0 0 0 0 1 0 0 0 0 0 0 29 30 2846 0 0 0 0 0 1 0 0 0 0 0 30 31 3184 0 0 0 0 0 0 1 0 0 0 0 31 32 2354 0 0 0 0 0 0 0 1 0 0 0 32 33 3080 0 0 0 0 0 0 0 0 1 0 0 33 34 2963 0 0 0 0 0 0 0 0 0 1 0 34 35 2430 0 0 0 0 0 0 0 0 0 0 1 35 36 2296 0 0 0 0 0 0 0 0 0 0 0 36 37 2416 1 0 0 0 0 0 0 0 0 0 0 37 38 2647 0 1 0 0 0 0 0 0 0 0 0 38 39 2789 0 0 1 0 0 0 0 0 0 0 0 39 40 2685 0 0 0 1 0 0 0 0 0 0 0 40 41 2666 0 0 0 0 1 0 0 0 0 0 0 41 42 2882 0 0 0 0 0 1 0 0 0 0 0 42 43 2953 0 0 0 0 0 0 1 0 0 0 0 43 44 2127 0 0 0 0 0 0 0 1 0 0 0 44 45 2563 0 0 0 0 0 0 0 0 1 0 0 45 46 3061 0 0 0 0 0 0 0 0 0 1 0 46 47 2809 0 0 0 0 0 0 0 0 0 0 1 47 48 2861 0 0 0 0 0 0 0 0 0 0 0 48 49 2781 1 0 0 0 0 0 0 0 0 0 0 49 50 2555 0 1 0 0 0 0 0 0 0 0 0 50 51 3206 0 0 1 0 0 0 0 0 0 0 0 51 52 2570 0 0 0 1 0 0 0 0 0 0 0 52 53 2410 0 0 0 0 1 0 0 0 0 0 0 53 54 3195 0 0 0 0 0 1 0 0 0 0 0 54 55 2736 0 0 0 0 0 0 1 0 0 0 0 55 56 2743 0 0 0 0 0 0 0 1 0 0 0 56 57 2934 0 0 0 0 0 0 0 0 1 0 0 57 58 2668 0 0 0 0 0 0 0 0 0 1 0 58 59 2907 0 0 0 0 0 0 0 0 0 0 1 59 60 2866 0 0 0 0 0 0 0 0 0 0 0 60 61 2983 1 0 0 0 0 0 0 0 0 0 0 61 62 2878 0 1 0 0 0 0 0 0 0 0 0 62 63 3225 0 0 1 0 0 0 0 0 0 0 0 63 64 2515 0 0 0 1 0 0 0 0 0 0 0 64 65 3193 0 0 0 0 1 0 0 0 0 0 0 65 66 2663 0 0 0 0 0 1 0 0 0 0 0 66 67 2908 0 0 0 0 0 0 1 0 0 0 0 67 68 2896 0 0 0 0 0 0 0 1 0 0 0 68 69 2853 0 0 0 0 0 0 0 0 1 0 0 69 70 3028 0 0 0 0 0 0 0 0 0 1 0 70 71 3053 0 0 0 0 0 0 0 0 0 0 1 71 72 2455 0 0 0 0 0 0 0 0 0 0 0 72 73 3401 1 0 0 0 0 0 0 0 0 0 0 73 74 2969 0 1 0 0 0 0 0 0 0 0 0 74 75 3243 0 0 1 0 0 0 0 0 0 0 0 75 76 2849 0 0 0 1 0 0 0 0 0 0 0 76 77 3296 0 0 0 0 1 0 0 0 0 0 0 77 78 3121 0 0 0 0 0 1 0 0 0 0 0 78 79 3194 0 0 0 0 0 0 1 0 0 0 0 79 80 3023 0 0 0 0 0 0 0 1 0 0 0 80 81 2984 0 0 0 0 0 0 0 0 1 0 0 81 82 3525 0 0 0 0 0 0 0 0 0 1 0 82 83 3116 0 0 0 0 0 0 0 0 0 0 1 83 84 2383 0 0 0 0 0 0 0 0 0 0 0 84 85 3294 1 0 0 0 0 0 0 0 0 0 0 85 86 2882 0 1 0 0 0 0 0 0 0 0 0 86 87 2820 0 0 1 0 0 0 0 0 0 0 0 87 88 2583 0 0 0 1 0 0 0 0 0 0 0 88 89 2803 0 0 0 0 1 0 0 0 0 0 0 89 90 2767 0 0 0 0 0 1 0 0 0 0 0 90 91 2945 0 0 0 0 0 0 1 0 0 0 0 91 92 2716 0 0 0 0 0 0 0 1 0 0 0 92 93 2644 0 0 0 0 0 0 0 0 1 0 0 93 94 2956 0 0 0 0 0 0 0 0 0 1 0 94 95 2598 0 0 0 0 0 0 0 0 0 0 1 95 96 2171 0 0 0 0 0 0 0 0 0 0 0 96 97 2994 1 0 0 0 0 0 0 0 0 0 0 97 98 2645 0 1 0 0 0 0 0 0 0 0 0 98 99 2724 0 0 1 0 0 0 0 0 0 0 0 99 100 2550 0 0 0 1 0 0 0 0 0 0 0 100 101 2707 0 0 0 0 1 0 0 0 0 0 0 101 102 2679 0 0 0 0 0 1 0 0 0 0 0 102 103 2878 0 0 0 0 0 0 1 0 0 0 0 103 104 2307 0 0 0 0 0 0 0 1 0 0 0 104 105 2496 0 0 0 0 0 0 0 0 1 0 0 105 106 2637 0 0 0 0 0 0 0 0 0 1 0 106 107 2436 0 0 0 0 0 0 0 0 0 0 1 107 108 2426 0 0 0 0 0 0 0 0 0 0 0 108 109 2607 1 0 0 0 0 0 0 0 0 0 0 109 110 2533 0 1 0 0 0 0 0 0 0 0 0 110 111 2888 0 0 1 0 0 0 0 0 0 0 0 111 112 2520 0 0 0 1 0 0 0 0 0 0 0 112 113 2229 0 0 0 0 1 0 0 0 0 0 0 113 114 2804 0 0 0 0 0 1 0 0 0 0 0 114 115 2661 0 0 0 0 0 0 1 0 0 0 0 115 116 2547 0 0 0 0 0 0 0 1 0 0 0 116 117 2509 0 0 0 0 0 0 0 0 1 0 0 117 118 2465 0 0 0 0 0 0 0 0 0 1 0 118 119 2629 0 0 0 0 0 0 0 0 0 0 1 119 120 2706 0 0 0 0 0 0 0 0 0 0 0 120 121 2666 1 0 0 0 0 0 0 0 0 0 0 121 122 2432 0 1 0 0 0 0 0 0 0 0 0 122 123 2836 0 0 1 0 0 0 0 0 0 0 0 123 124 2888 0 0 0 1 0 0 0 0 0 0 0 124 125 2566 0 0 0 0 1 0 0 0 0 0 0 125 126 2802 0 0 0 0 0 1 0 0 0 0 0 126 127 2611 0 0 0 0 0 0 1 0 0 0 0 127 128 2683 0 0 0 0 0 0 0 1 0 0 0 128 129 2675 0 0 0 0 0 0 0 0 1 0 0 129 130 2434 0 0 0 0 0 0 0 0 0 1 0 130 131 2693 0 0 0 0 0 0 0 0 0 0 1 131 132 2619 0 0 0 0 0 0 0 0 0 0 0 132 133 2903 1 0 0 0 0 0 0 0 0 0 0 133 134 2550 0 1 0 0 0 0 0 0 0 0 0 134 135 2900 0 0 1 0 0 0 0 0 0 0 0 135 136 2456 0 0 0 1 0 0 0 0 0 0 0 136 137 2912 0 0 0 0 1 0 0 0 0 0 0 137 138 2883 0 0 0 0 0 1 0 0 0 0 0 138 139 2464 0 0 0 0 0 0 1 0 0 0 0 139 140 2655 0 0 0 0 0 0 0 1 0 0 0 140 141 2447 0 0 0 0 0 0 0 0 1 0 0 141 142 2592 0 0 0 0 0 0 0 0 0 1 0 142 143 2698 0 0 0 0 0 0 0 0 0 0 1 143 144 2274 0 0 0 0 0 0 0 0 0 0 0 144 145 2901 1 0 0 0 0 0 0 0 0 0 0 145 146 2397 0 1 0 0 0 0 0 0 0 0 0 146 147 3004 0 0 1 0 0 0 0 0 0 0 0 147 148 2614 0 0 0 1 0 0 0 0 0 0 0 148 149 2882 0 0 0 0 1 0 0 0 0 0 0 149 150 2671 0 0 0 0 0 1 0 0 0 0 0 150 151 2761 0 0 0 0 0 0 1 0 0 0 0 151 152 2806 0 0 0 0 0 0 0 1 0 0 0 152 153 2414 0 0 0 0 0 0 0 0 1 0 0 153 154 2673 0 0 0 0 0 0 0 0 0 1 0 154 155 2748 0 0 0 0 0 0 0 0 0 0 1 155 156 2112 0 0 0 0 0 0 0 0 0 0 0 156 157 2903 1 0 0 0 0 0 0 0 0 0 0 157 158 2633 0 1 0 0 0 0 0 0 0 0 0 158 159 2684 0 0 1 0 0 0 0 0 0 0 0 159 160 2861 0 0 0 1 0 0 0 0 0 0 0 160 161 2504 0 0 0 0 1 0 0 0 0 0 0 161 162 2708 0 0 0 0 0 1 0 0 0 0 0 162 163 2961 0 0 0 0 0 0 1 0 0 0 0 163 164 2535 0 0 0 0 0 0 0 1 0 0 0 164 165 2688 0 0 0 0 0 0 0 0 1 0 0 165 166 2699 0 0 0 0 0 0 0 0 0 1 0 166 167 2469 0 0 0 0 0 0 0 0 0 0 1 167 168 2585 0 0 0 0 0 0 0 0 0 0 0 168 169 2582 1 0 0 0 0 0 0 0 0 0 0 169 170 2480 0 1 0 0 0 0 0 0 0 0 0 170 171 2709 0 0 1 0 0 0 0 0 0 0 0 171 172 2441 0 0 0 1 0 0 0 0 0 0 0 172 173 2182 0 0 0 0 1 0 0 0 0 0 0 173 174 2585 0 0 0 0 0 1 0 0 0 0 0 174 175 2881 0 0 0 0 0 0 1 0 0 0 0 175 176 2422 0 0 0 0 0 0 0 1 0 0 0 176 177 2690 0 0 0 0 0 0 0 0 1 0 0 177 178 2659 0 0 0 0 0 0 0 0 0 1 0 178 179 2535 0 0 0 0 0 0 0 0 0 0 1 179 180 2613 0 0 0 0 0 0 0 0 0 0 0 180 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 2639.474 440.710 210.821 431.333 173.577 260.222 M6 M7 M8 M9 M10 M11 334.200 378.577 145.222 228.466 339.511 238.822 t -1.711 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -600.870 -141.354 2.705 148.252 686.332 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2639.4738 64.8756 40.685 < 2e-16 *** M1 440.7103 80.9899 5.442 1.85e-07 *** M2 210.8215 80.9767 2.603 0.01006 * M3 431.3327 80.9648 5.327 3.18e-07 *** M4 173.5772 80.9542 2.144 0.03347 * M5 260.2217 80.9448 3.215 0.00157 ** M6 334.1996 80.9366 4.129 5.74e-05 *** M7 378.5774 80.9297 4.678 5.96e-06 *** M8 145.2219 80.9241 1.795 0.07453 . M9 228.4664 80.9197 2.823 0.00533 ** M10 339.5110 80.9165 4.196 4.41e-05 *** M11 238.8221 80.9147 2.952 0.00362 ** t -1.7112 0.3186 -5.371 2.59e-07 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 221.6 on 167 degrees of freedom Multiple R-squared: 0.3415, Adjusted R-squared: 0.2942 F-statistic: 7.219 on 12 and 167 DF, p-value: 1.482e-10 > 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.47111311 0.9422262297 0.5288868851 [2,] 0.40672225 0.8134445095 0.5932777452 [3,] 0.42782313 0.8556462567 0.5721768717 [4,] 0.32872423 0.6574484508 0.6712757746 [5,] 0.25587120 0.5117423956 0.7441288022 [6,] 0.17194044 0.3438808753 0.8280595623 [7,] 0.10978801 0.2195760145 0.8902119927 [8,] 0.17315803 0.3463160509 0.8268419745 [9,] 0.12526109 0.2505221744 0.8747389128 [10,] 0.08744442 0.1748888326 0.9125555837 [11,] 0.05751435 0.1150286961 0.9424856520 [12,] 0.28055403 0.5611080552 0.7194459724 [13,] 0.37669160 0.7533832005 0.6233083997 [14,] 0.40030168 0.8006033554 0.5996983223 [15,] 0.32984639 0.6596927878 0.6701536061 [16,] 0.33448721 0.6689744122 0.6655127939 [17,] 0.45381690 0.9076338049 0.5461830975 [18,] 0.45220833 0.9044166574 0.5477916713 [19,] 0.38537536 0.7707507141 0.6146246429 [20,] 0.45429291 0.9085858177 0.5457070912 [21,] 0.41362411 0.8272482154 0.5863758923 [22,] 0.78377349 0.4324530230 0.2162265115 [23,] 0.76273942 0.4745211510 0.2372605755 [24,] 0.72883197 0.5423360532 0.2711680266 [25,] 0.67907237 0.6418552520 0.3209276260 [26,] 0.64557222 0.7088555582 0.3544277791 [27,] 0.61348643 0.7730271384 0.3865135692 [28,] 0.56300930 0.8739813936 0.4369906968 [29,] 0.71136404 0.5772719122 0.2886359561 [30,] 0.70158942 0.5968211569 0.2984105784 [31,] 0.69540325 0.6091934952 0.3045967476 [32,] 0.69132092 0.6173581688 0.3086790844 [33,] 0.83802228 0.3239554405 0.1619777202 [34,] 0.82401082 0.3519783635 0.1759891817 [35,] 0.81744665 0.3651066943 0.1825533471 [36,] 0.85845316 0.2830936734 0.1415468367 [37,] 0.83969981 0.3206003869 0.1603001935 [38,] 0.88695368 0.2260926448 0.1130463224 [39,] 0.92281921 0.1543615745 0.0771807873 [40,] 0.91654570 0.1669085986 0.0834542993 [41,] 0.92182058 0.1563588441 0.0781794221 [42,] 0.91251172 0.1749765504 0.0874882752 [43,] 0.91351352 0.1729729519 0.0864864760 [44,] 0.91091795 0.1781641008 0.0890820504 [45,] 0.93673631 0.1265273879 0.0632636940 [46,] 0.92410472 0.1517905523 0.0758952761 [47,] 0.90931186 0.1813762788 0.0906881394 [48,] 0.91480683 0.1703863346 0.0851931673 [49,] 0.91309156 0.1738168840 0.0869084420 [50,] 0.94234400 0.1153119980 0.0576559990 [51,] 0.94357495 0.1128501018 0.0564250509 [52,] 0.93012265 0.1397546983 0.0698773491 [53,] 0.93519442 0.1296111698 0.0648055849 [54,] 0.91950504 0.1609899284 0.0804949642 [55,] 0.90562575 0.1887484906 0.0943742453 [56,] 0.91111543 0.1777691450 0.0888845725 [57,] 0.89637101 0.2072579701 0.1036289850 [58,] 0.93223953 0.1355209324 0.0677604662 [59,] 0.92669894 0.1466021287 0.0733010644 [60,] 0.92821323 0.1435735326 0.0717867663 [61,] 0.91523902 0.1695219549 0.0847609775 [62,] 0.95996644 0.0800671265 0.0400335633 [63,] 0.95973644 0.0805271289 0.0402635645 [64,] 0.96266598 0.0746680475 0.0373340238 [65,] 0.97162830 0.0567433979 0.0283716989 [66,] 0.97221681 0.0555663872 0.0277831936 [67,] 0.99798443 0.0040311318 0.0020155659 [68,] 0.99908461 0.0018307745 0.0009153873 [69,] 0.99892195 0.0021560973 0.0010780487 [70,] 0.99953215 0.0009356936 0.0004678468 [71,] 0.99963734 0.0007253170 0.0003626585 [72,] 0.99959153 0.0008169381 0.0004084690 [73,] 0.99947458 0.0010508318 0.0005254159 [74,] 0.99946035 0.0010792912 0.0005396456 [75,] 0.99929364 0.0014127183 0.0007063592 [76,] 0.99916260 0.0016748097 0.0008374049 [77,] 0.99890526 0.0021894857 0.0010947428 [78,] 0.99874357 0.0025128541 0.0012564271 [79,] 0.99919860 0.0016027941 0.0008013971 [80,] 0.99905261 0.0018947896 0.0009473948 [81,] 0.99944127 0.0011174615 0.0005587307 [82,] 0.99943124 0.0011375157 0.0005687578 [83,] 0.99936670 0.0012665950 0.0006332975 [84,] 0.99929194 0.0014161206 0.0007080603 [85,] 0.99903469 0.0019306245 0.0009653122 [86,] 0.99892041 0.0021591853 0.0010795926 [87,] 0.99858377 0.0028324547 0.0014162273 [88,] 0.99828555 0.0034288932 0.0017144466 [89,] 0.99887249 0.0022550239 0.0011275120 [90,] 0.99870109 0.0025978106 0.0012989053 [91,] 0.99853729 0.0029254111 0.0014627056 [92,] 0.99863682 0.0027263517 0.0013631759 [93,] 0.99802521 0.0039495805 0.0019747903 [94,] 0.99826875 0.0034624951 0.0017312476 [95,] 0.99771749 0.0045650245 0.0022825123 [96,] 0.99672123 0.0065575357 0.0032787678 [97,] 0.99583438 0.0083312324 0.0041656162 [98,] 0.99875180 0.0024964050 0.0012482025 [99,] 0.99814659 0.0037068122 0.0018534061 [100,] 0.99760627 0.0047874664 0.0023937332 [101,] 0.99671206 0.0065758883 0.0032879441 [102,] 0.99582845 0.0083431092 0.0041715546 [103,] 0.99627072 0.0074585605 0.0037292802 [104,] 0.99466103 0.0106779473 0.0053389737 [105,] 0.99504613 0.0099077328 0.0049538664 [106,] 0.99466761 0.0106647789 0.0053323894 [107,] 0.99359371 0.0128125815 0.0064062907 [108,] 0.99083897 0.0183220563 0.0091610281 [109,] 0.99200685 0.0159862908 0.0079931454 [110,] 0.98934466 0.0213106724 0.0106553362 [111,] 0.98507234 0.0298553102 0.0149276551 [112,] 0.98389472 0.0322105520 0.0161052760 [113,] 0.97821745 0.0435651069 0.0217825534 [114,] 0.97047530 0.0590493930 0.0295246965 [115,] 0.97605514 0.0478897104 0.0239448552 [116,] 0.96696242 0.0660751551 0.0330375776 [117,] 0.96236406 0.0752718731 0.0376359366 [118,] 0.94994139 0.1001172100 0.0500586050 [119,] 0.93348282 0.1330343663 0.0665171832 [120,] 0.91392827 0.1721434560 0.0860717280 [121,] 0.90767746 0.1846450817 0.0923225409 [122,] 0.92854641 0.1429071787 0.0714535894 [123,] 0.92177519 0.1564496237 0.0782248118 [124,] 0.95927239 0.0814552210 0.0407276105 [125,] 0.94431507 0.1113698554 0.0556849277 [126,] 0.93900439 0.1219912155 0.0609956077 [127,] 0.92656761 0.1468647888 0.0734323944 [128,] 0.90155941 0.1968811781 0.0984405891 [129,] 0.90043974 0.1991205241 0.0995602620 [130,] 0.87100745 0.2579851053 0.1289925526 [131,] 0.86545438 0.2690912401 0.1345456201 [132,] 0.85719510 0.2856098019 0.1428049010 [133,] 0.82064762 0.3587047602 0.1793523801 [134,] 0.91411942 0.1717611596 0.0858805798 [135,] 0.87953075 0.2409385086 0.1204692543 [136,] 0.86442311 0.2711537743 0.1355768872 [137,] 0.87915204 0.2416959118 0.1208479559 [138,] 0.90520832 0.1895833650 0.0947916825 [139,] 0.86704286 0.2659142748 0.1329571374 [140,] 0.84230290 0.3153942046 0.1576971023 [141,] 0.99447473 0.0110505353 0.0055252677 [142,] 0.99409072 0.0118185516 0.0059092758 [143,] 0.98738701 0.0252259862 0.0126129931 [144,] 0.97896426 0.0420714855 0.0210357428 [145,] 0.99480540 0.0103891975 0.0051945987 [146,] 0.99945886 0.0010822802 0.0005411401 [147,] 0.99883092 0.0023381536 0.0011690768 [148,] 0.99598193 0.0080361416 0.0040180708 [149,] 0.99629014 0.0074197226 0.0037098613 > postscript(file="/var/www/html/freestat/rcomp/tmp/1m2dv1291114246.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/2m2dv1291114246.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/3fbcg1291114246.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/4fbcg1291114246.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/5fbcg1291114246.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 = 180 Frequency = 1 1 2 3 4 5 6 -140.472917 62.127083 75.327083 -379.206250 167.860417 -45.406250 7 8 9 10 11 12 -105.072917 51.993750 -54.539583 -69.872917 107.527083 -221.939583 13 14 15 16 17 18 400.061310 197.661310 54.861310 118.327976 185.394643 -171.872024 19 20 21 22 23 24 -88.538690 21.527976 24.994643 78.661310 -190.938690 -234.405357 25 26 27 28 29 30 156.595536 207.195536 -464.604464 308.862202 -104.071131 -76.337798 31 32 33 34 35 36 218.995536 -375.937798 268.528869 42.195536 -388.404464 -281.871131 37 38 39 40 41 42 -600.870238 -138.270238 -215.070238 -59.603571 -163.536905 -19.803571 43 44 45 46 47 48 8.529762 -582.403571 -227.936905 160.729762 11.129762 303.663095 49 50 51 52 53 54 -215.336012 -209.736012 222.463988 -154.069345 -399.002679 313.730655 55 56 57 58 59 60 -187.936012 54.130655 163.597321 -211.736012 129.663988 329.197321 61 62 63 64 65 66 7.198214 133.798214 261.998214 -188.535119 404.531548 -197.735119 67 68 69 70 71 72 4.598214 227.664881 103.131548 168.798214 296.198214 -61.268452 73 74 75 76 77 78 445.732440 245.332440 300.532440 165.999107 528.065774 280.799107 79 80 81 82 83 84 311.132440 375.199107 254.665774 686.332440 379.732440 -112.734226 85 86 87 88 89 90 359.266667 178.866667 -101.933333 -79.466667 55.600000 -52.666667 91 92 93 94 95 96 82.666667 88.733333 -64.800000 137.866667 -117.733333 -304.200000 97 98 99 100 101 102 79.800893 -37.599107 -177.399107 -91.932440 -19.865774 -120.132440 103 104 105 106 107 108 36.200893 -299.732440 -192.265774 -160.599107 -259.199107 -28.665774 109 110 111 112 113 114 -286.664881 -129.064881 7.135119 -101.398214 -477.331548 25.401786 115 116 117 118 119 120 -160.264881 -39.198214 -158.731548 -312.064881 -45.664881 271.868452 121 122 123 124 125 126 -207.130655 -209.530655 -24.330655 287.136012 -119.797321 43.936012 127 128 129 130 131 132 -189.730655 117.336012 27.802679 -322.530655 38.869345 205.402679 133 134 135 136 137 138 50.403571 -70.996429 60.203571 -124.329762 246.736905 145.470238 139 140 141 142 143 144 -316.196429 109.870238 -179.663095 -143.996429 64.403571 -119.063095 145 146 147 148 149 150 68.937798 -203.462202 184.737798 54.204464 237.271131 -45.995536 151 152 153 154 155 156 1.337798 281.404464 -192.128869 -42.462202 134.937798 -260.528869 157 158 159 160 161 162 91.472024 53.072024 -114.727976 321.738690 -120.194643 11.538690 163 164 165 166 167 168 221.872024 30.938690 102.405357 4.072024 -123.527976 233.005357 169 170 171 172 173 174 -208.993750 -79.393750 -69.193750 -77.727083 -421.660417 -90.927083 175 176 177 178 179 180 162.406250 -61.527083 124.939583 -15.393750 -36.993750 281.539583 > postscript(file="/var/www/html/freestat/rcomp/tmp/68kuj1291114246.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 = 180 Frequency = 1 lag(myerror, k = 1) myerror 0 -140.472917 NA 1 62.127083 -140.472917 2 75.327083 62.127083 3 -379.206250 75.327083 4 167.860417 -379.206250 5 -45.406250 167.860417 6 -105.072917 -45.406250 7 51.993750 -105.072917 8 -54.539583 51.993750 9 -69.872917 -54.539583 10 107.527083 -69.872917 11 -221.939583 107.527083 12 400.061310 -221.939583 13 197.661310 400.061310 14 54.861310 197.661310 15 118.327976 54.861310 16 185.394643 118.327976 17 -171.872024 185.394643 18 -88.538690 -171.872024 19 21.527976 -88.538690 20 24.994643 21.527976 21 78.661310 24.994643 22 -190.938690 78.661310 23 -234.405357 -190.938690 24 156.595536 -234.405357 25 207.195536 156.595536 26 -464.604464 207.195536 27 308.862202 -464.604464 28 -104.071131 308.862202 29 -76.337798 -104.071131 30 218.995536 -76.337798 31 -375.937798 218.995536 32 268.528869 -375.937798 33 42.195536 268.528869 34 -388.404464 42.195536 35 -281.871131 -388.404464 36 -600.870238 -281.871131 37 -138.270238 -600.870238 38 -215.070238 -138.270238 39 -59.603571 -215.070238 40 -163.536905 -59.603571 41 -19.803571 -163.536905 42 8.529762 -19.803571 43 -582.403571 8.529762 44 -227.936905 -582.403571 45 160.729762 -227.936905 46 11.129762 160.729762 47 303.663095 11.129762 48 -215.336012 303.663095 49 -209.736012 -215.336012 50 222.463988 -209.736012 51 -154.069345 222.463988 52 -399.002679 -154.069345 53 313.730655 -399.002679 54 -187.936012 313.730655 55 54.130655 -187.936012 56 163.597321 54.130655 57 -211.736012 163.597321 58 129.663988 -211.736012 59 329.197321 129.663988 60 7.198214 329.197321 61 133.798214 7.198214 62 261.998214 133.798214 63 -188.535119 261.998214 64 404.531548 -188.535119 65 -197.735119 404.531548 66 4.598214 -197.735119 67 227.664881 4.598214 68 103.131548 227.664881 69 168.798214 103.131548 70 296.198214 168.798214 71 -61.268452 296.198214 72 445.732440 -61.268452 73 245.332440 445.732440 74 300.532440 245.332440 75 165.999107 300.532440 76 528.065774 165.999107 77 280.799107 528.065774 78 311.132440 280.799107 79 375.199107 311.132440 80 254.665774 375.199107 81 686.332440 254.665774 82 379.732440 686.332440 83 -112.734226 379.732440 84 359.266667 -112.734226 85 178.866667 359.266667 86 -101.933333 178.866667 87 -79.466667 -101.933333 88 55.600000 -79.466667 89 -52.666667 55.600000 90 82.666667 -52.666667 91 88.733333 82.666667 92 -64.800000 88.733333 93 137.866667 -64.800000 94 -117.733333 137.866667 95 -304.200000 -117.733333 96 79.800893 -304.200000 97 -37.599107 79.800893 98 -177.399107 -37.599107 99 -91.932440 -177.399107 100 -19.865774 -91.932440 101 -120.132440 -19.865774 102 36.200893 -120.132440 103 -299.732440 36.200893 104 -192.265774 -299.732440 105 -160.599107 -192.265774 106 -259.199107 -160.599107 107 -28.665774 -259.199107 108 -286.664881 -28.665774 109 -129.064881 -286.664881 110 7.135119 -129.064881 111 -101.398214 7.135119 112 -477.331548 -101.398214 113 25.401786 -477.331548 114 -160.264881 25.401786 115 -39.198214 -160.264881 116 -158.731548 -39.198214 117 -312.064881 -158.731548 118 -45.664881 -312.064881 119 271.868452 -45.664881 120 -207.130655 271.868452 121 -209.530655 -207.130655 122 -24.330655 -209.530655 123 287.136012 -24.330655 124 -119.797321 287.136012 125 43.936012 -119.797321 126 -189.730655 43.936012 127 117.336012 -189.730655 128 27.802679 117.336012 129 -322.530655 27.802679 130 38.869345 -322.530655 131 205.402679 38.869345 132 50.403571 205.402679 133 -70.996429 50.403571 134 60.203571 -70.996429 135 -124.329762 60.203571 136 246.736905 -124.329762 137 145.470238 246.736905 138 -316.196429 145.470238 139 109.870238 -316.196429 140 -179.663095 109.870238 141 -143.996429 -179.663095 142 64.403571 -143.996429 143 -119.063095 64.403571 144 68.937798 -119.063095 145 -203.462202 68.937798 146 184.737798 -203.462202 147 54.204464 184.737798 148 237.271131 54.204464 149 -45.995536 237.271131 150 1.337798 -45.995536 151 281.404464 1.337798 152 -192.128869 281.404464 153 -42.462202 -192.128869 154 134.937798 -42.462202 155 -260.528869 134.937798 156 91.472024 -260.528869 157 53.072024 91.472024 158 -114.727976 53.072024 159 321.738690 -114.727976 160 -120.194643 321.738690 161 11.538690 -120.194643 162 221.872024 11.538690 163 30.938690 221.872024 164 102.405357 30.938690 165 4.072024 102.405357 166 -123.527976 4.072024 167 233.005357 -123.527976 168 -208.993750 233.005357 169 -79.393750 -208.993750 170 -69.193750 -79.393750 171 -77.727083 -69.193750 172 -421.660417 -77.727083 173 -90.927083 -421.660417 174 162.406250 -90.927083 175 -61.527083 162.406250 176 124.939583 -61.527083 177 -15.393750 124.939583 178 -36.993750 -15.393750 179 281.539583 -36.993750 180 NA 281.539583 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 62.127083 -140.472917 [2,] 75.327083 62.127083 [3,] -379.206250 75.327083 [4,] 167.860417 -379.206250 [5,] -45.406250 167.860417 [6,] -105.072917 -45.406250 [7,] 51.993750 -105.072917 [8,] -54.539583 51.993750 [9,] -69.872917 -54.539583 [10,] 107.527083 -69.872917 [11,] -221.939583 107.527083 [12,] 400.061310 -221.939583 [13,] 197.661310 400.061310 [14,] 54.861310 197.661310 [15,] 118.327976 54.861310 [16,] 185.394643 118.327976 [17,] -171.872024 185.394643 [18,] -88.538690 -171.872024 [19,] 21.527976 -88.538690 [20,] 24.994643 21.527976 [21,] 78.661310 24.994643 [22,] -190.938690 78.661310 [23,] -234.405357 -190.938690 [24,] 156.595536 -234.405357 [25,] 207.195536 156.595536 [26,] -464.604464 207.195536 [27,] 308.862202 -464.604464 [28,] -104.071131 308.862202 [29,] -76.337798 -104.071131 [30,] 218.995536 -76.337798 [31,] -375.937798 218.995536 [32,] 268.528869 -375.937798 [33,] 42.195536 268.528869 [34,] -388.404464 42.195536 [35,] -281.871131 -388.404464 [36,] -600.870238 -281.871131 [37,] -138.270238 -600.870238 [38,] -215.070238 -138.270238 [39,] -59.603571 -215.070238 [40,] -163.536905 -59.603571 [41,] -19.803571 -163.536905 [42,] 8.529762 -19.803571 [43,] -582.403571 8.529762 [44,] -227.936905 -582.403571 [45,] 160.729762 -227.936905 [46,] 11.129762 160.729762 [47,] 303.663095 11.129762 [48,] -215.336012 303.663095 [49,] -209.736012 -215.336012 [50,] 222.463988 -209.736012 [51,] -154.069345 222.463988 [52,] -399.002679 -154.069345 [53,] 313.730655 -399.002679 [54,] -187.936012 313.730655 [55,] 54.130655 -187.936012 [56,] 163.597321 54.130655 [57,] -211.736012 163.597321 [58,] 129.663988 -211.736012 [59,] 329.197321 129.663988 [60,] 7.198214 329.197321 [61,] 133.798214 7.198214 [62,] 261.998214 133.798214 [63,] -188.535119 261.998214 [64,] 404.531548 -188.535119 [65,] -197.735119 404.531548 [66,] 4.598214 -197.735119 [67,] 227.664881 4.598214 [68,] 103.131548 227.664881 [69,] 168.798214 103.131548 [70,] 296.198214 168.798214 [71,] -61.268452 296.198214 [72,] 445.732440 -61.268452 [73,] 245.332440 445.732440 [74,] 300.532440 245.332440 [75,] 165.999107 300.532440 [76,] 528.065774 165.999107 [77,] 280.799107 528.065774 [78,] 311.132440 280.799107 [79,] 375.199107 311.132440 [80,] 254.665774 375.199107 [81,] 686.332440 254.665774 [82,] 379.732440 686.332440 [83,] -112.734226 379.732440 [84,] 359.266667 -112.734226 [85,] 178.866667 359.266667 [86,] -101.933333 178.866667 [87,] -79.466667 -101.933333 [88,] 55.600000 -79.466667 [89,] -52.666667 55.600000 [90,] 82.666667 -52.666667 [91,] 88.733333 82.666667 [92,] -64.800000 88.733333 [93,] 137.866667 -64.800000 [94,] -117.733333 137.866667 [95,] -304.200000 -117.733333 [96,] 79.800893 -304.200000 [97,] -37.599107 79.800893 [98,] -177.399107 -37.599107 [99,] -91.932440 -177.399107 [100,] -19.865774 -91.932440 [101,] -120.132440 -19.865774 [102,] 36.200893 -120.132440 [103,] -299.732440 36.200893 [104,] -192.265774 -299.732440 [105,] -160.599107 -192.265774 [106,] -259.199107 -160.599107 [107,] -28.665774 -259.199107 [108,] -286.664881 -28.665774 [109,] -129.064881 -286.664881 [110,] 7.135119 -129.064881 [111,] -101.398214 7.135119 [112,] -477.331548 -101.398214 [113,] 25.401786 -477.331548 [114,] -160.264881 25.401786 [115,] -39.198214 -160.264881 [116,] -158.731548 -39.198214 [117,] -312.064881 -158.731548 [118,] -45.664881 -312.064881 [119,] 271.868452 -45.664881 [120,] -207.130655 271.868452 [121,] -209.530655 -207.130655 [122,] -24.330655 -209.530655 [123,] 287.136012 -24.330655 [124,] -119.797321 287.136012 [125,] 43.936012 -119.797321 [126,] -189.730655 43.936012 [127,] 117.336012 -189.730655 [128,] 27.802679 117.336012 [129,] -322.530655 27.802679 [130,] 38.869345 -322.530655 [131,] 205.402679 38.869345 [132,] 50.403571 205.402679 [133,] -70.996429 50.403571 [134,] 60.203571 -70.996429 [135,] -124.329762 60.203571 [136,] 246.736905 -124.329762 [137,] 145.470238 246.736905 [138,] -316.196429 145.470238 [139,] 109.870238 -316.196429 [140,] -179.663095 109.870238 [141,] -143.996429 -179.663095 [142,] 64.403571 -143.996429 [143,] -119.063095 64.403571 [144,] 68.937798 -119.063095 [145,] -203.462202 68.937798 [146,] 184.737798 -203.462202 [147,] 54.204464 184.737798 [148,] 237.271131 54.204464 [149,] -45.995536 237.271131 [150,] 1.337798 -45.995536 [151,] 281.404464 1.337798 [152,] -192.128869 281.404464 [153,] -42.462202 -192.128869 [154,] 134.937798 -42.462202 [155,] -260.528869 134.937798 [156,] 91.472024 -260.528869 [157,] 53.072024 91.472024 [158,] -114.727976 53.072024 [159,] 321.738690 -114.727976 [160,] -120.194643 321.738690 [161,] 11.538690 -120.194643 [162,] 221.872024 11.538690 [163,] 30.938690 221.872024 [164,] 102.405357 30.938690 [165,] 4.072024 102.405357 [166,] -123.527976 4.072024 [167,] 233.005357 -123.527976 [168,] -208.993750 233.005357 [169,] -79.393750 -208.993750 [170,] -69.193750 -79.393750 [171,] -77.727083 -69.193750 [172,] -421.660417 -77.727083 [173,] -90.927083 -421.660417 [174,] 162.406250 -90.927083 [175,] -61.527083 162.406250 [176,] 124.939583 -61.527083 [177,] -15.393750 124.939583 [178,] -36.993750 -15.393750 [179,] 281.539583 -36.993750 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 62.127083 -140.472917 2 75.327083 62.127083 3 -379.206250 75.327083 4 167.860417 -379.206250 5 -45.406250 167.860417 6 -105.072917 -45.406250 7 51.993750 -105.072917 8 -54.539583 51.993750 9 -69.872917 -54.539583 10 107.527083 -69.872917 11 -221.939583 107.527083 12 400.061310 -221.939583 13 197.661310 400.061310 14 54.861310 197.661310 15 118.327976 54.861310 16 185.394643 118.327976 17 -171.872024 185.394643 18 -88.538690 -171.872024 19 21.527976 -88.538690 20 24.994643 21.527976 21 78.661310 24.994643 22 -190.938690 78.661310 23 -234.405357 -190.938690 24 156.595536 -234.405357 25 207.195536 156.595536 26 -464.604464 207.195536 27 308.862202 -464.604464 28 -104.071131 308.862202 29 -76.337798 -104.071131 30 218.995536 -76.337798 31 -375.937798 218.995536 32 268.528869 -375.937798 33 42.195536 268.528869 34 -388.404464 42.195536 35 -281.871131 -388.404464 36 -600.870238 -281.871131 37 -138.270238 -600.870238 38 -215.070238 -138.270238 39 -59.603571 -215.070238 40 -163.536905 -59.603571 41 -19.803571 -163.536905 42 8.529762 -19.803571 43 -582.403571 8.529762 44 -227.936905 -582.403571 45 160.729762 -227.936905 46 11.129762 160.729762 47 303.663095 11.129762 48 -215.336012 303.663095 49 -209.736012 -215.336012 50 222.463988 -209.736012 51 -154.069345 222.463988 52 -399.002679 -154.069345 53 313.730655 -399.002679 54 -187.936012 313.730655 55 54.130655 -187.936012 56 163.597321 54.130655 57 -211.736012 163.597321 58 129.663988 -211.736012 59 329.197321 129.663988 60 7.198214 329.197321 61 133.798214 7.198214 62 261.998214 133.798214 63 -188.535119 261.998214 64 404.531548 -188.535119 65 -197.735119 404.531548 66 4.598214 -197.735119 67 227.664881 4.598214 68 103.131548 227.664881 69 168.798214 103.131548 70 296.198214 168.798214 71 -61.268452 296.198214 72 445.732440 -61.268452 73 245.332440 445.732440 74 300.532440 245.332440 75 165.999107 300.532440 76 528.065774 165.999107 77 280.799107 528.065774 78 311.132440 280.799107 79 375.199107 311.132440 80 254.665774 375.199107 81 686.332440 254.665774 82 379.732440 686.332440 83 -112.734226 379.732440 84 359.266667 -112.734226 85 178.866667 359.266667 86 -101.933333 178.866667 87 -79.466667 -101.933333 88 55.600000 -79.466667 89 -52.666667 55.600000 90 82.666667 -52.666667 91 88.733333 82.666667 92 -64.800000 88.733333 93 137.866667 -64.800000 94 -117.733333 137.866667 95 -304.200000 -117.733333 96 79.800893 -304.200000 97 -37.599107 79.800893 98 -177.399107 -37.599107 99 -91.932440 -177.399107 100 -19.865774 -91.932440 101 -120.132440 -19.865774 102 36.200893 -120.132440 103 -299.732440 36.200893 104 -192.265774 -299.732440 105 -160.599107 -192.265774 106 -259.199107 -160.599107 107 -28.665774 -259.199107 108 -286.664881 -28.665774 109 -129.064881 -286.664881 110 7.135119 -129.064881 111 -101.398214 7.135119 112 -477.331548 -101.398214 113 25.401786 -477.331548 114 -160.264881 25.401786 115 -39.198214 -160.264881 116 -158.731548 -39.198214 117 -312.064881 -158.731548 118 -45.664881 -312.064881 119 271.868452 -45.664881 120 -207.130655 271.868452 121 -209.530655 -207.130655 122 -24.330655 -209.530655 123 287.136012 -24.330655 124 -119.797321 287.136012 125 43.936012 -119.797321 126 -189.730655 43.936012 127 117.336012 -189.730655 128 27.802679 117.336012 129 -322.530655 27.802679 130 38.869345 -322.530655 131 205.402679 38.869345 132 50.403571 205.402679 133 -70.996429 50.403571 134 60.203571 -70.996429 135 -124.329762 60.203571 136 246.736905 -124.329762 137 145.470238 246.736905 138 -316.196429 145.470238 139 109.870238 -316.196429 140 -179.663095 109.870238 141 -143.996429 -179.663095 142 64.403571 -143.996429 143 -119.063095 64.403571 144 68.937798 -119.063095 145 -203.462202 68.937798 146 184.737798 -203.462202 147 54.204464 184.737798 148 237.271131 54.204464 149 -45.995536 237.271131 150 1.337798 -45.995536 151 281.404464 1.337798 152 -192.128869 281.404464 153 -42.462202 -192.128869 154 134.937798 -42.462202 155 -260.528869 134.937798 156 91.472024 -260.528869 157 53.072024 91.472024 158 -114.727976 53.072024 159 321.738690 -114.727976 160 -120.194643 321.738690 161 11.538690 -120.194643 162 221.872024 11.538690 163 30.938690 221.872024 164 102.405357 30.938690 165 4.072024 102.405357 166 -123.527976 4.072024 167 233.005357 -123.527976 168 -208.993750 233.005357 169 -79.393750 -208.993750 170 -69.193750 -79.393750 171 -77.727083 -69.193750 172 -421.660417 -77.727083 173 -90.927083 -421.660417 174 162.406250 -90.927083 175 -61.527083 162.406250 176 124.939583 -61.527083 177 -15.393750 124.939583 178 -36.993750 -15.393750 179 281.539583 -36.993750 > 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/78kuj1291114246.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/8iub41291114246.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/9iub41291114246.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/10iub41291114246.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/11xmrd1291114246.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/127vqy1291114246.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/13ew5a1291114246.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/147nmd1291114246.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/15an3i1291114246.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/16of1r1291114246.tab") + } > > try(system("convert tmp/1m2dv1291114246.ps tmp/1m2dv1291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/2m2dv1291114246.ps tmp/2m2dv1291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/3fbcg1291114246.ps tmp/3fbcg1291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/4fbcg1291114246.ps tmp/4fbcg1291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/5fbcg1291114246.ps tmp/5fbcg1291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/68kuj1291114246.ps tmp/68kuj1291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/78kuj1291114246.ps tmp/78kuj1291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/8iub41291114246.ps tmp/8iub41291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/9iub41291114246.ps tmp/9iub41291114246.png",intern=TRUE)) character(0) > try(system("convert tmp/10iub41291114246.ps tmp/10iub41291114246.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.091 2.753 6.425