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(7 + ,7 + ,7 + ,7 + ,7 + ,4 + ,5 + ,6 + ,5 + ,6 + ,5 + ,5 + ,5 + ,5 + ,5 + ,7 + ,7 + ,7 + ,7 + ,6 + ,6 + ,5 + ,6 + ,4 + ,5 + ,5 + ,7 + ,7 + ,4 + ,7 + ,5 + ,5 + ,6 + ,5 + ,6 + ,5 + ,6 + ,7 + ,6 + ,7 + ,6 + ,7 + ,5 + ,6 + ,7 + ,5 + ,5 + ,6 + ,6 + ,6 + ,6 + ,5 + ,6 + ,5 + ,7 + ,7 + ,7 + ,7 + ,6 + ,7 + ,6 + ,3 + ,7 + ,7 + ,7 + ,3 + ,7 + ,7 + ,6 + ,7 + ,6 + ,6 + ,6 + ,5 + ,6 + ,3 + ,5 + ,5 + ,4 + ,4 + ,4 + ,5 + ,6 + ,4 + ,5 + ,6 + ,7 + ,6 + ,6 + ,7 + ,6 + ,3 + ,6 + ,6 + ,6 + ,5 + ,7 + ,6 + ,5 + ,6 + ,6 + ,7 + ,7 + ,7 + ,7 + ,6 + ,7 + ,6 + ,6 + ,6 + ,3 + ,7 + ,7 + ,4 + ,7 + ,4 + ,4 + ,3 + ,4 + ,5 + ,5 + ,6 + ,7 + ,6 + ,6 + ,4 + ,5 + ,5 + ,6 + ,7 + ,5 + ,7 + ,7 + ,5 + ,7 + ,6 + ,6 + ,6 + ,5 + ,5 + ,2 + ,4 + ,5 + ,2 + ,6 + ,5 + ,5 + ,7 + ,5 + ,5 + ,3 + ,7 + ,7 + ,5 + ,7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+ ,5 + ,0 + ,0 + ,0 + ,0 + ,0 + ,5 + ,5 + ,6 + ,5 + ,5 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,4 + ,5 + ,5 + ,7 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,4 + ,6 + ,5 + ,7 + ,0 + ,0 + ,0 + ,0 + ,0) + ,dim=c(10 + ,101) + ,dimnames=list(c('Q1' + ,'Q2' + ,'Q3' + ,'Q4' + ,'Q5' + ,'Q1-V' + ,'Q2-v' + ,'Q3-v' + ,'Q4-v' + ,'Q5-v') + ,1:101)) > y <- array(NA,dim=c(10,101),dimnames=list(c('Q1','Q2','Q3','Q4','Q5','Q1-V','Q2-v','Q3-v','Q4-v','Q5-v'),1:101)) > 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 > 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 Q1 Q2 Q3 Q4 Q5 Q1-V Q2-v Q3-v Q4-v Q5-v 1 7 7 7 7 7 4 5 6 5 6 2 5 5 5 5 5 7 7 7 7 6 3 6 5 6 4 5 5 7 7 4 7 4 5 5 6 5 6 5 6 7 6 7 5 6 7 5 6 7 5 5 6 6 6 6 6 5 6 5 7 7 7 7 6 7 7 6 3 7 7 7 3 7 7 6 7 8 6 6 6 5 6 3 5 5 4 4 9 4 5 6 4 5 6 7 6 6 7 10 6 3 6 6 6 5 7 6 5 6 11 6 7 7 7 7 6 7 6 6 6 12 3 7 7 4 7 4 4 3 4 5 13 5 6 7 6 6 4 5 5 6 7 14 5 7 7 5 7 6 6 6 5 5 15 2 4 5 2 6 5 5 7 5 5 16 3 7 7 5 7 7 7 7 7 7 17 6 7 6 6 5 6 7 6 7 5 18 6 7 6 6 5 7 6 5 6 6 19 5 3 6 5 7 5 4 6 4 5 20 7 5 6 5 6 5 7 7 6 7 21 5 5 5 6 6 2 6 7 4 7 22 5 5 3 5 1 6 6 7 6 6 23 5 7 7 5 7 1 7 7 6 6 24 5 7 6 5 6 5 7 7 6 7 25 5 6 7 5 7 6 7 6 5 4 26 6 6 7 7 6 6 7 6 5 6 27 5 7 6 5 6 6 6 6 6 6 28 5 6 6 3 6 5 5 7 6 7 29 6 5 6 5 6 6 6 7 6 7 30 4 5 6 4 5 5 6 6 6 6 31 4 3 5 6 5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 5 5 6 5 5 0 0 0 0 0 79 5 4 3 3 5 0 0 0 0 0 80 7 7 7 7 7 0 0 0 0 0 81 7 7 7 6 6 0 0 0 0 0 82 5 2 6 4 6 0 0 0 0 0 83 4 6 6 4 6 0 0 0 0 0 84 6 4 6 6 6 0 0 0 0 0 85 5 7 7 5 7 0 0 0 0 0 86 5 6 7 6 6 0 0 0 0 0 87 4 2 6 5 7 0 0 0 0 0 88 5 7 7 5 5 0 0 0 0 0 89 2 7 7 2 5 0 0 0 0 0 90 7 5 7 6 7 0 0 0 0 0 91 4 6 6 5 5 0 0 0 0 0 92 5 5 7 5 7 0 0 0 0 0 93 5 6 7 6 7 0 0 0 0 0 94 7 7 5 7 5 0 0 0 0 0 95 2 6 6 6 6 0 0 0 0 0 96 4 7 7 4 7 0 0 0 0 0 97 6 6 7 6 6 0 0 0 0 0 98 5 5 6 6 5 0 0 0 0 0 99 5 5 6 5 5 0 0 0 0 0 100 4 4 5 5 7 0 0 0 0 0 101 4 4 6 5 7 0 0 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Q2 Q3 Q4 Q5 `Q1-V` 1.05598 0.09054 -0.03220 0.61857 0.04979 -0.01120 `Q2-v` `Q3-v` `Q4-v` `Q5-v` -0.10548 0.16757 0.10915 -0.11978 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -3.4162 -0.4338 0.0018 0.4803 2.0979 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.05598 0.76723 1.376 0.172 Q2 0.09054 0.08765 1.033 0.304 Q3 -0.03220 0.10917 -0.295 0.769 Q4 0.61857 0.09795 6.315 9.71e-09 *** Q5 0.04979 0.10441 0.477 0.635 `Q1-V` -0.01120 0.10503 -0.107 0.915 `Q2-v` -0.10548 0.12667 -0.833 0.407 `Q3-v` 0.16757 0.15288 1.096 0.276 `Q4-v` 0.10915 0.15350 0.711 0.479 `Q5-v` -0.11978 0.14742 -0.813 0.419 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.9404 on 91 degrees of freedom Multiple R-squared: 0.3663, Adjusted R-squared: 0.3037 F-statistic: 5.845 on 9 and 91 DF, p-value: 2.122e-06 > 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.2128979482 0.425795896 0.7871021 [2,] 0.1153008371 0.230601674 0.8846992 [3,] 0.1423839202 0.284767840 0.8576161 [4,] 0.1543249966 0.308649993 0.8456750 [5,] 0.1333583478 0.266716696 0.8666417 [6,] 0.0834959130 0.166991826 0.9165041 [7,] 0.0467115128 0.093423026 0.9532885 [8,] 0.2845040731 0.569008146 0.7154959 [9,] 0.7759346070 0.448130786 0.2240654 [10,] 0.7847753398 0.430449320 0.2152247 [11,] 0.7233462548 0.553307490 0.2766537 [12,] 0.6498025243 0.700394951 0.3501975 [13,] 0.5950471332 0.809905734 0.4049529 [14,] 0.5849158437 0.830168313 0.4150842 [15,] 0.5104888916 0.979022217 0.4895111 [16,] 0.6097516345 0.780496731 0.3902484 [17,] 0.5962471138 0.807505772 0.4037529 [18,] 0.5267970048 0.946405990 0.4732030 [19,] 0.6564948033 0.687010393 0.3435052 [20,] 0.6246432393 0.750713521 0.3753568 [21,] 0.5614689583 0.877062083 0.4385310 [22,] 0.6150412465 0.769917507 0.3849588 [23,] 0.5606098369 0.878780326 0.4393902 [24,] 0.5011894435 0.997621113 0.4988106 [25,] 0.6160939329 0.767812134 0.3839061 [26,] 0.6337413008 0.732517398 0.3662587 [27,] 0.5776807431 0.844638514 0.4223193 [28,] 0.5152379376 0.969524125 0.4847621 [29,] 0.4583748724 0.916749745 0.5416251 [30,] 0.5816327780 0.836734444 0.4183672 [31,] 0.5212658568 0.957468286 0.4787341 [32,] 0.4823920303 0.964784061 0.5176080 [33,] 0.4362883344 0.872576669 0.5637117 [34,] 0.3790672407 0.758134481 0.6209328 [35,] 0.3211354156 0.642270831 0.6788646 [36,] 0.3290666892 0.658133378 0.6709333 [37,] 0.2771331020 0.554266204 0.7228669 [38,] 0.2490893234 0.498178647 0.7509107 [39,] 0.2129051764 0.425810353 0.7870948 [40,] 0.1710591039 0.342118208 0.8289409 [41,] 0.1893970125 0.378794025 0.8106030 [42,] 0.1516414800 0.303282960 0.8483585 [43,] 0.1856285564 0.371257113 0.8143714 [44,] 0.1545390493 0.309078099 0.8454610 [45,] 0.1571800783 0.314360157 0.8428199 [46,] 0.1242724983 0.248544997 0.8757275 [47,] 0.0958498897 0.191699779 0.9041501 [48,] 0.0722337248 0.144467450 0.9277663 [49,] 0.0839219952 0.167843990 0.9160780 [50,] 0.0679775121 0.135955024 0.9320225 [51,] 0.0498201222 0.099640244 0.9501799 [52,] 0.0431339498 0.086267900 0.9568661 [53,] 0.0627754110 0.125550822 0.9372246 [54,] 0.0519075902 0.103815180 0.9480924 [55,] 0.0437744445 0.087548889 0.9562256 [56,] 0.0437630232 0.087526046 0.9562370 [57,] 0.0340833766 0.068166753 0.9659166 [58,] 0.0247416627 0.049483325 0.9752583 [59,] 0.0164469046 0.032893809 0.9835531 [60,] 0.0117411412 0.023482282 0.9882589 [61,] 0.0184989952 0.036997990 0.9815010 [62,] 0.0123383887 0.024676777 0.9876616 [63,] 0.0227022818 0.045404564 0.9772977 [64,] 0.0150814532 0.030162906 0.9849185 [65,] 0.0117581313 0.023516263 0.9882419 [66,] 0.0072218261 0.014443652 0.9927782 [67,] 0.0284870282 0.056974056 0.9715130 [68,] 0.0205414149 0.041082830 0.9794586 [69,] 0.0281648092 0.056329618 0.9718352 [70,] 0.0286034978 0.057206996 0.9713965 [71,] 0.0187693899 0.037538780 0.9812306 [72,] 0.0132867686 0.026573537 0.9867132 [73,] 0.0070016652 0.014003330 0.9929983 [74,] 0.0039471954 0.007894391 0.9960528 [75,] 0.0017312659 0.003462532 0.9982687 [76,] 0.0006064181 0.001212836 0.9993936 > postscript(file="/var/wessaorg/rcomp/tmp/19r7w1322067245.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/2smr41322067245.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/34ud11322067245.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/4tjeo1322067245.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/5b7pl1322067245.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 = 101 Frequency = 1 1 2 3 4 5 6 0.596834156 -0.091062138 1.984528302 -0.007607870 0.053047354 1.070477256 7 8 9 10 11 12 0.001838128 0.968067595 -0.055000758 0.817330007 -0.278952908 -1.160873552 13 14 15 16 17 18 -0.466065413 -0.157926083 -1.329447499 -2.187554139 0.178076191 0.480281285 19 20 21 22 23 24 0.059032656 2.097873380 -0.473682304 0.036170233 -0.265374223 -0.083214993 25 26 27 28 29 30 -0.081676180 -0.029468917 -0.129707591 1.033503680 1.003590659 -0.291456071 31 32 33 34 35 36 -1.321447541 0.921592483 -0.719643725 0.764762213 0.344290659 0.400607296 37 38 39 40 41 42 1.620042136 -1.158938938 0.305944495 -0.348330116 -0.254044028 -1.820470581 43 44 45 46 47 48 0.062849640 0.191519997 0.496552332 -0.294428324 -0.054480547 1.010629778 49 50 51 52 53 54 0.152305387 -0.875787186 0.153318242 -0.077644099 -1.161300133 -0.256522244 55 56 57 58 59 60 -1.370305563 0.198803271 0.156748075 -0.143882630 0.166006704 -0.073029319 61 62 63 64 65 66 -1.707525079 0.698326041 -0.508328307 -0.780032018 1.234582002 -0.871259794 67 68 69 70 71 72 0.583809908 -1.142892354 0.475676140 0.278308569 -0.120712519 0.475676140 73 74 75 76 77 78 1.331381620 0.243129406 -1.724666994 0.230996176 -0.797621599 0.342715770 79 80 81 82 83 84 1.573786141 0.857107646 1.525469322 1.183123641 -0.179053106 0.764898281 85 86 87 88 89 90 0.094244633 -0.383986492 -0.485238035 0.193830997 -0.950463523 1.656764513 91 92 93 94 95 96 -0.747828417 0.275333006 -0.433779674 0.892286809 -3.416190092 -0.287186873 97 98 99 100 101 0.616013508 -0.275852724 0.342715770 -0.698530008 -0.666326408 > postscript(file="/var/wessaorg/rcomp/tmp/6qcya1322067245.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 = 101 Frequency = 1 lag(myerror, k = 1) myerror 0 0.596834156 NA 1 -0.091062138 0.596834156 2 1.984528302 -0.091062138 3 -0.007607870 1.984528302 4 0.053047354 -0.007607870 5 1.070477256 0.053047354 6 0.001838128 1.070477256 7 0.968067595 0.001838128 8 -0.055000758 0.968067595 9 0.817330007 -0.055000758 10 -0.278952908 0.817330007 11 -1.160873552 -0.278952908 12 -0.466065413 -1.160873552 13 -0.157926083 -0.466065413 14 -1.329447499 -0.157926083 15 -2.187554139 -1.329447499 16 0.178076191 -2.187554139 17 0.480281285 0.178076191 18 0.059032656 0.480281285 19 2.097873380 0.059032656 20 -0.473682304 2.097873380 21 0.036170233 -0.473682304 22 -0.265374223 0.036170233 23 -0.083214993 -0.265374223 24 -0.081676180 -0.083214993 25 -0.029468917 -0.081676180 26 -0.129707591 -0.029468917 27 1.033503680 -0.129707591 28 1.003590659 1.033503680 29 -0.291456071 1.003590659 30 -1.321447541 -0.291456071 31 0.921592483 -1.321447541 32 -0.719643725 0.921592483 33 0.764762213 -0.719643725 34 0.344290659 0.764762213 35 0.400607296 0.344290659 36 1.620042136 0.400607296 37 -1.158938938 1.620042136 38 0.305944495 -1.158938938 39 -0.348330116 0.305944495 40 -0.254044028 -0.348330116 41 -1.820470581 -0.254044028 42 0.062849640 -1.820470581 43 0.191519997 0.062849640 44 0.496552332 0.191519997 45 -0.294428324 0.496552332 46 -0.054480547 -0.294428324 47 1.010629778 -0.054480547 48 0.152305387 1.010629778 49 -0.875787186 0.152305387 50 0.153318242 -0.875787186 51 -0.077644099 0.153318242 52 -1.161300133 -0.077644099 53 -0.256522244 -1.161300133 54 -1.370305563 -0.256522244 55 0.198803271 -1.370305563 56 0.156748075 0.198803271 57 -0.143882630 0.156748075 58 0.166006704 -0.143882630 59 -0.073029319 0.166006704 60 -1.707525079 -0.073029319 61 0.698326041 -1.707525079 62 -0.508328307 0.698326041 63 -0.780032018 -0.508328307 64 1.234582002 -0.780032018 65 -0.871259794 1.234582002 66 0.583809908 -0.871259794 67 -1.142892354 0.583809908 68 0.475676140 -1.142892354 69 0.278308569 0.475676140 70 -0.120712519 0.278308569 71 0.475676140 -0.120712519 72 1.331381620 0.475676140 73 0.243129406 1.331381620 74 -1.724666994 0.243129406 75 0.230996176 -1.724666994 76 -0.797621599 0.230996176 77 0.342715770 -0.797621599 78 1.573786141 0.342715770 79 0.857107646 1.573786141 80 1.525469322 0.857107646 81 1.183123641 1.525469322 82 -0.179053106 1.183123641 83 0.764898281 -0.179053106 84 0.094244633 0.764898281 85 -0.383986492 0.094244633 86 -0.485238035 -0.383986492 87 0.193830997 -0.485238035 88 -0.950463523 0.193830997 89 1.656764513 -0.950463523 90 -0.747828417 1.656764513 91 0.275333006 -0.747828417 92 -0.433779674 0.275333006 93 0.892286809 -0.433779674 94 -3.416190092 0.892286809 95 -0.287186873 -3.416190092 96 0.616013508 -0.287186873 97 -0.275852724 0.616013508 98 0.342715770 -0.275852724 99 -0.698530008 0.342715770 100 -0.666326408 -0.698530008 101 NA -0.666326408 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.091062138 0.596834156 [2,] 1.984528302 -0.091062138 [3,] -0.007607870 1.984528302 [4,] 0.053047354 -0.007607870 [5,] 1.070477256 0.053047354 [6,] 0.001838128 1.070477256 [7,] 0.968067595 0.001838128 [8,] -0.055000758 0.968067595 [9,] 0.817330007 -0.055000758 [10,] -0.278952908 0.817330007 [11,] -1.160873552 -0.278952908 [12,] -0.466065413 -1.160873552 [13,] -0.157926083 -0.466065413 [14,] -1.329447499 -0.157926083 [15,] -2.187554139 -1.329447499 [16,] 0.178076191 -2.187554139 [17,] 0.480281285 0.178076191 [18,] 0.059032656 0.480281285 [19,] 2.097873380 0.059032656 [20,] -0.473682304 2.097873380 [21,] 0.036170233 -0.473682304 [22,] -0.265374223 0.036170233 [23,] -0.083214993 -0.265374223 [24,] -0.081676180 -0.083214993 [25,] -0.029468917 -0.081676180 [26,] -0.129707591 -0.029468917 [27,] 1.033503680 -0.129707591 [28,] 1.003590659 1.033503680 [29,] -0.291456071 1.003590659 [30,] -1.321447541 -0.291456071 [31,] 0.921592483 -1.321447541 [32,] -0.719643725 0.921592483 [33,] 0.764762213 -0.719643725 [34,] 0.344290659 0.764762213 [35,] 0.400607296 0.344290659 [36,] 1.620042136 0.400607296 [37,] -1.158938938 1.620042136 [38,] 0.305944495 -1.158938938 [39,] -0.348330116 0.305944495 [40,] -0.254044028 -0.348330116 [41,] -1.820470581 -0.254044028 [42,] 0.062849640 -1.820470581 [43,] 0.191519997 0.062849640 [44,] 0.496552332 0.191519997 [45,] -0.294428324 0.496552332 [46,] -0.054480547 -0.294428324 [47,] 1.010629778 -0.054480547 [48,] 0.152305387 1.010629778 [49,] -0.875787186 0.152305387 [50,] 0.153318242 -0.875787186 [51,] -0.077644099 0.153318242 [52,] -1.161300133 -0.077644099 [53,] -0.256522244 -1.161300133 [54,] -1.370305563 -0.256522244 [55,] 0.198803271 -1.370305563 [56,] 0.156748075 0.198803271 [57,] -0.143882630 0.156748075 [58,] 0.166006704 -0.143882630 [59,] -0.073029319 0.166006704 [60,] -1.707525079 -0.073029319 [61,] 0.698326041 -1.707525079 [62,] -0.508328307 0.698326041 [63,] -0.780032018 -0.508328307 [64,] 1.234582002 -0.780032018 [65,] -0.871259794 1.234582002 [66,] 0.583809908 -0.871259794 [67,] -1.142892354 0.583809908 [68,] 0.475676140 -1.142892354 [69,] 0.278308569 0.475676140 [70,] -0.120712519 0.278308569 [71,] 0.475676140 -0.120712519 [72,] 1.331381620 0.475676140 [73,] 0.243129406 1.331381620 [74,] -1.724666994 0.243129406 [75,] 0.230996176 -1.724666994 [76,] -0.797621599 0.230996176 [77,] 0.342715770 -0.797621599 [78,] 1.573786141 0.342715770 [79,] 0.857107646 1.573786141 [80,] 1.525469322 0.857107646 [81,] 1.183123641 1.525469322 [82,] -0.179053106 1.183123641 [83,] 0.764898281 -0.179053106 [84,] 0.094244633 0.764898281 [85,] -0.383986492 0.094244633 [86,] -0.485238035 -0.383986492 [87,] 0.193830997 -0.485238035 [88,] -0.950463523 0.193830997 [89,] 1.656764513 -0.950463523 [90,] -0.747828417 1.656764513 [91,] 0.275333006 -0.747828417 [92,] -0.433779674 0.275333006 [93,] 0.892286809 -0.433779674 [94,] -3.416190092 0.892286809 [95,] -0.287186873 -3.416190092 [96,] 0.616013508 -0.287186873 [97,] -0.275852724 0.616013508 [98,] 0.342715770 -0.275852724 [99,] -0.698530008 0.342715770 [100,] -0.666326408 -0.698530008 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.091062138 0.596834156 2 1.984528302 -0.091062138 3 -0.007607870 1.984528302 4 0.053047354 -0.007607870 5 1.070477256 0.053047354 6 0.001838128 1.070477256 7 0.968067595 0.001838128 8 -0.055000758 0.968067595 9 0.817330007 -0.055000758 10 -0.278952908 0.817330007 11 -1.160873552 -0.278952908 12 -0.466065413 -1.160873552 13 -0.157926083 -0.466065413 14 -1.329447499 -0.157926083 15 -2.187554139 -1.329447499 16 0.178076191 -2.187554139 17 0.480281285 0.178076191 18 0.059032656 0.480281285 19 2.097873380 0.059032656 20 -0.473682304 2.097873380 21 0.036170233 -0.473682304 22 -0.265374223 0.036170233 23 -0.083214993 -0.265374223 24 -0.081676180 -0.083214993 25 -0.029468917 -0.081676180 26 -0.129707591 -0.029468917 27 1.033503680 -0.129707591 28 1.003590659 1.033503680 29 -0.291456071 1.003590659 30 -1.321447541 -0.291456071 31 0.921592483 -1.321447541 32 -0.719643725 0.921592483 33 0.764762213 -0.719643725 34 0.344290659 0.764762213 35 0.400607296 0.344290659 36 1.620042136 0.400607296 37 -1.158938938 1.620042136 38 0.305944495 -1.158938938 39 -0.348330116 0.305944495 40 -0.254044028 -0.348330116 41 -1.820470581 -0.254044028 42 0.062849640 -1.820470581 43 0.191519997 0.062849640 44 0.496552332 0.191519997 45 -0.294428324 0.496552332 46 -0.054480547 -0.294428324 47 1.010629778 -0.054480547 48 0.152305387 1.010629778 49 -0.875787186 0.152305387 50 0.153318242 -0.875787186 51 -0.077644099 0.153318242 52 -1.161300133 -0.077644099 53 -0.256522244 -1.161300133 54 -1.370305563 -0.256522244 55 0.198803271 -1.370305563 56 0.156748075 0.198803271 57 -0.143882630 0.156748075 58 0.166006704 -0.143882630 59 -0.073029319 0.166006704 60 -1.707525079 -0.073029319 61 0.698326041 -1.707525079 62 -0.508328307 0.698326041 63 -0.780032018 -0.508328307 64 1.234582002 -0.780032018 65 -0.871259794 1.234582002 66 0.583809908 -0.871259794 67 -1.142892354 0.583809908 68 0.475676140 -1.142892354 69 0.278308569 0.475676140 70 -0.120712519 0.278308569 71 0.475676140 -0.120712519 72 1.331381620 0.475676140 73 0.243129406 1.331381620 74 -1.724666994 0.243129406 75 0.230996176 -1.724666994 76 -0.797621599 0.230996176 77 0.342715770 -0.797621599 78 1.573786141 0.342715770 79 0.857107646 1.573786141 80 1.525469322 0.857107646 81 1.183123641 1.525469322 82 -0.179053106 1.183123641 83 0.764898281 -0.179053106 84 0.094244633 0.764898281 85 -0.383986492 0.094244633 86 -0.485238035 -0.383986492 87 0.193830997 -0.485238035 88 -0.950463523 0.193830997 89 1.656764513 -0.950463523 90 -0.747828417 1.656764513 91 0.275333006 -0.747828417 92 -0.433779674 0.275333006 93 0.892286809 -0.433779674 94 -3.416190092 0.892286809 95 -0.287186873 -3.416190092 96 0.616013508 -0.287186873 97 -0.275852724 0.616013508 98 0.342715770 -0.275852724 99 -0.698530008 0.342715770 100 -0.666326408 -0.698530008 > 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/7xyp61322067245.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/8zqs91322067245.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/9hz5a1322067245.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/10mweq1322067245.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/11rsrl1322067245.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/12b59n1322067245.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/13cy821322067245.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/14b7d91322067245.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/1552f51322067245.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/16t8ea1322067245.tab") + } > > try(system("convert tmp/19r7w1322067245.ps tmp/19r7w1322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/2smr41322067245.ps tmp/2smr41322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/34ud11322067245.ps tmp/34ud11322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/4tjeo1322067245.ps tmp/4tjeo1322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/5b7pl1322067245.ps tmp/5b7pl1322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/6qcya1322067245.ps tmp/6qcya1322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/7xyp61322067245.ps tmp/7xyp61322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/8zqs91322067245.ps tmp/8zqs91322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/9hz5a1322067245.ps tmp/9hz5a1322067245.png",intern=TRUE)) character(0) > try(system("convert tmp/10mweq1322067245.ps tmp/10mweq1322067245.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.928 0.511 4.476