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(1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,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+ ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,1 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0) + ,dim=c(6 + ,154) + ,dimnames=list(c('UseLimit' + ,'T20' + ,'Used' + ,'CorrectAnalysis' + ,'Useful' + ,'Outcome') + ,1:154)) > y <- array(NA,dim=c(6,154),dimnames=list(c('UseLimit','T20','Used','CorrectAnalysis','Useful','Outcome'),1:154)) > 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 = '6' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '6' > #'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 Outcome UseLimit T20 Used CorrectAnalysis Useful 1 1 1 1 0 0 0 2 0 0 0 0 0 0 3 0 0 0 0 0 0 4 0 0 0 0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 0 78 1 0 0 1 0 1 79 1 0 1 1 1 0 80 0 0 1 0 0 1 81 0 0 0 0 0 0 82 1 1 0 1 0 0 83 0 0 0 0 0 0 84 0 0 0 1 1 0 85 1 0 0 0 0 1 86 0 1 0 0 0 0 87 1 1 0 0 0 0 88 1 1 1 1 0 0 89 0 0 0 0 0 0 90 1 0 0 0 0 0 91 0 0 0 0 0 1 92 0 1 1 0 0 0 93 0 1 0 0 0 1 94 0 0 0 0 0 0 95 0 0 1 0 0 0 96 1 0 0 0 0 0 97 0 1 1 0 0 0 98 0 0 0 0 0 0 99 0 1 0 0 0 0 100 1 0 0 0 0 0 101 1 1 0 0 0 0 102 0 0 0 0 0 0 103 0 0 0 0 0 0 104 0 0 0 0 0 0 105 0 0 1 1 0 0 106 0 0 0 0 0 0 107 0 0 0 0 0 0 108 0 1 1 1 0 0 109 0 0 0 0 0 0 110 0 1 0 0 0 0 111 0 1 1 1 0 1 112 0 0 1 0 0 0 113 0 0 0 1 0 0 114 0 1 1 1 0 0 115 0 1 0 0 0 0 116 0 0 0 0 0 0 117 1 1 0 0 0 0 118 0 1 0 0 0 0 119 0 0 0 0 0 0 120 1 0 0 0 0 0 121 0 1 0 0 0 0 122 0 0 0 0 0 0 123 0 1 1 1 0 0 124 1 0 0 1 0 1 125 1 0 0 0 0 0 126 0 0 1 0 0 0 127 0 0 0 0 0 1 128 1 0 0 0 0 0 129 0 0 0 0 0 0 130 1 0 0 0 0 0 131 0 1 0 0 0 0 132 1 1 0 0 0 0 133 0 1 0 1 0 0 134 0 0 0 0 0 0 135 0 0 0 0 0 0 136 0 0 0 0 0 0 137 1 1 0 1 0 1 138 1 1 1 1 0 1 139 0 0 1 0 0 0 140 0 0 0 0 0 0 141 1 0 0 1 1 0 142 1 0 1 1 0 0 143 0 1 0 0 0 0 144 1 0 0 0 0 1 145 0 0 0 0 0 1 146 1 0 1 0 0 0 147 0 0 1 1 0 0 148 0 0 1 0 0 0 149 0 1 0 0 0 0 150 1 0 0 0 0 1 151 1 0 0 0 0 0 152 0 1 0 1 1 0 153 0 1 0 1 1 1 154 0 1 0 1 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) UseLimit T20 Used 0.36528 -0.09254 -0.03629 0.09879 CorrectAnalysis Useful -0.09825 0.18437 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.6484 -0.3653 -0.2727 0.5429 0.7635 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.36528 0.05727 6.378 2.16e-09 *** UseLimit -0.09254 0.08566 -1.080 0.2817 T20 -0.03629 0.09460 -0.384 0.7018 Used 0.09879 0.10140 0.974 0.3315 CorrectAnalysis -0.09825 0.16550 -0.594 0.5537 Useful 0.18437 0.09267 1.990 0.0485 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4877 on 148 degrees of freedom Multiple R-squared: 0.04456, Adjusted R-squared: 0.01228 F-statistic: 1.381 on 5 and 148 DF, p-value: 0.2348 > 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.6756187 0.6487626 0.3243813 [2,] 0.7346575 0.5306850 0.2653425 [3,] 0.7094785 0.5810430 0.2905215 [4,] 0.6014926 0.7970149 0.3985074 [5,] 0.4931366 0.9862732 0.5068634 [6,] 0.4287278 0.8574556 0.5712722 [7,] 0.5328572 0.9342857 0.4671428 [8,] 0.4704728 0.9409456 0.5295272 [9,] 0.3816274 0.7632547 0.6183726 [10,] 0.3227888 0.6455776 0.6772112 [11,] 0.4865121 0.9730242 0.5134879 [12,] 0.5073032 0.9853936 0.4926968 [13,] 0.5767240 0.8465520 0.4232760 [14,] 0.5759742 0.8480516 0.4240258 [15,] 0.5306555 0.9386890 0.4693445 [16,] 0.4992590 0.9985180 0.5007410 [17,] 0.5310391 0.9379218 0.4689609 [18,] 0.6169504 0.7660992 0.3830496 [19,] 0.7071787 0.5856427 0.2928213 [20,] 0.6744884 0.6510231 0.3255116 [21,] 0.7215655 0.5568690 0.2784345 [22,] 0.7425623 0.5148753 0.2574377 [23,] 0.7091950 0.5816100 0.2908050 [24,] 0.6706121 0.6587757 0.3293879 [25,] 0.6674430 0.6651140 0.3325570 [26,] 0.6863065 0.6273871 0.3136935 [27,] 0.6518455 0.6963089 0.3481545 [28,] 0.6151411 0.7697177 0.3848589 [29,] 0.6455894 0.7088213 0.3544106 [30,] 0.6684345 0.6631311 0.3315655 [31,] 0.6620278 0.6759443 0.3379722 [32,] 0.6721031 0.6557939 0.3278969 [33,] 0.6535777 0.6928445 0.3464223 [34,] 0.6508931 0.6982138 0.3491069 [35,] 0.6652870 0.6694260 0.3347130 [36,] 0.6266145 0.7467711 0.3733855 [37,] 0.6258237 0.7483526 0.3741763 [38,] 0.6255594 0.7488813 0.3744406 [39,] 0.6004521 0.7990957 0.3995479 [40,] 0.6313302 0.7373395 0.3686698 [41,] 0.6249577 0.7500845 0.3750423 [42,] 0.6024611 0.7950778 0.3975389 [43,] 0.5882045 0.8235909 0.4117955 [44,] 0.5815797 0.8368406 0.4184203 [45,] 0.6085622 0.7828755 0.3914378 [46,] 0.5880881 0.8238239 0.4119119 [47,] 0.5654909 0.8690182 0.4345091 [48,] 0.5805215 0.8389571 0.4194785 [49,] 0.5533043 0.8933914 0.4466957 [50,] 0.5820263 0.8359474 0.4179737 [51,] 0.6080833 0.7838334 0.3919167 [52,] 0.6267679 0.7464642 0.3732321 [53,] 0.6827570 0.6344859 0.3172430 [54,] 0.7125491 0.5749018 0.2874509 [55,] 0.6950048 0.6099903 0.3049952 [56,] 0.7471064 0.5057872 0.2528936 [57,] 0.7305438 0.5389123 0.2694562 [58,] 0.7129768 0.5740463 0.2870232 [59,] 0.7108600 0.5782800 0.2891400 [60,] 0.6837479 0.6325042 0.3162521 [61,] 0.7088534 0.5822932 0.2911466 [62,] 0.7082367 0.5835265 0.2917633 [63,] 0.6898331 0.6203339 0.3101669 [64,] 0.7145846 0.5708308 0.2854154 [65,] 0.7160474 0.5679052 0.2839526 [66,] 0.7006198 0.5987604 0.2993802 [67,] 0.7252511 0.5494978 0.2747489 [68,] 0.7280369 0.5439262 0.2719631 [69,] 0.7527225 0.4945550 0.2472775 [70,] 0.7329259 0.5341481 0.2670741 [71,] 0.7770975 0.4458051 0.2229025 [72,] 0.7748781 0.4502438 0.2251219 [73,] 0.7590545 0.4818910 0.2409455 [74,] 0.7755468 0.4489064 0.2244532 [75,] 0.7590903 0.4818194 0.2409097 [76,] 0.7386623 0.5226754 0.2613377 [77,] 0.7371055 0.5257890 0.2628945 [78,] 0.7095482 0.5809035 0.2904518 [79,] 0.7594561 0.4810878 0.2405439 [80,] 0.8000379 0.3999243 0.1999621 [81,] 0.7843247 0.4313506 0.2156753 [82,] 0.8111581 0.3776839 0.1888419 [83,] 0.8178592 0.3642816 0.1821408 [84,] 0.7923355 0.4153289 0.2076645 [85,] 0.7876616 0.4246767 0.2123384 [86,] 0.7703871 0.4592258 0.2296129 [87,] 0.7453682 0.5092636 0.2546318 [88,] 0.7769274 0.4461452 0.2230726 [89,] 0.7454562 0.5090877 0.2545438 [90,] 0.7247744 0.5504512 0.2752256 [91,] 0.6928509 0.6142983 0.3071491 [92,] 0.7301546 0.5396908 0.2698454 [93,] 0.7947283 0.4105433 0.2052717 [94,] 0.7745139 0.4509721 0.2254861 [95,] 0.7535276 0.4929448 0.2464724 [96,] 0.7320233 0.5359534 0.2679767 [97,] 0.7149330 0.5701341 0.2850670 [98,] 0.6926431 0.6147138 0.3073569 [99,] 0.6706632 0.6586736 0.3293368 [100,] 0.6358586 0.7282828 0.3641414 [101,] 0.6133552 0.7732897 0.3866448 [102,] 0.5710436 0.8579127 0.4289564 [103,] 0.5672644 0.8654712 0.4327356 [104,] 0.5330803 0.9338394 0.4669197 [105,] 0.5340470 0.9319061 0.4659530 [106,] 0.4964478 0.9928956 0.5035522 [107,] 0.4503331 0.9006662 0.5496669 [108,] 0.4281214 0.8562427 0.5718786 [109,] 0.5301848 0.9396304 0.4698152 [110,] 0.4786108 0.9572216 0.5213892 [111,] 0.4576321 0.9152643 0.5423679 [112,] 0.4860080 0.9720160 0.5139920 [113,] 0.4322626 0.8645251 0.5677374 [114,] 0.4088284 0.8176569 0.5911716 [115,] 0.3683500 0.7367000 0.6316500 [116,] 0.3194982 0.6389965 0.6805018 [117,] 0.3490794 0.6981587 0.6509206 [118,] 0.3183460 0.6366919 0.6816540 [119,] 0.3540093 0.7080187 0.6459907 [120,] 0.3935575 0.7871150 0.6064425 [121,] 0.3581275 0.7162549 0.6418725 [122,] 0.4099635 0.8199269 0.5900365 [123,] 0.3472165 0.6944330 0.6527835 [124,] 0.5493919 0.9012162 0.4506081 [125,] 0.4892082 0.9784164 0.5107918 [126,] 0.4347591 0.8695181 0.5652409 [127,] 0.3860991 0.7721982 0.6139009 [128,] 0.3476352 0.6952704 0.6523648 [129,] 0.3171841 0.6343683 0.6828159 [130,] 0.4327079 0.8654159 0.5672921 [131,] 0.3976553 0.7953106 0.6023447 [132,] 0.5245788 0.9508424 0.4754212 [133,] 0.4219688 0.8439376 0.5780312 [134,] 0.5022388 0.9955224 0.4977612 [135,] 0.3820298 0.7640595 0.6179702 [136,] 0.3144847 0.6289694 0.6855153 [137,] 0.4970175 0.9940351 0.5029825 > postscript(file="/var/fisher/rcomp/tmp/1b4sr1356123864.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/fisher/rcomp/tmp/2suto1356123864.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/fisher/rcomp/tmp/3seyb1356123864.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/fisher/rcomp/tmp/48sp71356123864.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/fisher/rcomp/tmp/5trav1356123864.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 = 154 Frequency = 1 1 2 3 4 5 6 7 0.7635512 -0.3652782 -0.3652782 -0.3652782 -0.3652782 0.5428922 -0.3652782 8 9 10 11 12 13 14 -0.3289867 0.6347218 -0.2727404 -0.2364488 -0.3652782 -0.6484370 -0.2364488 15 16 17 18 19 20 21 0.3515630 0.3878546 -0.4213602 -0.2364488 0.6347218 0.4861020 -0.4571078 22 23 24 25 26 27 28 0.4441008 0.4503544 0.5428922 0.5722219 -0.6484370 0.7272596 -0.4640696 29 30 31 32 33 34 35 0.6347218 -0.5496456 -0.3652782 -0.2727404 -0.4571078 0.6710133 -0.3652782 36 37 38 39 40 41 42 -0.3652782 -0.5196076 0.5359304 0.4503544 -0.5133540 0.4498104 0.5359304 43 44 45 46 47 48 49 0.5428922 -0.2364488 -0.5496456 0.4503544 -0.3652782 0.6347218 0.4503544 50 51 52 53 54 55 56 -0.3652782 -0.4277781 -0.4213602 0.6347218 -0.3658222 -0.3652782 0.5722219 57 58 59 60 61 62 63 0.3515630 0.6347218 0.6347218 0.5786398 0.7635512 -0.6484370 -0.3652782 64 65 66 67 68 69 70 0.7635512 -0.3652782 -0.3652782 -0.5138980 -0.2727404 0.6347218 -0.4640696 71 72 73 74 75 76 77 -0.3652782 0.6347218 0.5359304 -0.3715318 0.6347218 0.4866460 0.6347218 78 79 80 81 82 83 84 0.3515630 0.6704693 -0.5133540 -0.3652782 0.6284682 -0.3652782 -0.3658222 85 86 87 88 89 90 91 0.4503544 -0.2727404 0.7272596 0.6647598 -0.3652782 0.6347218 -0.5496456 92 93 94 95 96 97 98 -0.2364488 -0.4571078 -0.3652782 -0.3289867 0.6347218 -0.2364488 -0.3652782 99 100 101 102 103 104 105 -0.2727404 0.6347218 0.7272596 -0.3652782 -0.3652782 -0.3652782 -0.4277781 106 107 108 109 110 111 112 -0.3652782 -0.3652782 -0.3352402 -0.3652782 -0.2727404 -0.5196076 -0.3289867 113 114 115 116 117 118 119 -0.4640696 -0.3352402 -0.2727404 -0.3652782 0.7272596 -0.2727404 -0.3652782 120 121 122 123 124 125 126 0.6347218 -0.2727404 -0.3652782 -0.3352402 0.3515630 0.6347218 -0.3289867 127 128 129 130 131 132 133 -0.5496456 0.6347218 -0.3652782 0.6347218 -0.2727404 0.7272596 -0.3715318 134 135 136 137 138 139 140 -0.3652782 -0.3652782 -0.3652782 0.4441008 0.4803924 -0.3289867 -0.3652782 141 142 143 144 145 146 147 0.6341778 0.5722219 -0.2727404 0.4503544 -0.5496456 0.6710133 -0.4277781 148 149 150 151 152 153 154 -0.3289867 -0.2727404 0.4503544 0.6347218 -0.2732844 -0.4576518 -0.3715318 > postscript(file="/var/fisher/rcomp/tmp/635yb1356123864.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 = 154 Frequency = 1 lag(myerror, k = 1) myerror 0 0.7635512 NA 1 -0.3652782 0.7635512 2 -0.3652782 -0.3652782 3 -0.3652782 -0.3652782 4 -0.3652782 -0.3652782 5 0.5428922 -0.3652782 6 -0.3652782 0.5428922 7 -0.3289867 -0.3652782 8 0.6347218 -0.3289867 9 -0.2727404 0.6347218 10 -0.2364488 -0.2727404 11 -0.3652782 -0.2364488 12 -0.6484370 -0.3652782 13 -0.2364488 -0.6484370 14 0.3515630 -0.2364488 15 0.3878546 0.3515630 16 -0.4213602 0.3878546 17 -0.2364488 -0.4213602 18 0.6347218 -0.2364488 19 0.4861020 0.6347218 20 -0.4571078 0.4861020 21 0.4441008 -0.4571078 22 0.4503544 0.4441008 23 0.5428922 0.4503544 24 0.5722219 0.5428922 25 -0.6484370 0.5722219 26 0.7272596 -0.6484370 27 -0.4640696 0.7272596 28 0.6347218 -0.4640696 29 -0.5496456 0.6347218 30 -0.3652782 -0.5496456 31 -0.2727404 -0.3652782 32 -0.4571078 -0.2727404 33 0.6710133 -0.4571078 34 -0.3652782 0.6710133 35 -0.3652782 -0.3652782 36 -0.5196076 -0.3652782 37 0.5359304 -0.5196076 38 0.4503544 0.5359304 39 -0.5133540 0.4503544 40 0.4498104 -0.5133540 41 0.5359304 0.4498104 42 0.5428922 0.5359304 43 -0.2364488 0.5428922 44 -0.5496456 -0.2364488 45 0.4503544 -0.5496456 46 -0.3652782 0.4503544 47 0.6347218 -0.3652782 48 0.4503544 0.6347218 49 -0.3652782 0.4503544 50 -0.4277781 -0.3652782 51 -0.4213602 -0.4277781 52 0.6347218 -0.4213602 53 -0.3658222 0.6347218 54 -0.3652782 -0.3658222 55 0.5722219 -0.3652782 56 0.3515630 0.5722219 57 0.6347218 0.3515630 58 0.6347218 0.6347218 59 0.5786398 0.6347218 60 0.7635512 0.5786398 61 -0.6484370 0.7635512 62 -0.3652782 -0.6484370 63 0.7635512 -0.3652782 64 -0.3652782 0.7635512 65 -0.3652782 -0.3652782 66 -0.5138980 -0.3652782 67 -0.2727404 -0.5138980 68 0.6347218 -0.2727404 69 -0.4640696 0.6347218 70 -0.3652782 -0.4640696 71 0.6347218 -0.3652782 72 0.5359304 0.6347218 73 -0.3715318 0.5359304 74 0.6347218 -0.3715318 75 0.4866460 0.6347218 76 0.6347218 0.4866460 77 0.3515630 0.6347218 78 0.6704693 0.3515630 79 -0.5133540 0.6704693 80 -0.3652782 -0.5133540 81 0.6284682 -0.3652782 82 -0.3652782 0.6284682 83 -0.3658222 -0.3652782 84 0.4503544 -0.3658222 85 -0.2727404 0.4503544 86 0.7272596 -0.2727404 87 0.6647598 0.7272596 88 -0.3652782 0.6647598 89 0.6347218 -0.3652782 90 -0.5496456 0.6347218 91 -0.2364488 -0.5496456 92 -0.4571078 -0.2364488 93 -0.3652782 -0.4571078 94 -0.3289867 -0.3652782 95 0.6347218 -0.3289867 96 -0.2364488 0.6347218 97 -0.3652782 -0.2364488 98 -0.2727404 -0.3652782 99 0.6347218 -0.2727404 100 0.7272596 0.6347218 101 -0.3652782 0.7272596 102 -0.3652782 -0.3652782 103 -0.3652782 -0.3652782 104 -0.4277781 -0.3652782 105 -0.3652782 -0.4277781 106 -0.3652782 -0.3652782 107 -0.3352402 -0.3652782 108 -0.3652782 -0.3352402 109 -0.2727404 -0.3652782 110 -0.5196076 -0.2727404 111 -0.3289867 -0.5196076 112 -0.4640696 -0.3289867 113 -0.3352402 -0.4640696 114 -0.2727404 -0.3352402 115 -0.3652782 -0.2727404 116 0.7272596 -0.3652782 117 -0.2727404 0.7272596 118 -0.3652782 -0.2727404 119 0.6347218 -0.3652782 120 -0.2727404 0.6347218 121 -0.3652782 -0.2727404 122 -0.3352402 -0.3652782 123 0.3515630 -0.3352402 124 0.6347218 0.3515630 125 -0.3289867 0.6347218 126 -0.5496456 -0.3289867 127 0.6347218 -0.5496456 128 -0.3652782 0.6347218 129 0.6347218 -0.3652782 130 -0.2727404 0.6347218 131 0.7272596 -0.2727404 132 -0.3715318 0.7272596 133 -0.3652782 -0.3715318 134 -0.3652782 -0.3652782 135 -0.3652782 -0.3652782 136 0.4441008 -0.3652782 137 0.4803924 0.4441008 138 -0.3289867 0.4803924 139 -0.3652782 -0.3289867 140 0.6341778 -0.3652782 141 0.5722219 0.6341778 142 -0.2727404 0.5722219 143 0.4503544 -0.2727404 144 -0.5496456 0.4503544 145 0.6710133 -0.5496456 146 -0.4277781 0.6710133 147 -0.3289867 -0.4277781 148 -0.2727404 -0.3289867 149 0.4503544 -0.2727404 150 0.6347218 0.4503544 151 -0.2732844 0.6347218 152 -0.4576518 -0.2732844 153 -0.3715318 -0.4576518 154 NA -0.3715318 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.3652782 0.7635512 [2,] -0.3652782 -0.3652782 [3,] -0.3652782 -0.3652782 [4,] -0.3652782 -0.3652782 [5,] 0.5428922 -0.3652782 [6,] -0.3652782 0.5428922 [7,] -0.3289867 -0.3652782 [8,] 0.6347218 -0.3289867 [9,] -0.2727404 0.6347218 [10,] -0.2364488 -0.2727404 [11,] -0.3652782 -0.2364488 [12,] -0.6484370 -0.3652782 [13,] -0.2364488 -0.6484370 [14,] 0.3515630 -0.2364488 [15,] 0.3878546 0.3515630 [16,] -0.4213602 0.3878546 [17,] -0.2364488 -0.4213602 [18,] 0.6347218 -0.2364488 [19,] 0.4861020 0.6347218 [20,] -0.4571078 0.4861020 [21,] 0.4441008 -0.4571078 [22,] 0.4503544 0.4441008 [23,] 0.5428922 0.4503544 [24,] 0.5722219 0.5428922 [25,] -0.6484370 0.5722219 [26,] 0.7272596 -0.6484370 [27,] -0.4640696 0.7272596 [28,] 0.6347218 -0.4640696 [29,] -0.5496456 0.6347218 [30,] -0.3652782 -0.5496456 [31,] -0.2727404 -0.3652782 [32,] -0.4571078 -0.2727404 [33,] 0.6710133 -0.4571078 [34,] -0.3652782 0.6710133 [35,] -0.3652782 -0.3652782 [36,] -0.5196076 -0.3652782 [37,] 0.5359304 -0.5196076 [38,] 0.4503544 0.5359304 [39,] -0.5133540 0.4503544 [40,] 0.4498104 -0.5133540 [41,] 0.5359304 0.4498104 [42,] 0.5428922 0.5359304 [43,] -0.2364488 0.5428922 [44,] -0.5496456 -0.2364488 [45,] 0.4503544 -0.5496456 [46,] -0.3652782 0.4503544 [47,] 0.6347218 -0.3652782 [48,] 0.4503544 0.6347218 [49,] -0.3652782 0.4503544 [50,] -0.4277781 -0.3652782 [51,] -0.4213602 -0.4277781 [52,] 0.6347218 -0.4213602 [53,] -0.3658222 0.6347218 [54,] -0.3652782 -0.3658222 [55,] 0.5722219 -0.3652782 [56,] 0.3515630 0.5722219 [57,] 0.6347218 0.3515630 [58,] 0.6347218 0.6347218 [59,] 0.5786398 0.6347218 [60,] 0.7635512 0.5786398 [61,] -0.6484370 0.7635512 [62,] -0.3652782 -0.6484370 [63,] 0.7635512 -0.3652782 [64,] -0.3652782 0.7635512 [65,] -0.3652782 -0.3652782 [66,] -0.5138980 -0.3652782 [67,] -0.2727404 -0.5138980 [68,] 0.6347218 -0.2727404 [69,] -0.4640696 0.6347218 [70,] -0.3652782 -0.4640696 [71,] 0.6347218 -0.3652782 [72,] 0.5359304 0.6347218 [73,] -0.3715318 0.5359304 [74,] 0.6347218 -0.3715318 [75,] 0.4866460 0.6347218 [76,] 0.6347218 0.4866460 [77,] 0.3515630 0.6347218 [78,] 0.6704693 0.3515630 [79,] -0.5133540 0.6704693 [80,] -0.3652782 -0.5133540 [81,] 0.6284682 -0.3652782 [82,] -0.3652782 0.6284682 [83,] -0.3658222 -0.3652782 [84,] 0.4503544 -0.3658222 [85,] -0.2727404 0.4503544 [86,] 0.7272596 -0.2727404 [87,] 0.6647598 0.7272596 [88,] -0.3652782 0.6647598 [89,] 0.6347218 -0.3652782 [90,] -0.5496456 0.6347218 [91,] -0.2364488 -0.5496456 [92,] -0.4571078 -0.2364488 [93,] -0.3652782 -0.4571078 [94,] -0.3289867 -0.3652782 [95,] 0.6347218 -0.3289867 [96,] -0.2364488 0.6347218 [97,] -0.3652782 -0.2364488 [98,] -0.2727404 -0.3652782 [99,] 0.6347218 -0.2727404 [100,] 0.7272596 0.6347218 [101,] -0.3652782 0.7272596 [102,] -0.3652782 -0.3652782 [103,] -0.3652782 -0.3652782 [104,] -0.4277781 -0.3652782 [105,] -0.3652782 -0.4277781 [106,] -0.3652782 -0.3652782 [107,] -0.3352402 -0.3652782 [108,] -0.3652782 -0.3352402 [109,] -0.2727404 -0.3652782 [110,] -0.5196076 -0.2727404 [111,] -0.3289867 -0.5196076 [112,] -0.4640696 -0.3289867 [113,] -0.3352402 -0.4640696 [114,] -0.2727404 -0.3352402 [115,] -0.3652782 -0.2727404 [116,] 0.7272596 -0.3652782 [117,] -0.2727404 0.7272596 [118,] -0.3652782 -0.2727404 [119,] 0.6347218 -0.3652782 [120,] -0.2727404 0.6347218 [121,] -0.3652782 -0.2727404 [122,] -0.3352402 -0.3652782 [123,] 0.3515630 -0.3352402 [124,] 0.6347218 0.3515630 [125,] -0.3289867 0.6347218 [126,] -0.5496456 -0.3289867 [127,] 0.6347218 -0.5496456 [128,] -0.3652782 0.6347218 [129,] 0.6347218 -0.3652782 [130,] -0.2727404 0.6347218 [131,] 0.7272596 -0.2727404 [132,] -0.3715318 0.7272596 [133,] -0.3652782 -0.3715318 [134,] -0.3652782 -0.3652782 [135,] -0.3652782 -0.3652782 [136,] 0.4441008 -0.3652782 [137,] 0.4803924 0.4441008 [138,] -0.3289867 0.4803924 [139,] -0.3652782 -0.3289867 [140,] 0.6341778 -0.3652782 [141,] 0.5722219 0.6341778 [142,] -0.2727404 0.5722219 [143,] 0.4503544 -0.2727404 [144,] -0.5496456 0.4503544 [145,] 0.6710133 -0.5496456 [146,] -0.4277781 0.6710133 [147,] -0.3289867 -0.4277781 [148,] -0.2727404 -0.3289867 [149,] 0.4503544 -0.2727404 [150,] 0.6347218 0.4503544 [151,] -0.2732844 0.6347218 [152,] -0.4576518 -0.2732844 [153,] -0.3715318 -0.4576518 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.3652782 0.7635512 2 -0.3652782 -0.3652782 3 -0.3652782 -0.3652782 4 -0.3652782 -0.3652782 5 0.5428922 -0.3652782 6 -0.3652782 0.5428922 7 -0.3289867 -0.3652782 8 0.6347218 -0.3289867 9 -0.2727404 0.6347218 10 -0.2364488 -0.2727404 11 -0.3652782 -0.2364488 12 -0.6484370 -0.3652782 13 -0.2364488 -0.6484370 14 0.3515630 -0.2364488 15 0.3878546 0.3515630 16 -0.4213602 0.3878546 17 -0.2364488 -0.4213602 18 0.6347218 -0.2364488 19 0.4861020 0.6347218 20 -0.4571078 0.4861020 21 0.4441008 -0.4571078 22 0.4503544 0.4441008 23 0.5428922 0.4503544 24 0.5722219 0.5428922 25 -0.6484370 0.5722219 26 0.7272596 -0.6484370 27 -0.4640696 0.7272596 28 0.6347218 -0.4640696 29 -0.5496456 0.6347218 30 -0.3652782 -0.5496456 31 -0.2727404 -0.3652782 32 -0.4571078 -0.2727404 33 0.6710133 -0.4571078 34 -0.3652782 0.6710133 35 -0.3652782 -0.3652782 36 -0.5196076 -0.3652782 37 0.5359304 -0.5196076 38 0.4503544 0.5359304 39 -0.5133540 0.4503544 40 0.4498104 -0.5133540 41 0.5359304 0.4498104 42 0.5428922 0.5359304 43 -0.2364488 0.5428922 44 -0.5496456 -0.2364488 45 0.4503544 -0.5496456 46 -0.3652782 0.4503544 47 0.6347218 -0.3652782 48 0.4503544 0.6347218 49 -0.3652782 0.4503544 50 -0.4277781 -0.3652782 51 -0.4213602 -0.4277781 52 0.6347218 -0.4213602 53 -0.3658222 0.6347218 54 -0.3652782 -0.3658222 55 0.5722219 -0.3652782 56 0.3515630 0.5722219 57 0.6347218 0.3515630 58 0.6347218 0.6347218 59 0.5786398 0.6347218 60 0.7635512 0.5786398 61 -0.6484370 0.7635512 62 -0.3652782 -0.6484370 63 0.7635512 -0.3652782 64 -0.3652782 0.7635512 65 -0.3652782 -0.3652782 66 -0.5138980 -0.3652782 67 -0.2727404 -0.5138980 68 0.6347218 -0.2727404 69 -0.4640696 0.6347218 70 -0.3652782 -0.4640696 71 0.6347218 -0.3652782 72 0.5359304 0.6347218 73 -0.3715318 0.5359304 74 0.6347218 -0.3715318 75 0.4866460 0.6347218 76 0.6347218 0.4866460 77 0.3515630 0.6347218 78 0.6704693 0.3515630 79 -0.5133540 0.6704693 80 -0.3652782 -0.5133540 81 0.6284682 -0.3652782 82 -0.3652782 0.6284682 83 -0.3658222 -0.3652782 84 0.4503544 -0.3658222 85 -0.2727404 0.4503544 86 0.7272596 -0.2727404 87 0.6647598 0.7272596 88 -0.3652782 0.6647598 89 0.6347218 -0.3652782 90 -0.5496456 0.6347218 91 -0.2364488 -0.5496456 92 -0.4571078 -0.2364488 93 -0.3652782 -0.4571078 94 -0.3289867 -0.3652782 95 0.6347218 -0.3289867 96 -0.2364488 0.6347218 97 -0.3652782 -0.2364488 98 -0.2727404 -0.3652782 99 0.6347218 -0.2727404 100 0.7272596 0.6347218 101 -0.3652782 0.7272596 102 -0.3652782 -0.3652782 103 -0.3652782 -0.3652782 104 -0.4277781 -0.3652782 105 -0.3652782 -0.4277781 106 -0.3652782 -0.3652782 107 -0.3352402 -0.3652782 108 -0.3652782 -0.3352402 109 -0.2727404 -0.3652782 110 -0.5196076 -0.2727404 111 -0.3289867 -0.5196076 112 -0.4640696 -0.3289867 113 -0.3352402 -0.4640696 114 -0.2727404 -0.3352402 115 -0.3652782 -0.2727404 116 0.7272596 -0.3652782 117 -0.2727404 0.7272596 118 -0.3652782 -0.2727404 119 0.6347218 -0.3652782 120 -0.2727404 0.6347218 121 -0.3652782 -0.2727404 122 -0.3352402 -0.3652782 123 0.3515630 -0.3352402 124 0.6347218 0.3515630 125 -0.3289867 0.6347218 126 -0.5496456 -0.3289867 127 0.6347218 -0.5496456 128 -0.3652782 0.6347218 129 0.6347218 -0.3652782 130 -0.2727404 0.6347218 131 0.7272596 -0.2727404 132 -0.3715318 0.7272596 133 -0.3652782 -0.3715318 134 -0.3652782 -0.3652782 135 -0.3652782 -0.3652782 136 0.4441008 -0.3652782 137 0.4803924 0.4441008 138 -0.3289867 0.4803924 139 -0.3652782 -0.3289867 140 0.6341778 -0.3652782 141 0.5722219 0.6341778 142 -0.2727404 0.5722219 143 0.4503544 -0.2727404 144 -0.5496456 0.4503544 145 0.6710133 -0.5496456 146 -0.4277781 0.6710133 147 -0.3289867 -0.4277781 148 -0.2727404 -0.3289867 149 0.4503544 -0.2727404 150 0.6347218 0.4503544 151 -0.2732844 0.6347218 152 -0.4576518 -0.2732844 153 -0.3715318 -0.4576518 > 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/fisher/rcomp/tmp/7v1n51356123864.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/fisher/rcomp/tmp/83s2i1356123864.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/fisher/rcomp/tmp/93olx1356123864.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/fisher/rcomp/tmp/10vylg1356123864.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/11z06v1356123864.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/fisher/rcomp/tmp/124uq41356123865.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/fisher/rcomp/tmp/13lr4p1356123865.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/fisher/rcomp/tmp/14r9ep1356123865.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/fisher/rcomp/tmp/1579ia1356123865.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/fisher/rcomp/tmp/16lvgb1356123865.tab") + } > > try(system("convert tmp/1b4sr1356123864.ps tmp/1b4sr1356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/2suto1356123864.ps tmp/2suto1356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/3seyb1356123864.ps tmp/3seyb1356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/48sp71356123864.ps tmp/48sp71356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/5trav1356123864.ps tmp/5trav1356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/635yb1356123864.ps tmp/635yb1356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/7v1n51356123864.ps tmp/7v1n51356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/83s2i1356123864.ps tmp/83s2i1356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/93olx1356123864.ps tmp/93olx1356123864.png",intern=TRUE)) character(0) > try(system("convert tmp/10vylg1356123864.ps tmp/10vylg1356123864.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.847 1.801 9.655