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(13 + ,26 + ,9 + ,6 + ,25 + ,25 + ,16 + ,20 + ,9 + ,6 + ,25 + ,24 + ,19 + ,21 + ,9 + ,13 + ,19 + ,21 + ,15 + ,31 + ,14 + ,8 + ,18 + ,23 + ,14 + ,21 + ,8 + ,7 + ,18 + ,17 + ,13 + ,18 + ,8 + ,9 + ,22 + ,19 + ,19 + ,26 + ,11 + ,5 + ,29 + ,18 + ,15 + ,22 + ,10 + ,8 + ,26 + ,27 + ,14 + ,22 + ,9 + ,9 + ,25 + ,23 + ,15 + ,29 + ,15 + ,11 + ,23 + ,23 + ,16 + ,15 + ,14 + ,8 + ,23 + ,29 + ,16 + ,16 + ,11 + ,11 + ,23 + ,21 + ,16 + ,24 + ,14 + ,12 + ,24 + ,26 + ,17 + ,17 + ,6 + ,8 + ,30 + ,25 + ,15 + ,19 + ,20 + ,7 + ,19 + ,25 + ,15 + ,22 + ,9 + ,9 + ,24 + ,23 + ,20 + ,31 + ,10 + ,12 + ,32 + ,26 + ,18 + ,28 + ,8 + ,20 + ,30 + ,20 + ,16 + ,38 + ,11 + ,7 + ,29 + ,29 + ,16 + ,26 + ,14 + ,8 + ,17 + ,24 + ,19 + ,25 + ,11 + ,8 + ,25 + ,23 + ,16 + ,25 + ,16 + ,16 + ,26 + ,24 + ,17 + ,29 + ,14 + ,10 + ,26 + ,30 + ,17 + ,28 + ,11 + ,6 + ,25 + ,22 + ,16 + ,15 + ,11 + ,8 + ,23 + ,22 + ,15 + ,18 + ,12 + ,9 + ,21 + ,13 + ,14 + ,21 + ,9 + ,9 + ,19 + ,24 + ,15 + ,25 + ,7 + ,11 + ,35 + ,17 + ,12 + ,23 + ,13 + ,12 + ,19 + ,24 + ,14 + ,23 + ,10 + ,8 + ,20 + ,21 + ,16 + ,19 + ,9 + ,7 + ,21 + ,23 + ,14 + ,18 + ,9 + ,8 + ,21 + ,24 + ,7 + ,18 + ,13 + ,9 + ,24 + ,24 + ,10 + ,26 + ,16 + ,4 + ,23 + ,24 + ,14 + ,18 + ,12 + ,8 + ,19 + ,23 + ,16 + ,18 + ,6 + ,8 + ,17 + ,26 + ,16 + ,28 + ,14 + ,8 + ,24 + ,24 + ,16 + ,17 + ,14 + ,6 + ,15 + ,21 + ,14 + ,29 + ,10 + ,8 + ,25 + ,23 + ,20 + ,12 + ,4 + ,4 + ,27 + ,28 + ,14 + ,25 + ,12 + ,7 + ,29 + ,23 + ,14 + ,28 + ,12 + ,14 + ,27 + ,22 + ,11 + ,20 + ,14 + ,10 + ,18 + ,24 + ,15 + ,17 + ,9 + ,9 + ,25 + ,21 + ,16 + ,17 + ,9 + ,6 + ,22 + ,23 + ,14 + ,20 + ,10 + ,8 + ,26 + ,23 + ,16 + ,31 + ,14 + ,11 + ,23 + ,20 + ,14 + ,21 + ,10 + ,8 + ,16 + ,23 + ,12 + ,19 + ,9 + ,8 + ,27 + ,21 + ,16 + ,23 + ,14 + ,10 + ,25 + ,27 + ,9 + ,15 + ,8 + ,8 + ,14 + ,12 + ,14 + ,24 + ,9 + ,10 + ,19 + ,15 + ,16 + ,28 + ,8 + ,7 + ,20 + ,22 + ,16 + ,16 + ,9 + ,8 + ,16 + ,21 + ,15 + ,19 + ,9 + ,7 + ,18 + ,21 + ,16 + ,21 + ,9 + ,9 + ,22 + ,20 + ,12 + ,21 + ,15 + ,5 + ,21 + ,24 + ,16 + ,20 + ,8 + ,7 + ,22 + ,24 + ,16 + ,16 + ,10 + ,7 + ,22 + ,29 + ,14 + ,25 + ,8 + ,7 + ,32 + ,25 + ,16 + ,30 + ,14 + ,9 + ,23 + ,14 + ,17 + ,29 + ,11 + ,5 + ,31 + ,30 + ,18 + ,22 + ,10 + ,8 + ,18 + ,19 + ,18 + ,19 + ,12 + ,8 + ,23 + ,29 + ,12 + ,33 + ,14 + ,8 + ,26 + ,25 + ,16 + ,17 + ,9 + ,9 + ,24 + ,25 + ,10 + ,9 + ,13 + ,6 + ,19 + ,25 + ,14 + ,14 + ,15 + ,8 + ,14 + ,16 + ,18 + ,15 + ,8 + ,6 + ,20 + ,25 + ,18 + ,12 + ,7 + ,4 + ,22 + ,28 + ,16 + ,21 + ,10 + ,6 + ,24 + ,24 + ,16 + ,20 + ,10 + ,4 + ,25 + ,25 + ,16 + ,29 + ,13 + ,12 + ,21 + ,21 + ,13 + ,33 + ,11 + ,6 + ,28 + ,22 + ,16 + ,21 + ,8 + ,11 + ,24 + ,20 + ,16 + ,15 + ,12 + ,8 + ,20 + ,25 + ,20 + ,19 + ,9 + ,10 + ,21 + ,27 + ,16 + ,23 + ,10 + ,10 + ,23 + ,21 + ,15 + ,20 + ,11 + ,4 + ,13 + ,13 + ,15 + ,20 + ,11 + ,8 + ,24 + ,26 + ,16 + ,18 + ,10 + ,9 + ,21 + ,26 + ,14 + ,31 + ,16 + ,9 + ,21 + ,25 + ,15 + ,18 + ,16 + ,7 + ,17 + ,22 + ,12 + ,13 + ,8 + ,7 + ,14 + ,19 + ,17 + ,9 + ,6 + ,11 + ,29 + ,23 + ,16 + ,20 + ,11 + ,8 + ,25 + ,25 + ,15 + ,18 + ,12 + ,8 + ,16 + ,15 + ,13 + ,23 + ,14 + ,7 + ,25 + ,21 + ,16 + ,17 + ,9 + ,5 + ,25 + ,23 + ,16 + ,17 + ,11 + ,7 + ,21 + ,25 + ,16 + ,16 + ,8 + ,9 + ,23 + ,24 + ,16 + ,31 + ,8 + ,8 + ,22 + ,24 + ,14 + ,15 + ,7 + ,6 + ,19 + ,21 + ,16 + ,28 + ,16 + ,8 + ,24 + ,24 + ,16 + ,26 + ,13 + ,10 + ,26 + ,22 + ,20 + ,20 + ,8 + ,10 + ,25 + ,24 + ,15 + ,19 + ,11 + ,8 + ,20 + ,28 + ,16 + ,25 + ,14 + ,11 + ,22 + ,21 + ,13 + ,18 + ,10 + ,8 + ,14 + ,17 + ,17 + ,20 + ,10 + ,8 + ,20 + ,28 + ,16 + ,33 + ,14 + ,6 + ,32 + ,24 + ,12 + ,24 + ,14 + ,20 + ,21 + ,10 + ,16 + ,22 + ,10 + ,6 + ,22 + ,20 + ,16 + ,32 + ,12 + ,12 + ,28 + ,22 + ,17 + ,31 + ,9 + ,9 + ,25 + ,19 + ,13 + ,13 + ,16 + ,5 + ,17 + ,22 + ,12 + ,18 + ,8 + ,10 + ,21 + ,22 + ,18 + ,17 + ,9 + ,5 + ,23 + ,26 + ,14 + ,29 + ,16 + ,6 + ,27 + ,24 + ,14 + ,22 + ,13 + ,10 + ,22 + ,22 + ,13 + ,18 + ,13 + ,6 + ,19 + ,20 + ,16 + ,22 + ,8 + ,10 + ,20 + ,20 + ,13 + ,25 + ,14 + ,5 + ,17 + ,15 + ,16 + ,20 + ,11 + ,13 + ,24 + ,20 + ,13 + ,20 + ,9 + ,7 + ,21 + ,20 + ,16 + ,17 + ,8 + ,9 + ,21 + ,24 + ,15 + ,21 + ,13 + ,11 + ,23 + ,22 + ,16 + ,26 + ,13 + ,8 + ,24 + ,29 + ,15 + ,10 + ,10 + ,5 + ,19 + ,23 + ,17 + ,15 + ,8 + ,4 + ,22 + ,24 + ,15 + ,20 + ,7 + ,9 + ,26 + ,22 + ,12 + ,14 + ,11 + ,7 + ,17 + ,16 + ,16 + ,16 + ,11 + ,5 + ,17 + ,23 + ,10 + ,23 + ,14 + ,5 + ,19 + ,27 + ,16 + ,11 + ,6 + ,4 + ,15 + ,16 + ,14 + ,19 + ,10 + ,7 + ,17 + ,21 + ,15 + ,30 + ,9 + ,9 + ,27 + ,26 + ,13 + ,21 + ,12 + ,8 + ,19 + ,22 + ,15 + ,20 + ,11 + ,8 + ,21 + ,23 + ,11 + ,22 + ,14 + ,11 + ,25 + ,19 + ,12 + ,30 + ,12 + ,10 + ,19 + ,18 + ,8 + ,25 + ,14 + ,9 + ,22 + ,24 + ,16 + ,28 + ,8 + ,12 + ,18 + ,24 + ,15 + ,23 + ,14 + ,10 + ,20 + ,29 + ,17 + ,23 + ,8 + ,10 + ,15 + ,22 + ,16 + ,21 + ,11 + ,7 + ,20 + ,24 + ,10 + ,30 + ,12 + ,10 + ,29 + ,22 + ,18 + ,22 + ,9 + ,6 + ,19 + ,12 + ,13 + ,32 + ,16 + ,6 + ,29 + ,26 + ,15 + ,22 + ,11 + ,11 + ,24 + ,18 + ,16 + ,15 + ,11 + ,8 + ,23 + ,22 + ,16 + ,21 + ,12 + ,9 + ,22 + ,24 + ,14 + ,27 + ,15 + ,9 + ,23 + ,21 + ,10 + ,22 + ,13 + ,13 + ,22 + ,15 + ,17 + ,9 + ,6 + ,11 + ,29 + ,23 + ,13 + ,29 + ,11 + ,4 + ,26 + ,22 + ,15 + ,20 + ,7 + ,9 + ,26 + ,22 + ,16 + ,16 + ,8 + ,5 + ,21 + ,24 + ,12 + ,16 + ,8 + ,4 + ,18 + ,23 + ,13 + ,16 + ,9 + ,9 + ,10 + ,13) + ,dim=c(6 + ,150) + ,dimnames=list(c('Selfconfidence' + ,'ConcernMistakes' + ,'DoubtsActions' + ,'ParentalCriticism' + ,'PersonalStandards' + ,'Organization') + ,1:150)) > y <- array(NA,dim=c(6,150),dimnames=list(c('Selfconfidence','ConcernMistakes','DoubtsActions','ParentalCriticism','PersonalStandards','Organization'),1:150)) > 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 = '1' > #'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 Selfconfidence ConcernMistakes DoubtsActions ParentalCriticism 1 13 26 9 6 2 16 20 9 6 3 19 21 9 13 4 15 31 14 8 5 14 21 8 7 6 13 18 8 9 7 19 26 11 5 8 15 22 10 8 9 14 22 9 9 10 15 29 15 11 11 16 15 14 8 12 16 16 11 11 13 16 24 14 12 14 17 17 6 8 15 15 19 20 7 16 15 22 9 9 17 20 31 10 12 18 18 28 8 20 19 16 38 11 7 20 16 26 14 8 21 19 25 11 8 22 16 25 16 16 23 17 29 14 10 24 17 28 11 6 25 16 15 11 8 26 15 18 12 9 27 14 21 9 9 28 15 25 7 11 29 12 23 13 12 30 14 23 10 8 31 16 19 9 7 32 14 18 9 8 33 7 18 13 9 34 10 26 16 4 35 14 18 12 8 36 16 18 6 8 37 16 28 14 8 38 16 17 14 6 39 14 29 10 8 40 20 12 4 4 41 14 25 12 7 42 14 28 12 14 43 11 20 14 10 44 15 17 9 9 45 16 17 9 6 46 14 20 10 8 47 16 31 14 11 48 14 21 10 8 49 12 19 9 8 50 16 23 14 10 51 9 15 8 8 52 14 24 9 10 53 16 28 8 7 54 16 16 9 8 55 15 19 9 7 56 16 21 9 9 57 12 21 15 5 58 16 20 8 7 59 16 16 10 7 60 14 25 8 7 61 16 30 14 9 62 17 29 11 5 63 18 22 10 8 64 18 19 12 8 65 12 33 14 8 66 16 17 9 9 67 10 9 13 6 68 14 14 15 8 69 18 15 8 6 70 18 12 7 4 71 16 21 10 6 72 16 20 10 4 73 16 29 13 12 74 13 33 11 6 75 16 21 8 11 76 16 15 12 8 77 20 19 9 10 78 16 23 10 10 79 15 20 11 4 80 15 20 11 8 81 16 18 10 9 82 14 31 16 9 83 15 18 16 7 84 12 13 8 7 85 17 9 6 11 86 16 20 11 8 87 15 18 12 8 88 13 23 14 7 89 16 17 9 5 90 16 17 11 7 91 16 16 8 9 92 16 31 8 8 93 14 15 7 6 94 16 28 16 8 95 16 26 13 10 96 20 20 8 10 97 15 19 11 8 98 16 25 14 11 99 13 18 10 8 100 17 20 10 8 101 16 33 14 6 102 12 24 14 20 103 16 22 10 6 104 16 32 12 12 105 17 31 9 9 106 13 13 16 5 107 12 18 8 10 108 18 17 9 5 109 14 29 16 6 110 14 22 13 10 111 13 18 13 6 112 16 22 8 10 113 13 25 14 5 114 16 20 11 13 115 13 20 9 7 116 16 17 8 9 117 15 21 13 11 118 16 26 13 8 119 15 10 10 5 120 17 15 8 4 121 15 20 7 9 122 12 14 11 7 123 16 16 11 5 124 10 23 14 5 125 16 11 6 4 126 14 19 10 7 127 15 30 9 9 128 13 21 12 8 129 15 20 11 8 130 11 22 14 11 131 12 30 12 10 132 8 25 14 9 133 16 28 8 12 134 15 23 14 10 135 17 23 8 10 136 16 21 11 7 137 10 30 12 10 138 18 22 9 6 139 13 32 16 6 140 15 22 11 11 141 16 15 11 8 142 16 21 12 9 143 14 27 15 9 144 10 22 13 13 145 17 9 6 11 146 13 29 11 4 147 15 20 7 9 148 16 16 8 5 149 12 16 8 4 150 13 16 9 9 PersonalStandards Organization t 1 25 25 1 2 25 24 2 3 19 21 3 4 18 23 4 5 18 17 5 6 22 19 6 7 29 18 7 8 26 27 8 9 25 23 9 10 23 23 10 11 23 29 11 12 23 21 12 13 24 26 13 14 30 25 14 15 19 25 15 16 24 23 16 17 32 26 17 18 30 20 18 19 29 29 19 20 17 24 20 21 25 23 21 22 26 24 22 23 26 30 23 24 25 22 24 25 23 22 25 26 21 13 26 27 19 24 27 28 35 17 28 29 19 24 29 30 20 21 30 31 21 23 31 32 21 24 32 33 24 24 33 34 23 24 34 35 19 23 35 36 17 26 36 37 24 24 37 38 15 21 38 39 25 23 39 40 27 28 40 41 29 23 41 42 27 22 42 43 18 24 43 44 25 21 44 45 22 23 45 46 26 23 46 47 23 20 47 48 16 23 48 49 27 21 49 50 25 27 50 51 14 12 51 52 19 15 52 53 20 22 53 54 16 21 54 55 18 21 55 56 22 20 56 57 21 24 57 58 22 24 58 59 22 29 59 60 32 25 60 61 23 14 61 62 31 30 62 63 18 19 63 64 23 29 64 65 26 25 65 66 24 25 66 67 19 25 67 68 14 16 68 69 20 25 69 70 22 28 70 71 24 24 71 72 25 25 72 73 21 21 73 74 28 22 74 75 24 20 75 76 20 25 76 77 21 27 77 78 23 21 78 79 13 13 79 80 24 26 80 81 21 26 81 82 21 25 82 83 17 22 83 84 14 19 84 85 29 23 85 86 25 25 86 87 16 15 87 88 25 21 88 89 25 23 89 90 21 25 90 91 23 24 91 92 22 24 92 93 19 21 93 94 24 24 94 95 26 22 95 96 25 24 96 97 20 28 97 98 22 21 98 99 14 17 99 100 20 28 100 101 32 24 101 102 21 10 102 103 22 20 103 104 28 22 104 105 25 19 105 106 17 22 106 107 21 22 107 108 23 26 108 109 27 24 109 110 22 22 110 111 19 20 111 112 20 20 112 113 17 15 113 114 24 20 114 115 21 20 115 116 21 24 116 117 23 22 117 118 24 29 118 119 19 23 119 120 22 24 120 121 26 22 121 122 17 16 122 123 17 23 123 124 19 27 124 125 15 16 125 126 17 21 126 127 27 26 127 128 19 22 128 129 21 23 129 130 25 19 130 131 19 18 131 132 22 24 132 133 18 24 133 134 20 29 134 135 15 22 135 136 20 24 136 137 29 22 137 138 19 12 138 139 29 26 139 140 24 18 140 141 23 22 141 142 22 24 142 143 23 21 143 144 22 15 144 145 29 23 145 146 26 22 146 147 26 22 147 148 21 24 148 149 18 23 149 150 10 13 150 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ConcernMistakes DoubtsActions ParentalCriticism 13.793479 0.018016 -0.291928 0.065747 PersonalStandards Organization t 0.028720 0.143703 -0.005942 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.8565 -1.1297 0.3678 1.3593 4.5930 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13.793479 1.534575 8.988 1.36e-15 *** ConcernMistakes 0.018016 0.036983 0.487 0.62691 DoubtsActions -0.291928 0.068806 -4.243 3.95e-05 *** ParentalCriticism 0.065747 0.068650 0.958 0.33983 PersonalStandards 0.028720 0.049129 0.585 0.55975 Organization 0.143703 0.050059 2.871 0.00472 ** t -0.005942 0.003996 -1.487 0.13923 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.069 on 143 degrees of freedom Multiple R-squared: 0.2045, Adjusted R-squared: 0.1711 F-statistic: 6.127 on 6 and 143 DF, p-value: 9.747e-06 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.82709129 0.34581741 0.17290871 [2,] 0.72538530 0.54922940 0.27461470 [3,] 0.60668399 0.78663201 0.39331601 [4,] 0.48559843 0.97119686 0.51440157 [5,] 0.61450435 0.77099130 0.38549565 [6,] 0.51502552 0.96994897 0.48497448 [7,] 0.43019317 0.86038633 0.56980683 [8,] 0.43901604 0.87803207 0.56098396 [9,] 0.44481931 0.88963862 0.55518069 [10,] 0.36016678 0.72033357 0.63983322 [11,] 0.34842474 0.69684947 0.65157526 [12,] 0.39560577 0.79121154 0.60439423 [13,] 0.39668974 0.79337949 0.60331026 [14,] 0.33053156 0.66106311 0.66946844 [15,] 0.27076801 0.54153601 0.72923199 [16,] 0.21844270 0.43688539 0.78155730 [17,] 0.20679007 0.41358014 0.79320993 [18,] 0.17703147 0.35406294 0.82296853 [19,] 0.24239518 0.48479035 0.75760482 [20,] 0.32775109 0.65550218 0.67224891 [21,] 0.27309520 0.54619041 0.72690480 [22,] 0.24911350 0.49822700 0.75088650 [23,] 0.20827565 0.41655130 0.79172435 [24,] 0.88094488 0.23811023 0.11905512 [25,] 0.92392849 0.15214303 0.07607151 [26,] 0.90747541 0.18504917 0.09252459 [27,] 0.90839522 0.18320955 0.09160478 [28,] 0.89921536 0.20156928 0.10078464 [29,] 0.92287968 0.15424063 0.07712032 [30,] 0.90884875 0.18230249 0.09115125 [31,] 0.95329258 0.09341483 0.04670742 [32,] 0.94141132 0.11717736 0.05858868 [33,] 0.92934343 0.14131315 0.07065657 [34,] 0.94277520 0.11444960 0.05722480 [35,] 0.92684769 0.14630463 0.07315231 [36,] 0.91462939 0.17074122 0.08537061 [37,] 0.89925701 0.20148599 0.10074299 [38,] 0.89620709 0.20758581 0.10379291 [39,] 0.87718213 0.24563573 0.12281787 [40,] 0.90561431 0.18877139 0.09438569 [41,] 0.89334393 0.21331215 0.10665607 [42,] 0.95487234 0.09025531 0.04512766 [43,] 0.94747187 0.10505626 0.05252813 [44,] 0.93930138 0.12139724 0.06069862 [45,] 0.93820524 0.12358952 0.06179476 [46,] 0.92772341 0.14455318 0.07227659 [47,] 0.91719979 0.16560042 0.08280021 [48,] 0.91194104 0.17611792 0.08805896 [49,] 0.89707380 0.20585241 0.10292620 [50,] 0.87839767 0.24320467 0.12160233 [51,] 0.89555883 0.20888234 0.10444117 [52,] 0.90930095 0.18139809 0.09069905 [53,] 0.89093065 0.21813869 0.10906935 [54,] 0.92272189 0.15455622 0.07727811 [55,] 0.92945851 0.14108298 0.07054149 [56,] 0.94856884 0.10286232 0.05143116 [57,] 0.93679553 0.12640895 0.06320447 [58,] 0.97596390 0.04807220 0.02403610 [59,] 0.97273718 0.05452563 0.02726282 [60,] 0.97370983 0.05258034 0.02629017 [61,] 0.97095434 0.05809133 0.02904566 [62,] 0.96303266 0.07393468 0.03696734 [63,] 0.95355068 0.09289865 0.04644932 [64,] 0.94447040 0.11105920 0.05552960 [65,] 0.95457362 0.09085275 0.04542638 [66,] 0.94339579 0.11320842 0.05660421 [67,] 0.93153349 0.13693303 0.06846651 [68,] 0.95433144 0.09133711 0.04566856 [69,] 0.94178230 0.11643541 0.05821770 [70,] 0.93501869 0.12996261 0.06498131 [71,] 0.92214769 0.15570462 0.07785231 [72,] 0.90287331 0.19425338 0.09712669 [73,] 0.88101402 0.23797197 0.11898598 [74,] 0.87153155 0.25693691 0.12846845 [75,] 0.91219247 0.17561506 0.08780753 [76,] 0.89530171 0.20939657 0.10469829 [77,] 0.87165775 0.25668450 0.12834225 [78,] 0.85322162 0.29355676 0.14677838 [79,] 0.83844917 0.32310165 0.16155083 [80,] 0.81135557 0.37728887 0.18864443 [81,] 0.77730940 0.44538119 0.22269060 [82,] 0.74620327 0.50759347 0.25379673 [83,] 0.71265861 0.57468278 0.28734139 [84,] 0.74641850 0.50716301 0.25358150 [85,] 0.74030837 0.51938325 0.25969163 [86,] 0.70565373 0.58869255 0.29434627 [87,] 0.75517492 0.48965017 0.24482508 [88,] 0.72211841 0.55576317 0.27788159 [89,] 0.71712284 0.56575433 0.28287716 [90,] 0.70318336 0.59363327 0.29681664 [91,] 0.66265565 0.67468870 0.33734435 [92,] 0.63148491 0.73703017 0.36851509 [93,] 0.59791100 0.80417800 0.40208900 [94,] 0.55264552 0.89470897 0.44735448 [95,] 0.52110553 0.95778894 0.47889447 [96,] 0.50731721 0.98536559 0.49268279 [97,] 0.45318014 0.90636028 0.54681986 [98,] 0.61683166 0.76633668 0.38316834 [99,] 0.60410669 0.79178662 0.39589331 [100,] 0.58104179 0.83791641 0.41895821 [101,] 0.52861779 0.94276441 0.47138221 [102,] 0.47580106 0.95160211 0.52419894 [103,] 0.41971196 0.83942392 0.58028804 [104,] 0.37759052 0.75518104 0.62240948 [105,] 0.35569670 0.71139340 0.64430330 [106,] 0.34978424 0.69956847 0.65021576 [107,] 0.29633189 0.59266377 0.70366811 [108,] 0.27428906 0.54857812 0.72571094 [109,] 0.27574999 0.55149997 0.72425001 [110,] 0.22636572 0.45273145 0.77363428 [111,] 0.19840885 0.39681770 0.80159115 [112,] 0.16339631 0.32679262 0.83660369 [113,] 0.14589246 0.29178493 0.85410754 [114,] 0.13402449 0.26804899 0.86597551 [115,] 0.19309781 0.38619562 0.80690219 [116,] 0.15777354 0.31554708 0.84222646 [117,] 0.12883016 0.25766032 0.87116984 [118,] 0.09822702 0.19645403 0.90177298 [119,] 0.08098241 0.16196482 0.91901759 [120,] 0.05654128 0.11308257 0.94345872 [121,] 0.05730733 0.11461465 0.94269267 [122,] 0.04893891 0.09787783 0.95106109 [123,] 0.57450037 0.85099926 0.42549963 [124,] 0.48966548 0.97933096 0.51033452 [125,] 0.39706198 0.79412395 0.60293802 [126,] 0.34184419 0.68368837 0.65815581 [127,] 0.25303230 0.50606461 0.74696770 [128,] 0.70175146 0.59649709 0.29824854 [129,] 0.63885764 0.72228472 0.36114236 [130,] 0.53889006 0.92221987 0.46110994 [131,] 0.37823969 0.75647938 0.62176031 > postscript(file="/var/www/html/rcomp/tmp/161va1290473590.ps",horizontal=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/261va1290473590.ps",horizontal=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/361va1290473590.ps",horizontal=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/4haud1290473590.ps",horizontal=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/5haud1290473590.ps",horizontal=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 = 150 Frequency = 1 1 2 3 4 5 6 -3.33363759 -0.07589832 3.05523001 0.41070132 -1.22680306 -2.70059137 7 8 9 10 11 12 4.24265854 -1.37566813 -2.12386931 0.43347636 0.73473417 0.79925969 13 14 15 16 17 18 0.72388003 -0.24511985 2.19344431 -1.05355220 3.22407034 1.09388808 19 20 21 22 23 24 -0.61444270 1.48087636 3.54299518 1.31018155 1.19246884 1.78197124 25 26 27 28 29 30 0.94806430 1.47690478 -1.97027280 -1.20534048 -3.02394791 -1.22841434 31 32 33 34 35 36 0.30728445 -1.87820661 -7.85645934 -3.76140674 -0.78345365 -0.90274586 37 38 39 40 41 42 1.34482790 2.37002272 -1.71403093 2.33364482 -1.09536071 -1.40254855 43 44 45 46 47 48 -3.43456572 -0.53839924 0.46353699 -1.53901235 1.75649652 -1.25794454 49 50 51 52 53 54 -3.53641148 0.92083742 -5.07770922 -0.64818059 0.15637231 0.86326633 55 56 57 58 59 60 -0.17653146 0.69070985 -1.83488614 -0.01463495 -0.07128772 -2.52372971 61 62 63 64 65 66 2.85141586 0.73357512 3.33054778 2.39376662 -2.78000392 0.04624411 67 68 69 70 71 72 -4.29513819 1.51001169 2.12029414 1.53130122 0.63676366 0.61979231 73 74 75 76 77 78 1.50309477 -2.09714352 0.32275621 1.19810925 3.80858753 0.83917137 79 80 81 82 83 84 2.02238778 -0.41870916 0.35175001 0.01875757 1.93638448 -2.78574878 85 86 87 88 89 90 0.43980631 0.73192846 1.76133558 -0.79389324 0.70459240 0.99037133 91 92 93 94 95 96 0.09331624 -0.07651022 -1.42548382 2.26740384 1.53206713 3.92777958 97 98 99 100 101 102 -0.47219751 2.05267352 -0.98117594 1.23568648 1.53680141 -0.88781022 103 104 105 106 107 108 1.44115730 0.99659472 1.85927688 0.29463265 -3.56853713 2.44383089 109 110 111 112 113 114 0.38385860 -0.19185372 -0.47729749 0.70523767 0.54210501 1.31681816 115 116 117 118 119 120 -1.78045613 0.28130189 0.77329284 0.85175778 0.47322302 1.64111587 121 122 123 124 125 126 -0.89115448 -1.35721915 1.73826619 -4.13836843 1.50969597 -0.43396887 127 128 129 130 131 132 -1.05533171 -1.14114878 0.38973925 -2.50187474 -1.84214487 -6.04489768 133 134 135 136 137 138 0.07307125 0.27619839 1.68009259 1.36408451 -4.66849938 4.59299690 139 140 141 142 143 144 -0.83675959 0.85418928 1.63739023 1.50273427 0.67875398 -3.18113068 145 146 147 148 149 150 0.79635421 -1.40829054 -0.73665039 0.75246254 -2.94598622 -0.31006294 > postscript(file="/var/www/html/rcomp/tmp/6haud1290473590.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 150 Frequency = 1 lag(myerror, k = 1) myerror 0 -3.33363759 NA 1 -0.07589832 -3.33363759 2 3.05523001 -0.07589832 3 0.41070132 3.05523001 4 -1.22680306 0.41070132 5 -2.70059137 -1.22680306 6 4.24265854 -2.70059137 7 -1.37566813 4.24265854 8 -2.12386931 -1.37566813 9 0.43347636 -2.12386931 10 0.73473417 0.43347636 11 0.79925969 0.73473417 12 0.72388003 0.79925969 13 -0.24511985 0.72388003 14 2.19344431 -0.24511985 15 -1.05355220 2.19344431 16 3.22407034 -1.05355220 17 1.09388808 3.22407034 18 -0.61444270 1.09388808 19 1.48087636 -0.61444270 20 3.54299518 1.48087636 21 1.31018155 3.54299518 22 1.19246884 1.31018155 23 1.78197124 1.19246884 24 0.94806430 1.78197124 25 1.47690478 0.94806430 26 -1.97027280 1.47690478 27 -1.20534048 -1.97027280 28 -3.02394791 -1.20534048 29 -1.22841434 -3.02394791 30 0.30728445 -1.22841434 31 -1.87820661 0.30728445 32 -7.85645934 -1.87820661 33 -3.76140674 -7.85645934 34 -0.78345365 -3.76140674 35 -0.90274586 -0.78345365 36 1.34482790 -0.90274586 37 2.37002272 1.34482790 38 -1.71403093 2.37002272 39 2.33364482 -1.71403093 40 -1.09536071 2.33364482 41 -1.40254855 -1.09536071 42 -3.43456572 -1.40254855 43 -0.53839924 -3.43456572 44 0.46353699 -0.53839924 45 -1.53901235 0.46353699 46 1.75649652 -1.53901235 47 -1.25794454 1.75649652 48 -3.53641148 -1.25794454 49 0.92083742 -3.53641148 50 -5.07770922 0.92083742 51 -0.64818059 -5.07770922 52 0.15637231 -0.64818059 53 0.86326633 0.15637231 54 -0.17653146 0.86326633 55 0.69070985 -0.17653146 56 -1.83488614 0.69070985 57 -0.01463495 -1.83488614 58 -0.07128772 -0.01463495 59 -2.52372971 -0.07128772 60 2.85141586 -2.52372971 61 0.73357512 2.85141586 62 3.33054778 0.73357512 63 2.39376662 3.33054778 64 -2.78000392 2.39376662 65 0.04624411 -2.78000392 66 -4.29513819 0.04624411 67 1.51001169 -4.29513819 68 2.12029414 1.51001169 69 1.53130122 2.12029414 70 0.63676366 1.53130122 71 0.61979231 0.63676366 72 1.50309477 0.61979231 73 -2.09714352 1.50309477 74 0.32275621 -2.09714352 75 1.19810925 0.32275621 76 3.80858753 1.19810925 77 0.83917137 3.80858753 78 2.02238778 0.83917137 79 -0.41870916 2.02238778 80 0.35175001 -0.41870916 81 0.01875757 0.35175001 82 1.93638448 0.01875757 83 -2.78574878 1.93638448 84 0.43980631 -2.78574878 85 0.73192846 0.43980631 86 1.76133558 0.73192846 87 -0.79389324 1.76133558 88 0.70459240 -0.79389324 89 0.99037133 0.70459240 90 0.09331624 0.99037133 91 -0.07651022 0.09331624 92 -1.42548382 -0.07651022 93 2.26740384 -1.42548382 94 1.53206713 2.26740384 95 3.92777958 1.53206713 96 -0.47219751 3.92777958 97 2.05267352 -0.47219751 98 -0.98117594 2.05267352 99 1.23568648 -0.98117594 100 1.53680141 1.23568648 101 -0.88781022 1.53680141 102 1.44115730 -0.88781022 103 0.99659472 1.44115730 104 1.85927688 0.99659472 105 0.29463265 1.85927688 106 -3.56853713 0.29463265 107 2.44383089 -3.56853713 108 0.38385860 2.44383089 109 -0.19185372 0.38385860 110 -0.47729749 -0.19185372 111 0.70523767 -0.47729749 112 0.54210501 0.70523767 113 1.31681816 0.54210501 114 -1.78045613 1.31681816 115 0.28130189 -1.78045613 116 0.77329284 0.28130189 117 0.85175778 0.77329284 118 0.47322302 0.85175778 119 1.64111587 0.47322302 120 -0.89115448 1.64111587 121 -1.35721915 -0.89115448 122 1.73826619 -1.35721915 123 -4.13836843 1.73826619 124 1.50969597 -4.13836843 125 -0.43396887 1.50969597 126 -1.05533171 -0.43396887 127 -1.14114878 -1.05533171 128 0.38973925 -1.14114878 129 -2.50187474 0.38973925 130 -1.84214487 -2.50187474 131 -6.04489768 -1.84214487 132 0.07307125 -6.04489768 133 0.27619839 0.07307125 134 1.68009259 0.27619839 135 1.36408451 1.68009259 136 -4.66849938 1.36408451 137 4.59299690 -4.66849938 138 -0.83675959 4.59299690 139 0.85418928 -0.83675959 140 1.63739023 0.85418928 141 1.50273427 1.63739023 142 0.67875398 1.50273427 143 -3.18113068 0.67875398 144 0.79635421 -3.18113068 145 -1.40829054 0.79635421 146 -0.73665039 -1.40829054 147 0.75246254 -0.73665039 148 -2.94598622 0.75246254 149 -0.31006294 -2.94598622 150 NA -0.31006294 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.07589832 -3.33363759 [2,] 3.05523001 -0.07589832 [3,] 0.41070132 3.05523001 [4,] -1.22680306 0.41070132 [5,] -2.70059137 -1.22680306 [6,] 4.24265854 -2.70059137 [7,] -1.37566813 4.24265854 [8,] -2.12386931 -1.37566813 [9,] 0.43347636 -2.12386931 [10,] 0.73473417 0.43347636 [11,] 0.79925969 0.73473417 [12,] 0.72388003 0.79925969 [13,] -0.24511985 0.72388003 [14,] 2.19344431 -0.24511985 [15,] -1.05355220 2.19344431 [16,] 3.22407034 -1.05355220 [17,] 1.09388808 3.22407034 [18,] -0.61444270 1.09388808 [19,] 1.48087636 -0.61444270 [20,] 3.54299518 1.48087636 [21,] 1.31018155 3.54299518 [22,] 1.19246884 1.31018155 [23,] 1.78197124 1.19246884 [24,] 0.94806430 1.78197124 [25,] 1.47690478 0.94806430 [26,] -1.97027280 1.47690478 [27,] -1.20534048 -1.97027280 [28,] -3.02394791 -1.20534048 [29,] -1.22841434 -3.02394791 [30,] 0.30728445 -1.22841434 [31,] -1.87820661 0.30728445 [32,] -7.85645934 -1.87820661 [33,] -3.76140674 -7.85645934 [34,] -0.78345365 -3.76140674 [35,] -0.90274586 -0.78345365 [36,] 1.34482790 -0.90274586 [37,] 2.37002272 1.34482790 [38,] -1.71403093 2.37002272 [39,] 2.33364482 -1.71403093 [40,] -1.09536071 2.33364482 [41,] -1.40254855 -1.09536071 [42,] -3.43456572 -1.40254855 [43,] -0.53839924 -3.43456572 [44,] 0.46353699 -0.53839924 [45,] -1.53901235 0.46353699 [46,] 1.75649652 -1.53901235 [47,] -1.25794454 1.75649652 [48,] -3.53641148 -1.25794454 [49,] 0.92083742 -3.53641148 [50,] -5.07770922 0.92083742 [51,] -0.64818059 -5.07770922 [52,] 0.15637231 -0.64818059 [53,] 0.86326633 0.15637231 [54,] -0.17653146 0.86326633 [55,] 0.69070985 -0.17653146 [56,] -1.83488614 0.69070985 [57,] -0.01463495 -1.83488614 [58,] -0.07128772 -0.01463495 [59,] -2.52372971 -0.07128772 [60,] 2.85141586 -2.52372971 [61,] 0.73357512 2.85141586 [62,] 3.33054778 0.73357512 [63,] 2.39376662 3.33054778 [64,] -2.78000392 2.39376662 [65,] 0.04624411 -2.78000392 [66,] -4.29513819 0.04624411 [67,] 1.51001169 -4.29513819 [68,] 2.12029414 1.51001169 [69,] 1.53130122 2.12029414 [70,] 0.63676366 1.53130122 [71,] 0.61979231 0.63676366 [72,] 1.50309477 0.61979231 [73,] -2.09714352 1.50309477 [74,] 0.32275621 -2.09714352 [75,] 1.19810925 0.32275621 [76,] 3.80858753 1.19810925 [77,] 0.83917137 3.80858753 [78,] 2.02238778 0.83917137 [79,] -0.41870916 2.02238778 [80,] 0.35175001 -0.41870916 [81,] 0.01875757 0.35175001 [82,] 1.93638448 0.01875757 [83,] -2.78574878 1.93638448 [84,] 0.43980631 -2.78574878 [85,] 0.73192846 0.43980631 [86,] 1.76133558 0.73192846 [87,] -0.79389324 1.76133558 [88,] 0.70459240 -0.79389324 [89,] 0.99037133 0.70459240 [90,] 0.09331624 0.99037133 [91,] -0.07651022 0.09331624 [92,] -1.42548382 -0.07651022 [93,] 2.26740384 -1.42548382 [94,] 1.53206713 2.26740384 [95,] 3.92777958 1.53206713 [96,] -0.47219751 3.92777958 [97,] 2.05267352 -0.47219751 [98,] -0.98117594 2.05267352 [99,] 1.23568648 -0.98117594 [100,] 1.53680141 1.23568648 [101,] -0.88781022 1.53680141 [102,] 1.44115730 -0.88781022 [103,] 0.99659472 1.44115730 [104,] 1.85927688 0.99659472 [105,] 0.29463265 1.85927688 [106,] -3.56853713 0.29463265 [107,] 2.44383089 -3.56853713 [108,] 0.38385860 2.44383089 [109,] -0.19185372 0.38385860 [110,] -0.47729749 -0.19185372 [111,] 0.70523767 -0.47729749 [112,] 0.54210501 0.70523767 [113,] 1.31681816 0.54210501 [114,] -1.78045613 1.31681816 [115,] 0.28130189 -1.78045613 [116,] 0.77329284 0.28130189 [117,] 0.85175778 0.77329284 [118,] 0.47322302 0.85175778 [119,] 1.64111587 0.47322302 [120,] -0.89115448 1.64111587 [121,] -1.35721915 -0.89115448 [122,] 1.73826619 -1.35721915 [123,] -4.13836843 1.73826619 [124,] 1.50969597 -4.13836843 [125,] -0.43396887 1.50969597 [126,] -1.05533171 -0.43396887 [127,] -1.14114878 -1.05533171 [128,] 0.38973925 -1.14114878 [129,] -2.50187474 0.38973925 [130,] -1.84214487 -2.50187474 [131,] -6.04489768 -1.84214487 [132,] 0.07307125 -6.04489768 [133,] 0.27619839 0.07307125 [134,] 1.68009259 0.27619839 [135,] 1.36408451 1.68009259 [136,] -4.66849938 1.36408451 [137,] 4.59299690 -4.66849938 [138,] -0.83675959 4.59299690 [139,] 0.85418928 -0.83675959 [140,] 1.63739023 0.85418928 [141,] 1.50273427 1.63739023 [142,] 0.67875398 1.50273427 [143,] -3.18113068 0.67875398 [144,] 0.79635421 -3.18113068 [145,] -1.40829054 0.79635421 [146,] -0.73665039 -1.40829054 [147,] 0.75246254 -0.73665039 [148,] -2.94598622 0.75246254 [149,] -0.31006294 -2.94598622 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.07589832 -3.33363759 2 3.05523001 -0.07589832 3 0.41070132 3.05523001 4 -1.22680306 0.41070132 5 -2.70059137 -1.22680306 6 4.24265854 -2.70059137 7 -1.37566813 4.24265854 8 -2.12386931 -1.37566813 9 0.43347636 -2.12386931 10 0.73473417 0.43347636 11 0.79925969 0.73473417 12 0.72388003 0.79925969 13 -0.24511985 0.72388003 14 2.19344431 -0.24511985 15 -1.05355220 2.19344431 16 3.22407034 -1.05355220 17 1.09388808 3.22407034 18 -0.61444270 1.09388808 19 1.48087636 -0.61444270 20 3.54299518 1.48087636 21 1.31018155 3.54299518 22 1.19246884 1.31018155 23 1.78197124 1.19246884 24 0.94806430 1.78197124 25 1.47690478 0.94806430 26 -1.97027280 1.47690478 27 -1.20534048 -1.97027280 28 -3.02394791 -1.20534048 29 -1.22841434 -3.02394791 30 0.30728445 -1.22841434 31 -1.87820661 0.30728445 32 -7.85645934 -1.87820661 33 -3.76140674 -7.85645934 34 -0.78345365 -3.76140674 35 -0.90274586 -0.78345365 36 1.34482790 -0.90274586 37 2.37002272 1.34482790 38 -1.71403093 2.37002272 39 2.33364482 -1.71403093 40 -1.09536071 2.33364482 41 -1.40254855 -1.09536071 42 -3.43456572 -1.40254855 43 -0.53839924 -3.43456572 44 0.46353699 -0.53839924 45 -1.53901235 0.46353699 46 1.75649652 -1.53901235 47 -1.25794454 1.75649652 48 -3.53641148 -1.25794454 49 0.92083742 -3.53641148 50 -5.07770922 0.92083742 51 -0.64818059 -5.07770922 52 0.15637231 -0.64818059 53 0.86326633 0.15637231 54 -0.17653146 0.86326633 55 0.69070985 -0.17653146 56 -1.83488614 0.69070985 57 -0.01463495 -1.83488614 58 -0.07128772 -0.01463495 59 -2.52372971 -0.07128772 60 2.85141586 -2.52372971 61 0.73357512 2.85141586 62 3.33054778 0.73357512 63 2.39376662 3.33054778 64 -2.78000392 2.39376662 65 0.04624411 -2.78000392 66 -4.29513819 0.04624411 67 1.51001169 -4.29513819 68 2.12029414 1.51001169 69 1.53130122 2.12029414 70 0.63676366 1.53130122 71 0.61979231 0.63676366 72 1.50309477 0.61979231 73 -2.09714352 1.50309477 74 0.32275621 -2.09714352 75 1.19810925 0.32275621 76 3.80858753 1.19810925 77 0.83917137 3.80858753 78 2.02238778 0.83917137 79 -0.41870916 2.02238778 80 0.35175001 -0.41870916 81 0.01875757 0.35175001 82 1.93638448 0.01875757 83 -2.78574878 1.93638448 84 0.43980631 -2.78574878 85 0.73192846 0.43980631 86 1.76133558 0.73192846 87 -0.79389324 1.76133558 88 0.70459240 -0.79389324 89 0.99037133 0.70459240 90 0.09331624 0.99037133 91 -0.07651022 0.09331624 92 -1.42548382 -0.07651022 93 2.26740384 -1.42548382 94 1.53206713 2.26740384 95 3.92777958 1.53206713 96 -0.47219751 3.92777958 97 2.05267352 -0.47219751 98 -0.98117594 2.05267352 99 1.23568648 -0.98117594 100 1.53680141 1.23568648 101 -0.88781022 1.53680141 102 1.44115730 -0.88781022 103 0.99659472 1.44115730 104 1.85927688 0.99659472 105 0.29463265 1.85927688 106 -3.56853713 0.29463265 107 2.44383089 -3.56853713 108 0.38385860 2.44383089 109 -0.19185372 0.38385860 110 -0.47729749 -0.19185372 111 0.70523767 -0.47729749 112 0.54210501 0.70523767 113 1.31681816 0.54210501 114 -1.78045613 1.31681816 115 0.28130189 -1.78045613 116 0.77329284 0.28130189 117 0.85175778 0.77329284 118 0.47322302 0.85175778 119 1.64111587 0.47322302 120 -0.89115448 1.64111587 121 -1.35721915 -0.89115448 122 1.73826619 -1.35721915 123 -4.13836843 1.73826619 124 1.50969597 -4.13836843 125 -0.43396887 1.50969597 126 -1.05533171 -0.43396887 127 -1.14114878 -1.05533171 128 0.38973925 -1.14114878 129 -2.50187474 0.38973925 130 -1.84214487 -2.50187474 131 -6.04489768 -1.84214487 132 0.07307125 -6.04489768 133 0.27619839 0.07307125 134 1.68009259 0.27619839 135 1.36408451 1.68009259 136 -4.66849938 1.36408451 137 4.59299690 -4.66849938 138 -0.83675959 4.59299690 139 0.85418928 -0.83675959 140 1.63739023 0.85418928 141 1.50273427 1.63739023 142 0.67875398 1.50273427 143 -3.18113068 0.67875398 144 0.79635421 -3.18113068 145 -1.40829054 0.79635421 146 -0.73665039 -1.40829054 147 0.75246254 -0.73665039 148 -2.94598622 0.75246254 149 -0.31006294 -2.94598622 > 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/791tg1290473590.ps",horizontal=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/8kts11290473590.ps",horizontal=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/9kts11290473590.ps",horizontal=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/10kts11290473590.ps",horizontal=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/11y3qs1290473590.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/129u7v1290473590.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/13yvmo1290473590.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/1484m91290473590.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/15cnkx1290473590.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/168eio1290473590.tab") + } > > try(system("convert tmp/161va1290473590.ps tmp/161va1290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/261va1290473590.ps tmp/261va1290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/361va1290473590.ps tmp/361va1290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/4haud1290473590.ps tmp/4haud1290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/5haud1290473590.ps tmp/5haud1290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/6haud1290473590.ps tmp/6haud1290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/791tg1290473590.ps tmp/791tg1290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/8kts11290473590.ps tmp/8kts11290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/9kts11290473590.ps tmp/9kts11290473590.png",intern=TRUE)) character(0) > try(system("convert tmp/10kts11290473590.ps tmp/10kts11290473590.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.895 1.682 10.283