R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(2 + ,5 + ,1 + ,1 + ,4 + ,1 + ,1 + ,7 + ,1 + ,1 + ,7 + ,1 + ,2 + ,5 + ,1 + ,2 + ,5 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,2 + ,1 + ,6 + ,1 + ,2 + ,5 + ,1 + ,1 + ,1 + ,1 + ,2 + ,5 + ,1 + ,1 + ,4 + ,2 + ,2 + ,6 + ,1 + ,2 + ,7 + ,1 + ,2 + ,7 + ,1 + ,1 + ,2 + ,1 + ,1 + ,6 + ,1 + ,1 + ,3 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,1 + ,1 + ,5 + ,1 + ,2 + ,6 + ,1 + ,2 + ,4 + ,2 + ,2 + ,3 + ,2 + ,2 + ,4 + ,1 + ,2 + ,5 + ,2 + ,2 + ,6 + ,2 + ,1 + ,6 + ,2 + ,1 + ,4 + ,1 + ,2 + ,6 + ,1 + ,1 + ,6 + ,1 + ,2 + ,5 + ,1 + ,2 + ,6 + ,1 + ,2 + ,4 + ,1 + ,1 + ,6 + ,1 + ,2 + ,7 + ,1 + ,1 + ,5 + ,1 + ,1 + ,6 + ,1 + ,2 + ,6 + ,2 + ,1 + ,5 + ,2 + ,2 + ,7 + ,1 + ,2 + ,6 + ,1 + ,1 + ,3 + ,1 + ,1 + ,4 + ,1 + ,2 + ,5 + ,1 + ,2 + ,4 + ,2 + ,1 + ,3 + ,1 + ,2 + ,5 + ,1 + ,2 + ,5 + ,1 + ,1 + ,4 + ,1 + ,1 + ,5 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,2 + ,2 + ,3 + ,1 + ,1 + ,4 + ,1 + ,1 + ,3 + ,1 + ,1 + ,7 + ,1 + ,1 + ,2 + ,1 + ,1 + ,4 + ,1 + ,1 + ,2 + ,1 + ,2 + ,5 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,1 + ,1 + ,6 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,1 + ,1 + ,6 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,5 + ,1 + ,1 + ,6 + ,1 + ,1 + ,6 + ,1 + ,1 + ,7 + ,1 + ,1 + ,6 + ,1 + ,2 + ,6 + ,2 + ,1 + ,6 + ,1 + ,2 + ,3 + ,1 + ,2 + ,5 + ,1 + ,2 + ,6 + ,1 + ,2 + ,4 + ,1 + ,1 + ,5 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,1 + ,1 + ,3 + ,1 + ,2 + ,6 + ,1 + ,2 + ,5 + ,1 + ,1 + ,6 + ,1 + ,1 + ,4 + ,1 + ,2 + ,7 + ,1 + ,2 + ,5 + ,1 + ,2 + ,6 + ,1 + ,1 + ,6 + ,1 + ,2 + ,6 + ,1 + ,1 + ,7 + ,2 + ,2 + ,6 + ,1 + ,1 + ,6 + ,1 + ,1 + ,6 + ,1 + ,2 + ,6 + ,1 + ,2 + ,2 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,2 + ,6 + ,1 + ,1 + ,5 + ,1 + ,1 + ,6 + ,1 + ,1 + ,6 + ,1 + ,1 + ,2 + ,2 + ,2 + ,7 + ,1 + ,1 + ,1 + ,1 + ,1 + ,4 + ,1 + ,1 + ,1 + ,1 + ,1 + ,6 + ,1 + ,2 + ,6 + ,1 + ,1 + ,6 + ,1 + ,2 + ,7 + ,1 + ,1 + ,6 + ,1 + ,2 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,6 + ,1 + ,1 + ,5 + ,2 + ,2 + ,7 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,6 + ,1 + ,2 + ,7 + ,1 + ,2 + ,5 + ,1 + ,2 + ,6 + ,1 + ,1 + ,6 + ,2 + ,2 + ,6 + ,1 + ,2 + ,5 + ,1 + ,2 + ,7 + ,1 + ,2 + ,4 + ,1 + ,1 + ,6 + ,1 + ,1 + ,6 + ,1 + ,2 + ,7 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,1 + ,2 + ,5 + ,1 + ,1 + ,5 + ,1 + ,2 + ,5 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,2 + ,1 + ,7 + ,2 + ,1 + ,4 + ,1 + ,2 + ,6 + ,1 + ,2 + ,6 + ,1 + ,2 + ,7 + ,1 + ,1 + ,6 + ,1 + ,2 + ,7 + ,1 + ,2 + ,4 + ,2 + ,2 + ,6 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,7 + ,1 + ,1 + ,4 + ,1 + ,2 + ,7 + ,2) + ,dim=c(3 + ,157) + ,dimnames=list(c('Member' + ,'Provision' + ,'Illness') + ,1:157)) > y <- array(NA,dim=c(3,157),dimnames=list(c('Member','Provision','Illness'),1:157)) > 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' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Member Provision Illness 1 2 5 1 2 1 4 1 3 1 7 1 4 1 7 1 5 2 5 1 6 2 5 1 7 1 4 1 8 2 4 2 9 1 6 1 10 2 5 1 11 1 1 1 12 2 5 1 13 1 4 2 14 2 6 1 15 2 7 1 16 2 7 1 17 1 2 1 18 1 6 1 19 1 3 1 20 2 6 1 21 2 6 1 22 1 5 1 23 2 6 1 24 2 4 2 25 2 3 2 26 2 4 1 27 2 5 2 28 2 6 2 29 1 6 2 30 1 4 1 31 2 6 1 32 1 6 1 33 2 5 1 34 2 6 1 35 2 4 1 36 1 6 1 37 2 7 1 38 1 5 1 39 1 6 1 40 2 6 2 41 1 5 2 42 2 7 1 43 2 6 1 44 1 3 1 45 1 4 1 46 2 5 1 47 2 4 2 48 1 3 1 49 2 5 1 50 2 5 1 51 1 4 1 52 1 5 1 53 2 1 1 54 2 2 2 55 2 3 1 56 1 4 1 57 1 3 1 58 1 7 1 59 1 2 1 60 1 4 1 61 1 2 1 62 2 5 1 63 2 6 1 64 2 6 1 65 2 6 1 66 1 6 1 67 2 6 1 68 2 6 1 69 1 6 1 70 1 4 1 71 1 4 1 72 2 5 1 73 1 6 1 74 1 6 1 75 1 7 1 76 1 6 1 77 2 6 2 78 1 6 1 79 2 3 1 80 2 5 1 81 2 6 1 82 2 4 1 83 1 5 1 84 2 6 1 85 2 6 1 86 1 3 1 87 2 6 1 88 2 5 1 89 1 6 1 90 1 4 1 91 2 7 1 92 2 5 1 93 2 6 1 94 1 6 1 95 2 6 1 96 1 7 2 97 2 6 1 98 1 6 1 99 1 6 1 100 2 6 1 101 2 2 1 102 1 4 1 103 2 4 1 104 2 6 1 105 1 5 1 106 1 6 1 107 1 6 1 108 1 2 2 109 2 7 1 110 1 1 1 111 1 4 1 112 1 1 1 113 1 6 1 114 2 6 1 115 1 6 1 116 2 7 1 117 1 6 1 118 2 4 1 119 2 4 1 120 1 6 1 121 1 5 2 122 2 7 1 123 2 4 1 124 1 4 1 125 2 6 1 126 2 7 1 127 2 5 1 128 2 6 1 129 1 6 2 130 2 6 1 131 2 5 1 132 2 7 1 133 2 4 1 134 1 6 1 135 1 6 1 136 2 7 1 137 2 6 1 138 2 6 1 139 2 5 1 140 1 5 1 141 2 5 1 142 2 6 1 143 2 6 2 144 1 7 2 145 1 4 1 146 2 6 1 147 2 6 1 148 2 7 1 149 1 6 1 150 2 7 1 151 2 4 2 152 2 6 1 153 1 4 1 154 1 4 1 155 2 7 1 156 1 4 1 157 2 7 2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Provision Illness 1.08304 0.07626 0.06973 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.7563 -0.5341 0.3134 0.3897 0.7710 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.08304 0.20183 5.366 2.90e-07 *** Provision 0.07626 0.02732 2.791 0.00592 ** Illness 0.06973 0.11730 0.594 0.55308 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4893 on 154 degrees of freedom Multiple R-squared: 0.04934, Adjusted R-squared: 0.03699 F-statistic: 3.996 on 2 and 154 DF, p-value: 0.02033 > 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.8280744 0.34385122 0.17192561 [2,] 0.8526560 0.29468800 0.14734400 [3,] 0.7651587 0.46968252 0.23484126 [4,] 0.7076411 0.58471774 0.29235887 [5,] 0.7135330 0.57293406 0.28646703 [6,] 0.7309338 0.53813239 0.26906620 [7,] 0.7424694 0.51506111 0.25753055 [8,] 0.7928323 0.41433535 0.20716768 [9,] 0.7818814 0.43623714 0.21811857 [10,] 0.7502129 0.49957427 0.24978714 [11,] 0.7073576 0.58528471 0.29264236 [12,] 0.6556148 0.68877049 0.34438524 [13,] 0.6823362 0.63532760 0.31766380 [14,] 0.6375993 0.72480133 0.36240066 [15,] 0.6133435 0.77331297 0.38665649 [16,] 0.5841225 0.83175509 0.41587754 [17,] 0.5851587 0.82968268 0.41484134 [18,] 0.5571602 0.88567961 0.44283981 [19,] 0.5370721 0.92585574 0.46292787 [20,] 0.5190211 0.96195778 0.48097889 [21,] 0.5431300 0.91374008 0.45687004 [22,] 0.4905553 0.98111052 0.50944474 [23,] 0.4349284 0.86985678 0.56507161 [24,] 0.5653359 0.86932819 0.43466409 [25,] 0.5531190 0.89376192 0.44688096 [26,] 0.5288555 0.94228905 0.47114452 [27,] 0.5592319 0.88153614 0.44076807 [28,] 0.5545489 0.89090224 0.44545112 [29,] 0.5306012 0.93879767 0.46939884 [30,] 0.5401244 0.91975129 0.45987565 [31,] 0.5722365 0.85552701 0.42776350 [32,] 0.5374800 0.92504004 0.46252002 [33,] 0.5471985 0.90560293 0.45280147 [34,] 0.5731740 0.85365204 0.42682602 [35,] 0.5331244 0.93375119 0.46687559 [36,] 0.5788141 0.84237175 0.42118588 [37,] 0.5477551 0.90448974 0.45224487 [38,] 0.5271735 0.94565293 0.47282646 [39,] 0.5017593 0.99648141 0.49824071 [40,] 0.4890207 0.97804148 0.51097926 [41,] 0.4857092 0.97141837 0.51429081 [42,] 0.4758883 0.95177660 0.52411170 [43,] 0.4493416 0.89868328 0.55065836 [44,] 0.4459685 0.89193693 0.55403154 [45,] 0.4411827 0.88236543 0.55881728 [46,] 0.4309207 0.86184146 0.56907927 [47,] 0.4380986 0.87619728 0.56190136 [48,] 0.5236442 0.95271160 0.47635580 [49,] 0.5488754 0.90224916 0.45112458 [50,] 0.5748544 0.85029114 0.42514557 [51,] 0.5695994 0.86080121 0.43040061 [52,] 0.5509112 0.89817765 0.44908882 [53,] 0.5922911 0.81541771 0.40770885 [54,] 0.5633118 0.87337640 0.43668820 [55,] 0.5545273 0.89094539 0.44547270 [56,] 0.5235177 0.95296469 0.47648234 [57,] 0.5216515 0.95669696 0.47834848 [58,] 0.5055320 0.98893599 0.49446799 [59,] 0.4885761 0.97715214 0.51142393 [60,] 0.4709539 0.94190777 0.52904612 [61,] 0.4965037 0.99300732 0.50349634 [62,] 0.4791859 0.95837186 0.52081407 [63,] 0.4613878 0.92277562 0.53861219 [64,] 0.4872641 0.97452826 0.51273587 [65,] 0.4794457 0.95889135 0.52055432 [66,] 0.4717180 0.94343605 0.52828197 [67,] 0.4679669 0.93593373 0.53203314 [68,] 0.4932102 0.98642031 0.50678985 [69,] 0.5181442 0.96371155 0.48185577 [70,] 0.5626903 0.87461941 0.43730970 [71,] 0.5877538 0.82449245 0.41224623 [72,] 0.5732862 0.85342755 0.42671377 [73,] 0.5997889 0.80042220 0.40021110 [74,] 0.6301079 0.73978410 0.36989205 [75,] 0.6276564 0.74468723 0.37234362 [76,] 0.6121463 0.77570744 0.38785372 [77,] 0.6248818 0.75023645 0.37511823 [78,] 0.6336489 0.73270229 0.36635115 [79,] 0.6174961 0.76500784 0.38250392 [80,] 0.6007477 0.79850454 0.39925227 [81,] 0.5810566 0.83788675 0.41894337 [82,] 0.5634562 0.87308765 0.43654383 [83,] 0.5591948 0.88161036 0.44080518 [84,] 0.5881759 0.82364823 0.41182412 [85,] 0.5823268 0.83534645 0.41767323 [86,] 0.5532093 0.89358137 0.44679069 [87,] 0.5480055 0.90398895 0.45199448 [88,] 0.5290754 0.94184927 0.47092463 [89,] 0.5596168 0.88076643 0.44038321 [90,] 0.5401747 0.91965059 0.45982530 [91,] 0.5876648 0.82467030 0.41233515 [92,] 0.5682280 0.86354401 0.43177201 [93,] 0.5987526 0.80249479 0.40124739 [94,] 0.6313487 0.73730259 0.36865130 [95,] 0.6108973 0.77820534 0.38910267 [96,] 0.6724416 0.65511674 0.32755837 [97,] 0.6642112 0.67157757 0.33578879 [98,] 0.6799597 0.64008061 0.32004030 [99,] 0.6605783 0.67884334 0.33942167 [100,] 0.6702194 0.65956121 0.32978061 [101,] 0.7057861 0.58842780 0.29421390 [102,] 0.7435681 0.51286389 0.25643195 [103,] 0.7159819 0.56803613 0.28401806 [104,] 0.6827658 0.63446849 0.31723425 [105,] 0.6404067 0.71918653 0.35959327 [106,] 0.6341225 0.73175493 0.36587746 [107,] 0.5904494 0.81910111 0.40955056 [108,] 0.6387937 0.72241259 0.36120630 [109,] 0.6109630 0.77807398 0.38903699 [110,] 0.6637837 0.67243265 0.33621632 [111,] 0.6240741 0.75185171 0.37592586 [112,] 0.6829993 0.63400141 0.31700071 [113,] 0.6908481 0.61830381 0.30915190 [114,] 0.7061685 0.58766292 0.29383146 [115,] 0.7670412 0.46591768 0.23295884 [116,] 0.7638831 0.47223374 0.23611687 [117,] 0.7240241 0.55195187 0.27597593 [118,] 0.7442985 0.51140292 0.25570146 [119,] 0.7350246 0.52995072 0.26497536 [120,] 0.7022383 0.59552340 0.29776170 [121,] 0.6550773 0.68984550 0.34492275 [122,] 0.6425322 0.71493561 0.35746780 [123,] 0.6059358 0.78812838 0.39406419 [124,] 0.6603764 0.67924711 0.33962355 [125,] 0.6242801 0.75143971 0.37571986 [126,] 0.6175854 0.76482928 0.38241464 [127,] 0.5628422 0.87431559 0.43715779 [128,] 0.6167735 0.76645299 0.38322649 [129,] 0.6801791 0.63964183 0.31982092 [130,] 0.7582088 0.48358230 0.24179115 [131,] 0.7011443 0.59771148 0.29885574 [132,] 0.6572103 0.68557937 0.34278968 [133,] 0.6124402 0.77511962 0.38755981 [134,] 0.6217430 0.75651409 0.37825704 [135,] 0.6248561 0.75028785 0.37514393 [136,] 0.6369459 0.72610828 0.36305414 [137,] 0.5973126 0.80537482 0.40268741 [138,] 0.5407381 0.91852388 0.45926194 [139,] 0.8991684 0.20166324 0.10083162 [140,] 0.8530379 0.29392424 0.14696212 [141,] 0.8286905 0.34261904 0.17130952 [142,] 0.8133395 0.37332094 0.18666047 [143,] 0.7355033 0.52899333 0.26449667 [144,] 0.8468311 0.30633782 0.15316891 [145,] 0.7396653 0.52066934 0.26033467 [146,] 0.9581563 0.08368734 0.04184367 > postscript(file="/var/www/html/rcomp/tmp/1bzbn1291283830.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/www/html/rcomp/tmp/2bzbn1291283830.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/www/html/rcomp/tmp/34qaq1291283830.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/www/html/rcomp/tmp/44qaq1291283830.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/www/html/rcomp/tmp/54qaq1291283830.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 = 157 Frequency = 1 1 2 3 4 5 6 7 0.4659148 -0.4578212 -0.6866130 -0.6866130 0.4659148 0.4659148 -0.4578212 8 9 10 11 12 13 14 0.4724507 -0.6103491 0.4659148 -0.2290295 0.4659148 -0.5275493 0.3896509 15 16 17 18 19 20 21 0.3133870 0.3133870 -0.3052934 -0.6103491 -0.3815573 0.3896509 0.3896509 22 23 24 25 26 27 28 -0.5340852 0.3896509 0.4724507 0.5487146 0.5421788 0.3961868 0.3199229 29 30 31 32 33 34 35 -0.6800771 -0.4578212 0.3896509 -0.6103491 0.4659148 0.3896509 0.5421788 36 37 38 39 40 41 42 -0.6103491 0.3133870 -0.5340852 -0.6103491 0.3199229 -0.6038132 0.3133870 43 44 45 46 47 48 49 0.3896509 -0.3815573 -0.4578212 0.4659148 0.4724507 -0.3815573 0.4659148 50 51 52 53 54 55 56 0.4659148 -0.4578212 -0.5340852 0.7709705 0.6249785 0.6184427 -0.4578212 57 58 59 60 61 62 63 -0.3815573 -0.6866130 -0.3052934 -0.4578212 -0.3052934 0.4659148 0.3896509 64 65 66 67 68 69 70 0.3896509 0.3896509 -0.6103491 0.3896509 0.3896509 -0.6103491 -0.4578212 71 72 73 74 75 76 77 -0.4578212 0.4659148 -0.6103491 -0.6103491 -0.6866130 -0.6103491 0.3199229 78 79 80 81 82 83 84 -0.6103491 0.6184427 0.4659148 0.3896509 0.5421788 -0.5340852 0.3896509 85 86 87 88 89 90 91 0.3896509 -0.3815573 0.3896509 0.4659148 -0.6103491 -0.4578212 0.3133870 92 93 94 95 96 97 98 0.4659148 0.3896509 -0.6103491 0.3896509 -0.7563410 0.3896509 -0.6103491 99 100 101 102 103 104 105 -0.6103491 0.3896509 0.6947066 -0.4578212 0.5421788 0.3896509 -0.5340852 106 107 108 109 110 111 112 -0.6103491 -0.6103491 -0.3750215 0.3133870 -0.2290295 -0.4578212 -0.2290295 113 114 115 116 117 118 119 -0.6103491 0.3896509 -0.6103491 0.3133870 -0.6103491 0.5421788 0.5421788 120 121 122 123 124 125 126 -0.6103491 -0.6038132 0.3133870 0.5421788 -0.4578212 0.3896509 0.3133870 127 128 129 130 131 132 133 0.4659148 0.3896509 -0.6800771 0.3896509 0.4659148 0.3133870 0.5421788 134 135 136 137 138 139 140 -0.6103491 -0.6103491 0.3133870 0.3896509 0.3896509 0.4659148 -0.5340852 141 142 143 144 145 146 147 0.4659148 0.3896509 0.3199229 -0.7563410 -0.4578212 0.3896509 0.3896509 148 149 150 151 152 153 154 0.3133870 -0.6103491 0.3133870 0.4724507 0.3896509 -0.4578212 -0.4578212 155 156 157 0.3133870 -0.4578212 0.2436590 > postscript(file="/var/www/html/rcomp/tmp/6wz9t1291283830.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 = 157 Frequency = 1 lag(myerror, k = 1) myerror 0 0.4659148 NA 1 -0.4578212 0.4659148 2 -0.6866130 -0.4578212 3 -0.6866130 -0.6866130 4 0.4659148 -0.6866130 5 0.4659148 0.4659148 6 -0.4578212 0.4659148 7 0.4724507 -0.4578212 8 -0.6103491 0.4724507 9 0.4659148 -0.6103491 10 -0.2290295 0.4659148 11 0.4659148 -0.2290295 12 -0.5275493 0.4659148 13 0.3896509 -0.5275493 14 0.3133870 0.3896509 15 0.3133870 0.3133870 16 -0.3052934 0.3133870 17 -0.6103491 -0.3052934 18 -0.3815573 -0.6103491 19 0.3896509 -0.3815573 20 0.3896509 0.3896509 21 -0.5340852 0.3896509 22 0.3896509 -0.5340852 23 0.4724507 0.3896509 24 0.5487146 0.4724507 25 0.5421788 0.5487146 26 0.3961868 0.5421788 27 0.3199229 0.3961868 28 -0.6800771 0.3199229 29 -0.4578212 -0.6800771 30 0.3896509 -0.4578212 31 -0.6103491 0.3896509 32 0.4659148 -0.6103491 33 0.3896509 0.4659148 34 0.5421788 0.3896509 35 -0.6103491 0.5421788 36 0.3133870 -0.6103491 37 -0.5340852 0.3133870 38 -0.6103491 -0.5340852 39 0.3199229 -0.6103491 40 -0.6038132 0.3199229 41 0.3133870 -0.6038132 42 0.3896509 0.3133870 43 -0.3815573 0.3896509 44 -0.4578212 -0.3815573 45 0.4659148 -0.4578212 46 0.4724507 0.4659148 47 -0.3815573 0.4724507 48 0.4659148 -0.3815573 49 0.4659148 0.4659148 50 -0.4578212 0.4659148 51 -0.5340852 -0.4578212 52 0.7709705 -0.5340852 53 0.6249785 0.7709705 54 0.6184427 0.6249785 55 -0.4578212 0.6184427 56 -0.3815573 -0.4578212 57 -0.6866130 -0.3815573 58 -0.3052934 -0.6866130 59 -0.4578212 -0.3052934 60 -0.3052934 -0.4578212 61 0.4659148 -0.3052934 62 0.3896509 0.4659148 63 0.3896509 0.3896509 64 0.3896509 0.3896509 65 -0.6103491 0.3896509 66 0.3896509 -0.6103491 67 0.3896509 0.3896509 68 -0.6103491 0.3896509 69 -0.4578212 -0.6103491 70 -0.4578212 -0.4578212 71 0.4659148 -0.4578212 72 -0.6103491 0.4659148 73 -0.6103491 -0.6103491 74 -0.6866130 -0.6103491 75 -0.6103491 -0.6866130 76 0.3199229 -0.6103491 77 -0.6103491 0.3199229 78 0.6184427 -0.6103491 79 0.4659148 0.6184427 80 0.3896509 0.4659148 81 0.5421788 0.3896509 82 -0.5340852 0.5421788 83 0.3896509 -0.5340852 84 0.3896509 0.3896509 85 -0.3815573 0.3896509 86 0.3896509 -0.3815573 87 0.4659148 0.3896509 88 -0.6103491 0.4659148 89 -0.4578212 -0.6103491 90 0.3133870 -0.4578212 91 0.4659148 0.3133870 92 0.3896509 0.4659148 93 -0.6103491 0.3896509 94 0.3896509 -0.6103491 95 -0.7563410 0.3896509 96 0.3896509 -0.7563410 97 -0.6103491 0.3896509 98 -0.6103491 -0.6103491 99 0.3896509 -0.6103491 100 0.6947066 0.3896509 101 -0.4578212 0.6947066 102 0.5421788 -0.4578212 103 0.3896509 0.5421788 104 -0.5340852 0.3896509 105 -0.6103491 -0.5340852 106 -0.6103491 -0.6103491 107 -0.3750215 -0.6103491 108 0.3133870 -0.3750215 109 -0.2290295 0.3133870 110 -0.4578212 -0.2290295 111 -0.2290295 -0.4578212 112 -0.6103491 -0.2290295 113 0.3896509 -0.6103491 114 -0.6103491 0.3896509 115 0.3133870 -0.6103491 116 -0.6103491 0.3133870 117 0.5421788 -0.6103491 118 0.5421788 0.5421788 119 -0.6103491 0.5421788 120 -0.6038132 -0.6103491 121 0.3133870 -0.6038132 122 0.5421788 0.3133870 123 -0.4578212 0.5421788 124 0.3896509 -0.4578212 125 0.3133870 0.3896509 126 0.4659148 0.3133870 127 0.3896509 0.4659148 128 -0.6800771 0.3896509 129 0.3896509 -0.6800771 130 0.4659148 0.3896509 131 0.3133870 0.4659148 132 0.5421788 0.3133870 133 -0.6103491 0.5421788 134 -0.6103491 -0.6103491 135 0.3133870 -0.6103491 136 0.3896509 0.3133870 137 0.3896509 0.3896509 138 0.4659148 0.3896509 139 -0.5340852 0.4659148 140 0.4659148 -0.5340852 141 0.3896509 0.4659148 142 0.3199229 0.3896509 143 -0.7563410 0.3199229 144 -0.4578212 -0.7563410 145 0.3896509 -0.4578212 146 0.3896509 0.3896509 147 0.3133870 0.3896509 148 -0.6103491 0.3133870 149 0.3133870 -0.6103491 150 0.4724507 0.3133870 151 0.3896509 0.4724507 152 -0.4578212 0.3896509 153 -0.4578212 -0.4578212 154 0.3133870 -0.4578212 155 -0.4578212 0.3133870 156 0.2436590 -0.4578212 157 NA 0.2436590 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.4578212 0.4659148 [2,] -0.6866130 -0.4578212 [3,] -0.6866130 -0.6866130 [4,] 0.4659148 -0.6866130 [5,] 0.4659148 0.4659148 [6,] -0.4578212 0.4659148 [7,] 0.4724507 -0.4578212 [8,] -0.6103491 0.4724507 [9,] 0.4659148 -0.6103491 [10,] -0.2290295 0.4659148 [11,] 0.4659148 -0.2290295 [12,] -0.5275493 0.4659148 [13,] 0.3896509 -0.5275493 [14,] 0.3133870 0.3896509 [15,] 0.3133870 0.3133870 [16,] -0.3052934 0.3133870 [17,] -0.6103491 -0.3052934 [18,] -0.3815573 -0.6103491 [19,] 0.3896509 -0.3815573 [20,] 0.3896509 0.3896509 [21,] -0.5340852 0.3896509 [22,] 0.3896509 -0.5340852 [23,] 0.4724507 0.3896509 [24,] 0.5487146 0.4724507 [25,] 0.5421788 0.5487146 [26,] 0.3961868 0.5421788 [27,] 0.3199229 0.3961868 [28,] -0.6800771 0.3199229 [29,] -0.4578212 -0.6800771 [30,] 0.3896509 -0.4578212 [31,] -0.6103491 0.3896509 [32,] 0.4659148 -0.6103491 [33,] 0.3896509 0.4659148 [34,] 0.5421788 0.3896509 [35,] -0.6103491 0.5421788 [36,] 0.3133870 -0.6103491 [37,] -0.5340852 0.3133870 [38,] -0.6103491 -0.5340852 [39,] 0.3199229 -0.6103491 [40,] -0.6038132 0.3199229 [41,] 0.3133870 -0.6038132 [42,] 0.3896509 0.3133870 [43,] -0.3815573 0.3896509 [44,] -0.4578212 -0.3815573 [45,] 0.4659148 -0.4578212 [46,] 0.4724507 0.4659148 [47,] -0.3815573 0.4724507 [48,] 0.4659148 -0.3815573 [49,] 0.4659148 0.4659148 [50,] -0.4578212 0.4659148 [51,] -0.5340852 -0.4578212 [52,] 0.7709705 -0.5340852 [53,] 0.6249785 0.7709705 [54,] 0.6184427 0.6249785 [55,] -0.4578212 0.6184427 [56,] -0.3815573 -0.4578212 [57,] -0.6866130 -0.3815573 [58,] -0.3052934 -0.6866130 [59,] -0.4578212 -0.3052934 [60,] -0.3052934 -0.4578212 [61,] 0.4659148 -0.3052934 [62,] 0.3896509 0.4659148 [63,] 0.3896509 0.3896509 [64,] 0.3896509 0.3896509 [65,] -0.6103491 0.3896509 [66,] 0.3896509 -0.6103491 [67,] 0.3896509 0.3896509 [68,] -0.6103491 0.3896509 [69,] -0.4578212 -0.6103491 [70,] -0.4578212 -0.4578212 [71,] 0.4659148 -0.4578212 [72,] -0.6103491 0.4659148 [73,] -0.6103491 -0.6103491 [74,] -0.6866130 -0.6103491 [75,] -0.6103491 -0.6866130 [76,] 0.3199229 -0.6103491 [77,] -0.6103491 0.3199229 [78,] 0.6184427 -0.6103491 [79,] 0.4659148 0.6184427 [80,] 0.3896509 0.4659148 [81,] 0.5421788 0.3896509 [82,] -0.5340852 0.5421788 [83,] 0.3896509 -0.5340852 [84,] 0.3896509 0.3896509 [85,] -0.3815573 0.3896509 [86,] 0.3896509 -0.3815573 [87,] 0.4659148 0.3896509 [88,] -0.6103491 0.4659148 [89,] -0.4578212 -0.6103491 [90,] 0.3133870 -0.4578212 [91,] 0.4659148 0.3133870 [92,] 0.3896509 0.4659148 [93,] -0.6103491 0.3896509 [94,] 0.3896509 -0.6103491 [95,] -0.7563410 0.3896509 [96,] 0.3896509 -0.7563410 [97,] -0.6103491 0.3896509 [98,] -0.6103491 -0.6103491 [99,] 0.3896509 -0.6103491 [100,] 0.6947066 0.3896509 [101,] -0.4578212 0.6947066 [102,] 0.5421788 -0.4578212 [103,] 0.3896509 0.5421788 [104,] -0.5340852 0.3896509 [105,] -0.6103491 -0.5340852 [106,] -0.6103491 -0.6103491 [107,] -0.3750215 -0.6103491 [108,] 0.3133870 -0.3750215 [109,] -0.2290295 0.3133870 [110,] -0.4578212 -0.2290295 [111,] -0.2290295 -0.4578212 [112,] -0.6103491 -0.2290295 [113,] 0.3896509 -0.6103491 [114,] -0.6103491 0.3896509 [115,] 0.3133870 -0.6103491 [116,] -0.6103491 0.3133870 [117,] 0.5421788 -0.6103491 [118,] 0.5421788 0.5421788 [119,] -0.6103491 0.5421788 [120,] -0.6038132 -0.6103491 [121,] 0.3133870 -0.6038132 [122,] 0.5421788 0.3133870 [123,] -0.4578212 0.5421788 [124,] 0.3896509 -0.4578212 [125,] 0.3133870 0.3896509 [126,] 0.4659148 0.3133870 [127,] 0.3896509 0.4659148 [128,] -0.6800771 0.3896509 [129,] 0.3896509 -0.6800771 [130,] 0.4659148 0.3896509 [131,] 0.3133870 0.4659148 [132,] 0.5421788 0.3133870 [133,] -0.6103491 0.5421788 [134,] -0.6103491 -0.6103491 [135,] 0.3133870 -0.6103491 [136,] 0.3896509 0.3133870 [137,] 0.3896509 0.3896509 [138,] 0.4659148 0.3896509 [139,] -0.5340852 0.4659148 [140,] 0.4659148 -0.5340852 [141,] 0.3896509 0.4659148 [142,] 0.3199229 0.3896509 [143,] -0.7563410 0.3199229 [144,] -0.4578212 -0.7563410 [145,] 0.3896509 -0.4578212 [146,] 0.3896509 0.3896509 [147,] 0.3133870 0.3896509 [148,] -0.6103491 0.3133870 [149,] 0.3133870 -0.6103491 [150,] 0.4724507 0.3133870 [151,] 0.3896509 0.4724507 [152,] -0.4578212 0.3896509 [153,] -0.4578212 -0.4578212 [154,] 0.3133870 -0.4578212 [155,] -0.4578212 0.3133870 [156,] 0.2436590 -0.4578212 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.4578212 0.4659148 2 -0.6866130 -0.4578212 3 -0.6866130 -0.6866130 4 0.4659148 -0.6866130 5 0.4659148 0.4659148 6 -0.4578212 0.4659148 7 0.4724507 -0.4578212 8 -0.6103491 0.4724507 9 0.4659148 -0.6103491 10 -0.2290295 0.4659148 11 0.4659148 -0.2290295 12 -0.5275493 0.4659148 13 0.3896509 -0.5275493 14 0.3133870 0.3896509 15 0.3133870 0.3133870 16 -0.3052934 0.3133870 17 -0.6103491 -0.3052934 18 -0.3815573 -0.6103491 19 0.3896509 -0.3815573 20 0.3896509 0.3896509 21 -0.5340852 0.3896509 22 0.3896509 -0.5340852 23 0.4724507 0.3896509 24 0.5487146 0.4724507 25 0.5421788 0.5487146 26 0.3961868 0.5421788 27 0.3199229 0.3961868 28 -0.6800771 0.3199229 29 -0.4578212 -0.6800771 30 0.3896509 -0.4578212 31 -0.6103491 0.3896509 32 0.4659148 -0.6103491 33 0.3896509 0.4659148 34 0.5421788 0.3896509 35 -0.6103491 0.5421788 36 0.3133870 -0.6103491 37 -0.5340852 0.3133870 38 -0.6103491 -0.5340852 39 0.3199229 -0.6103491 40 -0.6038132 0.3199229 41 0.3133870 -0.6038132 42 0.3896509 0.3133870 43 -0.3815573 0.3896509 44 -0.4578212 -0.3815573 45 0.4659148 -0.4578212 46 0.4724507 0.4659148 47 -0.3815573 0.4724507 48 0.4659148 -0.3815573 49 0.4659148 0.4659148 50 -0.4578212 0.4659148 51 -0.5340852 -0.4578212 52 0.7709705 -0.5340852 53 0.6249785 0.7709705 54 0.6184427 0.6249785 55 -0.4578212 0.6184427 56 -0.3815573 -0.4578212 57 -0.6866130 -0.3815573 58 -0.3052934 -0.6866130 59 -0.4578212 -0.3052934 60 -0.3052934 -0.4578212 61 0.4659148 -0.3052934 62 0.3896509 0.4659148 63 0.3896509 0.3896509 64 0.3896509 0.3896509 65 -0.6103491 0.3896509 66 0.3896509 -0.6103491 67 0.3896509 0.3896509 68 -0.6103491 0.3896509 69 -0.4578212 -0.6103491 70 -0.4578212 -0.4578212 71 0.4659148 -0.4578212 72 -0.6103491 0.4659148 73 -0.6103491 -0.6103491 74 -0.6866130 -0.6103491 75 -0.6103491 -0.6866130 76 0.3199229 -0.6103491 77 -0.6103491 0.3199229 78 0.6184427 -0.6103491 79 0.4659148 0.6184427 80 0.3896509 0.4659148 81 0.5421788 0.3896509 82 -0.5340852 0.5421788 83 0.3896509 -0.5340852 84 0.3896509 0.3896509 85 -0.3815573 0.3896509 86 0.3896509 -0.3815573 87 0.4659148 0.3896509 88 -0.6103491 0.4659148 89 -0.4578212 -0.6103491 90 0.3133870 -0.4578212 91 0.4659148 0.3133870 92 0.3896509 0.4659148 93 -0.6103491 0.3896509 94 0.3896509 -0.6103491 95 -0.7563410 0.3896509 96 0.3896509 -0.7563410 97 -0.6103491 0.3896509 98 -0.6103491 -0.6103491 99 0.3896509 -0.6103491 100 0.6947066 0.3896509 101 -0.4578212 0.6947066 102 0.5421788 -0.4578212 103 0.3896509 0.5421788 104 -0.5340852 0.3896509 105 -0.6103491 -0.5340852 106 -0.6103491 -0.6103491 107 -0.3750215 -0.6103491 108 0.3133870 -0.3750215 109 -0.2290295 0.3133870 110 -0.4578212 -0.2290295 111 -0.2290295 -0.4578212 112 -0.6103491 -0.2290295 113 0.3896509 -0.6103491 114 -0.6103491 0.3896509 115 0.3133870 -0.6103491 116 -0.6103491 0.3133870 117 0.5421788 -0.6103491 118 0.5421788 0.5421788 119 -0.6103491 0.5421788 120 -0.6038132 -0.6103491 121 0.3133870 -0.6038132 122 0.5421788 0.3133870 123 -0.4578212 0.5421788 124 0.3896509 -0.4578212 125 0.3133870 0.3896509 126 0.4659148 0.3133870 127 0.3896509 0.4659148 128 -0.6800771 0.3896509 129 0.3896509 -0.6800771 130 0.4659148 0.3896509 131 0.3133870 0.4659148 132 0.5421788 0.3133870 133 -0.6103491 0.5421788 134 -0.6103491 -0.6103491 135 0.3133870 -0.6103491 136 0.3896509 0.3133870 137 0.3896509 0.3896509 138 0.4659148 0.3896509 139 -0.5340852 0.4659148 140 0.4659148 -0.5340852 141 0.3896509 0.4659148 142 0.3199229 0.3896509 143 -0.7563410 0.3199229 144 -0.4578212 -0.7563410 145 0.3896509 -0.4578212 146 0.3896509 0.3896509 147 0.3133870 0.3896509 148 -0.6103491 0.3133870 149 0.3133870 -0.6103491 150 0.4724507 0.3133870 151 0.3896509 0.4724507 152 -0.4578212 0.3896509 153 -0.4578212 -0.4578212 154 0.3133870 -0.4578212 155 -0.4578212 0.3133870 156 0.2436590 -0.4578212 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7wz9t1291283830.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/www/html/rcomp/tmp/8prrw1291283830.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/www/html/rcomp/tmp/9prrw1291283830.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/www/html/rcomp/tmp/10prrw1291283830.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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11l1o51291283830.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12p1ns1291283830.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/133b2j1291283830.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/146t1p1291283830.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/159czd1291283830.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16dcgj1291283830.tab") + } > > try(system("convert tmp/1bzbn1291283830.ps tmp/1bzbn1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/2bzbn1291283830.ps tmp/2bzbn1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/34qaq1291283830.ps tmp/34qaq1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/44qaq1291283830.ps tmp/44qaq1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/54qaq1291283830.ps tmp/54qaq1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/6wz9t1291283830.ps tmp/6wz9t1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/7wz9t1291283830.ps tmp/7wz9t1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/8prrw1291283830.ps tmp/8prrw1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/9prrw1291283830.ps tmp/9prrw1291283830.png",intern=TRUE)) character(0) > try(system("convert tmp/10prrw1291283830.ps tmp/10prrw1291283830.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.817 1.749 8.858