R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(5 + ,2 + ,1 + ,3 + ,73 + ,62 + ,66 + ,12 + ,1 + ,1 + ,1 + ,58 + ,54 + ,54 + ,11 + ,1 + ,1 + ,3 + ,68 + ,41 + ,82 + ,6 + ,1 + ,1 + ,3 + ,62 + ,49 + ,61 + ,12 + ,1 + ,2 + ,3 + ,65 + ,49 + ,65 + ,11 + ,1 + ,1 + ,3 + ,81 + ,72 + ,77 + ,12 + ,1 + ,1 + ,1 + ,73 + ,78 + ,66 + ,7 + ,2 + ,4 + ,3 + ,64 + ,58 + ,66 + ,8 + ,1 + ,1 + ,3 + ,68 + ,58 + ,66 + ,13 + ,1 + ,1 + ,1 + ,51 + ,23 + ,48 + ,12 + ,1 + ,1 + ,1 + ,68 + ,39 + ,57 + ,13 + ,1 + ,1 + ,3 + ,61 + ,63 + ,80 + ,12 + ,1 + ,1 + ,1 + ,69 + ,46 + ,60 + ,12 + ,1 + ,3 + ,3 + ,73 + ,58 + ,70 + ,11 + ,2 + ,1 + ,3 + ,61 + ,39 + ,85 + ,12 + ,2 + ,1 + ,1 + ,62 + ,44 + ,59 + ,12 + ,1 + ,1 + ,1 + ,63 + ,49 + ,72 + ,12 + ,1 + ,6 + ,1 + ,69 + ,57 + ,70 + ,11 + ,2 + ,1 + ,3 + ,47 + ,76 + ,74 + ,13 + ,2 + ,1 + ,1 + ,66 + ,63 + ,70 + ,9 + ,1 + ,1 + ,3 + ,58 + ,18 + ,51 + ,11 + ,2 + ,1 + ,3 + ,63 + ,40 + ,70 + ,11 + ,1 + ,1 + ,1 + ,69 + ,59 + ,71 + ,11 + ,2 + ,1 + ,3 + ,59 + ,62 + ,72 + ,9 + ,1 + ,1 + ,1 + ,59 + ,70 + ,50 + ,11 + ,2 + ,1 + ,4 + ,63 + ,65 + ,69 + ,12 + ,2 + ,1 + ,3 + ,65 + ,56 + ,73 + ,12 + ,1 + ,1 + ,3 + ,65 + ,45 + ,66 + ,10 + ,2 + ,1 + ,3 + ,71 + ,57 + ,73 + ,12 + ,1 + ,4 + ,3 + ,60 + ,50 + ,58 + ,12 + ,2 + ,1 + ,1 + ,81 + ,40 + ,78 + ,12 + ,1 + ,1 + ,3 + ,67 + ,58 + ,83 + ,9 + ,2 + ,1 + ,3 + ,66 + ,49 + ,76 + ,9 + ,1 + ,1 + ,3 + ,62 + ,49 + ,77 + ,12 + ,1 + ,1 + ,3 + ,63 + ,27 + ,79 + ,14 + ,2 + ,1 + ,1 + ,73 + ,51 + ,71 + ,12 + ,2 + ,1 + ,3 + ,55 + ,75 + ,79 + ,11 + ,1 + ,1 + ,1 + ,59 + ,65 + ,60 + ,9 + ,1 + ,1 + ,2 + ,64 + ,47 + ,73 + ,11 + ,2 + ,1 + ,3 + ,63 + ,49 + ,70 + ,7 + ,1 + ,1 + ,1 + ,64 + ,65 + ,42 + ,15 + ,1 + ,1 + ,1 + ,73 + ,61 + ,74 + ,11 + ,1 + ,1 + ,3 + ,54 + ,46 + ,68 + ,12 + ,1 + ,1 + ,3 + ,76 + ,69 + ,83 + ,12 + ,2 + ,2 + ,1 + ,74 + ,55 + ,62 + ,9 + ,2 + ,1 + ,3 + ,63 + ,78 + ,79 + ,12 + ,2 + ,1 + ,3 + ,73 + ,58 + ,61 + ,11 + ,2 + ,1 + ,3 + ,67 + ,34 + ,86 + ,11 + ,2 + ,2 + ,3 + ,68 + ,67 + ,64 + ,8 + ,1 + ,4 + ,3 + ,66 + ,45 + ,75 + ,7 + ,2 + ,1 + ,1 + ,62 + ,68 + ,59 + ,12 + ,2 + ,4 + ,3 + ,71 + ,49 + ,82 + ,8 + ,1 + ,1 + ,2 + ,63 + ,19 + ,61 + ,10 + ,1 + ,1 + ,1 + ,75 + ,72 + ,69 + ,12 + ,1 + ,2 + ,2 + ,77 + ,59 + ,60 + ,15 + ,2 + ,3 + ,3 + ,62 + ,46 + ,59 + ,12 + ,1 + ,1 + ,3 + ,74 + ,56 + ,81 + ,12 + ,2 + ,2 + ,1 + ,67 + ,45 + ,65 + ,12 + ,2 + ,1 + ,3 + ,56 + ,53 + ,60 + ,12 + ,2 + ,1 + ,1 + ,60 + ,67 + ,60 + ,8 + ,2 + ,1 + ,3 + ,58 + ,73 + ,45 + ,10 + ,1 + ,1 + ,3 + ,65 + ,46 + ,75 + ,14 + ,2 + ,1 + ,3 + ,49 + ,70 + ,84 + ,10 + ,1 + ,1 + ,3 + ,61 + ,38 + ,77 + ,12 + ,2 + ,1 + ,3 + ,66 + ,54 + ,64 + ,14 + ,2 + ,1 + ,3 + ,64 + ,46 + ,54 + ,6 + ,2 + ,1 + ,1 + ,65 + ,46 + ,72 + ,11 + ,1 + ,1 + ,3 + ,46 + ,45 + ,56 + ,10 + ,2 + ,1 + ,3 + ,65 + ,47 + ,67 + ,14 + ,2 + ,1 + ,3 + ,81 + ,25 + ,81 + ,12 + ,1 + ,1 + ,1 + ,72 + ,63 + ,73 + ,13 + ,2 + ,1 + ,1 + ,65 + ,46 + ,67 + ,11 + ,2 + ,1 + ,3 + ,74 + ,69 + ,72 + ,11 + ,1 + ,1 + ,3 + ,59 + ,43 + ,69 + ,12 + ,1 + ,1 + ,1 + ,69 + ,49 + ,71 + ,13 + ,2 + ,2 + ,3 + ,58 + ,39 + ,77 + ,12 + ,1 + ,1 + ,1 + ,71 + ,65 + ,63 + ,8 + ,2 + ,1 + ,3 + ,79 + ,54 + ,49 + ,12 + ,2 + ,1 + ,3 + ,68 + ,50 + ,74 + ,11 + ,1 + ,1 + ,3 + ,66 + ,42 + ,76 + ,10 + ,2 + ,1 + ,3 + ,62 + ,45 + ,65 + ,12 + ,1 + ,1 + ,3 + ,69 + ,50 + ,65 + ,11 + ,2 + ,2 + ,7 + ,63 + ,55 + ,69 + ,12 + ,1 + ,1 + ,1 + ,62 + ,38 + ,71 + ,12 + ,1 + ,1 + ,3 + ,61 + ,40 + ,68 + ,10 + ,2 + ,1 + ,1 + ,65 + ,51 + ,49 + ,12 + ,1 + ,1 + ,3 + ,64 + ,49 + ,86 + ,12 + ,2 + ,1 + ,1 + ,56 + ,39 + ,63 + ,11 + ,2 + ,1 + ,3 + ,56 + ,57 + ,77 + ,10 + ,1 + ,1 + ,3 + ,48 + ,30 + ,52 + ,12 + ,1 + ,1 + ,1 + ,74 + ,51 + ,73 + ,11 + ,1 + ,1 + ,1 + ,69 + ,48 + ,63 + ,12 + ,1 + ,4 + ,3 + ,62 + ,56 + ,54 + ,12 + ,1 + ,1 + ,2 + ,73 + ,66 + ,56 + ,10 + ,1 + ,1 + ,1 + ,64 + ,72 + ,54 + ,11 + ,1 + ,1 + ,1 + ,57 + ,28 + ,61 + ,10 + ,1 + ,1 + ,2 + ,57 + ,52 + ,70 + ,11 + ,2 + ,1 + ,2 + ,60 + ,53 + ,68 + ,11 + ,2 + ,1 + ,1 + ,61 + ,70 + ,63 + ,12 + ,1 + ,1 + ,2 + ,72 + ,63 + ,76 + ,11 + ,1 + ,1 + ,3 + ,57 + ,46 + ,69 + ,11 + ,1 + ,2 + ,3 + ,51 + ,45 + ,71 + ,7 + ,1 + ,1 + ,2 + ,63 + ,68 + ,39 + ,12 + ,1 + ,1 + ,3 + ,54 + ,54 + ,54 + ,8 + ,1 + ,1 + ,1 + ,72 + ,60 + ,64 + ,10 + ,1 + ,1 + ,3 + ,62 + ,50 + ,70 + ,12 + ,1 + ,1 + ,2 + ,68 + ,66 + ,76 + ,11 + ,1 + ,1 + ,3 + ,62 + ,56 + ,71 + ,13 + ,2 + ,1 + ,2 + ,63 + ,54 + ,73 + ,9 + ,1 + ,1 + ,3 + ,77 + ,72 + ,81 + ,11 + ,1 + ,1 + ,1 + ,57 + ,34 + ,50 + ,13 + ,1 + ,1 + ,1 + ,57 + ,39 + ,42 + ,8 + ,1 + ,1 + ,3 + ,61 + ,66 + ,66 + ,12 + ,1 + ,1 + ,3 + ,65 + ,27 + ,77 + ,11 + ,1 + ,1 + ,3 + ,63 + ,63 + ,62 + ,11 + ,2 + ,1 + ,1 + ,66 + ,65 + ,66 + ,12 + ,1 + ,1 + ,3 + ,68 + ,63 + ,69 + ,13 + ,1 + ,1 + ,3 + ,72 + ,49 + ,72 + ,11 + ,1 + ,1 + ,1 + ,68 + ,42 + ,67 + ,10 + ,1 + ,1 + ,1 + ,59 + ,51 + ,59 + ,10 + ,1 + ,4 + ,3 + ,56 + ,50 + ,66 + ,10 + ,1 + ,1 + ,1 + ,62 + ,64 + ,68 + ,12 + ,2 + ,1 + ,3 + ,72 + ,68 + ,72 + ,12 + ,2 + ,1 + ,3 + ,68 + ,66 + ,73 + ,13 + ,1 + ,1 + ,3 + ,67 + ,59 + ,69 + ,11 + ,1 + ,2 + ,1 + ,54 + ,32 + ,57 + ,11 + ,2 + ,1 + ,1 + ,69 + ,62 + ,55 + ,12 + ,1 + ,2 + ,3 + ,61 + ,52 + ,72 + ,9 + ,1 + ,1 + ,3 + ,55 + ,34 + ,68 + ,11 + ,2 + ,1 + ,3 + ,75 + ,63 + ,83 + ,12 + ,1 + ,1 + ,3 + ,55 + ,48 + ,74 + ,12 + ,1 + ,1 + ,3 + ,49 + ,53 + ,72 + ,13 + ,2 + ,1 + ,3 + ,54 + ,39 + ,66 + ,6 + ,1 + ,1 + ,3 + ,66 + ,51 + ,61 + ,11 + ,1 + ,1 + ,3 + ,73 + ,60 + ,86 + ,10 + ,2 + ,1 + ,2 + ,63 + ,70 + ,81 + ,12 + ,2 + ,4 + ,3 + ,61 + ,40 + ,79 + ,11 + ,1 + ,1 + ,3 + ,74 + ,61 + ,73 + ,12 + ,2 + ,5 + ,3 + ,81 + ,35 + ,59 + ,12 + ,1 + ,1 + ,1 + ,62 + ,39 + ,64 + ,7 + ,1 + ,1 + ,2 + ,64 + ,31 + ,75 + ,12 + ,1 + ,1 + ,3 + ,62 + ,36 + ,68 + ,12 + ,1 + ,1 + ,1 + ,85 + ,51 + ,84 + ,9 + ,1 + ,1 + ,1 + ,74 + ,55 + ,68 + ,12 + ,1 + ,1 + ,3 + ,51 + ,67 + ,68 + ,12 + ,1 + ,1 + ,3 + ,66 + ,40 + ,69) + ,dim=c(7 + ,146) + ,dimnames=list(c('FF' + ,'Geslacht' + ,'Opvoeding' + ,'Huwelijksstatus' + ,'TotNV' + ,'TotAngst' + ,'TotGroep') + ,1:146)) > y <- array(NA,dim=c(7,146),dimnames=list(c('FF','Geslacht','Opvoeding','Huwelijksstatus','TotNV','TotAngst','TotGroep'),1:146)) > 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 = '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 > 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 FF Geslacht Opvoeding Huwelijksstatus TotNV TotAngst TotGroep 1 5 2 1 3 73 62 66 2 12 1 1 1 58 54 54 3 11 1 1 3 68 41 82 4 6 1 1 3 62 49 61 5 12 1 2 3 65 49 65 6 11 1 1 3 81 72 77 7 12 1 1 1 73 78 66 8 7 2 4 3 64 58 66 9 8 1 1 3 68 58 66 10 13 1 1 1 51 23 48 11 12 1 1 1 68 39 57 12 13 1 1 3 61 63 80 13 12 1 1 1 69 46 60 14 12 1 3 3 73 58 70 15 11 2 1 3 61 39 85 16 12 2 1 1 62 44 59 17 12 1 1 1 63 49 72 18 12 1 6 1 69 57 70 19 11 2 1 3 47 76 74 20 13 2 1 1 66 63 70 21 9 1 1 3 58 18 51 22 11 2 1 3 63 40 70 23 11 1 1 1 69 59 71 24 11 2 1 3 59 62 72 25 9 1 1 1 59 70 50 26 11 2 1 4 63 65 69 27 12 2 1 3 65 56 73 28 12 1 1 3 65 45 66 29 10 2 1 3 71 57 73 30 12 1 4 3 60 50 58 31 12 2 1 1 81 40 78 32 12 1 1 3 67 58 83 33 9 2 1 3 66 49 76 34 9 1 1 3 62 49 77 35 12 1 1 3 63 27 79 36 14 2 1 1 73 51 71 37 12 2 1 3 55 75 79 38 11 1 1 1 59 65 60 39 9 1 1 2 64 47 73 40 11 2 1 3 63 49 70 41 7 1 1 1 64 65 42 42 15 1 1 1 73 61 74 43 11 1 1 3 54 46 68 44 12 1 1 3 76 69 83 45 12 2 2 1 74 55 62 46 9 2 1 3 63 78 79 47 12 2 1 3 73 58 61 48 11 2 1 3 67 34 86 49 11 2 2 3 68 67 64 50 8 1 4 3 66 45 75 51 7 2 1 1 62 68 59 52 12 2 4 3 71 49 82 53 8 1 1 2 63 19 61 54 10 1 1 1 75 72 69 55 12 1 2 2 77 59 60 56 15 2 3 3 62 46 59 57 12 1 1 3 74 56 81 58 12 2 2 1 67 45 65 59 12 2 1 3 56 53 60 60 12 2 1 1 60 67 60 61 8 2 1 3 58 73 45 62 10 1 1 3 65 46 75 63 14 2 1 3 49 70 84 64 10 1 1 3 61 38 77 65 12 2 1 3 66 54 64 66 14 2 1 3 64 46 54 67 6 2 1 1 65 46 72 68 11 1 1 3 46 45 56 69 10 2 1 3 65 47 67 70 14 2 1 3 81 25 81 71 12 1 1 1 72 63 73 72 13 2 1 1 65 46 67 73 11 2 1 3 74 69 72 74 11 1 1 3 59 43 69 75 12 1 1 1 69 49 71 76 13 2 2 3 58 39 77 77 12 1 1 1 71 65 63 78 8 2 1 3 79 54 49 79 12 2 1 3 68 50 74 80 11 1 1 3 66 42 76 81 10 2 1 3 62 45 65 82 12 1 1 3 69 50 65 83 11 2 2 7 63 55 69 84 12 1 1 1 62 38 71 85 12 1 1 3 61 40 68 86 10 2 1 1 65 51 49 87 12 1 1 3 64 49 86 88 12 2 1 1 56 39 63 89 11 2 1 3 56 57 77 90 10 1 1 3 48 30 52 91 12 1 1 1 74 51 73 92 11 1 1 1 69 48 63 93 12 1 4 3 62 56 54 94 12 1 1 2 73 66 56 95 10 1 1 1 64 72 54 96 11 1 1 1 57 28 61 97 10 1 1 2 57 52 70 98 11 2 1 2 60 53 68 99 11 2 1 1 61 70 63 100 12 1 1 2 72 63 76 101 11 1 1 3 57 46 69 102 11 1 2 3 51 45 71 103 7 1 1 2 63 68 39 104 12 1 1 3 54 54 54 105 8 1 1 1 72 60 64 106 10 1 1 3 62 50 70 107 12 1 1 2 68 66 76 108 11 1 1 3 62 56 71 109 13 2 1 2 63 54 73 110 9 1 1 3 77 72 81 111 11 1 1 1 57 34 50 112 13 1 1 1 57 39 42 113 8 1 1 3 61 66 66 114 12 1 1 3 65 27 77 115 11 1 1 3 63 63 62 116 11 2 1 1 66 65 66 117 12 1 1 3 68 63 69 118 13 1 1 3 72 49 72 119 11 1 1 1 68 42 67 120 10 1 1 1 59 51 59 121 10 1 4 3 56 50 66 122 10 1 1 1 62 64 68 123 12 2 1 3 72 68 72 124 12 2 1 3 68 66 73 125 13 1 1 3 67 59 69 126 11 1 2 1 54 32 57 127 11 2 1 1 69 62 55 128 12 1 2 3 61 52 72 129 9 1 1 3 55 34 68 130 11 2 1 3 75 63 83 131 12 1 1 3 55 48 74 132 12 1 1 3 49 53 72 133 13 2 1 3 54 39 66 134 6 1 1 3 66 51 61 135 11 1 1 3 73 60 86 136 10 2 1 2 63 70 81 137 12 2 4 3 61 40 79 138 11 1 1 3 74 61 73 139 12 2 5 3 81 35 59 140 12 1 1 1 62 39 64 141 7 1 1 2 64 31 75 142 12 1 1 3 62 36 68 143 12 1 1 1 85 51 84 144 9 1 1 1 74 55 68 145 12 1 1 3 51 67 68 146 12 1 1 3 66 40 69 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Geslacht Opvoeding Huwelijksstatus 9.18224 0.29899 0.16316 -0.25708 TotNV TotAngst TotGroep -0.01003 -0.01481 0.04739 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.7655 -0.8382 0.3178 1.0997 4.0084 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.18224 1.55786 5.894 2.72e-08 *** Geslacht 0.29899 0.30714 0.973 0.33201 Opvoeding 0.16316 0.17309 0.943 0.34750 Huwelijksstatus -0.25708 0.16104 -1.596 0.11268 TotNV -0.01003 0.02141 -0.468 0.64035 TotAngst -0.01481 0.01190 -1.245 0.21513 TotGroep 0.04739 0.01672 2.835 0.00527 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.764 on 139 degrees of freedom Multiple R-squared: 0.0756, Adjusted R-squared: 0.0357 F-statistic: 1.895 on 6 and 139 DF, p-value: 0.08588 > 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.50976378 0.980472431 0.4902362153 [2,] 0.73808186 0.523836286 0.2619181428 [3,] 0.75903366 0.481932690 0.2409663450 [4,] 0.66397687 0.672046251 0.3360231256 [5,] 0.57216714 0.855665712 0.4278328562 [6,] 0.51547594 0.969048119 0.4845240596 [7,] 0.57843996 0.843120086 0.4215600428 [8,] 0.76182995 0.476340095 0.2381700474 [9,] 0.80738329 0.385233418 0.1926167089 [10,] 0.76751931 0.464961383 0.2324806916 [11,] 0.74313256 0.513734890 0.2568674448 [12,] 0.68808906 0.623821882 0.3119109412 [13,] 0.69569269 0.608614625 0.3043073124 [14,] 0.71423970 0.571520600 0.2857603001 [15,] 0.68073311 0.638533784 0.3192668920 [16,] 0.66470359 0.670592828 0.3352964141 [17,] 0.76273944 0.474521111 0.2372605554 [18,] 0.75931471 0.481370576 0.2406852881 [19,] 0.75351855 0.492962903 0.2464814517 [20,] 0.70536471 0.589270582 0.2946352911 [21,] 0.72948251 0.541034989 0.2705174945 [22,] 0.67436202 0.651275963 0.3256379817 [23,] 0.61744466 0.765110672 0.3825553362 [24,] 0.62217364 0.755652726 0.3778263628 [25,] 0.68320202 0.633595966 0.3167979829 [26,] 0.62805471 0.743890590 0.3719452948 [27,] 0.67004945 0.659901109 0.3299505546 [28,] 0.62600497 0.747990067 0.3739950334 [29,] 0.58207529 0.835849424 0.4179247121 [30,] 0.65896594 0.682068119 0.3410340596 [31,] 0.61359976 0.772800477 0.3864002384 [32,] 0.66128243 0.677435143 0.3387175715 [33,] 0.76254330 0.474913396 0.2374566978 [34,] 0.71805597 0.563888064 0.2819440319 [35,] 0.68493414 0.630131724 0.3150658620 [36,] 0.65072616 0.698547678 0.3492738390 [37,] 0.66139218 0.677215639 0.3386078193 [38,] 0.72948295 0.541034099 0.2705170495 [39,] 0.70352190 0.592956209 0.2964781047 [40,] 0.68012653 0.639746947 0.3198734736 [41,] 0.78796165 0.424076698 0.2120383491 [42,] 0.90671077 0.186578454 0.0932892272 [43,] 0.88861431 0.222771390 0.1113856950 [44,] 0.92714378 0.145712430 0.0728562150 [45,] 0.91871626 0.162567473 0.0812837367 [46,] 0.91687519 0.166249623 0.0831248117 [47,] 0.97964284 0.040714312 0.0203571562 [48,] 0.97443094 0.051138121 0.0255690603 [49,] 0.96629414 0.067411726 0.0337058631 [50,] 0.96470961 0.070580778 0.0352903889 [51,] 0.95753454 0.084930928 0.0424654642 [52,] 0.95528835 0.089423293 0.0447116466 [53,] 0.94701520 0.105969603 0.0529848013 [54,] 0.95525259 0.089494823 0.0447474117 [55,] 0.95004864 0.099902717 0.0499513583 [56,] 0.94542952 0.109140967 0.0545704833 [57,] 0.97795391 0.044092185 0.0220460923 [58,] 0.99941013 0.001179741 0.0005898707 [59,] 0.99914116 0.001717672 0.0008588361 [60,] 0.99891740 0.002165196 0.0010825981 [61,] 0.99908113 0.001837737 0.0009188683 [62,] 0.99874309 0.002513813 0.0012569066 [63,] 0.99856961 0.002860772 0.0014303859 [64,] 0.99787024 0.004259512 0.0021297562 [65,] 0.99687984 0.006240320 0.0031201601 [66,] 0.99577962 0.008440767 0.0042203836 [67,] 0.99475079 0.010498429 0.0052492143 [68,] 0.99409569 0.011808614 0.0059043072 [69,] 0.99513051 0.009738974 0.0048694868 [70,] 0.99333421 0.013331573 0.0066657864 [71,] 0.99063263 0.018734744 0.0093673718 [72,] 0.98912218 0.021755647 0.0108778236 [73,] 0.98773539 0.024529226 0.0122646128 [74,] 0.98528853 0.029422942 0.0147114710 [75,] 0.98103621 0.037927581 0.0189637904 [76,] 0.97657602 0.046847964 0.0234239818 [77,] 0.97068640 0.058627210 0.0293136048 [78,] 0.96229078 0.075418442 0.0377092211 [79,] 0.95113061 0.097738781 0.0488693907 [80,] 0.93873328 0.122533450 0.0612667249 [81,] 0.92629680 0.147406393 0.0737031964 [82,] 0.91589292 0.168214168 0.0841070841 [83,] 0.89524193 0.209516150 0.1047580748 [84,] 0.88958089 0.220838224 0.1104191122 [85,] 0.89696124 0.206077518 0.1030387588 [86,] 0.87278940 0.254421195 0.1272105977 [87,] 0.84308690 0.313826199 0.1569130995 [88,] 0.81893086 0.362138287 0.1810691434 [89,] 0.78738009 0.425239819 0.2126199096 [90,] 0.74572010 0.508559791 0.2542798956 [91,] 0.73123334 0.537533320 0.2687666601 [92,] 0.68428013 0.631439743 0.3157198713 [93,] 0.63458846 0.730823076 0.3654115379 [94,] 0.70549954 0.589000915 0.2945004575 [95,] 0.68433602 0.631327955 0.3156639773 [96,] 0.73146024 0.537079516 0.2685397580 [97,] 0.69679070 0.606418600 0.3032093000 [98,] 0.67991064 0.640178728 0.3200893638 [99,] 0.62598935 0.748021310 0.3740106550 [100,] 0.60374830 0.792503406 0.3962517030 [101,] 0.59369717 0.812605670 0.4063028349 [102,] 0.53437104 0.931257914 0.4656289571 [103,] 0.60443720 0.791125605 0.3955628023 [104,] 0.69254464 0.614910710 0.3074553551 [105,] 0.64629480 0.707410408 0.3537052041 [106,] 0.58732843 0.825343147 0.4126715734 [107,] 0.52276026 0.954479475 0.4772397375 [108,] 0.47853548 0.957070953 0.5214645234 [109,] 0.50469944 0.990601128 0.4953005642 [110,] 0.44796707 0.895934148 0.5520329262 [111,] 0.38384432 0.767688634 0.6161556829 [112,] 0.36487965 0.729759305 0.6351203476 [113,] 0.31406850 0.628137005 0.6859314975 [114,] 0.25963363 0.519267269 0.7403663654 [115,] 0.20910768 0.418215366 0.7908923170 [116,] 0.23572308 0.471446154 0.7642769229 [117,] 0.17899569 0.357991379 0.8210043103 [118,] 0.13545475 0.270909490 0.8645452548 [119,] 0.10028341 0.200566819 0.8997165903 [120,] 0.09769764 0.195395285 0.9023023576 [121,] 0.06438893 0.128777854 0.9356110730 [122,] 0.04254062 0.085081237 0.9574593817 [123,] 0.02722053 0.054441062 0.9727794688 [124,] 0.03741511 0.074830213 0.9625848933 [125,] 0.22263544 0.445270874 0.7773645630 [126,] 0.13785348 0.275706964 0.8621465182 [127,] 0.08344326 0.166886512 0.9165567438 > postscript(file="/var/www/rcomp/tmp/17ry01292185129.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/rcomp/tmp/2z0fk1292185129.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/rcomp/tmp/3z0fk1292185129.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/rcomp/tmp/4z0fk1292185129.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/rcomp/tmp/5sawn1292185129.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 = 146 Frequency = 1 1 2 3 4 5 6 -5.64970067 1.43494423 -0.47023852 -4.41662036 1.26072348 0.35631574 7 8 9 10 11 12 1.37216204 -4.28868335 -2.46010045 2.18987918 1.17081757 1.88027388 13 14 15 16 17 18 1.14236285 1.07413479 -1.01122464 0.79095097 0.55792261 0.01557349 19 20 21 22 23 24 -0.08214420 1.59119799 -1.44203113 -0.26545370 -0.18638194 -0.07443551 25 26 27 28 29 30 -1.12842793 0.40937170 0.84944590 1.31723514 -1.07557986 1.23083530 31 32 33 34 35 36 0.02172346 0.72418235 -2.38640739 -2.17491732 0.41441021 2.43622097 37 38 39 40 41 42 0.74628724 0.32356555 -2.25199537 -0.13212606 -2.77321698 3.74117245 43 44 45 46 47 48 0.12696876 0.97737845 0.76888447 -2.12905680 1.52801040 -1.07252905 49 50 51 52 53 54 0.30586203 -3.58876608 -3.85350864 -0.11012122 -3.10809643 -0.83885038 55 56 57 58 59 60 1.50907596 4.00840998 0.85952784 0.40837523 1.33087954 1.06423026 61 62 63 64 65 66 -1.64188005 -1.09449272 2.37508846 -1.34790001 1.25638625 3.59175504 67 68 69 70 71 72 -5.76545692 0.60066388 -0.99952039 2.17148458 0.80816770 1.47151089 73 74 75 76 77 78 0.17966393 0.08526603 0.66547623 1.17468186 1.30170499 -1.90236354 79 80 81 82 83 84 0.74324727 -0.19111633 -0.96444166 1.47880632 0.86929974 0.43233348 85 86 87 88 89 90 1.10827040 -0.60133411 0.41859399 0.46714575 -0.41555426 -0.41192126 91 92 93 94 95 96 0.65045086 0.02981053 1.52934799 1.92540473 -0.23824042 -0.29200612 97 98 99 100 101 102 -1.10593051 -0.26523951 -0.02348120 0.92306429 0.10965523 -0.22326809 103 104 105 106 107 108 -2.33954315 1.90899206 -2.80973280 -0.82834822 0.92740013 0.21314332 109 110 111 112 113 114 1.54268690 -1.87336521 0.31820814 2.77142753 -2.41177373 0.52925069 115 116 117 118 119 120 0.75341132 -0.18959940 1.47178978 2.16231725 -0.25867548 -0.83643945 121 122 123 124 125 126 -1.18841990 -1.04031708 1.14479639 1.02766775 2.40250637 -0.23641714 127 128 129 130 131 132 0.31736724 0.93330440 -2.04077476 -0.42052366 0.88226244 0.99096041 133 134 135 136 137 138 1.81906626 -4.34688528 -0.32820991 -1.59943466 -0.20153495 0.31274724 139 140 141 142 143 144 0.70963693 0.77890259 -4.58380941 1.05904035 0.23941515 -2.05332460 145 146 1.40798656 1.11101022 > postscript(file="/var/www/rcomp/tmp/6sawn1292185129.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 = 146 Frequency = 1 lag(myerror, k = 1) myerror 0 -5.64970067 NA 1 1.43494423 -5.64970067 2 -0.47023852 1.43494423 3 -4.41662036 -0.47023852 4 1.26072348 -4.41662036 5 0.35631574 1.26072348 6 1.37216204 0.35631574 7 -4.28868335 1.37216204 8 -2.46010045 -4.28868335 9 2.18987918 -2.46010045 10 1.17081757 2.18987918 11 1.88027388 1.17081757 12 1.14236285 1.88027388 13 1.07413479 1.14236285 14 -1.01122464 1.07413479 15 0.79095097 -1.01122464 16 0.55792261 0.79095097 17 0.01557349 0.55792261 18 -0.08214420 0.01557349 19 1.59119799 -0.08214420 20 -1.44203113 1.59119799 21 -0.26545370 -1.44203113 22 -0.18638194 -0.26545370 23 -0.07443551 -0.18638194 24 -1.12842793 -0.07443551 25 0.40937170 -1.12842793 26 0.84944590 0.40937170 27 1.31723514 0.84944590 28 -1.07557986 1.31723514 29 1.23083530 -1.07557986 30 0.02172346 1.23083530 31 0.72418235 0.02172346 32 -2.38640739 0.72418235 33 -2.17491732 -2.38640739 34 0.41441021 -2.17491732 35 2.43622097 0.41441021 36 0.74628724 2.43622097 37 0.32356555 0.74628724 38 -2.25199537 0.32356555 39 -0.13212606 -2.25199537 40 -2.77321698 -0.13212606 41 3.74117245 -2.77321698 42 0.12696876 3.74117245 43 0.97737845 0.12696876 44 0.76888447 0.97737845 45 -2.12905680 0.76888447 46 1.52801040 -2.12905680 47 -1.07252905 1.52801040 48 0.30586203 -1.07252905 49 -3.58876608 0.30586203 50 -3.85350864 -3.58876608 51 -0.11012122 -3.85350864 52 -3.10809643 -0.11012122 53 -0.83885038 -3.10809643 54 1.50907596 -0.83885038 55 4.00840998 1.50907596 56 0.85952784 4.00840998 57 0.40837523 0.85952784 58 1.33087954 0.40837523 59 1.06423026 1.33087954 60 -1.64188005 1.06423026 61 -1.09449272 -1.64188005 62 2.37508846 -1.09449272 63 -1.34790001 2.37508846 64 1.25638625 -1.34790001 65 3.59175504 1.25638625 66 -5.76545692 3.59175504 67 0.60066388 -5.76545692 68 -0.99952039 0.60066388 69 2.17148458 -0.99952039 70 0.80816770 2.17148458 71 1.47151089 0.80816770 72 0.17966393 1.47151089 73 0.08526603 0.17966393 74 0.66547623 0.08526603 75 1.17468186 0.66547623 76 1.30170499 1.17468186 77 -1.90236354 1.30170499 78 0.74324727 -1.90236354 79 -0.19111633 0.74324727 80 -0.96444166 -0.19111633 81 1.47880632 -0.96444166 82 0.86929974 1.47880632 83 0.43233348 0.86929974 84 1.10827040 0.43233348 85 -0.60133411 1.10827040 86 0.41859399 -0.60133411 87 0.46714575 0.41859399 88 -0.41555426 0.46714575 89 -0.41192126 -0.41555426 90 0.65045086 -0.41192126 91 0.02981053 0.65045086 92 1.52934799 0.02981053 93 1.92540473 1.52934799 94 -0.23824042 1.92540473 95 -0.29200612 -0.23824042 96 -1.10593051 -0.29200612 97 -0.26523951 -1.10593051 98 -0.02348120 -0.26523951 99 0.92306429 -0.02348120 100 0.10965523 0.92306429 101 -0.22326809 0.10965523 102 -2.33954315 -0.22326809 103 1.90899206 -2.33954315 104 -2.80973280 1.90899206 105 -0.82834822 -2.80973280 106 0.92740013 -0.82834822 107 0.21314332 0.92740013 108 1.54268690 0.21314332 109 -1.87336521 1.54268690 110 0.31820814 -1.87336521 111 2.77142753 0.31820814 112 -2.41177373 2.77142753 113 0.52925069 -2.41177373 114 0.75341132 0.52925069 115 -0.18959940 0.75341132 116 1.47178978 -0.18959940 117 2.16231725 1.47178978 118 -0.25867548 2.16231725 119 -0.83643945 -0.25867548 120 -1.18841990 -0.83643945 121 -1.04031708 -1.18841990 122 1.14479639 -1.04031708 123 1.02766775 1.14479639 124 2.40250637 1.02766775 125 -0.23641714 2.40250637 126 0.31736724 -0.23641714 127 0.93330440 0.31736724 128 -2.04077476 0.93330440 129 -0.42052366 -2.04077476 130 0.88226244 -0.42052366 131 0.99096041 0.88226244 132 1.81906626 0.99096041 133 -4.34688528 1.81906626 134 -0.32820991 -4.34688528 135 -1.59943466 -0.32820991 136 -0.20153495 -1.59943466 137 0.31274724 -0.20153495 138 0.70963693 0.31274724 139 0.77890259 0.70963693 140 -4.58380941 0.77890259 141 1.05904035 -4.58380941 142 0.23941515 1.05904035 143 -2.05332460 0.23941515 144 1.40798656 -2.05332460 145 1.11101022 1.40798656 146 NA 1.11101022 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.43494423 -5.64970067 [2,] -0.47023852 1.43494423 [3,] -4.41662036 -0.47023852 [4,] 1.26072348 -4.41662036 [5,] 0.35631574 1.26072348 [6,] 1.37216204 0.35631574 [7,] -4.28868335 1.37216204 [8,] -2.46010045 -4.28868335 [9,] 2.18987918 -2.46010045 [10,] 1.17081757 2.18987918 [11,] 1.88027388 1.17081757 [12,] 1.14236285 1.88027388 [13,] 1.07413479 1.14236285 [14,] -1.01122464 1.07413479 [15,] 0.79095097 -1.01122464 [16,] 0.55792261 0.79095097 [17,] 0.01557349 0.55792261 [18,] -0.08214420 0.01557349 [19,] 1.59119799 -0.08214420 [20,] -1.44203113 1.59119799 [21,] -0.26545370 -1.44203113 [22,] -0.18638194 -0.26545370 [23,] -0.07443551 -0.18638194 [24,] -1.12842793 -0.07443551 [25,] 0.40937170 -1.12842793 [26,] 0.84944590 0.40937170 [27,] 1.31723514 0.84944590 [28,] -1.07557986 1.31723514 [29,] 1.23083530 -1.07557986 [30,] 0.02172346 1.23083530 [31,] 0.72418235 0.02172346 [32,] -2.38640739 0.72418235 [33,] -2.17491732 -2.38640739 [34,] 0.41441021 -2.17491732 [35,] 2.43622097 0.41441021 [36,] 0.74628724 2.43622097 [37,] 0.32356555 0.74628724 [38,] -2.25199537 0.32356555 [39,] -0.13212606 -2.25199537 [40,] -2.77321698 -0.13212606 [41,] 3.74117245 -2.77321698 [42,] 0.12696876 3.74117245 [43,] 0.97737845 0.12696876 [44,] 0.76888447 0.97737845 [45,] -2.12905680 0.76888447 [46,] 1.52801040 -2.12905680 [47,] -1.07252905 1.52801040 [48,] 0.30586203 -1.07252905 [49,] -3.58876608 0.30586203 [50,] -3.85350864 -3.58876608 [51,] -0.11012122 -3.85350864 [52,] -3.10809643 -0.11012122 [53,] -0.83885038 -3.10809643 [54,] 1.50907596 -0.83885038 [55,] 4.00840998 1.50907596 [56,] 0.85952784 4.00840998 [57,] 0.40837523 0.85952784 [58,] 1.33087954 0.40837523 [59,] 1.06423026 1.33087954 [60,] -1.64188005 1.06423026 [61,] -1.09449272 -1.64188005 [62,] 2.37508846 -1.09449272 [63,] -1.34790001 2.37508846 [64,] 1.25638625 -1.34790001 [65,] 3.59175504 1.25638625 [66,] -5.76545692 3.59175504 [67,] 0.60066388 -5.76545692 [68,] -0.99952039 0.60066388 [69,] 2.17148458 -0.99952039 [70,] 0.80816770 2.17148458 [71,] 1.47151089 0.80816770 [72,] 0.17966393 1.47151089 [73,] 0.08526603 0.17966393 [74,] 0.66547623 0.08526603 [75,] 1.17468186 0.66547623 [76,] 1.30170499 1.17468186 [77,] -1.90236354 1.30170499 [78,] 0.74324727 -1.90236354 [79,] -0.19111633 0.74324727 [80,] -0.96444166 -0.19111633 [81,] 1.47880632 -0.96444166 [82,] 0.86929974 1.47880632 [83,] 0.43233348 0.86929974 [84,] 1.10827040 0.43233348 [85,] -0.60133411 1.10827040 [86,] 0.41859399 -0.60133411 [87,] 0.46714575 0.41859399 [88,] -0.41555426 0.46714575 [89,] -0.41192126 -0.41555426 [90,] 0.65045086 -0.41192126 [91,] 0.02981053 0.65045086 [92,] 1.52934799 0.02981053 [93,] 1.92540473 1.52934799 [94,] -0.23824042 1.92540473 [95,] -0.29200612 -0.23824042 [96,] -1.10593051 -0.29200612 [97,] -0.26523951 -1.10593051 [98,] -0.02348120 -0.26523951 [99,] 0.92306429 -0.02348120 [100,] 0.10965523 0.92306429 [101,] -0.22326809 0.10965523 [102,] -2.33954315 -0.22326809 [103,] 1.90899206 -2.33954315 [104,] -2.80973280 1.90899206 [105,] -0.82834822 -2.80973280 [106,] 0.92740013 -0.82834822 [107,] 0.21314332 0.92740013 [108,] 1.54268690 0.21314332 [109,] -1.87336521 1.54268690 [110,] 0.31820814 -1.87336521 [111,] 2.77142753 0.31820814 [112,] -2.41177373 2.77142753 [113,] 0.52925069 -2.41177373 [114,] 0.75341132 0.52925069 [115,] -0.18959940 0.75341132 [116,] 1.47178978 -0.18959940 [117,] 2.16231725 1.47178978 [118,] -0.25867548 2.16231725 [119,] -0.83643945 -0.25867548 [120,] -1.18841990 -0.83643945 [121,] -1.04031708 -1.18841990 [122,] 1.14479639 -1.04031708 [123,] 1.02766775 1.14479639 [124,] 2.40250637 1.02766775 [125,] -0.23641714 2.40250637 [126,] 0.31736724 -0.23641714 [127,] 0.93330440 0.31736724 [128,] -2.04077476 0.93330440 [129,] -0.42052366 -2.04077476 [130,] 0.88226244 -0.42052366 [131,] 0.99096041 0.88226244 [132,] 1.81906626 0.99096041 [133,] -4.34688528 1.81906626 [134,] -0.32820991 -4.34688528 [135,] -1.59943466 -0.32820991 [136,] -0.20153495 -1.59943466 [137,] 0.31274724 -0.20153495 [138,] 0.70963693 0.31274724 [139,] 0.77890259 0.70963693 [140,] -4.58380941 0.77890259 [141,] 1.05904035 -4.58380941 [142,] 0.23941515 1.05904035 [143,] -2.05332460 0.23941515 [144,] 1.40798656 -2.05332460 [145,] 1.11101022 1.40798656 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.43494423 -5.64970067 2 -0.47023852 1.43494423 3 -4.41662036 -0.47023852 4 1.26072348 -4.41662036 5 0.35631574 1.26072348 6 1.37216204 0.35631574 7 -4.28868335 1.37216204 8 -2.46010045 -4.28868335 9 2.18987918 -2.46010045 10 1.17081757 2.18987918 11 1.88027388 1.17081757 12 1.14236285 1.88027388 13 1.07413479 1.14236285 14 -1.01122464 1.07413479 15 0.79095097 -1.01122464 16 0.55792261 0.79095097 17 0.01557349 0.55792261 18 -0.08214420 0.01557349 19 1.59119799 -0.08214420 20 -1.44203113 1.59119799 21 -0.26545370 -1.44203113 22 -0.18638194 -0.26545370 23 -0.07443551 -0.18638194 24 -1.12842793 -0.07443551 25 0.40937170 -1.12842793 26 0.84944590 0.40937170 27 1.31723514 0.84944590 28 -1.07557986 1.31723514 29 1.23083530 -1.07557986 30 0.02172346 1.23083530 31 0.72418235 0.02172346 32 -2.38640739 0.72418235 33 -2.17491732 -2.38640739 34 0.41441021 -2.17491732 35 2.43622097 0.41441021 36 0.74628724 2.43622097 37 0.32356555 0.74628724 38 -2.25199537 0.32356555 39 -0.13212606 -2.25199537 40 -2.77321698 -0.13212606 41 3.74117245 -2.77321698 42 0.12696876 3.74117245 43 0.97737845 0.12696876 44 0.76888447 0.97737845 45 -2.12905680 0.76888447 46 1.52801040 -2.12905680 47 -1.07252905 1.52801040 48 0.30586203 -1.07252905 49 -3.58876608 0.30586203 50 -3.85350864 -3.58876608 51 -0.11012122 -3.85350864 52 -3.10809643 -0.11012122 53 -0.83885038 -3.10809643 54 1.50907596 -0.83885038 55 4.00840998 1.50907596 56 0.85952784 4.00840998 57 0.40837523 0.85952784 58 1.33087954 0.40837523 59 1.06423026 1.33087954 60 -1.64188005 1.06423026 61 -1.09449272 -1.64188005 62 2.37508846 -1.09449272 63 -1.34790001 2.37508846 64 1.25638625 -1.34790001 65 3.59175504 1.25638625 66 -5.76545692 3.59175504 67 0.60066388 -5.76545692 68 -0.99952039 0.60066388 69 2.17148458 -0.99952039 70 0.80816770 2.17148458 71 1.47151089 0.80816770 72 0.17966393 1.47151089 73 0.08526603 0.17966393 74 0.66547623 0.08526603 75 1.17468186 0.66547623 76 1.30170499 1.17468186 77 -1.90236354 1.30170499 78 0.74324727 -1.90236354 79 -0.19111633 0.74324727 80 -0.96444166 -0.19111633 81 1.47880632 -0.96444166 82 0.86929974 1.47880632 83 0.43233348 0.86929974 84 1.10827040 0.43233348 85 -0.60133411 1.10827040 86 0.41859399 -0.60133411 87 0.46714575 0.41859399 88 -0.41555426 0.46714575 89 -0.41192126 -0.41555426 90 0.65045086 -0.41192126 91 0.02981053 0.65045086 92 1.52934799 0.02981053 93 1.92540473 1.52934799 94 -0.23824042 1.92540473 95 -0.29200612 -0.23824042 96 -1.10593051 -0.29200612 97 -0.26523951 -1.10593051 98 -0.02348120 -0.26523951 99 0.92306429 -0.02348120 100 0.10965523 0.92306429 101 -0.22326809 0.10965523 102 -2.33954315 -0.22326809 103 1.90899206 -2.33954315 104 -2.80973280 1.90899206 105 -0.82834822 -2.80973280 106 0.92740013 -0.82834822 107 0.21314332 0.92740013 108 1.54268690 0.21314332 109 -1.87336521 1.54268690 110 0.31820814 -1.87336521 111 2.77142753 0.31820814 112 -2.41177373 2.77142753 113 0.52925069 -2.41177373 114 0.75341132 0.52925069 115 -0.18959940 0.75341132 116 1.47178978 -0.18959940 117 2.16231725 1.47178978 118 -0.25867548 2.16231725 119 -0.83643945 -0.25867548 120 -1.18841990 -0.83643945 121 -1.04031708 -1.18841990 122 1.14479639 -1.04031708 123 1.02766775 1.14479639 124 2.40250637 1.02766775 125 -0.23641714 2.40250637 126 0.31736724 -0.23641714 127 0.93330440 0.31736724 128 -2.04077476 0.93330440 129 -0.42052366 -2.04077476 130 0.88226244 -0.42052366 131 0.99096041 0.88226244 132 1.81906626 0.99096041 133 -4.34688528 1.81906626 134 -0.32820991 -4.34688528 135 -1.59943466 -0.32820991 136 -0.20153495 -1.59943466 137 0.31274724 -0.20153495 138 0.70963693 0.31274724 139 0.77890259 0.70963693 140 -4.58380941 0.77890259 141 1.05904035 -4.58380941 142 0.23941515 1.05904035 143 -2.05332460 0.23941515 144 1.40798656 -2.05332460 145 1.11101022 1.40798656 > 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/rcomp/tmp/731vq1292185129.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/rcomp/tmp/831vq1292185129.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/rcomp/tmp/9vsub1292185129.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/rcomp/tmp/10vsub1292185129.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11ztbz1292185129.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/rcomp/tmp/122t9n1292185129.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/rcomp/tmp/139c6g1292185129.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/rcomp/tmp/14k3o11292185129.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/rcomp/tmp/155mmp1292185129.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/rcomp/tmp/161wkg1292185129.tab") + } > > try(system("convert tmp/17ry01292185129.ps tmp/17ry01292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/2z0fk1292185129.ps tmp/2z0fk1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/3z0fk1292185129.ps tmp/3z0fk1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/4z0fk1292185129.ps tmp/4z0fk1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/5sawn1292185129.ps tmp/5sawn1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/6sawn1292185129.ps tmp/6sawn1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/731vq1292185129.ps tmp/731vq1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/831vq1292185129.ps tmp/831vq1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/9vsub1292185129.ps tmp/9vsub1292185129.png",intern=TRUE)) character(0) > try(system("convert tmp/10vsub1292185129.ps tmp/10vsub1292185129.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.320 1.850 6.173