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(4 + ,4 + ,1 + ,4 + ,5 + ,4 + ,2 + ,1 + ,4 + ,4 + ,4 + ,3 + ,2 + ,5 + ,5 + ,4 + ,2 + ,1 + ,3 + ,4 + ,4 + ,2 + ,2 + ,4 + ,3 + ,5 + ,2 + ,1 + ,3 + ,5 + ,4 + ,1 + ,3 + ,4 + ,4 + ,3 + ,1 + ,1 + ,3 + ,4 + ,4 + ,1 + ,1 + ,2 + ,4 + ,4 + ,2 + ,1 + ,4 + ,4 + ,4 + ,2 + ,2 + ,2 + ,4 + ,4 + ,2 + ,4 + ,2 + ,4 + ,4 + ,2 + ,2 + ,2 + ,4 + ,2 + ,2 + ,1 + ,1 + ,3 + ,3 + ,1 + ,1 + ,4 + ,4 + ,4 + ,3 + ,3 + ,4 + ,5 + ,3 + ,2 + ,2 + ,2 + ,4 + ,2 + ,2 + ,2 + ,2 + ,2 + ,4 + ,2 + ,3 + ,3 + ,4 + ,3 + ,2 + ,3 + ,3 + ,4 + ,3 + ,3 + ,1 + ,3 + ,4 + ,4 + ,4 + ,2 + ,4 + ,4 + ,3 + ,2 + ,2 + ,3 + ,4 + ,3 + ,2 + ,2 + ,2 + ,4 + ,4 + ,2 + ,2 + ,2 + ,5 + ,4 + ,1 + ,3 + ,4 + ,4 + ,4 + ,2 + ,2 + ,4 + ,4 + ,4 + ,2 + ,2 + ,3 + ,4 + ,4 + ,2 + ,2 + ,4 + ,4 + ,4 + ,2 + ,2 + ,2 + ,4 + ,5 + ,4 + ,2 + ,4 + ,5 + ,4 + ,2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,3 + ,4 + ,2 + ,3 + ,2 + ,2 + ,3 + ,4 + ,4 + ,4 + ,2 + ,2 + ,4 + ,4 + ,2 + ,2 + ,4 + ,4 + ,3 + ,4 + ,4 + ,2 + ,4) + ,dim=c(5 + ,159) + ,dimnames=list(c('neat' + ,'fail' + ,'performance' + ,'goals' + ,'organized ') + ,1:159)) > y <- array(NA,dim=c(5,159),dimnames=list(c('neat','fail','performance','goals','organized '),1:159)) > 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 neat fail performance goals organized\r\r M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 1 4 4 1 4 5 1 0 0 0 0 0 0 0 0 0 2 4 2 1 4 4 0 1 0 0 0 0 0 0 0 0 3 4 3 2 5 5 0 0 1 0 0 0 0 0 0 0 4 4 2 1 3 4 0 0 0 1 0 0 0 0 0 0 5 4 2 2 4 3 0 0 0 0 1 0 0 0 0 0 6 5 2 1 3 5 0 0 0 0 0 1 0 0 0 0 7 4 1 3 4 4 0 0 0 0 0 0 1 0 0 0 8 3 1 1 3 4 0 0 0 0 0 0 0 1 0 0 9 4 1 1 2 4 0 0 0 0 0 0 0 0 1 0 10 4 2 1 4 4 0 0 0 0 0 0 0 0 0 1 11 4 2 2 2 4 0 0 0 0 0 0 0 0 0 0 12 4 2 4 2 4 0 0 0 0 0 0 0 0 0 0 13 4 2 2 2 4 1 0 0 0 0 0 0 0 0 0 14 2 2 1 1 3 0 1 0 0 0 0 0 0 0 0 15 3 1 1 4 4 0 0 1 0 0 0 0 0 0 0 16 4 3 3 4 5 0 0 0 1 0 0 0 0 0 0 17 3 2 2 2 4 0 0 0 0 1 0 0 0 0 0 18 2 2 2 2 2 0 0 0 0 0 1 0 0 0 0 19 4 2 3 3 4 0 0 0 0 0 0 1 0 0 0 20 3 2 3 3 4 0 0 0 0 0 0 0 1 0 0 21 3 3 1 3 4 0 0 0 0 0 0 0 0 1 0 22 4 4 2 4 4 0 0 0 0 0 0 0 0 0 1 23 3 2 2 3 4 0 0 0 0 0 0 0 0 0 0 24 3 2 2 2 4 0 0 0 0 0 0 0 0 0 0 25 4 2 2 2 5 1 0 0 0 0 0 0 0 0 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0 154 2 2 2 2 3 0 0 0 0 0 0 0 0 0 1 155 3 3 4 2 3 0 0 0 0 0 0 0 0 0 0 156 2 2 3 4 4 0 0 0 0 0 0 0 0 0 0 157 4 2 2 4 4 1 0 0 0 0 0 0 0 0 0 158 2 2 4 4 3 0 1 0 0 0 0 0 0 0 0 159 4 4 2 4 4 0 0 1 0 0 0 0 0 0 0 M11 t 1 0 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 7 8 0 8 9 0 9 10 0 10 11 1 11 12 0 12 13 0 13 14 0 14 15 0 15 16 0 16 17 0 17 18 0 18 19 0 19 20 0 20 21 0 21 22 0 22 23 1 23 24 0 24 25 0 25 26 0 26 27 0 27 28 0 28 29 0 29 30 0 30 31 0 31 32 0 32 33 0 33 34 0 34 35 1 35 36 0 36 37 0 37 38 0 38 39 0 39 40 0 40 41 0 41 42 0 42 43 0 43 44 0 44 45 0 45 46 0 46 47 1 47 48 0 48 49 0 49 50 0 50 51 0 51 52 0 52 53 0 53 54 0 54 55 0 55 56 0 56 57 0 57 58 0 58 59 1 59 60 0 60 61 0 61 62 0 62 63 0 63 64 0 64 65 0 65 66 0 66 67 0 67 68 0 68 69 0 69 70 0 70 71 1 71 72 0 72 73 0 73 74 0 74 75 0 75 76 0 76 77 0 77 78 0 78 79 0 79 80 0 80 81 0 81 82 0 82 83 1 83 84 0 84 85 0 85 86 0 86 87 0 87 88 0 88 89 0 89 90 0 90 91 0 91 92 0 92 93 0 93 94 0 94 95 1 95 96 0 96 97 0 97 98 0 98 99 0 99 100 0 100 101 0 101 102 0 102 103 0 103 104 0 104 105 0 105 106 0 106 107 1 107 108 0 108 109 0 109 110 0 110 111 0 111 112 0 112 113 0 113 114 0 114 115 0 115 116 0 116 117 0 117 118 0 118 119 1 119 120 0 120 121 0 121 122 0 122 123 0 123 124 0 124 125 0 125 126 0 126 127 0 127 128 0 128 129 0 129 130 0 130 131 1 131 132 0 132 133 0 133 134 0 134 135 0 135 136 0 136 137 0 137 138 0 138 139 0 139 140 0 140 141 0 141 142 0 142 143 1 143 144 0 144 145 0 145 146 0 146 147 0 147 148 0 148 149 0 149 150 0 150 151 0 151 152 0 152 153 0 153 154 0 154 155 1 155 156 0 156 157 0 157 158 0 158 159 0 159 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) fail performance goals 1.912489 0.225827 -0.015170 0.040702 `organized\r\r` M1 M2 M3 0.408125 -0.108520 -0.320678 -0.052393 M4 M5 M6 M7 -0.100794 -0.040850 -0.325278 -0.129585 M8 M9 M10 M11 -0.168273 0.353475 0.368840 0.095310 t -0.009109 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.72135 -0.67005 0.09738 0.59278 1.72298 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.912489 0.506351 3.777 0.000233 *** fail 0.225827 0.070489 3.204 0.001675 ** performance -0.015170 0.078959 -0.192 0.847924 goals 0.040702 0.074355 0.547 0.584962 `organized\r\r` 0.408125 0.086822 4.701 6.07e-06 *** M1 -0.108520 0.316100 -0.343 0.731873 M2 -0.320678 0.314246 -1.020 0.309242 M3 -0.052393 0.320743 -0.163 0.870477 M4 -0.100794 0.321759 -0.313 0.754542 M5 -0.040850 0.322792 -0.127 0.899474 M6 -0.325278 0.320407 -1.015 0.311736 M7 -0.129585 0.325230 -0.398 0.690903 M8 -0.168273 0.323169 -0.521 0.603388 M9 0.353475 0.320861 1.102 0.272479 M10 0.368840 0.323868 1.139 0.256679 M11 0.095310 0.320917 0.297 0.766906 t -0.009109 0.001620 -5.623 9.62e-08 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.8129 on 142 degrees of freedom Multiple R-squared: 0.4381, Adjusted R-squared: 0.3748 F-statistic: 6.919 on 16 and 142 DF, p-value: 1.572e-11 > 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,] 4.286681e-01 0.8573362781 0.5713319 [2,] 2.773360e-01 0.5546720916 0.7226640 [3,] 2.407609e-01 0.4815218970 0.7592391 [4,] 1.775048e-01 0.3550096360 0.8224952 [5,] 1.103886e-01 0.2207772719 0.8896114 [6,] 6.635468e-02 0.1327093579 0.9336453 [7,] 4.059481e-02 0.0811896146 0.9594052 [8,] 1.070945e-01 0.2141889261 0.8929055 [9,] 9.134332e-02 0.1826866382 0.9086567 [10,] 6.079812e-02 0.1215962486 0.9392019 [11,] 4.295512e-02 0.0859102312 0.9570449 [12,] 5.642021e-02 0.1128404159 0.9435798 [13,] 5.162019e-02 0.1032403720 0.9483798 [14,] 5.519508e-02 0.1103901525 0.9448049 [15,] 5.872681e-02 0.1174536142 0.9412732 [16,] 6.168142e-02 0.1233628412 0.9383186 [17,] 4.511355e-02 0.0902270917 0.9548865 [18,] 5.046566e-02 0.1009313127 0.9495343 [19,] 5.898361e-02 0.1179672275 0.9410164 [20,] 4.933708e-02 0.0986741602 0.9506629 [21,] 4.392834e-02 0.0878566899 0.9560717 [22,] 3.589711e-02 0.0717942131 0.9641029 [23,] 2.425397e-02 0.0485079451 0.9757460 [24,] 2.037271e-02 0.0407454222 0.9796273 [25,] 1.746959e-02 0.0349391796 0.9825304 [26,] 2.509532e-02 0.0501906422 0.9749047 [27,] 2.074795e-02 0.0414959015 0.9792520 [28,] 2.270677e-02 0.0454135459 0.9772932 [29,] 1.910275e-02 0.0382054961 0.9808973 [30,] 1.572518e-02 0.0314503624 0.9842748 [31,] 1.074757e-02 0.0214951334 0.9892524 [32,] 9.648066e-03 0.0192961314 0.9903519 [33,] 7.325018e-03 0.0146500360 0.9926750 [34,] 6.104447e-03 0.0122088938 0.9938956 [35,] 3.978339e-03 0.0079566787 0.9960217 [36,] 6.635168e-03 0.0132703357 0.9933648 [37,] 8.910671e-03 0.0178213420 0.9910893 [38,] 7.346537e-03 0.0146930745 0.9926535 [39,] 5.233747e-03 0.0104674936 0.9947663 [40,] 3.491404e-03 0.0069828073 0.9965086 [41,] 3.428984e-03 0.0068579685 0.9965710 [42,] 2.397735e-03 0.0047954705 0.9976023 [43,] 1.640338e-03 0.0032806762 0.9983597 [44,] 3.464868e-03 0.0069297358 0.9965351 [45,] 2.439101e-03 0.0048782027 0.9975609 [46,] 1.816084e-03 0.0036321687 0.9981839 [47,] 1.278678e-03 0.0025573560 0.9987213 [48,] 8.269100e-04 0.0016538200 0.9991731 [49,] 6.671784e-04 0.0013343568 0.9993328 [50,] 4.176380e-04 0.0008352761 0.9995824 [51,] 2.876583e-04 0.0005753165 0.9997123 [52,] 2.294310e-04 0.0004588620 0.9997706 [53,] 1.420610e-04 0.0002841221 0.9998579 [54,] 1.332332e-04 0.0002664664 0.9998668 [55,] 1.046433e-04 0.0002092866 0.9998954 [56,] 6.303750e-05 0.0001260750 0.9999370 [57,] 1.359598e-04 0.0002719196 0.9998640 [58,] 1.117442e-04 0.0002234883 0.9998883 [59,] 1.267163e-04 0.0002534327 0.9998733 [60,] 1.884902e-04 0.0003769805 0.9998115 [61,] 2.180887e-04 0.0004361774 0.9997819 [62,] 2.961649e-04 0.0005923299 0.9997038 [63,] 4.542708e-04 0.0009085415 0.9995457 [64,] 3.118097e-04 0.0006236193 0.9996882 [65,] 2.457079e-04 0.0004914158 0.9997543 [66,] 1.577969e-04 0.0003155938 0.9998422 [67,] 1.457016e-04 0.0002914032 0.9998543 [68,] 1.168233e-04 0.0002336466 0.9998832 [69,] 9.442606e-05 0.0001888521 0.9999056 [70,] 7.329967e-05 0.0001465993 0.9999267 [71,] 8.554923e-05 0.0001710985 0.9999145 [72,] 1.262596e-04 0.0002525192 0.9998737 [73,] 1.418169e-04 0.0002836339 0.9998582 [74,] 1.599051e-04 0.0003198101 0.9998401 [75,] 2.263228e-04 0.0004526457 0.9997737 [76,] 1.916528e-04 0.0003833057 0.9998083 [77,] 1.440136e-04 0.0002880271 0.9998560 [78,] 1.059768e-04 0.0002119535 0.9998940 [79,] 1.219466e-04 0.0002438932 0.9998781 [80,] 1.473150e-04 0.0002946301 0.9998527 [81,] 1.610544e-04 0.0003221088 0.9998389 [82,] 2.054341e-04 0.0004108681 0.9997946 [83,] 2.716058e-04 0.0005432116 0.9997284 [84,] 2.587174e-04 0.0005174348 0.9997413 [85,] 2.034496e-04 0.0004068993 0.9997966 [86,] 1.689696e-03 0.0033793915 0.9983103 [87,] 1.633302e-03 0.0032666046 0.9983667 [88,] 1.605294e-03 0.0032105871 0.9983947 [89,] 1.362010e-03 0.0027240198 0.9986380 [90,] 1.248231e-03 0.0024964618 0.9987518 [91,] 2.006061e-03 0.0040121228 0.9979939 [92,] 2.976171e-03 0.0059523413 0.9970238 [93,] 2.906803e-02 0.0581360617 0.9709320 [94,] 6.041654e-02 0.1208330791 0.9395835 [95,] 8.595361e-02 0.1719072211 0.9140464 [96,] 1.621743e-01 0.3243485519 0.8378257 [97,] 1.912991e-01 0.3825982180 0.8087009 [98,] 1.969077e-01 0.3938153022 0.8030923 [99,] 2.005455e-01 0.4010909533 0.7994545 [100,] 2.167818e-01 0.4335636895 0.7832182 [101,] 2.430328e-01 0.4860655903 0.7569672 [102,] 2.559149e-01 0.5118298434 0.7440851 [103,] 2.417802e-01 0.4835603719 0.7582198 [104,] 2.106610e-01 0.4213220662 0.7893390 [105,] 2.207157e-01 0.4414313393 0.7792843 [106,] 2.269855e-01 0.4539709298 0.7730145 [107,] 1.787036e-01 0.3574072191 0.8212964 [108,] 1.985129e-01 0.3970258931 0.8014871 [109,] 2.359411e-01 0.4718821422 0.7640589 [110,] 2.460132e-01 0.4920263233 0.7539868 [111,] 3.276804e-01 0.6553608526 0.6723196 [112,] 3.247574e-01 0.6495147030 0.6752426 [113,] 2.495474e-01 0.4990947490 0.7504526 [114,] 2.105854e-01 0.4211708050 0.7894146 [115,] 2.940354e-01 0.5880707572 0.7059646 [116,] 4.424716e-01 0.8849431512 0.5575284 [117,] 3.623254e-01 0.7246507613 0.6376746 [118,] 3.034954e-01 0.6069907386 0.6965046 [119,] 1.973705e-01 0.3947410298 0.8026295 [120,] 1.282288e-01 0.2564576214 0.8717712 > postscript(file="/var/www/html/freestat/rcomp/tmp/1r1yq1291387490.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/22axs1291387490.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/32axs1291387490.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/42axs1291387490.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/52axs1291387490.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 = 159 Frequency = 1 1 2 3 4 5 6 -0.88643494 0.19461187 -0.72404949 0.03364854 0.36540608 0.86822460 7 8 9 10 11 12 0.30523087 -0.63660896 -0.10854628 -0.42203361 -0.04282107 0.09193700 13 14 15 16 17 18 0.17922740 -1.16584835 -0.72942807 -0.50135853 -0.85200689 -0.74221904 19 20 21 22 23 24 0.22941397 -0.72278871 -1.49159443 -0.74921034 -0.97421428 -0.82909336 25 26 27 28 29 30 -0.11958935 0.66939573 0.16922265 0.26743542 0.17589801 0.55083879 31 32 33 34 35 36 0.42307088 0.34581807 0.14190338 -0.86290152 -0.67978003 -0.66096882 37 38 39 40 41 42 -0.90938649 0.60394169 -0.17312360 -0.67912731 0.65125380 0.39361811 43 44 45 46 47 48 -0.52643630 -0.70163884 -1.07268198 0.20276082 0.28510497 -0.14353472 49 50 51 52 53 54 0.42574965 0.71805703 0.37267049 0.48605277 0.98638994 0.38823952 55 56 57 58 59 60 -0.45302284 0.91531302 0.62850128 0.03037062 0.15624428 0.58161289 61 62 63 64 65 66 0.57576022 0.79702667 1.72297616 0.63606334 0.75518388 0.88170927 67 68 69 70 71 72 0.15912235 -0.11559794 0.39729522 -0.08614816 0.46019282 0.55226995 73 74 75 76 77 78 -0.20024383 0.06172451 0.39579942 -0.78768669 0.24570919 -0.05262839 79 80 81 82 83 84 1.37819479 1.20634773 1.31111547 1.33039176 0.61303100 0.90257561 85 86 87 88 89 90 0.18595706 0.83051845 0.73093556 0.89832704 0.67891189 0.09738218 91 92 93 94 95 96 0.91079842 -0.32027553 0.65661447 1.03295144 0.27351236 0.32686665 97 98 99 100 101 102 0.26973336 -0.33706508 -0.14939290 -0.02084111 -0.61990485 0.16598897 103 104 105 106 107 108 -0.39983237 0.04237203 1.06573599 -1.06086259 -0.81609762 0.52649078 109 110 111 112 113 114 0.02816445 -0.80644051 -0.79908724 1.40001970 0.78764865 -1.27106837 115 116 117 118 119 120 -1.72135388 -1.07277033 -1.53091456 -1.35204506 0.69097363 -1.32067104 121 122 123 124 125 126 0.74589365 -1.24830451 -0.94113840 -1.67296958 -0.94963256 -0.47379761 127 128 129 130 131 132 0.37278528 -0.80524487 -1.31788408 1.49211069 -1.01596855 -0.33484446 133 134 135 136 137 138 -0.59362499 -1.34682616 -0.84699924 0.19732116 -0.60077809 -0.45021359 139 140 141 142 143 144 -0.31007571 0.81912538 0.26578428 1.05024669 0.56830243 1.00029168 145 146 147 148 149 150 -1.11073396 0.95994999 0.05165149 -0.25688475 -1.62407906 -0.35607443 151 152 153 154 155 156 -0.36789547 1.04594895 1.05467124 -0.60563074 0.48152007 -0.69293216 157 158 159 1.40952776 0.06925867 0.91996318 > postscript(file="/var/www/html/freestat/rcomp/tmp/6v2fv1291387490.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.88643494 NA 1 0.19461187 -0.88643494 2 -0.72404949 0.19461187 3 0.03364854 -0.72404949 4 0.36540608 0.03364854 5 0.86822460 0.36540608 6 0.30523087 0.86822460 7 -0.63660896 0.30523087 8 -0.10854628 -0.63660896 9 -0.42203361 -0.10854628 10 -0.04282107 -0.42203361 11 0.09193700 -0.04282107 12 0.17922740 0.09193700 13 -1.16584835 0.17922740 14 -0.72942807 -1.16584835 15 -0.50135853 -0.72942807 16 -0.85200689 -0.50135853 17 -0.74221904 -0.85200689 18 0.22941397 -0.74221904 19 -0.72278871 0.22941397 20 -1.49159443 -0.72278871 21 -0.74921034 -1.49159443 22 -0.97421428 -0.74921034 23 -0.82909336 -0.97421428 24 -0.11958935 -0.82909336 25 0.66939573 -0.11958935 26 0.16922265 0.66939573 27 0.26743542 0.16922265 28 0.17589801 0.26743542 29 0.55083879 0.17589801 30 0.42307088 0.55083879 31 0.34581807 0.42307088 32 0.14190338 0.34581807 33 -0.86290152 0.14190338 34 -0.67978003 -0.86290152 35 -0.66096882 -0.67978003 36 -0.90938649 -0.66096882 37 0.60394169 -0.90938649 38 -0.17312360 0.60394169 39 -0.67912731 -0.17312360 40 0.65125380 -0.67912731 41 0.39361811 0.65125380 42 -0.52643630 0.39361811 43 -0.70163884 -0.52643630 44 -1.07268198 -0.70163884 45 0.20276082 -1.07268198 46 0.28510497 0.20276082 47 -0.14353472 0.28510497 48 0.42574965 -0.14353472 49 0.71805703 0.42574965 50 0.37267049 0.71805703 51 0.48605277 0.37267049 52 0.98638994 0.48605277 53 0.38823952 0.98638994 54 -0.45302284 0.38823952 55 0.91531302 -0.45302284 56 0.62850128 0.91531302 57 0.03037062 0.62850128 58 0.15624428 0.03037062 59 0.58161289 0.15624428 60 0.57576022 0.58161289 61 0.79702667 0.57576022 62 1.72297616 0.79702667 63 0.63606334 1.72297616 64 0.75518388 0.63606334 65 0.88170927 0.75518388 66 0.15912235 0.88170927 67 -0.11559794 0.15912235 68 0.39729522 -0.11559794 69 -0.08614816 0.39729522 70 0.46019282 -0.08614816 71 0.55226995 0.46019282 72 -0.20024383 0.55226995 73 0.06172451 -0.20024383 74 0.39579942 0.06172451 75 -0.78768669 0.39579942 76 0.24570919 -0.78768669 77 -0.05262839 0.24570919 78 1.37819479 -0.05262839 79 1.20634773 1.37819479 80 1.31111547 1.20634773 81 1.33039176 1.31111547 82 0.61303100 1.33039176 83 0.90257561 0.61303100 84 0.18595706 0.90257561 85 0.83051845 0.18595706 86 0.73093556 0.83051845 87 0.89832704 0.73093556 88 0.67891189 0.89832704 89 0.09738218 0.67891189 90 0.91079842 0.09738218 91 -0.32027553 0.91079842 92 0.65661447 -0.32027553 93 1.03295144 0.65661447 94 0.27351236 1.03295144 95 0.32686665 0.27351236 96 0.26973336 0.32686665 97 -0.33706508 0.26973336 98 -0.14939290 -0.33706508 99 -0.02084111 -0.14939290 100 -0.61990485 -0.02084111 101 0.16598897 -0.61990485 102 -0.39983237 0.16598897 103 0.04237203 -0.39983237 104 1.06573599 0.04237203 105 -1.06086259 1.06573599 106 -0.81609762 -1.06086259 107 0.52649078 -0.81609762 108 0.02816445 0.52649078 109 -0.80644051 0.02816445 110 -0.79908724 -0.80644051 111 1.40001970 -0.79908724 112 0.78764865 1.40001970 113 -1.27106837 0.78764865 114 -1.72135388 -1.27106837 115 -1.07277033 -1.72135388 116 -1.53091456 -1.07277033 117 -1.35204506 -1.53091456 118 0.69097363 -1.35204506 119 -1.32067104 0.69097363 120 0.74589365 -1.32067104 121 -1.24830451 0.74589365 122 -0.94113840 -1.24830451 123 -1.67296958 -0.94113840 124 -0.94963256 -1.67296958 125 -0.47379761 -0.94963256 126 0.37278528 -0.47379761 127 -0.80524487 0.37278528 128 -1.31788408 -0.80524487 129 1.49211069 -1.31788408 130 -1.01596855 1.49211069 131 -0.33484446 -1.01596855 132 -0.59362499 -0.33484446 133 -1.34682616 -0.59362499 134 -0.84699924 -1.34682616 135 0.19732116 -0.84699924 136 -0.60077809 0.19732116 137 -0.45021359 -0.60077809 138 -0.31007571 -0.45021359 139 0.81912538 -0.31007571 140 0.26578428 0.81912538 141 1.05024669 0.26578428 142 0.56830243 1.05024669 143 1.00029168 0.56830243 144 -1.11073396 1.00029168 145 0.95994999 -1.11073396 146 0.05165149 0.95994999 147 -0.25688475 0.05165149 148 -1.62407906 -0.25688475 149 -0.35607443 -1.62407906 150 -0.36789547 -0.35607443 151 1.04594895 -0.36789547 152 1.05467124 1.04594895 153 -0.60563074 1.05467124 154 0.48152007 -0.60563074 155 -0.69293216 0.48152007 156 1.40952776 -0.69293216 157 0.06925867 1.40952776 158 0.91996318 0.06925867 159 NA 0.91996318 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.19461187 -0.88643494 [2,] -0.72404949 0.19461187 [3,] 0.03364854 -0.72404949 [4,] 0.36540608 0.03364854 [5,] 0.86822460 0.36540608 [6,] 0.30523087 0.86822460 [7,] -0.63660896 0.30523087 [8,] -0.10854628 -0.63660896 [9,] -0.42203361 -0.10854628 [10,] -0.04282107 -0.42203361 [11,] 0.09193700 -0.04282107 [12,] 0.17922740 0.09193700 [13,] -1.16584835 0.17922740 [14,] -0.72942807 -1.16584835 [15,] -0.50135853 -0.72942807 [16,] -0.85200689 -0.50135853 [17,] -0.74221904 -0.85200689 [18,] 0.22941397 -0.74221904 [19,] -0.72278871 0.22941397 [20,] -1.49159443 -0.72278871 [21,] -0.74921034 -1.49159443 [22,] -0.97421428 -0.74921034 [23,] -0.82909336 -0.97421428 [24,] -0.11958935 -0.82909336 [25,] 0.66939573 -0.11958935 [26,] 0.16922265 0.66939573 [27,] 0.26743542 0.16922265 [28,] 0.17589801 0.26743542 [29,] 0.55083879 0.17589801 [30,] 0.42307088 0.55083879 [31,] 0.34581807 0.42307088 [32,] 0.14190338 0.34581807 [33,] -0.86290152 0.14190338 [34,] -0.67978003 -0.86290152 [35,] -0.66096882 -0.67978003 [36,] -0.90938649 -0.66096882 [37,] 0.60394169 -0.90938649 [38,] -0.17312360 0.60394169 [39,] -0.67912731 -0.17312360 [40,] 0.65125380 -0.67912731 [41,] 0.39361811 0.65125380 [42,] -0.52643630 0.39361811 [43,] -0.70163884 -0.52643630 [44,] -1.07268198 -0.70163884 [45,] 0.20276082 -1.07268198 [46,] 0.28510497 0.20276082 [47,] -0.14353472 0.28510497 [48,] 0.42574965 -0.14353472 [49,] 0.71805703 0.42574965 [50,] 0.37267049 0.71805703 [51,] 0.48605277 0.37267049 [52,] 0.98638994 0.48605277 [53,] 0.38823952 0.98638994 [54,] -0.45302284 0.38823952 [55,] 0.91531302 -0.45302284 [56,] 0.62850128 0.91531302 [57,] 0.03037062 0.62850128 [58,] 0.15624428 0.03037062 [59,] 0.58161289 0.15624428 [60,] 0.57576022 0.58161289 [61,] 0.79702667 0.57576022 [62,] 1.72297616 0.79702667 [63,] 0.63606334 1.72297616 [64,] 0.75518388 0.63606334 [65,] 0.88170927 0.75518388 [66,] 0.15912235 0.88170927 [67,] -0.11559794 0.15912235 [68,] 0.39729522 -0.11559794 [69,] -0.08614816 0.39729522 [70,] 0.46019282 -0.08614816 [71,] 0.55226995 0.46019282 [72,] -0.20024383 0.55226995 [73,] 0.06172451 -0.20024383 [74,] 0.39579942 0.06172451 [75,] -0.78768669 0.39579942 [76,] 0.24570919 -0.78768669 [77,] -0.05262839 0.24570919 [78,] 1.37819479 -0.05262839 [79,] 1.20634773 1.37819479 [80,] 1.31111547 1.20634773 [81,] 1.33039176 1.31111547 [82,] 0.61303100 1.33039176 [83,] 0.90257561 0.61303100 [84,] 0.18595706 0.90257561 [85,] 0.83051845 0.18595706 [86,] 0.73093556 0.83051845 [87,] 0.89832704 0.73093556 [88,] 0.67891189 0.89832704 [89,] 0.09738218 0.67891189 [90,] 0.91079842 0.09738218 [91,] -0.32027553 0.91079842 [92,] 0.65661447 -0.32027553 [93,] 1.03295144 0.65661447 [94,] 0.27351236 1.03295144 [95,] 0.32686665 0.27351236 [96,] 0.26973336 0.32686665 [97,] -0.33706508 0.26973336 [98,] -0.14939290 -0.33706508 [99,] -0.02084111 -0.14939290 [100,] -0.61990485 -0.02084111 [101,] 0.16598897 -0.61990485 [102,] -0.39983237 0.16598897 [103,] 0.04237203 -0.39983237 [104,] 1.06573599 0.04237203 [105,] -1.06086259 1.06573599 [106,] -0.81609762 -1.06086259 [107,] 0.52649078 -0.81609762 [108,] 0.02816445 0.52649078 [109,] -0.80644051 0.02816445 [110,] -0.79908724 -0.80644051 [111,] 1.40001970 -0.79908724 [112,] 0.78764865 1.40001970 [113,] -1.27106837 0.78764865 [114,] -1.72135388 -1.27106837 [115,] -1.07277033 -1.72135388 [116,] -1.53091456 -1.07277033 [117,] -1.35204506 -1.53091456 [118,] 0.69097363 -1.35204506 [119,] -1.32067104 0.69097363 [120,] 0.74589365 -1.32067104 [121,] -1.24830451 0.74589365 [122,] -0.94113840 -1.24830451 [123,] -1.67296958 -0.94113840 [124,] -0.94963256 -1.67296958 [125,] -0.47379761 -0.94963256 [126,] 0.37278528 -0.47379761 [127,] -0.80524487 0.37278528 [128,] -1.31788408 -0.80524487 [129,] 1.49211069 -1.31788408 [130,] -1.01596855 1.49211069 [131,] -0.33484446 -1.01596855 [132,] -0.59362499 -0.33484446 [133,] -1.34682616 -0.59362499 [134,] -0.84699924 -1.34682616 [135,] 0.19732116 -0.84699924 [136,] -0.60077809 0.19732116 [137,] -0.45021359 -0.60077809 [138,] -0.31007571 -0.45021359 [139,] 0.81912538 -0.31007571 [140,] 0.26578428 0.81912538 [141,] 1.05024669 0.26578428 [142,] 0.56830243 1.05024669 [143,] 1.00029168 0.56830243 [144,] -1.11073396 1.00029168 [145,] 0.95994999 -1.11073396 [146,] 0.05165149 0.95994999 [147,] -0.25688475 0.05165149 [148,] -1.62407906 -0.25688475 [149,] -0.35607443 -1.62407906 [150,] -0.36789547 -0.35607443 [151,] 1.04594895 -0.36789547 [152,] 1.05467124 1.04594895 [153,] -0.60563074 1.05467124 [154,] 0.48152007 -0.60563074 [155,] -0.69293216 0.48152007 [156,] 1.40952776 -0.69293216 [157,] 0.06925867 1.40952776 [158,] 0.91996318 0.06925867 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.19461187 -0.88643494 2 -0.72404949 0.19461187 3 0.03364854 -0.72404949 4 0.36540608 0.03364854 5 0.86822460 0.36540608 6 0.30523087 0.86822460 7 -0.63660896 0.30523087 8 -0.10854628 -0.63660896 9 -0.42203361 -0.10854628 10 -0.04282107 -0.42203361 11 0.09193700 -0.04282107 12 0.17922740 0.09193700 13 -1.16584835 0.17922740 14 -0.72942807 -1.16584835 15 -0.50135853 -0.72942807 16 -0.85200689 -0.50135853 17 -0.74221904 -0.85200689 18 0.22941397 -0.74221904 19 -0.72278871 0.22941397 20 -1.49159443 -0.72278871 21 -0.74921034 -1.49159443 22 -0.97421428 -0.74921034 23 -0.82909336 -0.97421428 24 -0.11958935 -0.82909336 25 0.66939573 -0.11958935 26 0.16922265 0.66939573 27 0.26743542 0.16922265 28 0.17589801 0.26743542 29 0.55083879 0.17589801 30 0.42307088 0.55083879 31 0.34581807 0.42307088 32 0.14190338 0.34581807 33 -0.86290152 0.14190338 34 -0.67978003 -0.86290152 35 -0.66096882 -0.67978003 36 -0.90938649 -0.66096882 37 0.60394169 -0.90938649 38 -0.17312360 0.60394169 39 -0.67912731 -0.17312360 40 0.65125380 -0.67912731 41 0.39361811 0.65125380 42 -0.52643630 0.39361811 43 -0.70163884 -0.52643630 44 -1.07268198 -0.70163884 45 0.20276082 -1.07268198 46 0.28510497 0.20276082 47 -0.14353472 0.28510497 48 0.42574965 -0.14353472 49 0.71805703 0.42574965 50 0.37267049 0.71805703 51 0.48605277 0.37267049 52 0.98638994 0.48605277 53 0.38823952 0.98638994 54 -0.45302284 0.38823952 55 0.91531302 -0.45302284 56 0.62850128 0.91531302 57 0.03037062 0.62850128 58 0.15624428 0.03037062 59 0.58161289 0.15624428 60 0.57576022 0.58161289 61 0.79702667 0.57576022 62 1.72297616 0.79702667 63 0.63606334 1.72297616 64 0.75518388 0.63606334 65 0.88170927 0.75518388 66 0.15912235 0.88170927 67 -0.11559794 0.15912235 68 0.39729522 -0.11559794 69 -0.08614816 0.39729522 70 0.46019282 -0.08614816 71 0.55226995 0.46019282 72 -0.20024383 0.55226995 73 0.06172451 -0.20024383 74 0.39579942 0.06172451 75 -0.78768669 0.39579942 76 0.24570919 -0.78768669 77 -0.05262839 0.24570919 78 1.37819479 -0.05262839 79 1.20634773 1.37819479 80 1.31111547 1.20634773 81 1.33039176 1.31111547 82 0.61303100 1.33039176 83 0.90257561 0.61303100 84 0.18595706 0.90257561 85 0.83051845 0.18595706 86 0.73093556 0.83051845 87 0.89832704 0.73093556 88 0.67891189 0.89832704 89 0.09738218 0.67891189 90 0.91079842 0.09738218 91 -0.32027553 0.91079842 92 0.65661447 -0.32027553 93 1.03295144 0.65661447 94 0.27351236 1.03295144 95 0.32686665 0.27351236 96 0.26973336 0.32686665 97 -0.33706508 0.26973336 98 -0.14939290 -0.33706508 99 -0.02084111 -0.14939290 100 -0.61990485 -0.02084111 101 0.16598897 -0.61990485 102 -0.39983237 0.16598897 103 0.04237203 -0.39983237 104 1.06573599 0.04237203 105 -1.06086259 1.06573599 106 -0.81609762 -1.06086259 107 0.52649078 -0.81609762 108 0.02816445 0.52649078 109 -0.80644051 0.02816445 110 -0.79908724 -0.80644051 111 1.40001970 -0.79908724 112 0.78764865 1.40001970 113 -1.27106837 0.78764865 114 -1.72135388 -1.27106837 115 -1.07277033 -1.72135388 116 -1.53091456 -1.07277033 117 -1.35204506 -1.53091456 118 0.69097363 -1.35204506 119 -1.32067104 0.69097363 120 0.74589365 -1.32067104 121 -1.24830451 0.74589365 122 -0.94113840 -1.24830451 123 -1.67296958 -0.94113840 124 -0.94963256 -1.67296958 125 -0.47379761 -0.94963256 126 0.37278528 -0.47379761 127 -0.80524487 0.37278528 128 -1.31788408 -0.80524487 129 1.49211069 -1.31788408 130 -1.01596855 1.49211069 131 -0.33484446 -1.01596855 132 -0.59362499 -0.33484446 133 -1.34682616 -0.59362499 134 -0.84699924 -1.34682616 135 0.19732116 -0.84699924 136 -0.60077809 0.19732116 137 -0.45021359 -0.60077809 138 -0.31007571 -0.45021359 139 0.81912538 -0.31007571 140 0.26578428 0.81912538 141 1.05024669 0.26578428 142 0.56830243 1.05024669 143 1.00029168 0.56830243 144 -1.11073396 1.00029168 145 0.95994999 -1.11073396 146 0.05165149 0.95994999 147 -0.25688475 0.05165149 148 -1.62407906 -0.25688475 149 -0.35607443 -1.62407906 150 -0.36789547 -0.35607443 151 1.04594895 -0.36789547 152 1.05467124 1.04594895 153 -0.60563074 1.05467124 154 0.48152007 -0.60563074 155 -0.69293216 0.48152007 156 1.40952776 -0.69293216 157 0.06925867 1.40952776 158 0.91996318 0.06925867 > 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/75tey1291387490.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/85tey1291387490.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/95tey1291387490.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/10y2d11291387490.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/11jlu71291387490.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/1253sv1291387490.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/13umpp1291387490.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/144v6r1291387490.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/157enf1291387490.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/164o2o1291387490.tab") + } > > try(system("convert tmp/1r1yq1291387490.ps tmp/1r1yq1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/22axs1291387490.ps tmp/22axs1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/32axs1291387490.ps tmp/32axs1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/42axs1291387490.ps tmp/42axs1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/52axs1291387490.ps tmp/52axs1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/6v2fv1291387490.ps tmp/6v2fv1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/75tey1291387490.ps tmp/75tey1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/85tey1291387490.ps tmp/85tey1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/95tey1291387490.ps tmp/95tey1291387490.png",intern=TRUE)) character(0) > try(system("convert tmp/10y2d11291387490.ps tmp/10y2d11291387490.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.884 2.708 6.283