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(9 + ,14 + ,11 + ,12 + ,24 + ,26 + ,9 + ,11 + ,7 + ,8 + ,25 + ,23 + ,9 + ,6 + ,17 + ,8 + ,30 + ,25 + ,9 + ,12 + ,10 + ,8 + ,19 + ,23 + ,9 + ,8 + ,12 + ,9 + ,22 + ,19 + ,9 + ,10 + ,12 + ,7 + ,22 + ,29 + ,10 + ,10 + ,11 + ,4 + ,25 + ,25 + ,10 + ,11 + ,11 + ,11 + ,23 + ,21 + ,10 + ,16 + ,12 + ,7 + ,17 + ,22 + ,10 + ,11 + ,13 + ,7 + ,21 + ,25 + ,10 + ,13 + ,14 + ,12 + ,19 + ,24 + ,10 + ,12 + ,16 + ,10 + ,19 + ,18 + ,10 + ,8 + ,11 + ,10 + ,15 + ,22 + ,10 + ,12 + ,10 + ,8 + ,16 + ,15 + ,10 + ,11 + ,11 + ,8 + ,23 + ,22 + ,10 + ,4 + ,15 + ,4 + ,27 + ,28 + ,10 + ,9 + ,9 + ,9 + ,22 + ,20 + ,10 + ,8 + ,11 + ,8 + ,14 + ,12 + ,10 + ,8 + ,17 + ,7 + ,22 + ,24 + ,10 + ,14 + ,17 + ,11 + ,23 + ,20 + ,10 + ,15 + ,11 + ,9 + ,23 + ,21 + ,10 + ,16 + ,18 + ,11 + ,21 + ,20 + ,10 + ,9 + ,14 + ,13 + ,19 + ,21 + ,10 + ,14 + ,10 + ,8 + ,18 + ,23 + ,10 + ,11 + ,11 + ,8 + ,20 + ,28 + ,10 + ,8 + ,15 + ,9 + ,23 + ,24 + ,10 + ,9 + ,15 + ,6 + ,25 + ,24 + ,10 + ,9 + ,13 + ,9 + ,19 + ,24 + ,10 + ,9 + ,16 + ,9 + ,24 + ,23 + ,10 + ,9 + ,13 + ,6 + ,22 + ,23 + ,10 + ,10 + ,9 + ,6 + ,25 + ,29 + ,10 + ,16 + ,18 + ,16 + ,26 + ,24 + ,10 + ,11 + ,18 + ,5 + ,29 + ,18 + ,10 + ,8 + ,12 + ,7 + ,32 + ,25 + ,10 + ,9 + ,17 + ,9 + ,25 + ,21 + ,10 + ,16 + ,9 + ,6 + ,29 + ,26 + ,10 + ,11 + ,9 + ,6 + ,28 + ,22 + ,10 + ,16 + ,12 + ,5 + ,17 + ,22 + ,10 + ,12 + ,18 + ,12 + ,28 + ,22 + ,10 + ,12 + ,12 + ,7 + ,29 + ,23 + ,10 + ,14 + ,18 + ,10 + ,26 + ,30 + ,10 + ,9 + ,14 + ,9 + ,25 + ,23 + ,10 + ,10 + ,15 + ,8 + ,14 + ,17 + ,10 + ,9 + ,16 + ,5 + ,25 + ,23 + ,10 + ,10 + ,10 + ,8 + ,26 + ,23 + ,10 + ,12 + ,11 + ,8 + ,20 + ,25 + ,10 + ,14 + ,14 + ,10 + ,18 + ,24 + ,10 + ,14 + ,9 + ,6 + ,32 + ,24 + ,10 + ,10 + ,12 + ,8 + ,25 + ,23 + ,10 + ,14 + ,17 + ,7 + ,25 + ,21 + ,10 + ,16 + ,5 + ,4 + ,23 + ,24 + ,10 + ,9 + ,12 + ,8 + ,21 + ,24 + ,10 + ,10 + ,12 + ,8 + ,20 + ,28 + ,10 + ,6 + ,6 + ,4 + ,15 + ,16 + ,10 + ,8 + ,24 + ,20 + ,30 + ,20 + ,10 + ,13 + ,12 + ,8 + ,24 + ,29 + ,10 + ,10 + ,12 + ,8 + ,26 + ,27 + ,10 + ,8 + ,14 + ,6 + ,24 + ,22 + ,10 + ,7 + ,7 + ,4 + ,22 + ,28 + ,10 + ,15 + ,13 + ,8 + ,14 + ,16 + ,10 + ,9 + ,12 + ,9 + ,24 + ,25 + ,10 + ,10 + ,13 + ,6 + ,24 + ,24 + ,10 + ,12 + ,14 + ,7 + ,24 + ,28 + ,10 + ,13 + ,8 + ,9 + ,24 + ,24 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,10 + ,11 + ,9 + ,5 + ,31 + ,30 + ,10 + ,8 + ,11 + ,8 + ,22 + ,24 + ,10 + ,9 + ,13 + ,8 + ,27 + ,21 + ,10 + ,13 + ,10 + ,6 + ,19 + ,25 + ,10 + ,11 + ,11 + ,8 + ,25 + ,25 + ,10 + ,8 + ,12 + ,7 + ,20 + ,22 + ,10 + ,9 + ,9 + ,7 + ,21 + ,23 + ,10 + ,9 + ,15 + ,9 + ,27 + ,26 + ,10 + ,15 + ,18 + ,11 + ,23 + ,23 + ,10 + ,9 + ,15 + ,6 + ,25 + ,25 + ,10 + ,10 + ,12 + ,8 + ,20 + ,21 + ,10 + ,14 + ,13 + ,6 + ,21 + ,25 + ,10 + ,12 + ,14 + ,9 + ,22 + ,24 + ,10 + ,12 + ,10 + ,8 + ,23 + ,29 + ,10 + ,11 + ,13 + ,6 + ,25 + ,22 + ,10 + ,14 + ,13 + ,10 + ,25 + ,27 + ,10 + ,6 + ,11 + ,8 + ,17 + ,26 + ,10 + ,12 + ,13 + ,8 + ,19 + ,22 + ,10 + ,8 + ,16 + ,10 + ,25 + ,24 + ,10 + ,14 + ,8 + ,5 + ,19 + ,27 + ,10 + ,11 + ,16 + ,7 + ,20 + ,24 + ,10 + ,10 + ,11 + ,5 + ,26 + ,24 + ,10 + ,14 + ,9 + ,8 + ,23 + ,29 + ,10 + ,12 + ,16 + ,14 + ,27 + ,22 + ,10 + ,10 + ,12 + ,7 + ,17 + ,21 + ,10 + ,14 + ,14 + ,8 + ,17 + ,24 + ,10 + ,5 + ,8 + ,6 + ,19 + ,24 + ,10 + ,11 + ,9 + ,5 + ,17 + ,23 + ,10 + ,10 + ,15 + ,6 + ,22 + ,20 + ,10 + ,9 + ,11 + ,10 + ,21 + ,27 + ,10 + ,10 + ,21 + ,12 + ,32 + ,26 + ,10 + ,16 + ,14 + ,9 + ,21 + ,25 + ,10 + ,13 + ,18 + ,12 + ,21 + ,21 + ,10 + ,9 + ,12 + ,7 + ,18 + ,21 + ,10 + ,10 + ,13 + ,8 + ,18 + ,19 + ,10 + ,10 + ,15 + ,10 + ,23 + ,21 + ,10 + ,7 + ,12 + ,6 + ,19 + ,21 + ,10 + ,9 + ,19 + ,10 + ,20 + ,16 + ,10 + ,8 + ,15 + ,10 + ,21 + ,22 + ,10 + ,14 + ,11 + ,10 + ,20 + ,29 + ,10 + ,14 + ,11 + ,5 + ,17 + ,15 + ,10 + ,8 + ,10 + ,7 + ,18 + ,17 + ,10 + ,9 + ,13 + ,10 + ,19 + ,15 + ,10 + ,14 + ,15 + ,11 + ,22 + ,21 + ,10 + ,14 + ,12 + ,6 + ,15 + ,21 + ,10 + ,8 + ,12 + ,7 + ,14 + ,19 + ,10 + ,8 + ,16 + ,12 + ,18 + ,24 + ,10 + ,8 + ,9 + ,11 + ,24 + ,20 + ,10 + ,7 + ,18 + ,11 + ,35 + ,17 + ,10 + ,6 + ,8 + ,11 + ,29 + ,23 + ,10 + ,8 + ,13 + ,5 + ,21 + ,24 + ,10 + ,6 + ,17 + ,8 + ,25 + ,14 + ,10 + ,11 + ,9 + ,6 + ,20 + ,19 + ,10 + ,14 + ,15 + ,9 + ,22 + ,24 + ,10 + ,11 + ,8 + ,4 + ,13 + ,13 + ,10 + ,11 + ,7 + ,4 + ,26 + ,22 + ,10 + ,11 + ,12 + ,7 + ,17 + ,16 + ,10 + ,14 + ,14 + ,11 + ,25 + ,19 + ,10 + ,8 + ,6 + ,6 + ,20 + ,25 + ,10 + ,20 + ,8 + ,7 + ,19 + ,25 + ,10 + ,11 + ,17 + ,8 + ,21 + ,23 + ,10 + ,8 + ,10 + ,4 + ,22 + ,24 + ,10 + ,11 + ,11 + ,8 + ,24 + ,26 + ,10 + ,10 + ,14 + ,9 + ,21 + ,26 + ,10 + ,14 + ,11 + ,8 + ,26 + ,25 + ,10 + ,11 + ,13 + ,11 + ,24 + ,18 + ,10 + ,9 + ,12 + ,8 + ,16 + ,21 + ,10 + ,9 + ,11 + ,5 + ,23 + ,26 + ,10 + ,8 + ,9 + ,4 + ,18 + ,23 + ,10 + ,10 + ,12 + ,8 + ,16 + ,23 + ,10 + ,13 + ,20 + ,10 + ,26 + ,22 + ,10 + ,13 + ,12 + ,6 + ,19 + ,20 + ,10 + ,12 + ,13 + ,9 + ,21 + ,13 + ,10 + ,8 + ,12 + ,9 + ,21 + ,24 + ,10 + ,13 + ,12 + ,13 + ,22 + ,15 + ,10 + ,14 + ,9 + ,9 + ,23 + ,14 + ,10 + ,12 + ,15 + ,10 + ,29 + ,22 + ,10 + ,14 + ,24 + ,20 + ,21 + ,10 + ,10 + ,15 + ,7 + ,5 + ,21 + ,24 + ,10 + ,13 + ,17 + ,11 + ,23 + ,22 + ,10 + ,16 + ,11 + ,6 + ,27 + ,24 + ,10 + ,9 + ,17 + ,9 + ,25 + ,19 + ,10 + ,9 + ,11 + ,7 + ,21 + ,20 + ,10 + ,9 + ,12 + ,9 + ,10 + ,13 + ,10 + ,8 + ,14 + ,10 + ,20 + ,20 + ,10 + ,7 + ,11 + ,9 + ,26 + ,22 + ,10 + ,16 + ,16 + ,8 + ,24 + ,24 + ,10 + ,11 + ,21 + ,7 + ,29 + ,29 + ,10 + ,9 + ,14 + ,6 + ,19 + ,12 + ,10 + ,11 + ,20 + ,13 + ,24 + ,20 + ,10 + ,9 + ,13 + ,6 + ,19 + ,21 + ,10 + ,14 + ,11 + ,8 + ,24 + ,24 + ,10 + ,13 + ,15 + ,10 + ,22 + ,22 + ,10 + ,16 + ,19 + ,16 + ,17 + ,20) + ,dim=c(6 + ,159) + ,dimnames=list(c('Maand' + ,'DoubtsAboutActions' + ,'ParentalExpectations' + ,'ParentalCriticism' + ,'PersonalStandards' + ,'Organization ') + ,1:159)) > y <- array(NA,dim=c(6,159),dimnames=list(c('Maand','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 = '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 PersonalStandards Maand DoubtsAboutActions ParentalExpectations 1 24 9 14 11 2 25 9 11 7 3 30 9 6 17 4 19 9 12 10 5 22 9 8 12 6 22 9 10 12 7 25 10 10 11 8 23 10 11 11 9 17 10 16 12 10 21 10 11 13 11 19 10 13 14 12 19 10 12 16 13 15 10 8 11 14 16 10 12 10 15 23 10 11 11 16 27 10 4 15 17 22 10 9 9 18 14 10 8 11 19 22 10 8 17 20 23 10 14 17 21 23 10 15 11 22 21 10 16 18 23 19 10 9 14 24 18 10 14 10 25 20 10 11 11 26 23 10 8 15 27 25 10 9 15 28 19 10 9 13 29 24 10 9 16 30 22 10 9 13 31 25 10 10 9 32 26 10 16 18 33 29 10 11 18 34 32 10 8 12 35 25 10 9 17 36 29 10 16 9 37 28 10 11 9 38 17 10 16 12 39 28 10 12 18 40 29 10 12 12 41 26 10 14 18 42 25 10 9 14 43 14 10 10 15 44 25 10 9 16 45 26 10 10 10 46 20 10 12 11 47 18 10 14 14 48 32 10 14 9 49 25 10 10 12 50 25 10 14 17 51 23 10 16 5 52 21 10 9 12 53 20 10 10 12 54 15 10 6 6 55 30 10 8 24 56 24 10 13 12 57 26 10 10 12 58 24 10 8 14 59 22 10 7 7 60 14 10 15 13 61 24 10 9 12 62 24 10 10 13 63 24 10 12 14 64 24 10 13 8 65 19 10 10 11 66 31 10 11 9 67 22 10 8 11 68 27 10 9 13 69 19 10 13 10 70 25 10 11 11 71 20 10 8 12 72 21 10 9 9 73 27 10 9 15 74 23 10 15 18 75 25 10 9 15 76 20 10 10 12 77 21 10 14 13 78 22 10 12 14 79 23 10 12 10 80 25 10 11 13 81 25 10 14 13 82 17 10 6 11 83 19 10 12 13 84 25 10 8 16 85 19 10 14 8 86 20 10 11 16 87 26 10 10 11 88 23 10 14 9 89 27 10 12 16 90 17 10 10 12 91 17 10 14 14 92 19 10 5 8 93 17 10 11 9 94 22 10 10 15 95 21 10 9 11 96 32 10 10 21 97 21 10 16 14 98 21 10 13 18 99 18 10 9 12 100 18 10 10 13 101 23 10 10 15 102 19 10 7 12 103 20 10 9 19 104 21 10 8 15 105 20 10 14 11 106 17 10 14 11 107 18 10 8 10 108 19 10 9 13 109 22 10 14 15 110 15 10 14 12 111 14 10 8 12 112 18 10 8 16 113 24 10 8 9 114 35 10 7 18 115 29 10 6 8 116 21 10 8 13 117 25 10 6 17 118 20 10 11 9 119 22 10 14 15 120 13 10 11 8 121 26 10 11 7 122 17 10 11 12 123 25 10 14 14 124 20 10 8 6 125 19 10 20 8 126 21 10 11 17 127 22 10 8 10 128 24 10 11 11 129 21 10 10 14 130 26 10 14 11 131 24 10 11 13 132 16 10 9 12 133 23 10 9 11 134 18 10 8 9 135 16 10 10 12 136 26 10 13 20 137 19 10 13 12 138 21 10 12 13 139 21 10 8 12 140 22 10 13 12 141 23 10 14 9 142 29 10 12 15 143 21 10 14 24 144 21 10 15 7 145 23 10 13 17 146 27 10 16 11 147 25 10 9 17 148 21 10 9 11 149 10 10 9 12 150 20 10 8 14 151 26 10 7 11 152 24 10 16 16 153 29 10 11 21 154 19 10 9 14 155 24 10 11 20 156 19 10 9 13 157 24 10 14 11 158 22 10 13 15 159 17 10 16 19 ParentalCriticism Organization\r t 1 12 26 1 2 8 23 2 3 8 25 3 4 8 23 4 5 9 19 5 6 7 29 6 7 4 25 7 8 11 21 8 9 7 22 9 10 7 25 10 11 12 24 11 12 10 18 12 13 10 22 13 14 8 15 14 15 8 22 15 16 4 28 16 17 9 20 17 18 8 12 18 19 7 24 19 20 11 20 20 21 9 21 21 22 11 20 22 23 13 21 23 24 8 23 24 25 8 28 25 26 9 24 26 27 6 24 27 28 9 24 28 29 9 23 29 30 6 23 30 31 6 29 31 32 16 24 32 33 5 18 33 34 7 25 34 35 9 21 35 36 6 26 36 37 6 22 37 38 5 22 38 39 12 22 39 40 7 23 40 41 10 30 41 42 9 23 42 43 8 17 43 44 5 23 44 45 8 23 45 46 8 25 46 47 10 24 47 48 6 24 48 49 8 23 49 50 7 21 50 51 4 24 51 52 8 24 52 53 8 28 53 54 4 16 54 55 20 20 55 56 8 29 56 57 8 27 57 58 6 22 58 59 4 28 59 60 8 16 60 61 9 25 61 62 6 24 62 63 7 28 63 64 9 24 64 65 5 23 65 66 5 30 66 67 8 24 67 68 8 21 68 69 6 25 69 70 8 25 70 71 7 22 71 72 7 23 72 73 9 26 73 74 11 23 74 75 6 25 75 76 8 21 76 77 6 25 77 78 9 24 78 79 8 29 79 80 6 22 80 81 10 27 81 82 8 26 82 83 8 22 83 84 10 24 84 85 5 27 85 86 7 24 86 87 5 24 87 88 8 29 88 89 14 22 89 90 7 21 90 91 8 24 91 92 6 24 92 93 5 23 93 94 6 20 94 95 10 27 95 96 12 26 96 97 9 25 97 98 12 21 98 99 7 21 99 100 8 19 100 101 10 21 101 102 6 21 102 103 10 16 103 104 10 22 104 105 10 29 105 106 5 15 106 107 7 17 107 108 10 15 108 109 11 21 109 110 6 21 110 111 7 19 111 112 12 24 112 113 11 20 113 114 11 17 114 115 11 23 115 116 5 24 116 117 8 14 117 118 6 19 118 119 9 24 119 120 4 13 120 121 4 22 121 122 7 16 122 123 11 19 123 124 6 25 124 125 7 25 125 126 8 23 126 127 4 24 127 128 8 26 128 129 9 26 129 130 8 25 130 131 11 18 131 132 8 21 132 133 5 26 133 134 4 23 134 135 8 23 135 136 10 22 136 137 6 20 137 138 9 13 138 139 9 24 139 140 13 15 140 141 9 14 141 142 10 22 142 143 20 10 143 144 5 24 144 145 11 22 145 146 6 24 146 147 9 19 147 148 7 20 148 149 9 13 149 150 10 20 150 151 9 22 151 152 8 24 152 153 7 29 153 154 6 12 154 155 13 20 155 156 6 21 156 157 8 24 157 158 10 22 158 159 16 20 159 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Maand DoubtsAboutActions 18.482679 -0.994362 -0.112328 ParentalExpectations ParentalCriticism `Organization\r` 0.339704 0.093101 0.437231 t -0.001326 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.9289 -2.5653 -0.3047 2.2669 12.8267 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 18.482679 16.782381 1.101 0.27250 Maand -0.994362 1.685380 -0.590 0.55607 DoubtsAboutActions -0.112328 0.110148 -1.020 0.30945 ParentalExpectations 0.339704 0.109803 3.094 0.00235 ** ParentalCriticism 0.093101 0.143074 0.651 0.51621 `Organization\r` 0.437231 0.081516 5.364 2.98e-07 *** t -0.001326 0.007110 -0.186 0.85234 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.784 on 152 degrees of freedom Multiple R-squared: 0.2252, Adjusted R-squared: 0.1946 F-statistic: 7.364 on 6 and 152 DF, p-value: 6.292e-07 > 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.04309352 0.08618704 0.9569065 [2,] 0.01247722 0.02495445 0.9875228 [3,] 0.01098171 0.02196341 0.9890183 [4,] 0.02115175 0.04230351 0.9788482 [5,] 0.03771369 0.07542737 0.9622863 [6,] 0.33525479 0.67050959 0.6647452 [7,] 0.28072445 0.56144890 0.7192755 [8,] 0.30008472 0.60016944 0.6999153 [9,] 0.25979713 0.51959426 0.7402029 [10,] 0.19995211 0.39990421 0.8000479 [11,] 0.29916769 0.59833537 0.7008323 [12,] 0.32250506 0.64501012 0.6774949 [13,] 0.25508317 0.51016634 0.7449168 [14,] 0.21465736 0.42931472 0.7853426 [15,] 0.18256036 0.36512072 0.8174396 [16,] 0.15496928 0.30993855 0.8450307 [17,] 0.11841353 0.23682707 0.8815865 [18,] 0.09810110 0.19620220 0.9018989 [19,] 0.08618772 0.17237543 0.9138123 [20,] 0.06820238 0.13640476 0.9317976 [21,] 0.04839911 0.09679821 0.9516009 [22,] 0.04042707 0.08085414 0.9595729 [23,] 0.04426364 0.08852727 0.9557364 [24,] 0.07372730 0.14745459 0.9262727 [25,] 0.20558637 0.41117274 0.7944136 [26,] 0.16491379 0.32982758 0.8350862 [27,] 0.18870177 0.37740354 0.8112982 [28,] 0.20413490 0.40826980 0.7958651 [29,] 0.38802330 0.77604660 0.6119767 [30,] 0.36116110 0.72232221 0.6388389 [31,] 0.38393221 0.76786442 0.6160678 [32,] 0.36222254 0.72444508 0.6377775 [33,] 0.32019751 0.64039501 0.6798025 [34,] 0.58830028 0.82339943 0.4116997 [35,] 0.54684694 0.90630611 0.4531531 [36,] 0.51619287 0.96761426 0.4838071 [37,] 0.54834870 0.90330261 0.4516513 [38,] 0.63298090 0.73403819 0.3670191 [39,] 0.81794493 0.36411014 0.1820551 [40,] 0.78935799 0.42128402 0.2106420 [41,] 0.76097385 0.47805230 0.2390261 [42,] 0.74727810 0.50544380 0.2527219 [43,] 0.74721032 0.50557935 0.2527897 [44,] 0.79817431 0.40365139 0.2018257 [45,] 0.80598650 0.38802700 0.1940135 [46,] 0.82124280 0.35751440 0.1787572 [47,] 0.79814243 0.40371513 0.2018576 [48,] 0.76746198 0.46507604 0.2325380 [49,] 0.73586539 0.52826923 0.2641346 [50,] 0.70835483 0.58329034 0.2916452 [51,] 0.76366936 0.47266128 0.2363306 [52,] 0.72583298 0.54833405 0.2741670 [53,] 0.68986835 0.62026330 0.3101317 [54,] 0.65913188 0.68173624 0.3408681 [55,] 0.63275470 0.73449059 0.3672453 [56,] 0.62470831 0.75058339 0.3752917 [57,] 0.71306676 0.57386649 0.2869332 [58,] 0.67689677 0.64620646 0.3231032 [59,] 0.70689956 0.58620088 0.2931004 [60,] 0.70599939 0.58800122 0.2940006 [61,] 0.68168139 0.63663723 0.3183186 [62,] 0.65699688 0.68600624 0.3430031 [63,] 0.61722097 0.76555806 0.3827790 [64,] 0.59154103 0.81691795 0.4084590 [65,] 0.55260486 0.89479028 0.4473951 [66,] 0.51957733 0.96084533 0.4804227 [67,] 0.48126238 0.96252477 0.5187376 [68,] 0.45356059 0.90712119 0.5464394 [69,] 0.41406605 0.82813210 0.5859340 [70,] 0.37717511 0.75435021 0.6228249 [71,] 0.37738985 0.75477969 0.6226102 [72,] 0.34319174 0.68638348 0.6568083 [73,] 0.42509105 0.85018211 0.5749089 [74,] 0.39960904 0.79921809 0.6003910 [75,] 0.35976361 0.71952721 0.6402364 [76,] 0.33947648 0.67895297 0.6605235 [77,] 0.32882163 0.65764327 0.6711784 [78,] 0.35444225 0.70888449 0.6455578 [79,] 0.31499920 0.62999840 0.6850008 [80,] 0.32518081 0.65036162 0.6748192 [81,] 0.31918662 0.63837324 0.6808134 [82,] 0.35024080 0.70048160 0.6497592 [83,] 0.31913491 0.63826981 0.6808651 [84,] 0.30279514 0.60559028 0.6972049 [85,] 0.26663135 0.53326270 0.7333686 [86,] 0.24202653 0.48405306 0.7579735 [87,] 0.30092994 0.60185989 0.6990701 [88,] 0.26495134 0.52990268 0.7350487 [89,] 0.23129390 0.46258779 0.7687061 [90,] 0.20968766 0.41937532 0.7903123 [91,] 0.18436663 0.36873326 0.8156334 [92,] 0.15702487 0.31404974 0.8429751 [93,] 0.13411153 0.26822306 0.8658885 [94,] 0.11063259 0.22126518 0.8893674 [95,] 0.09230451 0.18460901 0.9076955 [96,] 0.09163063 0.18326126 0.9083694 [97,] 0.07343731 0.14687462 0.9265627 [98,] 0.05925958 0.11851915 0.9407404 [99,] 0.04761078 0.09522157 0.9523892 [100,] 0.03691391 0.07382781 0.9630861 [101,] 0.04856024 0.09712049 0.9514398 [102,] 0.08208735 0.16417469 0.9179127 [103,] 0.15433674 0.30867348 0.8456633 [104,] 0.14899548 0.29799095 0.8510045 [105,] 0.55429771 0.89140458 0.4457023 [106,] 0.69284022 0.61431957 0.3071598 [107,] 0.65305444 0.69389111 0.3469456 [108,] 0.70594638 0.58810724 0.2940536 [109,] 0.65900151 0.68199698 0.3409985 [110,] 0.61469235 0.77061530 0.3853076 [111,] 0.61503388 0.76993223 0.3849661 [112,] 0.69511704 0.60976592 0.3048830 [113,] 0.66161791 0.67676418 0.3383821 [114,] 0.66002138 0.67995723 0.3399786 [115,] 0.60380838 0.79238325 0.3961916 [116,] 0.62829294 0.74341413 0.3717071 [117,] 0.60173830 0.79652341 0.3982617 [118,] 0.54080060 0.91839880 0.4591994 [119,] 0.48100343 0.96200686 0.5189966 [120,] 0.45297133 0.90594266 0.5470287 [121,] 0.41493684 0.82987369 0.5850632 [122,] 0.40725477 0.81450954 0.5927452 [123,] 0.44917940 0.89835881 0.5508206 [124,] 0.38180160 0.76360321 0.6181984 [125,] 0.37068977 0.74137954 0.6293102 [126,] 0.59553364 0.80893272 0.4044664 [127,] 0.52972157 0.94055686 0.4702784 [128,] 0.61244190 0.77511619 0.3875581 [129,] 0.54019755 0.91960490 0.4598025 [130,] 0.63193271 0.73613458 0.3680673 [131,] 0.55581957 0.88836087 0.4441804 [132,] 0.59713794 0.80572413 0.4028621 [133,] 0.59414226 0.81171548 0.4058577 [134,] 0.60996528 0.78006945 0.3900347 [135,] 0.56185869 0.87628263 0.4381413 [136,] 0.45876518 0.91753036 0.5412348 [137,] 0.40710741 0.81421482 0.5928926 [138,] 0.38977487 0.77954974 0.6102251 [139,] 0.26674895 0.53349790 0.7332511 [140,] 0.44450266 0.88900532 0.5554973 > postscript(file="/var/www/html/rcomp/tmp/13rh11293539222.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/23rh11293539222.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/3d0z41293539222.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/4d0z41293539222.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/5d0z41293539222.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 -0.18146436 3.52578863 3.69397401 -3.37834315 0.15008629 -3.81004143 7 8 9 10 11 12 2.55357666 1.76444928 -4.07711614 -2.28882811 -4.43082289 -2.41164445 13 14 15 16 17 18 -6.91003692 -1.87287557 1.61580039 1.22103082 1.85456450 -3.34489563 19 20 21 22 23 24 -2.53546514 0.51635044 2.41719725 -1.59604573 -3.64563451 -3.13281148 25 26 27 28 29 30 -3.99432948 -1.03297944 1.35997678 -4.23859245 0.18085309 -0.51940753 31 32 33 34 35 36 1.32967454 1.20278260 7.28996340 8.74570781 1.72356571 7.32196498 37 38 39 40 41 42 7.51057463 -3.85246961 4.00961547 7.07743660 -1.07472432 1.87749453 43 44 45 46 47 48 -6.63206788 1.57314163 4.44571552 -2.54246858 -5.08456844 10.98767925 49 50 51 52 53 54 2.77161076 2.49129316 3.76132916 -1.77397141 -4.40924211 -2.19982961 55 56 57 58 59 60 3.67294728 -0.50551186 2.03329176 1.50291096 -0.66735030 -4.93125205 61 62 63 64 65 66 0.70762783 1.19811143 -0.75763573 2.95696346 -2.58817207 7.14427136 67 68 69 70 71 72 -0.52671046 5.21922919 -2.87374431 2.37701979 -1.89354841 -0.19801449 73 74 75 76 77 78 2.26719369 -0.95113150 0.98637862 -1.31813346 -1.76992197 -1.17502756 79 80 81 82 83 84 -0.90794167 3.20876414 0.98851529 -6.60594362 -2.86113232 0.61110582 85 86 87 88 89 90 -2.84215915 -3.76995606 4.00376191 -0.33165052 3.56910569 -4.20647303 91 92 93 94 95 96 -5.84003661 -2.62523974 -3.75931723 0.31005039 -2.87515812 5.09248764 97 98 99 100 101 102 -2.13775821 -2.36260979 -3.30686996 -2.75155848 0.50969583 -2.43444830 103 104 105 106 107 108 -1.77264030 -2.14821445 -4.17472297 -0.58665751 -0.98026057 -0.29055822 109 110 111 112 113 114 -0.12348706 -5.63754607 -6.52882758 -6.53797657 3.68330069 12.82665786 115 116 117 118 119 120 7.48930624 -1.86185690 4.64900637 0.92964862 -1.23572195 -2.91840790 121 122 123 124 125 126 6.48754143 -1.86556734 4.10923855 -1.00365706 -1.42690242 -2.71250203 127 128 129 130 131 132 0.26493773 1.01667849 -3.20653600 3.79354530 3.55979460 -5.35622311 133 134 135 136 137 138 0.07795314 -2.94884759 -6.11438019 1.75732929 -1.27684951 3.05375975 139 140 141 142 143 144 -1.86406559 3.26157750 6.20397691 6.35147407 -0.16411243 0.99978159 145 146 147 148 149 150 -0.30472908 5.66284525 2.74650486 0.53502356 -7.92893826 -1.87306686 151 152 153 154 155 156 4.25368054 0.78607898 1.43419056 1.11481622 0.15302094 -2.47790877 157 158 159 2.26656997 -0.51498684 -6.21963446 > postscript(file="/var/www/html/rcomp/tmp/6oayp1293539222.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 -0.18146436 NA 1 3.52578863 -0.18146436 2 3.69397401 3.52578863 3 -3.37834315 3.69397401 4 0.15008629 -3.37834315 5 -3.81004143 0.15008629 6 2.55357666 -3.81004143 7 1.76444928 2.55357666 8 -4.07711614 1.76444928 9 -2.28882811 -4.07711614 10 -4.43082289 -2.28882811 11 -2.41164445 -4.43082289 12 -6.91003692 -2.41164445 13 -1.87287557 -6.91003692 14 1.61580039 -1.87287557 15 1.22103082 1.61580039 16 1.85456450 1.22103082 17 -3.34489563 1.85456450 18 -2.53546514 -3.34489563 19 0.51635044 -2.53546514 20 2.41719725 0.51635044 21 -1.59604573 2.41719725 22 -3.64563451 -1.59604573 23 -3.13281148 -3.64563451 24 -3.99432948 -3.13281148 25 -1.03297944 -3.99432948 26 1.35997678 -1.03297944 27 -4.23859245 1.35997678 28 0.18085309 -4.23859245 29 -0.51940753 0.18085309 30 1.32967454 -0.51940753 31 1.20278260 1.32967454 32 7.28996340 1.20278260 33 8.74570781 7.28996340 34 1.72356571 8.74570781 35 7.32196498 1.72356571 36 7.51057463 7.32196498 37 -3.85246961 7.51057463 38 4.00961547 -3.85246961 39 7.07743660 4.00961547 40 -1.07472432 7.07743660 41 1.87749453 -1.07472432 42 -6.63206788 1.87749453 43 1.57314163 -6.63206788 44 4.44571552 1.57314163 45 -2.54246858 4.44571552 46 -5.08456844 -2.54246858 47 10.98767925 -5.08456844 48 2.77161076 10.98767925 49 2.49129316 2.77161076 50 3.76132916 2.49129316 51 -1.77397141 3.76132916 52 -4.40924211 -1.77397141 53 -2.19982961 -4.40924211 54 3.67294728 -2.19982961 55 -0.50551186 3.67294728 56 2.03329176 -0.50551186 57 1.50291096 2.03329176 58 -0.66735030 1.50291096 59 -4.93125205 -0.66735030 60 0.70762783 -4.93125205 61 1.19811143 0.70762783 62 -0.75763573 1.19811143 63 2.95696346 -0.75763573 64 -2.58817207 2.95696346 65 7.14427136 -2.58817207 66 -0.52671046 7.14427136 67 5.21922919 -0.52671046 68 -2.87374431 5.21922919 69 2.37701979 -2.87374431 70 -1.89354841 2.37701979 71 -0.19801449 -1.89354841 72 2.26719369 -0.19801449 73 -0.95113150 2.26719369 74 0.98637862 -0.95113150 75 -1.31813346 0.98637862 76 -1.76992197 -1.31813346 77 -1.17502756 -1.76992197 78 -0.90794167 -1.17502756 79 3.20876414 -0.90794167 80 0.98851529 3.20876414 81 -6.60594362 0.98851529 82 -2.86113232 -6.60594362 83 0.61110582 -2.86113232 84 -2.84215915 0.61110582 85 -3.76995606 -2.84215915 86 4.00376191 -3.76995606 87 -0.33165052 4.00376191 88 3.56910569 -0.33165052 89 -4.20647303 3.56910569 90 -5.84003661 -4.20647303 91 -2.62523974 -5.84003661 92 -3.75931723 -2.62523974 93 0.31005039 -3.75931723 94 -2.87515812 0.31005039 95 5.09248764 -2.87515812 96 -2.13775821 5.09248764 97 -2.36260979 -2.13775821 98 -3.30686996 -2.36260979 99 -2.75155848 -3.30686996 100 0.50969583 -2.75155848 101 -2.43444830 0.50969583 102 -1.77264030 -2.43444830 103 -2.14821445 -1.77264030 104 -4.17472297 -2.14821445 105 -0.58665751 -4.17472297 106 -0.98026057 -0.58665751 107 -0.29055822 -0.98026057 108 -0.12348706 -0.29055822 109 -5.63754607 -0.12348706 110 -6.52882758 -5.63754607 111 -6.53797657 -6.52882758 112 3.68330069 -6.53797657 113 12.82665786 3.68330069 114 7.48930624 12.82665786 115 -1.86185690 7.48930624 116 4.64900637 -1.86185690 117 0.92964862 4.64900637 118 -1.23572195 0.92964862 119 -2.91840790 -1.23572195 120 6.48754143 -2.91840790 121 -1.86556734 6.48754143 122 4.10923855 -1.86556734 123 -1.00365706 4.10923855 124 -1.42690242 -1.00365706 125 -2.71250203 -1.42690242 126 0.26493773 -2.71250203 127 1.01667849 0.26493773 128 -3.20653600 1.01667849 129 3.79354530 -3.20653600 130 3.55979460 3.79354530 131 -5.35622311 3.55979460 132 0.07795314 -5.35622311 133 -2.94884759 0.07795314 134 -6.11438019 -2.94884759 135 1.75732929 -6.11438019 136 -1.27684951 1.75732929 137 3.05375975 -1.27684951 138 -1.86406559 3.05375975 139 3.26157750 -1.86406559 140 6.20397691 3.26157750 141 6.35147407 6.20397691 142 -0.16411243 6.35147407 143 0.99978159 -0.16411243 144 -0.30472908 0.99978159 145 5.66284525 -0.30472908 146 2.74650486 5.66284525 147 0.53502356 2.74650486 148 -7.92893826 0.53502356 149 -1.87306686 -7.92893826 150 4.25368054 -1.87306686 151 0.78607898 4.25368054 152 1.43419056 0.78607898 153 1.11481622 1.43419056 154 0.15302094 1.11481622 155 -2.47790877 0.15302094 156 2.26656997 -2.47790877 157 -0.51498684 2.26656997 158 -6.21963446 -0.51498684 159 NA -6.21963446 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.52578863 -0.18146436 [2,] 3.69397401 3.52578863 [3,] -3.37834315 3.69397401 [4,] 0.15008629 -3.37834315 [5,] -3.81004143 0.15008629 [6,] 2.55357666 -3.81004143 [7,] 1.76444928 2.55357666 [8,] -4.07711614 1.76444928 [9,] -2.28882811 -4.07711614 [10,] -4.43082289 -2.28882811 [11,] -2.41164445 -4.43082289 [12,] -6.91003692 -2.41164445 [13,] -1.87287557 -6.91003692 [14,] 1.61580039 -1.87287557 [15,] 1.22103082 1.61580039 [16,] 1.85456450 1.22103082 [17,] -3.34489563 1.85456450 [18,] -2.53546514 -3.34489563 [19,] 0.51635044 -2.53546514 [20,] 2.41719725 0.51635044 [21,] -1.59604573 2.41719725 [22,] -3.64563451 -1.59604573 [23,] -3.13281148 -3.64563451 [24,] -3.99432948 -3.13281148 [25,] -1.03297944 -3.99432948 [26,] 1.35997678 -1.03297944 [27,] -4.23859245 1.35997678 [28,] 0.18085309 -4.23859245 [29,] -0.51940753 0.18085309 [30,] 1.32967454 -0.51940753 [31,] 1.20278260 1.32967454 [32,] 7.28996340 1.20278260 [33,] 8.74570781 7.28996340 [34,] 1.72356571 8.74570781 [35,] 7.32196498 1.72356571 [36,] 7.51057463 7.32196498 [37,] -3.85246961 7.51057463 [38,] 4.00961547 -3.85246961 [39,] 7.07743660 4.00961547 [40,] -1.07472432 7.07743660 [41,] 1.87749453 -1.07472432 [42,] -6.63206788 1.87749453 [43,] 1.57314163 -6.63206788 [44,] 4.44571552 1.57314163 [45,] -2.54246858 4.44571552 [46,] -5.08456844 -2.54246858 [47,] 10.98767925 -5.08456844 [48,] 2.77161076 10.98767925 [49,] 2.49129316 2.77161076 [50,] 3.76132916 2.49129316 [51,] -1.77397141 3.76132916 [52,] -4.40924211 -1.77397141 [53,] -2.19982961 -4.40924211 [54,] 3.67294728 -2.19982961 [55,] -0.50551186 3.67294728 [56,] 2.03329176 -0.50551186 [57,] 1.50291096 2.03329176 [58,] -0.66735030 1.50291096 [59,] -4.93125205 -0.66735030 [60,] 0.70762783 -4.93125205 [61,] 1.19811143 0.70762783 [62,] -0.75763573 1.19811143 [63,] 2.95696346 -0.75763573 [64,] -2.58817207 2.95696346 [65,] 7.14427136 -2.58817207 [66,] -0.52671046 7.14427136 [67,] 5.21922919 -0.52671046 [68,] -2.87374431 5.21922919 [69,] 2.37701979 -2.87374431 [70,] -1.89354841 2.37701979 [71,] -0.19801449 -1.89354841 [72,] 2.26719369 -0.19801449 [73,] -0.95113150 2.26719369 [74,] 0.98637862 -0.95113150 [75,] -1.31813346 0.98637862 [76,] -1.76992197 -1.31813346 [77,] -1.17502756 -1.76992197 [78,] -0.90794167 -1.17502756 [79,] 3.20876414 -0.90794167 [80,] 0.98851529 3.20876414 [81,] -6.60594362 0.98851529 [82,] -2.86113232 -6.60594362 [83,] 0.61110582 -2.86113232 [84,] -2.84215915 0.61110582 [85,] -3.76995606 -2.84215915 [86,] 4.00376191 -3.76995606 [87,] -0.33165052 4.00376191 [88,] 3.56910569 -0.33165052 [89,] -4.20647303 3.56910569 [90,] -5.84003661 -4.20647303 [91,] -2.62523974 -5.84003661 [92,] -3.75931723 -2.62523974 [93,] 0.31005039 -3.75931723 [94,] -2.87515812 0.31005039 [95,] 5.09248764 -2.87515812 [96,] -2.13775821 5.09248764 [97,] -2.36260979 -2.13775821 [98,] -3.30686996 -2.36260979 [99,] -2.75155848 -3.30686996 [100,] 0.50969583 -2.75155848 [101,] -2.43444830 0.50969583 [102,] -1.77264030 -2.43444830 [103,] -2.14821445 -1.77264030 [104,] -4.17472297 -2.14821445 [105,] -0.58665751 -4.17472297 [106,] -0.98026057 -0.58665751 [107,] -0.29055822 -0.98026057 [108,] -0.12348706 -0.29055822 [109,] -5.63754607 -0.12348706 [110,] -6.52882758 -5.63754607 [111,] -6.53797657 -6.52882758 [112,] 3.68330069 -6.53797657 [113,] 12.82665786 3.68330069 [114,] 7.48930624 12.82665786 [115,] -1.86185690 7.48930624 [116,] 4.64900637 -1.86185690 [117,] 0.92964862 4.64900637 [118,] -1.23572195 0.92964862 [119,] -2.91840790 -1.23572195 [120,] 6.48754143 -2.91840790 [121,] -1.86556734 6.48754143 [122,] 4.10923855 -1.86556734 [123,] -1.00365706 4.10923855 [124,] -1.42690242 -1.00365706 [125,] -2.71250203 -1.42690242 [126,] 0.26493773 -2.71250203 [127,] 1.01667849 0.26493773 [128,] -3.20653600 1.01667849 [129,] 3.79354530 -3.20653600 [130,] 3.55979460 3.79354530 [131,] -5.35622311 3.55979460 [132,] 0.07795314 -5.35622311 [133,] -2.94884759 0.07795314 [134,] -6.11438019 -2.94884759 [135,] 1.75732929 -6.11438019 [136,] -1.27684951 1.75732929 [137,] 3.05375975 -1.27684951 [138,] -1.86406559 3.05375975 [139,] 3.26157750 -1.86406559 [140,] 6.20397691 3.26157750 [141,] 6.35147407 6.20397691 [142,] -0.16411243 6.35147407 [143,] 0.99978159 -0.16411243 [144,] -0.30472908 0.99978159 [145,] 5.66284525 -0.30472908 [146,] 2.74650486 5.66284525 [147,] 0.53502356 2.74650486 [148,] -7.92893826 0.53502356 [149,] -1.87306686 -7.92893826 [150,] 4.25368054 -1.87306686 [151,] 0.78607898 4.25368054 [152,] 1.43419056 0.78607898 [153,] 1.11481622 1.43419056 [154,] 0.15302094 1.11481622 [155,] -2.47790877 0.15302094 [156,] 2.26656997 -2.47790877 [157,] -0.51498684 2.26656997 [158,] -6.21963446 -0.51498684 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.52578863 -0.18146436 2 3.69397401 3.52578863 3 -3.37834315 3.69397401 4 0.15008629 -3.37834315 5 -3.81004143 0.15008629 6 2.55357666 -3.81004143 7 1.76444928 2.55357666 8 -4.07711614 1.76444928 9 -2.28882811 -4.07711614 10 -4.43082289 -2.28882811 11 -2.41164445 -4.43082289 12 -6.91003692 -2.41164445 13 -1.87287557 -6.91003692 14 1.61580039 -1.87287557 15 1.22103082 1.61580039 16 1.85456450 1.22103082 17 -3.34489563 1.85456450 18 -2.53546514 -3.34489563 19 0.51635044 -2.53546514 20 2.41719725 0.51635044 21 -1.59604573 2.41719725 22 -3.64563451 -1.59604573 23 -3.13281148 -3.64563451 24 -3.99432948 -3.13281148 25 -1.03297944 -3.99432948 26 1.35997678 -1.03297944 27 -4.23859245 1.35997678 28 0.18085309 -4.23859245 29 -0.51940753 0.18085309 30 1.32967454 -0.51940753 31 1.20278260 1.32967454 32 7.28996340 1.20278260 33 8.74570781 7.28996340 34 1.72356571 8.74570781 35 7.32196498 1.72356571 36 7.51057463 7.32196498 37 -3.85246961 7.51057463 38 4.00961547 -3.85246961 39 7.07743660 4.00961547 40 -1.07472432 7.07743660 41 1.87749453 -1.07472432 42 -6.63206788 1.87749453 43 1.57314163 -6.63206788 44 4.44571552 1.57314163 45 -2.54246858 4.44571552 46 -5.08456844 -2.54246858 47 10.98767925 -5.08456844 48 2.77161076 10.98767925 49 2.49129316 2.77161076 50 3.76132916 2.49129316 51 -1.77397141 3.76132916 52 -4.40924211 -1.77397141 53 -2.19982961 -4.40924211 54 3.67294728 -2.19982961 55 -0.50551186 3.67294728 56 2.03329176 -0.50551186 57 1.50291096 2.03329176 58 -0.66735030 1.50291096 59 -4.93125205 -0.66735030 60 0.70762783 -4.93125205 61 1.19811143 0.70762783 62 -0.75763573 1.19811143 63 2.95696346 -0.75763573 64 -2.58817207 2.95696346 65 7.14427136 -2.58817207 66 -0.52671046 7.14427136 67 5.21922919 -0.52671046 68 -2.87374431 5.21922919 69 2.37701979 -2.87374431 70 -1.89354841 2.37701979 71 -0.19801449 -1.89354841 72 2.26719369 -0.19801449 73 -0.95113150 2.26719369 74 0.98637862 -0.95113150 75 -1.31813346 0.98637862 76 -1.76992197 -1.31813346 77 -1.17502756 -1.76992197 78 -0.90794167 -1.17502756 79 3.20876414 -0.90794167 80 0.98851529 3.20876414 81 -6.60594362 0.98851529 82 -2.86113232 -6.60594362 83 0.61110582 -2.86113232 84 -2.84215915 0.61110582 85 -3.76995606 -2.84215915 86 4.00376191 -3.76995606 87 -0.33165052 4.00376191 88 3.56910569 -0.33165052 89 -4.20647303 3.56910569 90 -5.84003661 -4.20647303 91 -2.62523974 -5.84003661 92 -3.75931723 -2.62523974 93 0.31005039 -3.75931723 94 -2.87515812 0.31005039 95 5.09248764 -2.87515812 96 -2.13775821 5.09248764 97 -2.36260979 -2.13775821 98 -3.30686996 -2.36260979 99 -2.75155848 -3.30686996 100 0.50969583 -2.75155848 101 -2.43444830 0.50969583 102 -1.77264030 -2.43444830 103 -2.14821445 -1.77264030 104 -4.17472297 -2.14821445 105 -0.58665751 -4.17472297 106 -0.98026057 -0.58665751 107 -0.29055822 -0.98026057 108 -0.12348706 -0.29055822 109 -5.63754607 -0.12348706 110 -6.52882758 -5.63754607 111 -6.53797657 -6.52882758 112 3.68330069 -6.53797657 113 12.82665786 3.68330069 114 7.48930624 12.82665786 115 -1.86185690 7.48930624 116 4.64900637 -1.86185690 117 0.92964862 4.64900637 118 -1.23572195 0.92964862 119 -2.91840790 -1.23572195 120 6.48754143 -2.91840790 121 -1.86556734 6.48754143 122 4.10923855 -1.86556734 123 -1.00365706 4.10923855 124 -1.42690242 -1.00365706 125 -2.71250203 -1.42690242 126 0.26493773 -2.71250203 127 1.01667849 0.26493773 128 -3.20653600 1.01667849 129 3.79354530 -3.20653600 130 3.55979460 3.79354530 131 -5.35622311 3.55979460 132 0.07795314 -5.35622311 133 -2.94884759 0.07795314 134 -6.11438019 -2.94884759 135 1.75732929 -6.11438019 136 -1.27684951 1.75732929 137 3.05375975 -1.27684951 138 -1.86406559 3.05375975 139 3.26157750 -1.86406559 140 6.20397691 3.26157750 141 6.35147407 6.20397691 142 -0.16411243 6.35147407 143 0.99978159 -0.16411243 144 -0.30472908 0.99978159 145 5.66284525 -0.30472908 146 2.74650486 5.66284525 147 0.53502356 2.74650486 148 -7.92893826 0.53502356 149 -1.87306686 -7.92893826 150 4.25368054 -1.87306686 151 0.78607898 4.25368054 152 1.43419056 0.78607898 153 1.11481622 1.43419056 154 0.15302094 1.11481622 155 -2.47790877 0.15302094 156 2.26656997 -2.47790877 157 -0.51498684 2.26656997 158 -6.21963446 -0.51498684 > 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/7oayp1293539222.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/8hjxs1293539222.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/9hjxs1293539222.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/109sev1293539222.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/11vtv11293539222.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/12gbc71293539222.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/13cl9x1293539222.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/14g4ql1293539222.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/15j4o91293539222.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/16mnnx1293539222.tab") + } > > try(system("convert tmp/13rh11293539222.ps tmp/13rh11293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/23rh11293539222.ps tmp/23rh11293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/3d0z41293539222.ps tmp/3d0z41293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/4d0z41293539222.ps tmp/4d0z41293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/5d0z41293539222.ps tmp/5d0z41293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/6oayp1293539222.ps tmp/6oayp1293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/7oayp1293539222.ps tmp/7oayp1293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/8hjxs1293539222.ps tmp/8hjxs1293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/9hjxs1293539222.ps tmp/9hjxs1293539222.png",intern=TRUE)) character(0) > try(system("convert tmp/109sev1293539222.ps tmp/109sev1293539222.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.095 1.749 9.195