R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(41 + ,14 + ,39 + ,18 + ,30 + ,11 + ,31 + ,12 + ,34 + ,16 + ,35 + ,18 + ,39 + ,14 + ,34 + ,14 + ,36 + ,15 + ,37 + ,15 + ,38 + ,17 + ,36 + ,19 + ,38 + ,10 + ,39 + ,16 + ,33 + ,18 + ,32 + ,14 + ,36 + ,14 + ,38 + ,17 + ,39 + ,14 + ,32 + ,16 + ,32 + ,18 + ,31 + ,11 + ,39 + ,14 + ,37 + ,12 + ,39 + ,17 + ,41 + ,9 + ,36 + ,16 + ,33 + ,14 + ,33 + ,15 + ,34 + ,11 + ,31 + ,16 + ,27 + ,13 + ,37 + ,17 + ,34 + ,15 + ,34 + ,14 + ,32 + ,16 + ,29 + ,9 + ,36 + ,15 + ,29 + ,17 + ,35 + ,13 + ,37 + ,15 + ,34 + ,16 + ,38 + ,16 + ,35 + ,12 + ,38 + ,12 + ,37 + ,11 + ,38 + ,15 + ,33 + ,15 + ,36 + ,17 + ,38 + ,13 + ,32 + ,16 + ,32 + ,14 + ,32 + ,11 + ,34 + ,12 + ,32 + ,12 + ,37 + ,15 + ,39 + ,16 + ,29 + ,15 + ,37 + ,12 + ,35 + ,12 + ,30 + ,8 + ,38 + ,13 + ,34 + ,11 + ,31 + ,14 + ,34 + ,15 + ,35 + ,10 + ,36 + ,11 + ,30 + ,12 + ,39 + ,15 + ,35 + ,15 + ,38 + ,14 + ,31 + ,16 + ,34 + ,15 + ,38 + ,15 + ,34 + ,13 + ,39 + ,12 + ,37 + ,17 + ,34 + ,13 + ,28 + ,15 + ,37 + ,13 + ,33 + ,15 + ,37 + ,16 + ,35 + ,15 + ,37 + ,16 + ,32 + ,15 + ,33 + ,14 + ,38 + ,15 + ,33 + ,14 + ,29 + ,13 + ,33 + ,7 + ,31 + ,17 + ,36 + ,13 + ,35 + ,15 + ,32 + ,14 + ,29 + ,13 + ,39 + ,16 + ,37 + ,12 + ,35 + ,14 + ,37 + ,17 + ,32 + ,15 + ,38 + ,17 + ,37 + ,12 + ,36 + ,16 + ,32 + ,11 + ,33 + ,15 + ,40 + ,9 + ,38 + ,16 + ,41 + ,15 + ,36 + ,10 + ,43 + ,10 + ,30 + ,15 + ,31 + ,11 + ,32 + ,13 + ,32 + ,14 + ,37 + ,18 + ,37 + ,16 + ,33 + ,14 + ,34 + ,14 + ,33 + ,14 + ,38 + ,14 + ,33 + ,12 + ,31 + ,14 + ,38 + ,15 + ,37 + ,15 + ,33 + ,15 + ,31 + ,13 + ,39 + ,17 + ,44 + ,17 + ,33 + ,19 + ,35 + ,15 + ,32 + ,13 + ,28 + ,9 + ,40 + ,15 + ,27 + ,15 + ,37 + ,15 + ,32 + ,16 + ,28 + ,11 + ,34 + ,14 + ,30 + ,11 + ,35 + ,15 + ,31 + ,13 + ,32 + ,15 + ,30 + ,16 + ,30 + ,14 + ,31 + ,15 + ,40 + ,16 + ,32 + ,16 + ,36 + ,11 + ,32 + ,12 + ,35 + ,9 + ,38 + ,16 + ,42 + ,13 + ,34 + ,16 + ,35 + ,12 + ,35 + ,9 + ,33 + ,13 + ,36 + ,13 + ,32 + ,14 + ,33 + ,19 + ,34 + ,13 + ,32 + ,12 + ,34 + ,13) + ,dim=c(2 + ,162) + ,dimnames=list(c('Connected' + ,'Happiness') + ,1:162)) > y <- array(NA,dim=c(2,162),dimnames=list(c('Connected','Happiness'),1:162)) > 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 = '2' > #'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 > 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 Happiness Connected 1 14 41 2 18 39 3 11 30 4 12 31 5 16 34 6 18 35 7 14 39 8 14 34 9 15 36 10 15 37 11 17 38 12 19 36 13 10 38 14 16 39 15 18 33 16 14 32 17 14 36 18 17 38 19 14 39 20 16 32 21 18 32 22 11 31 23 14 39 24 12 37 25 17 39 26 9 41 27 16 36 28 14 33 29 15 33 30 11 34 31 16 31 32 13 27 33 17 37 34 15 34 35 14 34 36 16 32 37 9 29 38 15 36 39 17 29 40 13 35 41 15 37 42 16 34 43 16 38 44 12 35 45 12 38 46 11 37 47 15 38 48 15 33 49 17 36 50 13 38 51 16 32 52 14 32 53 11 32 54 12 34 55 12 32 56 15 37 57 16 39 58 15 29 59 12 37 60 12 35 61 8 30 62 13 38 63 11 34 64 14 31 65 15 34 66 10 35 67 11 36 68 12 30 69 15 39 70 15 35 71 14 38 72 16 31 73 15 34 74 15 38 75 13 34 76 12 39 77 17 37 78 13 34 79 15 28 80 13 37 81 15 33 82 16 37 83 15 35 84 16 37 85 15 32 86 14 33 87 15 38 88 14 33 89 13 29 90 7 33 91 17 31 92 13 36 93 15 35 94 14 32 95 13 29 96 16 39 97 12 37 98 14 35 99 17 37 100 15 32 101 17 38 102 12 37 103 16 36 104 11 32 105 15 33 106 9 40 107 16 38 108 15 41 109 10 36 110 10 43 111 15 30 112 11 31 113 13 32 114 14 32 115 18 37 116 16 37 117 14 33 118 14 34 119 14 33 120 14 38 121 12 33 122 14 31 123 15 38 124 15 37 125 15 33 126 13 31 127 17 39 128 17 44 129 19 33 130 15 35 131 13 32 132 9 28 133 15 40 134 15 27 135 15 37 136 16 32 137 11 28 138 14 34 139 11 30 140 15 35 141 13 31 142 15 32 143 16 30 144 14 30 145 15 31 146 16 40 147 16 32 148 11 36 149 12 32 150 9 35 151 16 38 152 13 42 153 16 34 154 12 35 155 9 35 156 13 33 157 13 36 158 14 32 159 19 33 160 13 34 161 12 32 162 13 34 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected 10.61516 0.09883 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.8766 -1.5278 0.2717 1.5958 5.1234 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 10.61516 1.88524 5.631 7.88e-08 *** Connected 0.09883 0.05419 1.824 0.0701 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.321 on 160 degrees of freedom Multiple R-squared: 0.02036, Adjusted R-squared: 0.01424 F-statistic: 3.326 on 1 and 160 DF, p-value: 0.07007 > 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.6605888 0.6788225 0.33941124 [2,] 0.7708597 0.4582806 0.22914030 [3,] 0.7300897 0.5398206 0.26991030 [4,] 0.6178470 0.7643060 0.38215300 [5,] 0.5025425 0.9949151 0.49745755 [6,] 0.3926467 0.7852934 0.60735331 [7,] 0.3381636 0.6763273 0.66183636 [8,] 0.5297019 0.9405961 0.47029807 [9,] 0.8466930 0.3066139 0.15330697 [10,] 0.7950866 0.4098269 0.20491344 [11,] 0.8567692 0.2864616 0.14323081 [12,] 0.8089703 0.3820595 0.19102975 [13,] 0.7626124 0.4747751 0.23738756 [14,] 0.7327190 0.5345620 0.26728101 [15,] 0.6966682 0.6066637 0.30333185 [16,] 0.6635966 0.6728067 0.33640336 [17,] 0.7267643 0.5464714 0.27323569 [18,] 0.7836660 0.4326680 0.21633398 [19,] 0.7502711 0.4994578 0.24972892 [20,] 0.7757287 0.4485426 0.22427128 [21,] 0.7571207 0.4857587 0.24287933 [22,] 0.9324541 0.1350918 0.06754588 [23,] 0.9182876 0.1634247 0.08171236 [24,] 0.8952815 0.2094370 0.10471851 [25,] 0.8682884 0.2634232 0.13171162 [26,] 0.8972867 0.2054267 0.10271334 [27,] 0.8843496 0.2313008 0.11565042 [28,] 0.8618770 0.2762461 0.13812305 [29,] 0.8614754 0.2770492 0.13852459 [30,] 0.8312692 0.3374617 0.16873084 [31,] 0.7964037 0.4071926 0.20359631 [32,] 0.7780577 0.4438845 0.22194227 [33,] 0.8838986 0.2322028 0.11610138 [34,] 0.8577051 0.2845899 0.14229493 [35,] 0.8794192 0.2411616 0.12058078 [36,] 0.8620578 0.2758845 0.13794223 [37,] 0.8331124 0.3337753 0.16688763 [38,] 0.8171296 0.3657409 0.18287043 [39,] 0.7934561 0.4130879 0.20654393 [40,] 0.7954209 0.4091581 0.20457906 [41,] 0.8037645 0.3924710 0.19623550 [42,] 0.8406405 0.3187190 0.15935949 [43,] 0.8103307 0.3793386 0.18966932 [44,] 0.7804572 0.4390856 0.21954278 [45,] 0.7889767 0.4220467 0.21102333 [46,] 0.7681959 0.4636082 0.23180410 [47,] 0.7560518 0.4878965 0.24394823 [48,] 0.7178955 0.5642089 0.28210445 [49,] 0.7464197 0.5071606 0.25358031 [50,] 0.7410505 0.5178991 0.25894953 [51,] 0.7298109 0.5403781 0.27018905 [52,] 0.6922996 0.6154009 0.30770043 [53,] 0.6658678 0.6682643 0.33413216 [54,] 0.6365780 0.7268440 0.36342201 [55,] 0.6386130 0.7227739 0.36138697 [56,] 0.6334998 0.7330003 0.36650016 [57,] 0.8167873 0.3664254 0.18321271 [58,] 0.7968603 0.4062794 0.20313971 [59,] 0.8166382 0.3667235 0.18336176 [60,] 0.7850315 0.4299371 0.21496854 [61,] 0.7564483 0.4871034 0.24355171 [62,] 0.8228814 0.3542371 0.17711856 [63,] 0.8461547 0.3076907 0.15384535 [64,] 0.8305208 0.3389584 0.16947919 [65,] 0.8016995 0.3966010 0.19830052 [66,] 0.7738132 0.4523736 0.22618680 [67,] 0.7391525 0.5216950 0.26084750 [68,] 0.7384320 0.5231360 0.26156801 [69,] 0.7076015 0.5847971 0.29239854 [70,] 0.6703998 0.6592005 0.32960023 [71,] 0.6358535 0.7282931 0.36414654 [72,] 0.6404431 0.7191137 0.35955687 [73,] 0.6552238 0.6895523 0.34477617 [74,] 0.6201763 0.7596474 0.37982370 [75,] 0.5971618 0.8056764 0.40283818 [76,] 0.5659653 0.8680694 0.43403470 [77,] 0.5313872 0.9372256 0.46861282 [78,] 0.5109299 0.9781402 0.48907009 [79,] 0.4729256 0.9458512 0.52707438 [80,] 0.4527466 0.9054932 0.54725339 [81,] 0.4203939 0.8407878 0.57960611 [82,] 0.3769804 0.7539608 0.62301961 [83,] 0.3380597 0.6761194 0.66194030 [84,] 0.2979309 0.5958619 0.70206907 [85,] 0.2615702 0.5231404 0.73842979 [86,] 0.5876734 0.8246531 0.41232656 [87,] 0.6328074 0.7343853 0.36719264 [88,] 0.5997889 0.8004221 0.40021107 [89,] 0.5624583 0.8750833 0.43754167 [90,] 0.5175564 0.9648871 0.48244356 [91,] 0.4735798 0.9471595 0.52642024 [92,] 0.4482992 0.8965985 0.55170077 [93,] 0.4442081 0.8884162 0.55579188 [94,] 0.3990920 0.7981840 0.60090801 [95,] 0.4165645 0.8331290 0.58343552 [96,] 0.3847556 0.7695111 0.61524444 [97,] 0.3996776 0.7993551 0.60032243 [98,] 0.3938861 0.7877721 0.60611394 [99,] 0.3787194 0.7574388 0.62128062 [100,] 0.3941207 0.7882413 0.60587934 [101,] 0.3606415 0.7212830 0.63935848 [102,] 0.5713838 0.8572323 0.42861616 [103,] 0.5476471 0.9047058 0.45235289 [104,] 0.5009252 0.9981496 0.49907481 [105,] 0.6035444 0.7929113 0.39645563 [106,] 0.7734958 0.4530083 0.22650415 [107,] 0.7545310 0.4909381 0.24546904 [108,] 0.7642183 0.4715634 0.23578171 [109,] 0.7283743 0.5432514 0.27162571 [110,] 0.6858469 0.6283063 0.31415315 [111,] 0.7444949 0.5110102 0.25550509 [112,] 0.7227702 0.5544596 0.27722981 [113,] 0.6785342 0.6429316 0.32146578 [114,] 0.6310819 0.7378362 0.36891809 [115,] 0.5815744 0.8368512 0.41842562 [116,] 0.5331389 0.9337221 0.46686107 [117,] 0.5136659 0.9726682 0.48633408 [118,] 0.4629107 0.9258214 0.53708929 [119,] 0.4125736 0.8251473 0.58742636 [120,] 0.3645933 0.7291865 0.63540673 [121,] 0.3269968 0.6539936 0.67300319 [122,] 0.2821304 0.5642608 0.71786960 [123,] 0.2821212 0.5642424 0.71787878 [124,] 0.2683959 0.5367918 0.73160410 [125,] 0.4771369 0.9542738 0.52286312 [126,] 0.4349846 0.8699692 0.56501538 [127,] 0.3818089 0.7636178 0.61819111 [128,] 0.5223884 0.9552232 0.47761160 [129,] 0.4759047 0.9518093 0.52409535 [130,] 0.4399345 0.8798689 0.56006553 [131,] 0.3957018 0.7914035 0.60429823 [132,] 0.3993802 0.7987604 0.60061980 [133,] 0.4075389 0.8150778 0.59246110 [134,] 0.3477864 0.6955729 0.65221357 [135,] 0.3725112 0.7450225 0.62748877 [136,] 0.3305369 0.6610737 0.66946314 [137,] 0.2795687 0.5591374 0.72043132 [138,] 0.2364297 0.4728594 0.76357032 [139,] 0.2263998 0.4527997 0.77360017 [140,] 0.1769393 0.3538787 0.82306065 [141,] 0.1487194 0.2974387 0.85128064 [142,] 0.1617633 0.3235265 0.83823673 [143,] 0.1665938 0.3331875 0.83340623 [144,] 0.1548006 0.3096012 0.84519940 [145,] 0.1220033 0.2440067 0.87799666 [146,] 0.2414746 0.4829492 0.75852538 [147,] 0.2619914 0.5239829 0.73800857 [148,] 0.2395601 0.4791201 0.76043995 [149,] 0.2628225 0.5256450 0.73717749 [150,] 0.1836308 0.3672615 0.81636925 [151,] 0.3152501 0.6305002 0.68474992 [152,] 0.2203560 0.4407120 0.77964401 [153,] 0.1292329 0.2584657 0.87076713 > postscript(file="/var/www/rcomp/tmp/1mxhb1324681072.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/rcomp/tmp/2j1dr1324681072.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/rcomp/tmp/3fn381324681072.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/rcomp/tmp/4gcx51324681072.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/rcomp/tmp/51ee81324681072.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 = 162 Frequency = 1 1 2 3 4 5 6 -0.66723772 3.53042445 -2.58009579 -1.67892687 2.02457987 3.92574879 7 8 9 10 11 12 -0.46957555 0.02457987 0.82691770 0.72808662 2.62925554 4.82691770 13 14 15 16 17 18 -4.37074446 1.53042445 4.12341096 0.22224204 -0.17308230 2.62925554 19 20 21 22 23 24 -0.46957555 2.22224204 4.22224204 -2.67892687 -0.46957555 -2.27191338 25 26 27 28 29 30 2.53042445 -5.66723772 1.82691770 0.12341096 1.12341096 -2.97542013 31 32 33 34 35 36 2.32107313 -0.28360254 2.72808662 1.02457987 0.02457987 2.22224204 37 38 39 40 41 42 -4.48126470 0.82691770 3.51873530 -1.07425121 0.72808662 2.02457987 43 44 45 46 47 48 1.62925554 -2.07425121 -2.37074446 -3.27191338 0.62925554 1.12341096 49 50 51 52 53 54 2.82691770 -1.37074446 2.22224204 0.22224204 -2.77775796 -1.97542013 55 56 57 58 59 60 -1.77775796 0.72808662 1.53042445 1.51873530 -2.27191338 -2.07425121 61 62 63 64 65 66 -5.58009579 -1.37074446 -2.97542013 0.32107313 1.02457987 -4.07425121 67 68 69 70 71 72 -3.17308230 -1.58009579 0.53042445 0.92574879 -0.37074446 2.32107313 73 74 75 76 77 78 1.02457987 0.62925554 -0.97542013 -2.46957555 2.72808662 -0.97542013 79 80 81 82 83 84 1.61756638 -1.27191338 1.12341096 1.72808662 0.92574879 1.72808662 85 86 87 88 89 90 1.22224204 0.12341096 0.62925554 0.12341096 -0.48126470 -6.87658904 91 92 93 94 95 96 3.32107313 -1.17308230 0.92574879 0.22224204 -0.48126470 1.53042445 97 98 99 100 101 102 -2.27191338 -0.07425121 2.72808662 1.22224204 2.62925554 -2.27191338 103 104 105 106 107 108 1.82691770 -2.77775796 1.12341096 -5.56840663 1.62925554 0.33276228 109 110 111 112 113 114 -4.17308230 -4.86489989 1.41990421 -2.67892687 -0.77775796 0.22224204 115 116 117 118 119 120 3.72808662 1.72808662 0.12341096 0.02457987 0.12341096 -0.37074446 121 122 123 124 125 126 -1.87658904 0.32107313 0.62925554 0.72808662 1.12341096 -0.67892687 127 128 129 130 131 132 2.53042445 2.03626903 5.12341096 0.92574879 -0.77775796 -4.38243362 133 134 135 136 137 138 0.43159337 1.71639746 0.72808662 2.22224204 -2.38243362 0.02457987 139 140 141 142 143 144 -2.58009579 0.92574879 -0.67892687 1.22224204 2.41990421 0.41990421 145 146 147 148 149 150 1.32107313 1.43159337 2.22224204 -3.17308230 -1.77775796 -5.07425121 151 152 153 154 155 156 1.62925554 -1.76606880 2.02457987 -2.07425121 -5.07425121 -0.87658904 157 158 159 160 161 162 -1.17308230 0.22224204 5.12341096 -0.97542013 -1.77775796 -0.97542013 > postscript(file="/var/www/rcomp/tmp/6gcy61324681072.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.66723772 NA 1 3.53042445 -0.66723772 2 -2.58009579 3.53042445 3 -1.67892687 -2.58009579 4 2.02457987 -1.67892687 5 3.92574879 2.02457987 6 -0.46957555 3.92574879 7 0.02457987 -0.46957555 8 0.82691770 0.02457987 9 0.72808662 0.82691770 10 2.62925554 0.72808662 11 4.82691770 2.62925554 12 -4.37074446 4.82691770 13 1.53042445 -4.37074446 14 4.12341096 1.53042445 15 0.22224204 4.12341096 16 -0.17308230 0.22224204 17 2.62925554 -0.17308230 18 -0.46957555 2.62925554 19 2.22224204 -0.46957555 20 4.22224204 2.22224204 21 -2.67892687 4.22224204 22 -0.46957555 -2.67892687 23 -2.27191338 -0.46957555 24 2.53042445 -2.27191338 25 -5.66723772 2.53042445 26 1.82691770 -5.66723772 27 0.12341096 1.82691770 28 1.12341096 0.12341096 29 -2.97542013 1.12341096 30 2.32107313 -2.97542013 31 -0.28360254 2.32107313 32 2.72808662 -0.28360254 33 1.02457987 2.72808662 34 0.02457987 1.02457987 35 2.22224204 0.02457987 36 -4.48126470 2.22224204 37 0.82691770 -4.48126470 38 3.51873530 0.82691770 39 -1.07425121 3.51873530 40 0.72808662 -1.07425121 41 2.02457987 0.72808662 42 1.62925554 2.02457987 43 -2.07425121 1.62925554 44 -2.37074446 -2.07425121 45 -3.27191338 -2.37074446 46 0.62925554 -3.27191338 47 1.12341096 0.62925554 48 2.82691770 1.12341096 49 -1.37074446 2.82691770 50 2.22224204 -1.37074446 51 0.22224204 2.22224204 52 -2.77775796 0.22224204 53 -1.97542013 -2.77775796 54 -1.77775796 -1.97542013 55 0.72808662 -1.77775796 56 1.53042445 0.72808662 57 1.51873530 1.53042445 58 -2.27191338 1.51873530 59 -2.07425121 -2.27191338 60 -5.58009579 -2.07425121 61 -1.37074446 -5.58009579 62 -2.97542013 -1.37074446 63 0.32107313 -2.97542013 64 1.02457987 0.32107313 65 -4.07425121 1.02457987 66 -3.17308230 -4.07425121 67 -1.58009579 -3.17308230 68 0.53042445 -1.58009579 69 0.92574879 0.53042445 70 -0.37074446 0.92574879 71 2.32107313 -0.37074446 72 1.02457987 2.32107313 73 0.62925554 1.02457987 74 -0.97542013 0.62925554 75 -2.46957555 -0.97542013 76 2.72808662 -2.46957555 77 -0.97542013 2.72808662 78 1.61756638 -0.97542013 79 -1.27191338 1.61756638 80 1.12341096 -1.27191338 81 1.72808662 1.12341096 82 0.92574879 1.72808662 83 1.72808662 0.92574879 84 1.22224204 1.72808662 85 0.12341096 1.22224204 86 0.62925554 0.12341096 87 0.12341096 0.62925554 88 -0.48126470 0.12341096 89 -6.87658904 -0.48126470 90 3.32107313 -6.87658904 91 -1.17308230 3.32107313 92 0.92574879 -1.17308230 93 0.22224204 0.92574879 94 -0.48126470 0.22224204 95 1.53042445 -0.48126470 96 -2.27191338 1.53042445 97 -0.07425121 -2.27191338 98 2.72808662 -0.07425121 99 1.22224204 2.72808662 100 2.62925554 1.22224204 101 -2.27191338 2.62925554 102 1.82691770 -2.27191338 103 -2.77775796 1.82691770 104 1.12341096 -2.77775796 105 -5.56840663 1.12341096 106 1.62925554 -5.56840663 107 0.33276228 1.62925554 108 -4.17308230 0.33276228 109 -4.86489989 -4.17308230 110 1.41990421 -4.86489989 111 -2.67892687 1.41990421 112 -0.77775796 -2.67892687 113 0.22224204 -0.77775796 114 3.72808662 0.22224204 115 1.72808662 3.72808662 116 0.12341096 1.72808662 117 0.02457987 0.12341096 118 0.12341096 0.02457987 119 -0.37074446 0.12341096 120 -1.87658904 -0.37074446 121 0.32107313 -1.87658904 122 0.62925554 0.32107313 123 0.72808662 0.62925554 124 1.12341096 0.72808662 125 -0.67892687 1.12341096 126 2.53042445 -0.67892687 127 2.03626903 2.53042445 128 5.12341096 2.03626903 129 0.92574879 5.12341096 130 -0.77775796 0.92574879 131 -4.38243362 -0.77775796 132 0.43159337 -4.38243362 133 1.71639746 0.43159337 134 0.72808662 1.71639746 135 2.22224204 0.72808662 136 -2.38243362 2.22224204 137 0.02457987 -2.38243362 138 -2.58009579 0.02457987 139 0.92574879 -2.58009579 140 -0.67892687 0.92574879 141 1.22224204 -0.67892687 142 2.41990421 1.22224204 143 0.41990421 2.41990421 144 1.32107313 0.41990421 145 1.43159337 1.32107313 146 2.22224204 1.43159337 147 -3.17308230 2.22224204 148 -1.77775796 -3.17308230 149 -5.07425121 -1.77775796 150 1.62925554 -5.07425121 151 -1.76606880 1.62925554 152 2.02457987 -1.76606880 153 -2.07425121 2.02457987 154 -5.07425121 -2.07425121 155 -0.87658904 -5.07425121 156 -1.17308230 -0.87658904 157 0.22224204 -1.17308230 158 5.12341096 0.22224204 159 -0.97542013 5.12341096 160 -1.77775796 -0.97542013 161 -0.97542013 -1.77775796 162 NA -0.97542013 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.53042445 -0.66723772 [2,] -2.58009579 3.53042445 [3,] -1.67892687 -2.58009579 [4,] 2.02457987 -1.67892687 [5,] 3.92574879 2.02457987 [6,] -0.46957555 3.92574879 [7,] 0.02457987 -0.46957555 [8,] 0.82691770 0.02457987 [9,] 0.72808662 0.82691770 [10,] 2.62925554 0.72808662 [11,] 4.82691770 2.62925554 [12,] -4.37074446 4.82691770 [13,] 1.53042445 -4.37074446 [14,] 4.12341096 1.53042445 [15,] 0.22224204 4.12341096 [16,] -0.17308230 0.22224204 [17,] 2.62925554 -0.17308230 [18,] -0.46957555 2.62925554 [19,] 2.22224204 -0.46957555 [20,] 4.22224204 2.22224204 [21,] -2.67892687 4.22224204 [22,] -0.46957555 -2.67892687 [23,] -2.27191338 -0.46957555 [24,] 2.53042445 -2.27191338 [25,] -5.66723772 2.53042445 [26,] 1.82691770 -5.66723772 [27,] 0.12341096 1.82691770 [28,] 1.12341096 0.12341096 [29,] -2.97542013 1.12341096 [30,] 2.32107313 -2.97542013 [31,] -0.28360254 2.32107313 [32,] 2.72808662 -0.28360254 [33,] 1.02457987 2.72808662 [34,] 0.02457987 1.02457987 [35,] 2.22224204 0.02457987 [36,] -4.48126470 2.22224204 [37,] 0.82691770 -4.48126470 [38,] 3.51873530 0.82691770 [39,] -1.07425121 3.51873530 [40,] 0.72808662 -1.07425121 [41,] 2.02457987 0.72808662 [42,] 1.62925554 2.02457987 [43,] -2.07425121 1.62925554 [44,] -2.37074446 -2.07425121 [45,] -3.27191338 -2.37074446 [46,] 0.62925554 -3.27191338 [47,] 1.12341096 0.62925554 [48,] 2.82691770 1.12341096 [49,] -1.37074446 2.82691770 [50,] 2.22224204 -1.37074446 [51,] 0.22224204 2.22224204 [52,] -2.77775796 0.22224204 [53,] -1.97542013 -2.77775796 [54,] -1.77775796 -1.97542013 [55,] 0.72808662 -1.77775796 [56,] 1.53042445 0.72808662 [57,] 1.51873530 1.53042445 [58,] -2.27191338 1.51873530 [59,] -2.07425121 -2.27191338 [60,] -5.58009579 -2.07425121 [61,] -1.37074446 -5.58009579 [62,] -2.97542013 -1.37074446 [63,] 0.32107313 -2.97542013 [64,] 1.02457987 0.32107313 [65,] -4.07425121 1.02457987 [66,] -3.17308230 -4.07425121 [67,] -1.58009579 -3.17308230 [68,] 0.53042445 -1.58009579 [69,] 0.92574879 0.53042445 [70,] -0.37074446 0.92574879 [71,] 2.32107313 -0.37074446 [72,] 1.02457987 2.32107313 [73,] 0.62925554 1.02457987 [74,] -0.97542013 0.62925554 [75,] -2.46957555 -0.97542013 [76,] 2.72808662 -2.46957555 [77,] -0.97542013 2.72808662 [78,] 1.61756638 -0.97542013 [79,] -1.27191338 1.61756638 [80,] 1.12341096 -1.27191338 [81,] 1.72808662 1.12341096 [82,] 0.92574879 1.72808662 [83,] 1.72808662 0.92574879 [84,] 1.22224204 1.72808662 [85,] 0.12341096 1.22224204 [86,] 0.62925554 0.12341096 [87,] 0.12341096 0.62925554 [88,] -0.48126470 0.12341096 [89,] -6.87658904 -0.48126470 [90,] 3.32107313 -6.87658904 [91,] -1.17308230 3.32107313 [92,] 0.92574879 -1.17308230 [93,] 0.22224204 0.92574879 [94,] -0.48126470 0.22224204 [95,] 1.53042445 -0.48126470 [96,] -2.27191338 1.53042445 [97,] -0.07425121 -2.27191338 [98,] 2.72808662 -0.07425121 [99,] 1.22224204 2.72808662 [100,] 2.62925554 1.22224204 [101,] -2.27191338 2.62925554 [102,] 1.82691770 -2.27191338 [103,] -2.77775796 1.82691770 [104,] 1.12341096 -2.77775796 [105,] -5.56840663 1.12341096 [106,] 1.62925554 -5.56840663 [107,] 0.33276228 1.62925554 [108,] -4.17308230 0.33276228 [109,] -4.86489989 -4.17308230 [110,] 1.41990421 -4.86489989 [111,] -2.67892687 1.41990421 [112,] -0.77775796 -2.67892687 [113,] 0.22224204 -0.77775796 [114,] 3.72808662 0.22224204 [115,] 1.72808662 3.72808662 [116,] 0.12341096 1.72808662 [117,] 0.02457987 0.12341096 [118,] 0.12341096 0.02457987 [119,] -0.37074446 0.12341096 [120,] -1.87658904 -0.37074446 [121,] 0.32107313 -1.87658904 [122,] 0.62925554 0.32107313 [123,] 0.72808662 0.62925554 [124,] 1.12341096 0.72808662 [125,] -0.67892687 1.12341096 [126,] 2.53042445 -0.67892687 [127,] 2.03626903 2.53042445 [128,] 5.12341096 2.03626903 [129,] 0.92574879 5.12341096 [130,] -0.77775796 0.92574879 [131,] -4.38243362 -0.77775796 [132,] 0.43159337 -4.38243362 [133,] 1.71639746 0.43159337 [134,] 0.72808662 1.71639746 [135,] 2.22224204 0.72808662 [136,] -2.38243362 2.22224204 [137,] 0.02457987 -2.38243362 [138,] -2.58009579 0.02457987 [139,] 0.92574879 -2.58009579 [140,] -0.67892687 0.92574879 [141,] 1.22224204 -0.67892687 [142,] 2.41990421 1.22224204 [143,] 0.41990421 2.41990421 [144,] 1.32107313 0.41990421 [145,] 1.43159337 1.32107313 [146,] 2.22224204 1.43159337 [147,] -3.17308230 2.22224204 [148,] -1.77775796 -3.17308230 [149,] -5.07425121 -1.77775796 [150,] 1.62925554 -5.07425121 [151,] -1.76606880 1.62925554 [152,] 2.02457987 -1.76606880 [153,] -2.07425121 2.02457987 [154,] -5.07425121 -2.07425121 [155,] -0.87658904 -5.07425121 [156,] -1.17308230 -0.87658904 [157,] 0.22224204 -1.17308230 [158,] 5.12341096 0.22224204 [159,] -0.97542013 5.12341096 [160,] -1.77775796 -0.97542013 [161,] -0.97542013 -1.77775796 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.53042445 -0.66723772 2 -2.58009579 3.53042445 3 -1.67892687 -2.58009579 4 2.02457987 -1.67892687 5 3.92574879 2.02457987 6 -0.46957555 3.92574879 7 0.02457987 -0.46957555 8 0.82691770 0.02457987 9 0.72808662 0.82691770 10 2.62925554 0.72808662 11 4.82691770 2.62925554 12 -4.37074446 4.82691770 13 1.53042445 -4.37074446 14 4.12341096 1.53042445 15 0.22224204 4.12341096 16 -0.17308230 0.22224204 17 2.62925554 -0.17308230 18 -0.46957555 2.62925554 19 2.22224204 -0.46957555 20 4.22224204 2.22224204 21 -2.67892687 4.22224204 22 -0.46957555 -2.67892687 23 -2.27191338 -0.46957555 24 2.53042445 -2.27191338 25 -5.66723772 2.53042445 26 1.82691770 -5.66723772 27 0.12341096 1.82691770 28 1.12341096 0.12341096 29 -2.97542013 1.12341096 30 2.32107313 -2.97542013 31 -0.28360254 2.32107313 32 2.72808662 -0.28360254 33 1.02457987 2.72808662 34 0.02457987 1.02457987 35 2.22224204 0.02457987 36 -4.48126470 2.22224204 37 0.82691770 -4.48126470 38 3.51873530 0.82691770 39 -1.07425121 3.51873530 40 0.72808662 -1.07425121 41 2.02457987 0.72808662 42 1.62925554 2.02457987 43 -2.07425121 1.62925554 44 -2.37074446 -2.07425121 45 -3.27191338 -2.37074446 46 0.62925554 -3.27191338 47 1.12341096 0.62925554 48 2.82691770 1.12341096 49 -1.37074446 2.82691770 50 2.22224204 -1.37074446 51 0.22224204 2.22224204 52 -2.77775796 0.22224204 53 -1.97542013 -2.77775796 54 -1.77775796 -1.97542013 55 0.72808662 -1.77775796 56 1.53042445 0.72808662 57 1.51873530 1.53042445 58 -2.27191338 1.51873530 59 -2.07425121 -2.27191338 60 -5.58009579 -2.07425121 61 -1.37074446 -5.58009579 62 -2.97542013 -1.37074446 63 0.32107313 -2.97542013 64 1.02457987 0.32107313 65 -4.07425121 1.02457987 66 -3.17308230 -4.07425121 67 -1.58009579 -3.17308230 68 0.53042445 -1.58009579 69 0.92574879 0.53042445 70 -0.37074446 0.92574879 71 2.32107313 -0.37074446 72 1.02457987 2.32107313 73 0.62925554 1.02457987 74 -0.97542013 0.62925554 75 -2.46957555 -0.97542013 76 2.72808662 -2.46957555 77 -0.97542013 2.72808662 78 1.61756638 -0.97542013 79 -1.27191338 1.61756638 80 1.12341096 -1.27191338 81 1.72808662 1.12341096 82 0.92574879 1.72808662 83 1.72808662 0.92574879 84 1.22224204 1.72808662 85 0.12341096 1.22224204 86 0.62925554 0.12341096 87 0.12341096 0.62925554 88 -0.48126470 0.12341096 89 -6.87658904 -0.48126470 90 3.32107313 -6.87658904 91 -1.17308230 3.32107313 92 0.92574879 -1.17308230 93 0.22224204 0.92574879 94 -0.48126470 0.22224204 95 1.53042445 -0.48126470 96 -2.27191338 1.53042445 97 -0.07425121 -2.27191338 98 2.72808662 -0.07425121 99 1.22224204 2.72808662 100 2.62925554 1.22224204 101 -2.27191338 2.62925554 102 1.82691770 -2.27191338 103 -2.77775796 1.82691770 104 1.12341096 -2.77775796 105 -5.56840663 1.12341096 106 1.62925554 -5.56840663 107 0.33276228 1.62925554 108 -4.17308230 0.33276228 109 -4.86489989 -4.17308230 110 1.41990421 -4.86489989 111 -2.67892687 1.41990421 112 -0.77775796 -2.67892687 113 0.22224204 -0.77775796 114 3.72808662 0.22224204 115 1.72808662 3.72808662 116 0.12341096 1.72808662 117 0.02457987 0.12341096 118 0.12341096 0.02457987 119 -0.37074446 0.12341096 120 -1.87658904 -0.37074446 121 0.32107313 -1.87658904 122 0.62925554 0.32107313 123 0.72808662 0.62925554 124 1.12341096 0.72808662 125 -0.67892687 1.12341096 126 2.53042445 -0.67892687 127 2.03626903 2.53042445 128 5.12341096 2.03626903 129 0.92574879 5.12341096 130 -0.77775796 0.92574879 131 -4.38243362 -0.77775796 132 0.43159337 -4.38243362 133 1.71639746 0.43159337 134 0.72808662 1.71639746 135 2.22224204 0.72808662 136 -2.38243362 2.22224204 137 0.02457987 -2.38243362 138 -2.58009579 0.02457987 139 0.92574879 -2.58009579 140 -0.67892687 0.92574879 141 1.22224204 -0.67892687 142 2.41990421 1.22224204 143 0.41990421 2.41990421 144 1.32107313 0.41990421 145 1.43159337 1.32107313 146 2.22224204 1.43159337 147 -3.17308230 2.22224204 148 -1.77775796 -3.17308230 149 -5.07425121 -1.77775796 150 1.62925554 -5.07425121 151 -1.76606880 1.62925554 152 2.02457987 -1.76606880 153 -2.07425121 2.02457987 154 -5.07425121 -2.07425121 155 -0.87658904 -5.07425121 156 -1.17308230 -0.87658904 157 0.22224204 -1.17308230 158 5.12341096 0.22224204 159 -0.97542013 5.12341096 160 -1.77775796 -0.97542013 161 -0.97542013 -1.77775796 > 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/rcomp/tmp/7zxa61324681072.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/rcomp/tmp/8rppe1324681072.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/rcomp/tmp/9m7p61324681072.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/rcomp/tmp/1093yp1324681072.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11r1y71324681072.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/rcomp/tmp/12ewdg1324681072.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/rcomp/tmp/13arpr1324681072.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/rcomp/tmp/143ny31324681072.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/rcomp/tmp/15k89c1324681072.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/rcomp/tmp/16xzqk1324681072.tab") + } > > try(system("convert tmp/1mxhb1324681072.ps tmp/1mxhb1324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/2j1dr1324681072.ps tmp/2j1dr1324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/3fn381324681072.ps tmp/3fn381324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/4gcx51324681072.ps tmp/4gcx51324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/51ee81324681072.ps tmp/51ee81324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/6gcy61324681072.ps tmp/6gcy61324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/7zxa61324681072.ps tmp/7zxa61324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/8rppe1324681072.ps tmp/8rppe1324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/9m7p61324681072.ps tmp/9m7p61324681072.png",intern=TRUE)) character(0) > try(system("convert tmp/1093yp1324681072.ps tmp/1093yp1324681072.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.390 0.320 4.692