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(11 + ,12 + ,24 + ,26 + ,38 + ,7 + ,8 + ,25 + ,23 + ,36 + ,17 + ,8 + ,30 + ,25 + ,23 + ,10 + ,8 + ,19 + ,23 + ,30 + ,12 + ,9 + ,22 + ,19 + ,26 + ,12 + ,7 + ,22 + ,29 + ,26 + ,11 + ,4 + ,25 + ,25 + ,30 + ,11 + ,11 + ,23 + ,21 + ,27 + ,12 + ,7 + ,17 + ,22 + ,34 + ,13 + ,7 + ,21 + ,25 + ,28 + ,14 + ,12 + ,19 + ,24 + ,36 + ,16 + ,10 + ,19 + ,18 + ,42 + ,11 + ,10 + ,15 + ,22 + ,31 + ,10 + ,8 + ,16 + ,15 + ,30 + ,11 + ,8 + ,23 + ,22 + ,26 + ,15 + ,4 + ,27 + ,28 + ,16 + ,9 + ,9 + ,22 + ,20 + ,30 + ,11 + ,8 + ,14 + ,12 + ,23 + ,17 + ,7 + ,22 + ,24 + ,28 + ,17 + ,11 + ,23 + ,20 + ,45 + ,11 + ,9 + ,23 + ,21 + ,42 + ,18 + ,11 + ,21 + ,20 + ,50 + ,14 + ,13 + ,19 + ,21 + ,30 + ,10 + ,8 + ,18 + ,23 + ,45 + ,11 + ,8 + ,20 + ,28 + ,30 + ,15 + ,9 + ,23 + ,24 + ,24 + ,15 + ,6 + ,25 + ,24 + ,29 + ,13 + ,9 + ,19 + ,24 + ,30 + ,16 + ,9 + ,24 + ,23 + ,31 + ,13 + ,6 + ,22 + ,23 + ,26 + ,9 + ,6 + ,25 + ,29 + ,34 + ,18 + ,16 + ,26 + ,24 + ,41 + ,18 + ,5 + ,29 + ,18 + ,37 + ,12 + ,7 + ,32 + ,25 + ,33 + ,17 + ,9 + ,25 + ,21 + ,26 + ,9 + ,6 + ,29 + ,26 + ,48 + ,9 + ,6 + ,28 + ,22 + ,44 + ,12 + ,5 + ,17 + ,22 + ,29 + ,18 + ,12 + ,28 + ,22 + ,44 + ,12 + ,7 + ,29 + ,23 + ,37 + ,18 + ,10 + ,26 + ,30 + ,43 + ,14 + ,9 + ,25 + ,23 + ,31 + ,15 + ,8 + ,14 + ,17 + ,28 + ,16 + ,5 + ,25 + ,23 + ,26 + ,10 + ,8 + ,26 + ,23 + ,30 + ,11 + ,8 + ,20 + ,25 + ,27 + ,14 + ,10 + ,18 + ,24 + ,34 + ,9 + ,6 + ,32 + ,24 + ,47 + ,12 + ,8 + ,25 + ,23 + ,39 + ,17 + ,7 + ,25 + ,21 + ,37 + ,5 + ,4 + ,23 + ,24 + ,42 + ,12 + ,8 + ,21 + ,24 + ,27 + ,12 + ,8 + ,20 + ,28 + ,30 + ,6 + ,4 + ,15 + ,16 + ,17 + ,24 + ,20 + ,30 + ,20 + ,36 + ,12 + ,8 + ,24 + ,29 + ,39 + ,12 + ,8 + ,26 + ,27 + ,32 + ,14 + ,6 + ,24 + ,22 + ,25 + ,7 + ,4 + ,22 + ,28 + ,19 + ,13 + ,8 + ,14 + ,16 + ,29 + ,12 + ,9 + ,24 + ,25 + ,26 + ,13 + ,6 + ,24 + ,24 + ,31 + ,14 + ,7 + ,24 + ,28 + ,31 + ,8 + ,9 + ,24 + ,24 + ,31 + ,11 + ,5 + ,19 + ,23 + ,20 + ,9 + ,5 + ,31 + ,30 + ,40 + ,11 + ,8 + ,22 + ,24 + ,39 + ,13 + ,8 + ,27 + ,21 + ,28 + ,10 + ,6 + ,19 + ,25 + ,22 + ,11 + ,8 + ,25 + ,25 + ,31 + ,12 + ,7 + ,20 + ,22 + ,36 + ,9 + ,7 + ,21 + ,23 + ,28 + ,15 + ,9 + ,27 + ,26 + ,39 + ,18 + ,11 + ,23 + ,23 + ,44 + ,15 + ,6 + ,25 + ,25 + ,35 + ,12 + ,8 + ,20 + ,21 + ,33 + ,13 + ,6 + ,21 + ,25 + ,27 + ,14 + ,9 + ,22 + ,24 + ,33 + ,10 + ,8 + ,23 + ,29 + ,31 + ,13 + ,6 + ,25 + ,22 + ,39 + ,13 + ,10 + ,25 + ,27 + ,37 + ,11 + ,8 + ,17 + ,26 + ,24 + ,13 + ,8 + ,19 + ,22 + ,33 + ,16 + ,10 + ,25 + ,24 + ,28 + ,8 + ,5 + ,19 + ,27 + ,37 + ,16 + ,7 + ,20 + ,24 + ,32 + ,11 + ,5 + ,26 + ,24 + ,31 + ,9 + ,8 + ,23 + ,29 + ,29 + ,16 + ,14 + ,27 + ,22 + ,40 + ,12 + ,7 + ,17 + ,21 + ,29 + ,14 + ,8 + ,17 + ,24 + ,40 + ,8 + ,6 + ,19 + ,24 + ,15 + ,9 + ,5 + ,17 + ,23 + ,27 + ,15 + ,6 + ,22 + ,20 + ,32 + ,11 + ,10 + ,21 + ,27 + ,28 + ,21 + ,12 + ,32 + ,26 + ,41 + ,14 + ,9 + ,21 + ,25 + ,47 + ,18 + ,12 + ,21 + ,21 + ,42 + ,12 + ,7 + ,18 + ,21 + ,28 + ,13 + ,8 + ,18 + ,19 + ,32 + ,15 + ,10 + ,23 + ,21 + ,33 + ,12 + ,6 + ,19 + ,21 + ,22 + ,19 + ,10 + ,20 + ,16 + ,29 + ,15 + ,10 + ,21 + ,22 + ,26 + ,11 + ,10 + ,20 + ,29 + ,37 + ,11 + ,5 + ,17 + ,15 + ,39 + ,10 + ,7 + ,18 + ,17 + ,29 + ,13 + ,10 + ,19 + ,15 + ,33 + ,15 + ,11 + ,22 + ,21 + ,39 + ,12 + ,6 + ,15 + ,21 + ,31 + ,12 + ,7 + ,14 + ,19 + ,21 + ,16 + ,12 + ,18 + ,24 + ,36 + ,9 + ,11 + ,24 + ,20 + ,29 + ,18 + ,11 + ,35 + ,17 + ,32 + ,8 + ,11 + ,29 + ,23 + ,15 + ,13 + ,5 + ,21 + ,24 + ,24 + ,17 + ,8 + ,25 + ,14 + ,25 + ,9 + ,6 + ,20 + ,19 + ,28 + ,15 + ,9 + ,22 + ,24 + ,39 + ,8 + ,4 + ,13 + ,13 + ,31 + ,7 + ,4 + ,26 + ,22 + ,40 + ,12 + ,7 + ,17 + ,16 + ,25 + ,14 + ,11 + ,25 + ,19 + ,36 + ,6 + ,6 + ,20 + ,25 + ,23 + ,8 + ,7 + ,19 + ,25 + ,39 + ,17 + ,8 + ,21 + ,23 + ,31 + ,10 + ,4 + ,22 + ,24 + ,23 + ,11 + ,8 + ,24 + ,26 + ,31 + ,14 + ,9 + ,21 + ,26 + ,28 + ,11 + ,8 + ,26 + ,25 + ,47 + ,13 + ,11 + ,24 + ,18 + ,33 + ,12 + ,8 + ,16 + ,21 + ,25 + ,11 + ,5 + ,23 + ,26 + ,26 + ,9 + ,4 + ,18 + ,23 + ,24 + ,12 + ,8 + ,16 + ,23 + ,31 + ,20 + ,10 + ,26 + ,22 + ,39 + ,12 + ,6 + ,19 + ,20 + ,31 + ,13 + ,9 + ,21 + ,13 + ,30 + ,12 + ,9 + ,21 + ,24 + ,25 + ,12 + ,13 + ,22 + ,15 + ,35 + ,9 + ,9 + ,23 + ,14 + ,44 + ,15 + ,10 + ,29 + ,22 + ,42 + ,24 + ,20 + ,21 + ,10 + ,38 + ,7 + ,5 + ,21 + ,24 + ,36 + ,17 + ,11 + ,23 + ,22 + ,34 + ,11 + ,6 + ,27 + ,24 + ,45 + ,17 + ,9 + ,25 + ,19 + ,40 + ,11 + ,7 + ,21 + ,20 + ,29 + ,12 + ,9 + ,10 + ,13 + ,25 + ,14 + ,10 + ,20 + ,20 + ,30 + ,11 + ,9 + ,26 + ,22 + ,27 + ,16 + ,8 + ,24 + ,24 + ,44 + ,21 + ,7 + ,29 + ,29 + ,49 + ,14 + ,6 + ,19 + ,12 + ,31 + ,20 + ,13 + ,24 + ,20 + ,31 + ,13 + ,6 + ,19 + ,21 + ,26 + ,11 + ,8 + ,24 + ,24 + ,42 + ,15 + ,10 + ,22 + ,22 + ,35 + ,19 + ,16 + ,17 + ,20 + ,47) + ,dim=c(5 + ,159) + ,dimnames=list(c('ParentalExpectations' + ,'ParentalCriticism' + ,'PersonalStandards' + ,'Organization' + ,'CM+D') + ,1:159)) > y <- array(NA,dim=c(5,159),dimnames=list(c('ParentalExpectations','ParentalCriticism','PersonalStandards','Organization','CM+D'),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 = '5' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.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 CM+D ParentalExpectations ParentalCriticism PersonalStandards Organization 1 38 11 12 24 26 2 36 7 8 25 23 3 23 17 8 30 25 4 30 10 8 19 23 5 26 12 9 22 19 6 26 12 7 22 29 7 30 11 4 25 25 8 27 11 11 23 21 9 34 12 7 17 22 10 28 13 7 21 25 11 36 14 12 19 24 12 42 16 10 19 18 13 31 11 10 15 22 14 30 10 8 16 15 15 26 11 8 23 22 16 16 15 4 27 28 17 30 9 9 22 20 18 23 11 8 14 12 19 28 17 7 22 24 20 45 17 11 23 20 21 42 11 9 23 21 22 50 18 11 21 20 23 30 14 13 19 21 24 45 10 8 18 23 25 30 11 8 20 28 26 24 15 9 23 24 27 29 15 6 25 24 28 30 13 9 19 24 29 31 16 9 24 23 30 26 13 6 22 23 31 34 9 6 25 29 32 41 18 16 26 24 33 37 18 5 29 18 34 33 12 7 32 25 35 26 17 9 25 21 36 48 9 6 29 26 37 44 9 6 28 22 38 29 12 5 17 22 39 44 18 12 28 22 40 37 12 7 29 23 41 43 18 10 26 30 42 31 14 9 25 23 43 28 15 8 14 17 44 26 16 5 25 23 45 30 10 8 26 23 46 27 11 8 20 25 47 34 14 10 18 24 48 47 9 6 32 24 49 39 12 8 25 23 50 37 17 7 25 21 51 42 5 4 23 24 52 27 12 8 21 24 53 30 12 8 20 28 54 17 6 4 15 16 55 36 24 20 30 20 56 39 12 8 24 29 57 32 12 8 26 27 58 25 14 6 24 22 59 19 7 4 22 28 60 29 13 8 14 16 61 26 12 9 24 25 62 31 13 6 24 24 63 31 14 7 24 28 64 31 8 9 24 24 65 20 11 5 19 23 66 40 9 5 31 30 67 39 11 8 22 24 68 28 13 8 27 21 69 22 10 6 19 25 70 31 11 8 25 25 71 36 12 7 20 22 72 28 9 7 21 23 73 39 15 9 27 26 74 44 18 11 23 23 75 35 15 6 25 25 76 33 12 8 20 21 77 27 13 6 21 25 78 33 14 9 22 24 79 31 10 8 23 29 80 39 13 6 25 22 81 37 13 10 25 27 82 24 11 8 17 26 83 33 13 8 19 22 84 28 16 10 25 24 85 37 8 5 19 27 86 32 16 7 20 24 87 31 11 5 26 24 88 29 9 8 23 29 89 40 16 14 27 22 90 29 12 7 17 21 91 40 14 8 17 24 92 15 8 6 19 24 93 27 9 5 17 23 94 32 15 6 22 20 95 28 11 10 21 27 96 41 21 12 32 26 97 47 14 9 21 25 98 42 18 12 21 21 99 28 12 7 18 21 100 32 13 8 18 19 101 33 15 10 23 21 102 22 12 6 19 21 103 29 19 10 20 16 104 26 15 10 21 22 105 37 11 10 20 29 106 39 11 5 17 15 107 29 10 7 18 17 108 33 13 10 19 15 109 39 15 11 22 21 110 31 12 6 15 21 111 21 12 7 14 19 112 36 16 12 18 24 113 29 9 11 24 20 114 32 18 11 35 17 115 15 8 11 29 23 116 24 13 5 21 24 117 25 17 8 25 14 118 28 9 6 20 19 119 39 15 9 22 24 120 31 8 4 13 13 121 40 7 4 26 22 122 25 12 7 17 16 123 36 14 11 25 19 124 23 6 6 20 25 125 39 8 7 19 25 126 31 17 8 21 23 127 23 10 4 22 24 128 31 11 8 24 26 129 28 14 9 21 26 130 47 11 8 26 25 131 33 13 11 24 18 132 25 12 8 16 21 133 26 11 5 23 26 134 24 9 4 18 23 135 31 12 8 16 23 136 39 20 10 26 22 137 31 12 6 19 20 138 30 13 9 21 13 139 25 12 9 21 24 140 35 12 13 22 15 141 44 9 9 23 14 142 42 15 10 29 22 143 38 24 20 21 10 144 36 7 5 21 24 145 34 17 11 23 22 146 45 11 6 27 24 147 40 17 9 25 19 148 29 11 7 21 20 149 25 12 9 10 13 150 30 14 10 20 20 151 27 11 9 26 22 152 44 16 8 24 24 153 49 21 7 29 29 154 31 14 6 19 12 155 31 20 13 24 20 156 26 13 6 19 21 157 42 11 8 24 24 158 35 15 10 22 22 159 47 19 16 17 20 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ParentalExpectations ParentalCriticism 13.86485 0.15281 0.62937 PersonalStandards Organization 0.44966 0.06778 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -21.6094 -4.3694 -0.9992 3.8344 15.6631 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13.86485 4.24417 3.267 0.00134 ** ParentalExpectations 0.15281 0.19868 0.769 0.44301 ParentalCriticism 0.62937 0.24764 2.542 0.01203 * PersonalStandards 0.44966 0.14304 3.144 0.00200 ** Organization 0.06778 0.15312 0.443 0.65864 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.711 on 154 degrees of freedom Multiple R-squared: 0.1759, Adjusted R-squared: 0.1545 F-statistic: 8.22 on 4 and 154 DF, p-value: 4.912e-06 > 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.1819108 0.3638216 0.81808921 [2,] 0.3007261 0.6014521 0.69927393 [3,] 0.1786663 0.3573325 0.82133373 [4,] 0.1530773 0.3061547 0.84692266 [5,] 0.3916308 0.7832615 0.60836925 [6,] 0.3469259 0.6938518 0.65307411 [7,] 0.2843452 0.5686904 0.71565482 [8,] 0.2377809 0.4755618 0.76221910 [9,] 0.2750491 0.5500983 0.72495086 [10,] 0.2078609 0.4157219 0.79213906 [11,] 0.2472087 0.4944175 0.75279125 [12,] 0.1909513 0.3819025 0.80904873 [13,] 0.3581886 0.7163771 0.64181143 [14,] 0.4829026 0.9658051 0.51709744 [15,] 0.6676675 0.6646650 0.33233249 [16,] 0.7378861 0.5242279 0.26211394 [17,] 0.8931325 0.2137349 0.10686746 [18,] 0.8599760 0.2800481 0.14002405 [19,] 0.8795589 0.2408821 0.12044106 [20,] 0.8504802 0.2990396 0.14951982 [21,] 0.8160152 0.3679695 0.18398477 [22,] 0.7755113 0.4489773 0.22448866 [23,] 0.7355763 0.5288474 0.26442372 [24,] 0.7326421 0.5347158 0.26735791 [25,] 0.6830751 0.6338498 0.31692488 [26,] 0.7101528 0.5796943 0.28984715 [27,] 0.6700130 0.6599740 0.32998702 [28,] 0.6897277 0.6205446 0.31027228 [29,] 0.8797093 0.2405814 0.12029070 [30,] 0.9099132 0.1801736 0.09008679 [31,] 0.8882933 0.2234135 0.11170673 [32,] 0.8813295 0.2373411 0.11867054 [33,] 0.8548350 0.2903300 0.14516499 [34,] 0.8724649 0.2550703 0.12753514 [35,] 0.8512957 0.2974086 0.14870428 [36,] 0.8187376 0.3625248 0.18126241 [37,] 0.8035925 0.3928150 0.19640751 [38,] 0.7822099 0.4355803 0.21779013 [39,] 0.7561326 0.4877348 0.24386739 [40,] 0.7185363 0.5629273 0.28146366 [41,] 0.7866182 0.4267636 0.21338182 [42,] 0.7696042 0.4607915 0.23039576 [43,] 0.7465734 0.5068532 0.25342661 [44,] 0.8255372 0.3489255 0.17446276 [45,] 0.8089210 0.3821579 0.19107897 [46,] 0.7746793 0.4506414 0.22532068 [47,] 0.8010722 0.3978556 0.19892778 [48,] 0.8360728 0.3278545 0.16392723 [49,] 0.8259950 0.3480099 0.17400497 [50,] 0.7978384 0.4043232 0.20216160 [51,] 0.7975178 0.4049643 0.20248217 [52,] 0.8410589 0.3178821 0.15894105 [53,] 0.8112226 0.3775549 0.18877744 [54,] 0.8229207 0.3541586 0.17707928 [55,] 0.7917286 0.4165429 0.20827143 [56,] 0.7609497 0.4781006 0.23905030 [57,] 0.7334421 0.5331158 0.26655788 [58,] 0.7557930 0.4884140 0.24420702 [59,] 0.7425499 0.5149001 0.25745006 [60,] 0.7452333 0.5095333 0.25476666 [61,] 0.7449425 0.5101150 0.25505750 [62,] 0.7501296 0.4997408 0.24987041 [63,] 0.7175845 0.5648310 0.28241550 [64,] 0.7063589 0.5872822 0.29364111 [65,] 0.6721168 0.6557665 0.32788325 [66,] 0.6408978 0.7182043 0.35910217 [67,] 0.6732761 0.6534478 0.32672389 [68,] 0.6390301 0.7219399 0.36096994 [69,] 0.5981833 0.8036333 0.40181665 [70,] 0.5688979 0.8622042 0.43110212 [71,] 0.5232627 0.9534746 0.47673731 [72,] 0.4796069 0.9592137 0.52039313 [73,] 0.4765871 0.9531741 0.52341294 [74,] 0.4337251 0.8674502 0.56627489 [75,] 0.4222026 0.8444052 0.57779741 [76,] 0.3825648 0.7651296 0.61743521 [77,] 0.3956447 0.7912893 0.60435534 [78,] 0.4225693 0.8451386 0.57743072 [79,] 0.3845146 0.7690292 0.61548538 [80,] 0.3422625 0.6845250 0.65773749 [81,] 0.3120787 0.6241574 0.68792128 [82,] 0.2742052 0.5484104 0.72579479 [83,] 0.2373219 0.4746438 0.76267811 [84,] 0.2766257 0.5532514 0.72337431 [85,] 0.4212920 0.8425840 0.57870798 [86,] 0.3775684 0.7551368 0.62243160 [87,] 0.3354295 0.6708591 0.66457045 [88,] 0.3187873 0.6375746 0.68121269 [89,] 0.2787663 0.5575325 0.72123373 [90,] 0.4148606 0.8297211 0.58513945 [91,] 0.4140764 0.8281527 0.58592363 [92,] 0.3720845 0.7441690 0.62791552 [93,] 0.3294874 0.6589749 0.67051257 [94,] 0.2887506 0.5775013 0.71124937 [95,] 0.3050779 0.6101557 0.69492213 [96,] 0.2837437 0.5674875 0.71625626 [97,] 0.2964154 0.5928309 0.70358456 [98,] 0.2699540 0.5399079 0.73004604 [99,] 0.3406620 0.6813239 0.65933805 [100,] 0.2967129 0.5934258 0.70328712 [101,] 0.2581052 0.5162104 0.74189478 [102,] 0.2353128 0.4706256 0.76468719 [103,] 0.2047832 0.4095664 0.79521679 [104,] 0.2081700 0.4163400 0.79183000 [105,] 0.1765066 0.3530131 0.82349343 [106,] 0.1597583 0.3195167 0.84024166 [107,] 0.1798456 0.3596912 0.82015440 [108,] 0.6644533 0.6710933 0.33554667 [109,] 0.6649520 0.6700961 0.33504803 [110,] 0.7386789 0.5226422 0.26132112 [111,] 0.6984405 0.6031190 0.30155949 [112,] 0.6760951 0.6478098 0.32390490 [113,] 0.7053575 0.5892849 0.29464247 [114,] 0.7088404 0.5823192 0.29115962 [115,] 0.6673363 0.6653275 0.33266373 [116,] 0.6186347 0.7627306 0.38136529 [117,] 0.6236236 0.7527527 0.37637637 [118,] 0.6752541 0.6494917 0.32474586 [119,] 0.6255432 0.7489137 0.37445683 [120,] 0.6509681 0.6980637 0.34903186 [121,] 0.6196845 0.7606310 0.38031548 [122,] 0.6129431 0.7741138 0.38705691 [123,] 0.6885643 0.6228714 0.31143571 [124,] 0.6466067 0.7067866 0.35339332 [125,] 0.6027861 0.7944278 0.39721389 [126,] 0.6271191 0.7457618 0.37288088 [127,] 0.6023581 0.7952838 0.39764191 [128,] 0.5341305 0.9317391 0.46586955 [129,] 0.4693336 0.9386673 0.53066636 [130,] 0.3987072 0.7974144 0.60129282 [131,] 0.3422388 0.6844776 0.65776122 [132,] 0.4313602 0.8627204 0.56863978 [133,] 0.3568539 0.7137078 0.64314612 [134,] 0.5503236 0.8993528 0.44967639 [135,] 0.4808661 0.9617321 0.51913394 [136,] 0.4278441 0.8556881 0.57215593 [137,] 0.3572784 0.7145568 0.64272158 [138,] 0.3090945 0.6181891 0.69090546 [139,] 0.4196224 0.8392448 0.58037758 [140,] 0.3729542 0.7459084 0.62704582 [141,] 0.2723964 0.5447928 0.72760360 [142,] 0.1931607 0.3863215 0.80683926 [143,] 0.1420506 0.2841011 0.85794945 [144,] 0.1108886 0.2217773 0.88911136 > postscript(file="/var/www/html/rcomp/tmp/1b3cb1291330973.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/2b3cb1291330973.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/3lube1291330973.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/4lube1291330973.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/5lube1291330973.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 2.34774901 3.23011397 -13.68180304 -0.53033770 -6.54317278 -5.96224898 7 8 9 10 11 12 -0.99920589 -7.23432097 4.76051956 -3.39427055 2.27319817 9.63300346 13 14 15 16 17 18 0.92454923 1.36089026 -6.41400483 -16.71309034 -2.15253786 -4.68925139 19 20 21 22 23 24 -4.38737135 9.91662846 9.02441028 15.66314457 -4.15282522 14.91932297 25 26 27 28 29 30 -1.47170731 -9.79015283 -3.80137728 -1.68589973 -3.32483797 -5.07900410 31 32 33 34 35 36 1.77655031 0.99689012 2.97761450 -3.18773265 -8.79174236 14.18124989 37 38 39 40 41 42 10.90203353 1.01925082 5.75059280 2.29681084 6.36639941 -3.46888820 43 44 45 46 47 48 -0.63937600 -6.25703613 -3.67796236 -4.26836508 1.98159009 11.96782938 49 50 51 52 53 54 5.46608787 3.46698889 12.88472750 -4.80305021 -1.62451253 -8.12854643 55 56 57 58 59 60 -8.96492338 5.50906406 -2.25469578 -7.06334990 -10.24234526 0.73401519 61 62 63 64 65 66 -7.84917858 -1.04610618 -2.09940001 -2.17017696 -8.79504604 5.64017120 67 68 69 70 71 72 6.90009434 -6.45047719 -7.40716794 -2.51666840 5.41153757 -2.64748818 73 74 75 76 77 78 3.27564302 8.56048100 2.13084197 1.84995269 -3.76490493 -0.18768695 79 80 81 82 83 84 -1.73566484 6.63979465 1.78342841 -5.98716383 2.07902739 -7.47164501 85 86 87 88 89 90 8.39224664 0.66475520 -1.01045144 -3.58285962 1.24713264 -0.17169969 91 92 93 94 95 96 9.68998201 -14.03377675 -0.59011427 0.81872770 -5.11231849 0.22241149 97 98 99 100 101 102 14.19419297 6.96599820 -1.62136035 1.73203029 -1.21617622 -7.44165539 103 104 105 106 107 108 -4.13951137 -7.38463564 4.20178069 11.64652126 -0.04462693 1.29476135 109 110 111 112 113 114 4.60411882 3.35698727 -6.68715620 2.41724839 -5.31059045 -8.42876250 115 116 117 118 119 120 -21.60943079 -6.06775855 -8.68791151 -1.29733891 5.65950783 6.66850670 121 122 123 124 125 126 9.36569656 -3.83279596 0.54350353 -6.24560772 9.26907687 -1.49929557 127 128 129 130 131 132 -6.42963793 -2.13478848 -4.87358777 13.03367093 -1.78624984 -4.35140465 133 134 135 136 137 138 -4.79703094 -3.41040931 1.51303386 2.60303494 1.62612535 -1.83963286 139 140 141 142 143 144 -7.43241584 0.21048770 11.80448595 5.01807904 -2.24016993 6.84907276 145 146 147 148 149 150 -1.21893303 11.91052227 5.34381913 -1.74975638 -1.74056032 -2.64660826 151 152 153 154 155 156 -7.39235246 10.23674691 12.51487939 1.86276088 -6.25017912 -3.59446061 157 158 159 9.00077301 1.16570370 11.16215387 > postscript(file="/var/www/html/rcomp/tmp/6w4az1291330973.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 2.34774901 NA 1 3.23011397 2.34774901 2 -13.68180304 3.23011397 3 -0.53033770 -13.68180304 4 -6.54317278 -0.53033770 5 -5.96224898 -6.54317278 6 -0.99920589 -5.96224898 7 -7.23432097 -0.99920589 8 4.76051956 -7.23432097 9 -3.39427055 4.76051956 10 2.27319817 -3.39427055 11 9.63300346 2.27319817 12 0.92454923 9.63300346 13 1.36089026 0.92454923 14 -6.41400483 1.36089026 15 -16.71309034 -6.41400483 16 -2.15253786 -16.71309034 17 -4.68925139 -2.15253786 18 -4.38737135 -4.68925139 19 9.91662846 -4.38737135 20 9.02441028 9.91662846 21 15.66314457 9.02441028 22 -4.15282522 15.66314457 23 14.91932297 -4.15282522 24 -1.47170731 14.91932297 25 -9.79015283 -1.47170731 26 -3.80137728 -9.79015283 27 -1.68589973 -3.80137728 28 -3.32483797 -1.68589973 29 -5.07900410 -3.32483797 30 1.77655031 -5.07900410 31 0.99689012 1.77655031 32 2.97761450 0.99689012 33 -3.18773265 2.97761450 34 -8.79174236 -3.18773265 35 14.18124989 -8.79174236 36 10.90203353 14.18124989 37 1.01925082 10.90203353 38 5.75059280 1.01925082 39 2.29681084 5.75059280 40 6.36639941 2.29681084 41 -3.46888820 6.36639941 42 -0.63937600 -3.46888820 43 -6.25703613 -0.63937600 44 -3.67796236 -6.25703613 45 -4.26836508 -3.67796236 46 1.98159009 -4.26836508 47 11.96782938 1.98159009 48 5.46608787 11.96782938 49 3.46698889 5.46608787 50 12.88472750 3.46698889 51 -4.80305021 12.88472750 52 -1.62451253 -4.80305021 53 -8.12854643 -1.62451253 54 -8.96492338 -8.12854643 55 5.50906406 -8.96492338 56 -2.25469578 5.50906406 57 -7.06334990 -2.25469578 58 -10.24234526 -7.06334990 59 0.73401519 -10.24234526 60 -7.84917858 0.73401519 61 -1.04610618 -7.84917858 62 -2.09940001 -1.04610618 63 -2.17017696 -2.09940001 64 -8.79504604 -2.17017696 65 5.64017120 -8.79504604 66 6.90009434 5.64017120 67 -6.45047719 6.90009434 68 -7.40716794 -6.45047719 69 -2.51666840 -7.40716794 70 5.41153757 -2.51666840 71 -2.64748818 5.41153757 72 3.27564302 -2.64748818 73 8.56048100 3.27564302 74 2.13084197 8.56048100 75 1.84995269 2.13084197 76 -3.76490493 1.84995269 77 -0.18768695 -3.76490493 78 -1.73566484 -0.18768695 79 6.63979465 -1.73566484 80 1.78342841 6.63979465 81 -5.98716383 1.78342841 82 2.07902739 -5.98716383 83 -7.47164501 2.07902739 84 8.39224664 -7.47164501 85 0.66475520 8.39224664 86 -1.01045144 0.66475520 87 -3.58285962 -1.01045144 88 1.24713264 -3.58285962 89 -0.17169969 1.24713264 90 9.68998201 -0.17169969 91 -14.03377675 9.68998201 92 -0.59011427 -14.03377675 93 0.81872770 -0.59011427 94 -5.11231849 0.81872770 95 0.22241149 -5.11231849 96 14.19419297 0.22241149 97 6.96599820 14.19419297 98 -1.62136035 6.96599820 99 1.73203029 -1.62136035 100 -1.21617622 1.73203029 101 -7.44165539 -1.21617622 102 -4.13951137 -7.44165539 103 -7.38463564 -4.13951137 104 4.20178069 -7.38463564 105 11.64652126 4.20178069 106 -0.04462693 11.64652126 107 1.29476135 -0.04462693 108 4.60411882 1.29476135 109 3.35698727 4.60411882 110 -6.68715620 3.35698727 111 2.41724839 -6.68715620 112 -5.31059045 2.41724839 113 -8.42876250 -5.31059045 114 -21.60943079 -8.42876250 115 -6.06775855 -21.60943079 116 -8.68791151 -6.06775855 117 -1.29733891 -8.68791151 118 5.65950783 -1.29733891 119 6.66850670 5.65950783 120 9.36569656 6.66850670 121 -3.83279596 9.36569656 122 0.54350353 -3.83279596 123 -6.24560772 0.54350353 124 9.26907687 -6.24560772 125 -1.49929557 9.26907687 126 -6.42963793 -1.49929557 127 -2.13478848 -6.42963793 128 -4.87358777 -2.13478848 129 13.03367093 -4.87358777 130 -1.78624984 13.03367093 131 -4.35140465 -1.78624984 132 -4.79703094 -4.35140465 133 -3.41040931 -4.79703094 134 1.51303386 -3.41040931 135 2.60303494 1.51303386 136 1.62612535 2.60303494 137 -1.83963286 1.62612535 138 -7.43241584 -1.83963286 139 0.21048770 -7.43241584 140 11.80448595 0.21048770 141 5.01807904 11.80448595 142 -2.24016993 5.01807904 143 6.84907276 -2.24016993 144 -1.21893303 6.84907276 145 11.91052227 -1.21893303 146 5.34381913 11.91052227 147 -1.74975638 5.34381913 148 -1.74056032 -1.74975638 149 -2.64660826 -1.74056032 150 -7.39235246 -2.64660826 151 10.23674691 -7.39235246 152 12.51487939 10.23674691 153 1.86276088 12.51487939 154 -6.25017912 1.86276088 155 -3.59446061 -6.25017912 156 9.00077301 -3.59446061 157 1.16570370 9.00077301 158 11.16215387 1.16570370 159 NA 11.16215387 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.23011397 2.34774901 [2,] -13.68180304 3.23011397 [3,] -0.53033770 -13.68180304 [4,] -6.54317278 -0.53033770 [5,] -5.96224898 -6.54317278 [6,] -0.99920589 -5.96224898 [7,] -7.23432097 -0.99920589 [8,] 4.76051956 -7.23432097 [9,] -3.39427055 4.76051956 [10,] 2.27319817 -3.39427055 [11,] 9.63300346 2.27319817 [12,] 0.92454923 9.63300346 [13,] 1.36089026 0.92454923 [14,] -6.41400483 1.36089026 [15,] -16.71309034 -6.41400483 [16,] -2.15253786 -16.71309034 [17,] -4.68925139 -2.15253786 [18,] -4.38737135 -4.68925139 [19,] 9.91662846 -4.38737135 [20,] 9.02441028 9.91662846 [21,] 15.66314457 9.02441028 [22,] -4.15282522 15.66314457 [23,] 14.91932297 -4.15282522 [24,] -1.47170731 14.91932297 [25,] -9.79015283 -1.47170731 [26,] -3.80137728 -9.79015283 [27,] -1.68589973 -3.80137728 [28,] -3.32483797 -1.68589973 [29,] -5.07900410 -3.32483797 [30,] 1.77655031 -5.07900410 [31,] 0.99689012 1.77655031 [32,] 2.97761450 0.99689012 [33,] -3.18773265 2.97761450 [34,] -8.79174236 -3.18773265 [35,] 14.18124989 -8.79174236 [36,] 10.90203353 14.18124989 [37,] 1.01925082 10.90203353 [38,] 5.75059280 1.01925082 [39,] 2.29681084 5.75059280 [40,] 6.36639941 2.29681084 [41,] -3.46888820 6.36639941 [42,] -0.63937600 -3.46888820 [43,] -6.25703613 -0.63937600 [44,] -3.67796236 -6.25703613 [45,] -4.26836508 -3.67796236 [46,] 1.98159009 -4.26836508 [47,] 11.96782938 1.98159009 [48,] 5.46608787 11.96782938 [49,] 3.46698889 5.46608787 [50,] 12.88472750 3.46698889 [51,] -4.80305021 12.88472750 [52,] -1.62451253 -4.80305021 [53,] -8.12854643 -1.62451253 [54,] -8.96492338 -8.12854643 [55,] 5.50906406 -8.96492338 [56,] -2.25469578 5.50906406 [57,] -7.06334990 -2.25469578 [58,] -10.24234526 -7.06334990 [59,] 0.73401519 -10.24234526 [60,] -7.84917858 0.73401519 [61,] -1.04610618 -7.84917858 [62,] -2.09940001 -1.04610618 [63,] -2.17017696 -2.09940001 [64,] -8.79504604 -2.17017696 [65,] 5.64017120 -8.79504604 [66,] 6.90009434 5.64017120 [67,] -6.45047719 6.90009434 [68,] -7.40716794 -6.45047719 [69,] -2.51666840 -7.40716794 [70,] 5.41153757 -2.51666840 [71,] -2.64748818 5.41153757 [72,] 3.27564302 -2.64748818 [73,] 8.56048100 3.27564302 [74,] 2.13084197 8.56048100 [75,] 1.84995269 2.13084197 [76,] -3.76490493 1.84995269 [77,] -0.18768695 -3.76490493 [78,] -1.73566484 -0.18768695 [79,] 6.63979465 -1.73566484 [80,] 1.78342841 6.63979465 [81,] -5.98716383 1.78342841 [82,] 2.07902739 -5.98716383 [83,] -7.47164501 2.07902739 [84,] 8.39224664 -7.47164501 [85,] 0.66475520 8.39224664 [86,] -1.01045144 0.66475520 [87,] -3.58285962 -1.01045144 [88,] 1.24713264 -3.58285962 [89,] -0.17169969 1.24713264 [90,] 9.68998201 -0.17169969 [91,] -14.03377675 9.68998201 [92,] -0.59011427 -14.03377675 [93,] 0.81872770 -0.59011427 [94,] -5.11231849 0.81872770 [95,] 0.22241149 -5.11231849 [96,] 14.19419297 0.22241149 [97,] 6.96599820 14.19419297 [98,] -1.62136035 6.96599820 [99,] 1.73203029 -1.62136035 [100,] -1.21617622 1.73203029 [101,] -7.44165539 -1.21617622 [102,] -4.13951137 -7.44165539 [103,] -7.38463564 -4.13951137 [104,] 4.20178069 -7.38463564 [105,] 11.64652126 4.20178069 [106,] -0.04462693 11.64652126 [107,] 1.29476135 -0.04462693 [108,] 4.60411882 1.29476135 [109,] 3.35698727 4.60411882 [110,] -6.68715620 3.35698727 [111,] 2.41724839 -6.68715620 [112,] -5.31059045 2.41724839 [113,] -8.42876250 -5.31059045 [114,] -21.60943079 -8.42876250 [115,] -6.06775855 -21.60943079 [116,] -8.68791151 -6.06775855 [117,] -1.29733891 -8.68791151 [118,] 5.65950783 -1.29733891 [119,] 6.66850670 5.65950783 [120,] 9.36569656 6.66850670 [121,] -3.83279596 9.36569656 [122,] 0.54350353 -3.83279596 [123,] -6.24560772 0.54350353 [124,] 9.26907687 -6.24560772 [125,] -1.49929557 9.26907687 [126,] -6.42963793 -1.49929557 [127,] -2.13478848 -6.42963793 [128,] -4.87358777 -2.13478848 [129,] 13.03367093 -4.87358777 [130,] -1.78624984 13.03367093 [131,] -4.35140465 -1.78624984 [132,] -4.79703094 -4.35140465 [133,] -3.41040931 -4.79703094 [134,] 1.51303386 -3.41040931 [135,] 2.60303494 1.51303386 [136,] 1.62612535 2.60303494 [137,] -1.83963286 1.62612535 [138,] -7.43241584 -1.83963286 [139,] 0.21048770 -7.43241584 [140,] 11.80448595 0.21048770 [141,] 5.01807904 11.80448595 [142,] -2.24016993 5.01807904 [143,] 6.84907276 -2.24016993 [144,] -1.21893303 6.84907276 [145,] 11.91052227 -1.21893303 [146,] 5.34381913 11.91052227 [147,] -1.74975638 5.34381913 [148,] -1.74056032 -1.74975638 [149,] -2.64660826 -1.74056032 [150,] -7.39235246 -2.64660826 [151,] 10.23674691 -7.39235246 [152,] 12.51487939 10.23674691 [153,] 1.86276088 12.51487939 [154,] -6.25017912 1.86276088 [155,] -3.59446061 -6.25017912 [156,] 9.00077301 -3.59446061 [157,] 1.16570370 9.00077301 [158,] 11.16215387 1.16570370 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.23011397 2.34774901 2 -13.68180304 3.23011397 3 -0.53033770 -13.68180304 4 -6.54317278 -0.53033770 5 -5.96224898 -6.54317278 6 -0.99920589 -5.96224898 7 -7.23432097 -0.99920589 8 4.76051956 -7.23432097 9 -3.39427055 4.76051956 10 2.27319817 -3.39427055 11 9.63300346 2.27319817 12 0.92454923 9.63300346 13 1.36089026 0.92454923 14 -6.41400483 1.36089026 15 -16.71309034 -6.41400483 16 -2.15253786 -16.71309034 17 -4.68925139 -2.15253786 18 -4.38737135 -4.68925139 19 9.91662846 -4.38737135 20 9.02441028 9.91662846 21 15.66314457 9.02441028 22 -4.15282522 15.66314457 23 14.91932297 -4.15282522 24 -1.47170731 14.91932297 25 -9.79015283 -1.47170731 26 -3.80137728 -9.79015283 27 -1.68589973 -3.80137728 28 -3.32483797 -1.68589973 29 -5.07900410 -3.32483797 30 1.77655031 -5.07900410 31 0.99689012 1.77655031 32 2.97761450 0.99689012 33 -3.18773265 2.97761450 34 -8.79174236 -3.18773265 35 14.18124989 -8.79174236 36 10.90203353 14.18124989 37 1.01925082 10.90203353 38 5.75059280 1.01925082 39 2.29681084 5.75059280 40 6.36639941 2.29681084 41 -3.46888820 6.36639941 42 -0.63937600 -3.46888820 43 -6.25703613 -0.63937600 44 -3.67796236 -6.25703613 45 -4.26836508 -3.67796236 46 1.98159009 -4.26836508 47 11.96782938 1.98159009 48 5.46608787 11.96782938 49 3.46698889 5.46608787 50 12.88472750 3.46698889 51 -4.80305021 12.88472750 52 -1.62451253 -4.80305021 53 -8.12854643 -1.62451253 54 -8.96492338 -8.12854643 55 5.50906406 -8.96492338 56 -2.25469578 5.50906406 57 -7.06334990 -2.25469578 58 -10.24234526 -7.06334990 59 0.73401519 -10.24234526 60 -7.84917858 0.73401519 61 -1.04610618 -7.84917858 62 -2.09940001 -1.04610618 63 -2.17017696 -2.09940001 64 -8.79504604 -2.17017696 65 5.64017120 -8.79504604 66 6.90009434 5.64017120 67 -6.45047719 6.90009434 68 -7.40716794 -6.45047719 69 -2.51666840 -7.40716794 70 5.41153757 -2.51666840 71 -2.64748818 5.41153757 72 3.27564302 -2.64748818 73 8.56048100 3.27564302 74 2.13084197 8.56048100 75 1.84995269 2.13084197 76 -3.76490493 1.84995269 77 -0.18768695 -3.76490493 78 -1.73566484 -0.18768695 79 6.63979465 -1.73566484 80 1.78342841 6.63979465 81 -5.98716383 1.78342841 82 2.07902739 -5.98716383 83 -7.47164501 2.07902739 84 8.39224664 -7.47164501 85 0.66475520 8.39224664 86 -1.01045144 0.66475520 87 -3.58285962 -1.01045144 88 1.24713264 -3.58285962 89 -0.17169969 1.24713264 90 9.68998201 -0.17169969 91 -14.03377675 9.68998201 92 -0.59011427 -14.03377675 93 0.81872770 -0.59011427 94 -5.11231849 0.81872770 95 0.22241149 -5.11231849 96 14.19419297 0.22241149 97 6.96599820 14.19419297 98 -1.62136035 6.96599820 99 1.73203029 -1.62136035 100 -1.21617622 1.73203029 101 -7.44165539 -1.21617622 102 -4.13951137 -7.44165539 103 -7.38463564 -4.13951137 104 4.20178069 -7.38463564 105 11.64652126 4.20178069 106 -0.04462693 11.64652126 107 1.29476135 -0.04462693 108 4.60411882 1.29476135 109 3.35698727 4.60411882 110 -6.68715620 3.35698727 111 2.41724839 -6.68715620 112 -5.31059045 2.41724839 113 -8.42876250 -5.31059045 114 -21.60943079 -8.42876250 115 -6.06775855 -21.60943079 116 -8.68791151 -6.06775855 117 -1.29733891 -8.68791151 118 5.65950783 -1.29733891 119 6.66850670 5.65950783 120 9.36569656 6.66850670 121 -3.83279596 9.36569656 122 0.54350353 -3.83279596 123 -6.24560772 0.54350353 124 9.26907687 -6.24560772 125 -1.49929557 9.26907687 126 -6.42963793 -1.49929557 127 -2.13478848 -6.42963793 128 -4.87358777 -2.13478848 129 13.03367093 -4.87358777 130 -1.78624984 13.03367093 131 -4.35140465 -1.78624984 132 -4.79703094 -4.35140465 133 -3.41040931 -4.79703094 134 1.51303386 -3.41040931 135 2.60303494 1.51303386 136 1.62612535 2.60303494 137 -1.83963286 1.62612535 138 -7.43241584 -1.83963286 139 0.21048770 -7.43241584 140 11.80448595 0.21048770 141 5.01807904 11.80448595 142 -2.24016993 5.01807904 143 6.84907276 -2.24016993 144 -1.21893303 6.84907276 145 11.91052227 -1.21893303 146 5.34381913 11.91052227 147 -1.74975638 5.34381913 148 -1.74056032 -1.74975638 149 -2.64660826 -1.74056032 150 -7.39235246 -2.64660826 151 10.23674691 -7.39235246 152 12.51487939 10.23674691 153 1.86276088 12.51487939 154 -6.25017912 1.86276088 155 -3.59446061 -6.25017912 156 9.00077301 -3.59446061 157 1.16570370 9.00077301 158 11.16215387 1.16570370 > 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/77ds21291330973.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/87ds21291330973.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/97ds21291330973.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/10zm941291330973.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/113nqa1291330973.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/12onoy1291330973.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/13dpp21291330974.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/14yq5q1291330974.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/1518mw1291330974.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/16nrk21291330974.tab") + } > > try(system("convert tmp/1b3cb1291330973.ps tmp/1b3cb1291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/2b3cb1291330973.ps tmp/2b3cb1291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/3lube1291330973.ps tmp/3lube1291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/4lube1291330973.ps tmp/4lube1291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/5lube1291330973.ps tmp/5lube1291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/6w4az1291330973.ps tmp/6w4az1291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/77ds21291330973.ps tmp/77ds21291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/87ds21291330973.ps tmp/87ds21291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/97ds21291330973.ps tmp/97ds21291330973.png",intern=TRUE)) character(0) > try(system("convert tmp/10zm941291330973.ps tmp/10zm941291330973.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.996 1.761 8.965