R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(14 + ,10 + ,-15 + ,11 + ,20 + ,14 + ,12 + ,-14 + ,11 + ,19 + ,15 + ,13 + ,-18 + ,11 + ,18 + ,13 + ,15 + ,-13 + ,11 + ,13 + ,8 + ,3 + ,-2 + ,11 + ,17 + ,7 + ,2 + ,-1 + ,9 + ,17 + ,3 + ,-2 + ,5 + ,8 + ,13 + ,3 + ,1 + ,8 + ,6 + ,14 + ,4 + ,1 + ,6 + ,7 + ,13 + ,4 + ,-1 + ,7 + ,8 + ,17 + ,0 + ,-6 + ,15 + ,6 + ,17 + ,-4 + ,-13 + ,23 + ,5 + ,15 + ,-14 + ,-25 + ,43 + ,2 + ,9 + ,-18 + ,-26 + ,60 + ,3 + ,10 + ,-8 + ,-9 + ,36 + ,3 + ,9 + ,-1 + ,1 + ,28 + ,7 + ,14 + ,1 + ,3 + ,23 + ,8 + ,18 + ,2 + ,6 + ,23 + ,7 + ,18 + ,0 + ,2 + ,22 + ,7 + ,12 + ,1 + ,5 + ,22 + ,6 + ,16 + ,0 + ,5 + ,24 + ,6 + ,12 + ,-1 + ,0 + ,32 + ,7 + ,19 + ,-3 + ,-5 + ,27 + ,5 + ,13 + ,-3 + ,-4 + ,27 + ,5 + ,12 + ,-3 + ,-2 + ,27 + ,5 + ,13 + ,-4 + ,-1 + ,29 + ,4 + ,11 + ,-8 + ,-8 + ,38 + ,4 + ,10 + ,-9 + ,-16 + ,40 + ,4 + ,16 + ,-13 + ,-19 + ,45 + ,1 + ,12 + ,-18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3 + ,-3 + ,-14 + ,-11 + ,40 + ,-3 + ,-1 + ,-17 + ,-16 + ,50 + ,-3 + ,3) + ,dim=c(5 + ,145) + ,dimnames=list(c('consumentenvertrouwen' + ,'situatie' + ,'werkloosheid' + ,'financiƫle' + ,'spaarvermogen') + ,1:145)) > y <- array(NA,dim=c(5,145),dimnames=list(c('consumentenvertrouwen','situatie','werkloosheid','financiƫle','spaarvermogen'),1:145)) > 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' > 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, 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 consumentenvertrouwen situatie werkloosheid financi\303\253le spaarvermogen 1 14 10 -15 11 20 2 14 12 -14 11 19 3 15 13 -18 11 18 4 13 15 -13 11 13 5 8 3 -2 11 17 6 7 2 -1 9 17 7 3 -2 5 8 13 8 3 1 8 6 14 9 4 1 6 7 13 10 4 -1 7 8 17 11 0 -6 15 6 17 12 -4 -13 23 5 15 13 -14 -25 43 2 9 14 -18 -26 60 3 10 15 -8 -9 36 3 9 16 -1 1 28 7 14 17 1 3 23 8 18 18 2 6 23 7 18 19 0 2 22 7 12 20 1 5 22 6 16 21 0 5 24 6 12 22 -1 0 32 7 19 23 -3 -5 27 5 13 24 -3 -4 27 5 12 25 -3 -2 27 5 13 26 -4 -1 29 4 11 27 -8 -8 38 4 10 28 -9 -16 40 4 16 29 -13 -19 45 1 12 30 -18 -28 50 -1 6 31 -11 -11 43 3 8 32 -9 -4 44 4 6 33 -10 -9 44 3 8 34 -13 -12 49 2 8 35 -11 -10 42 1 9 36 -5 -2 36 4 13 37 -15 -13 57 3 8 38 -6 0 42 5 11 39 -6 0 39 6 8 40 -3 4 33 6 10 41 -1 7 32 6 15 42 -3 5 34 6 12 43 -4 2 37 6 13 44 -6 -2 38 5 12 45 0 6 28 6 15 46 -4 -3 31 5 13 47 -2 1 28 6 13 48 -2 0 30 5 16 49 -6 -7 39 7 14 50 -7 -6 38 4 12 51 -6 -4 39 5 15 52 -6 -4 38 6 14 53 -3 -2 37 6 19 54 -2 2 32 5 16 55 -5 -5 32 3 16 56 -11 -15 44 2 11 57 -11 -16 43 3 13 58 -11 -18 42 3 12 59 -10 -13 38 2 11 60 -14 -23 37 0 6 61 -8 -10 35 4 9 62 -9 -10 37 4 6 63 -5 -6 33 5 15 64 -1 -3 24 6 17 65 -2 -4 24 6 13 66 -5 -7 31 5 12 67 -4 -7 25 5 13 68 -6 -7 28 3 10 69 -2 -3 24 5 14 70 -2 0 25 5 13 71 -2 -5 16 5 10 72 -2 -3 17 3 11 73 2 3 11 6 12 74 1 2 12 6 7 75 -8 -7 39 4 11 76 -1 -1 19 6 9 77 1 0 14 5 13 78 -1 -3 15 4 12 79 2 4 7 5 5 80 2 2 12 5 13 81 1 3 12 4 11 82 -1 0 14 3 8 83 -2 -10 9 2 8 84 -2 -10 8 3 8 85 -1 -9 4 2 8 86 -8 -22 7 -1 0 87 -4 -16 3 0 3 88 -6 -18 5 -2 0 89 -3 -14 0 1 -1 90 -3 -12 -2 -2 -1 91 -7 -17 6 -2 -4 92 -9 -23 11 -2 1 93 -11 -28 9 -6 -1 94 -13 -31 17 -4 0 95 -11 -21 21 -2 -1 96 -9 -19 21 0 6 97 -17 -22 41 -5 0 98 -22 -22 57 -4 -3 99 -25 -25 65 -5 -3 100 -20 -16 68 -1 4 101 -24 -22 73 -2 1 102 -24 -21 71 -4 0 103 -22 -10 71 -1 -4 104 -19 -7 70 1 -2 105 -18 -5 69 1 3 106 -17 -4 65 -2 2 107 -11 7 57 1 5 108 -11 6 57 1 6 109 -12 3 57 3 6 110 -10 10 55 3 3 111 -15 0 65 1 4 112 -15 -2 65 1 7 113 -15 -1 64 0 5 114 -13 2 60 2 6 115 -8 8 43 2 1 116 -13 -6 47 -1 3 117 -9 -4 40 1 6 118 -7 4 31 0 0 119 -4 7 27 1 3 120 -4 3 24 1 4 121 -2 3 23 3 7 122 0 8 17 2 6 123 -2 3 16 0 6 124 -3 -3 15 0 6 125 1 4 8 3 6 126 -2 -5 5 -2 2 127 -1 -1 6 0 2 128 1 5 5 1 2 129 -3 0 12 -1 3 130 -4 -6 8 -2 -1 131 -9 -13 17 -1 -4 132 -9 -15 22 -1 4 133 -7 -8 24 1 5 134 -14 -20 36 -2 3 135 -12 -10 31 -5 -1 136 -16 -22 34 -5 -4 137 -20 -25 47 -6 0 138 -12 -10 33 -4 -1 139 -12 -8 35 -3 -1 140 -10 -9 31 -3 3 141 -10 -5 35 -1 2 142 -13 -7 39 -2 -4 143 -16 -11 46 -3 -3 144 -14 -11 40 -3 -1 145 -17 -16 50 -3 3 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) situatie werkloosheid -0.03134 0.24763 -0.24994 `financi\\303\\253le` spaarvermogen 0.28792 0.23303 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.72661 -0.22154 0.02836 0.26368 0.62901 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.031345 0.071042 -0.441 0.66 situatie 0.247632 0.003853 64.266 <2e-16 *** werkloosheid -0.249945 0.001461 -171.098 <2e-16 *** `financi\\303\\253le` 0.287919 0.018729 15.373 <2e-16 *** spaarvermogen 0.233027 0.009475 24.593 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3155 on 140 degrees of freedom Multiple R-squared: 0.9983, Adjusted R-squared: 0.9982 F-statistic: 2.045e+04 on 4 and 140 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.001529998 0.003059997 0.99847000 [2,] 0.315078798 0.630157597 0.68492120 [3,] 0.195186184 0.390372367 0.80481382 [4,] 0.152174589 0.304349178 0.84782541 [5,] 0.272164622 0.544329245 0.72783538 [6,] 0.372384745 0.744769490 0.62761525 [7,] 0.319635452 0.639270903 0.68036455 [8,] 0.238554371 0.477108742 0.76144563 [9,] 0.198033790 0.396067580 0.80196621 [10,] 0.413329700 0.826659400 0.58667030 [11,] 0.332800519 0.665601039 0.66719948 [12,] 0.262143036 0.524286072 0.73785696 [13,] 0.237866430 0.475732861 0.76213357 [14,] 0.183756922 0.367513844 0.81624308 [15,] 0.329586705 0.659173411 0.67041329 [16,] 0.399954303 0.799908605 0.60004570 [17,] 0.427928488 0.855856977 0.57207151 [18,] 0.465277062 0.930554123 0.53472294 [19,] 0.503890260 0.992219479 0.49610974 [20,] 0.463314233 0.926628466 0.53668577 [21,] 0.400445916 0.800891831 0.59955408 [22,] 0.359480139 0.718960277 0.64051986 [23,] 0.342399530 0.684799059 0.65760047 [24,] 0.406429961 0.812859922 0.59357004 [25,] 0.382816526 0.765633053 0.61718347 [26,] 0.395077483 0.790154966 0.60492252 [27,] 0.449664384 0.899328768 0.55033562 [28,] 0.514729726 0.970540548 0.48527027 [29,] 0.498362763 0.996725525 0.50163724 [30,] 0.582596227 0.834807546 0.41740377 [31,] 0.604339520 0.791320961 0.39566048 [32,] 0.560691412 0.878617176 0.43930859 [33,] 0.515227513 0.969544974 0.48477249 [34,] 0.465351036 0.930702072 0.53464896 [35,] 0.490047733 0.980095467 0.50995227 [36,] 0.444470036 0.888940072 0.55552996 [37,] 0.443232555 0.886465110 0.55676744 [38,] 0.431455593 0.862911187 0.56854441 [39,] 0.380852418 0.761704835 0.61914758 [40,] 0.332694055 0.665388110 0.66730595 [41,] 0.340559096 0.681118192 0.65944090 [42,] 0.312954402 0.625908805 0.68704560 [43,] 0.271914300 0.543828599 0.72808570 [44,] 0.257371454 0.514742909 0.74262855 [45,] 0.344433792 0.688867585 0.65556621 [46,] 0.480899615 0.961799229 0.51910039 [47,] 0.494468718 0.988937435 0.50553128 [48,] 0.502120745 0.995758510 0.49787926 [49,] 0.650707663 0.698584674 0.34929234 [50,] 0.623144207 0.753711586 0.37685579 [51,] 0.656198826 0.687602347 0.34380117 [52,] 0.675102994 0.649794013 0.32489701 [53,] 0.678586816 0.642826367 0.32141318 [54,] 0.637773852 0.724452296 0.36222615 [55,] 0.620428748 0.759142505 0.37957125 [56,] 0.589747963 0.820504074 0.41025204 [57,] 0.562895623 0.874208754 0.43710438 [58,] 0.582568244 0.834863512 0.41743176 [59,] 0.616977694 0.766044612 0.38302231 [60,] 0.633574896 0.732850209 0.36642510 [61,] 0.639873207 0.720253586 0.36012679 [62,] 0.617933173 0.764133654 0.38206683 [63,] 0.579996777 0.840006446 0.42000322 [64,] 0.599007871 0.801984257 0.40099213 [65,] 0.582341562 0.835316876 0.41765844 [66,] 0.606830358 0.786339284 0.39316964 [67,] 0.597028222 0.805943555 0.40297178 [68,] 0.570597127 0.858805745 0.42940287 [69,] 0.567345182 0.865309636 0.43265482 [70,] 0.543241317 0.913517366 0.45675868 [71,] 0.531563650 0.936872701 0.46843635 [72,] 0.527793364 0.944413272 0.47220664 [73,] 0.501358042 0.997283917 0.49864196 [74,] 0.506298310 0.987403380 0.49370169 [75,] 0.467556890 0.935113780 0.53244311 [76,] 0.554202302 0.891595395 0.44579770 [77,] 0.509805052 0.980389896 0.49019495 [78,] 0.471996834 0.943993669 0.52800317 [79,] 0.509496651 0.981006698 0.49050335 [80,] 0.493891483 0.987782965 0.50610852 [81,] 0.533737518 0.932524963 0.46626248 [82,] 0.599194480 0.801611040 0.40080552 [83,] 0.597415714 0.805168572 0.40258429 [84,] 0.575872046 0.848255908 0.42412795 [85,] 0.535146679 0.929706642 0.46485332 [86,] 0.500848437 0.998303126 0.49915156 [87,] 0.463669561 0.927339122 0.53633044 [88,] 0.479222803 0.958445605 0.52077720 [89,] 0.482715534 0.965431068 0.51728447 [90,] 0.445529262 0.891058524 0.55447074 [91,] 0.498697299 0.997394597 0.50130270 [92,] 0.527342643 0.945314713 0.47265736 [93,] 0.583292739 0.833414522 0.41670726 [94,] 0.580973706 0.838052588 0.41902629 [95,] 0.577157264 0.845685471 0.42284274 [96,] 0.642115157 0.715769685 0.35788484 [97,] 0.819920661 0.360158678 0.18007934 [98,] 0.818248866 0.363502268 0.18175113 [99,] 0.855720930 0.288558141 0.14427907 [100,] 0.826599116 0.346801768 0.17340088 [101,] 0.799206900 0.401586199 0.20079310 [102,] 0.889592272 0.220815456 0.11040773 [103,] 0.873065723 0.253868555 0.12693428 [104,] 0.857168157 0.285663686 0.14283184 [105,] 0.823284653 0.353430694 0.17671535 [106,] 0.824997464 0.350005073 0.17500254 [107,] 0.811257213 0.377485573 0.18874279 [108,] 0.765045091 0.469909819 0.23495491 [109,] 0.713343718 0.573312563 0.28665628 [110,] 0.800871909 0.398256183 0.19912809 [111,] 0.784482262 0.431035476 0.21551774 [112,] 0.732000036 0.535999929 0.26799996 [113,] 0.672768006 0.654463988 0.32723199 [114,] 0.909416477 0.181167047 0.09058352 [115,] 0.945186640 0.109626719 0.05481336 [116,] 0.923409551 0.153180898 0.07659045 [117,] 0.907020567 0.185958867 0.09297943 [118,] 0.869419781 0.261160437 0.13058022 [119,] 0.913976877 0.172046247 0.08602312 [120,] 0.914201294 0.171597411 0.08579871 [121,] 0.936924786 0.126150427 0.06307521 [122,] 0.960219638 0.079560724 0.03978036 [123,] 0.950755758 0.098488485 0.04924424 [124,] 0.956823711 0.086352578 0.04317629 [125,] 0.959797261 0.080405478 0.04020274 [126,] 0.986827645 0.026344710 0.01317236 [127,] 0.988767527 0.022464946 0.01123247 [128,] 0.977249764 0.045500471 0.02275024 [129,] 0.958306756 0.083386487 0.04169324 [130,] 0.931429138 0.137141724 0.06857086 > postscript(file="/var/wessaorg/rcomp/tmp/18vb01352119348.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/2m2ks1352119348.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/31it61352119348.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/48kyv1352119348.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/5t2sw1352119348.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 = 145 Frequency = 1 1 2 3 4 5 6 -0.02180319 -0.03409514 -0.04847948 -0.12888307 -0.34001393 -0.26659880 7 8 9 10 11 12 -0.55637347 -0.20662387 0.23859446 -0.23622456 -0.42266717 0.06428958 13 14 15 16 17 18 0.29669208 0.27244080 0.29704645 0.50435469 -0.46066171 0.08436134 19 20 21 22 23 24 0.22310779 -0.16397800 0.26802060 0.58663021 0.54906736 0.53446255 25 26 27 28 29 30 -0.19382870 -0.18759742 0.02835788 0.11114056 -0.10037279 0.35204129 31 32 33 34 35 36 -0.22504811 0.46960793 0.52963273 -0.18982768 -0.37981400 0.34359437 37 38 39 40 41 42 -0.23055570 0.52613493 0.18746279 0.23121099 0.07323401 -0.23253056 43 44 45 46 47 48 0.02717294 -0.21140777 0.32108649 0.05358286 0.02530101 0.36166029 49 50 51 52 53 54 0.23480458 0.06703942 -0.16528047 -0.47011726 0.61953778 0.36628601 55 56 57 58 59 60 -0.32445162 0.60426234 -0.15202405 0.32632232 -0.39067100 -0.42332141 61 62 63 64 65 66 0.00681448 0.20578587 -0.16968573 0.08394073 0.26368158 0.27713815 67 68 69 70 71 72 -0.45555836 -0.43080386 0.07094146 -0.18898251 -0.50124473 -0.40375288 73 74 75 76 77 78 -0.48599884 0.17671410 -0.20235646 0.20316993 0.06162377 -0.42458896 79 80 81 82 83 84 0.18569917 0.06646996 -0.42718853 -0.19740196 0.31711294 -0.22075106 85 86 87 88 89 90 -0.18024350 -0.48321758 0.04421002 0.31428368 0.44330105 0.31190458 91 92 93 94 95 96 0.24870537 -0.18091412 0.17508707 0.10867677 0.28932509 -0.41296764 97 98 99 100 101 102 0.16658491 -0.42313444 -0.39276020 0.34551936 0.06803664 0.12938029 103 104 105 106 107 108 -0.52622044 0.43904597 -0.47129899 0.37807399 0.09172374 0.10632855 109 110 111 112 113 114 -0.72661361 -0.26084590 0.05773416 -0.14608342 0.11031320 -0.44122783 115 116 117 118 119 120 -0.01094693 -0.14661619 0.33358573 -0.21089202 0.05943165 0.06709787 121 122 123 124 125 126 0.54223314 0.32535005 -0.11059651 0.12525073 -0.22154493 0.62901299 127 128 129 130 131 132 0.31259157 0.28893545 -0.38047924 0.32556129 -0.28034810 -0.39957731 133 134 135 136 137 138 -0.44197711 -0.14124251 -0.07142097 0.34907956 -0.30293062 0.14054969 139 140 141 142 143 144 -0.14274370 0.17299996 -0.16055961 0.02056633 -0.18439950 -0.15012322 145 -0.34462311 > postscript(file="/var/wessaorg/rcomp/tmp/6v5ta1352119348.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 = 145 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.02180319 NA 1 -0.03409514 -0.02180319 2 -0.04847948 -0.03409514 3 -0.12888307 -0.04847948 4 -0.34001393 -0.12888307 5 -0.26659880 -0.34001393 6 -0.55637347 -0.26659880 7 -0.20662387 -0.55637347 8 0.23859446 -0.20662387 9 -0.23622456 0.23859446 10 -0.42266717 -0.23622456 11 0.06428958 -0.42266717 12 0.29669208 0.06428958 13 0.27244080 0.29669208 14 0.29704645 0.27244080 15 0.50435469 0.29704645 16 -0.46066171 0.50435469 17 0.08436134 -0.46066171 18 0.22310779 0.08436134 19 -0.16397800 0.22310779 20 0.26802060 -0.16397800 21 0.58663021 0.26802060 22 0.54906736 0.58663021 23 0.53446255 0.54906736 24 -0.19382870 0.53446255 25 -0.18759742 -0.19382870 26 0.02835788 -0.18759742 27 0.11114056 0.02835788 28 -0.10037279 0.11114056 29 0.35204129 -0.10037279 30 -0.22504811 0.35204129 31 0.46960793 -0.22504811 32 0.52963273 0.46960793 33 -0.18982768 0.52963273 34 -0.37981400 -0.18982768 35 0.34359437 -0.37981400 36 -0.23055570 0.34359437 37 0.52613493 -0.23055570 38 0.18746279 0.52613493 39 0.23121099 0.18746279 40 0.07323401 0.23121099 41 -0.23253056 0.07323401 42 0.02717294 -0.23253056 43 -0.21140777 0.02717294 44 0.32108649 -0.21140777 45 0.05358286 0.32108649 46 0.02530101 0.05358286 47 0.36166029 0.02530101 48 0.23480458 0.36166029 49 0.06703942 0.23480458 50 -0.16528047 0.06703942 51 -0.47011726 -0.16528047 52 0.61953778 -0.47011726 53 0.36628601 0.61953778 54 -0.32445162 0.36628601 55 0.60426234 -0.32445162 56 -0.15202405 0.60426234 57 0.32632232 -0.15202405 58 -0.39067100 0.32632232 59 -0.42332141 -0.39067100 60 0.00681448 -0.42332141 61 0.20578587 0.00681448 62 -0.16968573 0.20578587 63 0.08394073 -0.16968573 64 0.26368158 0.08394073 65 0.27713815 0.26368158 66 -0.45555836 0.27713815 67 -0.43080386 -0.45555836 68 0.07094146 -0.43080386 69 -0.18898251 0.07094146 70 -0.50124473 -0.18898251 71 -0.40375288 -0.50124473 72 -0.48599884 -0.40375288 73 0.17671410 -0.48599884 74 -0.20235646 0.17671410 75 0.20316993 -0.20235646 76 0.06162377 0.20316993 77 -0.42458896 0.06162377 78 0.18569917 -0.42458896 79 0.06646996 0.18569917 80 -0.42718853 0.06646996 81 -0.19740196 -0.42718853 82 0.31711294 -0.19740196 83 -0.22075106 0.31711294 84 -0.18024350 -0.22075106 85 -0.48321758 -0.18024350 86 0.04421002 -0.48321758 87 0.31428368 0.04421002 88 0.44330105 0.31428368 89 0.31190458 0.44330105 90 0.24870537 0.31190458 91 -0.18091412 0.24870537 92 0.17508707 -0.18091412 93 0.10867677 0.17508707 94 0.28932509 0.10867677 95 -0.41296764 0.28932509 96 0.16658491 -0.41296764 97 -0.42313444 0.16658491 98 -0.39276020 -0.42313444 99 0.34551936 -0.39276020 100 0.06803664 0.34551936 101 0.12938029 0.06803664 102 -0.52622044 0.12938029 103 0.43904597 -0.52622044 104 -0.47129899 0.43904597 105 0.37807399 -0.47129899 106 0.09172374 0.37807399 107 0.10632855 0.09172374 108 -0.72661361 0.10632855 109 -0.26084590 -0.72661361 110 0.05773416 -0.26084590 111 -0.14608342 0.05773416 112 0.11031320 -0.14608342 113 -0.44122783 0.11031320 114 -0.01094693 -0.44122783 115 -0.14661619 -0.01094693 116 0.33358573 -0.14661619 117 -0.21089202 0.33358573 118 0.05943165 -0.21089202 119 0.06709787 0.05943165 120 0.54223314 0.06709787 121 0.32535005 0.54223314 122 -0.11059651 0.32535005 123 0.12525073 -0.11059651 124 -0.22154493 0.12525073 125 0.62901299 -0.22154493 126 0.31259157 0.62901299 127 0.28893545 0.31259157 128 -0.38047924 0.28893545 129 0.32556129 -0.38047924 130 -0.28034810 0.32556129 131 -0.39957731 -0.28034810 132 -0.44197711 -0.39957731 133 -0.14124251 -0.44197711 134 -0.07142097 -0.14124251 135 0.34907956 -0.07142097 136 -0.30293062 0.34907956 137 0.14054969 -0.30293062 138 -0.14274370 0.14054969 139 0.17299996 -0.14274370 140 -0.16055961 0.17299996 141 0.02056633 -0.16055961 142 -0.18439950 0.02056633 143 -0.15012322 -0.18439950 144 -0.34462311 -0.15012322 145 NA -0.34462311 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.03409514 -0.02180319 [2,] -0.04847948 -0.03409514 [3,] -0.12888307 -0.04847948 [4,] -0.34001393 -0.12888307 [5,] -0.26659880 -0.34001393 [6,] -0.55637347 -0.26659880 [7,] -0.20662387 -0.55637347 [8,] 0.23859446 -0.20662387 [9,] -0.23622456 0.23859446 [10,] -0.42266717 -0.23622456 [11,] 0.06428958 -0.42266717 [12,] 0.29669208 0.06428958 [13,] 0.27244080 0.29669208 [14,] 0.29704645 0.27244080 [15,] 0.50435469 0.29704645 [16,] -0.46066171 0.50435469 [17,] 0.08436134 -0.46066171 [18,] 0.22310779 0.08436134 [19,] -0.16397800 0.22310779 [20,] 0.26802060 -0.16397800 [21,] 0.58663021 0.26802060 [22,] 0.54906736 0.58663021 [23,] 0.53446255 0.54906736 [24,] -0.19382870 0.53446255 [25,] -0.18759742 -0.19382870 [26,] 0.02835788 -0.18759742 [27,] 0.11114056 0.02835788 [28,] -0.10037279 0.11114056 [29,] 0.35204129 -0.10037279 [30,] -0.22504811 0.35204129 [31,] 0.46960793 -0.22504811 [32,] 0.52963273 0.46960793 [33,] -0.18982768 0.52963273 [34,] -0.37981400 -0.18982768 [35,] 0.34359437 -0.37981400 [36,] -0.23055570 0.34359437 [37,] 0.52613493 -0.23055570 [38,] 0.18746279 0.52613493 [39,] 0.23121099 0.18746279 [40,] 0.07323401 0.23121099 [41,] -0.23253056 0.07323401 [42,] 0.02717294 -0.23253056 [43,] -0.21140777 0.02717294 [44,] 0.32108649 -0.21140777 [45,] 0.05358286 0.32108649 [46,] 0.02530101 0.05358286 [47,] 0.36166029 0.02530101 [48,] 0.23480458 0.36166029 [49,] 0.06703942 0.23480458 [50,] -0.16528047 0.06703942 [51,] -0.47011726 -0.16528047 [52,] 0.61953778 -0.47011726 [53,] 0.36628601 0.61953778 [54,] -0.32445162 0.36628601 [55,] 0.60426234 -0.32445162 [56,] -0.15202405 0.60426234 [57,] 0.32632232 -0.15202405 [58,] -0.39067100 0.32632232 [59,] -0.42332141 -0.39067100 [60,] 0.00681448 -0.42332141 [61,] 0.20578587 0.00681448 [62,] -0.16968573 0.20578587 [63,] 0.08394073 -0.16968573 [64,] 0.26368158 0.08394073 [65,] 0.27713815 0.26368158 [66,] -0.45555836 0.27713815 [67,] -0.43080386 -0.45555836 [68,] 0.07094146 -0.43080386 [69,] -0.18898251 0.07094146 [70,] -0.50124473 -0.18898251 [71,] -0.40375288 -0.50124473 [72,] -0.48599884 -0.40375288 [73,] 0.17671410 -0.48599884 [74,] -0.20235646 0.17671410 [75,] 0.20316993 -0.20235646 [76,] 0.06162377 0.20316993 [77,] -0.42458896 0.06162377 [78,] 0.18569917 -0.42458896 [79,] 0.06646996 0.18569917 [80,] -0.42718853 0.06646996 [81,] -0.19740196 -0.42718853 [82,] 0.31711294 -0.19740196 [83,] -0.22075106 0.31711294 [84,] -0.18024350 -0.22075106 [85,] -0.48321758 -0.18024350 [86,] 0.04421002 -0.48321758 [87,] 0.31428368 0.04421002 [88,] 0.44330105 0.31428368 [89,] 0.31190458 0.44330105 [90,] 0.24870537 0.31190458 [91,] -0.18091412 0.24870537 [92,] 0.17508707 -0.18091412 [93,] 0.10867677 0.17508707 [94,] 0.28932509 0.10867677 [95,] -0.41296764 0.28932509 [96,] 0.16658491 -0.41296764 [97,] -0.42313444 0.16658491 [98,] -0.39276020 -0.42313444 [99,] 0.34551936 -0.39276020 [100,] 0.06803664 0.34551936 [101,] 0.12938029 0.06803664 [102,] -0.52622044 0.12938029 [103,] 0.43904597 -0.52622044 [104,] -0.47129899 0.43904597 [105,] 0.37807399 -0.47129899 [106,] 0.09172374 0.37807399 [107,] 0.10632855 0.09172374 [108,] -0.72661361 0.10632855 [109,] -0.26084590 -0.72661361 [110,] 0.05773416 -0.26084590 [111,] -0.14608342 0.05773416 [112,] 0.11031320 -0.14608342 [113,] -0.44122783 0.11031320 [114,] -0.01094693 -0.44122783 [115,] -0.14661619 -0.01094693 [116,] 0.33358573 -0.14661619 [117,] -0.21089202 0.33358573 [118,] 0.05943165 -0.21089202 [119,] 0.06709787 0.05943165 [120,] 0.54223314 0.06709787 [121,] 0.32535005 0.54223314 [122,] -0.11059651 0.32535005 [123,] 0.12525073 -0.11059651 [124,] -0.22154493 0.12525073 [125,] 0.62901299 -0.22154493 [126,] 0.31259157 0.62901299 [127,] 0.28893545 0.31259157 [128,] -0.38047924 0.28893545 [129,] 0.32556129 -0.38047924 [130,] -0.28034810 0.32556129 [131,] -0.39957731 -0.28034810 [132,] -0.44197711 -0.39957731 [133,] -0.14124251 -0.44197711 [134,] -0.07142097 -0.14124251 [135,] 0.34907956 -0.07142097 [136,] -0.30293062 0.34907956 [137,] 0.14054969 -0.30293062 [138,] -0.14274370 0.14054969 [139,] 0.17299996 -0.14274370 [140,] -0.16055961 0.17299996 [141,] 0.02056633 -0.16055961 [142,] -0.18439950 0.02056633 [143,] -0.15012322 -0.18439950 [144,] -0.34462311 -0.15012322 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.03409514 -0.02180319 2 -0.04847948 -0.03409514 3 -0.12888307 -0.04847948 4 -0.34001393 -0.12888307 5 -0.26659880 -0.34001393 6 -0.55637347 -0.26659880 7 -0.20662387 -0.55637347 8 0.23859446 -0.20662387 9 -0.23622456 0.23859446 10 -0.42266717 -0.23622456 11 0.06428958 -0.42266717 12 0.29669208 0.06428958 13 0.27244080 0.29669208 14 0.29704645 0.27244080 15 0.50435469 0.29704645 16 -0.46066171 0.50435469 17 0.08436134 -0.46066171 18 0.22310779 0.08436134 19 -0.16397800 0.22310779 20 0.26802060 -0.16397800 21 0.58663021 0.26802060 22 0.54906736 0.58663021 23 0.53446255 0.54906736 24 -0.19382870 0.53446255 25 -0.18759742 -0.19382870 26 0.02835788 -0.18759742 27 0.11114056 0.02835788 28 -0.10037279 0.11114056 29 0.35204129 -0.10037279 30 -0.22504811 0.35204129 31 0.46960793 -0.22504811 32 0.52963273 0.46960793 33 -0.18982768 0.52963273 34 -0.37981400 -0.18982768 35 0.34359437 -0.37981400 36 -0.23055570 0.34359437 37 0.52613493 -0.23055570 38 0.18746279 0.52613493 39 0.23121099 0.18746279 40 0.07323401 0.23121099 41 -0.23253056 0.07323401 42 0.02717294 -0.23253056 43 -0.21140777 0.02717294 44 0.32108649 -0.21140777 45 0.05358286 0.32108649 46 0.02530101 0.05358286 47 0.36166029 0.02530101 48 0.23480458 0.36166029 49 0.06703942 0.23480458 50 -0.16528047 0.06703942 51 -0.47011726 -0.16528047 52 0.61953778 -0.47011726 53 0.36628601 0.61953778 54 -0.32445162 0.36628601 55 0.60426234 -0.32445162 56 -0.15202405 0.60426234 57 0.32632232 -0.15202405 58 -0.39067100 0.32632232 59 -0.42332141 -0.39067100 60 0.00681448 -0.42332141 61 0.20578587 0.00681448 62 -0.16968573 0.20578587 63 0.08394073 -0.16968573 64 0.26368158 0.08394073 65 0.27713815 0.26368158 66 -0.45555836 0.27713815 67 -0.43080386 -0.45555836 68 0.07094146 -0.43080386 69 -0.18898251 0.07094146 70 -0.50124473 -0.18898251 71 -0.40375288 -0.50124473 72 -0.48599884 -0.40375288 73 0.17671410 -0.48599884 74 -0.20235646 0.17671410 75 0.20316993 -0.20235646 76 0.06162377 0.20316993 77 -0.42458896 0.06162377 78 0.18569917 -0.42458896 79 0.06646996 0.18569917 80 -0.42718853 0.06646996 81 -0.19740196 -0.42718853 82 0.31711294 -0.19740196 83 -0.22075106 0.31711294 84 -0.18024350 -0.22075106 85 -0.48321758 -0.18024350 86 0.04421002 -0.48321758 87 0.31428368 0.04421002 88 0.44330105 0.31428368 89 0.31190458 0.44330105 90 0.24870537 0.31190458 91 -0.18091412 0.24870537 92 0.17508707 -0.18091412 93 0.10867677 0.17508707 94 0.28932509 0.10867677 95 -0.41296764 0.28932509 96 0.16658491 -0.41296764 97 -0.42313444 0.16658491 98 -0.39276020 -0.42313444 99 0.34551936 -0.39276020 100 0.06803664 0.34551936 101 0.12938029 0.06803664 102 -0.52622044 0.12938029 103 0.43904597 -0.52622044 104 -0.47129899 0.43904597 105 0.37807399 -0.47129899 106 0.09172374 0.37807399 107 0.10632855 0.09172374 108 -0.72661361 0.10632855 109 -0.26084590 -0.72661361 110 0.05773416 -0.26084590 111 -0.14608342 0.05773416 112 0.11031320 -0.14608342 113 -0.44122783 0.11031320 114 -0.01094693 -0.44122783 115 -0.14661619 -0.01094693 116 0.33358573 -0.14661619 117 -0.21089202 0.33358573 118 0.05943165 -0.21089202 119 0.06709787 0.05943165 120 0.54223314 0.06709787 121 0.32535005 0.54223314 122 -0.11059651 0.32535005 123 0.12525073 -0.11059651 124 -0.22154493 0.12525073 125 0.62901299 -0.22154493 126 0.31259157 0.62901299 127 0.28893545 0.31259157 128 -0.38047924 0.28893545 129 0.32556129 -0.38047924 130 -0.28034810 0.32556129 131 -0.39957731 -0.28034810 132 -0.44197711 -0.39957731 133 -0.14124251 -0.44197711 134 -0.07142097 -0.14124251 135 0.34907956 -0.07142097 136 -0.30293062 0.34907956 137 0.14054969 -0.30293062 138 -0.14274370 0.14054969 139 0.17299996 -0.14274370 140 -0.16055961 0.17299996 141 0.02056633 -0.16055961 142 -0.18439950 0.02056633 143 -0.15012322 -0.18439950 144 -0.34462311 -0.15012322 > 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/79wnm1352119348.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/8d5za1352119348.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/9p1k11352119348.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/10k8gm1352119348.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/11r54f1352119348.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/126j5d1352119349.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/13f1241352119349.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/14is8j1352119349.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/15uos21352119349.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/16jfas1352119349.tab") + } > > try(system("convert tmp/18vb01352119348.ps tmp/18vb01352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/2m2ks1352119348.ps tmp/2m2ks1352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/31it61352119348.ps tmp/31it61352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/48kyv1352119348.ps tmp/48kyv1352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/5t2sw1352119348.ps tmp/5t2sw1352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/6v5ta1352119348.ps tmp/6v5ta1352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/79wnm1352119348.ps tmp/79wnm1352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/8d5za1352119348.ps tmp/8d5za1352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/9p1k11352119348.ps tmp/9p1k11352119348.png",intern=TRUE)) character(0) > try(system("convert tmp/10k8gm1352119348.ps tmp/10k8gm1352119348.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.227 0.828 8.054