R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(24 + ,14 + ,11 + ,12 + ,24 + ,26 + ,25 + ,11 + ,7 + ,8 + ,25 + ,23 + ,17 + ,6 + ,17 + ,8 + ,30 + ,25 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,18 + ,8 + ,12 + ,9 + ,22 + ,19 + ,16 + ,10 + ,12 + ,7 + ,22 + ,29 + ,20 + ,10 + ,11 + ,4 + ,25 + ,25 + ,16 + ,11 + ,11 + ,11 + ,23 + ,21 + ,18 + ,16 + ,12 + ,7 + ,17 + ,22 + ,17 + ,11 + ,13 + ,7 + ,21 + ,25 + ,23 + ,13 + ,14 + ,12 + ,19 + ,24 + ,30 + ,12 + ,16 + ,10 + ,19 + ,18 + ,23 + ,8 + ,11 + ,10 + ,15 + ,22 + ,18 + ,12 + ,10 + ,8 + ,16 + ,15 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,12 + ,4 + ,15 + ,4 + ,27 + ,28 + ,21 + ,9 + ,9 + ,9 + ,22 + ,20 + ,15 + ,8 + ,11 + ,8 + ,14 + ,12 + ,20 + ,8 + ,17 + ,7 + ,22 + ,24 + ,31 + ,14 + ,17 + ,11 + ,23 + ,20 + ,27 + ,15 + ,11 + ,9 + ,23 + ,21 + ,34 + ,16 + ,18 + ,11 + ,21 + ,20 + ,21 + ,9 + ,14 + ,13 + ,19 + ,21 + ,31 + ,14 + ,10 + ,8 + ,18 + ,23 + ,19 + ,11 + ,11 + ,8 + ,20 + ,28 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,21 + ,9 + ,13 + ,9 + ,19 + ,24 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,17 + ,9 + ,13 + ,6 + ,22 + ,23 + ,24 + ,10 + ,9 + ,6 + ,25 + ,29 + ,25 + ,16 + ,18 + ,16 + ,26 + ,24 + ,26 + ,11 + ,18 + ,5 + ,29 + ,18 + ,25 + ,8 + ,12 + ,7 + ,32 + ,25 + ,17 + ,9 + ,17 + ,9 + ,25 + ,21 + ,32 + ,16 + ,9 + ,6 + ,29 + ,26 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,13 + ,16 + ,12 + ,5 + ,17 + ,22 + ,32 + ,12 + ,18 + ,12 + ,28 + ,22 + ,25 + ,12 + ,12 + ,7 + ,29 + ,23 + ,29 + ,14 + ,18 + ,10 + ,26 + ,30 + ,22 + ,9 + ,14 + ,9 + ,25 + ,23 + ,18 + ,10 + ,15 + ,8 + ,14 + ,17 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,20 + ,10 + ,10 + ,8 + ,26 + ,23 + ,15 + ,12 + ,11 + ,8 + ,20 + ,25 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,33 + ,14 + ,9 + ,6 + ,32 + ,24 + ,29 + ,10 + ,12 + ,8 + ,25 + ,23 + ,23 + ,14 + ,17 + ,7 + ,25 + ,21 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,18 + ,9 + ,12 + ,8 + ,21 + ,24 + ,20 + ,10 + ,12 + ,8 + ,20 + ,28 + ,11 + ,6 + ,6 + ,4 + ,15 + ,16 + ,28 + ,8 + ,24 + ,20 + ,30 + ,20 + ,26 + ,13 + ,12 + ,8 + ,24 + ,29 + ,22 + ,10 + ,12 + ,8 + ,26 + ,27 + ,17 + ,8 + ,14 + ,6 + ,24 + ,22 + ,12 + ,7 + ,7 + ,4 + ,22 + ,28 + ,14 + ,15 + ,13 + ,8 + ,14 + ,16 + ,17 + ,9 + ,12 + ,9 + ,24 + ,25 + ,21 + ,10 + ,13 + ,6 + ,24 + ,24 + ,19 + ,12 + ,14 + ,7 + ,24 + ,28 + ,18 + ,13 + ,8 + ,9 + ,24 + ,24 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,29 + ,11 + ,9 + ,5 + ,31 + ,30 + ,31 + ,8 + ,11 + ,8 + ,22 + ,24 + ,19 + ,9 + ,13 + ,8 + ,27 + ,21 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,20 + ,11 + ,11 + ,8 + ,25 + ,25 + ,28 + ,8 + ,12 + ,7 + ,20 + ,22 + ,19 + ,9 + ,9 + ,7 + ,21 + ,23 + ,30 + ,9 + ,15 + ,9 + ,27 + ,26 + ,29 + ,15 + ,18 + ,11 + ,23 + ,23 + ,26 + ,9 + ,15 + ,6 + ,25 + ,25 + ,23 + ,10 + ,12 + ,8 + ,20 + ,21 + ,13 + ,14 + ,13 + ,6 + ,21 + ,25 + ,21 + ,12 + ,14 + ,9 + ,22 + ,24 + ,19 + ,12 + ,10 + ,8 + ,23 + ,29 + ,28 + ,11 + ,13 + ,6 + ,25 + ,22 + ,23 + ,14 + ,13 + ,10 + ,25 + ,27 + ,18 + ,6 + ,11 + ,8 + ,17 + ,26 + ,21 + ,12 + ,13 + ,8 + ,19 + ,22 + ,20 + ,8 + ,16 + ,10 + ,25 + ,24 + ,23 + ,14 + ,8 + ,5 + ,19 + ,27 + ,21 + ,11 + ,16 + ,7 + ,20 + ,24 + ,21 + ,10 + ,11 + ,5 + ,26 + ,24 + ,15 + ,14 + ,9 + ,8 + ,23 + ,29 + ,28 + ,12 + ,16 + ,14 + ,27 + ,22 + ,19 + ,10 + ,12 + ,7 + ,17 + ,21 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,10 + ,5 + ,8 + ,6 + ,19 + ,24 + ,16 + ,11 + ,9 + ,5 + ,17 + ,23 + ,22 + ,10 + ,15 + ,6 + ,22 + ,20 + ,19 + ,9 + ,11 + ,10 + ,21 + ,27 + ,31 + ,10 + ,21 + ,12 + ,32 + ,26 + ,31 + ,16 + ,14 + ,9 + ,21 + ,25 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,19 + ,9 + ,12 + ,7 + ,18 + ,21 + ,22 + ,10 + ,13 + ,8 + ,18 + ,19 + ,23 + ,10 + ,15 + ,10 + ,23 + ,21 + ,15 + ,7 + ,12 + ,6 + ,19 + ,21 + ,20 + ,9 + ,19 + ,10 + ,20 + ,16 + ,18 + ,8 + ,15 + ,10 + ,21 + ,22 + ,23 + ,14 + ,11 + ,10 + ,20 + ,29 + ,25 + ,14 + ,11 + ,5 + ,17 + ,15 + ,21 + ,8 + ,10 + ,7 + ,18 + ,17 + ,24 + ,9 + ,13 + ,10 + ,19 + ,15 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,17 + ,14 + ,12 + ,6 + ,15 + ,21 + ,13 + ,8 + ,12 + ,7 + ,14 + ,19 + ,28 + ,8 + ,16 + ,12 + ,18 + ,24 + ,21 + ,8 + ,9 + ,11 + ,24 + ,20 + ,25 + ,7 + ,18 + ,11 + ,35 + ,17 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,16 + ,8 + ,13 + ,5 + ,21 + ,24 + ,19 + ,6 + ,17 + ,8 + ,25 + ,14 + ,17 + ,11 + ,9 + ,6 + ,20 + ,19 + ,25 + ,14 + ,15 + ,9 + ,22 + ,24 + ,20 + ,11 + ,8 + ,4 + ,13 + ,13 + ,29 + ,11 + ,7 + ,4 + ,26 + ,22 + ,14 + ,11 + ,12 + ,7 + ,17 + ,16 + ,22 + ,14 + ,14 + ,11 + ,25 + ,19 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,19 + ,20 + ,8 + ,7 + ,19 + ,25 + ,20 + ,11 + ,17 + ,8 + ,21 + ,23 + ,15 + ,8 + ,10 + ,4 + ,22 + ,24 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,18 + ,10 + ,14 + ,9 + ,21 + ,26 + ,33 + ,14 + ,11 + ,8 + ,26 + ,25 + ,22 + ,11 + ,13 + ,11 + ,24 + ,18 + ,16 + ,9 + ,12 + ,8 + ,16 + ,21 + ,17 + ,9 + ,11 + ,5 + ,23 + ,26 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,21 + ,10 + ,12 + ,8 + ,16 + ,23 + ,26 + ,13 + ,20 + ,10 + ,26 + ,22 + ,18 + ,13 + ,12 + ,6 + ,19 + ,20 + ,18 + ,12 + ,13 + ,9 + ,21 + ,13 + ,17 + ,8 + ,12 + ,9 + ,21 + ,24 + ,22 + ,13 + ,12 + ,13 + ,22 + ,15 + ,30 + ,14 + ,9 + ,9 + ,23 + ,14 + ,30 + ,12 + ,15 + ,10 + ,29 + ,22 + ,24 + ,14 + ,24 + ,20 + ,21 + ,10 + ,21 + ,15 + ,7 + ,5 + ,21 + ,24 + ,21 + ,13 + ,17 + ,11 + ,23 + ,22 + ,29 + ,16 + ,11 + ,6 + ,27 + ,24 + ,31 + ,9 + ,17 + ,9 + ,25 + ,19 + ,20 + ,9 + ,11 + ,7 + ,21 + ,20 + ,16 + ,9 + ,12 + ,9 + ,10 + ,13 + ,22 + ,8 + ,14 + ,10 + ,20 + ,20 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,28 + ,16 + ,16 + ,8 + ,24 + ,24 + ,38 + ,11 + ,21 + ,7 + ,29 + ,29 + ,22 + ,9 + ,14 + ,6 + ,19 + ,12 + ,20 + ,11 + ,20 + ,13 + ,24 + ,20 + ,17 + ,9 + ,13 + ,6 + ,19 + ,21 + ,28 + ,14 + ,11 + ,8 + ,24 + ,24 + ,22 + ,13 + ,15 + ,10 + ,22 + ,22 + ,31 + ,16 + ,19 + ,16 + ,17 + ,20) + ,dim=c(6 + ,159) + ,dimnames=list(c('ConcernoverMistakes' + ,'Doubtsaboutactions' + ,'ParentalExpectations' + ,'ParentalCriticism' + ,'PersonalStandards' + ,'Organization') + ,1:159)) > y <- array(NA,dim=c(6,159),dimnames=list(c('ConcernoverMistakes','Doubtsaboutactions','ParentalExpectations','ParentalCriticism','PersonalStandards','Organization'),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 = '3' > 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 ParentalExpectations ConcernoverMistakes Doubtsaboutactions 1 11 24 14 2 7 25 11 3 17 17 6 4 10 18 12 5 12 18 8 6 12 16 10 7 11 20 10 8 11 16 11 9 12 18 16 10 13 17 11 11 14 23 13 12 16 30 12 13 11 23 8 14 10 18 12 15 11 15 11 16 15 12 4 17 9 21 9 18 11 15 8 19 17 20 8 20 17 31 14 21 11 27 15 22 18 34 16 23 14 21 9 24 10 31 14 25 11 19 11 26 15 16 8 27 15 20 9 28 13 21 9 29 16 22 9 30 13 17 9 31 9 24 10 32 18 25 16 33 18 26 11 34 12 25 8 35 17 17 9 36 9 32 16 37 9 33 11 38 12 13 16 39 18 32 12 40 12 25 12 41 18 29 14 42 14 22 9 43 15 18 10 44 16 17 9 45 10 20 10 46 11 15 12 47 14 20 14 48 9 33 14 49 12 29 10 50 17 23 14 51 5 26 16 52 12 18 9 53 12 20 10 54 6 11 6 55 24 28 8 56 12 26 13 57 12 22 10 58 14 17 8 59 7 12 7 60 13 14 15 61 12 17 9 62 13 21 10 63 14 19 12 64 8 18 13 65 11 10 10 66 9 29 11 67 11 31 8 68 13 19 9 69 10 9 13 70 11 20 11 71 12 28 8 72 9 19 9 73 15 30 9 74 18 29 15 75 15 26 9 76 12 23 10 77 13 13 14 78 14 21 12 79 10 19 12 80 13 28 11 81 13 23 14 82 11 18 6 83 13 21 12 84 16 20 8 85 8 23 14 86 16 21 11 87 11 21 10 88 9 15 14 89 16 28 12 90 12 19 10 91 14 26 14 92 8 10 5 93 9 16 11 94 15 22 10 95 11 19 9 96 21 31 10 97 14 31 16 98 18 29 13 99 12 19 9 100 13 22 10 101 15 23 10 102 12 15 7 103 19 20 9 104 15 18 8 105 11 23 14 106 11 25 14 107 10 21 8 108 13 24 9 109 15 25 14 110 12 17 14 111 12 13 8 112 16 28 8 113 9 21 8 114 18 25 7 115 8 9 6 116 13 16 8 117 17 19 6 118 9 17 11 119 15 25 14 120 8 20 11 121 7 29 11 122 12 14 11 123 14 22 14 124 6 15 8 125 8 19 20 126 17 20 11 127 10 15 8 128 11 20 11 129 14 18 10 130 11 33 14 131 13 22 11 132 12 16 9 133 11 17 9 134 9 16 8 135 12 21 10 136 20 26 13 137 12 18 13 138 13 18 12 139 12 17 8 140 12 22 13 141 9 30 14 142 15 30 12 143 24 24 14 144 7 21 15 145 17 21 13 146 11 29 16 147 17 31 9 148 11 20 9 149 12 16 9 150 14 22 8 151 11 20 7 152 16 28 16 153 21 38 11 154 14 22 9 155 20 20 11 156 13 17 9 157 11 28 14 158 15 22 13 159 19 31 16 ParentalCriticism PersonalStandards Organization 1 12 24 26 2 8 25 23 3 8 30 25 4 8 19 23 5 9 22 19 6 7 22 29 7 4 25 25 8 11 23 21 9 7 17 22 10 7 21 25 11 12 19 24 12 10 19 18 13 10 15 22 14 8 16 15 15 8 23 22 16 4 27 28 17 9 22 20 18 8 14 12 19 7 22 24 20 11 23 20 21 9 23 21 22 11 21 20 23 13 19 21 24 8 18 23 25 8 20 28 26 9 23 24 27 6 25 24 28 9 19 24 29 9 24 23 30 6 22 23 31 6 25 29 32 16 26 24 33 5 29 18 34 7 32 25 35 9 25 21 36 6 29 26 37 6 28 22 38 5 17 22 39 12 28 22 40 7 29 23 41 10 26 30 42 9 25 23 43 8 14 17 44 5 25 23 45 8 26 23 46 8 20 25 47 10 18 24 48 6 32 24 49 8 25 23 50 7 25 21 51 4 23 24 52 8 21 24 53 8 20 28 54 4 15 16 55 20 30 20 56 8 24 29 57 8 26 27 58 6 24 22 59 4 22 28 60 8 14 16 61 9 24 25 62 6 24 24 63 7 24 28 64 9 24 24 65 5 19 23 66 5 31 30 67 8 22 24 68 8 27 21 69 6 19 25 70 8 25 25 71 7 20 22 72 7 21 23 73 9 27 26 74 11 23 23 75 6 25 25 76 8 20 21 77 6 21 25 78 9 22 24 79 8 23 29 80 6 25 22 81 10 25 27 82 8 17 26 83 8 19 22 84 10 25 24 85 5 19 27 86 7 20 24 87 5 26 24 88 8 23 29 89 14 27 22 90 7 17 21 91 8 17 24 92 6 19 24 93 5 17 23 94 6 22 20 95 10 21 27 96 12 32 26 97 9 21 25 98 12 21 21 99 7 18 21 100 8 18 19 101 10 23 21 102 6 19 21 103 10 20 16 104 10 21 22 105 10 20 29 106 5 17 15 107 7 18 17 108 10 19 15 109 11 22 21 110 6 15 21 111 7 14 19 112 12 18 24 113 11 24 20 114 11 35 17 115 11 29 23 116 5 21 24 117 8 25 14 118 6 20 19 119 9 22 24 120 4 13 13 121 4 26 22 122 7 17 16 123 11 25 19 124 6 20 25 125 7 19 25 126 8 21 23 127 4 22 24 128 8 24 26 129 9 21 26 130 8 26 25 131 11 24 18 132 8 16 21 133 5 23 26 134 4 18 23 135 8 16 23 136 10 26 22 137 6 19 20 138 9 21 13 139 9 21 24 140 13 22 15 141 9 23 14 142 10 29 22 143 20 21 10 144 5 21 24 145 11 23 22 146 6 27 24 147 9 25 19 148 7 21 20 149 9 10 13 150 10 20 20 151 9 26 22 152 8 24 24 153 7 29 29 154 6 19 12 155 13 24 20 156 6 19 21 157 8 24 24 158 10 22 22 159 16 17 20 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ConcernoverMistakes Doubtsaboutactions 6.16888 0.09104 -0.12497 ParentalCriticism PersonalStandards Organization 0.66542 0.11661 -0.08837 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.9072 -1.8280 0.0789 1.8148 7.2694 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.16888 1.77134 3.483 0.000648 *** ConcernoverMistakes 0.09104 0.04811 1.893 0.060307 . Doubtsaboutactions -0.12497 0.08722 -1.433 0.153941 ParentalCriticism 0.66542 0.08630 7.710 1.49e-12 *** PersonalStandards 0.11661 0.06322 1.845 0.067032 . Organization -0.08837 0.06186 -1.429 0.155164 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.695 on 153 degrees of freedom Multiple R-squared: 0.4074, Adjusted R-squared: 0.388 F-statistic: 21.04 on 5 and 153 DF, p-value: 5.71e-16 > 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.55814712 0.88370576 0.44185288 [2,] 0.41762238 0.83524476 0.58237762 [3,] 0.61551337 0.76897326 0.38448663 [4,] 0.79238563 0.41522873 0.20761437 [5,] 0.80349834 0.39300332 0.19650166 [6,] 0.74311935 0.51376131 0.25688065 [7,] 0.66132527 0.67734947 0.33867473 [8,] 0.62350503 0.75298995 0.37649497 [9,] 0.66920332 0.66159336 0.33079668 [10,] 0.58954787 0.82090426 0.41045213 [11,] 0.69693394 0.60613213 0.30306606 [12,] 0.78168841 0.43662319 0.21831159 [13,] 0.73923862 0.52152275 0.26076138 [14,] 0.79886134 0.40227732 0.20113866 [15,] 0.75403734 0.49192531 0.24596266 [16,] 0.78032681 0.43934639 0.21967319 [17,] 0.73126633 0.53746735 0.26873367 [18,] 0.70780116 0.58439768 0.29219884 [19,] 0.68885938 0.62228124 0.31114062 [20,] 0.62850935 0.74298129 0.37149065 [21,] 0.60071040 0.79857920 0.39928960 [22,] 0.54924937 0.90150127 0.45075063 [23,] 0.62909243 0.74181513 0.37090757 [24,] 0.61586546 0.76826907 0.38413454 [25,] 0.68127567 0.63744865 0.31872433 [26,] 0.72626083 0.54747834 0.27373917 [27,] 0.74011987 0.51976026 0.25988013 [28,] 0.77750552 0.44498897 0.22249448 [29,] 0.83049657 0.33900685 0.16950343 [30,] 0.82727426 0.34545148 0.17272574 [31,] 0.81515701 0.36968599 0.18484299 [32,] 0.78632901 0.42734197 0.21367099 [33,] 0.84243798 0.31512404 0.15756202 [34,] 0.80790553 0.38418893 0.19209447 [35,] 0.82033585 0.35932831 0.17966415 [36,] 0.87207945 0.25584109 0.12792055 [37,] 0.88621680 0.22756640 0.11378320 [38,] 0.86265669 0.27468661 0.13734331 [39,] 0.83961325 0.32077349 0.16038675 [40,] 0.86698324 0.26603352 0.13301676 [41,] 0.84665030 0.30669941 0.15334970 [42,] 0.89544062 0.20911875 0.10455938 [43,] 0.93638441 0.12723118 0.06361559 [44,] 0.92039820 0.15920360 0.07960180 [45,] 0.90040197 0.19919606 0.09959803 [46,] 0.92083741 0.15832519 0.07916259 [47,] 0.90600813 0.18798374 0.09399187 [48,] 0.88449498 0.23101003 0.11550502 [49,] 0.86285915 0.27428171 0.13714085 [50,] 0.85529789 0.28940422 0.14470211 [51,] 0.85256865 0.29486271 0.14743135 [52,] 0.83478050 0.33043899 0.16521950 [53,] 0.81271910 0.37456179 0.18728090 [54,] 0.79016049 0.41967903 0.20983951 [55,] 0.78628772 0.42742455 0.21371228 [56,] 0.86182965 0.27634071 0.13817035 [57,] 0.84575730 0.30848539 0.15424270 [58,] 0.84203114 0.31593773 0.15796886 [59,] 0.84170612 0.31658775 0.15829388 [60,] 0.81440963 0.37118073 0.18559037 [61,] 0.78962780 0.42074441 0.21037220 [62,] 0.76740080 0.46519839 0.23259920 [63,] 0.73942001 0.52115999 0.26057999 [64,] 0.74217714 0.51564572 0.25782286 [65,] 0.70977079 0.58045843 0.29022921 [66,] 0.72814555 0.54370891 0.27185445 [67,] 0.73571589 0.52856822 0.26428411 [68,] 0.70049720 0.59900561 0.29950280 [69,] 0.73115066 0.53769868 0.26884934 [70,] 0.69769957 0.60460086 0.30230043 [71,] 0.67280403 0.65439194 0.32719597 [72,] 0.63398527 0.73202947 0.36601473 [73,] 0.59120183 0.81759635 0.40879817 [74,] 0.55541801 0.88916398 0.44458199 [75,] 0.51405927 0.97188145 0.48594073 [76,] 0.48268927 0.96537854 0.51731073 [77,] 0.45384294 0.90768587 0.54615706 [78,] 0.53672363 0.92655274 0.46327637 [79,] 0.49072090 0.98144179 0.50927910 [80,] 0.46903179 0.93806359 0.53096821 [81,] 0.44676626 0.89353252 0.55323374 [82,] 0.40250020 0.80500039 0.59749980 [83,] 0.38403275 0.76806550 0.61596725 [84,] 0.37541611 0.75083222 0.62458389 [85,] 0.33241135 0.66482269 0.66758865 [86,] 0.35284859 0.70569717 0.64715141 [87,] 0.34913333 0.69826667 0.65086667 [88,] 0.38318855 0.76637709 0.61681145 [89,] 0.34473285 0.68946569 0.65526715 [90,] 0.32327788 0.64655576 0.67672212 [91,] 0.28155947 0.56311895 0.71844053 [92,] 0.24245193 0.48490386 0.75754807 [93,] 0.20683405 0.41366810 0.79316595 [94,] 0.17956476 0.35912951 0.82043524 [95,] 0.23990773 0.47981547 0.76009227 [96,] 0.20916923 0.41833845 0.79083077 [97,] 0.19990805 0.39981610 0.80009195 [98,] 0.16761501 0.33523002 0.83238499 [99,] 0.16010469 0.32020937 0.83989531 [100,] 0.14658370 0.29316740 0.85341630 [101,] 0.11967153 0.23934307 0.88032847 [102,] 0.11174092 0.22348183 0.88825908 [103,] 0.09381494 0.18762989 0.90618506 [104,] 0.08206789 0.16413578 0.91793211 [105,] 0.22221754 0.44443508 0.77778246 [106,] 0.19228112 0.38456223 0.80771888 [107,] 0.40341428 0.80682856 0.59658572 [108,] 0.40197055 0.80394109 0.59802945 [109,] 0.42879016 0.85758031 0.57120984 [110,] 0.38999908 0.77999815 0.61000092 [111,] 0.35366890 0.70733780 0.64633110 [112,] 0.31254199 0.62508399 0.68745801 [113,] 0.36355078 0.72710156 0.63644922 [114,] 0.33868335 0.67736670 0.66131665 [115,] 0.29104933 0.58209866 0.70895067 [116,] 0.40726560 0.81453120 0.59273440 [117,] 0.36517300 0.73034600 0.63482700 [118,] 0.45168905 0.90337811 0.54831095 [119,] 0.39601389 0.79202778 0.60398611 [120,] 0.36914535 0.73829069 0.63085465 [121,] 0.31479783 0.62959566 0.68520217 [122,] 0.36530075 0.73060150 0.63469925 [123,] 0.35072593 0.70145187 0.64927407 [124,] 0.29181665 0.58363331 0.70818335 [125,] 0.23833951 0.47667902 0.76166049 [126,] 0.18941538 0.37883076 0.81058462 [127,] 0.15236005 0.30472009 0.84763995 [128,] 0.24237182 0.48474365 0.75762818 [129,] 0.23034119 0.46068238 0.76965881 [130,] 0.20415287 0.40830575 0.79584713 [131,] 0.18459020 0.36918040 0.81540980 [132,] 0.22638273 0.45276546 0.77361727 [133,] 0.43033508 0.86067017 0.56966492 [134,] 0.41834202 0.83668403 0.58165798 [135,] 0.33911052 0.67822104 0.66088948 [136,] 0.31443214 0.62886429 0.68556786 [137,] 0.28133447 0.56266893 0.71866553 [138,] 0.27141906 0.54283812 0.72858094 [139,] 0.19516328 0.39032655 0.80483672 [140,] 0.14267815 0.28535631 0.85732185 [141,] 0.08214864 0.16429728 0.91785136 [142,] 0.04394662 0.08789324 0.95605338 > postscript(file="/var/wessaorg/rcomp/tmp/1kgjd1322162357.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/wessaorg/rcomp/tmp/2aydt1322162357.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/wessaorg/rcomp/tmp/30ooi1322162357.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/wessaorg/rcomp/tmp/4s23u1322162357.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/wessaorg/rcomp/tmp/5v6ns1322162357.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 -4.090293312 -6.276282104 3.420870673 -1.814362151 -1.682999043 0.963595838 7 8 9 10 11 12 0.892392020 -3.396709242 1.495808723 1.760653284 -0.717922304 1.320436052 13 14 15 16 17 18 -2.722250589 -2.171504542 -1.221021859 4.902769700 -4.742776932 -1.430174356 19 20 21 22 23 24 4.907624876 1.524224134 -2.567414962 2.734268338 -1.966277120 -2.631340116 25 26 27 28 29 30 -0.705130827 1.824330730 3.348196224 -0.039463439 2.198076963 1.882776929 31 32 33 34 35 36 -2.449137648 -0.003046509 5.720657186 -1.625304178 3.359931301 -3.159171724 37 38 39 40 41 42 -4.111961986 3.281864963 1.111504344 -0.952320156 3.905616654 0.081467564 43 44 45 46 47 48 2.988507668 5.198373658 -3.062659736 -0.481105072 1.127635399 -4.026733082 49 50 51 52 53 54 -1.765421829 4.769406584 -4.759160459 -0.334133480 0.078853278 -3.417382879 55 56 57 58 59 60 1.242410114 -0.470536803 -0.891256995 2.436212189 -2.139259449 1.889174542 61 62 63 64 65 66 -1.169974005 1.498738964 2.618831121 -4.849488134 1.660293611 -2.725229559 67 68 69 70 71 72 -2.759254097 -0.389945124 0.637576462 -1.644333072 -0.764229188 -2.848121153 73 74 75 76 77 78 0.385032521 3.096395277 2.890319886 -0.812869818 3.165167173 0.985632216 79 80 81 82 83 84 -1.841613083 0.693072597 -0.696640256 -1.065877089 0.824142695 1.561521896 85 86 87 88 89 90 -1.669859223 4.424726252 -0.069054907 -2.227498740 -1.738571004 0.566548415 91 92 93 94 95 96 2.028846992 -2.541633082 -0.527760634 3.287431191 -2.490910641 3.839644082 97 98 99 100 101 102 0.780098642 2.237497265 0.324964398 0.334647610 0.506452129 0.987995798 103 104 105 106 107 108 4.562572921 1.033299400 -1.936850612 0.320821138 -2.335578069 -1.773354111 109 110 111 112 113 114 0.275452518 2.147173167 1.035932391 0.318607621 -6.431820204 0.531222706 115 116 117 118 119 120 -6.907207142 2.719249238 2.849750555 -1.987540331 1.871416344 -1.643776454 121 122 123 124 125 126 -4.183728225 0.704872799 -0.977994496 -4.650153689 -2.063438910 4.645361878 127 128 129 130 131 132 0.359106043 -1.439352349 1.302158858 -2.569555217 -2.324680274 0.165882100 133 134 135 136 137 138 0.696706428 -0.353868960 0.012392980 5.346795277 1.376348351 -0.596719114 139 140 141 142 143 144 -1.033491748 -4.437476066 -5.584112676 -0.492172646 2.522194287 -2.861134821 145 146 147 148 149 150 2.486404933 -0.829571742 1.908610777 -1.204276401 -0.506857021 -0.390998956 151 152 153 154 155 156 -3.191379841 3.280447878 7.269396568 1.805314182 3.703295072 2.055862480 157 158 159 -1.969501358 1.177397983 1.146705129 > postscript(file="/var/wessaorg/rcomp/tmp/6vkqv1322162357.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 -4.090293312 NA 1 -6.276282104 -4.090293312 2 3.420870673 -6.276282104 3 -1.814362151 3.420870673 4 -1.682999043 -1.814362151 5 0.963595838 -1.682999043 6 0.892392020 0.963595838 7 -3.396709242 0.892392020 8 1.495808723 -3.396709242 9 1.760653284 1.495808723 10 -0.717922304 1.760653284 11 1.320436052 -0.717922304 12 -2.722250589 1.320436052 13 -2.171504542 -2.722250589 14 -1.221021859 -2.171504542 15 4.902769700 -1.221021859 16 -4.742776932 4.902769700 17 -1.430174356 -4.742776932 18 4.907624876 -1.430174356 19 1.524224134 4.907624876 20 -2.567414962 1.524224134 21 2.734268338 -2.567414962 22 -1.966277120 2.734268338 23 -2.631340116 -1.966277120 24 -0.705130827 -2.631340116 25 1.824330730 -0.705130827 26 3.348196224 1.824330730 27 -0.039463439 3.348196224 28 2.198076963 -0.039463439 29 1.882776929 2.198076963 30 -2.449137648 1.882776929 31 -0.003046509 -2.449137648 32 5.720657186 -0.003046509 33 -1.625304178 5.720657186 34 3.359931301 -1.625304178 35 -3.159171724 3.359931301 36 -4.111961986 -3.159171724 37 3.281864963 -4.111961986 38 1.111504344 3.281864963 39 -0.952320156 1.111504344 40 3.905616654 -0.952320156 41 0.081467564 3.905616654 42 2.988507668 0.081467564 43 5.198373658 2.988507668 44 -3.062659736 5.198373658 45 -0.481105072 -3.062659736 46 1.127635399 -0.481105072 47 -4.026733082 1.127635399 48 -1.765421829 -4.026733082 49 4.769406584 -1.765421829 50 -4.759160459 4.769406584 51 -0.334133480 -4.759160459 52 0.078853278 -0.334133480 53 -3.417382879 0.078853278 54 1.242410114 -3.417382879 55 -0.470536803 1.242410114 56 -0.891256995 -0.470536803 57 2.436212189 -0.891256995 58 -2.139259449 2.436212189 59 1.889174542 -2.139259449 60 -1.169974005 1.889174542 61 1.498738964 -1.169974005 62 2.618831121 1.498738964 63 -4.849488134 2.618831121 64 1.660293611 -4.849488134 65 -2.725229559 1.660293611 66 -2.759254097 -2.725229559 67 -0.389945124 -2.759254097 68 0.637576462 -0.389945124 69 -1.644333072 0.637576462 70 -0.764229188 -1.644333072 71 -2.848121153 -0.764229188 72 0.385032521 -2.848121153 73 3.096395277 0.385032521 74 2.890319886 3.096395277 75 -0.812869818 2.890319886 76 3.165167173 -0.812869818 77 0.985632216 3.165167173 78 -1.841613083 0.985632216 79 0.693072597 -1.841613083 80 -0.696640256 0.693072597 81 -1.065877089 -0.696640256 82 0.824142695 -1.065877089 83 1.561521896 0.824142695 84 -1.669859223 1.561521896 85 4.424726252 -1.669859223 86 -0.069054907 4.424726252 87 -2.227498740 -0.069054907 88 -1.738571004 -2.227498740 89 0.566548415 -1.738571004 90 2.028846992 0.566548415 91 -2.541633082 2.028846992 92 -0.527760634 -2.541633082 93 3.287431191 -0.527760634 94 -2.490910641 3.287431191 95 3.839644082 -2.490910641 96 0.780098642 3.839644082 97 2.237497265 0.780098642 98 0.324964398 2.237497265 99 0.334647610 0.324964398 100 0.506452129 0.334647610 101 0.987995798 0.506452129 102 4.562572921 0.987995798 103 1.033299400 4.562572921 104 -1.936850612 1.033299400 105 0.320821138 -1.936850612 106 -2.335578069 0.320821138 107 -1.773354111 -2.335578069 108 0.275452518 -1.773354111 109 2.147173167 0.275452518 110 1.035932391 2.147173167 111 0.318607621 1.035932391 112 -6.431820204 0.318607621 113 0.531222706 -6.431820204 114 -6.907207142 0.531222706 115 2.719249238 -6.907207142 116 2.849750555 2.719249238 117 -1.987540331 2.849750555 118 1.871416344 -1.987540331 119 -1.643776454 1.871416344 120 -4.183728225 -1.643776454 121 0.704872799 -4.183728225 122 -0.977994496 0.704872799 123 -4.650153689 -0.977994496 124 -2.063438910 -4.650153689 125 4.645361878 -2.063438910 126 0.359106043 4.645361878 127 -1.439352349 0.359106043 128 1.302158858 -1.439352349 129 -2.569555217 1.302158858 130 -2.324680274 -2.569555217 131 0.165882100 -2.324680274 132 0.696706428 0.165882100 133 -0.353868960 0.696706428 134 0.012392980 -0.353868960 135 5.346795277 0.012392980 136 1.376348351 5.346795277 137 -0.596719114 1.376348351 138 -1.033491748 -0.596719114 139 -4.437476066 -1.033491748 140 -5.584112676 -4.437476066 141 -0.492172646 -5.584112676 142 2.522194287 -0.492172646 143 -2.861134821 2.522194287 144 2.486404933 -2.861134821 145 -0.829571742 2.486404933 146 1.908610777 -0.829571742 147 -1.204276401 1.908610777 148 -0.506857021 -1.204276401 149 -0.390998956 -0.506857021 150 -3.191379841 -0.390998956 151 3.280447878 -3.191379841 152 7.269396568 3.280447878 153 1.805314182 7.269396568 154 3.703295072 1.805314182 155 2.055862480 3.703295072 156 -1.969501358 2.055862480 157 1.177397983 -1.969501358 158 1.146705129 1.177397983 159 NA 1.146705129 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -6.276282104 -4.090293312 [2,] 3.420870673 -6.276282104 [3,] -1.814362151 3.420870673 [4,] -1.682999043 -1.814362151 [5,] 0.963595838 -1.682999043 [6,] 0.892392020 0.963595838 [7,] -3.396709242 0.892392020 [8,] 1.495808723 -3.396709242 [9,] 1.760653284 1.495808723 [10,] -0.717922304 1.760653284 [11,] 1.320436052 -0.717922304 [12,] -2.722250589 1.320436052 [13,] -2.171504542 -2.722250589 [14,] -1.221021859 -2.171504542 [15,] 4.902769700 -1.221021859 [16,] -4.742776932 4.902769700 [17,] -1.430174356 -4.742776932 [18,] 4.907624876 -1.430174356 [19,] 1.524224134 4.907624876 [20,] -2.567414962 1.524224134 [21,] 2.734268338 -2.567414962 [22,] -1.966277120 2.734268338 [23,] -2.631340116 -1.966277120 [24,] -0.705130827 -2.631340116 [25,] 1.824330730 -0.705130827 [26,] 3.348196224 1.824330730 [27,] -0.039463439 3.348196224 [28,] 2.198076963 -0.039463439 [29,] 1.882776929 2.198076963 [30,] -2.449137648 1.882776929 [31,] -0.003046509 -2.449137648 [32,] 5.720657186 -0.003046509 [33,] -1.625304178 5.720657186 [34,] 3.359931301 -1.625304178 [35,] -3.159171724 3.359931301 [36,] -4.111961986 -3.159171724 [37,] 3.281864963 -4.111961986 [38,] 1.111504344 3.281864963 [39,] -0.952320156 1.111504344 [40,] 3.905616654 -0.952320156 [41,] 0.081467564 3.905616654 [42,] 2.988507668 0.081467564 [43,] 5.198373658 2.988507668 [44,] -3.062659736 5.198373658 [45,] -0.481105072 -3.062659736 [46,] 1.127635399 -0.481105072 [47,] -4.026733082 1.127635399 [48,] -1.765421829 -4.026733082 [49,] 4.769406584 -1.765421829 [50,] -4.759160459 4.769406584 [51,] -0.334133480 -4.759160459 [52,] 0.078853278 -0.334133480 [53,] -3.417382879 0.078853278 [54,] 1.242410114 -3.417382879 [55,] -0.470536803 1.242410114 [56,] -0.891256995 -0.470536803 [57,] 2.436212189 -0.891256995 [58,] -2.139259449 2.436212189 [59,] 1.889174542 -2.139259449 [60,] -1.169974005 1.889174542 [61,] 1.498738964 -1.169974005 [62,] 2.618831121 1.498738964 [63,] -4.849488134 2.618831121 [64,] 1.660293611 -4.849488134 [65,] -2.725229559 1.660293611 [66,] -2.759254097 -2.725229559 [67,] -0.389945124 -2.759254097 [68,] 0.637576462 -0.389945124 [69,] -1.644333072 0.637576462 [70,] -0.764229188 -1.644333072 [71,] -2.848121153 -0.764229188 [72,] 0.385032521 -2.848121153 [73,] 3.096395277 0.385032521 [74,] 2.890319886 3.096395277 [75,] -0.812869818 2.890319886 [76,] 3.165167173 -0.812869818 [77,] 0.985632216 3.165167173 [78,] -1.841613083 0.985632216 [79,] 0.693072597 -1.841613083 [80,] -0.696640256 0.693072597 [81,] -1.065877089 -0.696640256 [82,] 0.824142695 -1.065877089 [83,] 1.561521896 0.824142695 [84,] -1.669859223 1.561521896 [85,] 4.424726252 -1.669859223 [86,] -0.069054907 4.424726252 [87,] -2.227498740 -0.069054907 [88,] -1.738571004 -2.227498740 [89,] 0.566548415 -1.738571004 [90,] 2.028846992 0.566548415 [91,] -2.541633082 2.028846992 [92,] -0.527760634 -2.541633082 [93,] 3.287431191 -0.527760634 [94,] -2.490910641 3.287431191 [95,] 3.839644082 -2.490910641 [96,] 0.780098642 3.839644082 [97,] 2.237497265 0.780098642 [98,] 0.324964398 2.237497265 [99,] 0.334647610 0.324964398 [100,] 0.506452129 0.334647610 [101,] 0.987995798 0.506452129 [102,] 4.562572921 0.987995798 [103,] 1.033299400 4.562572921 [104,] -1.936850612 1.033299400 [105,] 0.320821138 -1.936850612 [106,] -2.335578069 0.320821138 [107,] -1.773354111 -2.335578069 [108,] 0.275452518 -1.773354111 [109,] 2.147173167 0.275452518 [110,] 1.035932391 2.147173167 [111,] 0.318607621 1.035932391 [112,] -6.431820204 0.318607621 [113,] 0.531222706 -6.431820204 [114,] -6.907207142 0.531222706 [115,] 2.719249238 -6.907207142 [116,] 2.849750555 2.719249238 [117,] -1.987540331 2.849750555 [118,] 1.871416344 -1.987540331 [119,] -1.643776454 1.871416344 [120,] -4.183728225 -1.643776454 [121,] 0.704872799 -4.183728225 [122,] -0.977994496 0.704872799 [123,] -4.650153689 -0.977994496 [124,] -2.063438910 -4.650153689 [125,] 4.645361878 -2.063438910 [126,] 0.359106043 4.645361878 [127,] -1.439352349 0.359106043 [128,] 1.302158858 -1.439352349 [129,] -2.569555217 1.302158858 [130,] -2.324680274 -2.569555217 [131,] 0.165882100 -2.324680274 [132,] 0.696706428 0.165882100 [133,] -0.353868960 0.696706428 [134,] 0.012392980 -0.353868960 [135,] 5.346795277 0.012392980 [136,] 1.376348351 5.346795277 [137,] -0.596719114 1.376348351 [138,] -1.033491748 -0.596719114 [139,] -4.437476066 -1.033491748 [140,] -5.584112676 -4.437476066 [141,] -0.492172646 -5.584112676 [142,] 2.522194287 -0.492172646 [143,] -2.861134821 2.522194287 [144,] 2.486404933 -2.861134821 [145,] -0.829571742 2.486404933 [146,] 1.908610777 -0.829571742 [147,] -1.204276401 1.908610777 [148,] -0.506857021 -1.204276401 [149,] -0.390998956 -0.506857021 [150,] -3.191379841 -0.390998956 [151,] 3.280447878 -3.191379841 [152,] 7.269396568 3.280447878 [153,] 1.805314182 7.269396568 [154,] 3.703295072 1.805314182 [155,] 2.055862480 3.703295072 [156,] -1.969501358 2.055862480 [157,] 1.177397983 -1.969501358 [158,] 1.146705129 1.177397983 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -6.276282104 -4.090293312 2 3.420870673 -6.276282104 3 -1.814362151 3.420870673 4 -1.682999043 -1.814362151 5 0.963595838 -1.682999043 6 0.892392020 0.963595838 7 -3.396709242 0.892392020 8 1.495808723 -3.396709242 9 1.760653284 1.495808723 10 -0.717922304 1.760653284 11 1.320436052 -0.717922304 12 -2.722250589 1.320436052 13 -2.171504542 -2.722250589 14 -1.221021859 -2.171504542 15 4.902769700 -1.221021859 16 -4.742776932 4.902769700 17 -1.430174356 -4.742776932 18 4.907624876 -1.430174356 19 1.524224134 4.907624876 20 -2.567414962 1.524224134 21 2.734268338 -2.567414962 22 -1.966277120 2.734268338 23 -2.631340116 -1.966277120 24 -0.705130827 -2.631340116 25 1.824330730 -0.705130827 26 3.348196224 1.824330730 27 -0.039463439 3.348196224 28 2.198076963 -0.039463439 29 1.882776929 2.198076963 30 -2.449137648 1.882776929 31 -0.003046509 -2.449137648 32 5.720657186 -0.003046509 33 -1.625304178 5.720657186 34 3.359931301 -1.625304178 35 -3.159171724 3.359931301 36 -4.111961986 -3.159171724 37 3.281864963 -4.111961986 38 1.111504344 3.281864963 39 -0.952320156 1.111504344 40 3.905616654 -0.952320156 41 0.081467564 3.905616654 42 2.988507668 0.081467564 43 5.198373658 2.988507668 44 -3.062659736 5.198373658 45 -0.481105072 -3.062659736 46 1.127635399 -0.481105072 47 -4.026733082 1.127635399 48 -1.765421829 -4.026733082 49 4.769406584 -1.765421829 50 -4.759160459 4.769406584 51 -0.334133480 -4.759160459 52 0.078853278 -0.334133480 53 -3.417382879 0.078853278 54 1.242410114 -3.417382879 55 -0.470536803 1.242410114 56 -0.891256995 -0.470536803 57 2.436212189 -0.891256995 58 -2.139259449 2.436212189 59 1.889174542 -2.139259449 60 -1.169974005 1.889174542 61 1.498738964 -1.169974005 62 2.618831121 1.498738964 63 -4.849488134 2.618831121 64 1.660293611 -4.849488134 65 -2.725229559 1.660293611 66 -2.759254097 -2.725229559 67 -0.389945124 -2.759254097 68 0.637576462 -0.389945124 69 -1.644333072 0.637576462 70 -0.764229188 -1.644333072 71 -2.848121153 -0.764229188 72 0.385032521 -2.848121153 73 3.096395277 0.385032521 74 2.890319886 3.096395277 75 -0.812869818 2.890319886 76 3.165167173 -0.812869818 77 0.985632216 3.165167173 78 -1.841613083 0.985632216 79 0.693072597 -1.841613083 80 -0.696640256 0.693072597 81 -1.065877089 -0.696640256 82 0.824142695 -1.065877089 83 1.561521896 0.824142695 84 -1.669859223 1.561521896 85 4.424726252 -1.669859223 86 -0.069054907 4.424726252 87 -2.227498740 -0.069054907 88 -1.738571004 -2.227498740 89 0.566548415 -1.738571004 90 2.028846992 0.566548415 91 -2.541633082 2.028846992 92 -0.527760634 -2.541633082 93 3.287431191 -0.527760634 94 -2.490910641 3.287431191 95 3.839644082 -2.490910641 96 0.780098642 3.839644082 97 2.237497265 0.780098642 98 0.324964398 2.237497265 99 0.334647610 0.324964398 100 0.506452129 0.334647610 101 0.987995798 0.506452129 102 4.562572921 0.987995798 103 1.033299400 4.562572921 104 -1.936850612 1.033299400 105 0.320821138 -1.936850612 106 -2.335578069 0.320821138 107 -1.773354111 -2.335578069 108 0.275452518 -1.773354111 109 2.147173167 0.275452518 110 1.035932391 2.147173167 111 0.318607621 1.035932391 112 -6.431820204 0.318607621 113 0.531222706 -6.431820204 114 -6.907207142 0.531222706 115 2.719249238 -6.907207142 116 2.849750555 2.719249238 117 -1.987540331 2.849750555 118 1.871416344 -1.987540331 119 -1.643776454 1.871416344 120 -4.183728225 -1.643776454 121 0.704872799 -4.183728225 122 -0.977994496 0.704872799 123 -4.650153689 -0.977994496 124 -2.063438910 -4.650153689 125 4.645361878 -2.063438910 126 0.359106043 4.645361878 127 -1.439352349 0.359106043 128 1.302158858 -1.439352349 129 -2.569555217 1.302158858 130 -2.324680274 -2.569555217 131 0.165882100 -2.324680274 132 0.696706428 0.165882100 133 -0.353868960 0.696706428 134 0.012392980 -0.353868960 135 5.346795277 0.012392980 136 1.376348351 5.346795277 137 -0.596719114 1.376348351 138 -1.033491748 -0.596719114 139 -4.437476066 -1.033491748 140 -5.584112676 -4.437476066 141 -0.492172646 -5.584112676 142 2.522194287 -0.492172646 143 -2.861134821 2.522194287 144 2.486404933 -2.861134821 145 -0.829571742 2.486404933 146 1.908610777 -0.829571742 147 -1.204276401 1.908610777 148 -0.506857021 -1.204276401 149 -0.390998956 -0.506857021 150 -3.191379841 -0.390998956 151 3.280447878 -3.191379841 152 7.269396568 3.280447878 153 1.805314182 7.269396568 154 3.703295072 1.805314182 155 2.055862480 3.703295072 156 -1.969501358 2.055862480 157 1.177397983 -1.969501358 158 1.146705129 1.177397983 > 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/wessaorg/rcomp/tmp/7gzrk1322162357.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/wessaorg/rcomp/tmp/8u8rf1322162357.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/wessaorg/rcomp/tmp/9oasz1322162357.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/wessaorg/rcomp/tmp/1096s91322162357.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11vgsn1322162357.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/wessaorg/rcomp/tmp/12ivie1322162357.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/wessaorg/rcomp/tmp/13257x1322162357.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/wessaorg/rcomp/tmp/14qxt61322162357.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/wessaorg/rcomp/tmp/15wkqr1322162357.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/wessaorg/rcomp/tmp/16si6h1322162357.tab") + } > > try(system("convert tmp/1kgjd1322162357.ps tmp/1kgjd1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/2aydt1322162357.ps tmp/2aydt1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/30ooi1322162357.ps tmp/30ooi1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/4s23u1322162357.ps tmp/4s23u1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/5v6ns1322162357.ps tmp/5v6ns1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/6vkqv1322162357.ps tmp/6vkqv1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/7gzrk1322162357.ps tmp/7gzrk1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/8u8rf1322162357.ps tmp/8u8rf1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/9oasz1322162357.ps tmp/9oasz1322162357.png",intern=TRUE)) character(0) > try(system("convert tmp/1096s91322162357.ps tmp/1096s91322162357.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.038 0.562 5.673