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(24 + ,14 + ,11 + ,24 + ,26 + ,25 + ,11 + ,7 + ,25 + ,23 + ,17 + ,6 + ,17 + ,30 + ,25 + ,18 + ,12 + ,10 + ,19 + ,23 + ,18 + ,8 + ,12 + ,22 + ,19 + ,16 + ,10 + ,12 + ,22 + ,29 + ,20 + ,10 + ,11 + ,25 + ,25 + ,16 + ,11 + ,11 + ,23 + ,21 + ,18 + ,16 + ,12 + ,17 + ,22 + ,17 + ,11 + ,13 + ,21 + ,25 + ,23 + ,13 + ,14 + ,19 + ,24 + ,30 + ,12 + ,16 + ,19 + ,18 + ,23 + ,8 + ,11 + ,15 + ,22 + ,18 + ,12 + ,10 + ,16 + ,15 + ,15 + ,11 + ,11 + ,23 + ,22 + ,12 + ,4 + ,15 + ,27 + ,28 + ,21 + ,9 + ,9 + ,22 + ,20 + ,15 + ,8 + ,11 + ,14 + ,12 + ,20 + ,8 + ,17 + ,22 + ,24 + ,31 + ,14 + ,17 + ,23 + ,20 + ,27 + ,15 + ,11 + ,23 + ,21 + ,34 + ,16 + ,18 + ,21 + ,20 + ,21 + ,9 + ,14 + ,19 + ,21 + ,31 + ,14 + ,10 + ,18 + ,23 + ,19 + ,11 + ,11 + ,20 + ,28 + ,16 + ,8 + ,15 + ,23 + ,24 + ,20 + ,9 + ,15 + ,25 + ,24 + ,21 + ,9 + ,13 + ,19 + ,24 + ,22 + ,9 + ,16 + ,24 + ,23 + ,17 + ,9 + ,13 + ,22 + ,23 + ,24 + ,10 + ,9 + ,25 + ,29 + ,25 + ,16 + ,18 + ,26 + ,24 + ,26 + ,11 + ,18 + ,29 + ,18 + ,25 + ,8 + ,12 + ,32 + ,25 + ,17 + ,9 + ,17 + ,25 + ,21 + ,32 + ,16 + ,9 + ,29 + ,26 + ,33 + ,11 + ,9 + ,28 + ,22 + ,13 + ,16 + ,12 + ,17 + ,22 + ,32 + ,12 + ,18 + ,28 + ,22 + ,25 + ,12 + ,12 + ,29 + ,23 + ,29 + ,14 + ,18 + ,26 + ,30 + ,22 + ,9 + ,14 + ,25 + ,23 + ,18 + ,10 + ,15 + ,14 + ,17 + ,17 + ,9 + ,16 + ,25 + ,23 + ,20 + ,10 + ,10 + ,26 + ,23 + ,15 + ,12 + ,11 + ,20 + ,25 + ,20 + ,14 + ,14 + ,18 + ,24 + ,33 + ,14 + ,9 + ,32 + ,24 + ,29 + ,10 + ,12 + ,25 + ,23 + ,23 + ,14 + ,17 + ,25 + ,21 + ,26 + ,16 + ,5 + ,23 + ,24 + ,18 + ,9 + ,12 + ,21 + ,24 + ,20 + ,10 + ,12 + ,20 + ,28 + ,11 + ,6 + ,6 + ,15 + ,16 + ,28 + ,8 + ,24 + ,30 + ,20 + ,26 + ,13 + ,12 + ,24 + ,29 + ,22 + ,10 + ,12 + ,26 + ,27 + ,17 + ,8 + ,14 + ,24 + ,22 + ,12 + ,7 + ,7 + ,22 + ,28 + ,14 + ,15 + ,13 + ,14 + ,16 + ,17 + ,9 + ,12 + ,24 + ,25 + ,21 + ,10 + ,13 + ,24 + ,24 + ,19 + ,12 + ,14 + ,24 + ,28 + ,18 + ,13 + ,8 + ,24 + ,24 + ,10 + ,10 + ,11 + ,19 + ,23 + ,29 + ,11 + ,9 + ,31 + ,30 + ,31 + ,8 + ,11 + ,22 + ,24 + ,19 + ,9 + ,13 + ,27 + ,21 + ,9 + ,13 + ,10 + ,19 + ,25 + ,20 + ,11 + ,11 + ,25 + ,25 + ,28 + ,8 + ,12 + ,20 + ,22 + ,19 + ,9 + ,9 + ,21 + ,23 + ,30 + ,9 + ,15 + ,27 + ,26 + ,29 + ,15 + ,18 + ,23 + ,23 + ,26 + ,9 + ,15 + ,25 + ,25 + ,23 + ,10 + ,12 + ,20 + ,21 + ,13 + ,14 + ,13 + ,21 + ,25 + ,21 + ,12 + ,14 + ,22 + ,24 + ,19 + ,12 + ,10 + ,23 + ,29 + ,28 + ,11 + ,13 + ,25 + ,22 + ,23 + ,14 + ,13 + ,25 + ,27 + ,18 + ,6 + ,11 + ,17 + ,26 + ,21 + ,12 + ,13 + ,19 + ,22 + ,20 + ,8 + ,16 + ,25 + ,24 + ,23 + ,14 + ,8 + ,19 + ,27 + ,21 + ,11 + ,16 + ,20 + ,24 + ,21 + ,10 + ,11 + ,26 + ,24 + ,15 + ,14 + ,9 + ,23 + ,29 + ,28 + ,12 + ,16 + ,27 + ,22 + ,19 + ,10 + ,12 + ,17 + ,21 + ,26 + ,14 + ,14 + ,17 + ,24 + ,10 + ,5 + ,8 + ,19 + ,24 + ,16 + ,11 + ,9 + ,17 + ,23 + ,22 + ,10 + ,15 + ,22 + ,20 + ,19 + ,9 + ,11 + ,21 + ,27 + ,31 + ,10 + ,21 + ,32 + ,26 + ,31 + ,16 + ,14 + ,21 + ,25 + ,29 + ,13 + ,18 + ,21 + ,21 + ,19 + ,9 + ,12 + ,18 + ,21 + ,22 + ,10 + ,13 + ,18 + ,19 + ,23 + ,10 + ,15 + ,23 + ,21 + ,15 + ,7 + ,12 + ,19 + ,21 + ,20 + ,9 + ,19 + ,20 + ,16 + ,18 + ,8 + ,15 + ,21 + ,22 + ,23 + ,14 + ,11 + ,20 + ,29 + ,25 + ,14 + ,11 + ,17 + ,15 + ,21 + ,8 + ,10 + ,18 + ,17 + ,24 + ,9 + ,13 + ,19 + ,15 + ,25 + ,14 + ,15 + ,22 + ,21 + ,17 + ,14 + ,12 + ,15 + ,21 + ,13 + ,8 + ,12 + ,14 + ,19 + ,28 + ,8 + ,16 + ,18 + ,24 + ,21 + ,8 + ,9 + ,24 + ,20 + ,25 + ,7 + ,18 + ,35 + ,17 + ,9 + ,6 + ,8 + ,29 + ,23 + ,16 + ,8 + ,13 + ,21 + ,24 + ,19 + ,6 + ,17 + ,25 + ,14 + ,17 + ,11 + ,9 + ,20 + ,19 + ,25 + ,14 + ,15 + ,22 + ,24 + ,20 + ,11 + ,8 + ,13 + ,13 + ,29 + ,11 + ,7 + ,26 + ,22 + ,14 + ,11 + ,12 + ,17 + ,16 + ,22 + ,14 + ,14 + ,25 + ,19 + ,15 + ,8 + ,6 + ,20 + ,25 + ,19 + ,20 + ,8 + ,19 + ,25 + ,20 + ,11 + ,17 + ,21 + ,23 + ,15 + ,8 + ,10 + ,22 + ,24 + ,20 + ,11 + ,11 + ,24 + ,26 + ,18 + ,10 + ,14 + ,21 + ,26 + ,33 + ,14 + ,11 + ,26 + ,25 + ,22 + ,11 + ,13 + ,24 + ,18 + ,16 + ,9 + ,12 + ,16 + ,21 + ,17 + ,9 + ,11 + ,23 + ,26 + ,16 + ,8 + ,9 + ,18 + ,23 + ,21 + ,10 + ,12 + ,16 + ,23 + ,26 + ,13 + ,20 + ,26 + ,22 + ,18 + ,13 + ,12 + ,19 + ,20 + ,18 + ,12 + ,13 + ,21 + ,13 + ,17 + ,8 + ,12 + ,21 + ,24 + ,22 + ,13 + ,12 + ,22 + ,15 + ,30 + ,14 + ,9 + ,23 + ,14 + ,30 + ,12 + ,15 + ,29 + ,22 + ,24 + ,14 + ,24 + ,21 + ,10 + ,21 + ,15 + ,7 + ,21 + ,24 + ,21 + ,13 + ,17 + ,23 + ,22 + ,29 + ,16 + ,11 + ,27 + ,24 + ,31 + ,9 + ,17 + ,25 + ,19 + ,20 + ,9 + ,11 + ,21 + ,20 + ,16 + ,9 + ,12 + ,10 + ,13 + ,22 + ,8 + ,14 + ,20 + ,20 + ,20 + ,7 + ,11 + ,26 + ,22 + ,28 + ,16 + ,16 + ,24 + ,24 + ,38 + ,11 + ,21 + ,29 + ,29 + ,22 + ,9 + ,14 + ,19 + ,12 + ,20 + ,11 + ,20 + ,24 + ,20 + ,17 + ,9 + ,13 + ,19 + ,21 + ,28 + ,14 + ,11 + ,24 + ,24 + ,22 + ,13 + ,15 + ,22 + ,22 + ,31 + ,16 + ,19 + ,17 + ,20) + ,dim=c(5 + ,159) + ,dimnames=list(c('CM' + ,'D' + ,'PE' + ,'PS' + ,'O') + ,1:159)) > y <- array(NA,dim=c(5,159),dimnames=list(c('CM','D','PE','PS','O'),1:159)) > 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 = '4' > #'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 PS CM D PE O 1 24 24 14 11 26 2 25 25 11 7 23 3 30 17 6 17 25 4 19 18 12 10 23 5 22 18 8 12 19 6 22 16 10 12 29 7 25 20 10 11 25 8 23 16 11 11 21 9 17 18 16 12 22 10 21 17 11 13 25 11 19 23 13 14 24 12 19 30 12 16 18 13 15 23 8 11 22 14 16 18 12 10 15 15 23 15 11 11 22 16 27 12 4 15 28 17 22 21 9 9 20 18 14 15 8 11 12 19 22 20 8 17 24 20 23 31 14 17 20 21 23 27 15 11 21 22 21 34 16 18 20 23 19 21 9 14 21 24 18 31 14 10 23 25 20 19 11 11 28 26 23 16 8 15 24 27 25 20 9 15 24 28 19 21 9 13 24 29 24 22 9 16 23 30 22 17 9 13 23 31 25 24 10 9 29 32 26 25 16 18 24 33 29 26 11 18 18 34 32 25 8 12 25 35 25 17 9 17 21 36 29 32 16 9 26 37 28 33 11 9 22 38 17 13 16 12 22 39 28 32 12 18 22 40 29 25 12 12 23 41 26 29 14 18 30 42 25 22 9 14 23 43 14 18 10 15 17 44 25 17 9 16 23 45 26 20 10 10 23 46 20 15 12 11 25 47 18 20 14 14 24 48 32 33 14 9 24 49 25 29 10 12 23 50 25 23 14 17 21 51 23 26 16 5 24 52 21 18 9 12 24 53 20 20 10 12 28 54 15 11 6 6 16 55 30 28 8 24 20 56 24 26 13 12 29 57 26 22 10 12 27 58 24 17 8 14 22 59 22 12 7 7 28 60 14 14 15 13 16 61 24 17 9 12 25 62 24 21 10 13 24 63 24 19 12 14 28 64 24 18 13 8 24 65 19 10 10 11 23 66 31 29 11 9 30 67 22 31 8 11 24 68 27 19 9 13 21 69 19 9 13 10 25 70 25 20 11 11 25 71 20 28 8 12 22 72 21 19 9 9 23 73 27 30 9 15 26 74 23 29 15 18 23 75 25 26 9 15 25 76 20 23 10 12 21 77 21 13 14 13 25 78 22 21 12 14 24 79 23 19 12 10 29 80 25 28 11 13 22 81 25 23 14 13 27 82 17 18 6 11 26 83 19 21 12 13 22 84 25 20 8 16 24 85 19 23 14 8 27 86 20 21 11 16 24 87 26 21 10 11 24 88 23 15 14 9 29 89 27 28 12 16 22 90 17 19 10 12 21 91 17 26 14 14 24 92 19 10 5 8 24 93 17 16 11 9 23 94 22 22 10 15 20 95 21 19 9 11 27 96 32 31 10 21 26 97 21 31 16 14 25 98 21 29 13 18 21 99 18 19 9 12 21 100 18 22 10 13 19 101 23 23 10 15 21 102 19 15 7 12 21 103 20 20 9 19 16 104 21 18 8 15 22 105 20 23 14 11 29 106 17 25 14 11 15 107 18 21 8 10 17 108 19 24 9 13 15 109 22 25 14 15 21 110 15 17 14 12 21 111 14 13 8 12 19 112 18 28 8 16 24 113 24 21 8 9 20 114 35 25 7 18 17 115 29 9 6 8 23 116 21 16 8 13 24 117 25 19 6 17 14 118 20 17 11 9 19 119 22 25 14 15 24 120 13 20 11 8 13 121 26 29 11 7 22 122 17 14 11 12 16 123 25 22 14 14 19 124 20 15 8 6 25 125 19 19 20 8 25 126 21 20 11 17 23 127 22 15 8 10 24 128 24 20 11 11 26 129 21 18 10 14 26 130 26 33 14 11 25 131 24 22 11 13 18 132 16 16 9 12 21 133 23 17 9 11 26 134 18 16 8 9 23 135 16 21 10 12 23 136 26 26 13 20 22 137 19 18 13 12 20 138 21 18 12 13 13 139 21 17 8 12 24 140 22 22 13 12 15 141 23 30 14 9 14 142 29 30 12 15 22 143 21 24 14 24 10 144 21 21 15 7 24 145 23 21 13 17 22 146 27 29 16 11 24 147 25 31 9 17 19 148 21 20 9 11 20 149 10 16 9 12 13 150 20 22 8 14 20 151 26 20 7 11 22 152 24 28 16 16 24 153 29 38 11 21 29 154 19 22 9 14 12 155 24 20 11 20 20 156 19 17 9 13 21 157 24 28 14 11 24 158 22 22 13 15 22 159 17 31 16 19 20 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) CM D PE O 7.5234 0.3292 -0.3602 0.1964 0.3991 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -8.581860 -2.188259 -0.005745 2.175091 11.446565 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.52339 2.21429 3.398 0.000865 *** CM 0.32923 0.05505 5.980 1.50e-08 *** D -0.36024 0.10590 -3.402 0.000853 *** PE 0.19644 0.08505 2.310 0.022230 * O 0.39912 0.07057 5.656 7.35e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.399 on 154 degrees of freedom Multiple R-squared: 0.3669, Adjusted R-squared: 0.3505 F-statistic: 22.31 on 4 and 154 DF, p-value: 1.507e-14 > 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.31390809 0.62781618 0.6860919 [2,] 0.18416143 0.36832286 0.8158386 [3,] 0.11305535 0.22611071 0.8869446 [4,] 0.22835872 0.45671745 0.7716413 [5,] 0.20973554 0.41947108 0.7902645 [6,] 0.81275056 0.37449887 0.1872494 [7,] 0.74190122 0.51619756 0.2580988 [8,] 0.69342929 0.61314141 0.3065707 [9,] 0.62476570 0.75046860 0.3752343 [10,] 0.54487503 0.91024994 0.4551250 [11,] 0.51912071 0.96175859 0.4808793 [12,] 0.45418587 0.90837174 0.5458141 [13,] 0.45189011 0.90378023 0.5481099 [14,] 0.43851159 0.87702319 0.5614884 [15,] 0.37533296 0.75066591 0.6246670 [16,] 0.35214447 0.70428895 0.6478555 [17,] 0.38451720 0.76903439 0.6154828 [18,] 0.40096458 0.80192917 0.5990354 [19,] 0.33630755 0.67261511 0.6636924 [20,] 0.29485340 0.58970680 0.7051466 [21,] 0.31591637 0.63183274 0.6840836 [22,] 0.26485639 0.52971279 0.7351436 [23,] 0.21463439 0.42926879 0.7853656 [24,] 0.17312483 0.34624967 0.8268752 [25,] 0.17922309 0.35844619 0.8207769 [26,] 0.36165142 0.72330283 0.6383486 [27,] 0.59728455 0.80543089 0.4027154 [28,] 0.57147563 0.85704873 0.4285244 [29,] 0.67519602 0.64960796 0.3248040 [30,] 0.67923430 0.64153141 0.3207657 [31,] 0.62761688 0.74476623 0.3723831 [32,] 0.58886387 0.82227227 0.4111361 [33,] 0.68532488 0.62935023 0.3146751 [34,] 0.65591490 0.68817019 0.3440851 [35,] 0.61126750 0.77746500 0.3887325 [36,] 0.68053247 0.63893506 0.3194675 [37,] 0.65832081 0.68335838 0.3416792 [38,] 0.67551281 0.64897438 0.3244872 [39,] 0.62900258 0.74199484 0.3709974 [40,] 0.62413823 0.75172354 0.3758618 [41,] 0.75435311 0.49129378 0.2456469 [42,] 0.71702154 0.56595692 0.2829785 [43,] 0.71990236 0.56019527 0.2800976 [44,] 0.68893348 0.62213305 0.3110665 [45,] 0.65362570 0.69274859 0.3463743 [46,] 0.68946989 0.62106022 0.3105301 [47,] 0.65294711 0.69410578 0.3470529 [48,] 0.64523427 0.70953146 0.3547657 [49,] 0.61302174 0.77395652 0.3869783 [50,] 0.57441639 0.85116722 0.4255836 [51,] 0.54429148 0.91141704 0.4557085 [52,] 0.49721334 0.99442669 0.5027867 [53,] 0.45775857 0.91551715 0.5422414 [54,] 0.42156052 0.84312103 0.5784395 [55,] 0.37875671 0.75751341 0.6212433 [56,] 0.33574040 0.67148081 0.6642596 [57,] 0.35650304 0.71300608 0.6434970 [58,] 0.31420383 0.62840765 0.6857962 [59,] 0.32879854 0.65759708 0.6712015 [60,] 0.38676683 0.77353366 0.6132332 [61,] 0.46037290 0.92074579 0.5396271 [62,] 0.42021932 0.84043865 0.5797807 [63,] 0.40369821 0.80739642 0.5963018 [64,] 0.46152633 0.92305267 0.5384737 [65,] 0.41742211 0.83484422 0.5825779 [66,] 0.37638820 0.75277640 0.6236118 [67,] 0.34067646 0.68135293 0.6593235 [68,] 0.30270857 0.60541715 0.6972914 [69,] 0.27910020 0.55820041 0.7208998 [70,] 0.25168086 0.50336172 0.7483191 [71,] 0.21753979 0.43507958 0.7824602 [72,] 0.18864632 0.37729264 0.8113537 [73,] 0.16110915 0.32221829 0.8388909 [74,] 0.14243235 0.28486470 0.8575676 [75,] 0.23241229 0.46482457 0.7675877 [76,] 0.21448735 0.42897470 0.7855126 [77,] 0.18650212 0.37300424 0.8134979 [78,] 0.18556385 0.37112770 0.8144362 [79,] 0.17981467 0.35962933 0.8201853 [80,] 0.18240979 0.36481959 0.8175902 [81,] 0.17263964 0.34527927 0.8273604 [82,] 0.16258548 0.32517096 0.8374145 [83,] 0.16794852 0.33589703 0.8320515 [84,] 0.24133462 0.48266924 0.7586654 [85,] 0.20893944 0.41787887 0.7910606 [86,] 0.19370591 0.38741183 0.8062941 [87,] 0.16298376 0.32596752 0.8370162 [88,] 0.14692995 0.29385990 0.8530700 [89,] 0.15125654 0.30251308 0.8487435 [90,] 0.15208186 0.30416372 0.8479181 [91,] 0.14704716 0.29409432 0.8529528 [92,] 0.14138121 0.28276241 0.8586188 [93,] 0.13741231 0.27482462 0.8625877 [94,] 0.11294939 0.22589877 0.8870506 [95,] 0.09511927 0.19023855 0.9048807 [96,] 0.07751926 0.15503852 0.9224807 [97,] 0.06287594 0.12575189 0.9371241 [98,] 0.06378982 0.12757964 0.9362102 [99,] 0.05512376 0.11024751 0.9448762 [100,] 0.04900256 0.09800512 0.9509974 [101,] 0.04210382 0.08420764 0.9578962 [102,] 0.03216707 0.06433414 0.9678329 [103,] 0.03342375 0.06684750 0.9665763 [104,] 0.04387513 0.08775026 0.9561249 [105,] 0.14445318 0.28890636 0.8555468 [106,] 0.12919215 0.25838431 0.8708078 [107,] 0.53839411 0.92321178 0.4616059 [108,] 0.88813836 0.22372327 0.1118616 [109,] 0.86092683 0.27814634 0.1390732 [110,] 0.90239189 0.19521622 0.0976081 [111,] 0.88139175 0.23721651 0.1186083 [112,] 0.85828489 0.28343022 0.1417151 [113,] 0.89461511 0.21076977 0.1053849 [114,] 0.87655186 0.24689627 0.1234481 [115,] 0.84449058 0.31101885 0.1555094 [116,] 0.87160405 0.25679191 0.1283960 [117,] 0.83792186 0.32415628 0.1620781 [118,] 0.80599532 0.38800936 0.1940047 [119,] 0.76549565 0.46900869 0.2345043 [120,] 0.73410337 0.53179327 0.2658966 [121,] 0.69828730 0.60342539 0.3017127 [122,] 0.64583384 0.70833232 0.3541662 [123,] 0.58688051 0.82623898 0.4131195 [124,] 0.58681734 0.82636531 0.4131827 [125,] 0.58922905 0.82154191 0.4107710 [126,] 0.54187164 0.91625672 0.4581284 [127,] 0.49515839 0.99031678 0.5048416 [128,] 0.64944151 0.70111698 0.3505585 [129,] 0.61290787 0.77418426 0.3870921 [130,] 0.54565508 0.90868985 0.4543449 [131,] 0.54990217 0.90019567 0.4500978 [132,] 0.47554998 0.95109995 0.5244500 [133,] 0.45447522 0.90895044 0.5455248 [134,] 0.42487834 0.84975667 0.5751217 [135,] 0.49106582 0.98213163 0.5089342 [136,] 0.61668357 0.76663285 0.3833164 [137,] 0.54208388 0.91583224 0.4579161 [138,] 0.46693140 0.93386281 0.5330686 [139,] 0.49227394 0.98454788 0.5077261 [140,] 0.43877844 0.87755689 0.5612216 [141,] 0.32747328 0.65494656 0.6725267 [142,] 0.56154023 0.87691955 0.4384598 [143,] 0.53960365 0.92079271 0.4603964 [144,] 0.40081178 0.80162356 0.5991882 > postscript(file="/var/www/html/rcomp/tmp/1mgjw1292685631.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/2mgjw1292685631.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/3mgjw1292685631.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/4mgjw1292685631.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/5mgjw1292685631.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 = 159 Frequency = 1 1 2 3 4 5 6 1.080477379 2.653616944 5.723679458 -1.270806365 1.491827774 -1.120411792 7 8 9 10 11 12 2.355563737 3.629222746 -1.823587670 -0.689361832 -3.741600299 -4.404640808 13 14 15 16 17 18 -8.155267416 -1.077850789 3.559337889 2.844880542 1.054555720 -2.530196227 19 20 21 22 23 24 -2.144419140 -1.008064667 1.448613707 -3.471718812 -3.326744227 -5.830370308 25 26 27 28 29 30 -3.152317152 0.565391419 1.608695922 -4.327666468 0.152910089 0.388391338 31 32 33 34 35 36 -0.164980210 2.894914708 6.159182490 6.792468964 3.400885832 4.559958585 37 38 39 40 41 42 3.025987473 -0.177414721 1.947540025 6.031679306 -1.537226058 1.545782289 43 44 45 46 47 48 -5.578755907 2.799083038 4.350238731 -0.277777590 -3.393653668 7.308477165 49 50 51 52 53 54 -0.005744777 3.226692604 2.119349417 -1.143526599 -4.038230704 -1.548040880 55 56 57 58 59 60 3.443129230 -1.332029103 1.702419563 2.230831823 0.497097928 -1.668611591 61 62 63 64 65 66 1.786588544 1.032576394 0.618617410 4.083189250 0.446148529 4.149970256 67 68 69 70 71 72 -4.587383028 5.528161053 1.254308911 2.715806599 -4.997876464 -0.484333441 73 74 75 76 77 78 -0.481888870 -1.383147067 -0.765831064 -2.232098344 1.708305114 -0.443373982 79 80 81 82 83 84 0.005242363 0.886416022 1.617720322 -6.826057979 -2.448698988 1.052016960 85 86 87 88 89 90 -3.400099178 -3.196489044 3.425448594 2.239102546 2.657350584 -3.915159985 91 92 93 94 95 96 -6.369061206 -1.164876929 -2.776143948 -0.093052608 -2.473683429 3.370502803 97 98 99 100 101 102 -3.693867878 -3.305393897 -3.275402847 -3.301060961 0.178593356 -1.678950212 103 104 105 106 107 108 -0.984092902 -1.294838867 -3.787646372 -1.858443294 -2.304764901 -1.723295214 109 110 111 112 113 114 -0.038904376 -3.815719357 -4.861999277 -8.581859758 2.694312858 11.446565078 115 116 117 118 119 120 9.923719970 -1.041736381 4.455524196 1.491099250 -1.236262717 -3.905451737 121 122 123 124 125 126 2.735798032 0.086853061 4.943474388 -0.736568538 0.876535247 -1.664571107 127 128 129 130 131 132 0.876806509 1.316687152 -1.974394830 0.516485518 3.458301348 -4.287699078 133 134 135 136 137 138 0.583905197 -2.856872534 -6.371868059 1.890318226 -0.106077362 4.131079805 139 140 141 142 143 144 -1.174534871 3.572581514 3.287375404 4.195317504 1.912719231 1.012407304 145 146 147 148 149 150 1.125799475 3.953029048 -0.410159531 -0.009081890 -7.094743502 -2.617102232 151 152 153 154 155 156 3.472193492 0.300083138 -2.771254805 -0.063903794 1.943478934 -1.813369768 157 158 159 0.561777914 0.189437085 -6.680451143 > postscript(file="/var/www/html/rcomp/tmp/6x7ih1292685631.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 1.080477379 NA 1 2.653616944 1.080477379 2 5.723679458 2.653616944 3 -1.270806365 5.723679458 4 1.491827774 -1.270806365 5 -1.120411792 1.491827774 6 2.355563737 -1.120411792 7 3.629222746 2.355563737 8 -1.823587670 3.629222746 9 -0.689361832 -1.823587670 10 -3.741600299 -0.689361832 11 -4.404640808 -3.741600299 12 -8.155267416 -4.404640808 13 -1.077850789 -8.155267416 14 3.559337889 -1.077850789 15 2.844880542 3.559337889 16 1.054555720 2.844880542 17 -2.530196227 1.054555720 18 -2.144419140 -2.530196227 19 -1.008064667 -2.144419140 20 1.448613707 -1.008064667 21 -3.471718812 1.448613707 22 -3.326744227 -3.471718812 23 -5.830370308 -3.326744227 24 -3.152317152 -5.830370308 25 0.565391419 -3.152317152 26 1.608695922 0.565391419 27 -4.327666468 1.608695922 28 0.152910089 -4.327666468 29 0.388391338 0.152910089 30 -0.164980210 0.388391338 31 2.894914708 -0.164980210 32 6.159182490 2.894914708 33 6.792468964 6.159182490 34 3.400885832 6.792468964 35 4.559958585 3.400885832 36 3.025987473 4.559958585 37 -0.177414721 3.025987473 38 1.947540025 -0.177414721 39 6.031679306 1.947540025 40 -1.537226058 6.031679306 41 1.545782289 -1.537226058 42 -5.578755907 1.545782289 43 2.799083038 -5.578755907 44 4.350238731 2.799083038 45 -0.277777590 4.350238731 46 -3.393653668 -0.277777590 47 7.308477165 -3.393653668 48 -0.005744777 7.308477165 49 3.226692604 -0.005744777 50 2.119349417 3.226692604 51 -1.143526599 2.119349417 52 -4.038230704 -1.143526599 53 -1.548040880 -4.038230704 54 3.443129230 -1.548040880 55 -1.332029103 3.443129230 56 1.702419563 -1.332029103 57 2.230831823 1.702419563 58 0.497097928 2.230831823 59 -1.668611591 0.497097928 60 1.786588544 -1.668611591 61 1.032576394 1.786588544 62 0.618617410 1.032576394 63 4.083189250 0.618617410 64 0.446148529 4.083189250 65 4.149970256 0.446148529 66 -4.587383028 4.149970256 67 5.528161053 -4.587383028 68 1.254308911 5.528161053 69 2.715806599 1.254308911 70 -4.997876464 2.715806599 71 -0.484333441 -4.997876464 72 -0.481888870 -0.484333441 73 -1.383147067 -0.481888870 74 -0.765831064 -1.383147067 75 -2.232098344 -0.765831064 76 1.708305114 -2.232098344 77 -0.443373982 1.708305114 78 0.005242363 -0.443373982 79 0.886416022 0.005242363 80 1.617720322 0.886416022 81 -6.826057979 1.617720322 82 -2.448698988 -6.826057979 83 1.052016960 -2.448698988 84 -3.400099178 1.052016960 85 -3.196489044 -3.400099178 86 3.425448594 -3.196489044 87 2.239102546 3.425448594 88 2.657350584 2.239102546 89 -3.915159985 2.657350584 90 -6.369061206 -3.915159985 91 -1.164876929 -6.369061206 92 -2.776143948 -1.164876929 93 -0.093052608 -2.776143948 94 -2.473683429 -0.093052608 95 3.370502803 -2.473683429 96 -3.693867878 3.370502803 97 -3.305393897 -3.693867878 98 -3.275402847 -3.305393897 99 -3.301060961 -3.275402847 100 0.178593356 -3.301060961 101 -1.678950212 0.178593356 102 -0.984092902 -1.678950212 103 -1.294838867 -0.984092902 104 -3.787646372 -1.294838867 105 -1.858443294 -3.787646372 106 -2.304764901 -1.858443294 107 -1.723295214 -2.304764901 108 -0.038904376 -1.723295214 109 -3.815719357 -0.038904376 110 -4.861999277 -3.815719357 111 -8.581859758 -4.861999277 112 2.694312858 -8.581859758 113 11.446565078 2.694312858 114 9.923719970 11.446565078 115 -1.041736381 9.923719970 116 4.455524196 -1.041736381 117 1.491099250 4.455524196 118 -1.236262717 1.491099250 119 -3.905451737 -1.236262717 120 2.735798032 -3.905451737 121 0.086853061 2.735798032 122 4.943474388 0.086853061 123 -0.736568538 4.943474388 124 0.876535247 -0.736568538 125 -1.664571107 0.876535247 126 0.876806509 -1.664571107 127 1.316687152 0.876806509 128 -1.974394830 1.316687152 129 0.516485518 -1.974394830 130 3.458301348 0.516485518 131 -4.287699078 3.458301348 132 0.583905197 -4.287699078 133 -2.856872534 0.583905197 134 -6.371868059 -2.856872534 135 1.890318226 -6.371868059 136 -0.106077362 1.890318226 137 4.131079805 -0.106077362 138 -1.174534871 4.131079805 139 3.572581514 -1.174534871 140 3.287375404 3.572581514 141 4.195317504 3.287375404 142 1.912719231 4.195317504 143 1.012407304 1.912719231 144 1.125799475 1.012407304 145 3.953029048 1.125799475 146 -0.410159531 3.953029048 147 -0.009081890 -0.410159531 148 -7.094743502 -0.009081890 149 -2.617102232 -7.094743502 150 3.472193492 -2.617102232 151 0.300083138 3.472193492 152 -2.771254805 0.300083138 153 -0.063903794 -2.771254805 154 1.943478934 -0.063903794 155 -1.813369768 1.943478934 156 0.561777914 -1.813369768 157 0.189437085 0.561777914 158 -6.680451143 0.189437085 159 NA -6.680451143 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.653616944 1.080477379 [2,] 5.723679458 2.653616944 [3,] -1.270806365 5.723679458 [4,] 1.491827774 -1.270806365 [5,] -1.120411792 1.491827774 [6,] 2.355563737 -1.120411792 [7,] 3.629222746 2.355563737 [8,] -1.823587670 3.629222746 [9,] -0.689361832 -1.823587670 [10,] -3.741600299 -0.689361832 [11,] -4.404640808 -3.741600299 [12,] -8.155267416 -4.404640808 [13,] -1.077850789 -8.155267416 [14,] 3.559337889 -1.077850789 [15,] 2.844880542 3.559337889 [16,] 1.054555720 2.844880542 [17,] -2.530196227 1.054555720 [18,] -2.144419140 -2.530196227 [19,] -1.008064667 -2.144419140 [20,] 1.448613707 -1.008064667 [21,] -3.471718812 1.448613707 [22,] -3.326744227 -3.471718812 [23,] -5.830370308 -3.326744227 [24,] -3.152317152 -5.830370308 [25,] 0.565391419 -3.152317152 [26,] 1.608695922 0.565391419 [27,] -4.327666468 1.608695922 [28,] 0.152910089 -4.327666468 [29,] 0.388391338 0.152910089 [30,] -0.164980210 0.388391338 [31,] 2.894914708 -0.164980210 [32,] 6.159182490 2.894914708 [33,] 6.792468964 6.159182490 [34,] 3.400885832 6.792468964 [35,] 4.559958585 3.400885832 [36,] 3.025987473 4.559958585 [37,] -0.177414721 3.025987473 [38,] 1.947540025 -0.177414721 [39,] 6.031679306 1.947540025 [40,] -1.537226058 6.031679306 [41,] 1.545782289 -1.537226058 [42,] -5.578755907 1.545782289 [43,] 2.799083038 -5.578755907 [44,] 4.350238731 2.799083038 [45,] -0.277777590 4.350238731 [46,] -3.393653668 -0.277777590 [47,] 7.308477165 -3.393653668 [48,] -0.005744777 7.308477165 [49,] 3.226692604 -0.005744777 [50,] 2.119349417 3.226692604 [51,] -1.143526599 2.119349417 [52,] -4.038230704 -1.143526599 [53,] -1.548040880 -4.038230704 [54,] 3.443129230 -1.548040880 [55,] -1.332029103 3.443129230 [56,] 1.702419563 -1.332029103 [57,] 2.230831823 1.702419563 [58,] 0.497097928 2.230831823 [59,] -1.668611591 0.497097928 [60,] 1.786588544 -1.668611591 [61,] 1.032576394 1.786588544 [62,] 0.618617410 1.032576394 [63,] 4.083189250 0.618617410 [64,] 0.446148529 4.083189250 [65,] 4.149970256 0.446148529 [66,] -4.587383028 4.149970256 [67,] 5.528161053 -4.587383028 [68,] 1.254308911 5.528161053 [69,] 2.715806599 1.254308911 [70,] -4.997876464 2.715806599 [71,] -0.484333441 -4.997876464 [72,] -0.481888870 -0.484333441 [73,] -1.383147067 -0.481888870 [74,] -0.765831064 -1.383147067 [75,] -2.232098344 -0.765831064 [76,] 1.708305114 -2.232098344 [77,] -0.443373982 1.708305114 [78,] 0.005242363 -0.443373982 [79,] 0.886416022 0.005242363 [80,] 1.617720322 0.886416022 [81,] -6.826057979 1.617720322 [82,] -2.448698988 -6.826057979 [83,] 1.052016960 -2.448698988 [84,] -3.400099178 1.052016960 [85,] -3.196489044 -3.400099178 [86,] 3.425448594 -3.196489044 [87,] 2.239102546 3.425448594 [88,] 2.657350584 2.239102546 [89,] -3.915159985 2.657350584 [90,] -6.369061206 -3.915159985 [91,] -1.164876929 -6.369061206 [92,] -2.776143948 -1.164876929 [93,] -0.093052608 -2.776143948 [94,] -2.473683429 -0.093052608 [95,] 3.370502803 -2.473683429 [96,] -3.693867878 3.370502803 [97,] -3.305393897 -3.693867878 [98,] -3.275402847 -3.305393897 [99,] -3.301060961 -3.275402847 [100,] 0.178593356 -3.301060961 [101,] -1.678950212 0.178593356 [102,] -0.984092902 -1.678950212 [103,] -1.294838867 -0.984092902 [104,] -3.787646372 -1.294838867 [105,] -1.858443294 -3.787646372 [106,] -2.304764901 -1.858443294 [107,] -1.723295214 -2.304764901 [108,] -0.038904376 -1.723295214 [109,] -3.815719357 -0.038904376 [110,] -4.861999277 -3.815719357 [111,] -8.581859758 -4.861999277 [112,] 2.694312858 -8.581859758 [113,] 11.446565078 2.694312858 [114,] 9.923719970 11.446565078 [115,] -1.041736381 9.923719970 [116,] 4.455524196 -1.041736381 [117,] 1.491099250 4.455524196 [118,] -1.236262717 1.491099250 [119,] -3.905451737 -1.236262717 [120,] 2.735798032 -3.905451737 [121,] 0.086853061 2.735798032 [122,] 4.943474388 0.086853061 [123,] -0.736568538 4.943474388 [124,] 0.876535247 -0.736568538 [125,] -1.664571107 0.876535247 [126,] 0.876806509 -1.664571107 [127,] 1.316687152 0.876806509 [128,] -1.974394830 1.316687152 [129,] 0.516485518 -1.974394830 [130,] 3.458301348 0.516485518 [131,] -4.287699078 3.458301348 [132,] 0.583905197 -4.287699078 [133,] -2.856872534 0.583905197 [134,] -6.371868059 -2.856872534 [135,] 1.890318226 -6.371868059 [136,] -0.106077362 1.890318226 [137,] 4.131079805 -0.106077362 [138,] -1.174534871 4.131079805 [139,] 3.572581514 -1.174534871 [140,] 3.287375404 3.572581514 [141,] 4.195317504 3.287375404 [142,] 1.912719231 4.195317504 [143,] 1.012407304 1.912719231 [144,] 1.125799475 1.012407304 [145,] 3.953029048 1.125799475 [146,] -0.410159531 3.953029048 [147,] -0.009081890 -0.410159531 [148,] -7.094743502 -0.009081890 [149,] -2.617102232 -7.094743502 [150,] 3.472193492 -2.617102232 [151,] 0.300083138 3.472193492 [152,] -2.771254805 0.300083138 [153,] -0.063903794 -2.771254805 [154,] 1.943478934 -0.063903794 [155,] -1.813369768 1.943478934 [156,] 0.561777914 -1.813369768 [157,] 0.189437085 0.561777914 [158,] -6.680451143 0.189437085 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.653616944 1.080477379 2 5.723679458 2.653616944 3 -1.270806365 5.723679458 4 1.491827774 -1.270806365 5 -1.120411792 1.491827774 6 2.355563737 -1.120411792 7 3.629222746 2.355563737 8 -1.823587670 3.629222746 9 -0.689361832 -1.823587670 10 -3.741600299 -0.689361832 11 -4.404640808 -3.741600299 12 -8.155267416 -4.404640808 13 -1.077850789 -8.155267416 14 3.559337889 -1.077850789 15 2.844880542 3.559337889 16 1.054555720 2.844880542 17 -2.530196227 1.054555720 18 -2.144419140 -2.530196227 19 -1.008064667 -2.144419140 20 1.448613707 -1.008064667 21 -3.471718812 1.448613707 22 -3.326744227 -3.471718812 23 -5.830370308 -3.326744227 24 -3.152317152 -5.830370308 25 0.565391419 -3.152317152 26 1.608695922 0.565391419 27 -4.327666468 1.608695922 28 0.152910089 -4.327666468 29 0.388391338 0.152910089 30 -0.164980210 0.388391338 31 2.894914708 -0.164980210 32 6.159182490 2.894914708 33 6.792468964 6.159182490 34 3.400885832 6.792468964 35 4.559958585 3.400885832 36 3.025987473 4.559958585 37 -0.177414721 3.025987473 38 1.947540025 -0.177414721 39 6.031679306 1.947540025 40 -1.537226058 6.031679306 41 1.545782289 -1.537226058 42 -5.578755907 1.545782289 43 2.799083038 -5.578755907 44 4.350238731 2.799083038 45 -0.277777590 4.350238731 46 -3.393653668 -0.277777590 47 7.308477165 -3.393653668 48 -0.005744777 7.308477165 49 3.226692604 -0.005744777 50 2.119349417 3.226692604 51 -1.143526599 2.119349417 52 -4.038230704 -1.143526599 53 -1.548040880 -4.038230704 54 3.443129230 -1.548040880 55 -1.332029103 3.443129230 56 1.702419563 -1.332029103 57 2.230831823 1.702419563 58 0.497097928 2.230831823 59 -1.668611591 0.497097928 60 1.786588544 -1.668611591 61 1.032576394 1.786588544 62 0.618617410 1.032576394 63 4.083189250 0.618617410 64 0.446148529 4.083189250 65 4.149970256 0.446148529 66 -4.587383028 4.149970256 67 5.528161053 -4.587383028 68 1.254308911 5.528161053 69 2.715806599 1.254308911 70 -4.997876464 2.715806599 71 -0.484333441 -4.997876464 72 -0.481888870 -0.484333441 73 -1.383147067 -0.481888870 74 -0.765831064 -1.383147067 75 -2.232098344 -0.765831064 76 1.708305114 -2.232098344 77 -0.443373982 1.708305114 78 0.005242363 -0.443373982 79 0.886416022 0.005242363 80 1.617720322 0.886416022 81 -6.826057979 1.617720322 82 -2.448698988 -6.826057979 83 1.052016960 -2.448698988 84 -3.400099178 1.052016960 85 -3.196489044 -3.400099178 86 3.425448594 -3.196489044 87 2.239102546 3.425448594 88 2.657350584 2.239102546 89 -3.915159985 2.657350584 90 -6.369061206 -3.915159985 91 -1.164876929 -6.369061206 92 -2.776143948 -1.164876929 93 -0.093052608 -2.776143948 94 -2.473683429 -0.093052608 95 3.370502803 -2.473683429 96 -3.693867878 3.370502803 97 -3.305393897 -3.693867878 98 -3.275402847 -3.305393897 99 -3.301060961 -3.275402847 100 0.178593356 -3.301060961 101 -1.678950212 0.178593356 102 -0.984092902 -1.678950212 103 -1.294838867 -0.984092902 104 -3.787646372 -1.294838867 105 -1.858443294 -3.787646372 106 -2.304764901 -1.858443294 107 -1.723295214 -2.304764901 108 -0.038904376 -1.723295214 109 -3.815719357 -0.038904376 110 -4.861999277 -3.815719357 111 -8.581859758 -4.861999277 112 2.694312858 -8.581859758 113 11.446565078 2.694312858 114 9.923719970 11.446565078 115 -1.041736381 9.923719970 116 4.455524196 -1.041736381 117 1.491099250 4.455524196 118 -1.236262717 1.491099250 119 -3.905451737 -1.236262717 120 2.735798032 -3.905451737 121 0.086853061 2.735798032 122 4.943474388 0.086853061 123 -0.736568538 4.943474388 124 0.876535247 -0.736568538 125 -1.664571107 0.876535247 126 0.876806509 -1.664571107 127 1.316687152 0.876806509 128 -1.974394830 1.316687152 129 0.516485518 -1.974394830 130 3.458301348 0.516485518 131 -4.287699078 3.458301348 132 0.583905197 -4.287699078 133 -2.856872534 0.583905197 134 -6.371868059 -2.856872534 135 1.890318226 -6.371868059 136 -0.106077362 1.890318226 137 4.131079805 -0.106077362 138 -1.174534871 4.131079805 139 3.572581514 -1.174534871 140 3.287375404 3.572581514 141 4.195317504 3.287375404 142 1.912719231 4.195317504 143 1.012407304 1.912719231 144 1.125799475 1.012407304 145 3.953029048 1.125799475 146 -0.410159531 3.953029048 147 -0.009081890 -0.410159531 148 -7.094743502 -0.009081890 149 -2.617102232 -7.094743502 150 3.472193492 -2.617102232 151 0.300083138 3.472193492 152 -2.771254805 0.300083138 153 -0.063903794 -2.771254805 154 1.943478934 -0.063903794 155 -1.813369768 1.943478934 156 0.561777914 -1.813369768 157 0.189437085 0.561777914 158 -6.680451143 0.189437085 > 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/7pyhk1292685631.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/8pyhk1292685631.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/9pyhk1292685631.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/10iqg51292685631.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/11lqfb1292685631.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/1279eh1292685631.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/13lib81292685631.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/14o1se1292685631.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/15ak8j1292685631.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/16v2p71292685631.tab") + } > > try(system("convert tmp/1mgjw1292685631.ps tmp/1mgjw1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/2mgjw1292685631.ps tmp/2mgjw1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/3mgjw1292685631.ps tmp/3mgjw1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/4mgjw1292685631.ps tmp/4mgjw1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/5mgjw1292685631.ps tmp/5mgjw1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/6x7ih1292685631.ps tmp/6x7ih1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/7pyhk1292685631.ps tmp/7pyhk1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/8pyhk1292685631.ps tmp/8pyhk1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/9pyhk1292685631.ps tmp/9pyhk1292685631.png",intern=TRUE)) character(0) > try(system("convert tmp/10iqg51292685631.ps tmp/10iqg51292685631.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.088 1.801 10.024