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(279055 + ,73 + ,3 + ,96 + ,130 + ,212408 + ,75 + ,4 + ,75 + ,143 + ,233939 + ,83 + ,16 + ,70 + ,118 + ,222117 + ,106 + ,2 + ,134 + ,146 + ,179751 + ,55 + ,1 + ,72 + ,73 + ,70849 + ,28 + ,3 + ,8 + ,89 + ,605767 + ,135 + ,0 + ,173 + ,146 + ,33186 + ,19 + ,0 + ,1 + ,22 + ,227332 + ,62 + ,7 + ,88 + ,132 + ,258874 + ,48 + ,0 + ,98 + ,92 + ,359064 + ,120 + ,0 + ,112 + ,147 + ,264989 + ,131 + ,7 + ,125 + ,203 + ,212638 + ,87 + ,10 + ,57 + ,113 + ,368577 + ,85 + ,4 + ,139 + ,171 + ,269455 + ,88 + ,10 + ,87 + ,87 + ,397992 + ,190 + ,0 + ,176 + ,208 + ,335567 + ,76 + ,8 + ,114 + ,153 + ,428322 + ,172 + ,4 + ,121 + ,97 + ,182016 + ,58 + ,3 + ,103 + ,95 + ,267365 + ,89 + ,8 + ,135 + ,197 + ,279428 + ,73 + ,0 + ,123 + ,160 + ,508849 + ,111 + ,1 + ,99 + ,148 + ,206722 + ,47 + ,5 + ,74 + ,84 + ,200004 + ,58 + ,9 + ,103 + ,227 + ,257139 + ,133 + ,1 + ,158 + ,154 + ,270941 + ,138 + ,0 + ,116 + ,151 + ,324969 + ,134 + ,5 + ,114 + ,142 + ,329962 + ,92 + ,0 + ,150 + ,148 + ,190867 + ,60 + ,0 + ,64 + ,110 + ,393860 + ,79 + ,0 + ,150 + ,149 + ,327660 + ,89 + ,3 + ,143 + ,179 + ,269239 + ,83 + ,6 + ,50 + ,149 + ,391045 + ,105 + ,1 + ,145 + ,187 + ,130446 + ,49 + ,4 + ,56 + ,153 + ,430118 + ,104 + ,4 + ,141 + ,163 + ,273950 + ,56 + ,0 + ,83 + ,127 + ,428077 + ,128 + ,0 + ,112 + ,151 + ,254312 + ,93 + ,2 + ,79 + ,100 + ,120351 + ,35 + ,1 + ,33 + ,46 + ,395643 + ,211 + ,2 + ,152 + ,156 + ,345875 + ,86 + ,10 + ,126 + ,128 + ,216827 + ,82 + ,10 + ,97 + ,111 + ,224524 + ,83 + ,5 + ,84 + ,119 + ,182485 + ,69 + ,6 + ,68 + ,148 + ,157164 + ,85 + ,1 + ,50 + ,65 + ,459455 + ,157 + ,2 + ,101 + ,134 + ,78800 + ,42 + ,2 + ,20 + ,66 + ,217932 + ,84 + ,0 + ,101 + ,201 + ,368086 + ,123 + ,10 + ,150 + ,177 + ,230299 + ,70 + ,3 + ,129 + ,156 + ,244782 + ,81 + ,0 + ,99 + ,158 + ,24188 + ,24 + ,0 + ,8 + ,7 + ,400109 + ,334 + ,8 + ,88 + ,175 + ,65029 + ,17 + ,5 + ,21 + ,61 + ,101097 + ,64 + ,3 + ,30 + ,41 + ,309810 + ,67 + ,1 + ,102 + ,133 + ,369627 + ,90 + ,5 + ,163 + ,228 + ,367127 + ,204 + ,6 + ,132 + ,140 + ,377704 + ,154 + ,0 + ,161 + ,155 + ,280106 + ,90 + ,12 + ,90 + ,141 + ,400971 + ,153 + ,10 + ,160 + ,181 + ,315924 + ,122 + ,12 + ,139 + ,75 + ,291391 + ,124 + ,11 + ,104 + ,97 + ,295075 + ,93 + ,8 + ,103 + ,142 + ,280018 + ,81 + ,3 + ,66 + ,136 + ,267432 + ,71 + ,0 + ,163 + ,87 + ,217181 + ,141 + ,6 + ,93 + ,140 + ,258166 + ,159 + ,10 + ,85 + ,169 + ,260919 + ,87 + ,2 + ,150 + ,129 + ,182961 + ,73 + ,5 + ,143 + ,92 + ,256967 + ,74 + ,13 + ,107 + ,160 + ,73566 + ,32 + ,6 + ,22 + ,67 + ,272362 + ,93 + ,7 + ,85 + ,179 + ,229056 + ,62 + ,2 + ,101 + ,90 + ,229851 + ,70 + ,5 + ,131 + ,144 + ,371391 + ,91 + ,4 + ,140 + ,144 + ,398210 + ,104 + ,3 + ,156 + ,144 + ,220419 + ,111 + ,6 + ,81 + ,134 + ,231884 + ,72 + ,2 + ,137 + ,146 + ,217714 + ,72 + ,0 + ,102 + ,121 + ,200046 + ,53 + ,1 + ,72 + ,112 + ,483074 + ,131 + ,1 + ,161 + ,145 + ,146100 + ,72 + ,5 + ,30 + ,99 + ,295224 + ,109 + ,2 + ,120 + ,96 + ,80953 + ,25 + ,0 + ,49 + ,27 + ,217384 + ,63 + ,0 + ,121 + ,77 + ,179344 + ,62 + ,6 + ,76 + ,137 + ,415550 + ,221 + ,1 + ,85 + ,151 + ,389059 + ,129 + ,4 + ,151 + ,126 + ,180679 + ,106 + ,1 + ,165 + ,159 + ,299505 + ,104 + ,1 + ,89 + ,101 + ,292260 + ,84 + ,3 + ,168 + ,144 + ,199481 + ,68 + ,10 + ,48 + ,102 + ,282361 + ,78 + ,1 + ,149 + ,135 + ,329281 + ,89 + ,4 + ,75 + ,147 + ,234577 + ,48 + ,5 + ,107 + ,155 + ,297995 + ,67 + ,7 + ,116 + ,138 + ,329583 + ,89 + ,0 + ,173 + ,113 + ,416463 + ,163 + ,12 + ,155 + ,248 + ,415683 + ,119 + ,13 + ,165 + ,116 + ,297080 + ,142 + ,9 + ,121 + ,176 + ,318283 + ,70 + ,0 + ,156 + ,140 + ,224033 + ,199 + ,0 + ,86 + ,59 + ,43287 + ,14 + ,4 + ,13 + ,64 + ,238089 + ,87 + ,4 + ,120 + ,40 + ,263322 + ,160 + ,0 + ,117 + ,98 + ,299566 + ,60 + ,0 + ,133 + ,139 + ,321797 + ,95 + ,0 + ,169 + ,135 + ,193926 + ,95 + ,0 + ,39 + ,97 + ,175138 + ,105 + ,0 + ,125 + ,142 + ,354041 + ,78 + ,5 + ,82 + ,155 + ,303273 + ,91 + ,1 + ,148 + ,115 + ,23668 + ,13 + ,0 + ,12 + ,0 + ,196743 + ,79 + ,0 + ,146 + ,103 + ,61857 + ,25 + ,4 + ,23 + ,30 + ,217543 + ,54 + ,0 + ,87 + ,130 + ,440711 + ,128 + ,1 + ,164 + ,102 + ,21054 + ,16 + ,0 + ,4 + ,0 + ,252805 + ,52 + ,5 + ,81 + ,77 + ,31961 + ,22 + ,0 + ,18 + ,9 + ,360436 + ,125 + ,3 + ,118 + ,150 + ,251948 + ,77 + ,7 + ,76 + ,163 + ,187003 + ,96 + ,14 + ,55 + ,148 + ,180842 + ,58 + ,3 + ,62 + ,94 + ,38214 + ,34 + ,0 + ,16 + ,21 + ,280392 + ,56 + ,3 + ,98 + ,151 + ,358276 + ,84 + ,0 + ,137 + ,187 + ,211775 + ,67 + ,0 + ,50 + ,171 + ,447335 + ,90 + ,4 + ,152 + ,170 + ,348017 + ,99 + ,0 + ,163 + ,145 + ,441946 + ,133 + ,3 + ,142 + ,198 + ,215177 + ,43 + ,0 + ,80 + ,152 + ,130177 + ,47 + ,0 + ,59 + ,112 + ,316128 + ,363 + ,4 + ,94 + ,173 + ,466139 + ,198 + ,5 + ,128 + ,177 + ,162279 + ,62 + ,16 + ,63 + ,153 + ,416643 + ,140 + ,6 + ,127 + ,161 + ,178322 + ,86 + ,5 + ,60 + ,115 + ,292443 + ,54 + ,2 + ,118 + ,147 + ,283913 + ,100 + ,1 + ,110 + ,124 + ,244802 + ,126 + ,1 + ,45 + ,57 + ,387072 + ,125 + ,9 + ,96 + ,144 + ,246963 + ,92 + ,1 + ,128 + ,126 + ,173260 + ,63 + ,3 + ,41 + ,78 + ,346748 + ,108 + ,11 + ,146 + ,153 + ,176654 + ,59 + ,5 + ,147 + ,196 + ,268189 + ,95 + ,2 + ,121 + ,130 + ,314070 + ,112 + ,1 + ,185 + ,159 + ,1 + ,0 + ,9 + ,0 + ,0 + ,14688 + ,10 + ,0 + ,4 + ,0 + ,98 + ,1 + ,0 + ,0 + ,0 + ,455 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,291650 + ,94 + ,2 + ,85 + ,94 + ,415421 + ,168 + ,3 + ,164 + ,129 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,4 + ,0 + ,0 + ,0 + ,7199 + ,5 + ,0 + ,7 + ,0 + ,46660 + ,20 + ,0 + ,12 + ,13 + ,17547 + ,5 + ,0 + ,0 + ,4 + ,121550 + ,46 + ,0 + ,37 + ,89 + ,969 + ,2 + ,0 + ,0 + ,0 + ,242774 + ,75 + ,2 + ,62 + ,71) + ,dim=c(5 + ,164) + ,dimnames=list(c('Tijd_RFC' + ,'#Logins' + ,'#Gedeelde_Compendia' + ,'#Blogs' + ,'#Reviews+120tekens') + ,1:164)) > y <- array(NA,dim=c(5,164),dimnames=list(c('Tijd_RFC','#Logins','#Gedeelde_Compendia','#Blogs','#Reviews+120tekens'),1:164)) > 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' > 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 Tijd_RFC #Logins #Gedeelde_Compendia #Blogs #Reviews+120tekens 1 279055 73 3 96 130 2 212408 75 4 75 143 3 233939 83 16 70 118 4 222117 106 2 134 146 5 179751 55 1 72 73 6 70849 28 3 8 89 7 605767 135 0 173 146 8 33186 19 0 1 22 9 227332 62 7 88 132 10 258874 48 0 98 92 11 359064 120 0 112 147 12 264989 131 7 125 203 13 212638 87 10 57 113 14 368577 85 4 139 171 15 269455 88 10 87 87 16 397992 190 0 176 208 17 335567 76 8 114 153 18 428322 172 4 121 97 19 182016 58 3 103 95 20 267365 89 8 135 197 21 279428 73 0 123 160 22 508849 111 1 99 148 23 206722 47 5 74 84 24 200004 58 9 103 227 25 257139 133 1 158 154 26 270941 138 0 116 151 27 324969 134 5 114 142 28 329962 92 0 150 148 29 190867 60 0 64 110 30 393860 79 0 150 149 31 327660 89 3 143 179 32 269239 83 6 50 149 33 391045 105 1 145 187 34 130446 49 4 56 153 35 430118 104 4 141 163 36 273950 56 0 83 127 37 428077 128 0 112 151 38 254312 93 2 79 100 39 120351 35 1 33 46 40 395643 211 2 152 156 41 345875 86 10 126 128 42 216827 82 10 97 111 43 224524 83 5 84 119 44 182485 69 6 68 148 45 157164 85 1 50 65 46 459455 157 2 101 134 47 78800 42 2 20 66 48 217932 84 0 101 201 49 368086 123 10 150 177 50 230299 70 3 129 156 51 244782 81 0 99 158 52 24188 24 0 8 7 53 400109 334 8 88 175 54 65029 17 5 21 61 55 101097 64 3 30 41 56 309810 67 1 102 133 57 369627 90 5 163 228 58 367127 204 6 132 140 59 377704 154 0 161 155 60 280106 90 12 90 141 61 400971 153 10 160 181 62 315924 122 12 139 75 63 291391 124 11 104 97 64 295075 93 8 103 142 65 280018 81 3 66 136 66 267432 71 0 163 87 67 217181 141 6 93 140 68 258166 159 10 85 169 69 260919 87 2 150 129 70 182961 73 5 143 92 71 256967 74 13 107 160 72 73566 32 6 22 67 73 272362 93 7 85 179 74 229056 62 2 101 90 75 229851 70 5 131 144 76 371391 91 4 140 144 77 398210 104 3 156 144 78 220419 111 6 81 134 79 231884 72 2 137 146 80 217714 72 0 102 121 81 200046 53 1 72 112 82 483074 131 1 161 145 83 146100 72 5 30 99 84 295224 109 2 120 96 85 80953 25 0 49 27 86 217384 63 0 121 77 87 179344 62 6 76 137 88 415550 221 1 85 151 89 389059 129 4 151 126 90 180679 106 1 165 159 91 299505 104 1 89 101 92 292260 84 3 168 144 93 199481 68 10 48 102 94 282361 78 1 149 135 95 329281 89 4 75 147 96 234577 48 5 107 155 97 297995 67 7 116 138 98 329583 89 0 173 113 99 416463 163 12 155 248 100 415683 119 13 165 116 101 297080 142 9 121 176 102 318283 70 0 156 140 103 224033 199 0 86 59 104 43287 14 4 13 64 105 238089 87 4 120 40 106 263322 160 0 117 98 107 299566 60 0 133 139 108 321797 95 0 169 135 109 193926 95 0 39 97 110 175138 105 0 125 142 111 354041 78 5 82 155 112 303273 91 1 148 115 113 23668 13 0 12 0 114 196743 79 0 146 103 115 61857 25 4 23 30 116 217543 54 0 87 130 117 440711 128 1 164 102 118 21054 16 0 4 0 119 252805 52 5 81 77 120 31961 22 0 18 9 121 360436 125 3 118 150 122 251948 77 7 76 163 123 187003 96 14 55 148 124 180842 58 3 62 94 125 38214 34 0 16 21 126 280392 56 3 98 151 127 358276 84 0 137 187 128 211775 67 0 50 171 129 447335 90 4 152 170 130 348017 99 0 163 145 131 441946 133 3 142 198 132 215177 43 0 80 152 133 130177 47 0 59 112 134 316128 363 4 94 173 135 466139 198 5 128 177 136 162279 62 16 63 153 137 416643 140 6 127 161 138 178322 86 5 60 115 139 292443 54 2 118 147 140 283913 100 1 110 124 141 244802 126 1 45 57 142 387072 125 9 96 144 143 246963 92 1 128 126 144 173260 63 3 41 78 145 346748 108 11 146 153 146 176654 59 5 147 196 147 268189 95 2 121 130 148 314070 112 1 185 159 149 1 0 9 0 0 150 14688 10 0 4 0 151 98 1 0 0 0 152 455 2 0 0 0 153 0 0 1 0 0 154 0 0 0 0 0 155 291650 94 2 85 94 156 415421 168 3 164 129 157 0 0 0 0 0 158 203 4 0 0 0 159 7199 5 0 7 0 160 46660 20 0 12 13 161 17547 5 0 0 4 162 121550 46 0 37 89 163 969 2 0 0 0 164 242774 75 2 62 71 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `#Logins` `#Gedeelde_Compendia` 13561.3 755.6 198.8 `#Blogs` `#Reviews+120tekens` 1240.9 424.4 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -185385 -28150 -7310 30413 225572 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13561.3 11426.6 1.187 0.23707 `#Logins` 755.6 109.1 6.924 1.02e-10 *** `#Gedeelde_Compendia` 198.8 1320.0 0.151 0.88045 `#Blogs` 1240.9 143.4 8.654 5.21e-15 *** `#Reviews+120tekens` 424.4 136.2 3.115 0.00218 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 59710 on 159 degrees of freedom Multiple R-squared: 0.7799, Adjusted R-squared: 0.7744 F-statistic: 140.9 on 4 and 159 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.9822106 3.557876e-02 1.778938e-02 [2,] 0.9692661 6.146787e-02 3.073394e-02 [3,] 0.9479516 1.040968e-01 5.204838e-02 [4,] 0.9114934 1.770133e-01 8.850663e-02 [5,] 0.9193185 1.613631e-01 8.068155e-02 [6,] 0.8759504 2.480991e-01 1.240496e-01 [7,] 0.8440891 3.118218e-01 1.559109e-01 [8,] 0.7926548 4.146903e-01 2.073452e-01 [9,] 0.8160526 3.678948e-01 1.839474e-01 [10,] 0.7755418 4.489164e-01 2.244582e-01 [11,] 0.7411588 5.176825e-01 2.588412e-01 [12,] 0.8386496 3.227008e-01 1.613504e-01 [13,] 0.8166378 3.667244e-01 1.833622e-01 [14,] 0.7633504 4.732992e-01 2.366496e-01 [15,] 0.9956522 8.695602e-03 4.347801e-03 [16,] 0.9931861 1.362773e-02 6.813865e-03 [17,] 0.9912845 1.743105e-02 8.715524e-03 [18,] 0.9987347 2.530500e-03 1.265250e-03 [19,] 0.9987528 2.494495e-03 1.247247e-03 [20,] 0.9979891 4.021833e-03 2.010917e-03 [21,] 0.9968786 6.242854e-03 3.121427e-03 [22,] 0.9951680 9.664030e-03 4.832015e-03 [23,] 0.9949380 1.012403e-02 5.062017e-03 [24,] 0.9924148 1.517050e-02 7.585249e-03 [25,] 0.9940219 1.195627e-02 5.978134e-03 [26,] 0.9925916 1.481682e-02 7.408410e-03 [27,] 0.9908512 1.829769e-02 9.148844e-03 [28,] 0.9933391 1.332186e-02 6.660928e-03 [29,] 0.9927599 1.448011e-02 7.240056e-03 [30,] 0.9960928 7.814435e-03 3.907217e-03 [31,] 0.9945194 1.096112e-02 5.480562e-03 [32,] 0.9924676 1.506474e-02 7.532369e-03 [33,] 0.9925623 1.487541e-02 7.437704e-03 [34,] 0.9910143 1.797138e-02 8.985690e-03 [35,] 0.9891476 2.170473e-02 1.085237e-02 [36,] 0.9853098 2.938045e-02 1.469022e-02 [37,] 0.9809158 3.816833e-02 1.908416e-02 [38,] 0.9768765 4.624705e-02 2.312352e-02 [39,] 0.9929859 1.402828e-02 7.014141e-03 [40,] 0.9910204 1.795919e-02 8.979594e-03 [41,] 0.9906264 1.874713e-02 9.373566e-03 [42,] 0.9870815 2.583695e-02 1.291848e-02 [43,] 0.9876041 2.479188e-02 1.239594e-02 [44,] 0.9835454 3.290914e-02 1.645457e-02 [45,] 0.9815462 3.690762e-02 1.845381e-02 [46,] 0.9808393 3.832146e-02 1.916073e-02 [47,] 0.9751380 4.972402e-02 2.486201e-02 [48,] 0.9696752 6.064960e-02 3.032480e-02 [49,] 0.9688783 6.224330e-02 3.112165e-02 [50,] 0.9598184 8.036315e-02 4.018158e-02 [51,] 0.9532622 9.347553e-02 4.673776e-02 [52,] 0.9460422 1.079157e-01 5.395784e-02 [53,] 0.9350889 1.298221e-01 6.491105e-02 [54,] 0.9193073 1.613853e-01 8.069265e-02 [55,] 0.9060506 1.878988e-01 9.394938e-02 [56,] 0.8858838 2.282324e-01 1.141162e-01 [57,] 0.8651637 2.696726e-01 1.348363e-01 [58,] 0.8715355 2.569290e-01 1.284645e-01 [59,] 0.8765189 2.469623e-01 1.234811e-01 [60,] 0.8920669 2.158662e-01 1.079331e-01 [61,] 0.8848374 2.303252e-01 1.151626e-01 [62,] 0.8911923 2.176154e-01 1.088077e-01 [63,] 0.9332227 1.335546e-01 6.677732e-02 [64,] 0.9190253 1.619495e-01 8.097474e-02 [65,] 0.9037471 1.925057e-01 9.625286e-02 [66,] 0.8836142 2.327716e-01 1.163858e-01 [67,] 0.8601406 2.797189e-01 1.398594e-01 [68,] 0.8620241 2.759518e-01 1.379759e-01 [69,] 0.8555530 2.888940e-01 1.444470e-01 [70,] 0.8470844 3.058313e-01 1.529156e-01 [71,] 0.8295588 3.408825e-01 1.704412e-01 [72,] 0.8395187 3.209627e-01 1.604813e-01 [73,] 0.8181224 3.637553e-01 1.818776e-01 [74,] 0.7869012 4.261976e-01 2.130988e-01 [75,] 0.8559793 2.880414e-01 1.440207e-01 [76,] 0.8286967 3.426065e-01 1.713033e-01 [77,] 0.8004229 3.991542e-01 1.995771e-01 [78,] 0.7759838 4.480324e-01 2.240162e-01 [79,] 0.7502791 4.994418e-01 2.497209e-01 [80,] 0.7276051 5.447898e-01 2.723949e-01 [81,] 0.7411947 5.176106e-01 2.588053e-01 [82,] 0.7196971 5.606058e-01 2.803029e-01 [83,] 0.9425641 1.148719e-01 5.743593e-02 [84,] 0.9417475 1.165050e-01 5.825251e-02 [85,] 0.9404670 1.190661e-01 5.953304e-02 [86,] 0.9283730 1.432540e-01 7.162702e-02 [87,] 0.9168651 1.662699e-01 8.313494e-02 [88,] 0.9401264 1.197472e-01 5.987361e-02 [89,] 0.9273512 1.452976e-01 7.264881e-02 [90,] 0.9135569 1.728862e-01 8.644312e-02 [91,] 0.8946742 2.106516e-01 1.053258e-01 [92,] 0.8771336 2.457327e-01 1.228664e-01 [93,] 0.8707858 2.584285e-01 1.292142e-01 [94,] 0.8658857 2.682285e-01 1.341143e-01 [95,] 0.8383763 3.232475e-01 1.616237e-01 [96,] 0.8448947 3.102105e-01 1.551053e-01 [97,] 0.8222862 3.554276e-01 1.777138e-01 [98,] 0.7898609 4.202782e-01 2.101391e-01 [99,] 0.7808626 4.382749e-01 2.191374e-01 [100,] 0.7454187 5.091626e-01 2.545813e-01 [101,] 0.7160868 5.678265e-01 2.839132e-01 [102,] 0.6808785 6.382430e-01 3.191215e-01 [103,] 0.8370070 3.259859e-01 1.629930e-01 [104,] 0.9020570 1.958860e-01 9.794301e-02 [105,] 0.8813310 2.373381e-01 1.186690e-01 [106,] 0.8558628 2.882744e-01 1.441372e-01 [107,] 0.9265792 1.468417e-01 7.342085e-02 [108,] 0.9078745 1.842511e-01 9.212554e-02 [109,] 0.8844939 2.310122e-01 1.155061e-01 [110,] 0.8936978 2.126043e-01 1.063022e-01 [111,] 0.8678623 2.642755e-01 1.321377e-01 [112,] 0.8701532 2.596936e-01 1.298468e-01 [113,] 0.8442416 3.115167e-01 1.557584e-01 [114,] 0.8266444 3.467112e-01 1.733556e-01 [115,] 0.7920048 4.159904e-01 2.079952e-01 [116,] 0.7623284 4.753432e-01 2.376716e-01 [117,] 0.7177052 5.645896e-01 2.822948e-01 [118,] 0.6783213 6.433573e-01 3.216787e-01 [119,] 0.6426862 7.146276e-01 3.573138e-01 [120,] 0.6008803 7.982394e-01 3.991197e-01 [121,] 0.5568092 8.863815e-01 4.431908e-01 [122,] 0.6596369 6.807262e-01 3.403631e-01 [123,] 0.6041954 7.916091e-01 3.958046e-01 [124,] 0.6545746 6.908507e-01 3.454254e-01 [125,] 0.6207707 7.584585e-01 3.792293e-01 [126,] 0.5666371 8.667259e-01 4.333629e-01 [127,] 0.9992679 1.464295e-03 7.321473e-04 [128,] 0.9990149 1.970141e-03 9.850707e-04 [129,] 0.9991470 1.705955e-03 8.529774e-04 [130,] 0.9989067 2.186694e-03 1.093347e-03 [131,] 0.9994742 1.051571e-03 5.257856e-04 [132,] 0.9999935 1.301781e-05 6.508906e-06 [133,] 0.9999853 2.935654e-05 1.467827e-05 [134,] 0.9999999 2.508919e-07 1.254459e-07 [135,] 0.9999997 6.632370e-07 3.316185e-07 [136,] 0.9999989 2.144836e-06 1.072418e-06 [137,] 0.9999971 5.745599e-06 2.872800e-06 [138,] 0.9999971 5.894224e-06 2.947112e-06 [139,] 0.9999945 1.095455e-05 5.477275e-06 [140,] 0.9999804 3.926949e-05 1.963474e-05 [141,] 0.9999817 3.662996e-05 1.831498e-05 [142,] 0.9999974 5.165506e-06 2.582753e-06 [143,] 0.9999899 2.025491e-05 1.012746e-05 [144,] 0.9999508 9.836765e-05 4.918382e-05 [145,] 0.9997656 4.687612e-04 2.343806e-04 [146,] 0.9999722 5.558431e-05 2.779215e-05 [147,] 0.9997859 4.281185e-04 2.140593e-04 [148,] 0.9997661 4.677551e-04 2.338775e-04 [149,] 0.9987796 2.440755e-03 1.220377e-03 > postscript(file="/var/www/rcomp/tmp/1dkje1324656017.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/2xk3p1324656017.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/39mc21324656017.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/4g4621324656017.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/595qa1324656017.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 = 164 Frequency = 1 1 2 3 4 5 35452.38974 -12363.23803 17550.44819 -100162.53408 4115.17600 6 7 8 9 10 -12159.30084 213580.50841 -5307.68488 323.31027 48400.82262 11 12 13 14 15 53478.82180 -90194.47341 12673.20263 44953.25899 42542.26484 16 17 18 19 20 -65783.07346 56607.81477 92702.62301 -44086.65692 -66146.25271 21 22 23 24 25 -9811.99995 225571.79519 29185.61607 -83307.10763 -118517.23075 26 27 28 29 30 -54905.10595 7451.86617 -2044.45617 5877.79412 71251.45232 31 32 33 34 35 -7145.43646 66500.88012 38671.71592 -55348.00764 93051.79547 36 37 38 39 40 61192.63987 114749.91313 29622.39503 19677.48132 -32549.25338 41 42 43 44 45 54681.23137 -28145.57043 -7473.64893 -31586.36309 -10444.86513 46 47 48 49 50 144682.54995 -19717.31252 -69719.01419 -1637.62005 -63018.55552 51 52 53 54 55 -19873.18228 -20404.09403 -50858.03212 -14314.92424 -16041.04811 56 57 58 59 60 62420.20784 -11942.41769 -24964.81965 -17767.05921 24646.50090 61 62 63 64 65 -5525.39929 3492.30991 11741.13471 21588.68968 65050.47773 66 67 68 69 70 -38952.95544 -78917.17062 -54707.15753 -59644.52246 -103233.93581 71 72 73 74 75 -15759.79068 -21097.16356 5708.67462 4733.45865 -61253.64492 76 77 78 79 80 53450.74273 50792.60261 -35575.95889 -68429.09808 -28162.43640 81 82 83 84 85 9371.28996 109025.54758 -2093.03115 9267.74305 -23756.97827 86 87 88 89 90 -26596.89153 -34697.35718 65260.22338 36396.53374 -185384.93209 91 92 93 94 95 53870.15687 -54936.50245 29707.48879 -32508.94637 92234.49903 96 97 98 99 100 -14792.72398 29918.36006 -13843.92592 -20214.44634 55658.13655 101 102 103 104 105 -50391.18312 -1151.42752 -71635.45741 -24937.62505 -7878.53353 106 107 108 109 110 -57896.23082 16651.23669 -30535.75131 19030.32465 -133123.14023 111 112 113 114 115 113025.93373 -11691.17517 -14605.85963 -101381.60134 -12659.13741 116 117 118 119 120 60.25208 83454.09368 -9559.67947 65775.33429 -24377.26571 121 122 123 124 125 41758.28032 15341.07905 -32928.05033 6038.84576 -29801.56887 126 127 128 129 130 38240.63848 31895.15515 12982.97717 104226.67976 -4136.43532 131 132 133 134 135 67074.00025 5355.50192 -39634.37067 -162551.30112 68041.51930 136 137 138 139 140 -44409.37957 70199.70427 -24464.31787 28881.89169 5482.13383 141 142 143 144 145 55814.37252 97046.24022 -48607.54088 27526.79620 3306.97016 146 147 148 149 150 -148059.88219 -22858.49623 -81344.42957 -15349.88430 -11392.32521 151 152 153 154 155 -14218.86517 -14617.42421 -13760.14815 -13561.30613 61305.84750 156 157 158 159 160 16086.35272 -13561.30613 -16380.54230 -18826.10147 -2419.44098 161 162 163 164 -1489.53767 -10446.69524 -14103.42421 65085.44288 > postscript(file="/var/www/rcomp/tmp/65cgh1324656017.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 = 164 Frequency = 1 lag(myerror, k = 1) myerror 0 35452.38974 NA 1 -12363.23803 35452.38974 2 17550.44819 -12363.23803 3 -100162.53408 17550.44819 4 4115.17600 -100162.53408 5 -12159.30084 4115.17600 6 213580.50841 -12159.30084 7 -5307.68488 213580.50841 8 323.31027 -5307.68488 9 48400.82262 323.31027 10 53478.82180 48400.82262 11 -90194.47341 53478.82180 12 12673.20263 -90194.47341 13 44953.25899 12673.20263 14 42542.26484 44953.25899 15 -65783.07346 42542.26484 16 56607.81477 -65783.07346 17 92702.62301 56607.81477 18 -44086.65692 92702.62301 19 -66146.25271 -44086.65692 20 -9811.99995 -66146.25271 21 225571.79519 -9811.99995 22 29185.61607 225571.79519 23 -83307.10763 29185.61607 24 -118517.23075 -83307.10763 25 -54905.10595 -118517.23075 26 7451.86617 -54905.10595 27 -2044.45617 7451.86617 28 5877.79412 -2044.45617 29 71251.45232 5877.79412 30 -7145.43646 71251.45232 31 66500.88012 -7145.43646 32 38671.71592 66500.88012 33 -55348.00764 38671.71592 34 93051.79547 -55348.00764 35 61192.63987 93051.79547 36 114749.91313 61192.63987 37 29622.39503 114749.91313 38 19677.48132 29622.39503 39 -32549.25338 19677.48132 40 54681.23137 -32549.25338 41 -28145.57043 54681.23137 42 -7473.64893 -28145.57043 43 -31586.36309 -7473.64893 44 -10444.86513 -31586.36309 45 144682.54995 -10444.86513 46 -19717.31252 144682.54995 47 -69719.01419 -19717.31252 48 -1637.62005 -69719.01419 49 -63018.55552 -1637.62005 50 -19873.18228 -63018.55552 51 -20404.09403 -19873.18228 52 -50858.03212 -20404.09403 53 -14314.92424 -50858.03212 54 -16041.04811 -14314.92424 55 62420.20784 -16041.04811 56 -11942.41769 62420.20784 57 -24964.81965 -11942.41769 58 -17767.05921 -24964.81965 59 24646.50090 -17767.05921 60 -5525.39929 24646.50090 61 3492.30991 -5525.39929 62 11741.13471 3492.30991 63 21588.68968 11741.13471 64 65050.47773 21588.68968 65 -38952.95544 65050.47773 66 -78917.17062 -38952.95544 67 -54707.15753 -78917.17062 68 -59644.52246 -54707.15753 69 -103233.93581 -59644.52246 70 -15759.79068 -103233.93581 71 -21097.16356 -15759.79068 72 5708.67462 -21097.16356 73 4733.45865 5708.67462 74 -61253.64492 4733.45865 75 53450.74273 -61253.64492 76 50792.60261 53450.74273 77 -35575.95889 50792.60261 78 -68429.09808 -35575.95889 79 -28162.43640 -68429.09808 80 9371.28996 -28162.43640 81 109025.54758 9371.28996 82 -2093.03115 109025.54758 83 9267.74305 -2093.03115 84 -23756.97827 9267.74305 85 -26596.89153 -23756.97827 86 -34697.35718 -26596.89153 87 65260.22338 -34697.35718 88 36396.53374 65260.22338 89 -185384.93209 36396.53374 90 53870.15687 -185384.93209 91 -54936.50245 53870.15687 92 29707.48879 -54936.50245 93 -32508.94637 29707.48879 94 92234.49903 -32508.94637 95 -14792.72398 92234.49903 96 29918.36006 -14792.72398 97 -13843.92592 29918.36006 98 -20214.44634 -13843.92592 99 55658.13655 -20214.44634 100 -50391.18312 55658.13655 101 -1151.42752 -50391.18312 102 -71635.45741 -1151.42752 103 -24937.62505 -71635.45741 104 -7878.53353 -24937.62505 105 -57896.23082 -7878.53353 106 16651.23669 -57896.23082 107 -30535.75131 16651.23669 108 19030.32465 -30535.75131 109 -133123.14023 19030.32465 110 113025.93373 -133123.14023 111 -11691.17517 113025.93373 112 -14605.85963 -11691.17517 113 -101381.60134 -14605.85963 114 -12659.13741 -101381.60134 115 60.25208 -12659.13741 116 83454.09368 60.25208 117 -9559.67947 83454.09368 118 65775.33429 -9559.67947 119 -24377.26571 65775.33429 120 41758.28032 -24377.26571 121 15341.07905 41758.28032 122 -32928.05033 15341.07905 123 6038.84576 -32928.05033 124 -29801.56887 6038.84576 125 38240.63848 -29801.56887 126 31895.15515 38240.63848 127 12982.97717 31895.15515 128 104226.67976 12982.97717 129 -4136.43532 104226.67976 130 67074.00025 -4136.43532 131 5355.50192 67074.00025 132 -39634.37067 5355.50192 133 -162551.30112 -39634.37067 134 68041.51930 -162551.30112 135 -44409.37957 68041.51930 136 70199.70427 -44409.37957 137 -24464.31787 70199.70427 138 28881.89169 -24464.31787 139 5482.13383 28881.89169 140 55814.37252 5482.13383 141 97046.24022 55814.37252 142 -48607.54088 97046.24022 143 27526.79620 -48607.54088 144 3306.97016 27526.79620 145 -148059.88219 3306.97016 146 -22858.49623 -148059.88219 147 -81344.42957 -22858.49623 148 -15349.88430 -81344.42957 149 -11392.32521 -15349.88430 150 -14218.86517 -11392.32521 151 -14617.42421 -14218.86517 152 -13760.14815 -14617.42421 153 -13561.30613 -13760.14815 154 61305.84750 -13561.30613 155 16086.35272 61305.84750 156 -13561.30613 16086.35272 157 -16380.54230 -13561.30613 158 -18826.10147 -16380.54230 159 -2419.44098 -18826.10147 160 -1489.53767 -2419.44098 161 -10446.69524 -1489.53767 162 -14103.42421 -10446.69524 163 65085.44288 -14103.42421 164 NA 65085.44288 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -12363.23803 35452.38974 [2,] 17550.44819 -12363.23803 [3,] -100162.53408 17550.44819 [4,] 4115.17600 -100162.53408 [5,] -12159.30084 4115.17600 [6,] 213580.50841 -12159.30084 [7,] -5307.68488 213580.50841 [8,] 323.31027 -5307.68488 [9,] 48400.82262 323.31027 [10,] 53478.82180 48400.82262 [11,] -90194.47341 53478.82180 [12,] 12673.20263 -90194.47341 [13,] 44953.25899 12673.20263 [14,] 42542.26484 44953.25899 [15,] -65783.07346 42542.26484 [16,] 56607.81477 -65783.07346 [17,] 92702.62301 56607.81477 [18,] -44086.65692 92702.62301 [19,] -66146.25271 -44086.65692 [20,] -9811.99995 -66146.25271 [21,] 225571.79519 -9811.99995 [22,] 29185.61607 225571.79519 [23,] -83307.10763 29185.61607 [24,] -118517.23075 -83307.10763 [25,] -54905.10595 -118517.23075 [26,] 7451.86617 -54905.10595 [27,] -2044.45617 7451.86617 [28,] 5877.79412 -2044.45617 [29,] 71251.45232 5877.79412 [30,] -7145.43646 71251.45232 [31,] 66500.88012 -7145.43646 [32,] 38671.71592 66500.88012 [33,] -55348.00764 38671.71592 [34,] 93051.79547 -55348.00764 [35,] 61192.63987 93051.79547 [36,] 114749.91313 61192.63987 [37,] 29622.39503 114749.91313 [38,] 19677.48132 29622.39503 [39,] -32549.25338 19677.48132 [40,] 54681.23137 -32549.25338 [41,] -28145.57043 54681.23137 [42,] -7473.64893 -28145.57043 [43,] -31586.36309 -7473.64893 [44,] -10444.86513 -31586.36309 [45,] 144682.54995 -10444.86513 [46,] -19717.31252 144682.54995 [47,] -69719.01419 -19717.31252 [48,] -1637.62005 -69719.01419 [49,] -63018.55552 -1637.62005 [50,] -19873.18228 -63018.55552 [51,] -20404.09403 -19873.18228 [52,] -50858.03212 -20404.09403 [53,] -14314.92424 -50858.03212 [54,] -16041.04811 -14314.92424 [55,] 62420.20784 -16041.04811 [56,] -11942.41769 62420.20784 [57,] -24964.81965 -11942.41769 [58,] -17767.05921 -24964.81965 [59,] 24646.50090 -17767.05921 [60,] -5525.39929 24646.50090 [61,] 3492.30991 -5525.39929 [62,] 11741.13471 3492.30991 [63,] 21588.68968 11741.13471 [64,] 65050.47773 21588.68968 [65,] -38952.95544 65050.47773 [66,] -78917.17062 -38952.95544 [67,] -54707.15753 -78917.17062 [68,] -59644.52246 -54707.15753 [69,] -103233.93581 -59644.52246 [70,] -15759.79068 -103233.93581 [71,] -21097.16356 -15759.79068 [72,] 5708.67462 -21097.16356 [73,] 4733.45865 5708.67462 [74,] -61253.64492 4733.45865 [75,] 53450.74273 -61253.64492 [76,] 50792.60261 53450.74273 [77,] -35575.95889 50792.60261 [78,] -68429.09808 -35575.95889 [79,] -28162.43640 -68429.09808 [80,] 9371.28996 -28162.43640 [81,] 109025.54758 9371.28996 [82,] -2093.03115 109025.54758 [83,] 9267.74305 -2093.03115 [84,] -23756.97827 9267.74305 [85,] -26596.89153 -23756.97827 [86,] -34697.35718 -26596.89153 [87,] 65260.22338 -34697.35718 [88,] 36396.53374 65260.22338 [89,] -185384.93209 36396.53374 [90,] 53870.15687 -185384.93209 [91,] -54936.50245 53870.15687 [92,] 29707.48879 -54936.50245 [93,] -32508.94637 29707.48879 [94,] 92234.49903 -32508.94637 [95,] -14792.72398 92234.49903 [96,] 29918.36006 -14792.72398 [97,] -13843.92592 29918.36006 [98,] -20214.44634 -13843.92592 [99,] 55658.13655 -20214.44634 [100,] -50391.18312 55658.13655 [101,] -1151.42752 -50391.18312 [102,] -71635.45741 -1151.42752 [103,] -24937.62505 -71635.45741 [104,] -7878.53353 -24937.62505 [105,] -57896.23082 -7878.53353 [106,] 16651.23669 -57896.23082 [107,] -30535.75131 16651.23669 [108,] 19030.32465 -30535.75131 [109,] -133123.14023 19030.32465 [110,] 113025.93373 -133123.14023 [111,] -11691.17517 113025.93373 [112,] -14605.85963 -11691.17517 [113,] -101381.60134 -14605.85963 [114,] -12659.13741 -101381.60134 [115,] 60.25208 -12659.13741 [116,] 83454.09368 60.25208 [117,] -9559.67947 83454.09368 [118,] 65775.33429 -9559.67947 [119,] -24377.26571 65775.33429 [120,] 41758.28032 -24377.26571 [121,] 15341.07905 41758.28032 [122,] -32928.05033 15341.07905 [123,] 6038.84576 -32928.05033 [124,] -29801.56887 6038.84576 [125,] 38240.63848 -29801.56887 [126,] 31895.15515 38240.63848 [127,] 12982.97717 31895.15515 [128,] 104226.67976 12982.97717 [129,] -4136.43532 104226.67976 [130,] 67074.00025 -4136.43532 [131,] 5355.50192 67074.00025 [132,] -39634.37067 5355.50192 [133,] -162551.30112 -39634.37067 [134,] 68041.51930 -162551.30112 [135,] -44409.37957 68041.51930 [136,] 70199.70427 -44409.37957 [137,] -24464.31787 70199.70427 [138,] 28881.89169 -24464.31787 [139,] 5482.13383 28881.89169 [140,] 55814.37252 5482.13383 [141,] 97046.24022 55814.37252 [142,] -48607.54088 97046.24022 [143,] 27526.79620 -48607.54088 [144,] 3306.97016 27526.79620 [145,] -148059.88219 3306.97016 [146,] -22858.49623 -148059.88219 [147,] -81344.42957 -22858.49623 [148,] -15349.88430 -81344.42957 [149,] -11392.32521 -15349.88430 [150,] -14218.86517 -11392.32521 [151,] -14617.42421 -14218.86517 [152,] -13760.14815 -14617.42421 [153,] -13561.30613 -13760.14815 [154,] 61305.84750 -13561.30613 [155,] 16086.35272 61305.84750 [156,] -13561.30613 16086.35272 [157,] -16380.54230 -13561.30613 [158,] -18826.10147 -16380.54230 [159,] -2419.44098 -18826.10147 [160,] -1489.53767 -2419.44098 [161,] -10446.69524 -1489.53767 [162,] -14103.42421 -10446.69524 [163,] 65085.44288 -14103.42421 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -12363.23803 35452.38974 2 17550.44819 -12363.23803 3 -100162.53408 17550.44819 4 4115.17600 -100162.53408 5 -12159.30084 4115.17600 6 213580.50841 -12159.30084 7 -5307.68488 213580.50841 8 323.31027 -5307.68488 9 48400.82262 323.31027 10 53478.82180 48400.82262 11 -90194.47341 53478.82180 12 12673.20263 -90194.47341 13 44953.25899 12673.20263 14 42542.26484 44953.25899 15 -65783.07346 42542.26484 16 56607.81477 -65783.07346 17 92702.62301 56607.81477 18 -44086.65692 92702.62301 19 -66146.25271 -44086.65692 20 -9811.99995 -66146.25271 21 225571.79519 -9811.99995 22 29185.61607 225571.79519 23 -83307.10763 29185.61607 24 -118517.23075 -83307.10763 25 -54905.10595 -118517.23075 26 7451.86617 -54905.10595 27 -2044.45617 7451.86617 28 5877.79412 -2044.45617 29 71251.45232 5877.79412 30 -7145.43646 71251.45232 31 66500.88012 -7145.43646 32 38671.71592 66500.88012 33 -55348.00764 38671.71592 34 93051.79547 -55348.00764 35 61192.63987 93051.79547 36 114749.91313 61192.63987 37 29622.39503 114749.91313 38 19677.48132 29622.39503 39 -32549.25338 19677.48132 40 54681.23137 -32549.25338 41 -28145.57043 54681.23137 42 -7473.64893 -28145.57043 43 -31586.36309 -7473.64893 44 -10444.86513 -31586.36309 45 144682.54995 -10444.86513 46 -19717.31252 144682.54995 47 -69719.01419 -19717.31252 48 -1637.62005 -69719.01419 49 -63018.55552 -1637.62005 50 -19873.18228 -63018.55552 51 -20404.09403 -19873.18228 52 -50858.03212 -20404.09403 53 -14314.92424 -50858.03212 54 -16041.04811 -14314.92424 55 62420.20784 -16041.04811 56 -11942.41769 62420.20784 57 -24964.81965 -11942.41769 58 -17767.05921 -24964.81965 59 24646.50090 -17767.05921 60 -5525.39929 24646.50090 61 3492.30991 -5525.39929 62 11741.13471 3492.30991 63 21588.68968 11741.13471 64 65050.47773 21588.68968 65 -38952.95544 65050.47773 66 -78917.17062 -38952.95544 67 -54707.15753 -78917.17062 68 -59644.52246 -54707.15753 69 -103233.93581 -59644.52246 70 -15759.79068 -103233.93581 71 -21097.16356 -15759.79068 72 5708.67462 -21097.16356 73 4733.45865 5708.67462 74 -61253.64492 4733.45865 75 53450.74273 -61253.64492 76 50792.60261 53450.74273 77 -35575.95889 50792.60261 78 -68429.09808 -35575.95889 79 -28162.43640 -68429.09808 80 9371.28996 -28162.43640 81 109025.54758 9371.28996 82 -2093.03115 109025.54758 83 9267.74305 -2093.03115 84 -23756.97827 9267.74305 85 -26596.89153 -23756.97827 86 -34697.35718 -26596.89153 87 65260.22338 -34697.35718 88 36396.53374 65260.22338 89 -185384.93209 36396.53374 90 53870.15687 -185384.93209 91 -54936.50245 53870.15687 92 29707.48879 -54936.50245 93 -32508.94637 29707.48879 94 92234.49903 -32508.94637 95 -14792.72398 92234.49903 96 29918.36006 -14792.72398 97 -13843.92592 29918.36006 98 -20214.44634 -13843.92592 99 55658.13655 -20214.44634 100 -50391.18312 55658.13655 101 -1151.42752 -50391.18312 102 -71635.45741 -1151.42752 103 -24937.62505 -71635.45741 104 -7878.53353 -24937.62505 105 -57896.23082 -7878.53353 106 16651.23669 -57896.23082 107 -30535.75131 16651.23669 108 19030.32465 -30535.75131 109 -133123.14023 19030.32465 110 113025.93373 -133123.14023 111 -11691.17517 113025.93373 112 -14605.85963 -11691.17517 113 -101381.60134 -14605.85963 114 -12659.13741 -101381.60134 115 60.25208 -12659.13741 116 83454.09368 60.25208 117 -9559.67947 83454.09368 118 65775.33429 -9559.67947 119 -24377.26571 65775.33429 120 41758.28032 -24377.26571 121 15341.07905 41758.28032 122 -32928.05033 15341.07905 123 6038.84576 -32928.05033 124 -29801.56887 6038.84576 125 38240.63848 -29801.56887 126 31895.15515 38240.63848 127 12982.97717 31895.15515 128 104226.67976 12982.97717 129 -4136.43532 104226.67976 130 67074.00025 -4136.43532 131 5355.50192 67074.00025 132 -39634.37067 5355.50192 133 -162551.30112 -39634.37067 134 68041.51930 -162551.30112 135 -44409.37957 68041.51930 136 70199.70427 -44409.37957 137 -24464.31787 70199.70427 138 28881.89169 -24464.31787 139 5482.13383 28881.89169 140 55814.37252 5482.13383 141 97046.24022 55814.37252 142 -48607.54088 97046.24022 143 27526.79620 -48607.54088 144 3306.97016 27526.79620 145 -148059.88219 3306.97016 146 -22858.49623 -148059.88219 147 -81344.42957 -22858.49623 148 -15349.88430 -81344.42957 149 -11392.32521 -15349.88430 150 -14218.86517 -11392.32521 151 -14617.42421 -14218.86517 152 -13760.14815 -14617.42421 153 -13561.30613 -13760.14815 154 61305.84750 -13561.30613 155 16086.35272 61305.84750 156 -13561.30613 16086.35272 157 -16380.54230 -13561.30613 158 -18826.10147 -16380.54230 159 -2419.44098 -18826.10147 160 -1489.53767 -2419.44098 161 -10446.69524 -1489.53767 162 -14103.42421 -10446.69524 163 65085.44288 -14103.42421 > 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/7q5g31324656017.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/8ehxr1324656017.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/92h601324656017.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/1019pb1324656017.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/11w1ec1324656017.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/126kff1324656017.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/13q5pv1324656017.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/14i5d81324656017.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/15btbp1324656017.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/16b9hd1324656017.tab") + } > > try(system("convert tmp/1dkje1324656017.ps tmp/1dkje1324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/2xk3p1324656017.ps tmp/2xk3p1324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/39mc21324656017.ps tmp/39mc21324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/4g4621324656017.ps tmp/4g4621324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/595qa1324656017.ps tmp/595qa1324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/65cgh1324656017.ps tmp/65cgh1324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/7q5g31324656017.ps tmp/7q5g31324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/8ehxr1324656017.ps tmp/8ehxr1324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/92h601324656017.ps tmp/92h601324656017.png",intern=TRUE)) character(0) > try(system("convert tmp/1019pb1324656017.ps tmp/1019pb1324656017.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.750 0.380 6.146