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 + ,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 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,1 + ,1 + ,1 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,1 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,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+ ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,1 + ,1 + ,1 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,1 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1) + ,dim=c(6 + ,154) + ,dimnames=list(c('UseLimit' + ,'Used' + ,'Useful' + ,'Outcome' + ,'CorrectAnalysis' + ,'T20') + ,1:154)) > y <- array(NA,dim=c(6,154),dimnames=list(c('UseLimit','Used','Useful','Outcome','CorrectAnalysis','T20'),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 = '5' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '5' > #'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 CorrectAnalysis UseLimit Used Useful Outcome T20 1 0 1 0 0 1 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 0 0 1 1 1 0 79 1 0 1 0 1 0 80 0 0 0 1 0 0 81 0 0 0 0 0 0 82 0 1 1 0 1 0 83 0 0 0 0 0 0 84 1 0 1 0 0 0 85 0 0 0 1 1 0 86 0 1 0 0 0 0 87 0 1 0 0 1 1 88 0 1 1 0 1 0 89 0 0 0 0 0 1 90 0 0 0 0 1 1 91 0 0 0 1 0 1 92 0 1 0 0 0 0 93 0 1 0 1 0 1 94 0 0 0 0 0 1 95 0 0 0 0 0 0 96 0 0 0 0 1 1 97 0 1 0 0 0 0 98 0 0 0 0 0 1 99 0 1 0 0 0 1 100 0 0 0 0 1 1 101 0 1 0 0 1 1 102 0 0 0 0 0 1 103 0 0 0 0 0 1 104 0 0 0 0 0 1 105 0 0 1 0 0 0 106 0 0 0 0 0 1 107 0 0 0 0 0 1 108 0 1 1 0 0 0 109 0 0 0 0 0 1 110 0 1 0 0 0 1 111 0 1 1 1 0 0 112 0 0 0 0 0 0 113 0 0 1 0 0 1 114 0 1 1 0 0 0 115 0 1 0 0 0 1 116 0 0 0 0 0 1 117 0 1 0 0 1 1 118 0 1 0 0 0 1 119 0 0 0 0 0 1 120 0 0 0 0 1 1 121 0 1 0 0 0 1 122 0 0 0 0 0 1 123 0 1 1 0 0 0 124 0 0 1 1 1 1 125 0 0 0 0 1 1 126 0 0 0 0 0 0 127 0 0 0 1 0 1 128 0 0 0 0 1 1 129 0 0 0 0 0 1 130 0 0 0 0 1 1 131 0 1 0 0 0 1 132 0 1 0 0 1 1 133 0 1 1 0 0 1 134 0 0 0 0 0 1 135 0 0 0 0 0 1 136 0 0 0 0 0 1 137 0 1 1 1 1 1 138 0 1 1 1 1 0 139 0 0 0 0 0 0 140 0 0 0 0 0 1 141 1 0 1 0 1 1 142 0 0 1 0 1 0 143 0 1 0 0 0 1 144 0 0 0 1 1 1 145 0 0 0 1 0 1 146 0 0 0 0 1 0 147 0 0 1 0 0 0 148 0 0 0 0 0 0 149 0 1 0 0 0 1 150 0 0 0 1 1 1 151 0 0 0 0 1 1 152 1 1 1 0 0 1 153 1 1 1 1 0 1 154 0 1 1 0 0 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) UseLimit Used Useful Outcome T20 -0.0163557 0.0001335 0.2588355 0.0666029 -0.0233601 0.0305637 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.31642 -0.05568 -0.01421 0.01636 0.78088 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.0163557 0.0358435 -0.456 0.649 UseLimit 0.0001335 0.0421168 0.003 0.997 Used 0.2588355 0.0453849 5.703 6.19e-08 *** Useful 0.0666029 0.0464028 1.435 0.153 Outcome -0.0233601 0.0407324 -0.574 0.567 T20 0.0305637 0.0426774 0.716 0.475 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2417 on 148 degrees of freedom Multiple R-squared: 0.2184, Adjusted R-squared: 0.192 F-statistic: 8.271 on 5 and 148 DF, p-value: 6.485e-07 > 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.000000000 0.000000000 1.0000000000 [2,] 0.000000000 0.000000000 1.0000000000 [3,] 0.000000000 0.000000000 1.0000000000 [4,] 0.000000000 0.000000000 1.0000000000 [5,] 0.000000000 0.000000000 1.0000000000 [6,] 0.000000000 0.000000000 1.0000000000 [7,] 0.000000000 0.000000000 1.0000000000 [8,] 0.000000000 0.000000000 1.0000000000 [9,] 0.323818217 0.647636435 0.6761817827 [10,] 0.276727067 0.553454134 0.7232729332 [11,] 0.246584628 0.493169257 0.7534153717 [12,] 0.824518662 0.350962677 0.1754813384 [13,] 0.770736581 0.458526839 0.2292634194 [14,] 0.841941901 0.316116199 0.1580580994 [15,] 0.798138463 0.403723074 0.2018615372 [16,] 0.744389452 0.511221096 0.2556105479 [17,] 0.728140352 0.543719296 0.2718596480 [18,] 0.754853964 0.490292072 0.2451460358 [19,] 0.699711581 0.600576839 0.3002884193 [20,] 0.678835587 0.642328825 0.3211644127 [21,] 0.623184011 0.753631978 0.3768159890 [22,] 0.562987520 0.874024960 0.4370124799 [23,] 0.500897944 0.998204112 0.4991020560 [24,] 0.439756194 0.879512388 0.5602438062 [25,] 0.387250119 0.774500237 0.6127498815 [26,] 0.332603806 0.665207611 0.6673961944 [27,] 0.279998368 0.559996736 0.7200016318 [28,] 0.232132094 0.464264188 0.7678679060 [29,] 0.247362254 0.494724508 0.7526377458 [30,] 0.222017301 0.444034602 0.7779826989 [31,] 0.181697249 0.363394497 0.8183027514 [32,] 0.147236457 0.294472913 0.8527635433 [33,] 0.568327798 0.863344403 0.4316722016 [34,] 0.546026033 0.907947934 0.4539739670 [35,] 0.496074468 0.992148936 0.5039255321 [36,] 0.442552043 0.885104085 0.5574479574 [37,] 0.392660004 0.785320007 0.6073399964 [38,] 0.344203345 0.688406690 0.6557966550 [39,] 0.297169889 0.594339779 0.7028301107 [40,] 0.253676685 0.507353370 0.7463233149 [41,] 0.214662715 0.429325430 0.7853372851 [42,] 0.178743911 0.357487822 0.8212560890 [43,] 0.168013122 0.336026244 0.8319868782 [44,] 0.486660003 0.973320006 0.5133399970 [45,] 0.438996210 0.877992419 0.5610037905 [46,] 0.815420104 0.369159792 0.1845798959 [47,] 0.780617178 0.438765645 0.2193828224 [48,] 0.773247641 0.453504717 0.2267523585 [49,] 0.782875732 0.434248537 0.2171242685 [50,] 0.747370882 0.505258236 0.2526291181 [51,] 0.708844022 0.582311956 0.2911559782 [52,] 0.921990404 0.156019193 0.0780095964 [53,] 0.904137429 0.191725142 0.0958625712 [54,] 0.913718358 0.172563284 0.0862816420 [55,] 0.893444371 0.213111258 0.1065556288 [56,] 0.872326086 0.255347828 0.1276739139 [57,] 0.845846291 0.308307418 0.1541537088 [58,] 0.815981990 0.368036021 0.1840180105 [59,] 0.964360419 0.071279163 0.0356395814 [60,] 0.954896148 0.090207705 0.0451038523 [61,] 0.943195839 0.113608322 0.0568041611 [62,] 0.943882879 0.112234243 0.0561171214 [63,] 0.929334767 0.141330466 0.0706652329 [64,] 0.912846327 0.174307346 0.0871536731 [65,] 0.910095393 0.179809215 0.0899046073 [66,] 0.910971593 0.178056813 0.0890284067 [67,] 0.891251287 0.217497425 0.1087487126 [68,] 0.869543349 0.260913301 0.1304566505 [69,] 0.844080309 0.311839383 0.1559196913 [70,] 0.847431764 0.305136473 0.1525682364 [71,] 0.985823241 0.028353519 0.0141767593 [72,] 0.981182925 0.037634149 0.0188170747 [73,] 0.975187559 0.049624882 0.0248124408 [74,] 0.973197656 0.053604687 0.0268023437 [75,] 0.965183656 0.069632689 0.0348163444 [76,] 0.999147953 0.001704093 0.0008520467 [77,] 0.998827543 0.002344915 0.0011724573 [78,] 0.998367714 0.003264572 0.0016322860 [79,] 0.997586378 0.004827244 0.0024136220 [80,] 0.997139088 0.005721824 0.0028609118 [81,] 0.995862577 0.008274847 0.0041374234 [82,] 0.994083780 0.011832440 0.0059162202 [83,] 0.991746315 0.016507370 0.0082536851 [84,] 0.989212666 0.021574669 0.0107873344 [85,] 0.985255753 0.029488495 0.0147442474 [86,] 0.979943912 0.040112176 0.0200560879 [87,] 0.974801776 0.050396449 0.0251982243 [88,] 0.966543760 0.066912480 0.0334562401 [89,] 0.959572341 0.080855319 0.0404276594 [90,] 0.947330962 0.105338076 0.0526690382 [91,] 0.932141738 0.135716523 0.0678582616 [92,] 0.913949929 0.172100142 0.0860500712 [93,] 0.891942606 0.216114787 0.1080573935 [94,] 0.866257249 0.267485501 0.1337427506 [95,] 0.836565568 0.326868863 0.1634344317 [96,] 0.802791676 0.394416648 0.1972083240 [97,] 0.786674214 0.426651573 0.2133257864 [98,] 0.747085131 0.505829739 0.2529148694 [99,] 0.703822471 0.592355058 0.2961775290 [100,] 0.682003924 0.635992151 0.3179960757 [101,] 0.633797694 0.732404612 0.3662023060 [102,] 0.582193429 0.835613141 0.4178065706 [103,] 0.563784682 0.872430635 0.4362153176 [104,] 0.521671005 0.956657989 0.4783289947 [105,] 0.571562408 0.856875185 0.4284375924 [106,] 0.544811771 0.910376458 0.4551882291 [107,] 0.488856992 0.977713985 0.5111430077 [108,] 0.435290372 0.870580744 0.5647096282 [109,] 0.380492974 0.760985947 0.6195070265 [110,] 0.327076655 0.654153311 0.6729233446 [111,] 0.279293045 0.558586091 0.7207069545 [112,] 0.232398899 0.464797798 0.7676011009 [113,] 0.189910153 0.379820307 0.8100898466 [114,] 0.154529868 0.309059735 0.8454701325 [115,] 0.139577350 0.279154700 0.8604226502 [116,] 0.171111801 0.342223601 0.8288881993 [117,] 0.134836324 0.269672647 0.8651636764 [118,] 0.111860774 0.223721547 0.8881392263 [119,] 0.085827234 0.171654467 0.9141727663 [120,] 0.063468329 0.126936658 0.9365316712 [121,] 0.046863472 0.093726944 0.9531365282 [122,] 0.033023802 0.066047605 0.9669761975 [123,] 0.022334119 0.044668237 0.9776658814 [124,] 0.014921144 0.029842288 0.9850788558 [125,] 0.026558408 0.053116816 0.9734415920 [126,] 0.018541414 0.037082828 0.9814585861 [127,] 0.012939443 0.025878887 0.9870605565 [128,] 0.009245306 0.018490611 0.9907546943 [129,] 0.015910862 0.031821725 0.9840891377 [130,] 0.014519285 0.029038570 0.9854807150 [131,] 0.012170421 0.024340842 0.9878295788 [132,] 0.006663008 0.013326016 0.9933369919 [133,] 0.060517751 0.121035502 0.9394822489 [134,] 0.053166035 0.106332070 0.9468339650 [135,] 0.032755393 0.065510786 0.9672446070 [136,] 0.018209196 0.036418391 0.9817908044 [137,] 0.007641397 0.015282794 0.9923586030 > postscript(file="/var/fisher/rcomp/tmp/15cbp1356099123.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/2ryx01356099123.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/3yzvu1356099123.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/4w9ou1356099123.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/5mn9k1356099123.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 0.039582216 0.016355681 0.016355681 0.016355681 0.016355681 -0.027020689 7 8 9 10 11 12 0.016355681 0.016355681 0.039715762 0.016222135 0.016222135 0.016355681 13 14 15 16 17 18 -0.309082691 0.016222135 -0.285722610 -0.285722610 0.690783763 0.016222135 19 20 21 22 23 24 0.039715762 0.714277390 -0.050380770 -0.285856156 -0.026887143 -0.027020689 25 26 27 28 29 30 -0.219119705 -0.309082691 0.039582216 -0.242479786 0.039715762 -0.050247223 31 32 33 34 35 36 0.016355681 0.016222135 -0.050380770 0.039715762 0.016355681 0.016355681 37 38 39 40 41 42 -0.309216237 -0.219119705 -0.026887143 -0.050247223 0.714277390 -0.219119705 43 44 45 46 47 48 -0.027020689 0.016222135 -0.050247223 -0.026887143 0.016355681 0.039715762 49 50 51 52 53 54 -0.026887143 0.016355681 -0.242479786 0.690783763 0.039715762 0.757520214 55 56 57 58 59 60 0.016355681 -0.219119705 -0.285722610 0.039715762 0.039715762 0.714143844 61 62 63 64 65 66 0.039582216 -0.309082691 0.016355681 0.039582216 0.016355681 0.016355681 67 68 69 70 71 72 0.690917309 0.016222135 0.039715762 -0.242479786 0.016355681 0.039715762 73 74 75 76 77 78 -0.219119705 -0.242613332 0.039715762 -0.026887143 0.039715762 -0.285722610 79 80 81 82 83 84 0.780880295 -0.050247223 0.016355681 -0.219253252 0.016355681 0.757520214 85 86 87 88 89 90 -0.026887143 0.016222135 0.009018541 -0.219253252 -0.014207993 0.009152087 91 92 93 94 95 96 -0.080810898 0.016222135 -0.080944444 -0.014207993 0.016355681 0.009152087 97 98 99 100 101 102 0.016222135 -0.014207993 -0.014341539 0.009152087 0.009018541 -0.014207993 103 104 105 106 107 108 -0.014207993 -0.014207993 -0.242479786 -0.014207993 -0.014207993 -0.242613332 109 110 111 112 113 114 -0.014207993 -0.014341539 -0.309216237 0.016355681 -0.273043460 -0.242613332 115 116 117 118 119 120 -0.014341539 -0.014207993 0.009018541 -0.014341539 -0.014207993 0.009152087 121 122 123 124 125 126 -0.014341539 -0.014207993 -0.242613332 -0.316286285 0.009152087 0.016355681 127 128 129 130 131 132 -0.080810898 0.009152087 -0.014207993 0.009152087 -0.014341539 0.009018541 133 134 135 136 137 138 -0.273177007 -0.014207993 -0.014207993 -0.014207993 -0.316419831 -0.285856156 139 140 141 142 143 144 0.016355681 -0.014207993 0.750316620 -0.219119705 -0.014341539 -0.057450818 145 146 147 148 149 150 -0.080810898 0.039715762 -0.242479786 0.016355681 -0.014341539 -0.057450818 151 152 153 154 0.009152087 0.726822993 0.660220089 -0.273177007 > postscript(file="/var/fisher/rcomp/tmp/6kuow1356099123.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.039582216 NA 1 0.016355681 0.039582216 2 0.016355681 0.016355681 3 0.016355681 0.016355681 4 0.016355681 0.016355681 5 -0.027020689 0.016355681 6 0.016355681 -0.027020689 7 0.016355681 0.016355681 8 0.039715762 0.016355681 9 0.016222135 0.039715762 10 0.016222135 0.016222135 11 0.016355681 0.016222135 12 -0.309082691 0.016355681 13 0.016222135 -0.309082691 14 -0.285722610 0.016222135 15 -0.285722610 -0.285722610 16 0.690783763 -0.285722610 17 0.016222135 0.690783763 18 0.039715762 0.016222135 19 0.714277390 0.039715762 20 -0.050380770 0.714277390 21 -0.285856156 -0.050380770 22 -0.026887143 -0.285856156 23 -0.027020689 -0.026887143 24 -0.219119705 -0.027020689 25 -0.309082691 -0.219119705 26 0.039582216 -0.309082691 27 -0.242479786 0.039582216 28 0.039715762 -0.242479786 29 -0.050247223 0.039715762 30 0.016355681 -0.050247223 31 0.016222135 0.016355681 32 -0.050380770 0.016222135 33 0.039715762 -0.050380770 34 0.016355681 0.039715762 35 0.016355681 0.016355681 36 -0.309216237 0.016355681 37 -0.219119705 -0.309216237 38 -0.026887143 -0.219119705 39 -0.050247223 -0.026887143 40 0.714277390 -0.050247223 41 -0.219119705 0.714277390 42 -0.027020689 -0.219119705 43 0.016222135 -0.027020689 44 -0.050247223 0.016222135 45 -0.026887143 -0.050247223 46 0.016355681 -0.026887143 47 0.039715762 0.016355681 48 -0.026887143 0.039715762 49 0.016355681 -0.026887143 50 -0.242479786 0.016355681 51 0.690783763 -0.242479786 52 0.039715762 0.690783763 53 0.757520214 0.039715762 54 0.016355681 0.757520214 55 -0.219119705 0.016355681 56 -0.285722610 -0.219119705 57 0.039715762 -0.285722610 58 0.039715762 0.039715762 59 0.714143844 0.039715762 60 0.039582216 0.714143844 61 -0.309082691 0.039582216 62 0.016355681 -0.309082691 63 0.039582216 0.016355681 64 0.016355681 0.039582216 65 0.016355681 0.016355681 66 0.690917309 0.016355681 67 0.016222135 0.690917309 68 0.039715762 0.016222135 69 -0.242479786 0.039715762 70 0.016355681 -0.242479786 71 0.039715762 0.016355681 72 -0.219119705 0.039715762 73 -0.242613332 -0.219119705 74 0.039715762 -0.242613332 75 -0.026887143 0.039715762 76 0.039715762 -0.026887143 77 -0.285722610 0.039715762 78 0.780880295 -0.285722610 79 -0.050247223 0.780880295 80 0.016355681 -0.050247223 81 -0.219253252 0.016355681 82 0.016355681 -0.219253252 83 0.757520214 0.016355681 84 -0.026887143 0.757520214 85 0.016222135 -0.026887143 86 0.009018541 0.016222135 87 -0.219253252 0.009018541 88 -0.014207993 -0.219253252 89 0.009152087 -0.014207993 90 -0.080810898 0.009152087 91 0.016222135 -0.080810898 92 -0.080944444 0.016222135 93 -0.014207993 -0.080944444 94 0.016355681 -0.014207993 95 0.009152087 0.016355681 96 0.016222135 0.009152087 97 -0.014207993 0.016222135 98 -0.014341539 -0.014207993 99 0.009152087 -0.014341539 100 0.009018541 0.009152087 101 -0.014207993 0.009018541 102 -0.014207993 -0.014207993 103 -0.014207993 -0.014207993 104 -0.242479786 -0.014207993 105 -0.014207993 -0.242479786 106 -0.014207993 -0.014207993 107 -0.242613332 -0.014207993 108 -0.014207993 -0.242613332 109 -0.014341539 -0.014207993 110 -0.309216237 -0.014341539 111 0.016355681 -0.309216237 112 -0.273043460 0.016355681 113 -0.242613332 -0.273043460 114 -0.014341539 -0.242613332 115 -0.014207993 -0.014341539 116 0.009018541 -0.014207993 117 -0.014341539 0.009018541 118 -0.014207993 -0.014341539 119 0.009152087 -0.014207993 120 -0.014341539 0.009152087 121 -0.014207993 -0.014341539 122 -0.242613332 -0.014207993 123 -0.316286285 -0.242613332 124 0.009152087 -0.316286285 125 0.016355681 0.009152087 126 -0.080810898 0.016355681 127 0.009152087 -0.080810898 128 -0.014207993 0.009152087 129 0.009152087 -0.014207993 130 -0.014341539 0.009152087 131 0.009018541 -0.014341539 132 -0.273177007 0.009018541 133 -0.014207993 -0.273177007 134 -0.014207993 -0.014207993 135 -0.014207993 -0.014207993 136 -0.316419831 -0.014207993 137 -0.285856156 -0.316419831 138 0.016355681 -0.285856156 139 -0.014207993 0.016355681 140 0.750316620 -0.014207993 141 -0.219119705 0.750316620 142 -0.014341539 -0.219119705 143 -0.057450818 -0.014341539 144 -0.080810898 -0.057450818 145 0.039715762 -0.080810898 146 -0.242479786 0.039715762 147 0.016355681 -0.242479786 148 -0.014341539 0.016355681 149 -0.057450818 -0.014341539 150 0.009152087 -0.057450818 151 0.726822993 0.009152087 152 0.660220089 0.726822993 153 -0.273177007 0.660220089 154 NA -0.273177007 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.016355681 0.039582216 [2,] 0.016355681 0.016355681 [3,] 0.016355681 0.016355681 [4,] 0.016355681 0.016355681 [5,] -0.027020689 0.016355681 [6,] 0.016355681 -0.027020689 [7,] 0.016355681 0.016355681 [8,] 0.039715762 0.016355681 [9,] 0.016222135 0.039715762 [10,] 0.016222135 0.016222135 [11,] 0.016355681 0.016222135 [12,] -0.309082691 0.016355681 [13,] 0.016222135 -0.309082691 [14,] -0.285722610 0.016222135 [15,] -0.285722610 -0.285722610 [16,] 0.690783763 -0.285722610 [17,] 0.016222135 0.690783763 [18,] 0.039715762 0.016222135 [19,] 0.714277390 0.039715762 [20,] -0.050380770 0.714277390 [21,] -0.285856156 -0.050380770 [22,] -0.026887143 -0.285856156 [23,] -0.027020689 -0.026887143 [24,] -0.219119705 -0.027020689 [25,] -0.309082691 -0.219119705 [26,] 0.039582216 -0.309082691 [27,] -0.242479786 0.039582216 [28,] 0.039715762 -0.242479786 [29,] -0.050247223 0.039715762 [30,] 0.016355681 -0.050247223 [31,] 0.016222135 0.016355681 [32,] -0.050380770 0.016222135 [33,] 0.039715762 -0.050380770 [34,] 0.016355681 0.039715762 [35,] 0.016355681 0.016355681 [36,] -0.309216237 0.016355681 [37,] -0.219119705 -0.309216237 [38,] -0.026887143 -0.219119705 [39,] -0.050247223 -0.026887143 [40,] 0.714277390 -0.050247223 [41,] -0.219119705 0.714277390 [42,] -0.027020689 -0.219119705 [43,] 0.016222135 -0.027020689 [44,] -0.050247223 0.016222135 [45,] -0.026887143 -0.050247223 [46,] 0.016355681 -0.026887143 [47,] 0.039715762 0.016355681 [48,] -0.026887143 0.039715762 [49,] 0.016355681 -0.026887143 [50,] -0.242479786 0.016355681 [51,] 0.690783763 -0.242479786 [52,] 0.039715762 0.690783763 [53,] 0.757520214 0.039715762 [54,] 0.016355681 0.757520214 [55,] -0.219119705 0.016355681 [56,] -0.285722610 -0.219119705 [57,] 0.039715762 -0.285722610 [58,] 0.039715762 0.039715762 [59,] 0.714143844 0.039715762 [60,] 0.039582216 0.714143844 [61,] -0.309082691 0.039582216 [62,] 0.016355681 -0.309082691 [63,] 0.039582216 0.016355681 [64,] 0.016355681 0.039582216 [65,] 0.016355681 0.016355681 [66,] 0.690917309 0.016355681 [67,] 0.016222135 0.690917309 [68,] 0.039715762 0.016222135 [69,] -0.242479786 0.039715762 [70,] 0.016355681 -0.242479786 [71,] 0.039715762 0.016355681 [72,] -0.219119705 0.039715762 [73,] -0.242613332 -0.219119705 [74,] 0.039715762 -0.242613332 [75,] -0.026887143 0.039715762 [76,] 0.039715762 -0.026887143 [77,] -0.285722610 0.039715762 [78,] 0.780880295 -0.285722610 [79,] -0.050247223 0.780880295 [80,] 0.016355681 -0.050247223 [81,] -0.219253252 0.016355681 [82,] 0.016355681 -0.219253252 [83,] 0.757520214 0.016355681 [84,] -0.026887143 0.757520214 [85,] 0.016222135 -0.026887143 [86,] 0.009018541 0.016222135 [87,] -0.219253252 0.009018541 [88,] -0.014207993 -0.219253252 [89,] 0.009152087 -0.014207993 [90,] -0.080810898 0.009152087 [91,] 0.016222135 -0.080810898 [92,] -0.080944444 0.016222135 [93,] -0.014207993 -0.080944444 [94,] 0.016355681 -0.014207993 [95,] 0.009152087 0.016355681 [96,] 0.016222135 0.009152087 [97,] -0.014207993 0.016222135 [98,] -0.014341539 -0.014207993 [99,] 0.009152087 -0.014341539 [100,] 0.009018541 0.009152087 [101,] -0.014207993 0.009018541 [102,] -0.014207993 -0.014207993 [103,] -0.014207993 -0.014207993 [104,] -0.242479786 -0.014207993 [105,] -0.014207993 -0.242479786 [106,] -0.014207993 -0.014207993 [107,] -0.242613332 -0.014207993 [108,] -0.014207993 -0.242613332 [109,] -0.014341539 -0.014207993 [110,] -0.309216237 -0.014341539 [111,] 0.016355681 -0.309216237 [112,] -0.273043460 0.016355681 [113,] -0.242613332 -0.273043460 [114,] -0.014341539 -0.242613332 [115,] -0.014207993 -0.014341539 [116,] 0.009018541 -0.014207993 [117,] -0.014341539 0.009018541 [118,] -0.014207993 -0.014341539 [119,] 0.009152087 -0.014207993 [120,] -0.014341539 0.009152087 [121,] -0.014207993 -0.014341539 [122,] -0.242613332 -0.014207993 [123,] -0.316286285 -0.242613332 [124,] 0.009152087 -0.316286285 [125,] 0.016355681 0.009152087 [126,] -0.080810898 0.016355681 [127,] 0.009152087 -0.080810898 [128,] -0.014207993 0.009152087 [129,] 0.009152087 -0.014207993 [130,] -0.014341539 0.009152087 [131,] 0.009018541 -0.014341539 [132,] -0.273177007 0.009018541 [133,] -0.014207993 -0.273177007 [134,] -0.014207993 -0.014207993 [135,] -0.014207993 -0.014207993 [136,] -0.316419831 -0.014207993 [137,] -0.285856156 -0.316419831 [138,] 0.016355681 -0.285856156 [139,] -0.014207993 0.016355681 [140,] 0.750316620 -0.014207993 [141,] -0.219119705 0.750316620 [142,] -0.014341539 -0.219119705 [143,] -0.057450818 -0.014341539 [144,] -0.080810898 -0.057450818 [145,] 0.039715762 -0.080810898 [146,] -0.242479786 0.039715762 [147,] 0.016355681 -0.242479786 [148,] -0.014341539 0.016355681 [149,] -0.057450818 -0.014341539 [150,] 0.009152087 -0.057450818 [151,] 0.726822993 0.009152087 [152,] 0.660220089 0.726822993 [153,] -0.273177007 0.660220089 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.016355681 0.039582216 2 0.016355681 0.016355681 3 0.016355681 0.016355681 4 0.016355681 0.016355681 5 -0.027020689 0.016355681 6 0.016355681 -0.027020689 7 0.016355681 0.016355681 8 0.039715762 0.016355681 9 0.016222135 0.039715762 10 0.016222135 0.016222135 11 0.016355681 0.016222135 12 -0.309082691 0.016355681 13 0.016222135 -0.309082691 14 -0.285722610 0.016222135 15 -0.285722610 -0.285722610 16 0.690783763 -0.285722610 17 0.016222135 0.690783763 18 0.039715762 0.016222135 19 0.714277390 0.039715762 20 -0.050380770 0.714277390 21 -0.285856156 -0.050380770 22 -0.026887143 -0.285856156 23 -0.027020689 -0.026887143 24 -0.219119705 -0.027020689 25 -0.309082691 -0.219119705 26 0.039582216 -0.309082691 27 -0.242479786 0.039582216 28 0.039715762 -0.242479786 29 -0.050247223 0.039715762 30 0.016355681 -0.050247223 31 0.016222135 0.016355681 32 -0.050380770 0.016222135 33 0.039715762 -0.050380770 34 0.016355681 0.039715762 35 0.016355681 0.016355681 36 -0.309216237 0.016355681 37 -0.219119705 -0.309216237 38 -0.026887143 -0.219119705 39 -0.050247223 -0.026887143 40 0.714277390 -0.050247223 41 -0.219119705 0.714277390 42 -0.027020689 -0.219119705 43 0.016222135 -0.027020689 44 -0.050247223 0.016222135 45 -0.026887143 -0.050247223 46 0.016355681 -0.026887143 47 0.039715762 0.016355681 48 -0.026887143 0.039715762 49 0.016355681 -0.026887143 50 -0.242479786 0.016355681 51 0.690783763 -0.242479786 52 0.039715762 0.690783763 53 0.757520214 0.039715762 54 0.016355681 0.757520214 55 -0.219119705 0.016355681 56 -0.285722610 -0.219119705 57 0.039715762 -0.285722610 58 0.039715762 0.039715762 59 0.714143844 0.039715762 60 0.039582216 0.714143844 61 -0.309082691 0.039582216 62 0.016355681 -0.309082691 63 0.039582216 0.016355681 64 0.016355681 0.039582216 65 0.016355681 0.016355681 66 0.690917309 0.016355681 67 0.016222135 0.690917309 68 0.039715762 0.016222135 69 -0.242479786 0.039715762 70 0.016355681 -0.242479786 71 0.039715762 0.016355681 72 -0.219119705 0.039715762 73 -0.242613332 -0.219119705 74 0.039715762 -0.242613332 75 -0.026887143 0.039715762 76 0.039715762 -0.026887143 77 -0.285722610 0.039715762 78 0.780880295 -0.285722610 79 -0.050247223 0.780880295 80 0.016355681 -0.050247223 81 -0.219253252 0.016355681 82 0.016355681 -0.219253252 83 0.757520214 0.016355681 84 -0.026887143 0.757520214 85 0.016222135 -0.026887143 86 0.009018541 0.016222135 87 -0.219253252 0.009018541 88 -0.014207993 -0.219253252 89 0.009152087 -0.014207993 90 -0.080810898 0.009152087 91 0.016222135 -0.080810898 92 -0.080944444 0.016222135 93 -0.014207993 -0.080944444 94 0.016355681 -0.014207993 95 0.009152087 0.016355681 96 0.016222135 0.009152087 97 -0.014207993 0.016222135 98 -0.014341539 -0.014207993 99 0.009152087 -0.014341539 100 0.009018541 0.009152087 101 -0.014207993 0.009018541 102 -0.014207993 -0.014207993 103 -0.014207993 -0.014207993 104 -0.242479786 -0.014207993 105 -0.014207993 -0.242479786 106 -0.014207993 -0.014207993 107 -0.242613332 -0.014207993 108 -0.014207993 -0.242613332 109 -0.014341539 -0.014207993 110 -0.309216237 -0.014341539 111 0.016355681 -0.309216237 112 -0.273043460 0.016355681 113 -0.242613332 -0.273043460 114 -0.014341539 -0.242613332 115 -0.014207993 -0.014341539 116 0.009018541 -0.014207993 117 -0.014341539 0.009018541 118 -0.014207993 -0.014341539 119 0.009152087 -0.014207993 120 -0.014341539 0.009152087 121 -0.014207993 -0.014341539 122 -0.242613332 -0.014207993 123 -0.316286285 -0.242613332 124 0.009152087 -0.316286285 125 0.016355681 0.009152087 126 -0.080810898 0.016355681 127 0.009152087 -0.080810898 128 -0.014207993 0.009152087 129 0.009152087 -0.014207993 130 -0.014341539 0.009152087 131 0.009018541 -0.014341539 132 -0.273177007 0.009018541 133 -0.014207993 -0.273177007 134 -0.014207993 -0.014207993 135 -0.014207993 -0.014207993 136 -0.316419831 -0.014207993 137 -0.285856156 -0.316419831 138 0.016355681 -0.285856156 139 -0.014207993 0.016355681 140 0.750316620 -0.014207993 141 -0.219119705 0.750316620 142 -0.014341539 -0.219119705 143 -0.057450818 -0.014341539 144 -0.080810898 -0.057450818 145 0.039715762 -0.080810898 146 -0.242479786 0.039715762 147 0.016355681 -0.242479786 148 -0.014341539 0.016355681 149 -0.057450818 -0.014341539 150 0.009152087 -0.057450818 151 0.726822993 0.009152087 152 0.660220089 0.726822993 153 -0.273177007 0.660220089 > 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/7yz561356099123.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/8dw9r1356099123.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/94ctt1356099123.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/10amtf1356099123.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/116hhd1356099123.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/12el061356099123.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/134g2j1356099123.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/14k4u61356099123.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/15n3gr1356099123.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/16jn3n1356099123.tab") + } > > try(system("convert tmp/15cbp1356099123.ps tmp/15cbp1356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/2ryx01356099123.ps tmp/2ryx01356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/3yzvu1356099123.ps tmp/3yzvu1356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/4w9ou1356099123.ps tmp/4w9ou1356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/5mn9k1356099123.ps tmp/5mn9k1356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/6kuow1356099123.ps tmp/6kuow1356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/7yz561356099123.ps tmp/7yz561356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/8dw9r1356099123.ps tmp/8dw9r1356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/94ctt1356099123.ps tmp/94ctt1356099123.png",intern=TRUE)) character(0) > try(system("convert tmp/10amtf1356099123.ps tmp/10amtf1356099123.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.968 1.777 9.787