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(2 + ,13 + ,13 + ,14 + ,13 + ,3 + ,1 + ,12 + ,12 + ,8 + ,13 + ,5 + ,0 + ,15 + ,10 + ,12 + ,16 + ,6 + ,3 + ,12 + ,9 + ,7 + ,12 + ,6 + ,3 + ,10 + ,10 + ,10 + ,11 + ,5 + ,1 + ,12 + ,12 + ,7 + ,12 + ,3 + ,3 + ,15 + ,13 + ,16 + ,18 + ,8 + ,1 + ,9 + ,12 + ,11 + ,11 + ,4 + ,4 + ,12 + ,12 + ,14 + ,14 + ,4 + ,0 + ,11 + ,6 + ,6 + ,9 + ,4 + ,3 + ,11 + ,5 + ,16 + ,14 + ,6 + ,2 + ,11 + ,12 + ,11 + ,12 + ,6 + ,4 + ,15 + ,11 + ,16 + ,11 + ,5 + ,3 + ,7 + ,14 + ,12 + ,12 + ,4 + ,1 + ,11 + ,14 + ,7 + ,13 + ,6 + ,1 + ,11 + ,12 + ,13 + ,11 + ,4 + ,2 + ,10 + ,12 + ,11 + ,12 + ,6 + ,3 + ,14 + ,11 + ,15 + ,16 + ,6 + ,1 + ,10 + ,11 + ,7 + ,9 + ,4 + ,1 + ,6 + ,7 + ,9 + ,11 + ,4 + ,2 + ,11 + ,9 + ,7 + ,13 + ,2 + ,3 + ,15 + ,11 + ,14 + ,15 + ,7 + ,4 + ,11 + ,11 + ,15 + ,10 + ,5 + ,2 + ,12 + ,12 + ,7 + ,11 + ,4 + ,1 + ,14 + ,12 + ,15 + ,13 + ,6 + ,2 + ,15 + ,11 + ,17 + ,16 + ,6 + ,2 + ,9 + ,11 + ,15 + ,15 + ,7 + ,4 + ,13 + ,8 + ,14 + ,14 + ,5 + ,2 + ,13 + ,9 + ,14 + ,14 + ,6 + ,3 + ,16 + ,12 + ,8 + ,14 + ,4 + ,3 + ,13 + ,10 + ,8 + ,8 + ,4 + ,3 + ,12 + ,10 + ,14 + ,13 + ,7 + ,4 + ,14 + ,12 + ,14 + ,15 + ,7 + ,2 + ,11 + ,8 + ,8 + ,13 + ,4 + ,2 + ,9 + ,12 + ,11 + ,11 + ,4 + ,4 + ,16 + ,11 + ,16 + ,15 + ,6 + ,3 + ,12 + ,12 + ,10 + ,15 + ,6 + ,4 + ,10 + ,7 + ,8 + ,9 + ,5 + ,2 + ,13 + ,11 + ,14 + ,13 + ,6 + ,5 + ,16 + ,11 + ,16 + ,16 + ,7 + ,3 + ,14 + ,12 + ,13 + ,13 + ,6 + ,1 + ,15 + ,9 + ,5 + ,11 + ,3 + ,1 + ,5 + ,15 + ,8 + ,12 + ,3 + ,1 + ,8 + ,11 + ,10 + ,12 + ,4 + ,2 + ,11 + ,11 + ,8 + ,12 + ,6 + ,3 + ,16 + ,11 + ,13 + ,14 + ,7 + ,9 + ,17 + ,11 + ,15 + ,14 + ,5 + ,0 + ,9 + ,15 + ,6 + ,8 + ,4 + ,0 + ,9 + ,11 + ,12 + ,13 + ,5 + ,2 + ,13 + ,12 + ,16 + ,16 + ,6 + ,2 + ,10 + ,12 + ,5 + ,13 + ,6 + ,3 + ,6 + ,9 + ,15 + ,11 + ,6 + ,1 + ,12 + ,12 + ,12 + ,14 + ,5 + ,2 + ,8 + ,12 + ,8 + ,13 + ,4 + ,0 + ,14 + ,13 + ,13 + ,13 + ,5 + ,5 + ,12 + ,11 + ,14 + ,13 + ,5 + ,2 + ,11 + ,9 + ,12 + ,12 + ,4 + ,4 + ,16 + ,9 + ,16 + ,16 + ,6 + ,3 + ,8 + ,11 + ,10 + ,15 + ,2 + ,0 + ,15 + ,11 + ,15 + ,15 + ,8 + ,0 + ,7 + ,12 + ,8 + ,12 + ,3 + ,4 + ,16 + ,12 + ,16 + ,14 + ,6 + ,1 + ,14 + ,9 + ,19 + ,12 + ,6 + ,1 + ,16 + ,11 + ,14 + ,15 + ,6 + ,4 + ,9 + ,9 + ,6 + ,12 + ,5 + ,2 + ,14 + ,12 + ,13 + ,13 + ,5 + ,4 + ,11 + ,12 + ,15 + ,12 + ,6 + ,1 + ,13 + ,12 + ,7 + ,12 + ,5 + ,4 + ,15 + ,12 + ,13 + ,13 + ,6 + ,2 + ,5 + ,14 + ,4 + ,5 + ,2 + ,5 + ,15 + ,11 + ,14 + ,13 + ,5 + ,4 + ,13 + ,12 + ,13 + ,13 + ,5 + ,4 + ,11 + ,11 + ,11 + ,14 + ,5 + ,4 + ,11 + ,6 + ,14 + ,17 + ,6 + ,4 + ,12 + ,10 + ,12 + ,13 + ,6 + ,3 + ,12 + ,12 + ,15 + ,13 + ,6 + ,3 + ,12 + ,13 + ,14 + ,12 + ,5 + ,3 + ,12 + ,8 + ,13 + ,13 + ,5 + ,2 + ,14 + ,12 + ,8 + ,14 + ,4 + ,1 + ,6 + ,12 + ,6 + ,11 + ,2 + ,1 + ,7 + ,12 + ,7 + ,12 + ,4 + ,5 + ,14 + ,6 + ,13 + ,12 + ,6 + ,4 + ,14 + ,11 + ,13 + ,16 + ,6 + ,2 + ,10 + ,10 + ,11 + ,12 + ,5 + ,3 + ,13 + ,12 + ,5 + ,12 + ,3 + ,2 + ,12 + ,13 + ,12 + ,12 + ,6 + ,2 + ,9 + ,11 + ,8 + ,10 + ,4 + ,2 + ,12 + ,7 + ,11 + ,15 + ,5 + ,2 + ,16 + ,11 + ,14 + ,15 + ,8 + ,3 + ,10 + ,11 + ,9 + ,12 + ,4 + ,2 + ,14 + ,11 + ,10 + ,16 + ,6 + ,3 + ,10 + ,11 + ,13 + ,15 + ,6 + ,4 + ,16 + ,12 + ,16 + ,16 + ,7 + ,3 + ,15 + ,10 + ,16 + ,13 + ,6 + ,3 + ,12 + ,11 + ,11 + ,12 + ,5 + ,0 + ,10 + ,12 + ,8 + ,11 + ,4 + ,1 + ,8 + ,7 + ,4 + ,13 + ,6 + ,2 + ,8 + ,13 + ,7 + ,10 + ,3 + ,2 + ,11 + ,8 + ,14 + ,15 + ,5 + ,3 + ,13 + ,12 + ,11 + ,13 + ,6 + ,4 + ,16 + ,11 + ,17 + ,16 + ,7 + ,4 + ,16 + ,12 + ,15 + ,15 + ,7 + ,1 + ,14 + ,14 + ,17 + ,18 + ,6 + ,2 + ,11 + ,10 + ,5 + ,13 + ,3 + ,2 + ,4 + ,10 + ,4 + ,10 + ,2 + ,3 + ,14 + ,13 + ,10 + ,16 + ,8 + ,3 + ,9 + ,10 + ,11 + ,13 + ,3 + ,3 + ,14 + ,11 + ,15 + ,15 + ,8 + ,1 + ,8 + ,10 + ,10 + ,14 + ,3 + ,1 + ,8 + ,7 + ,9 + ,15 + ,4 + ,1 + ,11 + ,10 + ,12 + ,14 + ,5 + ,1 + ,12 + ,8 + ,15 + ,13 + ,7 + ,0 + ,11 + ,12 + ,7 + ,13 + ,6 + ,1 + ,14 + ,12 + ,13 + ,15 + ,6 + ,3 + ,15 + ,12 + ,12 + ,16 + ,7 + ,3 + ,16 + ,11 + ,14 + ,14 + ,6 + ,0 + ,16 + ,12 + ,14 + ,14 + ,6 + ,2 + ,11 + ,12 + ,8 + ,16 + ,6 + ,5 + ,14 + ,12 + ,15 + ,14 + ,6 + ,2 + ,14 + ,11 + ,12 + ,12 + ,4 + ,3 + ,12 + ,12 + ,12 + ,13 + ,4 + ,3 + ,14 + ,11 + ,16 + ,12 + ,5 + ,5 + ,8 + ,11 + ,9 + ,12 + ,4 + ,4 + ,13 + ,13 + ,15 + ,14 + ,6 + ,4 + ,16 + ,12 + ,15 + ,14 + ,6 + ,0 + ,12 + ,12 + ,6 + ,14 + ,5 + ,3 + ,16 + ,12 + ,14 + ,16 + ,8 + ,0 + ,12 + ,12 + ,15 + ,13 + ,6 + ,2 + ,11 + ,8 + ,10 + ,14 + ,5 + ,0 + ,4 + ,8 + ,6 + ,4 + ,4 + ,6 + ,16 + ,12 + ,14 + ,16 + ,8 + ,3 + ,15 + ,11 + ,12 + ,13 + ,6 + ,1 + ,10 + ,12 + ,8 + ,16 + ,4 + ,6 + ,13 + ,13 + ,11 + ,15 + ,6 + ,2 + ,15 + ,12 + ,13 + ,14 + ,6 + ,1 + ,12 + ,12 + ,9 + ,13 + ,4 + ,3 + ,14 + ,11 + ,15 + ,14 + ,6 + ,1 + ,7 + ,12 + ,13 + ,12 + ,3 + ,2 + ,19 + ,12 + ,15 + ,15 + ,6 + ,4 + ,12 + ,10 + ,14 + ,14 + ,5 + ,1 + ,12 + ,11 + ,16 + ,13 + ,4 + ,2 + ,13 + ,12 + ,14 + ,14 + ,6 + ,0 + ,15 + ,12 + ,14 + ,16 + ,4 + ,5 + ,8 + ,10 + ,10 + ,6 + ,4 + ,2 + ,12 + ,12 + ,10 + ,13 + ,4 + ,1 + ,10 + ,13 + ,4 + ,13 + ,6 + ,1 + ,8 + ,12 + ,8 + ,14 + ,5 + ,4 + ,10 + ,15 + ,15 + ,15 + ,6 + ,3 + ,15 + ,11 + ,16 + ,14 + ,6 + ,0 + ,16 + ,12 + ,12 + ,15 + ,8 + ,3 + ,13 + ,11 + ,12 + ,13 + ,7 + ,3 + ,16 + ,12 + ,15 + ,16 + ,7 + ,0 + ,9 + ,11 + ,9 + ,12 + ,4 + ,2 + ,14 + ,10 + ,12 + ,15 + ,6 + ,5 + ,14 + ,11 + ,14 + ,12 + ,6 + ,2 + ,12 + ,11 + ,11 + ,14 + ,2) + ,dim=c(6 + ,156) + ,dimnames=list(c('aantalVrienden' + ,'Popularity' + ,'FindingFriends' + ,'KnowingPeople' + ,'Liked' + ,'Celebrity ') + ,1:156)) > y <- array(NA,dim=c(6,156),dimnames=list(c('aantalVrienden','Popularity','FindingFriends','KnowingPeople','Liked','Celebrity '),1:156)) > 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 aantalVrienden Popularity FindingFriends KnowingPeople Liked Celebrity\r 1 2 13 13 14 13 3 2 1 12 12 8 13 5 3 0 15 10 12 16 6 4 3 12 9 7 12 6 5 3 10 10 10 11 5 6 1 12 12 7 12 3 7 3 15 13 16 18 8 8 1 9 12 11 11 4 9 4 12 12 14 14 4 10 0 11 6 6 9 4 11 3 11 5 16 14 6 12 2 11 12 11 12 6 13 4 15 11 16 11 5 14 3 7 14 12 12 4 15 1 11 14 7 13 6 16 1 11 12 13 11 4 17 2 10 12 11 12 6 18 3 14 11 15 16 6 19 1 10 11 7 9 4 20 1 6 7 9 11 4 21 2 11 9 7 13 2 22 3 15 11 14 15 7 23 4 11 11 15 10 5 24 2 12 12 7 11 4 25 1 14 12 15 13 6 26 2 15 11 17 16 6 27 2 9 11 15 15 7 28 4 13 8 14 14 5 29 2 13 9 14 14 6 30 3 16 12 8 14 4 31 3 13 10 8 8 4 32 3 12 10 14 13 7 33 4 14 12 14 15 7 34 2 11 8 8 13 4 35 2 9 12 11 11 4 36 4 16 11 16 15 6 37 3 12 12 10 15 6 38 4 10 7 8 9 5 39 2 13 11 14 13 6 40 5 16 11 16 16 7 41 3 14 12 13 13 6 42 1 15 9 5 11 3 43 1 5 15 8 12 3 44 1 8 11 10 12 4 45 2 11 11 8 12 6 46 3 16 11 13 14 7 47 9 17 11 15 14 5 48 0 9 15 6 8 4 49 0 9 11 12 13 5 50 2 13 12 16 16 6 51 2 10 12 5 13 6 52 3 6 9 15 11 6 53 1 12 12 12 14 5 54 2 8 12 8 13 4 55 0 14 13 13 13 5 56 5 12 11 14 13 5 57 2 11 9 12 12 4 58 4 16 9 16 16 6 59 3 8 11 10 15 2 60 0 15 11 15 15 8 61 0 7 12 8 12 3 62 4 16 12 16 14 6 63 1 14 9 19 12 6 64 1 16 11 14 15 6 65 4 9 9 6 12 5 66 2 14 12 13 13 5 67 4 11 12 15 12 6 68 1 13 12 7 12 5 69 4 15 12 13 13 6 70 2 5 14 4 5 2 71 5 15 11 14 13 5 72 4 13 12 13 13 5 73 4 11 11 11 14 5 74 4 11 6 14 17 6 75 4 12 10 12 13 6 76 3 12 12 15 13 6 77 3 12 13 14 12 5 78 3 12 8 13 13 5 79 2 14 12 8 14 4 80 1 6 12 6 11 2 81 1 7 12 7 12 4 82 5 14 6 13 12 6 83 4 14 11 13 16 6 84 2 10 10 11 12 5 85 3 13 12 5 12 3 86 2 12 13 12 12 6 87 2 9 11 8 10 4 88 2 12 7 11 15 5 89 2 16 11 14 15 8 90 3 10 11 9 12 4 91 2 14 11 10 16 6 92 3 10 11 13 15 6 93 4 16 12 16 16 7 94 3 15 10 16 13 6 95 3 12 11 11 12 5 96 0 10 12 8 11 4 97 1 8 7 4 13 6 98 2 8 13 7 10 3 99 2 11 8 14 15 5 100 3 13 12 11 13 6 101 4 16 11 17 16 7 102 4 16 12 15 15 7 103 1 14 14 17 18 6 104 2 11 10 5 13 3 105 2 4 10 4 10 2 106 3 14 13 10 16 8 107 3 9 10 11 13 3 108 3 14 11 15 15 8 109 1 8 10 10 14 3 110 1 8 7 9 15 4 111 1 11 10 12 14 5 112 1 12 8 15 13 7 113 0 11 12 7 13 6 114 1 14 12 13 15 6 115 3 15 12 12 16 7 116 3 16 11 14 14 6 117 0 16 12 14 14 6 118 2 11 12 8 16 6 119 5 14 12 15 14 6 120 2 14 11 12 12 4 121 3 12 12 12 13 4 122 3 14 11 16 12 5 123 5 8 11 9 12 4 124 4 13 13 15 14 6 125 4 16 12 15 14 6 126 0 12 12 6 14 5 127 3 16 12 14 16 8 128 0 12 12 15 13 6 129 2 11 8 10 14 5 130 0 4 8 6 4 4 131 6 16 12 14 16 8 132 3 15 11 12 13 6 133 1 10 12 8 16 4 134 6 13 13 11 15 6 135 2 15 12 13 14 6 136 1 12 12 9 13 4 137 3 14 11 15 14 6 138 1 7 12 13 12 3 139 2 19 12 15 15 6 140 4 12 10 14 14 5 141 1 12 11 16 13 4 142 2 13 12 14 14 6 143 0 15 12 14 16 4 144 5 8 10 10 6 4 145 2 12 12 10 13 4 146 1 10 13 4 13 6 147 1 8 12 8 14 5 148 4 10 15 15 15 6 149 3 15 11 16 14 6 150 0 16 12 12 15 8 151 3 13 11 12 13 7 152 3 16 12 15 16 7 153 0 9 11 9 12 4 154 2 14 10 12 15 6 155 5 14 11 14 12 6 156 2 12 11 11 14 2 t 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 84 84 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 100 100 101 101 102 102 103 103 104 104 105 105 106 106 107 107 108 108 109 109 110 110 111 111 112 112 113 113 114 114 115 115 116 116 117 117 118 118 119 119 120 120 121 121 122 122 123 123 124 124 125 125 126 126 127 127 128 128 129 129 130 130 131 131 132 132 133 133 134 134 135 135 136 136 137 137 138 138 139 139 140 140 141 141 142 142 143 143 144 144 145 145 146 146 147 147 148 148 149 149 150 150 151 151 152 152 153 153 154 154 155 155 156 156 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Popularity FindingFriends KnowingPeople Liked 1.2390168 0.0963161 -0.0640953 0.1287303 -0.0742946 `Celebrity\r` t 0.0388674 -0.0001363 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -3.098005 -0.849892 0.002138 0.852716 5.749898 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.2390168 0.9565071 1.295 0.19720 Popularity 0.0963161 0.0545922 1.764 0.07973 . FindingFriends -0.0640953 0.0648554 -0.988 0.32462 KnowingPeople 0.1287303 0.0432867 2.974 0.00343 ** Liked -0.0742946 0.0680544 -1.092 0.27673 `Celebrity\r` 0.0388674 0.1101396 0.353 0.72467 t -0.0001363 0.0025570 -0.053 0.95755 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.412 on 149 degrees of freedom Multiple R-squared: 0.1637, Adjusted R-squared: 0.13 F-statistic: 4.861 on 6 and 149 DF, p-value: 0.0001457 > 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.868498362 0.263003277 0.1315016 [2,] 0.776573187 0.446853626 0.2234268 [3,] 0.678445881 0.643108239 0.3215541 [4,] 0.588960543 0.822078914 0.4110395 [5,] 0.476213813 0.952427627 0.5237862 [6,] 0.374375535 0.748751070 0.6256245 [7,] 0.398478608 0.796957216 0.6015214 [8,] 0.307286126 0.614572252 0.6927139 [9,] 0.261794712 0.523589425 0.7382053 [10,] 0.193974424 0.387948849 0.8060256 [11,] 0.141129740 0.282259480 0.8588703 [12,] 0.161440119 0.322880238 0.8385599 [13,] 0.115930720 0.231861440 0.8840693 [14,] 0.091578210 0.183156419 0.9084218 [15,] 0.065648982 0.131297963 0.9343510 [16,] 0.122892556 0.245785112 0.8771074 [17,] 0.107360482 0.214720963 0.8926395 [18,] 0.082983833 0.165967667 0.9170162 [19,] 0.094131467 0.188262933 0.9058685 [20,] 0.073485939 0.146971878 0.9265141 [21,] 0.071672263 0.143344527 0.9283277 [22,] 0.056860667 0.113721333 0.9431393 [23,] 0.040464139 0.080928279 0.9595359 [24,] 0.036568295 0.073136591 0.9634317 [25,] 0.025289173 0.050578346 0.9747108 [26,] 0.018158142 0.036316284 0.9818419 [27,] 0.012737463 0.025474925 0.9872625 [28,] 0.009289592 0.018579184 0.9907104 [29,] 0.010933335 0.021866670 0.9890667 [30,] 0.011397856 0.022795712 0.9886021 [31,] 0.011853577 0.023707155 0.9881464 [32,] 0.008209906 0.016419813 0.9917901 [33,] 0.008558360 0.017116721 0.9914416 [34,] 0.006197255 0.012394509 0.9938027 [35,] 0.005759318 0.011518637 0.9942407 [36,] 0.003846400 0.007692801 0.9961536 [37,] 0.002609292 0.005218584 0.9973907 [38,] 0.172199165 0.344398331 0.8278008 [39,] 0.193277424 0.386554848 0.8067226 [40,] 0.281974697 0.563949394 0.7180253 [41,] 0.279931829 0.559863658 0.7200682 [42,] 0.251701882 0.503403765 0.7482981 [43,] 0.215085357 0.430170713 0.7849146 [44,] 0.232541746 0.465083491 0.7674583 [45,] 0.202055250 0.404110499 0.7979448 [46,] 0.364956260 0.729912519 0.6350437 [47,] 0.407188018 0.814376037 0.5928120 [48,] 0.375802032 0.751604065 0.6241980 [49,] 0.333321091 0.666642182 0.6666789 [50,] 0.324924870 0.649849741 0.6750751 [51,] 0.554528814 0.890942371 0.4454712 [52,] 0.566555645 0.866888709 0.4334444 [53,] 0.521553002 0.956893996 0.4784470 [54,] 0.691526613 0.616946775 0.3084734 [55,] 0.750998150 0.498003699 0.2490018 [56,] 0.806633905 0.386732189 0.1933661 [57,] 0.789440130 0.421119740 0.2105599 [58,] 0.775148510 0.449702979 0.2248515 [59,] 0.764579877 0.470840246 0.2354201 [60,] 0.742889678 0.514220644 0.2571103 [61,] 0.717476187 0.565047625 0.2825238 [62,] 0.730443093 0.539113814 0.2695569 [63,] 0.710231386 0.579537228 0.2897686 [64,] 0.712707275 0.574585450 0.2872927 [65,] 0.694348207 0.611303587 0.3056518 [66,] 0.677149661 0.645700678 0.3228503 [67,] 0.634066902 0.731866197 0.3659331 [68,] 0.588478305 0.823043390 0.4115217 [69,] 0.544334705 0.911330590 0.4556653 [70,] 0.501190248 0.997619504 0.4988098 [71,] 0.459296723 0.918593447 0.5407033 [72,] 0.423641576 0.847283152 0.5763584 [73,] 0.447860417 0.895720835 0.5521396 [74,] 0.433142927 0.866285854 0.5668571 [75,] 0.394879640 0.789759281 0.6051204 [76,] 0.383092454 0.766184909 0.6169075 [77,] 0.355137230 0.710274459 0.6448628 [78,] 0.312276130 0.624552261 0.6877239 [79,] 0.287651665 0.575303330 0.7123483 [80,] 0.280387457 0.560774915 0.7196125 [81,] 0.255124939 0.510249878 0.7448751 [82,] 0.222080043 0.444160087 0.7779200 [83,] 0.190465882 0.380931763 0.8095341 [84,] 0.166269589 0.332539178 0.8337304 [85,] 0.142898047 0.285796095 0.8571020 [86,] 0.120223729 0.240447458 0.8797763 [87,] 0.149807032 0.299614063 0.8501930 [88,] 0.124723747 0.249447495 0.8752763 [89,] 0.101619799 0.203239598 0.8983802 [90,] 0.087842785 0.175685571 0.9121572 [91,] 0.070665881 0.141331762 0.9293341 [92,] 0.059061235 0.118122470 0.9409388 [93,] 0.050188122 0.100376245 0.9498119 [94,] 0.065980907 0.131961815 0.9340191 [95,] 0.058102926 0.116205853 0.9418971 [96,] 0.052736312 0.105472624 0.9472637 [97,] 0.042675744 0.085351488 0.9573243 [98,] 0.039904646 0.079809291 0.9600954 [99,] 0.030206545 0.060413090 0.9697935 [100,] 0.024495051 0.048990102 0.9755049 [101,] 0.020460137 0.040920274 0.9795399 [102,] 0.018318083 0.036636165 0.9816819 [103,] 0.025054377 0.050108753 0.9749456 [104,] 0.028572655 0.057145310 0.9714273 [105,] 0.032774552 0.065549104 0.9672254 [106,] 0.024332520 0.048665041 0.9756675 [107,] 0.017697606 0.035395211 0.9823024 [108,] 0.051026686 0.102053372 0.9489733 [109,] 0.038542751 0.077085502 0.9614572 [110,] 0.040736959 0.081473918 0.9592630 [111,] 0.031342277 0.062684553 0.9686577 [112,] 0.023620307 0.047240615 0.9763797 [113,] 0.017060030 0.034120061 0.9829400 [114,] 0.056976874 0.113953748 0.9430231 [115,] 0.047122943 0.094245886 0.9528771 [116,] 0.039230375 0.078460749 0.9607696 [117,] 0.034580026 0.069160053 0.9654200 [118,] 0.024493524 0.048987048 0.9755065 [119,] 0.078865988 0.157731975 0.9211340 [120,] 0.061485217 0.122970434 0.9385148 [121,] 0.111022944 0.222045889 0.8889771 [122,] 0.192886885 0.385773770 0.8071131 [123,] 0.148764351 0.297528702 0.8512356 [124,] 0.117043611 0.234087223 0.8829564 [125,] 0.651476310 0.697047380 0.3485237 [126,] 0.579635399 0.840729202 0.4203646 [127,] 0.509405025 0.981189951 0.4905950 [128,] 0.451558529 0.903117057 0.5484415 [129,] 0.434080707 0.868161414 0.5659193 [130,] 0.370926924 0.741853849 0.6290731 [131,] 0.669150610 0.661698781 0.3308494 [132,] 0.650156312 0.699687375 0.3498437 [133,] 0.541638265 0.916723470 0.4583617 [134,] 0.502817887 0.994364226 0.4971821 [135,] 0.396545904 0.793091808 0.6034541 [136,] 0.271590294 0.543180587 0.7284097 [137,] 0.394832238 0.789664477 0.6051678 > postscript(file="/var/www/html/rcomp/tmp/1qxg91291222065.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/2jofu1291222065.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/3jofu1291222065.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/4jofu1291222065.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/5jofu1291222065.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 = 156 Frequency = 1 1 2 3 4 5 -0.6107472528 -0.8837428724 -2.6316503332 0.9398121522 0.7750576982 6 7 8 9 10 -0.7510270640 0.1171140308 -1.0898895502 1.4579913642 -2.1717585112 11 12 13 14 15 -0.2292826110 -0.2854165604 0.5862811552 1.1773155019 -0.5676009338 16 17 18 19 20 -1.5388917860 -0.1884188397 0.1446149494 -0.8824692203 -0.8623212863 21 22 23 24 25 0.2682099807 0.0644125087 1.0273444841 0.1382648187 -2.0132193077 26 27 28 29 30 -1.2080712032 -0.4857396994 1.0690168308 -0.9056189094 0.8479719767 31 32 33 34 35 0.5630981708 0.1420394652 1.2263235152 -0.0005782048 -0.0862087080 36 37 38 39 40 0.7514117096 0.9732897588 1.6961419848 -0.8503596160 1.7873842545 41 42 43 44 45 0.2464226214 -1.0441874211 -0.0082147463 -0.8497360302 0.0411779598 46 47 48 49 50 0.0258040064 5.7498983386 -1.4713826349 -2.1674039304 -0.8193415115 51 52 53 54 55 0.6628929864 0.4201149901 -1.3174169255 0.5474778785 -2.6487060841 56 57 58 59 60 2.2871414231 -0.5225633537 0.7005148959 1.4529275298 -3.0980047800 61 62 63 64 65 -1.3906789808 0.7447569218 -2.7895408282 -1.9873104313 2.4046741119 66 67 68 69 70 -0.7113018027 1.2071600729 -0.9166256201 1.1539237079 0.9650971778 71 72 73 74 75 2.0002380859 1.3858322454 1.8462607311 1.3237459016 1.4442296252 76 77 78 79 80 0.1863655606 0.3439003189 0.2265850096 0.0472841900 -0.0697392209 81 82 83 84 85 -0.2980894750 1.7931454991 1.4109369255 -0.2686081513 1.4208874138 86 87 88 89 90 -0.4362794330 0.1686814110 -0.4300971002 -1.0616370213 1.0926332126 91 92 93 94 95 -0.2017814206 0.7231335822 0.8587049324 -0.3570497807 0.6043546057 96 97 98 99 100 -1.7880177803 -0.3299500430 0.5622854718 -0.6543771276 0.6082427158 101 102 103 104 105 0.6669698867 0.9143676010 -1.7603826934 0.5622137840 1.1812765566 106 107 108 109 110 0.8507193565 0.9828728649 0.0048550227 -0.7175134288 -0.7455054847 111 112 113 114 115 -1.3413844899 -2.1039753223 -1.6824314818 -1.5950362248 0.4729415990 116 117 118 119 120 -0.0545160254 -2.9902843769 0.4124036815 2.0738900998 -0.6747323295 121 122 123 124 125 0.6564261089 -0.2282484417 3.2897641861 1.2349831414 0.8820758983 126 127 128 129 130 -1.5350829509 0.0819333677 -2.8065454099 -0.2096605478 -1.7244691056 131 132 133 134 135 3.0824786777 0.2271473635 -0.4115005458 3.8255624184 -0.7627840543 136 137 138 139 140 -0.9553379448 0.0122486736 -1.0238334874 -1.3306691429 1.3087922348 141 142 143 144 145 -1.9198640410 -0.6979279401 -2.6640997548 2.6540336568 -0.0828413421 146 147 148 149 150 -0.1313302365 -0.4044164301 1.7296885162 -0.2111618244 -2.7317650342 151 152 153 154 155 0.3835023635 -0.0045214011 -1.8024620724 -0.5890434226 1.9948436661 156 -0.1221380046 > postscript(file="/var/www/html/rcomp/tmp/6cfff1291222065.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.6107472528 NA 1 -0.8837428724 -0.6107472528 2 -2.6316503332 -0.8837428724 3 0.9398121522 -2.6316503332 4 0.7750576982 0.9398121522 5 -0.7510270640 0.7750576982 6 0.1171140308 -0.7510270640 7 -1.0898895502 0.1171140308 8 1.4579913642 -1.0898895502 9 -2.1717585112 1.4579913642 10 -0.2292826110 -2.1717585112 11 -0.2854165604 -0.2292826110 12 0.5862811552 -0.2854165604 13 1.1773155019 0.5862811552 14 -0.5676009338 1.1773155019 15 -1.5388917860 -0.5676009338 16 -0.1884188397 -1.5388917860 17 0.1446149494 -0.1884188397 18 -0.8824692203 0.1446149494 19 -0.8623212863 -0.8824692203 20 0.2682099807 -0.8623212863 21 0.0644125087 0.2682099807 22 1.0273444841 0.0644125087 23 0.1382648187 1.0273444841 24 -2.0132193077 0.1382648187 25 -1.2080712032 -2.0132193077 26 -0.4857396994 -1.2080712032 27 1.0690168308 -0.4857396994 28 -0.9056189094 1.0690168308 29 0.8479719767 -0.9056189094 30 0.5630981708 0.8479719767 31 0.1420394652 0.5630981708 32 1.2263235152 0.1420394652 33 -0.0005782048 1.2263235152 34 -0.0862087080 -0.0005782048 35 0.7514117096 -0.0862087080 36 0.9732897588 0.7514117096 37 1.6961419848 0.9732897588 38 -0.8503596160 1.6961419848 39 1.7873842545 -0.8503596160 40 0.2464226214 1.7873842545 41 -1.0441874211 0.2464226214 42 -0.0082147463 -1.0441874211 43 -0.8497360302 -0.0082147463 44 0.0411779598 -0.8497360302 45 0.0258040064 0.0411779598 46 5.7498983386 0.0258040064 47 -1.4713826349 5.7498983386 48 -2.1674039304 -1.4713826349 49 -0.8193415115 -2.1674039304 50 0.6628929864 -0.8193415115 51 0.4201149901 0.6628929864 52 -1.3174169255 0.4201149901 53 0.5474778785 -1.3174169255 54 -2.6487060841 0.5474778785 55 2.2871414231 -2.6487060841 56 -0.5225633537 2.2871414231 57 0.7005148959 -0.5225633537 58 1.4529275298 0.7005148959 59 -3.0980047800 1.4529275298 60 -1.3906789808 -3.0980047800 61 0.7447569218 -1.3906789808 62 -2.7895408282 0.7447569218 63 -1.9873104313 -2.7895408282 64 2.4046741119 -1.9873104313 65 -0.7113018027 2.4046741119 66 1.2071600729 -0.7113018027 67 -0.9166256201 1.2071600729 68 1.1539237079 -0.9166256201 69 0.9650971778 1.1539237079 70 2.0002380859 0.9650971778 71 1.3858322454 2.0002380859 72 1.8462607311 1.3858322454 73 1.3237459016 1.8462607311 74 1.4442296252 1.3237459016 75 0.1863655606 1.4442296252 76 0.3439003189 0.1863655606 77 0.2265850096 0.3439003189 78 0.0472841900 0.2265850096 79 -0.0697392209 0.0472841900 80 -0.2980894750 -0.0697392209 81 1.7931454991 -0.2980894750 82 1.4109369255 1.7931454991 83 -0.2686081513 1.4109369255 84 1.4208874138 -0.2686081513 85 -0.4362794330 1.4208874138 86 0.1686814110 -0.4362794330 87 -0.4300971002 0.1686814110 88 -1.0616370213 -0.4300971002 89 1.0926332126 -1.0616370213 90 -0.2017814206 1.0926332126 91 0.7231335822 -0.2017814206 92 0.8587049324 0.7231335822 93 -0.3570497807 0.8587049324 94 0.6043546057 -0.3570497807 95 -1.7880177803 0.6043546057 96 -0.3299500430 -1.7880177803 97 0.5622854718 -0.3299500430 98 -0.6543771276 0.5622854718 99 0.6082427158 -0.6543771276 100 0.6669698867 0.6082427158 101 0.9143676010 0.6669698867 102 -1.7603826934 0.9143676010 103 0.5622137840 -1.7603826934 104 1.1812765566 0.5622137840 105 0.8507193565 1.1812765566 106 0.9828728649 0.8507193565 107 0.0048550227 0.9828728649 108 -0.7175134288 0.0048550227 109 -0.7455054847 -0.7175134288 110 -1.3413844899 -0.7455054847 111 -2.1039753223 -1.3413844899 112 -1.6824314818 -2.1039753223 113 -1.5950362248 -1.6824314818 114 0.4729415990 -1.5950362248 115 -0.0545160254 0.4729415990 116 -2.9902843769 -0.0545160254 117 0.4124036815 -2.9902843769 118 2.0738900998 0.4124036815 119 -0.6747323295 2.0738900998 120 0.6564261089 -0.6747323295 121 -0.2282484417 0.6564261089 122 3.2897641861 -0.2282484417 123 1.2349831414 3.2897641861 124 0.8820758983 1.2349831414 125 -1.5350829509 0.8820758983 126 0.0819333677 -1.5350829509 127 -2.8065454099 0.0819333677 128 -0.2096605478 -2.8065454099 129 -1.7244691056 -0.2096605478 130 3.0824786777 -1.7244691056 131 0.2271473635 3.0824786777 132 -0.4115005458 0.2271473635 133 3.8255624184 -0.4115005458 134 -0.7627840543 3.8255624184 135 -0.9553379448 -0.7627840543 136 0.0122486736 -0.9553379448 137 -1.0238334874 0.0122486736 138 -1.3306691429 -1.0238334874 139 1.3087922348 -1.3306691429 140 -1.9198640410 1.3087922348 141 -0.6979279401 -1.9198640410 142 -2.6640997548 -0.6979279401 143 2.6540336568 -2.6640997548 144 -0.0828413421 2.6540336568 145 -0.1313302365 -0.0828413421 146 -0.4044164301 -0.1313302365 147 1.7296885162 -0.4044164301 148 -0.2111618244 1.7296885162 149 -2.7317650342 -0.2111618244 150 0.3835023635 -2.7317650342 151 -0.0045214011 0.3835023635 152 -1.8024620724 -0.0045214011 153 -0.5890434226 -1.8024620724 154 1.9948436661 -0.5890434226 155 -0.1221380046 1.9948436661 156 NA -0.1221380046 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.8837428724 -0.6107472528 [2,] -2.6316503332 -0.8837428724 [3,] 0.9398121522 -2.6316503332 [4,] 0.7750576982 0.9398121522 [5,] -0.7510270640 0.7750576982 [6,] 0.1171140308 -0.7510270640 [7,] -1.0898895502 0.1171140308 [8,] 1.4579913642 -1.0898895502 [9,] -2.1717585112 1.4579913642 [10,] -0.2292826110 -2.1717585112 [11,] -0.2854165604 -0.2292826110 [12,] 0.5862811552 -0.2854165604 [13,] 1.1773155019 0.5862811552 [14,] -0.5676009338 1.1773155019 [15,] -1.5388917860 -0.5676009338 [16,] -0.1884188397 -1.5388917860 [17,] 0.1446149494 -0.1884188397 [18,] -0.8824692203 0.1446149494 [19,] -0.8623212863 -0.8824692203 [20,] 0.2682099807 -0.8623212863 [21,] 0.0644125087 0.2682099807 [22,] 1.0273444841 0.0644125087 [23,] 0.1382648187 1.0273444841 [24,] -2.0132193077 0.1382648187 [25,] -1.2080712032 -2.0132193077 [26,] -0.4857396994 -1.2080712032 [27,] 1.0690168308 -0.4857396994 [28,] -0.9056189094 1.0690168308 [29,] 0.8479719767 -0.9056189094 [30,] 0.5630981708 0.8479719767 [31,] 0.1420394652 0.5630981708 [32,] 1.2263235152 0.1420394652 [33,] -0.0005782048 1.2263235152 [34,] -0.0862087080 -0.0005782048 [35,] 0.7514117096 -0.0862087080 [36,] 0.9732897588 0.7514117096 [37,] 1.6961419848 0.9732897588 [38,] -0.8503596160 1.6961419848 [39,] 1.7873842545 -0.8503596160 [40,] 0.2464226214 1.7873842545 [41,] -1.0441874211 0.2464226214 [42,] -0.0082147463 -1.0441874211 [43,] -0.8497360302 -0.0082147463 [44,] 0.0411779598 -0.8497360302 [45,] 0.0258040064 0.0411779598 [46,] 5.7498983386 0.0258040064 [47,] -1.4713826349 5.7498983386 [48,] -2.1674039304 -1.4713826349 [49,] -0.8193415115 -2.1674039304 [50,] 0.6628929864 -0.8193415115 [51,] 0.4201149901 0.6628929864 [52,] -1.3174169255 0.4201149901 [53,] 0.5474778785 -1.3174169255 [54,] -2.6487060841 0.5474778785 [55,] 2.2871414231 -2.6487060841 [56,] -0.5225633537 2.2871414231 [57,] 0.7005148959 -0.5225633537 [58,] 1.4529275298 0.7005148959 [59,] -3.0980047800 1.4529275298 [60,] -1.3906789808 -3.0980047800 [61,] 0.7447569218 -1.3906789808 [62,] -2.7895408282 0.7447569218 [63,] -1.9873104313 -2.7895408282 [64,] 2.4046741119 -1.9873104313 [65,] -0.7113018027 2.4046741119 [66,] 1.2071600729 -0.7113018027 [67,] -0.9166256201 1.2071600729 [68,] 1.1539237079 -0.9166256201 [69,] 0.9650971778 1.1539237079 [70,] 2.0002380859 0.9650971778 [71,] 1.3858322454 2.0002380859 [72,] 1.8462607311 1.3858322454 [73,] 1.3237459016 1.8462607311 [74,] 1.4442296252 1.3237459016 [75,] 0.1863655606 1.4442296252 [76,] 0.3439003189 0.1863655606 [77,] 0.2265850096 0.3439003189 [78,] 0.0472841900 0.2265850096 [79,] -0.0697392209 0.0472841900 [80,] -0.2980894750 -0.0697392209 [81,] 1.7931454991 -0.2980894750 [82,] 1.4109369255 1.7931454991 [83,] -0.2686081513 1.4109369255 [84,] 1.4208874138 -0.2686081513 [85,] -0.4362794330 1.4208874138 [86,] 0.1686814110 -0.4362794330 [87,] -0.4300971002 0.1686814110 [88,] -1.0616370213 -0.4300971002 [89,] 1.0926332126 -1.0616370213 [90,] -0.2017814206 1.0926332126 [91,] 0.7231335822 -0.2017814206 [92,] 0.8587049324 0.7231335822 [93,] -0.3570497807 0.8587049324 [94,] 0.6043546057 -0.3570497807 [95,] -1.7880177803 0.6043546057 [96,] -0.3299500430 -1.7880177803 [97,] 0.5622854718 -0.3299500430 [98,] -0.6543771276 0.5622854718 [99,] 0.6082427158 -0.6543771276 [100,] 0.6669698867 0.6082427158 [101,] 0.9143676010 0.6669698867 [102,] -1.7603826934 0.9143676010 [103,] 0.5622137840 -1.7603826934 [104,] 1.1812765566 0.5622137840 [105,] 0.8507193565 1.1812765566 [106,] 0.9828728649 0.8507193565 [107,] 0.0048550227 0.9828728649 [108,] -0.7175134288 0.0048550227 [109,] -0.7455054847 -0.7175134288 [110,] -1.3413844899 -0.7455054847 [111,] -2.1039753223 -1.3413844899 [112,] -1.6824314818 -2.1039753223 [113,] -1.5950362248 -1.6824314818 [114,] 0.4729415990 -1.5950362248 [115,] -0.0545160254 0.4729415990 [116,] -2.9902843769 -0.0545160254 [117,] 0.4124036815 -2.9902843769 [118,] 2.0738900998 0.4124036815 [119,] -0.6747323295 2.0738900998 [120,] 0.6564261089 -0.6747323295 [121,] -0.2282484417 0.6564261089 [122,] 3.2897641861 -0.2282484417 [123,] 1.2349831414 3.2897641861 [124,] 0.8820758983 1.2349831414 [125,] -1.5350829509 0.8820758983 [126,] 0.0819333677 -1.5350829509 [127,] -2.8065454099 0.0819333677 [128,] -0.2096605478 -2.8065454099 [129,] -1.7244691056 -0.2096605478 [130,] 3.0824786777 -1.7244691056 [131,] 0.2271473635 3.0824786777 [132,] -0.4115005458 0.2271473635 [133,] 3.8255624184 -0.4115005458 [134,] -0.7627840543 3.8255624184 [135,] -0.9553379448 -0.7627840543 [136,] 0.0122486736 -0.9553379448 [137,] -1.0238334874 0.0122486736 [138,] -1.3306691429 -1.0238334874 [139,] 1.3087922348 -1.3306691429 [140,] -1.9198640410 1.3087922348 [141,] -0.6979279401 -1.9198640410 [142,] -2.6640997548 -0.6979279401 [143,] 2.6540336568 -2.6640997548 [144,] -0.0828413421 2.6540336568 [145,] -0.1313302365 -0.0828413421 [146,] -0.4044164301 -0.1313302365 [147,] 1.7296885162 -0.4044164301 [148,] -0.2111618244 1.7296885162 [149,] -2.7317650342 -0.2111618244 [150,] 0.3835023635 -2.7317650342 [151,] -0.0045214011 0.3835023635 [152,] -1.8024620724 -0.0045214011 [153,] -0.5890434226 -1.8024620724 [154,] 1.9948436661 -0.5890434226 [155,] -0.1221380046 1.9948436661 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.8837428724 -0.6107472528 2 -2.6316503332 -0.8837428724 3 0.9398121522 -2.6316503332 4 0.7750576982 0.9398121522 5 -0.7510270640 0.7750576982 6 0.1171140308 -0.7510270640 7 -1.0898895502 0.1171140308 8 1.4579913642 -1.0898895502 9 -2.1717585112 1.4579913642 10 -0.2292826110 -2.1717585112 11 -0.2854165604 -0.2292826110 12 0.5862811552 -0.2854165604 13 1.1773155019 0.5862811552 14 -0.5676009338 1.1773155019 15 -1.5388917860 -0.5676009338 16 -0.1884188397 -1.5388917860 17 0.1446149494 -0.1884188397 18 -0.8824692203 0.1446149494 19 -0.8623212863 -0.8824692203 20 0.2682099807 -0.8623212863 21 0.0644125087 0.2682099807 22 1.0273444841 0.0644125087 23 0.1382648187 1.0273444841 24 -2.0132193077 0.1382648187 25 -1.2080712032 -2.0132193077 26 -0.4857396994 -1.2080712032 27 1.0690168308 -0.4857396994 28 -0.9056189094 1.0690168308 29 0.8479719767 -0.9056189094 30 0.5630981708 0.8479719767 31 0.1420394652 0.5630981708 32 1.2263235152 0.1420394652 33 -0.0005782048 1.2263235152 34 -0.0862087080 -0.0005782048 35 0.7514117096 -0.0862087080 36 0.9732897588 0.7514117096 37 1.6961419848 0.9732897588 38 -0.8503596160 1.6961419848 39 1.7873842545 -0.8503596160 40 0.2464226214 1.7873842545 41 -1.0441874211 0.2464226214 42 -0.0082147463 -1.0441874211 43 -0.8497360302 -0.0082147463 44 0.0411779598 -0.8497360302 45 0.0258040064 0.0411779598 46 5.7498983386 0.0258040064 47 -1.4713826349 5.7498983386 48 -2.1674039304 -1.4713826349 49 -0.8193415115 -2.1674039304 50 0.6628929864 -0.8193415115 51 0.4201149901 0.6628929864 52 -1.3174169255 0.4201149901 53 0.5474778785 -1.3174169255 54 -2.6487060841 0.5474778785 55 2.2871414231 -2.6487060841 56 -0.5225633537 2.2871414231 57 0.7005148959 -0.5225633537 58 1.4529275298 0.7005148959 59 -3.0980047800 1.4529275298 60 -1.3906789808 -3.0980047800 61 0.7447569218 -1.3906789808 62 -2.7895408282 0.7447569218 63 -1.9873104313 -2.7895408282 64 2.4046741119 -1.9873104313 65 -0.7113018027 2.4046741119 66 1.2071600729 -0.7113018027 67 -0.9166256201 1.2071600729 68 1.1539237079 -0.9166256201 69 0.9650971778 1.1539237079 70 2.0002380859 0.9650971778 71 1.3858322454 2.0002380859 72 1.8462607311 1.3858322454 73 1.3237459016 1.8462607311 74 1.4442296252 1.3237459016 75 0.1863655606 1.4442296252 76 0.3439003189 0.1863655606 77 0.2265850096 0.3439003189 78 0.0472841900 0.2265850096 79 -0.0697392209 0.0472841900 80 -0.2980894750 -0.0697392209 81 1.7931454991 -0.2980894750 82 1.4109369255 1.7931454991 83 -0.2686081513 1.4109369255 84 1.4208874138 -0.2686081513 85 -0.4362794330 1.4208874138 86 0.1686814110 -0.4362794330 87 -0.4300971002 0.1686814110 88 -1.0616370213 -0.4300971002 89 1.0926332126 -1.0616370213 90 -0.2017814206 1.0926332126 91 0.7231335822 -0.2017814206 92 0.8587049324 0.7231335822 93 -0.3570497807 0.8587049324 94 0.6043546057 -0.3570497807 95 -1.7880177803 0.6043546057 96 -0.3299500430 -1.7880177803 97 0.5622854718 -0.3299500430 98 -0.6543771276 0.5622854718 99 0.6082427158 -0.6543771276 100 0.6669698867 0.6082427158 101 0.9143676010 0.6669698867 102 -1.7603826934 0.9143676010 103 0.5622137840 -1.7603826934 104 1.1812765566 0.5622137840 105 0.8507193565 1.1812765566 106 0.9828728649 0.8507193565 107 0.0048550227 0.9828728649 108 -0.7175134288 0.0048550227 109 -0.7455054847 -0.7175134288 110 -1.3413844899 -0.7455054847 111 -2.1039753223 -1.3413844899 112 -1.6824314818 -2.1039753223 113 -1.5950362248 -1.6824314818 114 0.4729415990 -1.5950362248 115 -0.0545160254 0.4729415990 116 -2.9902843769 -0.0545160254 117 0.4124036815 -2.9902843769 118 2.0738900998 0.4124036815 119 -0.6747323295 2.0738900998 120 0.6564261089 -0.6747323295 121 -0.2282484417 0.6564261089 122 3.2897641861 -0.2282484417 123 1.2349831414 3.2897641861 124 0.8820758983 1.2349831414 125 -1.5350829509 0.8820758983 126 0.0819333677 -1.5350829509 127 -2.8065454099 0.0819333677 128 -0.2096605478 -2.8065454099 129 -1.7244691056 -0.2096605478 130 3.0824786777 -1.7244691056 131 0.2271473635 3.0824786777 132 -0.4115005458 0.2271473635 133 3.8255624184 -0.4115005458 134 -0.7627840543 3.8255624184 135 -0.9553379448 -0.7627840543 136 0.0122486736 -0.9553379448 137 -1.0238334874 0.0122486736 138 -1.3306691429 -1.0238334874 139 1.3087922348 -1.3306691429 140 -1.9198640410 1.3087922348 141 -0.6979279401 -1.9198640410 142 -2.6640997548 -0.6979279401 143 2.6540336568 -2.6640997548 144 -0.0828413421 2.6540336568 145 -0.1313302365 -0.0828413421 146 -0.4044164301 -0.1313302365 147 1.7296885162 -0.4044164301 148 -0.2111618244 1.7296885162 149 -2.7317650342 -0.2111618244 150 0.3835023635 -2.7317650342 151 -0.0045214011 0.3835023635 152 -1.8024620724 -0.0045214011 153 -0.5890434226 -1.8024620724 154 1.9948436661 -0.5890434226 155 -0.1221380046 1.9948436661 > 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/7m6ez1291222065.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/8m6ez1291222065.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/9m6ez1291222065.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/10xgd31291222065.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/111guq1291222065.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/124zse1291222065.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/130q8n1291222065.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/14mrpt1291222065.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/157s5z1291222065.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/16ssl51291222065.tab") + } > > try(system("convert tmp/1qxg91291222065.ps tmp/1qxg91291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/2jofu1291222065.ps tmp/2jofu1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/3jofu1291222065.ps tmp/3jofu1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/4jofu1291222065.ps tmp/4jofu1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/5jofu1291222065.ps tmp/5jofu1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/6cfff1291222065.ps tmp/6cfff1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/7m6ez1291222065.ps tmp/7m6ez1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/8m6ez1291222065.ps tmp/8m6ez1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/9m6ez1291222065.ps tmp/9m6ez1291222065.png",intern=TRUE)) character(0) > try(system("convert tmp/10xgd31291222065.ps tmp/10xgd31291222065.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.065 1.849 9.306