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. 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(9.2,0,9.1,0,9.1,0,9.1,0,9.1,0,9.2,0,9.3,0,9.3,0,9.3,0,9.3,0,9.3,0,9.4,0,9.4,0,9.4,0,9.5,0,9.5,0,9.4,0,9.4,0,9.3,0,9.4,0,9.4,0,9.2,0,9.1,0,9.1,0,9.1,0,9.1,0,9,0,8.9,0,8.8,0,8.7,0,8.5,0,8.3,0,8.1,0,7.8,0,7.6,0,7.5,0,7.4,0,7.3,0,7.1,0,6.9,0,6.8,0,6.8,0,6.8,0,6.9,0,6.7,0,6.6,0,6.5,0,6.4,0,6.3,0,6.3,0,6.3,0,6.5,0,6.6,0,6.5,0,6.4,0,6.5,0,6.7,0,7.1,0,7.1,0,7.2,1,7.2,1,7.3,1,7.3,1,7.3,1,7.4,1,7.4,1,7.6,1,7.6,1,7.6,1,7.7,1,7.8,1,7.9,1,8.1,1,8.1,1,8.1,1,8.2,1,8.2,1,8.2,1,8.2,1,8.2,1,8.2,1,8.3,1,8.3,1,8.4,1,8.4,1,8.4,1,8.3,1,8,1,8,1,8.2,1,8.6,1,8.7,1,8.7,1,8.5,1,8.4,1,8.4,1,8.4,1,8.5,1,8.5,1,8.5,1,8.5,1,8.5,1,8.4,1,8.4,1,8.4,1,8.5,1,8.5,1,8.6,1,8.6,1,8.6,1,8.5,1,8.4,1,8.4,1,8.3,1,8.2,1,8.1,1,8.2,1,8.1,1,8,1,7.9,1,7.8,1,7.7,1,7.7,1,7.9,1,7.8,1,7.6,1,7.4,1,7.3,1,7.1,1,7.1,1,7,1,7,1),dim=c(2,132),dimnames=list(c('Werkloosheid','SabenaFailliet'),1:132)) > y <- array(NA,dim=c(2,132),dimnames=list(c('Werkloosheid','SabenaFailliet'),1:132)) > 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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 0 0 0 0 0 1 0 94 95 8.4 1 0 0 0 0 0 0 0 0 0 0 1 95 96 8.4 1 0 0 0 0 0 0 0 0 0 0 0 96 97 8.4 1 1 0 0 0 0 0 0 0 0 0 0 97 98 8.5 1 0 1 0 0 0 0 0 0 0 0 0 98 99 8.5 1 0 0 1 0 0 0 0 0 0 0 0 99 100 8.5 1 0 0 0 1 0 0 0 0 0 0 0 100 101 8.5 1 0 0 0 0 1 0 0 0 0 0 0 101 102 8.5 1 0 0 0 0 0 1 0 0 0 0 0 102 103 8.4 1 0 0 0 0 0 0 1 0 0 0 0 103 104 8.4 1 0 0 0 0 0 0 0 1 0 0 0 104 105 8.4 1 0 0 0 0 0 0 0 0 1 0 0 105 106 8.5 1 0 0 0 0 0 0 0 0 0 1 0 106 107 8.5 1 0 0 0 0 0 0 0 0 0 0 1 107 108 8.6 1 0 0 0 0 0 0 0 0 0 0 0 108 109 8.6 1 1 0 0 0 0 0 0 0 0 0 0 109 110 8.6 1 0 1 0 0 0 0 0 0 0 0 0 110 111 8.5 1 0 0 1 0 0 0 0 0 0 0 0 111 112 8.4 1 0 0 0 1 0 0 0 0 0 0 0 112 113 8.4 1 0 0 0 0 1 0 0 0 0 0 0 113 114 8.3 1 0 0 0 0 0 1 0 0 0 0 0 114 115 8.2 1 0 0 0 0 0 0 1 0 0 0 0 115 116 8.1 1 0 0 0 0 0 0 0 1 0 0 0 116 117 8.2 1 0 0 0 0 0 0 0 0 1 0 0 117 118 8.1 1 0 0 0 0 0 0 0 0 0 1 0 118 119 8.0 1 0 0 0 0 0 0 0 0 0 0 1 119 120 7.9 1 0 0 0 0 0 0 0 0 0 0 0 120 121 7.8 1 1 0 0 0 0 0 0 0 0 0 0 121 122 7.7 1 0 1 0 0 0 0 0 0 0 0 0 122 123 7.7 1 0 0 1 0 0 0 0 0 0 0 0 123 124 7.9 1 0 0 0 1 0 0 0 0 0 0 0 124 125 7.8 1 0 0 0 0 1 0 0 0 0 0 0 125 126 7.6 1 0 0 0 0 0 1 0 0 0 0 0 126 127 7.4 1 0 0 0 0 0 0 1 0 0 0 0 127 128 7.3 1 0 0 0 0 0 0 0 1 0 0 0 128 129 7.1 1 0 0 0 0 0 0 0 0 1 0 0 129 130 7.1 1 0 0 0 0 0 0 0 0 0 1 0 130 131 7.0 1 0 0 0 0 0 0 0 0 0 0 1 131 132 7.0 1 0 0 0 0 0 0 0 0 0 0 0 132 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) SabenaFailliet M1 M2 M3 8.68377 1.37000 0.07502 0.08778 0.07328 M4 M5 M6 M7 M8 0.07695 0.08063 0.08431 0.09707 0.11893 M9 M10 M11 t 0.11352 0.11719 0.08451 -0.02186 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.5955 -0.5575 0.2206 0.5904 1.0890 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 8.683772 0.283866 30.591 < 2e-16 *** SabenaFailliet 1.369997 0.282594 4.848 3.84e-06 *** M1 0.075017 0.347300 0.216 0.829 M2 0.087784 0.347123 0.253 0.801 M3 0.073278 0.346985 0.211 0.833 M4 0.076955 0.346887 0.222 0.825 M5 0.080631 0.346827 0.232 0.817 M6 0.084307 0.346808 0.243 0.808 M7 0.097074 0.346827 0.280 0.780 M8 0.118932 0.346887 0.343 0.732 M9 0.113517 0.346985 0.327 0.744 M10 0.117193 0.347123 0.338 0.736 M11 0.084505 0.347300 0.243 0.808 t -0.021858 0.003698 -5.911 3.38e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.8128 on 118 degrees of freedom Multiple R-squared: 0.2337, Adjusted R-squared: 0.1493 F-statistic: 2.769 on 13 and 118 DF, p-value: 0.001807 > 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,] 9.293832e-04 1.858766e-03 9.990706e-01 [2,] 1.443965e-04 2.887931e-04 9.998556e-01 [3,] 1.763423e-04 3.526847e-04 9.998237e-01 [4,] 4.150124e-05 8.300248e-05 9.999585e-01 [5,] 9.527195e-06 1.905439e-05 9.999905e-01 [6,] 9.495985e-06 1.899197e-05 9.999905e-01 [7,] 1.297818e-05 2.595636e-05 9.999870e-01 [8,] 2.290220e-05 4.580439e-05 9.999771e-01 [9,] 2.487854e-05 4.975708e-05 9.999751e-01 [10,] 1.635429e-05 3.270858e-05 9.999836e-01 [11,] 1.984816e-05 3.969632e-05 9.999802e-01 [12,] 3.273911e-05 6.547822e-05 9.999673e-01 [13,] 5.496125e-05 1.099225e-04 9.999450e-01 [14,] 1.586921e-04 3.173843e-04 9.998413e-01 [15,] 7.685445e-04 1.537089e-03 9.992315e-01 [16,] 5.450679e-03 1.090136e-02 9.945493e-01 [17,] 3.059267e-02 6.118535e-02 9.694073e-01 [18,] 1.118046e-01 2.236091e-01 8.881954e-01 [19,] 2.674052e-01 5.348104e-01 7.325948e-01 [20,] 4.888315e-01 9.776631e-01 5.111685e-01 [21,] 6.238692e-01 7.522616e-01 3.761308e-01 [22,] 7.175750e-01 5.648500e-01 2.824250e-01 [23,] 8.035517e-01 3.928965e-01 1.964483e-01 [24,] 8.687635e-01 2.624731e-01 1.312365e-01 [25,] 9.043139e-01 1.913722e-01 9.568609e-02 [26,] 9.234176e-01 1.531647e-01 7.658237e-02 [27,] 9.297554e-01 1.404891e-01 7.024457e-02 [28,] 9.272509e-01 1.454983e-01 7.274913e-02 [29,] 9.262987e-01 1.474025e-01 7.370126e-02 [30,] 9.191854e-01 1.616291e-01 8.081457e-02 [31,] 9.099309e-01 1.801382e-01 9.006911e-02 [32,] 9.028473e-01 1.943054e-01 9.715269e-02 [33,] 8.884789e-01 2.230422e-01 1.115211e-01 [34,] 8.707951e-01 2.584097e-01 1.292049e-01 [35,] 8.490236e-01 3.019528e-01 1.509764e-01 [36,] 8.147219e-01 3.705561e-01 1.852781e-01 [37,] 7.765068e-01 4.469863e-01 2.234932e-01 [38,] 7.350481e-01 5.299038e-01 2.649519e-01 [39,] 6.988051e-01 6.023897e-01 3.011949e-01 [40,] 6.611573e-01 6.776854e-01 3.388427e-01 [41,] 6.295519e-01 7.408963e-01 3.704481e-01 [42,] 6.462093e-01 7.075814e-01 3.537907e-01 [43,] 6.677561e-01 6.644879e-01 3.322439e-01 [44,] 6.638042e-01 6.723917e-01 3.361958e-01 [45,] 6.990435e-01 6.019130e-01 3.009565e-01 [46,] 7.299538e-01 5.400925e-01 2.700462e-01 [47,] 7.630947e-01 4.738106e-01 2.369053e-01 [48,] 8.012612e-01 3.974777e-01 1.987388e-01 [49,] 8.321040e-01 3.357921e-01 1.678960e-01 [50,] 8.656755e-01 2.686491e-01 1.343245e-01 [51,] 8.871649e-01 2.256702e-01 1.128351e-01 [52,] 9.076033e-01 1.847933e-01 9.239667e-02 [53,] 9.288682e-01 1.422637e-01 7.113185e-02 [54,] 9.446497e-01 1.107006e-01 5.535031e-02 [55,] 9.549115e-01 9.017690e-02 4.508845e-02 [56,] 9.705633e-01 5.887335e-02 2.943667e-02 [57,] 9.855022e-01 2.899559e-02 1.449780e-02 [58,] 9.927767e-01 1.444662e-02 7.223310e-03 [59,] 9.962063e-01 7.587493e-03 3.793747e-03 [60,] 9.977357e-01 4.528579e-03 2.264290e-03 [61,] 9.985534e-01 2.893287e-03 1.446643e-03 [62,] 9.990225e-01 1.954986e-03 9.774930e-04 [63,] 9.993381e-01 1.323891e-03 6.619456e-04 [64,] 9.995282e-01 9.435280e-04 4.717640e-04 [65,] 9.996646e-01 6.707021e-04 3.353511e-04 [66,] 9.997201e-01 5.598890e-04 2.799445e-04 [67,] 9.997449e-01 5.102889e-04 2.551445e-04 [68,] 9.998093e-01 3.813020e-04 1.906510e-04 [69,] 9.998812e-01 2.376863e-04 1.188431e-04 [70,] 9.999229e-01 1.542545e-04 7.712724e-05 [71,] 9.999540e-01 9.195466e-05 4.597733e-05 [72,] 9.999920e-01 1.603404e-05 8.017020e-06 [73,] 9.999994e-01 1.290727e-06 6.453636e-07 [74,] 9.999999e-01 2.246265e-07 1.123133e-07 [75,] 9.999999e-01 2.463395e-07 1.231697e-07 [76,] 9.999998e-01 3.637705e-07 1.818852e-07 [77,] 9.999997e-01 5.861351e-07 2.930675e-07 [78,] 9.999996e-01 7.749701e-07 3.874851e-07 [79,] 9.999996e-01 8.976004e-07 4.488002e-07 [80,] 9.999996e-01 8.029252e-07 4.014626e-07 [81,] 9.999998e-01 4.048353e-07 2.024177e-07 [82,] 9.999998e-01 3.258470e-07 1.629235e-07 [83,] 9.999999e-01 2.806213e-07 1.403106e-07 [84,] 9.999999e-01 1.362910e-07 6.814548e-08 [85,] 1.000000e+00 5.406562e-08 2.703281e-08 [86,] 1.000000e+00 3.869823e-08 1.934912e-08 [87,] 1.000000e+00 2.505410e-08 1.252705e-08 [88,] 1.000000e+00 2.139849e-08 1.069924e-08 [89,] 1.000000e+00 1.415009e-08 7.075046e-09 [90,] 1.000000e+00 2.272881e-08 1.136440e-08 [91,] 1.000000e+00 6.156403e-08 3.078202e-08 [92,] 9.999998e-01 3.334935e-07 1.667467e-07 [93,] 9.999990e-01 2.034596e-06 1.017298e-06 [94,] 9.999943e-01 1.143854e-05 5.719269e-06 [95,] 9.999662e-01 6.769940e-05 3.384970e-05 [96,] 9.999501e-01 9.987295e-05 4.993647e-05 [97,] 9.999021e-01 1.958853e-04 9.794266e-05 [98,] 9.996981e-01 6.037257e-04 3.018629e-04 [99,] 9.982720e-01 3.455942e-03 1.727971e-03 > postscript(file="/var/www/html/rcomp/tmp/155pm1229950569.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/2x7o71229950569.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/3unkq1229950569.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/43gqw1229950569.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/5cm7n1229950569.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 = 132 Frequency = 1 1 2 3 4 5 6 0.46306855 0.37215946 0.40852309 0.42670491 0.44488673 0.56306855 7 8 9 10 11 12 0.67215946 0.67215946 0.69943218 0.71761400 0.77215946 0.97852284 13 14 15 16 17 18 0.92536363 0.93445454 1.07081817 1.08899999 1.00718181 1.02536363 19 20 21 22 23 24 0.93445454 1.03445454 1.06172726 0.87990908 0.83445454 0.94081792 25 26 27 28 29 30 0.88765871 0.89674962 0.83311326 0.75129507 0.66947689 0.58765871 31 32 33 34 35 36 0.39674962 0.19674962 0.02402235 -0.25779584 -0.40325038 -0.39688699 37 38 39 40 41 42 -0.55004621 -0.64095530 -0.80459166 -0.98640984 -1.06822803 -1.05004621 43 44 45 46 47 48 -1.04095530 -0.94095530 -1.11368257 -1.19550075 -1.24095530 -1.23459191 49 50 51 52 53 54 -1.38775113 -1.37866022 -1.34229658 -1.12411476 -1.00593294 -1.08775113 55 56 57 58 59 60 -1.17866022 -1.07866022 -0.85138749 -0.43320567 -0.37866022 -1.54229408 61 62 63 64 65 66 -1.59545330 -1.48636239 -1.44999875 -1.43181693 -1.31363511 -1.29545330 67 68 69 70 71 72 -1.08636239 -1.08636239 -1.05908966 -0.94090784 -0.78636239 -0.57999900 73 74 75 76 77 78 -0.43315821 -0.42406731 -0.38770367 -0.26952185 -0.25134003 -0.23315821 79 80 81 82 83 84 -0.22406731 -0.22406731 -0.19679458 -0.07861276 -0.02406731 0.18229608 85 86 87 88 89 90 0.12913687 0.13822778 0.07459141 -0.20722677 -0.18904495 0.02913687 91 92 93 94 95 96 0.43822778 0.53822778 0.56550050 0.38368232 0.33822778 0.44459116 97 98 99 100 101 102 0.39143195 0.50052286 0.53688649 0.55506831 0.57325013 0.59143195 103 104 105 106 107 108 0.50052286 0.50052286 0.52779559 0.64597740 0.70052286 0.90688624 109 110 111 112 113 114 0.85372703 0.86281794 0.79918158 0.71736339 0.73554521 0.65372703 115 116 117 118 119 120 0.56281794 0.46281794 0.59009067 0.50827249 0.46281794 0.46918133 121 122 123 124 125 126 0.31602211 0.22511302 0.26147666 0.47965848 0.39784030 0.21602211 127 128 129 130 131 132 0.02511302 -0.07488698 -0.24761425 -0.22943243 -0.27488698 -0.16852359 > postscript(file="/var/www/html/rcomp/tmp/6odtf1229950569.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 = 132 Frequency = 1 lag(myerror, k = 1) myerror 0 0.46306855 NA 1 0.37215946 0.46306855 2 0.40852309 0.37215946 3 0.42670491 0.40852309 4 0.44488673 0.42670491 5 0.56306855 0.44488673 6 0.67215946 0.56306855 7 0.67215946 0.67215946 8 0.69943218 0.67215946 9 0.71761400 0.69943218 10 0.77215946 0.71761400 11 0.97852284 0.77215946 12 0.92536363 0.97852284 13 0.93445454 0.92536363 14 1.07081817 0.93445454 15 1.08899999 1.07081817 16 1.00718181 1.08899999 17 1.02536363 1.00718181 18 0.93445454 1.02536363 19 1.03445454 0.93445454 20 1.06172726 1.03445454 21 0.87990908 1.06172726 22 0.83445454 0.87990908 23 0.94081792 0.83445454 24 0.88765871 0.94081792 25 0.89674962 0.88765871 26 0.83311326 0.89674962 27 0.75129507 0.83311326 28 0.66947689 0.75129507 29 0.58765871 0.66947689 30 0.39674962 0.58765871 31 0.19674962 0.39674962 32 0.02402235 0.19674962 33 -0.25779584 0.02402235 34 -0.40325038 -0.25779584 35 -0.39688699 -0.40325038 36 -0.55004621 -0.39688699 37 -0.64095530 -0.55004621 38 -0.80459166 -0.64095530 39 -0.98640984 -0.80459166 40 -1.06822803 -0.98640984 41 -1.05004621 -1.06822803 42 -1.04095530 -1.05004621 43 -0.94095530 -1.04095530 44 -1.11368257 -0.94095530 45 -1.19550075 -1.11368257 46 -1.24095530 -1.19550075 47 -1.23459191 -1.24095530 48 -1.38775113 -1.23459191 49 -1.37866022 -1.38775113 50 -1.34229658 -1.37866022 51 -1.12411476 -1.34229658 52 -1.00593294 -1.12411476 53 -1.08775113 -1.00593294 54 -1.17866022 -1.08775113 55 -1.07866022 -1.17866022 56 -0.85138749 -1.07866022 57 -0.43320567 -0.85138749 58 -0.37866022 -0.43320567 59 -1.54229408 -0.37866022 60 -1.59545330 -1.54229408 61 -1.48636239 -1.59545330 62 -1.44999875 -1.48636239 63 -1.43181693 -1.44999875 64 -1.31363511 -1.43181693 65 -1.29545330 -1.31363511 66 -1.08636239 -1.29545330 67 -1.08636239 -1.08636239 68 -1.05908966 -1.08636239 69 -0.94090784 -1.05908966 70 -0.78636239 -0.94090784 71 -0.57999900 -0.78636239 72 -0.43315821 -0.57999900 73 -0.42406731 -0.43315821 74 -0.38770367 -0.42406731 75 -0.26952185 -0.38770367 76 -0.25134003 -0.26952185 77 -0.23315821 -0.25134003 78 -0.22406731 -0.23315821 79 -0.22406731 -0.22406731 80 -0.19679458 -0.22406731 81 -0.07861276 -0.19679458 82 -0.02406731 -0.07861276 83 0.18229608 -0.02406731 84 0.12913687 0.18229608 85 0.13822778 0.12913687 86 0.07459141 0.13822778 87 -0.20722677 0.07459141 88 -0.18904495 -0.20722677 89 0.02913687 -0.18904495 90 0.43822778 0.02913687 91 0.53822778 0.43822778 92 0.56550050 0.53822778 93 0.38368232 0.56550050 94 0.33822778 0.38368232 95 0.44459116 0.33822778 96 0.39143195 0.44459116 97 0.50052286 0.39143195 98 0.53688649 0.50052286 99 0.55506831 0.53688649 100 0.57325013 0.55506831 101 0.59143195 0.57325013 102 0.50052286 0.59143195 103 0.50052286 0.50052286 104 0.52779559 0.50052286 105 0.64597740 0.52779559 106 0.70052286 0.64597740 107 0.90688624 0.70052286 108 0.85372703 0.90688624 109 0.86281794 0.85372703 110 0.79918158 0.86281794 111 0.71736339 0.79918158 112 0.73554521 0.71736339 113 0.65372703 0.73554521 114 0.56281794 0.65372703 115 0.46281794 0.56281794 116 0.59009067 0.46281794 117 0.50827249 0.59009067 118 0.46281794 0.50827249 119 0.46918133 0.46281794 120 0.31602211 0.46918133 121 0.22511302 0.31602211 122 0.26147666 0.22511302 123 0.47965848 0.26147666 124 0.39784030 0.47965848 125 0.21602211 0.39784030 126 0.02511302 0.21602211 127 -0.07488698 0.02511302 128 -0.24761425 -0.07488698 129 -0.22943243 -0.24761425 130 -0.27488698 -0.22943243 131 -0.16852359 -0.27488698 132 NA -0.16852359 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.37215946 0.46306855 [2,] 0.40852309 0.37215946 [3,] 0.42670491 0.40852309 [4,] 0.44488673 0.42670491 [5,] 0.56306855 0.44488673 [6,] 0.67215946 0.56306855 [7,] 0.67215946 0.67215946 [8,] 0.69943218 0.67215946 [9,] 0.71761400 0.69943218 [10,] 0.77215946 0.71761400 [11,] 0.97852284 0.77215946 [12,] 0.92536363 0.97852284 [13,] 0.93445454 0.92536363 [14,] 1.07081817 0.93445454 [15,] 1.08899999 1.07081817 [16,] 1.00718181 1.08899999 [17,] 1.02536363 1.00718181 [18,] 0.93445454 1.02536363 [19,] 1.03445454 0.93445454 [20,] 1.06172726 1.03445454 [21,] 0.87990908 1.06172726 [22,] 0.83445454 0.87990908 [23,] 0.94081792 0.83445454 [24,] 0.88765871 0.94081792 [25,] 0.89674962 0.88765871 [26,] 0.83311326 0.89674962 [27,] 0.75129507 0.83311326 [28,] 0.66947689 0.75129507 [29,] 0.58765871 0.66947689 [30,] 0.39674962 0.58765871 [31,] 0.19674962 0.39674962 [32,] 0.02402235 0.19674962 [33,] -0.25779584 0.02402235 [34,] -0.40325038 -0.25779584 [35,] -0.39688699 -0.40325038 [36,] -0.55004621 -0.39688699 [37,] -0.64095530 -0.55004621 [38,] -0.80459166 -0.64095530 [39,] -0.98640984 -0.80459166 [40,] -1.06822803 -0.98640984 [41,] -1.05004621 -1.06822803 [42,] -1.04095530 -1.05004621 [43,] -0.94095530 -1.04095530 [44,] -1.11368257 -0.94095530 [45,] -1.19550075 -1.11368257 [46,] -1.24095530 -1.19550075 [47,] -1.23459191 -1.24095530 [48,] -1.38775113 -1.23459191 [49,] -1.37866022 -1.38775113 [50,] -1.34229658 -1.37866022 [51,] -1.12411476 -1.34229658 [52,] -1.00593294 -1.12411476 [53,] -1.08775113 -1.00593294 [54,] -1.17866022 -1.08775113 [55,] -1.07866022 -1.17866022 [56,] -0.85138749 -1.07866022 [57,] -0.43320567 -0.85138749 [58,] -0.37866022 -0.43320567 [59,] -1.54229408 -0.37866022 [60,] -1.59545330 -1.54229408 [61,] -1.48636239 -1.59545330 [62,] -1.44999875 -1.48636239 [63,] -1.43181693 -1.44999875 [64,] -1.31363511 -1.43181693 [65,] -1.29545330 -1.31363511 [66,] -1.08636239 -1.29545330 [67,] -1.08636239 -1.08636239 [68,] -1.05908966 -1.08636239 [69,] -0.94090784 -1.05908966 [70,] -0.78636239 -0.94090784 [71,] -0.57999900 -0.78636239 [72,] -0.43315821 -0.57999900 [73,] -0.42406731 -0.43315821 [74,] -0.38770367 -0.42406731 [75,] -0.26952185 -0.38770367 [76,] -0.25134003 -0.26952185 [77,] -0.23315821 -0.25134003 [78,] -0.22406731 -0.23315821 [79,] -0.22406731 -0.22406731 [80,] -0.19679458 -0.22406731 [81,] -0.07861276 -0.19679458 [82,] -0.02406731 -0.07861276 [83,] 0.18229608 -0.02406731 [84,] 0.12913687 0.18229608 [85,] 0.13822778 0.12913687 [86,] 0.07459141 0.13822778 [87,] -0.20722677 0.07459141 [88,] -0.18904495 -0.20722677 [89,] 0.02913687 -0.18904495 [90,] 0.43822778 0.02913687 [91,] 0.53822778 0.43822778 [92,] 0.56550050 0.53822778 [93,] 0.38368232 0.56550050 [94,] 0.33822778 0.38368232 [95,] 0.44459116 0.33822778 [96,] 0.39143195 0.44459116 [97,] 0.50052286 0.39143195 [98,] 0.53688649 0.50052286 [99,] 0.55506831 0.53688649 [100,] 0.57325013 0.55506831 [101,] 0.59143195 0.57325013 [102,] 0.50052286 0.59143195 [103,] 0.50052286 0.50052286 [104,] 0.52779559 0.50052286 [105,] 0.64597740 0.52779559 [106,] 0.70052286 0.64597740 [107,] 0.90688624 0.70052286 [108,] 0.85372703 0.90688624 [109,] 0.86281794 0.85372703 [110,] 0.79918158 0.86281794 [111,] 0.71736339 0.79918158 [112,] 0.73554521 0.71736339 [113,] 0.65372703 0.73554521 [114,] 0.56281794 0.65372703 [115,] 0.46281794 0.56281794 [116,] 0.59009067 0.46281794 [117,] 0.50827249 0.59009067 [118,] 0.46281794 0.50827249 [119,] 0.46918133 0.46281794 [120,] 0.31602211 0.46918133 [121,] 0.22511302 0.31602211 [122,] 0.26147666 0.22511302 [123,] 0.47965848 0.26147666 [124,] 0.39784030 0.47965848 [125,] 0.21602211 0.39784030 [126,] 0.02511302 0.21602211 [127,] -0.07488698 0.02511302 [128,] -0.24761425 -0.07488698 [129,] -0.22943243 -0.24761425 [130,] -0.27488698 -0.22943243 [131,] -0.16852359 -0.27488698 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.37215946 0.46306855 2 0.40852309 0.37215946 3 0.42670491 0.40852309 4 0.44488673 0.42670491 5 0.56306855 0.44488673 6 0.67215946 0.56306855 7 0.67215946 0.67215946 8 0.69943218 0.67215946 9 0.71761400 0.69943218 10 0.77215946 0.71761400 11 0.97852284 0.77215946 12 0.92536363 0.97852284 13 0.93445454 0.92536363 14 1.07081817 0.93445454 15 1.08899999 1.07081817 16 1.00718181 1.08899999 17 1.02536363 1.00718181 18 0.93445454 1.02536363 19 1.03445454 0.93445454 20 1.06172726 1.03445454 21 0.87990908 1.06172726 22 0.83445454 0.87990908 23 0.94081792 0.83445454 24 0.88765871 0.94081792 25 0.89674962 0.88765871 26 0.83311326 0.89674962 27 0.75129507 0.83311326 28 0.66947689 0.75129507 29 0.58765871 0.66947689 30 0.39674962 0.58765871 31 0.19674962 0.39674962 32 0.02402235 0.19674962 33 -0.25779584 0.02402235 34 -0.40325038 -0.25779584 35 -0.39688699 -0.40325038 36 -0.55004621 -0.39688699 37 -0.64095530 -0.55004621 38 -0.80459166 -0.64095530 39 -0.98640984 -0.80459166 40 -1.06822803 -0.98640984 41 -1.05004621 -1.06822803 42 -1.04095530 -1.05004621 43 -0.94095530 -1.04095530 44 -1.11368257 -0.94095530 45 -1.19550075 -1.11368257 46 -1.24095530 -1.19550075 47 -1.23459191 -1.24095530 48 -1.38775113 -1.23459191 49 -1.37866022 -1.38775113 50 -1.34229658 -1.37866022 51 -1.12411476 -1.34229658 52 -1.00593294 -1.12411476 53 -1.08775113 -1.00593294 54 -1.17866022 -1.08775113 55 -1.07866022 -1.17866022 56 -0.85138749 -1.07866022 57 -0.43320567 -0.85138749 58 -0.37866022 -0.43320567 59 -1.54229408 -0.37866022 60 -1.59545330 -1.54229408 61 -1.48636239 -1.59545330 62 -1.44999875 -1.48636239 63 -1.43181693 -1.44999875 64 -1.31363511 -1.43181693 65 -1.29545330 -1.31363511 66 -1.08636239 -1.29545330 67 -1.08636239 -1.08636239 68 -1.05908966 -1.08636239 69 -0.94090784 -1.05908966 70 -0.78636239 -0.94090784 71 -0.57999900 -0.78636239 72 -0.43315821 -0.57999900 73 -0.42406731 -0.43315821 74 -0.38770367 -0.42406731 75 -0.26952185 -0.38770367 76 -0.25134003 -0.26952185 77 -0.23315821 -0.25134003 78 -0.22406731 -0.23315821 79 -0.22406731 -0.22406731 80 -0.19679458 -0.22406731 81 -0.07861276 -0.19679458 82 -0.02406731 -0.07861276 83 0.18229608 -0.02406731 84 0.12913687 0.18229608 85 0.13822778 0.12913687 86 0.07459141 0.13822778 87 -0.20722677 0.07459141 88 -0.18904495 -0.20722677 89 0.02913687 -0.18904495 90 0.43822778 0.02913687 91 0.53822778 0.43822778 92 0.56550050 0.53822778 93 0.38368232 0.56550050 94 0.33822778 0.38368232 95 0.44459116 0.33822778 96 0.39143195 0.44459116 97 0.50052286 0.39143195 98 0.53688649 0.50052286 99 0.55506831 0.53688649 100 0.57325013 0.55506831 101 0.59143195 0.57325013 102 0.50052286 0.59143195 103 0.50052286 0.50052286 104 0.52779559 0.50052286 105 0.64597740 0.52779559 106 0.70052286 0.64597740 107 0.90688624 0.70052286 108 0.85372703 0.90688624 109 0.86281794 0.85372703 110 0.79918158 0.86281794 111 0.71736339 0.79918158 112 0.73554521 0.71736339 113 0.65372703 0.73554521 114 0.56281794 0.65372703 115 0.46281794 0.56281794 116 0.59009067 0.46281794 117 0.50827249 0.59009067 118 0.46281794 0.50827249 119 0.46918133 0.46281794 120 0.31602211 0.46918133 121 0.22511302 0.31602211 122 0.26147666 0.22511302 123 0.47965848 0.26147666 124 0.39784030 0.47965848 125 0.21602211 0.39784030 126 0.02511302 0.21602211 127 -0.07488698 0.02511302 128 -0.24761425 -0.07488698 129 -0.22943243 -0.24761425 130 -0.27488698 -0.22943243 131 -0.16852359 -0.27488698 > 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/7tah11229950569.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/8gvh91229950569.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/9gs5o1229950569.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/10r5hy1229950569.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/11tmwb1229950569.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/127k4c1229950569.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/13c0u71229950569.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/14eshp1229950570.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/1543cl1229950570.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/16lha21229950570.tab") + } > > system("convert tmp/155pm1229950569.ps tmp/155pm1229950569.png") > system("convert tmp/2x7o71229950569.ps tmp/2x7o71229950569.png") > system("convert tmp/3unkq1229950569.ps tmp/3unkq1229950569.png") > system("convert tmp/43gqw1229950569.ps tmp/43gqw1229950569.png") > system("convert tmp/5cm7n1229950569.ps tmp/5cm7n1229950569.png") > system("convert tmp/6odtf1229950569.ps tmp/6odtf1229950569.png") > system("convert tmp/7tah11229950569.ps tmp/7tah11229950569.png") > system("convert tmp/8gvh91229950569.ps tmp/8gvh91229950569.png") > system("convert tmp/9gs5o1229950569.ps tmp/9gs5o1229950569.png") > system("convert tmp/10r5hy1229950569.ps tmp/10r5hy1229950569.png") > > > proc.time() user system elapsed 3.518 1.669 5.324