R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(17140 + ,101645 + ,88 + ,20 + ,11 + ,27570 + ,101011 + ,41 + ,30 + ,13 + ,1423 + ,7176 + ,1 + ,0 + ,0 + ,22996 + ,96560 + ,129 + ,42 + ,17 + ,39992 + ,175824 + ,107 + ,57 + ,20 + ,117105 + ,341570 + ,190 + ,94 + ,21 + ,23789 + ,103597 + ,66 + ,27 + ,16 + ,26706 + ,112611 + ,36 + ,46 + ,20 + ,24266 + ,85574 + ,71 + ,37 + ,21 + ,44418 + ,220801 + ,105 + ,51 + ,18 + ,35232 + ,92661 + ,133 + ,40 + ,17 + ,40909 + ,133328 + ,79 + ,56 + ,20 + ,13294 + ,61361 + ,51 + ,27 + ,12 + ,32387 + ,125930 + ,207 + ,37 + ,17 + ,21233 + ,82316 + ,34 + ,27 + ,10 + ,44332 + ,102010 + ,66 + ,28 + ,13 + ,61056 + ,101523 + ,76 + ,59 + ,22 + ,13497 + ,41566 + ,42 + ,0 + ,9 + ,32334 + ,99923 + ,115 + ,44 + ,25 + ,44339 + ,22648 + ,44 + ,12 + ,13 + ,10288 + ,46698 + ,35 + ,14 + ,13 + ,65622 + ,131698 + ,74 + ,60 + ,19 + ,16563 + ,91735 + ,103 + ,7 + ,18 + ,29011 + ,79863 + ,134 + ,29 + ,22 + ,34553 + ,108043 + ,29 + ,45 + ,14 + ,23517 + ,98866 + ,140 + ,25 + ,13 + ,51009 + ,120445 + ,72 + ,36 + ,16 + ,33416 + ,116048 + ,45 + ,50 + ,20 + ,83305 + ,250047 + ,58 + ,41 + ,18 + ,27142 + ,136084 + ,69 + ,27 + ,13 + ,21399 + ,92499 + ,57 + ,25 + ,18 + ,24874 + ,135781 + ,98 + ,45 + ,14 + ,34988 + ,74408 + ,61 + ,29 + ,7 + ,45549 + ,81240 + ,89 + ,58 + ,17 + ,32755 + ,133368 + ,54 + ,37 + ,16 + ,20760 + ,79619 + ,123 + ,42 + ,11 + ,37636 + ,59194 + ,247 + ,7 + ,24 + ,65461 + ,139942 + ,46 + ,54 + ,22 + ,30080 + ,118612 + ,72 + ,54 + ,12 + ,24094 + ,72880 + ,41 + ,14 + ,19 + ,69008 + ,65475 + ,24 + ,16 + ,13 + ,54968 + ,99643 + ,45 + ,33 + ,17 + ,46090 + ,71965 + ,33 + ,32 + ,15 + ,27507 + ,77272 + ,27 + ,21 + ,16 + ,10672 + ,49289 + ,36 + ,15 + ,24 + ,34029 + ,135131 + ,87 + ,38 + ,15 + ,46300 + ,108446 + ,90 + ,22 + ,17 + ,24760 + ,89746 + ,114 + ,28 + ,18 + ,18779 + ,44296 + ,31 + ,10 + ,20 + ,21280 + ,77648 + ,45 + ,31 + ,16 + ,40662 + ,181528 + ,69 + ,32 + ,16 + ,28987 + ,134019 + ,51 + ,32 + ,18 + ,22827 + ,124064 + ,34 + ,43 + ,22 + ,18513 + ,92630 + ,60 + ,27 + ,8 + ,30594 + ,121848 + ,45 + ,37 + ,17 + ,24006 + ,52915 + ,54 + ,20 + ,18 + ,27913 + ,81872 + ,25 + ,32 + ,16 + ,42744 + ,58981 + ,38 + ,0 + ,23 + ,12934 + ,53515 + ,52 + ,5 + ,22 + ,22574 + ,60812 + ,67 + ,26 + ,13 + ,41385 + ,56375 + ,74 + ,10 + ,13 + ,18653 + ,65490 + ,38 + ,27 + ,16 + ,18472 + ,80949 + ,30 + ,11 + ,16 + ,30976 + ,76302 + ,26 + ,29 + ,20 + ,63339 + ,104011 + ,67 + ,25 + ,22 + ,25568 + ,98104 + ,132 + ,55 + ,17 + ,33747 + ,67989 + ,42 + ,23 + ,18 + ,4154 + ,30989 + ,35 + ,5 + ,17 + ,19474 + ,135458 + ,118 + ,43 + ,12 + ,35130 + ,73504 + ,68 + ,23 + ,7 + ,39067 + ,63123 + ,43 + ,34 + ,17 + ,13310 + ,61254 + ,76 + ,36 + ,14 + ,65892 + ,74914 + ,64 + ,35 + ,23 + ,4143 + ,31774 + ,48 + ,0 + ,17 + ,28579 + ,81437 + ,64 + ,37 + ,14 + ,51776 + ,87186 + ,56 + ,28 + ,15 + ,21152 + ,50090 + ,71 + ,16 + ,17 + ,38084 + ,65745 + ,75 + ,26 + ,21 + ,27717 + ,56653 + ,39 + ,38 + ,18 + ,32928 + ,158399 + ,42 + ,23 + ,18 + ,11342 + ,46455 + ,39 + ,22 + ,17 + ,19499 + ,73624 + ,93 + ,30 + ,17 + ,16380 + ,38395 + ,38 + ,16 + ,16 + ,36874 + ,91899 + ,60 + ,18 + ,15 + ,48259 + ,139526 + ,71 + ,28 + ,21 + ,16734 + ,52164 + ,52 + ,32 + ,16 + ,28207 + ,51567 + ,27 + ,21 + ,14 + ,30143 + ,70551 + ,59 + ,23 + ,15 + ,41369 + ,84856 + ,40 + ,29 + ,17 + ,45833 + ,102538 + ,79 + ,50 + ,15 + ,29156 + ,86678 + ,44 + ,12 + ,15 + ,35944 + ,85709 + ,65 + ,21 + ,10 + ,36278 + ,34662 + ,10 + ,18 + ,6 + ,45588 + ,150580 + ,124 + ,27 + ,22 + ,45097 + ,99611 + ,81 + ,41 + ,21 + ,3895 + ,19349 + ,15 + ,13 + ,1 + ,28394 + ,99373 + ,92 + ,12 + ,18 + ,18632 + ,86230 + ,42 + ,21 + ,17 + ,2325 + ,30837 + ,10 + ,8 + ,4 + ,25139 + ,31706 + ,24 + ,26 + ,10 + ,27975 + ,89806 + ,64 + ,27 + ,16 + ,14483 + ,62088 + ,45 + ,13 + ,16 + ,13127 + ,40151 + ,22 + ,16 + ,9 + ,5839 + ,27634 + ,56 + ,2 + ,16 + ,24069 + ,76990 + ,94 + ,42 + ,17 + ,3738 + ,37460 + ,19 + ,5 + ,7 + ,18625 + ,54157 + ,35 + ,37 + ,15 + ,36341 + ,49862 + ,32 + ,17 + ,14 + ,24548 + ,84337 + ,35 + ,38 + ,14 + ,21792 + ,64175 + ,48 + ,37 + ,18 + ,26263 + ,59382 + ,49 + ,29 + ,12 + ,23686 + ,119308 + ,48 + ,32 + ,16 + ,49303 + ,76702 + ,62 + ,35 + ,21 + ,25659 + ,103425 + ,96 + ,17 + ,19 + ,28904 + ,70344 + ,45 + ,20 + ,16 + ,2781 + ,43410 + ,63 + ,7 + ,1 + ,29236 + ,104838 + ,71 + ,46 + ,16 + ,19546 + ,62215 + ,26 + ,24 + ,10 + ,22818 + ,69304 + ,48 + ,40 + ,19 + ,32689 + ,53117 + ,29 + ,3 + ,12 + ,5752 + ,19764 + ,19 + ,10 + ,2 + ,22197 + ,86680 + ,45 + ,37 + ,14 + ,20055 + ,84105 + ,45 + ,17 + ,17 + ,25272 + ,77945 + ,67 + ,28 + ,19 + ,82206 + ,89113 + ,30 + ,19 + ,14 + ,32073 + ,91005 + ,36 + ,29 + ,11 + ,5444 + ,40248 + ,34 + ,8 + ,4 + ,20154 + ,64187 + ,36 + ,10 + ,16 + ,36944 + ,50857 + ,34 + ,15 + ,20 + ,8019 + ,56613 + ,37 + ,15 + ,12 + ,30884 + ,62792 + ,46 + ,28 + ,15 + ,19540 + ,72535 + ,44 + ,17 + ,16 + ,27114 + ,98146 + ,37 + ,15 + ,17) + ,dim=c(5 + ,133) + ,dimnames=list(c('Total_size' + ,'Time_RFC' + ,'PR_views' + ,'Blogged' + ,'Reviewed') + ,1:133)) > y <- array(NA,dim=c(5,133),dimnames=list(c('Total_size','Time_RFC','PR_views','Blogged','Reviewed'),1:133)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > 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 Time_RFC Total_size PR_views Blogged Reviewed 1 101645 17140 88 20 11 2 101011 27570 41 30 13 3 7176 1423 1 0 0 4 96560 22996 129 42 17 5 175824 39992 107 57 20 6 341570 117105 190 94 21 7 103597 23789 66 27 16 8 112611 26706 36 46 20 9 85574 24266 71 37 21 10 220801 44418 105 51 18 11 92661 35232 133 40 17 12 133328 40909 79 56 20 13 61361 13294 51 27 12 14 125930 32387 207 37 17 15 82316 21233 34 27 10 16 102010 44332 66 28 13 17 101523 61056 76 59 22 18 41566 13497 42 0 9 19 99923 32334 115 44 25 20 22648 44339 44 12 13 21 46698 10288 35 14 13 22 131698 65622 74 60 19 23 91735 16563 103 7 18 24 79863 29011 134 29 22 25 108043 34553 29 45 14 26 98866 23517 140 25 13 27 120445 51009 72 36 16 28 116048 33416 45 50 20 29 250047 83305 58 41 18 30 136084 27142 69 27 13 31 92499 21399 57 25 18 32 135781 24874 98 45 14 33 74408 34988 61 29 7 34 81240 45549 89 58 17 35 133368 32755 54 37 16 36 79619 20760 123 42 11 37 59194 37636 247 7 24 38 139942 65461 46 54 22 39 118612 30080 72 54 12 40 72880 24094 41 14 19 41 65475 69008 24 16 13 42 99643 54968 45 33 17 43 71965 46090 33 32 15 44 77272 27507 27 21 16 45 49289 10672 36 15 24 46 135131 34029 87 38 15 47 108446 46300 90 22 17 48 89746 24760 114 28 18 49 44296 18779 31 10 20 50 77648 21280 45 31 16 51 181528 40662 69 32 16 52 134019 28987 51 32 18 53 124064 22827 34 43 22 54 92630 18513 60 27 8 55 121848 30594 45 37 17 56 52915 24006 54 20 18 57 81872 27913 25 32 16 58 58981 42744 38 0 23 59 53515 12934 52 5 22 60 60812 22574 67 26 13 61 56375 41385 74 10 13 62 65490 18653 38 27 16 63 80949 18472 30 11 16 64 76302 30976 26 29 20 65 104011 63339 67 25 22 66 98104 25568 132 55 17 67 67989 33747 42 23 18 68 30989 4154 35 5 17 69 135458 19474 118 43 12 70 73504 35130 68 23 7 71 63123 39067 43 34 17 72 61254 13310 76 36 14 73 74914 65892 64 35 23 74 31774 4143 48 0 17 75 81437 28579 64 37 14 76 87186 51776 56 28 15 77 50090 21152 71 16 17 78 65745 38084 75 26 21 79 56653 27717 39 38 18 80 158399 32928 42 23 18 81 46455 11342 39 22 17 82 73624 19499 93 30 17 83 38395 16380 38 16 16 84 91899 36874 60 18 15 85 139526 48259 71 28 21 86 52164 16734 52 32 16 87 51567 28207 27 21 14 88 70551 30143 59 23 15 89 84856 41369 40 29 17 90 102538 45833 79 50 15 91 86678 29156 44 12 15 92 85709 35944 65 21 10 93 34662 36278 10 18 6 94 150580 45588 124 27 22 95 99611 45097 81 41 21 96 19349 3895 15 13 1 97 99373 28394 92 12 18 98 86230 18632 42 21 17 99 30837 2325 10 8 4 100 31706 25139 24 26 10 101 89806 27975 64 27 16 102 62088 14483 45 13 16 103 40151 13127 22 16 9 104 27634 5839 56 2 16 105 76990 24069 94 42 17 106 37460 3738 19 5 7 107 54157 18625 35 37 15 108 49862 36341 32 17 14 109 84337 24548 35 38 14 110 64175 21792 48 37 18 111 59382 26263 49 29 12 112 119308 23686 48 32 16 113 76702 49303 62 35 21 114 103425 25659 96 17 19 115 70344 28904 45 20 16 116 43410 2781 63 7 1 117 104838 29236 71 46 16 118 62215 19546 26 24 10 119 69304 22818 48 40 19 120 53117 32689 29 3 12 121 19764 5752 19 10 2 122 86680 22197 45 37 14 123 84105 20055 45 17 17 124 77945 25272 67 28 19 125 89113 82206 30 19 14 126 91005 32073 36 29 11 127 40248 5444 34 8 4 128 64187 20154 36 10 16 129 50857 36944 34 15 20 130 56613 8019 37 15 12 131 62792 30884 46 28 15 132 72535 19540 44 17 16 133 98146 27114 37 15 17 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Total_size PR_views Blogged Reviewed 8640.072 0.888 232.320 1190.859 223.203 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -61388 -17423 -1806 12537 101115 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 8640.0720 8522.6496 1.014 0.31260 Total_size 0.8880 0.1732 5.127 1.06e-06 *** PR_views 232.3205 73.7294 3.151 0.00203 ** Blogged 1190.8593 198.0295 6.014 1.77e-08 *** Reviewed 223.2034 581.7239 0.384 0.70184 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 28110 on 128 degrees of freedom Multiple R-squared: 0.6051, Adjusted R-squared: 0.5928 F-statistic: 49.03 on 4 and 128 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.3046620 6.093239e-01 6.953380e-01 [2,] 0.3347316 6.694632e-01 6.652684e-01 [3,] 0.7969376 4.061247e-01 2.030624e-01 [4,] 0.8682211 2.635578e-01 1.317789e-01 [5,] 0.8529416 2.941167e-01 1.470584e-01 [6,] 0.7927150 4.145699e-01 2.072850e-01 [7,] 0.7146080 5.707841e-01 2.853920e-01 [8,] 0.6306790 7.386421e-01 3.693210e-01 [9,] 0.5999679 8.000641e-01 4.000321e-01 [10,] 0.9087789 1.824421e-01 9.122106e-02 [11,] 0.8879649 2.240702e-01 1.120351e-01 [12,] 0.8494132 3.011735e-01 1.505868e-01 [13,] 0.8734420 2.531160e-01 1.265580e-01 [14,] 0.8405427 3.189145e-01 1.594573e-01 [15,] 0.8701652 2.596696e-01 1.298348e-01 [16,] 0.9366611 1.266778e-01 6.333891e-02 [17,] 0.9210833 1.578333e-01 7.891666e-02 [18,] 0.8940110 2.119780e-01 1.059890e-01 [19,] 0.8642146 2.715708e-01 1.357854e-01 [20,] 0.8268983 3.462034e-01 1.731017e-01 [21,] 0.7832847 4.334307e-01 2.167153e-01 [22,] 0.9906099 1.878027e-02 9.390133e-03 [23,] 0.9956870 8.626064e-03 4.313032e-03 [24,] 0.9945928 1.081442e-02 5.407208e-03 [25,] 0.9940596 1.188072e-02 5.940358e-03 [26,] 0.9941973 1.160547e-02 5.802734e-03 [27,] 0.9987964 2.407250e-03 1.203625e-03 [28,] 0.9990413 1.917302e-03 9.586511e-04 [29,] 0.9988779 2.244290e-03 1.122145e-03 [30,] 0.9996826 6.348768e-04 3.174384e-04 [31,] 0.9996055 7.890097e-04 3.945049e-04 [32,] 0.9994065 1.186986e-03 5.934928e-04 [33,] 0.9991144 1.771141e-03 8.855706e-04 [34,] 0.9994293 1.141403e-03 5.707017e-04 [35,] 0.9991838 1.632346e-03 8.161728e-04 [36,] 0.9991048 1.790329e-03 8.951645e-04 [37,] 0.9986990 2.602067e-03 1.301034e-03 [38,] 0.9981104 3.779219e-03 1.889610e-03 [39,] 0.9981398 3.720370e-03 1.860185e-03 [40,] 0.9972883 5.423480e-03 2.711740e-03 [41,] 0.9960969 7.806169e-03 3.903084e-03 [42,] 0.9945208 1.095842e-02 5.479212e-03 [43,] 0.9921203 1.575943e-02 7.879715e-03 [44,] 0.9996980 6.039430e-04 3.019715e-04 [45,] 0.9998974 2.051061e-04 1.025530e-04 [46,] 0.9999392 1.216858e-04 6.084292e-05 [47,] 0.9999280 1.440442e-04 7.202210e-05 [48,] 0.9999562 8.757716e-05 4.378858e-05 [49,] 0.9999438 1.124946e-04 5.624732e-05 [50,] 0.9999193 1.613399e-04 8.066993e-05 [51,] 0.9998777 2.445582e-04 1.222791e-04 [52,] 0.9998213 3.574251e-04 1.787126e-04 [53,] 0.9997649 4.701571e-04 2.350785e-04 [54,] 0.9997734 4.532596e-04 2.266298e-04 [55,] 0.9996436 7.128538e-04 3.564269e-04 [56,] 0.9996820 6.360649e-04 3.180325e-04 [57,] 0.9995304 9.391497e-04 4.695748e-04 [58,] 0.9992976 1.404743e-03 7.023716e-04 [59,] 0.9993908 1.218307e-03 6.091534e-04 [60,] 0.9991057 1.788630e-03 8.943149e-04 [61,] 0.9987358 2.528447e-03 1.264223e-03 [62,] 0.9989468 2.106371e-03 1.053185e-03 [63,] 0.9984804 3.039293e-03 1.519647e-03 [64,] 0.9985425 2.915013e-03 1.457506e-03 [65,] 0.9982576 3.484838e-03 1.742419e-03 [66,] 0.9993412 1.317613e-03 6.588067e-04 [67,] 0.9991780 1.644069e-03 8.220346e-04 [68,] 0.9988017 2.396564e-03 1.198282e-03 [69,] 0.9983057 3.388634e-03 1.694317e-03 [70,] 0.9983898 3.220479e-03 1.610240e-03 [71,] 0.9988946 2.210835e-03 1.105418e-03 [72,] 0.9989079 2.184112e-03 1.092056e-03 [73,] 0.9999966 6.849314e-06 3.424657e-06 [74,] 0.9999946 1.087564e-05 5.437819e-06 [75,] 0.9999940 1.194388e-05 5.971941e-06 [76,] 0.9999937 1.269203e-05 6.346013e-06 [77,] 0.9999888 2.230036e-05 1.115018e-05 [78,] 0.9999958 8.424346e-06 4.212173e-06 [79,] 0.9999957 8.575637e-06 4.287819e-06 [80,] 0.9999928 1.443775e-05 7.218873e-06 [81,] 0.9999875 2.498265e-05 1.249133e-05 [82,] 0.9999771 4.575960e-05 2.287980e-05 [83,] 0.9999636 7.273610e-05 3.636805e-05 [84,] 0.9999575 8.502007e-05 4.251003e-05 [85,] 0.9999239 1.521869e-04 7.609344e-05 [86,] 0.9998952 2.095039e-04 1.047519e-04 [87,] 0.9999243 1.514681e-04 7.573404e-05 [88,] 0.9998747 2.506832e-04 1.253416e-04 [89,] 0.9997906 4.187811e-04 2.093905e-04 [90,] 0.9997032 5.936445e-04 2.968223e-04 [91,] 0.9996590 6.819694e-04 3.409847e-04 [92,] 0.9993869 1.226236e-03 6.131181e-04 [93,] 0.9995828 8.343410e-04 4.171705e-04 [94,] 0.9993147 1.370540e-03 6.852699e-04 [95,] 0.9987834 2.433139e-03 1.216570e-03 [96,] 0.9979952 4.009569e-03 2.004784e-03 [97,] 0.9984952 3.009623e-03 1.504811e-03 [98,] 0.9985452 2.909686e-03 1.454843e-03 [99,] 0.9974074 5.185188e-03 2.592594e-03 [100,] 0.9969277 6.144623e-03 3.072311e-03 [101,] 0.9961072 7.785624e-03 3.892812e-03 [102,] 0.9936999 1.260025e-02 6.300125e-03 [103,] 0.9927687 1.446270e-02 7.231349e-03 [104,] 0.9905963 1.880746e-02 9.403730e-03 [105,] 0.9978325 4.335075e-03 2.167537e-03 [106,] 0.9985783 2.843427e-03 1.421714e-03 [107,] 0.9973487 5.302631e-03 2.651316e-03 [108,] 0.9945919 1.081630e-02 5.408148e-03 [109,] 0.9895238 2.095234e-02 1.047617e-02 [110,] 0.9808615 3.827700e-02 1.913850e-02 [111,] 0.9647560 7.048791e-02 3.524395e-02 [112,] 0.9595868 8.082636e-02 4.041318e-02 [113,] 0.9260958 1.478084e-01 7.390418e-02 [114,] 0.9190351 1.619297e-01 8.096487e-02 [115,] 0.8553614 2.892772e-01 1.446386e-01 [116,] 0.8024788 3.950424e-01 1.975212e-01 [117,] 0.6784655 6.430689e-01 3.215345e-01 [118,] 0.5249161 9.501679e-01 4.750839e-01 > postscript(file="/var/wessaorg/rcomp/tmp/1m7bo1324044221.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/wessaorg/rcomp/tmp/27au71324044221.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/wessaorg/rcomp/tmp/31pjw1324044221.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/wessaorg/rcomp/tmp/43lal1324044221.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/wessaorg/rcomp/tmp/5g5v71324044221.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 = 133 Frequency = 1 1 2 3 4 5 6 31068.0117 19736.2541 -2960.0138 -16280.3720 34469.7621 68171.9609 7 8 9 10 11 12 22774.7304 12648.9134 -9858.0577 83572.6862 -29592.4805 -1144.6990 13 14 15 16 17 18 -5764.1080 -7416.2644 12536.9300 2424.3355 -54162.2209 9174.3255 19 20 21 22 23 24 -22124.3577 -52779.0800 1217.3105 -28098.4285 32104.3268 -25115.1288 25 26 27 28 29 30 5269.1153 4144.8782 3339.7639 3273.1241 101114.7593 52256.9214 31 32 33 34 35 36 17825.2423 25571.9351 -15570.2462 -61388.3238 35463.1916 -28502.6646 37 38 39 40 41 42 -53942.8300 -6730.9411 -450.9776 12406.4647 -31975.1336 -11355.7927 43 44 45 46 47 48 -26725.0331 9353.8088 -411.0982 27460.6496 7789.4057 -4727.1658 49 50 51 52 53 54 -4594.3863 -830.9892 79071.2796 45665.0200 31137.2704 19672.3589 55 56 57 58 59 60 27729.8366 -17422.5106 958.4697 -1577.5219 10444.1224 -17303.2027 61 62 63 64 65 66 -21016.8297 -4266.5372 32265.5040 -4884.0247 -11121.4183 -33198.4362 67 68 69 70 71 72 -11783.2326 780.2116 28225.8407 -11081.4294 -34481.9526 -22857.4693 73 74 75 76 77 78 -53920.3130 4509.1098 -14636.3263 -17133.1245 -16675.9715 -29787.2452 79 80 81 82 83 84 -34930.5326 79354.0379 -11310.6100 -13457.1924 -16243.6646 11792.1353 85 86 87 88 89 90 33505.9370 -25095.2525 -16526.3831 -9300.7255 -8141.8661 -28046.0287 91 92 93 94 95 96 24286.9890 2809.8101 -31290.7623 35586.4497 -21405.5894 -11939.0071 97 98 99 100 101 102 25837.6495 22484.7814 7389.4389 -38027.5264 5731.2112 11080.2024 103 104 105 106 107 108 -6319.4548 -5154.0143 -28671.9766 13569.7809 -26563.1019 -21852.5251 109 110 111 112 113 114 -2610.3708 -23047.1687 -21176.6336 36804.6664 -36490.2640 25211.5423 115 116 117 118 119 120 -1805.6342 9104.9951 -4609.1256 -634.8751 -22625.0362 2460.8434 121 122 123 124 125 126 -10752.9270 687.9672 23162.6360 -6286.9609 -25246.6375 8530.4671 127 128 129 130 131 132 8455.0808 13806.8275 -20815.1307 11714.8813 -20651.8624 12505.4789 133 35175.5398 > postscript(file="/var/wessaorg/rcomp/tmp/6tser1324044221.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 = 133 Frequency = 1 lag(myerror, k = 1) myerror 0 31068.0117 NA 1 19736.2541 31068.0117 2 -2960.0138 19736.2541 3 -16280.3720 -2960.0138 4 34469.7621 -16280.3720 5 68171.9609 34469.7621 6 22774.7304 68171.9609 7 12648.9134 22774.7304 8 -9858.0577 12648.9134 9 83572.6862 -9858.0577 10 -29592.4805 83572.6862 11 -1144.6990 -29592.4805 12 -5764.1080 -1144.6990 13 -7416.2644 -5764.1080 14 12536.9300 -7416.2644 15 2424.3355 12536.9300 16 -54162.2209 2424.3355 17 9174.3255 -54162.2209 18 -22124.3577 9174.3255 19 -52779.0800 -22124.3577 20 1217.3105 -52779.0800 21 -28098.4285 1217.3105 22 32104.3268 -28098.4285 23 -25115.1288 32104.3268 24 5269.1153 -25115.1288 25 4144.8782 5269.1153 26 3339.7639 4144.8782 27 3273.1241 3339.7639 28 101114.7593 3273.1241 29 52256.9214 101114.7593 30 17825.2423 52256.9214 31 25571.9351 17825.2423 32 -15570.2462 25571.9351 33 -61388.3238 -15570.2462 34 35463.1916 -61388.3238 35 -28502.6646 35463.1916 36 -53942.8300 -28502.6646 37 -6730.9411 -53942.8300 38 -450.9776 -6730.9411 39 12406.4647 -450.9776 40 -31975.1336 12406.4647 41 -11355.7927 -31975.1336 42 -26725.0331 -11355.7927 43 9353.8088 -26725.0331 44 -411.0982 9353.8088 45 27460.6496 -411.0982 46 7789.4057 27460.6496 47 -4727.1658 7789.4057 48 -4594.3863 -4727.1658 49 -830.9892 -4594.3863 50 79071.2796 -830.9892 51 45665.0200 79071.2796 52 31137.2704 45665.0200 53 19672.3589 31137.2704 54 27729.8366 19672.3589 55 -17422.5106 27729.8366 56 958.4697 -17422.5106 57 -1577.5219 958.4697 58 10444.1224 -1577.5219 59 -17303.2027 10444.1224 60 -21016.8297 -17303.2027 61 -4266.5372 -21016.8297 62 32265.5040 -4266.5372 63 -4884.0247 32265.5040 64 -11121.4183 -4884.0247 65 -33198.4362 -11121.4183 66 -11783.2326 -33198.4362 67 780.2116 -11783.2326 68 28225.8407 780.2116 69 -11081.4294 28225.8407 70 -34481.9526 -11081.4294 71 -22857.4693 -34481.9526 72 -53920.3130 -22857.4693 73 4509.1098 -53920.3130 74 -14636.3263 4509.1098 75 -17133.1245 -14636.3263 76 -16675.9715 -17133.1245 77 -29787.2452 -16675.9715 78 -34930.5326 -29787.2452 79 79354.0379 -34930.5326 80 -11310.6100 79354.0379 81 -13457.1924 -11310.6100 82 -16243.6646 -13457.1924 83 11792.1353 -16243.6646 84 33505.9370 11792.1353 85 -25095.2525 33505.9370 86 -16526.3831 -25095.2525 87 -9300.7255 -16526.3831 88 -8141.8661 -9300.7255 89 -28046.0287 -8141.8661 90 24286.9890 -28046.0287 91 2809.8101 24286.9890 92 -31290.7623 2809.8101 93 35586.4497 -31290.7623 94 -21405.5894 35586.4497 95 -11939.0071 -21405.5894 96 25837.6495 -11939.0071 97 22484.7814 25837.6495 98 7389.4389 22484.7814 99 -38027.5264 7389.4389 100 5731.2112 -38027.5264 101 11080.2024 5731.2112 102 -6319.4548 11080.2024 103 -5154.0143 -6319.4548 104 -28671.9766 -5154.0143 105 13569.7809 -28671.9766 106 -26563.1019 13569.7809 107 -21852.5251 -26563.1019 108 -2610.3708 -21852.5251 109 -23047.1687 -2610.3708 110 -21176.6336 -23047.1687 111 36804.6664 -21176.6336 112 -36490.2640 36804.6664 113 25211.5423 -36490.2640 114 -1805.6342 25211.5423 115 9104.9951 -1805.6342 116 -4609.1256 9104.9951 117 -634.8751 -4609.1256 118 -22625.0362 -634.8751 119 2460.8434 -22625.0362 120 -10752.9270 2460.8434 121 687.9672 -10752.9270 122 23162.6360 687.9672 123 -6286.9609 23162.6360 124 -25246.6375 -6286.9609 125 8530.4671 -25246.6375 126 8455.0808 8530.4671 127 13806.8275 8455.0808 128 -20815.1307 13806.8275 129 11714.8813 -20815.1307 130 -20651.8624 11714.8813 131 12505.4789 -20651.8624 132 35175.5398 12505.4789 133 NA 35175.5398 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 19736.2541 31068.0117 [2,] -2960.0138 19736.2541 [3,] -16280.3720 -2960.0138 [4,] 34469.7621 -16280.3720 [5,] 68171.9609 34469.7621 [6,] 22774.7304 68171.9609 [7,] 12648.9134 22774.7304 [8,] -9858.0577 12648.9134 [9,] 83572.6862 -9858.0577 [10,] -29592.4805 83572.6862 [11,] -1144.6990 -29592.4805 [12,] -5764.1080 -1144.6990 [13,] -7416.2644 -5764.1080 [14,] 12536.9300 -7416.2644 [15,] 2424.3355 12536.9300 [16,] -54162.2209 2424.3355 [17,] 9174.3255 -54162.2209 [18,] -22124.3577 9174.3255 [19,] -52779.0800 -22124.3577 [20,] 1217.3105 -52779.0800 [21,] -28098.4285 1217.3105 [22,] 32104.3268 -28098.4285 [23,] -25115.1288 32104.3268 [24,] 5269.1153 -25115.1288 [25,] 4144.8782 5269.1153 [26,] 3339.7639 4144.8782 [27,] 3273.1241 3339.7639 [28,] 101114.7593 3273.1241 [29,] 52256.9214 101114.7593 [30,] 17825.2423 52256.9214 [31,] 25571.9351 17825.2423 [32,] -15570.2462 25571.9351 [33,] -61388.3238 -15570.2462 [34,] 35463.1916 -61388.3238 [35,] -28502.6646 35463.1916 [36,] -53942.8300 -28502.6646 [37,] -6730.9411 -53942.8300 [38,] -450.9776 -6730.9411 [39,] 12406.4647 -450.9776 [40,] -31975.1336 12406.4647 [41,] -11355.7927 -31975.1336 [42,] -26725.0331 -11355.7927 [43,] 9353.8088 -26725.0331 [44,] -411.0982 9353.8088 [45,] 27460.6496 -411.0982 [46,] 7789.4057 27460.6496 [47,] -4727.1658 7789.4057 [48,] -4594.3863 -4727.1658 [49,] -830.9892 -4594.3863 [50,] 79071.2796 -830.9892 [51,] 45665.0200 79071.2796 [52,] 31137.2704 45665.0200 [53,] 19672.3589 31137.2704 [54,] 27729.8366 19672.3589 [55,] -17422.5106 27729.8366 [56,] 958.4697 -17422.5106 [57,] -1577.5219 958.4697 [58,] 10444.1224 -1577.5219 [59,] -17303.2027 10444.1224 [60,] -21016.8297 -17303.2027 [61,] -4266.5372 -21016.8297 [62,] 32265.5040 -4266.5372 [63,] -4884.0247 32265.5040 [64,] -11121.4183 -4884.0247 [65,] -33198.4362 -11121.4183 [66,] -11783.2326 -33198.4362 [67,] 780.2116 -11783.2326 [68,] 28225.8407 780.2116 [69,] -11081.4294 28225.8407 [70,] -34481.9526 -11081.4294 [71,] -22857.4693 -34481.9526 [72,] -53920.3130 -22857.4693 [73,] 4509.1098 -53920.3130 [74,] -14636.3263 4509.1098 [75,] -17133.1245 -14636.3263 [76,] -16675.9715 -17133.1245 [77,] -29787.2452 -16675.9715 [78,] -34930.5326 -29787.2452 [79,] 79354.0379 -34930.5326 [80,] -11310.6100 79354.0379 [81,] -13457.1924 -11310.6100 [82,] -16243.6646 -13457.1924 [83,] 11792.1353 -16243.6646 [84,] 33505.9370 11792.1353 [85,] -25095.2525 33505.9370 [86,] -16526.3831 -25095.2525 [87,] -9300.7255 -16526.3831 [88,] -8141.8661 -9300.7255 [89,] -28046.0287 -8141.8661 [90,] 24286.9890 -28046.0287 [91,] 2809.8101 24286.9890 [92,] -31290.7623 2809.8101 [93,] 35586.4497 -31290.7623 [94,] -21405.5894 35586.4497 [95,] -11939.0071 -21405.5894 [96,] 25837.6495 -11939.0071 [97,] 22484.7814 25837.6495 [98,] 7389.4389 22484.7814 [99,] -38027.5264 7389.4389 [100,] 5731.2112 -38027.5264 [101,] 11080.2024 5731.2112 [102,] -6319.4548 11080.2024 [103,] -5154.0143 -6319.4548 [104,] -28671.9766 -5154.0143 [105,] 13569.7809 -28671.9766 [106,] -26563.1019 13569.7809 [107,] -21852.5251 -26563.1019 [108,] -2610.3708 -21852.5251 [109,] -23047.1687 -2610.3708 [110,] -21176.6336 -23047.1687 [111,] 36804.6664 -21176.6336 [112,] -36490.2640 36804.6664 [113,] 25211.5423 -36490.2640 [114,] -1805.6342 25211.5423 [115,] 9104.9951 -1805.6342 [116,] -4609.1256 9104.9951 [117,] -634.8751 -4609.1256 [118,] -22625.0362 -634.8751 [119,] 2460.8434 -22625.0362 [120,] -10752.9270 2460.8434 [121,] 687.9672 -10752.9270 [122,] 23162.6360 687.9672 [123,] -6286.9609 23162.6360 [124,] -25246.6375 -6286.9609 [125,] 8530.4671 -25246.6375 [126,] 8455.0808 8530.4671 [127,] 13806.8275 8455.0808 [128,] -20815.1307 13806.8275 [129,] 11714.8813 -20815.1307 [130,] -20651.8624 11714.8813 [131,] 12505.4789 -20651.8624 [132,] 35175.5398 12505.4789 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 19736.2541 31068.0117 2 -2960.0138 19736.2541 3 -16280.3720 -2960.0138 4 34469.7621 -16280.3720 5 68171.9609 34469.7621 6 22774.7304 68171.9609 7 12648.9134 22774.7304 8 -9858.0577 12648.9134 9 83572.6862 -9858.0577 10 -29592.4805 83572.6862 11 -1144.6990 -29592.4805 12 -5764.1080 -1144.6990 13 -7416.2644 -5764.1080 14 12536.9300 -7416.2644 15 2424.3355 12536.9300 16 -54162.2209 2424.3355 17 9174.3255 -54162.2209 18 -22124.3577 9174.3255 19 -52779.0800 -22124.3577 20 1217.3105 -52779.0800 21 -28098.4285 1217.3105 22 32104.3268 -28098.4285 23 -25115.1288 32104.3268 24 5269.1153 -25115.1288 25 4144.8782 5269.1153 26 3339.7639 4144.8782 27 3273.1241 3339.7639 28 101114.7593 3273.1241 29 52256.9214 101114.7593 30 17825.2423 52256.9214 31 25571.9351 17825.2423 32 -15570.2462 25571.9351 33 -61388.3238 -15570.2462 34 35463.1916 -61388.3238 35 -28502.6646 35463.1916 36 -53942.8300 -28502.6646 37 -6730.9411 -53942.8300 38 -450.9776 -6730.9411 39 12406.4647 -450.9776 40 -31975.1336 12406.4647 41 -11355.7927 -31975.1336 42 -26725.0331 -11355.7927 43 9353.8088 -26725.0331 44 -411.0982 9353.8088 45 27460.6496 -411.0982 46 7789.4057 27460.6496 47 -4727.1658 7789.4057 48 -4594.3863 -4727.1658 49 -830.9892 -4594.3863 50 79071.2796 -830.9892 51 45665.0200 79071.2796 52 31137.2704 45665.0200 53 19672.3589 31137.2704 54 27729.8366 19672.3589 55 -17422.5106 27729.8366 56 958.4697 -17422.5106 57 -1577.5219 958.4697 58 10444.1224 -1577.5219 59 -17303.2027 10444.1224 60 -21016.8297 -17303.2027 61 -4266.5372 -21016.8297 62 32265.5040 -4266.5372 63 -4884.0247 32265.5040 64 -11121.4183 -4884.0247 65 -33198.4362 -11121.4183 66 -11783.2326 -33198.4362 67 780.2116 -11783.2326 68 28225.8407 780.2116 69 -11081.4294 28225.8407 70 -34481.9526 -11081.4294 71 -22857.4693 -34481.9526 72 -53920.3130 -22857.4693 73 4509.1098 -53920.3130 74 -14636.3263 4509.1098 75 -17133.1245 -14636.3263 76 -16675.9715 -17133.1245 77 -29787.2452 -16675.9715 78 -34930.5326 -29787.2452 79 79354.0379 -34930.5326 80 -11310.6100 79354.0379 81 -13457.1924 -11310.6100 82 -16243.6646 -13457.1924 83 11792.1353 -16243.6646 84 33505.9370 11792.1353 85 -25095.2525 33505.9370 86 -16526.3831 -25095.2525 87 -9300.7255 -16526.3831 88 -8141.8661 -9300.7255 89 -28046.0287 -8141.8661 90 24286.9890 -28046.0287 91 2809.8101 24286.9890 92 -31290.7623 2809.8101 93 35586.4497 -31290.7623 94 -21405.5894 35586.4497 95 -11939.0071 -21405.5894 96 25837.6495 -11939.0071 97 22484.7814 25837.6495 98 7389.4389 22484.7814 99 -38027.5264 7389.4389 100 5731.2112 -38027.5264 101 11080.2024 5731.2112 102 -6319.4548 11080.2024 103 -5154.0143 -6319.4548 104 -28671.9766 -5154.0143 105 13569.7809 -28671.9766 106 -26563.1019 13569.7809 107 -21852.5251 -26563.1019 108 -2610.3708 -21852.5251 109 -23047.1687 -2610.3708 110 -21176.6336 -23047.1687 111 36804.6664 -21176.6336 112 -36490.2640 36804.6664 113 25211.5423 -36490.2640 114 -1805.6342 25211.5423 115 9104.9951 -1805.6342 116 -4609.1256 9104.9951 117 -634.8751 -4609.1256 118 -22625.0362 -634.8751 119 2460.8434 -22625.0362 120 -10752.9270 2460.8434 121 687.9672 -10752.9270 122 23162.6360 687.9672 123 -6286.9609 23162.6360 124 -25246.6375 -6286.9609 125 8530.4671 -25246.6375 126 8455.0808 8530.4671 127 13806.8275 8455.0808 128 -20815.1307 13806.8275 129 11714.8813 -20815.1307 130 -20651.8624 11714.8813 131 12505.4789 -20651.8624 132 35175.5398 12505.4789 > 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/wessaorg/rcomp/tmp/704k81324044221.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/wessaorg/rcomp/tmp/8v0bh1324044221.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/wessaorg/rcomp/tmp/98n6f1324044221.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/wessaorg/rcomp/tmp/10x0nz1324044221.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11q6vt1324044221.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/wessaorg/rcomp/tmp/12s6f91324044221.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/wessaorg/rcomp/tmp/13cag51324044221.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/wessaorg/rcomp/tmp/142vx31324044221.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/wessaorg/rcomp/tmp/150hcv1324044221.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/wessaorg/rcomp/tmp/16indr1324044221.tab") + } > > try(system("convert tmp/1m7bo1324044221.ps tmp/1m7bo1324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/27au71324044221.ps tmp/27au71324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/31pjw1324044221.ps tmp/31pjw1324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/43lal1324044221.ps tmp/43lal1324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/5g5v71324044221.ps tmp/5g5v71324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/6tser1324044221.ps tmp/6tser1324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/704k81324044221.ps tmp/704k81324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/8v0bh1324044221.ps tmp/8v0bh1324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/98n6f1324044221.ps tmp/98n6f1324044221.png",intern=TRUE)) character(0) > try(system("convert tmp/10x0nz1324044221.ps tmp/10x0nz1324044221.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.285 0.593 4.901