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 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,1 + ,1 + ,0 + ,1 + ,1 + ,0 + ,1 + ,0) + ,dim=c(3 + ,154) + ,dimnames=list(c('Outcome' + ,'Used' + ,'CorrectAnalysis') + ,1:154)) > y <- array(NA,dim=c(3,154),dimnames=list(c('Outcome','Used','CorrectAnalysis'),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 = '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 Outcome Used CorrectAnalysis 1 1 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 1 0 0 7 0 0 0 8 0 0 0 9 1 0 0 10 0 0 0 11 0 0 0 12 0 0 0 13 0 1 0 14 0 0 0 15 1 1 0 16 1 1 0 17 0 1 1 18 0 0 0 19 1 0 0 20 1 1 1 21 0 0 0 22 1 1 0 23 1 0 0 24 1 0 0 25 1 1 0 26 0 1 0 27 1 0 0 28 0 1 0 29 1 0 0 30 0 0 0 31 0 0 0 32 0 0 0 33 0 0 0 34 1 0 0 35 0 0 0 36 0 0 0 37 0 1 0 38 1 1 0 39 1 0 0 40 0 0 0 41 1 1 1 42 1 1 0 43 1 0 0 44 0 0 0 45 0 0 0 46 1 0 0 47 0 0 0 48 1 0 0 49 1 0 0 50 0 0 0 51 0 1 0 52 0 1 1 53 1 0 0 54 0 1 1 55 0 0 0 56 1 1 0 57 1 1 0 58 1 0 0 59 1 0 0 60 1 1 1 61 1 0 0 62 0 1 0 63 0 0 0 64 1 0 0 65 0 0 0 66 0 0 0 67 0 1 1 68 0 0 0 69 1 0 0 70 0 1 0 71 0 0 0 72 1 0 0 73 1 1 0 74 0 1 0 75 1 0 0 76 1 0 0 77 1 0 0 78 1 1 0 79 1 1 1 80 0 0 0 81 0 0 0 82 1 1 0 83 0 0 0 84 0 1 1 85 1 0 0 86 0 0 0 87 1 0 0 88 1 1 0 89 0 0 0 90 1 0 0 91 0 0 0 92 0 0 0 93 0 0 0 94 0 0 0 95 0 0 0 96 1 0 0 97 0 0 0 98 0 0 0 99 0 0 0 100 1 0 0 101 1 0 0 102 0 0 0 103 0 0 0 104 0 0 0 105 0 1 0 106 0 0 0 107 0 0 0 108 0 1 0 109 0 0 0 110 0 0 0 111 0 1 0 112 0 0 0 113 0 1 0 114 0 1 0 115 0 0 0 116 0 0 0 117 1 0 0 118 0 0 0 119 0 0 0 120 1 0 0 121 0 0 0 122 0 0 0 123 0 1 0 124 1 1 0 125 1 0 0 126 0 0 0 127 0 0 0 128 1 0 0 129 0 0 0 130 1 0 0 131 0 0 0 132 1 0 0 133 0 1 0 134 0 0 0 135 0 0 0 136 0 0 0 137 1 1 0 138 1 1 0 139 0 0 0 140 0 0 0 141 1 1 1 142 1 1 0 143 0 0 0 144 1 0 0 145 0 0 0 146 1 0 0 147 0 1 0 148 0 0 0 149 0 0 0 150 1 0 0 151 1 0 0 152 0 1 1 153 0 1 1 154 0 1 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Used CorrectAnalysis 0.36697 0.11788 -0.06818 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.4849 -0.3670 -0.3670 0.6330 0.6330 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.36697 0.04708 7.795 9.72e-13 *** Used 0.11788 0.09766 1.207 0.229 CorrectAnalysis -0.06818 0.16569 -0.411 0.681 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4915 on 151 degrees of freedom Multiple R-squared: 0.009704, Adjusted R-squared: -0.003413 F-statistic: 0.7398 on 2 and 151 DF, p-value: 0.4789 > 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.8564078 0.2871844 0.1435922 [2,] 0.7854206 0.4291587 0.2145794 [3,] 0.7021399 0.5957202 0.2978601 [4,] 0.7706171 0.4587658 0.2293829 [5,] 0.7108886 0.5782228 0.2891114 [6,] 0.6443878 0.7112243 0.3556122 [7,] 0.5734306 0.8531389 0.4265694 [8,] 0.4818148 0.9636297 0.5181852 [9,] 0.4131457 0.8262915 0.5868543 [10,] 0.5029543 0.9940914 0.4970457 [11,] 0.4784374 0.9568747 0.5215626 [12,] 0.4014487 0.8028974 0.5985513 [13,] 0.3436234 0.6872468 0.6563766 [14,] 0.4479511 0.8959021 0.5520489 [15,] 0.5209163 0.9581675 0.4790837 [16,] 0.4702748 0.9405497 0.5297252 [17,] 0.4309022 0.8618044 0.5690978 [18,] 0.5079199 0.9841602 0.4920801 [19,] 0.5651804 0.8696392 0.4348196 [20,] 0.5226752 0.9546496 0.4773248 [21,] 0.5825866 0.8348268 0.4174134 [22,] 0.6222214 0.7555572 0.3777786 [23,] 0.6437500 0.7125000 0.3562500 [24,] 0.6713341 0.6573317 0.3286659 [25,] 0.6477084 0.7045832 0.3522916 [26,] 0.6216704 0.7566591 0.3783296 [27,] 0.5935729 0.8128543 0.4064271 [28,] 0.5637700 0.8724600 0.4362300 [29,] 0.6011232 0.7977537 0.3988768 [30,] 0.5736301 0.8527397 0.4263699 [31,] 0.5448088 0.9103824 0.4551912 [32,] 0.5493804 0.9012392 0.4506196 [33,] 0.5463115 0.9073770 0.4536885 [34,] 0.5825302 0.8349395 0.4174698 [35,] 0.5562462 0.8875077 0.4437538 [36,] 0.5514349 0.8971301 0.4485651 [37,] 0.5437216 0.9125567 0.4562784 [38,] 0.5776944 0.8446113 0.4223056 [39,] 0.5535472 0.8929056 0.4464528 [40,] 0.5284648 0.9430704 0.4715352 [41,] 0.5623374 0.8753251 0.4376626 [42,] 0.5384796 0.9230408 0.4615204 [43,] 0.5703753 0.8592493 0.4296247 [44,] 0.5989674 0.8020653 0.4010326 [45,] 0.5778827 0.8442346 0.4221173 [46,] 0.5849844 0.8300311 0.4150156 [47,] 0.5875853 0.8248294 0.4124147 [48,] 0.6140887 0.7718225 0.3859113 [49,] 0.6019487 0.7961026 0.3980513 [50,] 0.5814720 0.8370560 0.4185280 [51,] 0.5785184 0.8429632 0.4214816 [52,] 0.5746417 0.8507165 0.4253583 [53,] 0.6013933 0.7972134 0.3986067 [54,] 0.6265605 0.7468790 0.3734395 [55,] 0.6421489 0.7157022 0.3578511 [56,] 0.6659518 0.6680963 0.3340482 [57,] 0.6708650 0.6582699 0.3291350 [58,] 0.6536982 0.6926035 0.3463018 [59,] 0.6773841 0.6452319 0.3226159 [60,] 0.6603381 0.6793237 0.3396619 [61,] 0.6423950 0.7152101 0.3576050 [62,] 0.6299958 0.7400084 0.3700042 [63,] 0.6109908 0.7780185 0.3890092 [64,] 0.6371473 0.7257053 0.3628527 [65,] 0.6375707 0.7248587 0.3624293 [66,] 0.6185167 0.7629666 0.3814833 [67,] 0.6449943 0.7100114 0.3550057 [68,] 0.6481694 0.7036612 0.3518306 [69,] 0.6469211 0.7061579 0.3530789 [70,] 0.6736640 0.6526720 0.3263360 [71,] 0.7005440 0.5989121 0.2994560 [72,] 0.7276618 0.5446765 0.2723382 [73,] 0.7335291 0.5329419 0.2664709 [74,] 0.7547583 0.4904833 0.2452417 [75,] 0.7384700 0.5230599 0.2615300 [76,] 0.7212450 0.5575100 0.2787550 [77,] 0.7309069 0.5381861 0.2690931 [78,] 0.7130915 0.5738171 0.2869085 [79,] 0.6965292 0.6069416 0.3034708 [80,] 0.7272670 0.5454660 0.2727330 [81,] 0.7086237 0.5827526 0.2913763 [82,] 0.7405955 0.5188090 0.2594045 [83,] 0.7566997 0.4866006 0.2433003 [84,] 0.7384774 0.5230452 0.2615226 [85,] 0.7718046 0.4563907 0.2281954 [86,] 0.7535114 0.4929773 0.2464886 [87,] 0.7342355 0.5315290 0.2657645 [88,] 0.7140434 0.5719133 0.2859566 [89,] 0.6930184 0.6139632 0.3069816 [90,] 0.6712609 0.6574782 0.3287391 [91,] 0.7087600 0.5824799 0.2912400 [92,] 0.6866325 0.6267350 0.3133675 [93,] 0.6637950 0.6724099 0.3362050 [94,] 0.6403831 0.7192337 0.3596169 [95,] 0.6802369 0.6395262 0.3197631 [96,] 0.7222370 0.5555260 0.2777630 [97,] 0.6984751 0.6030499 0.3015249 [98,] 0.6738752 0.6522495 0.3261248 [99,] 0.6486006 0.7027988 0.3513994 [100,] 0.6355892 0.7288216 0.3644108 [101,] 0.6091290 0.7817421 0.3908710 [102,] 0.5824287 0.8351426 0.4175713 [103,] 0.5683091 0.8633818 0.4316909 [104,] 0.5410521 0.9178959 0.4589479 [105,] 0.5140884 0.9718233 0.4859116 [106,] 0.5005585 0.9988830 0.4994415 [107,] 0.4737776 0.9475551 0.5262224 [108,] 0.4632001 0.9264001 0.5367999 [109,] 0.4582500 0.9164999 0.5417500 [110,] 0.4318163 0.8636326 0.5681837 [111,] 0.4065942 0.8131885 0.5934058 [112,] 0.4401396 0.8802791 0.5598604 [113,] 0.4131350 0.8262700 0.5868650 [114,] 0.3876705 0.7753411 0.6123295 [115,] 0.4208832 0.8417663 0.5791168 [116,] 0.3933244 0.7866488 0.6066756 [117,] 0.3677224 0.7354448 0.6322776 [118,] 0.3714063 0.7428127 0.6285937 [119,] 0.3650475 0.7300951 0.6349525 [120,] 0.3982173 0.7964345 0.6017827 [121,] 0.3692571 0.7385142 0.6307429 [122,] 0.3428963 0.6857925 0.6571037 [123,] 0.3748064 0.7496128 0.6251936 [124,] 0.3453044 0.6906088 0.6546956 [125,] 0.3825911 0.7651823 0.6174089 [126,] 0.3489764 0.6979529 0.6510236 [127,] 0.3941836 0.7883673 0.6058164 [128,] 0.4031472 0.8062944 0.5968528 [129,] 0.3627381 0.7254761 0.6372619 [130,] 0.3265660 0.6531320 0.6734340 [131,] 0.2958226 0.5916451 0.7041774 [132,] 0.2807799 0.5615597 0.7192201 [133,] 0.2944914 0.5889827 0.7055086 [134,] 0.2688162 0.5376324 0.7311838 [135,] 0.2528134 0.5056268 0.7471866 [136,] 0.3593426 0.7186853 0.6406574 [137,] 0.5059515 0.9880970 0.4940485 [138,] 0.5229262 0.9541476 0.4770738 [139,] 0.5162493 0.9675014 0.4837507 [140,] 0.5460088 0.9079825 0.4539912 [141,] 0.5308821 0.9382359 0.4691179 [142,] 0.3908153 0.7816306 0.6091847 [143,] 0.4309805 0.8619611 0.5690195 > postscript(file="/var/fisher/rcomp/tmp/1niha1356020865.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/251bc1356020865.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/3fe8f1356020865.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/4ffej1356020865.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/5zv9i1356020865.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.6330275 -0.3669725 -0.3669725 -0.3669725 -0.3669725 0.6330275 -0.3669725 8 9 10 11 12 13 14 -0.3669725 0.6330275 -0.3669725 -0.3669725 -0.3669725 -0.4848485 -0.3669725 15 16 17 18 19 20 21 0.5151515 0.5151515 -0.4166667 -0.3669725 0.6330275 0.5833333 -0.3669725 22 23 24 25 26 27 28 0.5151515 0.6330275 0.6330275 0.5151515 -0.4848485 0.6330275 -0.4848485 29 30 31 32 33 34 35 0.6330275 -0.3669725 -0.3669725 -0.3669725 -0.3669725 0.6330275 -0.3669725 36 37 38 39 40 41 42 -0.3669725 -0.4848485 0.5151515 0.6330275 -0.3669725 0.5833333 0.5151515 43 44 45 46 47 48 49 0.6330275 -0.3669725 -0.3669725 0.6330275 -0.3669725 0.6330275 0.6330275 50 51 52 53 54 55 56 -0.3669725 -0.4848485 -0.4166667 0.6330275 -0.4166667 -0.3669725 0.5151515 57 58 59 60 61 62 63 0.5151515 0.6330275 0.6330275 0.5833333 0.6330275 -0.4848485 -0.3669725 64 65 66 67 68 69 70 0.6330275 -0.3669725 -0.3669725 -0.4166667 -0.3669725 0.6330275 -0.4848485 71 72 73 74 75 76 77 -0.3669725 0.6330275 0.5151515 -0.4848485 0.6330275 0.6330275 0.6330275 78 79 80 81 82 83 84 0.5151515 0.5833333 -0.3669725 -0.3669725 0.5151515 -0.3669725 -0.4166667 85 86 87 88 89 90 91 0.6330275 -0.3669725 0.6330275 0.5151515 -0.3669725 0.6330275 -0.3669725 92 93 94 95 96 97 98 -0.3669725 -0.3669725 -0.3669725 -0.3669725 0.6330275 -0.3669725 -0.3669725 99 100 101 102 103 104 105 -0.3669725 0.6330275 0.6330275 -0.3669725 -0.3669725 -0.3669725 -0.4848485 106 107 108 109 110 111 112 -0.3669725 -0.3669725 -0.4848485 -0.3669725 -0.3669725 -0.4848485 -0.3669725 113 114 115 116 117 118 119 -0.4848485 -0.4848485 -0.3669725 -0.3669725 0.6330275 -0.3669725 -0.3669725 120 121 122 123 124 125 126 0.6330275 -0.3669725 -0.3669725 -0.4848485 0.5151515 0.6330275 -0.3669725 127 128 129 130 131 132 133 -0.3669725 0.6330275 -0.3669725 0.6330275 -0.3669725 0.6330275 -0.4848485 134 135 136 137 138 139 140 -0.3669725 -0.3669725 -0.3669725 0.5151515 0.5151515 -0.3669725 -0.3669725 141 142 143 144 145 146 147 0.5833333 0.5151515 -0.3669725 0.6330275 -0.3669725 0.6330275 -0.4848485 148 149 150 151 152 153 154 -0.3669725 -0.3669725 0.6330275 0.6330275 -0.4166667 -0.4166667 -0.4848485 > postscript(file="/var/fisher/rcomp/tmp/6ae3q1356020865.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.6330275 NA 1 -0.3669725 0.6330275 2 -0.3669725 -0.3669725 3 -0.3669725 -0.3669725 4 -0.3669725 -0.3669725 5 0.6330275 -0.3669725 6 -0.3669725 0.6330275 7 -0.3669725 -0.3669725 8 0.6330275 -0.3669725 9 -0.3669725 0.6330275 10 -0.3669725 -0.3669725 11 -0.3669725 -0.3669725 12 -0.4848485 -0.3669725 13 -0.3669725 -0.4848485 14 0.5151515 -0.3669725 15 0.5151515 0.5151515 16 -0.4166667 0.5151515 17 -0.3669725 -0.4166667 18 0.6330275 -0.3669725 19 0.5833333 0.6330275 20 -0.3669725 0.5833333 21 0.5151515 -0.3669725 22 0.6330275 0.5151515 23 0.6330275 0.6330275 24 0.5151515 0.6330275 25 -0.4848485 0.5151515 26 0.6330275 -0.4848485 27 -0.4848485 0.6330275 28 0.6330275 -0.4848485 29 -0.3669725 0.6330275 30 -0.3669725 -0.3669725 31 -0.3669725 -0.3669725 32 -0.3669725 -0.3669725 33 0.6330275 -0.3669725 34 -0.3669725 0.6330275 35 -0.3669725 -0.3669725 36 -0.4848485 -0.3669725 37 0.5151515 -0.4848485 38 0.6330275 0.5151515 39 -0.3669725 0.6330275 40 0.5833333 -0.3669725 41 0.5151515 0.5833333 42 0.6330275 0.5151515 43 -0.3669725 0.6330275 44 -0.3669725 -0.3669725 45 0.6330275 -0.3669725 46 -0.3669725 0.6330275 47 0.6330275 -0.3669725 48 0.6330275 0.6330275 49 -0.3669725 0.6330275 50 -0.4848485 -0.3669725 51 -0.4166667 -0.4848485 52 0.6330275 -0.4166667 53 -0.4166667 0.6330275 54 -0.3669725 -0.4166667 55 0.5151515 -0.3669725 56 0.5151515 0.5151515 57 0.6330275 0.5151515 58 0.6330275 0.6330275 59 0.5833333 0.6330275 60 0.6330275 0.5833333 61 -0.4848485 0.6330275 62 -0.3669725 -0.4848485 63 0.6330275 -0.3669725 64 -0.3669725 0.6330275 65 -0.3669725 -0.3669725 66 -0.4166667 -0.3669725 67 -0.3669725 -0.4166667 68 0.6330275 -0.3669725 69 -0.4848485 0.6330275 70 -0.3669725 -0.4848485 71 0.6330275 -0.3669725 72 0.5151515 0.6330275 73 -0.4848485 0.5151515 74 0.6330275 -0.4848485 75 0.6330275 0.6330275 76 0.6330275 0.6330275 77 0.5151515 0.6330275 78 0.5833333 0.5151515 79 -0.3669725 0.5833333 80 -0.3669725 -0.3669725 81 0.5151515 -0.3669725 82 -0.3669725 0.5151515 83 -0.4166667 -0.3669725 84 0.6330275 -0.4166667 85 -0.3669725 0.6330275 86 0.6330275 -0.3669725 87 0.5151515 0.6330275 88 -0.3669725 0.5151515 89 0.6330275 -0.3669725 90 -0.3669725 0.6330275 91 -0.3669725 -0.3669725 92 -0.3669725 -0.3669725 93 -0.3669725 -0.3669725 94 -0.3669725 -0.3669725 95 0.6330275 -0.3669725 96 -0.3669725 0.6330275 97 -0.3669725 -0.3669725 98 -0.3669725 -0.3669725 99 0.6330275 -0.3669725 100 0.6330275 0.6330275 101 -0.3669725 0.6330275 102 -0.3669725 -0.3669725 103 -0.3669725 -0.3669725 104 -0.4848485 -0.3669725 105 -0.3669725 -0.4848485 106 -0.3669725 -0.3669725 107 -0.4848485 -0.3669725 108 -0.3669725 -0.4848485 109 -0.3669725 -0.3669725 110 -0.4848485 -0.3669725 111 -0.3669725 -0.4848485 112 -0.4848485 -0.3669725 113 -0.4848485 -0.4848485 114 -0.3669725 -0.4848485 115 -0.3669725 -0.3669725 116 0.6330275 -0.3669725 117 -0.3669725 0.6330275 118 -0.3669725 -0.3669725 119 0.6330275 -0.3669725 120 -0.3669725 0.6330275 121 -0.3669725 -0.3669725 122 -0.4848485 -0.3669725 123 0.5151515 -0.4848485 124 0.6330275 0.5151515 125 -0.3669725 0.6330275 126 -0.3669725 -0.3669725 127 0.6330275 -0.3669725 128 -0.3669725 0.6330275 129 0.6330275 -0.3669725 130 -0.3669725 0.6330275 131 0.6330275 -0.3669725 132 -0.4848485 0.6330275 133 -0.3669725 -0.4848485 134 -0.3669725 -0.3669725 135 -0.3669725 -0.3669725 136 0.5151515 -0.3669725 137 0.5151515 0.5151515 138 -0.3669725 0.5151515 139 -0.3669725 -0.3669725 140 0.5833333 -0.3669725 141 0.5151515 0.5833333 142 -0.3669725 0.5151515 143 0.6330275 -0.3669725 144 -0.3669725 0.6330275 145 0.6330275 -0.3669725 146 -0.4848485 0.6330275 147 -0.3669725 -0.4848485 148 -0.3669725 -0.3669725 149 0.6330275 -0.3669725 150 0.6330275 0.6330275 151 -0.4166667 0.6330275 152 -0.4166667 -0.4166667 153 -0.4848485 -0.4166667 154 NA -0.4848485 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.3669725 0.6330275 [2,] -0.3669725 -0.3669725 [3,] -0.3669725 -0.3669725 [4,] -0.3669725 -0.3669725 [5,] 0.6330275 -0.3669725 [6,] -0.3669725 0.6330275 [7,] -0.3669725 -0.3669725 [8,] 0.6330275 -0.3669725 [9,] -0.3669725 0.6330275 [10,] -0.3669725 -0.3669725 [11,] -0.3669725 -0.3669725 [12,] -0.4848485 -0.3669725 [13,] -0.3669725 -0.4848485 [14,] 0.5151515 -0.3669725 [15,] 0.5151515 0.5151515 [16,] -0.4166667 0.5151515 [17,] -0.3669725 -0.4166667 [18,] 0.6330275 -0.3669725 [19,] 0.5833333 0.6330275 [20,] -0.3669725 0.5833333 [21,] 0.5151515 -0.3669725 [22,] 0.6330275 0.5151515 [23,] 0.6330275 0.6330275 [24,] 0.5151515 0.6330275 [25,] -0.4848485 0.5151515 [26,] 0.6330275 -0.4848485 [27,] -0.4848485 0.6330275 [28,] 0.6330275 -0.4848485 [29,] -0.3669725 0.6330275 [30,] -0.3669725 -0.3669725 [31,] -0.3669725 -0.3669725 [32,] -0.3669725 -0.3669725 [33,] 0.6330275 -0.3669725 [34,] -0.3669725 0.6330275 [35,] -0.3669725 -0.3669725 [36,] -0.4848485 -0.3669725 [37,] 0.5151515 -0.4848485 [38,] 0.6330275 0.5151515 [39,] -0.3669725 0.6330275 [40,] 0.5833333 -0.3669725 [41,] 0.5151515 0.5833333 [42,] 0.6330275 0.5151515 [43,] -0.3669725 0.6330275 [44,] -0.3669725 -0.3669725 [45,] 0.6330275 -0.3669725 [46,] -0.3669725 0.6330275 [47,] 0.6330275 -0.3669725 [48,] 0.6330275 0.6330275 [49,] -0.3669725 0.6330275 [50,] -0.4848485 -0.3669725 [51,] -0.4166667 -0.4848485 [52,] 0.6330275 -0.4166667 [53,] -0.4166667 0.6330275 [54,] -0.3669725 -0.4166667 [55,] 0.5151515 -0.3669725 [56,] 0.5151515 0.5151515 [57,] 0.6330275 0.5151515 [58,] 0.6330275 0.6330275 [59,] 0.5833333 0.6330275 [60,] 0.6330275 0.5833333 [61,] -0.4848485 0.6330275 [62,] -0.3669725 -0.4848485 [63,] 0.6330275 -0.3669725 [64,] -0.3669725 0.6330275 [65,] -0.3669725 -0.3669725 [66,] -0.4166667 -0.3669725 [67,] -0.3669725 -0.4166667 [68,] 0.6330275 -0.3669725 [69,] -0.4848485 0.6330275 [70,] -0.3669725 -0.4848485 [71,] 0.6330275 -0.3669725 [72,] 0.5151515 0.6330275 [73,] -0.4848485 0.5151515 [74,] 0.6330275 -0.4848485 [75,] 0.6330275 0.6330275 [76,] 0.6330275 0.6330275 [77,] 0.5151515 0.6330275 [78,] 0.5833333 0.5151515 [79,] -0.3669725 0.5833333 [80,] -0.3669725 -0.3669725 [81,] 0.5151515 -0.3669725 [82,] -0.3669725 0.5151515 [83,] -0.4166667 -0.3669725 [84,] 0.6330275 -0.4166667 [85,] -0.3669725 0.6330275 [86,] 0.6330275 -0.3669725 [87,] 0.5151515 0.6330275 [88,] -0.3669725 0.5151515 [89,] 0.6330275 -0.3669725 [90,] -0.3669725 0.6330275 [91,] -0.3669725 -0.3669725 [92,] -0.3669725 -0.3669725 [93,] -0.3669725 -0.3669725 [94,] -0.3669725 -0.3669725 [95,] 0.6330275 -0.3669725 [96,] -0.3669725 0.6330275 [97,] -0.3669725 -0.3669725 [98,] -0.3669725 -0.3669725 [99,] 0.6330275 -0.3669725 [100,] 0.6330275 0.6330275 [101,] -0.3669725 0.6330275 [102,] -0.3669725 -0.3669725 [103,] -0.3669725 -0.3669725 [104,] -0.4848485 -0.3669725 [105,] -0.3669725 -0.4848485 [106,] -0.3669725 -0.3669725 [107,] -0.4848485 -0.3669725 [108,] -0.3669725 -0.4848485 [109,] -0.3669725 -0.3669725 [110,] -0.4848485 -0.3669725 [111,] -0.3669725 -0.4848485 [112,] -0.4848485 -0.3669725 [113,] -0.4848485 -0.4848485 [114,] -0.3669725 -0.4848485 [115,] -0.3669725 -0.3669725 [116,] 0.6330275 -0.3669725 [117,] -0.3669725 0.6330275 [118,] -0.3669725 -0.3669725 [119,] 0.6330275 -0.3669725 [120,] -0.3669725 0.6330275 [121,] -0.3669725 -0.3669725 [122,] -0.4848485 -0.3669725 [123,] 0.5151515 -0.4848485 [124,] 0.6330275 0.5151515 [125,] -0.3669725 0.6330275 [126,] -0.3669725 -0.3669725 [127,] 0.6330275 -0.3669725 [128,] -0.3669725 0.6330275 [129,] 0.6330275 -0.3669725 [130,] -0.3669725 0.6330275 [131,] 0.6330275 -0.3669725 [132,] -0.4848485 0.6330275 [133,] -0.3669725 -0.4848485 [134,] -0.3669725 -0.3669725 [135,] -0.3669725 -0.3669725 [136,] 0.5151515 -0.3669725 [137,] 0.5151515 0.5151515 [138,] -0.3669725 0.5151515 [139,] -0.3669725 -0.3669725 [140,] 0.5833333 -0.3669725 [141,] 0.5151515 0.5833333 [142,] -0.3669725 0.5151515 [143,] 0.6330275 -0.3669725 [144,] -0.3669725 0.6330275 [145,] 0.6330275 -0.3669725 [146,] -0.4848485 0.6330275 [147,] -0.3669725 -0.4848485 [148,] -0.3669725 -0.3669725 [149,] 0.6330275 -0.3669725 [150,] 0.6330275 0.6330275 [151,] -0.4166667 0.6330275 [152,] -0.4166667 -0.4166667 [153,] -0.4848485 -0.4166667 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.3669725 0.6330275 2 -0.3669725 -0.3669725 3 -0.3669725 -0.3669725 4 -0.3669725 -0.3669725 5 0.6330275 -0.3669725 6 -0.3669725 0.6330275 7 -0.3669725 -0.3669725 8 0.6330275 -0.3669725 9 -0.3669725 0.6330275 10 -0.3669725 -0.3669725 11 -0.3669725 -0.3669725 12 -0.4848485 -0.3669725 13 -0.3669725 -0.4848485 14 0.5151515 -0.3669725 15 0.5151515 0.5151515 16 -0.4166667 0.5151515 17 -0.3669725 -0.4166667 18 0.6330275 -0.3669725 19 0.5833333 0.6330275 20 -0.3669725 0.5833333 21 0.5151515 -0.3669725 22 0.6330275 0.5151515 23 0.6330275 0.6330275 24 0.5151515 0.6330275 25 -0.4848485 0.5151515 26 0.6330275 -0.4848485 27 -0.4848485 0.6330275 28 0.6330275 -0.4848485 29 -0.3669725 0.6330275 30 -0.3669725 -0.3669725 31 -0.3669725 -0.3669725 32 -0.3669725 -0.3669725 33 0.6330275 -0.3669725 34 -0.3669725 0.6330275 35 -0.3669725 -0.3669725 36 -0.4848485 -0.3669725 37 0.5151515 -0.4848485 38 0.6330275 0.5151515 39 -0.3669725 0.6330275 40 0.5833333 -0.3669725 41 0.5151515 0.5833333 42 0.6330275 0.5151515 43 -0.3669725 0.6330275 44 -0.3669725 -0.3669725 45 0.6330275 -0.3669725 46 -0.3669725 0.6330275 47 0.6330275 -0.3669725 48 0.6330275 0.6330275 49 -0.3669725 0.6330275 50 -0.4848485 -0.3669725 51 -0.4166667 -0.4848485 52 0.6330275 -0.4166667 53 -0.4166667 0.6330275 54 -0.3669725 -0.4166667 55 0.5151515 -0.3669725 56 0.5151515 0.5151515 57 0.6330275 0.5151515 58 0.6330275 0.6330275 59 0.5833333 0.6330275 60 0.6330275 0.5833333 61 -0.4848485 0.6330275 62 -0.3669725 -0.4848485 63 0.6330275 -0.3669725 64 -0.3669725 0.6330275 65 -0.3669725 -0.3669725 66 -0.4166667 -0.3669725 67 -0.3669725 -0.4166667 68 0.6330275 -0.3669725 69 -0.4848485 0.6330275 70 -0.3669725 -0.4848485 71 0.6330275 -0.3669725 72 0.5151515 0.6330275 73 -0.4848485 0.5151515 74 0.6330275 -0.4848485 75 0.6330275 0.6330275 76 0.6330275 0.6330275 77 0.5151515 0.6330275 78 0.5833333 0.5151515 79 -0.3669725 0.5833333 80 -0.3669725 -0.3669725 81 0.5151515 -0.3669725 82 -0.3669725 0.5151515 83 -0.4166667 -0.3669725 84 0.6330275 -0.4166667 85 -0.3669725 0.6330275 86 0.6330275 -0.3669725 87 0.5151515 0.6330275 88 -0.3669725 0.5151515 89 0.6330275 -0.3669725 90 -0.3669725 0.6330275 91 -0.3669725 -0.3669725 92 -0.3669725 -0.3669725 93 -0.3669725 -0.3669725 94 -0.3669725 -0.3669725 95 0.6330275 -0.3669725 96 -0.3669725 0.6330275 97 -0.3669725 -0.3669725 98 -0.3669725 -0.3669725 99 0.6330275 -0.3669725 100 0.6330275 0.6330275 101 -0.3669725 0.6330275 102 -0.3669725 -0.3669725 103 -0.3669725 -0.3669725 104 -0.4848485 -0.3669725 105 -0.3669725 -0.4848485 106 -0.3669725 -0.3669725 107 -0.4848485 -0.3669725 108 -0.3669725 -0.4848485 109 -0.3669725 -0.3669725 110 -0.4848485 -0.3669725 111 -0.3669725 -0.4848485 112 -0.4848485 -0.3669725 113 -0.4848485 -0.4848485 114 -0.3669725 -0.4848485 115 -0.3669725 -0.3669725 116 0.6330275 -0.3669725 117 -0.3669725 0.6330275 118 -0.3669725 -0.3669725 119 0.6330275 -0.3669725 120 -0.3669725 0.6330275 121 -0.3669725 -0.3669725 122 -0.4848485 -0.3669725 123 0.5151515 -0.4848485 124 0.6330275 0.5151515 125 -0.3669725 0.6330275 126 -0.3669725 -0.3669725 127 0.6330275 -0.3669725 128 -0.3669725 0.6330275 129 0.6330275 -0.3669725 130 -0.3669725 0.6330275 131 0.6330275 -0.3669725 132 -0.4848485 0.6330275 133 -0.3669725 -0.4848485 134 -0.3669725 -0.3669725 135 -0.3669725 -0.3669725 136 0.5151515 -0.3669725 137 0.5151515 0.5151515 138 -0.3669725 0.5151515 139 -0.3669725 -0.3669725 140 0.5833333 -0.3669725 141 0.5151515 0.5833333 142 -0.3669725 0.5151515 143 0.6330275 -0.3669725 144 -0.3669725 0.6330275 145 0.6330275 -0.3669725 146 -0.4848485 0.6330275 147 -0.3669725 -0.4848485 148 -0.3669725 -0.3669725 149 0.6330275 -0.3669725 150 0.6330275 0.6330275 151 -0.4166667 0.6330275 152 -0.4166667 -0.4166667 153 -0.4848485 -0.4166667 > 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/7os3j1356020865.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/8e72c1356020865.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/9xxxq1356020865.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/10q9qo1356020865.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/11op4q1356020865.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/12fqhv1356020865.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/13hl5k1356020865.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/14kn9i1356020865.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/153mr81356020865.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/16t1mv1356020865.tab") + } > > try(system("convert tmp/1niha1356020865.ps tmp/1niha1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/251bc1356020865.ps tmp/251bc1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/3fe8f1356020865.ps tmp/3fe8f1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/4ffej1356020865.ps tmp/4ffej1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/5zv9i1356020865.ps tmp/5zv9i1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/6ae3q1356020865.ps tmp/6ae3q1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/7os3j1356020865.ps tmp/7os3j1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/8e72c1356020865.ps tmp/8e72c1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/9xxxq1356020865.ps tmp/9xxxq1356020865.png",intern=TRUE)) character(0) > try(system("convert tmp/10q9qo1356020865.ps tmp/10q9qo1356020865.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.444 1.714 9.192