R version 2.9.0 (2009-04-17) Copyright (C) 2009 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. 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(3.75 + ,0 + ,3.51 + ,3.37 + ,3.21 + ,3 + ,4.11 + ,0 + ,3.75 + ,3.51 + ,3.37 + ,3.21 + ,4.25 + ,0 + ,4.11 + ,3.75 + ,3.51 + ,3.37 + ,4.25 + ,0 + ,4.25 + ,4.11 + ,3.75 + ,3.51 + ,4.5 + ,0 + ,4.25 + ,4.25 + ,4.11 + ,3.75 + ,4.7 + ,0 + ,4.5 + ,4.25 + ,4.25 + ,4.11 + ,4.75 + ,0 + ,4.7 + ,4.5 + ,4.25 + ,4.25 + ,4.75 + ,0 + ,4.75 + ,4.7 + ,4.5 + ,4.25 + ,4.75 + ,0 + ,4.75 + ,4.75 + ,4.7 + ,4.5 + ,4.75 + ,0 + ,4.75 + ,4.75 + ,4.75 + ,4.7 + ,4.75 + ,0 + ,4.75 + ,4.75 + ,4.75 + ,4.75 + ,4.75 + ,0 + ,4.75 + ,4.75 + ,4.75 + ,4.75 + ,4.58 + ,0 + ,4.75 + ,4.75 + ,4.75 + ,4.75 + ,4.5 + ,0 + ,4.58 + ,4.75 + ,4.75 + ,4.75 + ,4.5 + ,0 + ,4.5 + ,4.58 + ,4.75 + ,4.75 + ,4.49 + ,0 + ,4.5 + ,4.5 + ,4.58 + ,4.75 + ,4.03 + ,0 + ,4.49 + ,4.5 + ,4.5 + ,4.58 + ,3.75 + ,0 + ,4.03 + ,4.49 + ,4.5 + ,4.5 + ,3.39 + ,0 + ,3.75 + ,4.03 + ,4.49 + ,4.5 + ,3.25 + ,0 + ,3.39 + ,3.75 + ,4.03 + ,4.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,1.66 + ,2 + ,2.31 + ,2.75 + ,1.09 + ,1 + ,1.31 + ,1.66 + ,2 + ,2.31 + ,1 + ,1 + ,1.09 + ,1.31 + ,1.66 + ,2 + ,1 + ,1 + ,1 + ,1.09 + ,1.31 + ,1.66 + ,1 + ,1 + ,1 + ,1 + ,1.09 + ,1.31 + ,1 + ,1 + ,1 + ,1 + ,1 + ,1.09 + ,1 + ,1 + ,1 + ,1 + ,1 + ,1) + ,dim=c(6 + ,114) + ,dimnames=list(c('Y(t)' + ,'X(t)' + ,'Y(t-1)' + ,'Y(t-2)' + ,'Y(t-3)' + ,'Y(t-4)') + ,1:114)) > y <- array(NA,dim=c(6,114),dimnames=list(c('Y(t)','X(t)','Y(t-1)','Y(t-2)','Y(t-3)','Y(t-4)'),1:114)) > 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 = '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 Y(t) X(t) Y(t-1) Y(t-2) Y(t-3) Y(t-4) 1 3.75 0 3.51 3.37 3.21 3.00 2 4.11 0 3.75 3.51 3.37 3.21 3 4.25 0 4.11 3.75 3.51 3.37 4 4.25 0 4.25 4.11 3.75 3.51 5 4.50 0 4.25 4.25 4.11 3.75 6 4.70 0 4.50 4.25 4.25 4.11 7 4.75 0 4.70 4.50 4.25 4.25 8 4.75 0 4.75 4.70 4.50 4.25 9 4.75 0 4.75 4.75 4.70 4.50 10 4.75 0 4.75 4.75 4.75 4.70 11 4.75 0 4.75 4.75 4.75 4.75 12 4.75 0 4.75 4.75 4.75 4.75 13 4.58 0 4.75 4.75 4.75 4.75 14 4.50 0 4.58 4.75 4.75 4.75 15 4.50 0 4.50 4.58 4.75 4.75 16 4.49 0 4.50 4.50 4.58 4.75 17 4.03 0 4.49 4.50 4.50 4.58 18 3.75 0 4.03 4.49 4.50 4.50 19 3.39 0 3.75 4.03 4.49 4.50 20 3.25 0 3.39 3.75 4.03 4.49 21 3.25 0 3.25 3.39 3.75 4.03 22 3.25 0 3.25 3.25 3.39 3.75 23 3.25 0 3.25 3.25 3.25 3.39 24 3.25 0 3.25 3.25 3.25 3.25 25 3.25 0 3.25 3.25 3.25 3.25 26 3.25 0 3.25 3.25 3.25 3.25 27 3.25 0 3.25 3.25 3.25 3.25 28 3.25 0 3.25 3.25 3.25 3.25 29 3.25 0 3.25 3.25 3.25 3.25 30 3.25 0 3.25 3.25 3.25 3.25 31 3.25 0 3.25 3.25 3.25 3.25 32 2.85 0 3.25 3.25 3.25 3.25 33 2.75 0 2.85 3.25 3.25 3.25 34 2.75 0 2.75 2.85 3.25 3.25 35 2.55 0 2.75 2.75 2.85 3.25 36 2.50 0 2.55 2.75 2.75 2.85 37 2.50 0 2.50 2.55 2.75 2.75 38 2.10 0 2.50 2.50 2.55 2.75 39 2.00 0 2.10 2.50 2.50 2.55 40 2.00 0 2.00 2.10 2.50 2.50 41 2.00 0 2.00 2.00 2.10 2.50 42 2.00 0 2.00 2.00 2.00 2.10 43 2.00 0 2.00 2.00 2.00 2.00 44 2.00 0 2.00 2.00 2.00 2.00 45 2.00 0 2.00 2.00 2.00 2.00 46 2.00 0 2.00 2.00 2.00 2.00 47 2.00 0 2.00 2.00 2.00 2.00 48 2.00 0 2.00 2.00 2.00 2.00 49 2.00 0 2.00 2.00 2.00 2.00 50 2.00 0 2.00 2.00 2.00 2.00 51 2.00 0 2.00 2.00 2.00 2.00 52 2.00 0 2.00 2.00 2.00 2.00 53 2.00 0 2.00 2.00 2.00 2.00 54 2.00 0 2.00 2.00 2.00 2.00 55 2.00 0 2.00 2.00 2.00 2.00 56 2.00 0 2.00 2.00 2.00 2.00 57 2.00 0 2.00 2.00 2.00 2.00 58 2.00 0 2.00 2.00 2.00 2.00 59 2.00 0 2.00 2.00 2.00 2.00 60 2.00 0 2.00 2.00 2.00 2.00 61 2.00 0 2.00 2.00 2.00 2.00 62 2.00 0 2.00 2.00 2.00 2.00 63 2.00 0 2.00 2.00 2.00 2.00 64 2.00 0 2.00 2.00 2.00 2.00 65 2.00 0 2.00 2.00 2.00 2.00 66 2.00 0 2.00 2.00 2.00 2.00 67 2.00 0 2.00 2.00 2.00 2.00 68 2.21 0 2.00 2.00 2.00 2.00 69 2.25 0 2.21 2.00 2.00 2.00 70 2.25 0 2.25 2.21 2.00 2.00 71 2.45 0 2.25 2.25 2.21 2.00 72 2.50 0 2.45 2.25 2.25 2.21 73 2.50 0 2.50 2.45 2.25 2.25 74 2.64 0 2.50 2.50 2.45 2.25 75 2.75 0 2.64 2.50 2.50 2.45 76 2.93 0 2.75 2.64 2.50 2.50 77 3.00 0 2.93 2.75 2.64 2.50 78 3.17 0 3.00 2.93 2.75 2.64 79 3.25 0 3.17 3.00 2.93 2.75 80 3.39 0 3.25 3.17 3.00 2.93 81 3.50 0 3.39 3.25 3.17 3.00 82 3.50 0 3.50 3.39 3.25 3.17 83 3.65 0 3.50 3.50 3.39 3.25 84 3.75 0 3.65 3.50 3.50 3.39 85 3.75 0 3.75 3.65 3.50 3.50 86 3.90 0 3.75 3.75 3.65 3.50 87 4.00 0 3.90 3.75 3.75 3.65 88 4.00 0 4.00 3.90 3.75 3.75 89 4.00 0 4.00 4.00 3.90 3.75 90 4.00 0 4.00 4.00 4.00 3.90 91 4.00 0 4.00 4.00 4.00 4.00 92 4.00 0 4.00 4.00 4.00 4.00 93 4.00 0 4.00 4.00 4.00 4.00 94 4.00 0 4.00 4.00 4.00 4.00 95 4.00 0 4.00 4.00 4.00 4.00 96 4.00 0 4.00 4.00 4.00 4.00 97 4.00 0 4.00 4.00 4.00 4.00 98 4.00 0 4.00 4.00 4.00 4.00 99 4.18 0 4.00 4.00 4.00 4.00 100 4.25 0 4.18 4.00 4.00 4.00 101 4.25 0 4.25 4.18 4.00 4.00 102 3.97 1 4.25 4.25 4.18 4.00 103 3.42 1 3.97 4.25 4.25 4.18 104 2.75 1 3.42 3.97 4.25 4.25 105 2.31 1 2.75 3.42 3.97 4.25 106 2.00 1 2.31 2.75 3.42 3.97 107 1.66 1 2.00 2.31 2.75 3.42 108 1.31 1 1.66 2.00 2.31 2.75 109 1.09 1 1.31 1.66 2.00 2.31 110 1.00 1 1.09 1.31 1.66 2.00 111 1.00 1 1.00 1.09 1.31 1.66 112 1.00 1 1.00 1.00 1.09 1.31 113 1.00 1 1.00 1.00 1.00 1.09 114 1.00 1 1.00 1.00 1.00 1.00 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `X(t)` `Y(t-1)` `Y(t-2)` `Y(t-3)` `Y(t-4)` 0.1035 -0.1195 1.5219 -0.6194 0.2548 -0.1900 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.397131 -0.038027 0.002869 0.054341 0.226248 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.10346 0.03524 2.936 0.004060 ** `X(t)` -0.11945 0.03938 -3.033 0.003030 ** `Y(t-1)` 1.52191 0.09409 16.175 < 2e-16 *** `Y(t-2)` -0.61940 0.17246 -3.592 0.000496 *** `Y(t-3)` 0.25479 0.17186 1.483 0.141114 `Y(t-4)` -0.19002 0.09177 -2.071 0.040770 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.1071 on 108 degrees of freedom Multiple R-squared: 0.99, Adjusted R-squared: 0.9896 F-statistic: 2142 on 5 and 108 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.5961928 8.076144e-01 4.038072e-01 [2,] 0.4643812 9.287624e-01 5.356188e-01 [3,] 0.3219265 6.438530e-01 6.780735e-01 [4,] 0.2096482 4.192964e-01 7.903518e-01 [5,] 0.3645149 7.290299e-01 6.354851e-01 [6,] 0.2645652 5.291305e-01 7.354348e-01 [7,] 0.2041205 4.082410e-01 7.958795e-01 [8,] 0.1451660 2.903320e-01 8.548340e-01 [9,] 0.9581990 8.360197e-02 4.180098e-02 [10,] 0.9359320 1.281360e-01 6.406802e-02 [11,] 0.9919790 1.604205e-02 8.021027e-03 [12,] 0.9961582 7.683577e-03 3.841789e-03 [13,] 0.9945626 1.087482e-02 5.437408e-03 [14,] 0.9913770 1.724595e-02 8.622977e-03 [15,] 0.9877239 2.455217e-02 1.227608e-02 [16,] 0.9841288 3.174250e-02 1.587125e-02 [17,] 0.9786753 4.264940e-02 2.132470e-02 [18,] 0.9709876 5.802479e-02 2.901240e-02 [19,] 0.9605671 7.886577e-02 3.943289e-02 [20,] 0.9468528 1.062944e-01 5.314719e-02 [21,] 0.9292689 1.414623e-01 7.073113e-02 [22,] 0.9072749 1.854502e-01 9.272510e-02 [23,] 0.8804200 2.391599e-01 1.195800e-01 [24,] 0.9985718 2.856326e-03 1.428163e-03 [25,] 0.9984331 3.133819e-03 1.566910e-03 [26,] 0.9974797 5.040614e-03 2.520307e-03 [27,] 0.9980898 3.820397e-03 1.910199e-03 [28,] 0.9972525 5.495022e-03 2.747511e-03 [29,] 0.9957494 8.501127e-03 4.250564e-03 [30,] 0.9999912 1.767072e-05 8.835358e-06 [31,] 0.9999918 1.646445e-05 8.232224e-06 [32,] 0.9999846 3.088643e-05 1.544321e-05 [33,] 0.9999784 4.320628e-05 2.160314e-05 [34,] 0.9999620 7.605173e-05 3.802587e-05 [35,] 0.9999361 1.277892e-04 6.389460e-05 [36,] 0.9998942 2.116663e-04 1.058332e-04 [37,] 0.9998275 3.450491e-04 1.725246e-04 [38,] 0.9997235 5.530464e-04 2.765232e-04 [39,] 0.9995645 8.710335e-04 4.355167e-04 [40,] 0.9993262 1.347525e-03 6.737627e-04 [41,] 0.9989764 2.047201e-03 1.023600e-03 [42,] 0.9984731 3.053727e-03 1.526863e-03 [43,] 0.9977641 4.471846e-03 2.235923e-03 [44,] 0.9967860 6.427986e-03 3.213993e-03 [45,] 0.9954658 9.068439e-03 4.534220e-03 [46,] 0.9937230 1.255398e-02 6.276991e-03 [47,] 0.9914752 1.704969e-02 8.524843e-03 [48,] 0.9886457 2.270865e-02 1.135433e-02 [49,] 0.9851758 2.964846e-02 1.482423e-02 [50,] 0.9810403 3.791938e-02 1.895969e-02 [51,] 0.9762682 4.746365e-02 2.373183e-02 [52,] 0.9709671 5.806572e-02 2.903286e-02 [53,] 0.9653531 6.929375e-02 3.464688e-02 [54,] 0.9597829 8.043422e-02 4.021711e-02 [55,] 0.9547881 9.042388e-02 4.521194e-02 [56,] 0.9511046 9.779076e-02 4.889538e-02 [57,] 0.9496824 1.006352e-01 5.031762e-02 [58,] 0.9516339 9.673211e-02 4.836605e-02 [59,] 0.9580204 8.395923e-02 4.197962e-02 [60,] 0.9641023 7.179534e-02 3.589767e-02 [61,] 0.9853401 2.931975e-02 1.465987e-02 [62,] 0.9876897 2.462054e-02 1.231027e-02 [63,] 0.9857558 2.848837e-02 1.424418e-02 [64,] 0.9955586 8.882816e-03 4.441408e-03 [65,] 0.9972451 5.509748e-03 2.754874e-03 [66,] 0.9958159 8.368145e-03 4.184073e-03 [67,] 0.9964382 7.123586e-03 3.561793e-03 [68,] 0.9953222 9.355626e-03 4.677813e-03 [69,] 0.9977820 4.436070e-03 2.218035e-03 [70,] 0.9969813 6.037469e-03 3.018735e-03 [71,] 0.9984792 3.041504e-03 1.520752e-03 [72,] 0.9977717 4.456684e-03 2.228342e-03 [73,] 0.9973156 5.368739e-03 2.684369e-03 [74,] 0.9982925 3.414912e-03 1.707456e-03 [75,] 0.9984952 3.009520e-03 1.504760e-03 [76,] 0.9985690 2.862076e-03 1.431038e-03 [77,] 0.9979816 4.036761e-03 2.018381e-03 [78,] 0.9990908 1.818332e-03 9.091662e-04 [79,] 0.9989132 2.173549e-03 1.086774e-03 [80,] 0.9979995 4.000928e-03 2.000464e-03 [81,] 0.9962757 7.448570e-03 3.724285e-03 [82,] 0.9942200 1.155994e-02 5.779970e-03 [83,] 0.9899347 2.013051e-02 1.006526e-02 [84,] 0.9830132 3.397369e-02 1.698684e-02 [85,] 0.9722637 5.547267e-02 2.773633e-02 [86,] 0.9562804 8.743915e-02 4.371958e-02 [87,] 0.9336818 1.326364e-01 6.631821e-02 [88,] 0.9036814 1.926372e-01 9.631861e-02 [89,] 0.8673888 2.652224e-01 1.326112e-01 [90,] 0.8312745 3.374511e-01 1.687255e-01 [91,] 0.9401902 1.196197e-01 5.980983e-02 [92,] 0.9700728 5.985444e-02 2.992722e-02 [93,] 0.9400161 1.199678e-01 5.998388e-02 [94,] 0.9136243 1.727514e-01 8.637570e-02 [95,] 0.9126025 1.747949e-01 8.739747e-02 [96,] 0.9357780 1.284440e-01 6.422202e-02 [97,] 0.9822251 3.554981e-02 1.777491e-02 > postscript(file="/var/www/html/rcomp/tmp/1iiti1258808125.ps",horizontal=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/rcomp/tmp/25d2b1258808125.ps",horizontal=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/rcomp/tmp/3w1091258808125.ps",horizontal=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/rcomp/tmp/4u9lo1258808125.ps",horizontal=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/rcomp/tmp/5u5ch1258808125.ps",horizontal=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 = 114 Frequency = 1 1 2 3 4 5 6 0.144188176 0.224783352 -0.039715556 -0.064347052 0.226247577 0.078506715 7 8 9 10 11 12 0.005577467 -0.010336631 0.017179313 0.042443415 0.051944355 0.051944355 13 14 15 16 17 18 -0.118055645 0.060668434 0.077123358 0.060886392 -0.395814288 0.002867153 19 20 21 22 23 24 -0.213374013 0.136385625 0.110402833 0.062207451 0.029471726 0.002869094 25 26 27 28 29 30 0.002869094 0.002869094 0.002869094 0.002869094 0.002869094 0.002869094 31 32 33 34 35 36 0.002869094 -0.397130906 0.111631633 0.016063246 -0.143959243 0.059893823 37 38 39 40 41 42 -0.006892251 -0.386903495 0.096594942 -0.008474385 0.031503126 -0.019025078 43 44 45 46 47 48 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 49 50 51 52 53 54 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 55 56 57 58 59 60 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 61 62 63 64 65 66 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 -0.038026958 67 68 69 70 71 72 -0.038026958 0.171973042 -0.107627291 -0.038430058 0.132839279 -0.091829769 73 74 75 76 77 78 -0.036444824 0.083566421 0.005763634 0.114570533 -0.056909922 0.116623578 79 80 81 82 83 84 -0.043703374 0.096209565 0.012680958 -0.056093340 0.141570852 0.011860283 85 86 87 88 89 90 -0.026518650 0.147202131 0.021939682 -0.018339440 0.005381341 0.008404844 91 92 93 94 95 96 0.027406724 0.027406724 0.027406724 0.027406724 0.027406724 0.027406724 97 98 99 100 101 102 0.027406724 0.027406724 0.207406724 0.003463582 0.008421697 -0.154630447 103 104 105 106 107 108 -0.262128807 -0.255210314 0.055140370 0.086713779 0.012170904 -0.027597783 109 110 111 112 113 114 0.069851880 0.125605980 0.150881306 0.084683442 0.065810691 0.048708999 > postscript(file="/var/www/html/rcomp/tmp/63da71258808125.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 114 Frequency = 1 lag(myerror, k = 1) myerror 0 0.144188176 NA 1 0.224783352 0.144188176 2 -0.039715556 0.224783352 3 -0.064347052 -0.039715556 4 0.226247577 -0.064347052 5 0.078506715 0.226247577 6 0.005577467 0.078506715 7 -0.010336631 0.005577467 8 0.017179313 -0.010336631 9 0.042443415 0.017179313 10 0.051944355 0.042443415 11 0.051944355 0.051944355 12 -0.118055645 0.051944355 13 0.060668434 -0.118055645 14 0.077123358 0.060668434 15 0.060886392 0.077123358 16 -0.395814288 0.060886392 17 0.002867153 -0.395814288 18 -0.213374013 0.002867153 19 0.136385625 -0.213374013 20 0.110402833 0.136385625 21 0.062207451 0.110402833 22 0.029471726 0.062207451 23 0.002869094 0.029471726 24 0.002869094 0.002869094 25 0.002869094 0.002869094 26 0.002869094 0.002869094 27 0.002869094 0.002869094 28 0.002869094 0.002869094 29 0.002869094 0.002869094 30 0.002869094 0.002869094 31 -0.397130906 0.002869094 32 0.111631633 -0.397130906 33 0.016063246 0.111631633 34 -0.143959243 0.016063246 35 0.059893823 -0.143959243 36 -0.006892251 0.059893823 37 -0.386903495 -0.006892251 38 0.096594942 -0.386903495 39 -0.008474385 0.096594942 40 0.031503126 -0.008474385 41 -0.019025078 0.031503126 42 -0.038026958 -0.019025078 43 -0.038026958 -0.038026958 44 -0.038026958 -0.038026958 45 -0.038026958 -0.038026958 46 -0.038026958 -0.038026958 47 -0.038026958 -0.038026958 48 -0.038026958 -0.038026958 49 -0.038026958 -0.038026958 50 -0.038026958 -0.038026958 51 -0.038026958 -0.038026958 52 -0.038026958 -0.038026958 53 -0.038026958 -0.038026958 54 -0.038026958 -0.038026958 55 -0.038026958 -0.038026958 56 -0.038026958 -0.038026958 57 -0.038026958 -0.038026958 58 -0.038026958 -0.038026958 59 -0.038026958 -0.038026958 60 -0.038026958 -0.038026958 61 -0.038026958 -0.038026958 62 -0.038026958 -0.038026958 63 -0.038026958 -0.038026958 64 -0.038026958 -0.038026958 65 -0.038026958 -0.038026958 66 -0.038026958 -0.038026958 67 0.171973042 -0.038026958 68 -0.107627291 0.171973042 69 -0.038430058 -0.107627291 70 0.132839279 -0.038430058 71 -0.091829769 0.132839279 72 -0.036444824 -0.091829769 73 0.083566421 -0.036444824 74 0.005763634 0.083566421 75 0.114570533 0.005763634 76 -0.056909922 0.114570533 77 0.116623578 -0.056909922 78 -0.043703374 0.116623578 79 0.096209565 -0.043703374 80 0.012680958 0.096209565 81 -0.056093340 0.012680958 82 0.141570852 -0.056093340 83 0.011860283 0.141570852 84 -0.026518650 0.011860283 85 0.147202131 -0.026518650 86 0.021939682 0.147202131 87 -0.018339440 0.021939682 88 0.005381341 -0.018339440 89 0.008404844 0.005381341 90 0.027406724 0.008404844 91 0.027406724 0.027406724 92 0.027406724 0.027406724 93 0.027406724 0.027406724 94 0.027406724 0.027406724 95 0.027406724 0.027406724 96 0.027406724 0.027406724 97 0.027406724 0.027406724 98 0.207406724 0.027406724 99 0.003463582 0.207406724 100 0.008421697 0.003463582 101 -0.154630447 0.008421697 102 -0.262128807 -0.154630447 103 -0.255210314 -0.262128807 104 0.055140370 -0.255210314 105 0.086713779 0.055140370 106 0.012170904 0.086713779 107 -0.027597783 0.012170904 108 0.069851880 -0.027597783 109 0.125605980 0.069851880 110 0.150881306 0.125605980 111 0.084683442 0.150881306 112 0.065810691 0.084683442 113 0.048708999 0.065810691 114 NA 0.048708999 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.224783352 0.144188176 [2,] -0.039715556 0.224783352 [3,] -0.064347052 -0.039715556 [4,] 0.226247577 -0.064347052 [5,] 0.078506715 0.226247577 [6,] 0.005577467 0.078506715 [7,] -0.010336631 0.005577467 [8,] 0.017179313 -0.010336631 [9,] 0.042443415 0.017179313 [10,] 0.051944355 0.042443415 [11,] 0.051944355 0.051944355 [12,] -0.118055645 0.051944355 [13,] 0.060668434 -0.118055645 [14,] 0.077123358 0.060668434 [15,] 0.060886392 0.077123358 [16,] -0.395814288 0.060886392 [17,] 0.002867153 -0.395814288 [18,] -0.213374013 0.002867153 [19,] 0.136385625 -0.213374013 [20,] 0.110402833 0.136385625 [21,] 0.062207451 0.110402833 [22,] 0.029471726 0.062207451 [23,] 0.002869094 0.029471726 [24,] 0.002869094 0.002869094 [25,] 0.002869094 0.002869094 [26,] 0.002869094 0.002869094 [27,] 0.002869094 0.002869094 [28,] 0.002869094 0.002869094 [29,] 0.002869094 0.002869094 [30,] 0.002869094 0.002869094 [31,] -0.397130906 0.002869094 [32,] 0.111631633 -0.397130906 [33,] 0.016063246 0.111631633 [34,] -0.143959243 0.016063246 [35,] 0.059893823 -0.143959243 [36,] -0.006892251 0.059893823 [37,] -0.386903495 -0.006892251 [38,] 0.096594942 -0.386903495 [39,] -0.008474385 0.096594942 [40,] 0.031503126 -0.008474385 [41,] -0.019025078 0.031503126 [42,] -0.038026958 -0.019025078 [43,] -0.038026958 -0.038026958 [44,] -0.038026958 -0.038026958 [45,] -0.038026958 -0.038026958 [46,] -0.038026958 -0.038026958 [47,] -0.038026958 -0.038026958 [48,] -0.038026958 -0.038026958 [49,] -0.038026958 -0.038026958 [50,] -0.038026958 -0.038026958 [51,] -0.038026958 -0.038026958 [52,] -0.038026958 -0.038026958 [53,] -0.038026958 -0.038026958 [54,] -0.038026958 -0.038026958 [55,] -0.038026958 -0.038026958 [56,] -0.038026958 -0.038026958 [57,] -0.038026958 -0.038026958 [58,] -0.038026958 -0.038026958 [59,] -0.038026958 -0.038026958 [60,] -0.038026958 -0.038026958 [61,] -0.038026958 -0.038026958 [62,] -0.038026958 -0.038026958 [63,] -0.038026958 -0.038026958 [64,] -0.038026958 -0.038026958 [65,] -0.038026958 -0.038026958 [66,] -0.038026958 -0.038026958 [67,] 0.171973042 -0.038026958 [68,] -0.107627291 0.171973042 [69,] -0.038430058 -0.107627291 [70,] 0.132839279 -0.038430058 [71,] -0.091829769 0.132839279 [72,] -0.036444824 -0.091829769 [73,] 0.083566421 -0.036444824 [74,] 0.005763634 0.083566421 [75,] 0.114570533 0.005763634 [76,] -0.056909922 0.114570533 [77,] 0.116623578 -0.056909922 [78,] -0.043703374 0.116623578 [79,] 0.096209565 -0.043703374 [80,] 0.012680958 0.096209565 [81,] -0.056093340 0.012680958 [82,] 0.141570852 -0.056093340 [83,] 0.011860283 0.141570852 [84,] -0.026518650 0.011860283 [85,] 0.147202131 -0.026518650 [86,] 0.021939682 0.147202131 [87,] -0.018339440 0.021939682 [88,] 0.005381341 -0.018339440 [89,] 0.008404844 0.005381341 [90,] 0.027406724 0.008404844 [91,] 0.027406724 0.027406724 [92,] 0.027406724 0.027406724 [93,] 0.027406724 0.027406724 [94,] 0.027406724 0.027406724 [95,] 0.027406724 0.027406724 [96,] 0.027406724 0.027406724 [97,] 0.027406724 0.027406724 [98,] 0.207406724 0.027406724 [99,] 0.003463582 0.207406724 [100,] 0.008421697 0.003463582 [101,] -0.154630447 0.008421697 [102,] -0.262128807 -0.154630447 [103,] -0.255210314 -0.262128807 [104,] 0.055140370 -0.255210314 [105,] 0.086713779 0.055140370 [106,] 0.012170904 0.086713779 [107,] -0.027597783 0.012170904 [108,] 0.069851880 -0.027597783 [109,] 0.125605980 0.069851880 [110,] 0.150881306 0.125605980 [111,] 0.084683442 0.150881306 [112,] 0.065810691 0.084683442 [113,] 0.048708999 0.065810691 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.224783352 0.144188176 2 -0.039715556 0.224783352 3 -0.064347052 -0.039715556 4 0.226247577 -0.064347052 5 0.078506715 0.226247577 6 0.005577467 0.078506715 7 -0.010336631 0.005577467 8 0.017179313 -0.010336631 9 0.042443415 0.017179313 10 0.051944355 0.042443415 11 0.051944355 0.051944355 12 -0.118055645 0.051944355 13 0.060668434 -0.118055645 14 0.077123358 0.060668434 15 0.060886392 0.077123358 16 -0.395814288 0.060886392 17 0.002867153 -0.395814288 18 -0.213374013 0.002867153 19 0.136385625 -0.213374013 20 0.110402833 0.136385625 21 0.062207451 0.110402833 22 0.029471726 0.062207451 23 0.002869094 0.029471726 24 0.002869094 0.002869094 25 0.002869094 0.002869094 26 0.002869094 0.002869094 27 0.002869094 0.002869094 28 0.002869094 0.002869094 29 0.002869094 0.002869094 30 0.002869094 0.002869094 31 -0.397130906 0.002869094 32 0.111631633 -0.397130906 33 0.016063246 0.111631633 34 -0.143959243 0.016063246 35 0.059893823 -0.143959243 36 -0.006892251 0.059893823 37 -0.386903495 -0.006892251 38 0.096594942 -0.386903495 39 -0.008474385 0.096594942 40 0.031503126 -0.008474385 41 -0.019025078 0.031503126 42 -0.038026958 -0.019025078 43 -0.038026958 -0.038026958 44 -0.038026958 -0.038026958 45 -0.038026958 -0.038026958 46 -0.038026958 -0.038026958 47 -0.038026958 -0.038026958 48 -0.038026958 -0.038026958 49 -0.038026958 -0.038026958 50 -0.038026958 -0.038026958 51 -0.038026958 -0.038026958 52 -0.038026958 -0.038026958 53 -0.038026958 -0.038026958 54 -0.038026958 -0.038026958 55 -0.038026958 -0.038026958 56 -0.038026958 -0.038026958 57 -0.038026958 -0.038026958 58 -0.038026958 -0.038026958 59 -0.038026958 -0.038026958 60 -0.038026958 -0.038026958 61 -0.038026958 -0.038026958 62 -0.038026958 -0.038026958 63 -0.038026958 -0.038026958 64 -0.038026958 -0.038026958 65 -0.038026958 -0.038026958 66 -0.038026958 -0.038026958 67 0.171973042 -0.038026958 68 -0.107627291 0.171973042 69 -0.038430058 -0.107627291 70 0.132839279 -0.038430058 71 -0.091829769 0.132839279 72 -0.036444824 -0.091829769 73 0.083566421 -0.036444824 74 0.005763634 0.083566421 75 0.114570533 0.005763634 76 -0.056909922 0.114570533 77 0.116623578 -0.056909922 78 -0.043703374 0.116623578 79 0.096209565 -0.043703374 80 0.012680958 0.096209565 81 -0.056093340 0.012680958 82 0.141570852 -0.056093340 83 0.011860283 0.141570852 84 -0.026518650 0.011860283 85 0.147202131 -0.026518650 86 0.021939682 0.147202131 87 -0.018339440 0.021939682 88 0.005381341 -0.018339440 89 0.008404844 0.005381341 90 0.027406724 0.008404844 91 0.027406724 0.027406724 92 0.027406724 0.027406724 93 0.027406724 0.027406724 94 0.027406724 0.027406724 95 0.027406724 0.027406724 96 0.027406724 0.027406724 97 0.027406724 0.027406724 98 0.207406724 0.027406724 99 0.003463582 0.207406724 100 0.008421697 0.003463582 101 -0.154630447 0.008421697 102 -0.262128807 -0.154630447 103 -0.255210314 -0.262128807 104 0.055140370 -0.255210314 105 0.086713779 0.055140370 106 0.012170904 0.086713779 107 -0.027597783 0.012170904 108 0.069851880 -0.027597783 109 0.125605980 0.069851880 110 0.150881306 0.125605980 111 0.084683442 0.150881306 112 0.065810691 0.084683442 113 0.048708999 0.065810691 > 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/rcomp/tmp/7efu31258808125.ps",horizontal=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/rcomp/tmp/884401258808125.ps",horizontal=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/rcomp/tmp/9ti1h1258808125.ps",horizontal=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/rcomp/tmp/107agz1258808125.ps",horizontal=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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/rcomp/tmp/11z9i91258808125.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/rcomp/tmp/12m0x61258808125.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/rcomp/tmp/13q0lj1258808125.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/rcomp/tmp/14zomu1258808125.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/rcomp/tmp/15u7pn1258808125.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/rcomp/tmp/16fx0b1258808125.tab") + } > > system("convert tmp/1iiti1258808125.ps tmp/1iiti1258808125.png") > system("convert tmp/25d2b1258808125.ps tmp/25d2b1258808125.png") > system("convert tmp/3w1091258808125.ps tmp/3w1091258808125.png") > system("convert tmp/4u9lo1258808125.ps tmp/4u9lo1258808125.png") > system("convert tmp/5u5ch1258808125.ps tmp/5u5ch1258808125.png") > system("convert tmp/63da71258808125.ps tmp/63da71258808125.png") > system("convert tmp/7efu31258808125.ps tmp/7efu31258808125.png") > system("convert tmp/884401258808125.ps tmp/884401258808125.png") > system("convert tmp/9ti1h1258808125.ps tmp/9ti1h1258808125.png") > system("convert tmp/107agz1258808125.ps tmp/107agz1258808125.png") > > > proc.time() user system elapsed 3.283 1.617 4.076