R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(140824 + ,269998 + ,116 + ,165 + ,90 + ,110459 + ,176565 + ,127 + ,132 + ,63 + ,105079 + ,222373 + ,106 + ,121 + ,59 + ,112098 + ,218443 + ,133 + ,145 + ,135 + ,43929 + ,157206 + ,64 + ,71 + ,48 + ,76173 + ,70849 + ,89 + ,47 + ,46 + ,187326 + ,482608 + ,122 + ,177 + ,109 + ,22807 + ,33186 + ,22 + ,5 + ,46 + ,144408 + ,207822 + ,117 + ,124 + ,75 + ,66485 + ,211698 + ,82 + ,92 + ,72 + ,79089 + ,292874 + ,136 + ,149 + ,78 + ,81625 + ,235891 + ,184 + ,93 + ,61 + ,68788 + ,156623 + ,106 + ,70 + ,58 + ,103297 + ,344166 + ,162 + ,148 + ,114 + ,69446 + ,211787 + ,86 + ,100 + ,45 + ,114948 + ,369753 + ,199 + ,142 + ,127 + ,167949 + ,292100 + ,139 + ,194 + ,58 + ,125081 + ,315018 + ,92 + ,113 + ,90 + ,125818 + ,168686 + ,85 + ,162 + ,41 + ,136588 + ,256016 + ,174 + ,186 + ,59 + ,112431 + ,269240 + ,148 + ,147 + ,99 + ,103037 + ,425544 + ,144 + ,137 + ,101 + ,82317 + ,161962 + ,84 + ,71 + ,62 + ,118906 + ,189897 + ,208 + ,123 + ,65 + ,83515 + ,200545 + ,144 + ,134 + ,150 + ,104581 + ,203723 + ,139 + ,115 + ,72 + ,103129 + ,267198 + ,127 + ,138 + ,91 + ,83243 + ,263212 + ,136 + ,125 + ,60 + ,37110 + ,155915 + ,99 + ,66 + ,53 + ,113344 + ,326805 + ,135 + ,137 + ,140 + ,139165 + ,271661 + ,165 + ,152 + ,49 + ,86652 + ,197192 + ,139 + ,159 + ,81 + ,112302 + ,318563 + ,178 + ,159 + ,53 + ,69652 + ,97717 + ,137 + ,31 + ,40 + ,119442 + ,346931 + ,148 + ,185 + ,72 + ,69867 + ,273950 + ,127 + ,78 + ,87 + ,101629 + ,411809 + ,141 + ,117 + ,72 + ,70168 + ,208192 + ,89 + ,109 + ,67 + ,31081 + ,115469 + ,46 + ,41 + ,36 + ,103925 + ,328339 + ,143 + ,149 + ,45 + ,92622 + ,324178 + ,122 + ,123 + ,42 + ,79011 + ,157897 + ,103 + ,103 + ,70 + ,93487 + ,192883 + ,108 + ,87 + ,82 + ,64520 + ,173450 + ,126 + ,71 + ,85 + ,93473 + ,153778 + ,45 + ,51 + ,82 + ,114360 + ,445562 + ,122 + ,70 + ,792 + ,33032 + ,78800 + ,66 + ,21 + ,57 + ,96125 + ,208051 + ,180 + ,155 + ,80 + ,151911 + ,323152 + ,165 + ,172 + ,116 + ,89256 + ,175523 + ,146 + ,133 + ,68 + ,95671 + ,213050 + ,137 + ,125 + ,48 + ,5950 + ,24188 + ,7 + ,7 + ,20 + ,149695 + ,372225 + ,157 + ,158 + ,81 + ,32551 + ,65029 + ,61 + ,21 + ,21 + ,31701 + ,101097 + ,41 + ,35 + ,70 + ,100087 + ,269593 + ,120 + ,133 + ,124 + ,169707 + ,302218 + ,208 + ,169 + ,80 + ,150491 + ,315889 + ,127 + ,256 + ,206 + ,120192 + ,322546 + ,147 + ,190 + ,62 + ,95893 + ,246873 + ,127 + ,100 + ,77 + ,151715 + ,360665 + ,161 + ,171 + ,65 + ,176225 + ,296186 + ,73 + ,267 + ,146 + ,59900 + ,232336 + ,94 + ,80 + ,71 + ,104767 + ,254550 + ,142 + ,126 + ,59 + ,114799 + ,228595 + ,125 + ,132 + ,58 + ,72128 + ,216027 + ,87 + ,121 + ,58 + ,143592 + ,187959 + ,128 + ,156 + ,54 + ,89626 + ,227699 + ,148 + ,133 + ,89 + ,131072 + ,229698 + ,116 + ,199 + ,78 + ,126817 + ,166791 + ,89 + ,98 + ,62 + ,81351 + ,239277 + ,154 + ,109 + ,63 + ,22618 + ,73566 + ,67 + ,25 + ,39 + ,88977 + ,242498 + ,171 + ,113 + ,58 + ,92059 + ,187167 + ,90 + ,126 + ,94 + ,81897 + ,178281 + ,133 + ,137 + ,61 + ,108146 + ,349060 + ,137 + ,121 + ,92 + ,126372 + ,323126 + ,133 + ,178 + ,48 + ,249771 + ,206059 + ,125 + ,63 + ,50 + ,71154 + ,184970 + ,134 + ,109 + ,58 + ,71571 + ,168990 + ,110 + ,101 + ,67 + ,55918 + ,153613 + ,89 + ,61 + ,41 + ,160141 + ,429481 + ,138 + ,157 + ,114 + ,38692 + ,145919 + ,99 + ,38 + ,45 + ,102812 + ,280343 + ,92 + ,159 + ,57 + ,56622 + ,80953 + ,27 + ,58 + ,31 + ,15986 + ,148106 + ,77 + ,27 + ,175 + ,123534 + ,146777 + ,127 + ,108 + ,63 + ,108535 + ,336054 + ,137 + ,83 + ,278 + ,93879 + ,307486 + ,122 + ,88 + ,91 + ,144551 + ,178495 + ,143 + ,164 + ,68 + ,56750 + ,251466 + ,85 + ,96 + ,58 + ,127654 + ,230961 + ,131 + ,192 + ,71 + ,65594 + ,175244 + ,90 + ,94 + ,86 + ,59938 + ,261494 + ,135 + ,107 + ,89 + ,146975 + ,301883 + ,132 + ,144 + ,134 + ,143372 + ,189252 + ,139 + ,123 + ,64 + ,168553 + ,222504 + ,127 + ,170 + ,72 + ,183500 + ,278170 + ,104 + ,210 + ,61 + ,165986 + ,367723 + ,221 + ,193 + ,123 + ,184923 + ,392346 + ,106 + ,297 + ,73 + ,140358 + ,281033 + ,161 + ,125 + ,80 + ,149959 + ,273642 + ,130 + ,204 + ,85 + ,57224 + ,186856 + ,59 + ,70 + ,116 + ,43750 + ,43287 + ,64 + ,49 + ,43 + ,48029 + ,185302 + ,36 + ,82 + ,85 + ,104978 + ,203088 + ,88 + ,205 + ,72 + ,100046 + ,259692 + ,125 + ,111 + ,110 + ,101047 + ,301456 + ,124 + ,135 + ,55 + ,197426 + ,119969 + ,83 + ,59 + ,44 + ,160902 + ,153028 + ,127 + ,70 + ,79 + ,147172 + ,306952 + ,143 + ,108 + ,58 + ,109432 + ,297807 + ,115 + ,141 + ,70 + ,1168 + ,23623 + ,0 + ,11 + ,9 + ,83248 + ,175532 + ,94 + ,130 + ,49 + ,25162 + ,61857 + ,30 + ,28 + ,25 + ,45724 + ,163766 + ,119 + ,101 + ,107 + ,110529 + ,384053 + ,102 + ,216 + ,63 + ,855 + ,21054 + ,0 + ,4 + ,2 + ,101382 + ,252805 + ,77 + ,97 + ,67 + ,14116 + ,31961 + ,9 + ,39 + ,22 + ,89506 + ,294609 + ,137 + ,119 + ,152 + ,135356 + ,235069 + ,157 + ,118 + ,78 + ,116066 + ,174862 + ,146 + ,41 + ,112 + ,144244 + ,152043 + ,84 + ,107 + ,47 + ,8773 + ,38214 + ,21 + ,16 + ,52 + ,102153 + ,189451 + ,139 + ,69 + ,108 + ,117440 + ,344802 + ,168 + ,160 + ,110 + ,104128 + ,190943 + ,163 + ,158 + ,61 + ,134238 + ,396160 + ,167 + ,161 + ,134 + ,134047 + ,314212 + ,145 + ,165 + ,120 + ,279488 + ,396712 + ,175 + ,246 + ,111 + ,79756 + ,187992 + ,137 + ,89 + ,49 + ,66089 + ,102424 + ,100 + ,49 + ,55 + ,102070 + ,283392 + ,150 + ,107 + ,149 + ,146760 + ,401260 + ,163 + ,182 + ,155 + ,154771 + ,135936 + ,137 + ,16 + ,103 + ,165933 + ,373146 + ,149 + ,173 + ,142 + ,64593 + ,157429 + ,112 + ,90 + ,76 + ,92280 + ,236370 + ,135 + ,140 + ,83 + ,67150 + ,258959 + ,114 + ,142 + ,185 + ,128692 + ,214338 + ,45 + ,126 + ,69 + ,124089 + ,363154 + ,120 + ,123 + ,117 + ,125386 + ,232339 + ,115 + ,239 + ,63 + ,37238 + ,173260 + ,78 + ,15 + ,37 + ,140015 + ,317676 + ,136 + ,170 + ,56 + ,150047 + ,168994 + ,179 + ,123 + ,122 + ,154451 + ,233293 + ,118 + ,151 + ,52 + ,156349 + ,301585 + ,147 + ,194 + ,64 + ,0 + ,1 + ,0 + ,0 + ,0 + ,6023 + ,14688 + ,0 + ,5 + ,0 + ,0 + ,98 + ,0 + ,0 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,84601 + ,216803 + ,88 + ,122 + ,58 + ,68946 + ,365230 + ,115 + ,173 + ,109 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,0 + ,0 + ,0 + ,1644 + ,7199 + ,0 + ,6 + ,0 + ,6179 + ,46660 + ,13 + ,13 + ,7 + ,3926 + ,17547 + ,4 + ,3 + ,3 + ,52789 + ,116678 + ,76 + ,35 + ,89 + ,0 + ,969 + ,0 + ,0 + ,0 + ,100350 + ,195592 + ,63 + ,72 + ,46) + ,dim=c(5 + ,164) + ,dimnames=list(c('#Karakters' + ,'Totale_tijd_RFC' + ,'#Feedback_Messages(+120karakters)' + ,'#Blogs' + ,'#Compendium_views(PR)') + ,1:164)) > y <- array(NA,dim=c(5,164),dimnames=list(c('#Karakters','Totale_tijd_RFC','#Feedback_Messages(+120karakters)','#Blogs','#Compendium_views(PR)'),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 #Karakters Totale_tijd_RFC #Feedback_Messages(+120karakters) #Blogs 1 140824 269998 116 165 2 110459 176565 127 132 3 105079 222373 106 121 4 112098 218443 133 145 5 43929 157206 64 71 6 76173 70849 89 47 7 187326 482608 122 177 8 22807 33186 22 5 9 144408 207822 117 124 10 66485 211698 82 92 11 79089 292874 136 149 12 81625 235891 184 93 13 68788 156623 106 70 14 103297 344166 162 148 15 69446 211787 86 100 16 114948 369753 199 142 17 167949 292100 139 194 18 125081 315018 92 113 19 125818 168686 85 162 20 136588 256016 174 186 21 112431 269240 148 147 22 103037 425544 144 137 23 82317 161962 84 71 24 118906 189897 208 123 25 83515 200545 144 134 26 104581 203723 139 115 27 103129 267198 127 138 28 83243 263212 136 125 29 37110 155915 99 66 30 113344 326805 135 137 31 139165 271661 165 152 32 86652 197192 139 159 33 112302 318563 178 159 34 69652 97717 137 31 35 119442 346931 148 185 36 69867 273950 127 78 37 101629 411809 141 117 38 70168 208192 89 109 39 31081 115469 46 41 40 103925 328339 143 149 41 92622 324178 122 123 42 79011 157897 103 103 43 93487 192883 108 87 44 64520 173450 126 71 45 93473 153778 45 51 46 114360 445562 122 70 47 33032 78800 66 21 48 96125 208051 180 155 49 151911 323152 165 172 50 89256 175523 146 133 51 95671 213050 137 125 52 5950 24188 7 7 53 149695 372225 157 158 54 32551 65029 61 21 55 31701 101097 41 35 56 100087 269593 120 133 57 169707 302218 208 169 58 150491 315889 127 256 59 120192 322546 147 190 60 95893 246873 127 100 61 151715 360665 161 171 62 176225 296186 73 267 63 59900 232336 94 80 64 104767 254550 142 126 65 114799 228595 125 132 66 72128 216027 87 121 67 143592 187959 128 156 68 89626 227699 148 133 69 131072 229698 116 199 70 126817 166791 89 98 71 81351 239277 154 109 72 22618 73566 67 25 73 88977 242498 171 113 74 92059 187167 90 126 75 81897 178281 133 137 76 108146 349060 137 121 77 126372 323126 133 178 78 249771 206059 125 63 79 71154 184970 134 109 80 71571 168990 110 101 81 55918 153613 89 61 82 160141 429481 138 157 83 38692 145919 99 38 84 102812 280343 92 159 85 56622 80953 27 58 86 15986 148106 77 27 87 123534 146777 127 108 88 108535 336054 137 83 89 93879 307486 122 88 90 144551 178495 143 164 91 56750 251466 85 96 92 127654 230961 131 192 93 65594 175244 90 94 94 59938 261494 135 107 95 146975 301883 132 144 96 143372 189252 139 123 97 168553 222504 127 170 98 183500 278170 104 210 99 165986 367723 221 193 100 184923 392346 106 297 101 140358 281033 161 125 102 149959 273642 130 204 103 57224 186856 59 70 104 43750 43287 64 49 105 48029 185302 36 82 106 104978 203088 88 205 107 100046 259692 125 111 108 101047 301456 124 135 109 197426 119969 83 59 110 160902 153028 127 70 111 147172 306952 143 108 112 109432 297807 115 141 113 1168 23623 0 11 114 83248 175532 94 130 115 25162 61857 30 28 116 45724 163766 119 101 117 110529 384053 102 216 118 855 21054 0 4 119 101382 252805 77 97 120 14116 31961 9 39 121 89506 294609 137 119 122 135356 235069 157 118 123 116066 174862 146 41 124 144244 152043 84 107 125 8773 38214 21 16 126 102153 189451 139 69 127 117440 344802 168 160 128 104128 190943 163 158 129 134238 396160 167 161 130 134047 314212 145 165 131 279488 396712 175 246 132 79756 187992 137 89 133 66089 102424 100 49 134 102070 283392 150 107 135 146760 401260 163 182 136 154771 135936 137 16 137 165933 373146 149 173 138 64593 157429 112 90 139 92280 236370 135 140 140 67150 258959 114 142 141 128692 214338 45 126 142 124089 363154 120 123 143 125386 232339 115 239 144 37238 173260 78 15 145 140015 317676 136 170 146 150047 168994 179 123 147 154451 233293 118 151 148 156349 301585 147 194 149 0 1 0 0 150 6023 14688 0 5 151 0 98 0 0 152 0 455 0 0 153 0 0 0 0 154 0 0 0 0 155 84601 216803 88 122 156 68946 365230 115 173 157 0 0 0 0 158 0 203 0 0 159 1644 7199 0 6 160 6179 46660 13 13 161 3926 17547 4 3 162 52789 116678 76 35 163 0 969 0 0 164 100350 195592 63 72 #Compendium_views(PR) 1 90 2 63 3 59 4 135 5 48 6 46 7 109 8 46 9 75 10 72 11 78 12 61 13 58 14 114 15 45 16 127 17 58 18 90 19 41 20 59 21 99 22 101 23 62 24 65 25 150 26 72 27 91 28 60 29 53 30 140 31 49 32 81 33 53 34 40 35 72 36 87 37 72 38 67 39 36 40 45 41 42 42 70 43 82 44 85 45 82 46 792 47 57 48 80 49 116 50 68 51 48 52 20 53 81 54 21 55 70 56 124 57 80 58 206 59 62 60 77 61 65 62 146 63 71 64 59 65 58 66 58 67 54 68 89 69 78 70 62 71 63 72 39 73 58 74 94 75 61 76 92 77 48 78 50 79 58 80 67 81 41 82 114 83 45 84 57 85 31 86 175 87 63 88 278 89 91 90 68 91 58 92 71 93 86 94 89 95 134 96 64 97 72 98 61 99 123 100 73 101 80 102 85 103 116 104 43 105 85 106 72 107 110 108 55 109 44 110 79 111 58 112 70 113 9 114 49 115 25 116 107 117 63 118 2 119 67 120 22 121 152 122 78 123 112 124 47 125 52 126 108 127 110 128 61 129 134 130 120 131 111 132 49 133 55 134 149 135 155 136 103 137 142 138 76 139 83 140 185 141 69 142 117 143 63 144 37 145 56 146 122 147 52 148 64 149 0 150 0 151 0 152 0 153 0 154 0 155 58 156 109 157 0 158 0 159 0 160 7 161 3 162 89 163 0 164 46 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Totale_tijd_RFC 6.104e+03 5.263e-02 `#Feedback_Messages(+120karakters)` `#Blogs` 3.084e+02 3.888e+02 `#Compendium_views(PR)` 1.641e+01 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -60896 -17959 -6285 10102 168960 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.104e+03 5.892e+03 1.036 0.302 Totale_tijd_RFC 5.263e-02 4.498e-02 1.170 0.244 `#Feedback_Messages(+120karakters)` 3.084e+02 7.386e+01 4.175 4.89e-05 *** `#Blogs` 3.888e+02 6.582e+01 5.907 2.05e-08 *** `#Compendium_views(PR)` 1.641e+01 4.146e+01 0.396 0.693 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 30880 on 159 degrees of freedom Multiple R-squared: 0.6561, Adjusted R-squared: 0.6474 F-statistic: 75.82 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,] 2.647971e-01 5.295942e-01 7.352029e-01 [2,] 2.874201e-01 5.748403e-01 7.125799e-01 [3,] 2.698695e-01 5.397391e-01 7.301305e-01 [4,] 6.355893e-01 7.288214e-01 3.644107e-01 [5,] 5.389255e-01 9.221490e-01 4.610745e-01 [6,] 4.281721e-01 8.563442e-01 5.718279e-01 [7,] 3.890286e-01 7.780572e-01 6.109714e-01 [8,] 3.374436e-01 6.748873e-01 6.625564e-01 [9,] 2.594444e-01 5.188888e-01 7.405556e-01 [10,] 2.042691e-01 4.085382e-01 7.957309e-01 [11,] 1.771245e-01 3.542491e-01 8.228755e-01 [12,] 1.295287e-01 2.590573e-01 8.704713e-01 [13,] 9.105392e-02 1.821078e-01 9.089461e-01 [14,] 6.334746e-02 1.266949e-01 9.366525e-01 [15,] 5.238907e-02 1.047781e-01 9.476109e-01 [16,] 3.841768e-02 7.683535e-02 9.615823e-01 [17,] 3.462648e-02 6.925297e-02 9.653735e-01 [18,] 2.932669e-02 5.865338e-02 9.706733e-01 [19,] 1.953560e-02 3.907120e-02 9.804644e-01 [20,] 1.330785e-02 2.661571e-02 9.866921e-01 [21,] 1.296343e-02 2.592685e-02 9.870366e-01 [22,] 1.357801e-02 2.715602e-02 9.864220e-01 [23,] 8.683663e-03 1.736733e-02 9.913163e-01 [24,] 6.136728e-03 1.227346e-02 9.938633e-01 [25,] 9.162434e-03 1.832487e-02 9.908376e-01 [26,] 7.583879e-03 1.516776e-02 9.924161e-01 [27,] 8.021781e-03 1.604356e-02 9.919782e-01 [28,] 7.479353e-03 1.495871e-02 9.925206e-01 [29,] 5.182731e-03 1.036546e-02 9.948173e-01 [30,] 3.447146e-03 6.894292e-03 9.965529e-01 [31,] 2.915988e-03 5.831977e-03 9.970840e-01 [32,] 2.197643e-03 4.395286e-03 9.978024e-01 [33,] 1.727729e-03 3.455458e-03 9.982723e-01 [34,] 1.192785e-03 2.385570e-03 9.988072e-01 [35,] 7.435756e-04 1.487151e-03 9.992564e-01 [36,] 5.441169e-04 1.088234e-03 9.994559e-01 [37,] 3.436360e-04 6.872719e-04 9.996564e-01 [38,] 6.545990e-04 1.309198e-03 9.993454e-01 [39,] 4.295768e-04 8.591537e-04 9.995704e-01 [40,] 2.632265e-04 5.264529e-04 9.997368e-01 [41,] 2.534032e-04 5.068064e-04 9.997466e-01 [42,] 2.020464e-04 4.040928e-04 9.997980e-01 [43,] 1.490190e-04 2.980379e-04 9.998510e-01 [44,] 9.329169e-05 1.865834e-04 9.999067e-01 [45,] 7.049383e-05 1.409877e-04 9.999295e-01 [46,] 6.004708e-05 1.200942e-04 9.999400e-01 [47,] 3.492376e-05 6.984752e-05 9.999651e-01 [48,] 2.213806e-05 4.427613e-05 9.999779e-01 [49,] 1.345642e-05 2.691285e-05 9.999865e-01 [50,] 2.342921e-05 4.685841e-05 9.999766e-01 [51,] 2.114047e-05 4.228094e-05 9.999789e-01 [52,] 1.718690e-05 3.437380e-05 9.999828e-01 [53,] 1.012803e-05 2.025606e-05 9.999899e-01 [54,] 7.197493e-06 1.439499e-05 9.999928e-01 [55,] 5.544705e-06 1.108941e-05 9.999945e-01 [56,] 4.113404e-06 8.226807e-06 9.999959e-01 [57,] 2.439842e-06 4.879684e-06 9.999976e-01 [58,] 1.488651e-06 2.977303e-06 9.999985e-01 [59,] 1.238702e-06 2.477403e-06 9.999988e-01 [60,] 1.522393e-06 3.044785e-06 9.999985e-01 [61,] 1.290095e-06 2.580190e-06 9.999987e-01 [62,] 7.103963e-07 1.420793e-06 9.999993e-01 [63,] 2.538818e-06 5.077637e-06 9.999975e-01 [64,] 2.330625e-06 4.661250e-06 9.999977e-01 [65,] 1.652758e-06 3.305517e-06 9.999983e-01 [66,] 1.638164e-06 3.276328e-06 9.999984e-01 [67,] 9.199310e-07 1.839862e-06 9.999991e-01 [68,] 9.613387e-07 1.922677e-06 9.999990e-01 [69,] 5.697382e-07 1.139476e-06 9.999994e-01 [70,] 3.497559e-07 6.995118e-07 9.999997e-01 [71,] 1.910986e-01 3.821971e-01 8.089014e-01 [72,] 1.982938e-01 3.965876e-01 8.017062e-01 [73,] 1.815748e-01 3.631496e-01 8.184252e-01 [74,] 1.595630e-01 3.191260e-01 8.404370e-01 [75,] 1.512967e-01 3.025935e-01 8.487033e-01 [76,] 1.456682e-01 2.913364e-01 8.543318e-01 [77,] 1.247704e-01 2.495408e-01 8.752296e-01 [78,] 1.071873e-01 2.143746e-01 8.928127e-01 [79,] 1.065361e-01 2.130721e-01 8.934639e-01 [80,] 1.043714e-01 2.087428e-01 8.956286e-01 [81,] 9.292142e-02 1.858428e-01 9.070786e-01 [82,] 7.578006e-02 1.515601e-01 9.242199e-01 [83,] 6.794752e-02 1.358950e-01 9.320525e-01 [84,] 6.758549e-02 1.351710e-01 9.324145e-01 [85,] 5.575130e-02 1.115026e-01 9.442487e-01 [86,] 4.673969e-02 9.347939e-02 9.532603e-01 [87,] 6.790077e-02 1.358015e-01 9.320992e-01 [88,] 6.622658e-02 1.324532e-01 9.337734e-01 [89,] 6.878773e-02 1.375755e-01 9.312123e-01 [90,] 8.221313e-02 1.644263e-01 9.177869e-01 [91,] 1.073400e-01 2.146799e-01 8.926600e-01 [92,] 9.855469e-02 1.971094e-01 9.014453e-01 [93,] 8.980683e-02 1.796137e-01 9.101932e-01 [94,] 7.938233e-02 1.587647e-01 9.206177e-01 [95,] 6.495265e-02 1.299053e-01 9.350474e-01 [96,] 5.264520e-02 1.052904e-01 9.473548e-01 [97,] 4.178904e-02 8.357809e-02 9.582110e-01 [98,] 3.428193e-02 6.856387e-02 9.657181e-01 [99,] 2.897718e-02 5.795437e-02 9.710228e-01 [100,] 2.224149e-02 4.448297e-02 9.777585e-01 [101,] 1.958761e-02 3.917523e-02 9.804124e-01 [102,] 4.841137e-01 9.682274e-01 5.158863e-01 [103,] 6.936797e-01 6.126405e-01 3.063203e-01 [104,] 6.805405e-01 6.389190e-01 3.194595e-01 [105,] 6.382737e-01 7.234525e-01 3.617263e-01 [106,] 5.962740e-01 8.074519e-01 4.037260e-01 [107,] 5.564948e-01 8.870103e-01 4.435052e-01 [108,] 5.076991e-01 9.846018e-01 4.923009e-01 [109,] 5.752503e-01 8.494995e-01 4.247497e-01 [110,] 5.774022e-01 8.451956e-01 4.225978e-01 [111,] 5.294498e-01 9.411005e-01 4.705502e-01 [112,] 4.953845e-01 9.907690e-01 5.046155e-01 [113,] 4.475750e-01 8.951500e-01 5.524250e-01 [114,] 4.236985e-01 8.473969e-01 5.763015e-01 [115,] 3.814689e-01 7.629378e-01 6.185311e-01 [116,] 3.744736e-01 7.489471e-01 6.255264e-01 [117,] 5.171243e-01 9.657514e-01 4.828757e-01 [118,] 4.666028e-01 9.332055e-01 5.333972e-01 [119,] 4.165756e-01 8.331512e-01 5.834244e-01 [120,] 4.213554e-01 8.427107e-01 5.786446e-01 [121,] 4.584229e-01 9.168457e-01 5.415771e-01 [122,] 4.262350e-01 8.524699e-01 5.737650e-01 [123,] 3.729230e-01 7.458460e-01 6.270770e-01 [124,] 8.462924e-01 3.074152e-01 1.537076e-01 [125,] 8.645129e-01 2.709742e-01 1.354871e-01 [126,] 8.364027e-01 3.271946e-01 1.635973e-01 [127,] 8.141106e-01 3.717787e-01 1.858894e-01 [128,] 7.696163e-01 4.607674e-01 2.303837e-01 [129,] 9.433982e-01 1.132036e-01 5.660181e-02 [130,] 9.464661e-01 1.070678e-01 5.353389e-02 [131,] 9.384607e-01 1.230787e-01 6.153935e-02 [132,] 9.414445e-01 1.171111e-01 5.855554e-02 [133,] 9.472930e-01 1.054140e-01 5.270699e-02 [134,] 9.975846e-01 4.830809e-03 2.415405e-03 [135,] 9.987618e-01 2.476498e-03 1.238249e-03 [136,] 9.983708e-01 3.258464e-03 1.629232e-03 [137,] 9.997660e-01 4.680964e-04 2.340482e-04 [138,] 9.999927e-01 1.450437e-05 7.252186e-06 [139,] 9.999856e-01 2.870663e-05 1.435331e-05 [140,] 9.999958e-01 8.313709e-06 4.156855e-06 [141,] 9.999922e-01 1.552412e-05 7.762058e-06 [142,] 9.999681e-01 6.385216e-05 3.192608e-05 [143,] 9.999043e-01 1.913215e-04 9.566077e-05 [144,] 9.996355e-01 7.289084e-04 3.644542e-04 [145,] 9.986832e-01 2.633626e-03 1.316813e-03 [146,] 9.955515e-01 8.896991e-03 4.448496e-03 [147,] 9.859979e-01 2.800426e-02 1.400213e-02 [148,] 9.848596e-01 3.028071e-02 1.514036e-02 [149,] 9.893568e-01 2.128637e-02 1.064319e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1osox1324314933.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/wessaorg/rcomp/tmp/2118s1324314933.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/wessaorg/rcomp/tmp/3drog1324314933.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/wessaorg/rcomp/tmp/418pj1324314933.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/wessaorg/rcomp/tmp/5i08n1324314933.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 6 19107.7854 3541.8473 6569.4603 -5109.2772 -18578.0379 19865.9032 7 8 9 10 11 12 47592.7620 5473.1841 41843.2050 -12999.4474 -43580.6034 -30794.8555 13 14 15 16 17 18 -6415.1932 -30291.4952 -13944.1506 -29277.2125 27226.4211 28614.8295 19 20 21 22 23 24 20963.5506 -9934.4060 -12262.1625 -24793.3113 13162.5412 -10224.3061 25 26 27 28 29 30 -32111.5479 -1003.6636 -11350.2986 -28238.6215 -34260.0333 -7154.4102 31 32 33 34 35 36 7978.3999 -35844.5409 -28149.1308 3448.5920 -23671.9228 -21573.0245 37 38 39 40 41 42 -16301.2102 -17818.3742 -11817.4388 -22228.2156 -16677.9887 -8361.9603 43 44 45 46 47 48 8755.1145 -18567.9991 44223.9022 6973.6138 -6672.2614 -38014.5664 49 50 51 52 53 54 9138.9083 -23936.2158 -13282.1742 -6635.7472 12824.9430 -4296.0027 55 56 57 58 59 60 -7124.1614 -10957.1039 16533.7845 -14317.9978 -23110.2251 -2511.9035 61 62 63 64 65 66 9427.7421 25812.4221 -19688.8328 -8481.3920 5842.3854 -20172.1059 67 68 69 70 71 72 26582.9013 -27273.4346 -1546.1756 45368.4998 -28249.8034 -18379.1118 73 74 75 76 77 78 -27508.8547 -2182.1164 -28871.9564 -7131.7770 -7748.0558 168960.0089 79 80 81 82 83 84 -29339.2729 -17717.5059 -10106.2037 25964.0931 -21133.8426 -9173.4095 85 86 87 88 89 90 14871.2774 -35026.7439 27516.1292 5664.9764 -1737.8998 20074.1750 91 92 93 94 95 96 -27078.0389 -6819.6431 -15446.2453 -44621.9497 26090.0286 35569.6440 97 98 99 100 101 102 44295.4724 48033.2291 -4680.5512 8806.6980 19901.0729 8652.0078 103 104 105 106 107 108 -6028.4850 -4125.6976 -12206.3406 -19839.8096 -3235.2230 -12553.0075 109 110 111 112 113 114 135751.0533 79067.6613 37872.5234 -3779.6370 -10604.2013 -12431.2106 115 116 117 118 119 120 -4745.9106 -46721.2068 -32259.1640 -7945.4333 19413.9779 -11970.5099 121 122 123 124 125 126 -23112.9281 21306.0850 37957.7687 61860.2747 -12892.4842 14614.3414 127 128 129 130 131 132 -22632.3614 -24723.6092 -9011.4559 568.9095 101070.4908 -13897.4325 133 134 135 136 137 138 3802.7915 -9252.4016 -4034.0747 91354.7871 24648.3487 -20574.4984 139 140 141 142 143 144 -23690.2220 -45984.4235 47307.8015 12123.9741 -22369.3461 -8476.9193 145 146 147 148 149 150 8235.9282 30024.3225 40116.6657 12561.8320 -6104.3732 -2798.4047 151 152 153 154 155 156 -6109.4782 -6128.2664 -6104.3206 -6104.3206 -8437.1328 -60895.9936 157 158 159 160 161 162 -6104.3206 -6115.0041 -7172.0893 -11559.2361 -5550.9412 2039.1174 163 164 -6155.3172 35775.1487 > postscript(file="/var/wessaorg/rcomp/tmp/6oksf1324314933.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 19107.7854 NA 1 3541.8473 19107.7854 2 6569.4603 3541.8473 3 -5109.2772 6569.4603 4 -18578.0379 -5109.2772 5 19865.9032 -18578.0379 6 47592.7620 19865.9032 7 5473.1841 47592.7620 8 41843.2050 5473.1841 9 -12999.4474 41843.2050 10 -43580.6034 -12999.4474 11 -30794.8555 -43580.6034 12 -6415.1932 -30794.8555 13 -30291.4952 -6415.1932 14 -13944.1506 -30291.4952 15 -29277.2125 -13944.1506 16 27226.4211 -29277.2125 17 28614.8295 27226.4211 18 20963.5506 28614.8295 19 -9934.4060 20963.5506 20 -12262.1625 -9934.4060 21 -24793.3113 -12262.1625 22 13162.5412 -24793.3113 23 -10224.3061 13162.5412 24 -32111.5479 -10224.3061 25 -1003.6636 -32111.5479 26 -11350.2986 -1003.6636 27 -28238.6215 -11350.2986 28 -34260.0333 -28238.6215 29 -7154.4102 -34260.0333 30 7978.3999 -7154.4102 31 -35844.5409 7978.3999 32 -28149.1308 -35844.5409 33 3448.5920 -28149.1308 34 -23671.9228 3448.5920 35 -21573.0245 -23671.9228 36 -16301.2102 -21573.0245 37 -17818.3742 -16301.2102 38 -11817.4388 -17818.3742 39 -22228.2156 -11817.4388 40 -16677.9887 -22228.2156 41 -8361.9603 -16677.9887 42 8755.1145 -8361.9603 43 -18567.9991 8755.1145 44 44223.9022 -18567.9991 45 6973.6138 44223.9022 46 -6672.2614 6973.6138 47 -38014.5664 -6672.2614 48 9138.9083 -38014.5664 49 -23936.2158 9138.9083 50 -13282.1742 -23936.2158 51 -6635.7472 -13282.1742 52 12824.9430 -6635.7472 53 -4296.0027 12824.9430 54 -7124.1614 -4296.0027 55 -10957.1039 -7124.1614 56 16533.7845 -10957.1039 57 -14317.9978 16533.7845 58 -23110.2251 -14317.9978 59 -2511.9035 -23110.2251 60 9427.7421 -2511.9035 61 25812.4221 9427.7421 62 -19688.8328 25812.4221 63 -8481.3920 -19688.8328 64 5842.3854 -8481.3920 65 -20172.1059 5842.3854 66 26582.9013 -20172.1059 67 -27273.4346 26582.9013 68 -1546.1756 -27273.4346 69 45368.4998 -1546.1756 70 -28249.8034 45368.4998 71 -18379.1118 -28249.8034 72 -27508.8547 -18379.1118 73 -2182.1164 -27508.8547 74 -28871.9564 -2182.1164 75 -7131.7770 -28871.9564 76 -7748.0558 -7131.7770 77 168960.0089 -7748.0558 78 -29339.2729 168960.0089 79 -17717.5059 -29339.2729 80 -10106.2037 -17717.5059 81 25964.0931 -10106.2037 82 -21133.8426 25964.0931 83 -9173.4095 -21133.8426 84 14871.2774 -9173.4095 85 -35026.7439 14871.2774 86 27516.1292 -35026.7439 87 5664.9764 27516.1292 88 -1737.8998 5664.9764 89 20074.1750 -1737.8998 90 -27078.0389 20074.1750 91 -6819.6431 -27078.0389 92 -15446.2453 -6819.6431 93 -44621.9497 -15446.2453 94 26090.0286 -44621.9497 95 35569.6440 26090.0286 96 44295.4724 35569.6440 97 48033.2291 44295.4724 98 -4680.5512 48033.2291 99 8806.6980 -4680.5512 100 19901.0729 8806.6980 101 8652.0078 19901.0729 102 -6028.4850 8652.0078 103 -4125.6976 -6028.4850 104 -12206.3406 -4125.6976 105 -19839.8096 -12206.3406 106 -3235.2230 -19839.8096 107 -12553.0075 -3235.2230 108 135751.0533 -12553.0075 109 79067.6613 135751.0533 110 37872.5234 79067.6613 111 -3779.6370 37872.5234 112 -10604.2013 -3779.6370 113 -12431.2106 -10604.2013 114 -4745.9106 -12431.2106 115 -46721.2068 -4745.9106 116 -32259.1640 -46721.2068 117 -7945.4333 -32259.1640 118 19413.9779 -7945.4333 119 -11970.5099 19413.9779 120 -23112.9281 -11970.5099 121 21306.0850 -23112.9281 122 37957.7687 21306.0850 123 61860.2747 37957.7687 124 -12892.4842 61860.2747 125 14614.3414 -12892.4842 126 -22632.3614 14614.3414 127 -24723.6092 -22632.3614 128 -9011.4559 -24723.6092 129 568.9095 -9011.4559 130 101070.4908 568.9095 131 -13897.4325 101070.4908 132 3802.7915 -13897.4325 133 -9252.4016 3802.7915 134 -4034.0747 -9252.4016 135 91354.7871 -4034.0747 136 24648.3487 91354.7871 137 -20574.4984 24648.3487 138 -23690.2220 -20574.4984 139 -45984.4235 -23690.2220 140 47307.8015 -45984.4235 141 12123.9741 47307.8015 142 -22369.3461 12123.9741 143 -8476.9193 -22369.3461 144 8235.9282 -8476.9193 145 30024.3225 8235.9282 146 40116.6657 30024.3225 147 12561.8320 40116.6657 148 -6104.3732 12561.8320 149 -2798.4047 -6104.3732 150 -6109.4782 -2798.4047 151 -6128.2664 -6109.4782 152 -6104.3206 -6128.2664 153 -6104.3206 -6104.3206 154 -8437.1328 -6104.3206 155 -60895.9936 -8437.1328 156 -6104.3206 -60895.9936 157 -6115.0041 -6104.3206 158 -7172.0893 -6115.0041 159 -11559.2361 -7172.0893 160 -5550.9412 -11559.2361 161 2039.1174 -5550.9412 162 -6155.3172 2039.1174 163 35775.1487 -6155.3172 164 NA 35775.1487 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3541.8473 19107.7854 [2,] 6569.4603 3541.8473 [3,] -5109.2772 6569.4603 [4,] -18578.0379 -5109.2772 [5,] 19865.9032 -18578.0379 [6,] 47592.7620 19865.9032 [7,] 5473.1841 47592.7620 [8,] 41843.2050 5473.1841 [9,] -12999.4474 41843.2050 [10,] -43580.6034 -12999.4474 [11,] -30794.8555 -43580.6034 [12,] -6415.1932 -30794.8555 [13,] -30291.4952 -6415.1932 [14,] -13944.1506 -30291.4952 [15,] -29277.2125 -13944.1506 [16,] 27226.4211 -29277.2125 [17,] 28614.8295 27226.4211 [18,] 20963.5506 28614.8295 [19,] -9934.4060 20963.5506 [20,] -12262.1625 -9934.4060 [21,] -24793.3113 -12262.1625 [22,] 13162.5412 -24793.3113 [23,] -10224.3061 13162.5412 [24,] -32111.5479 -10224.3061 [25,] -1003.6636 -32111.5479 [26,] -11350.2986 -1003.6636 [27,] -28238.6215 -11350.2986 [28,] -34260.0333 -28238.6215 [29,] -7154.4102 -34260.0333 [30,] 7978.3999 -7154.4102 [31,] -35844.5409 7978.3999 [32,] -28149.1308 -35844.5409 [33,] 3448.5920 -28149.1308 [34,] -23671.9228 3448.5920 [35,] -21573.0245 -23671.9228 [36,] -16301.2102 -21573.0245 [37,] -17818.3742 -16301.2102 [38,] -11817.4388 -17818.3742 [39,] -22228.2156 -11817.4388 [40,] -16677.9887 -22228.2156 [41,] -8361.9603 -16677.9887 [42,] 8755.1145 -8361.9603 [43,] -18567.9991 8755.1145 [44,] 44223.9022 -18567.9991 [45,] 6973.6138 44223.9022 [46,] -6672.2614 6973.6138 [47,] -38014.5664 -6672.2614 [48,] 9138.9083 -38014.5664 [49,] -23936.2158 9138.9083 [50,] -13282.1742 -23936.2158 [51,] -6635.7472 -13282.1742 [52,] 12824.9430 -6635.7472 [53,] -4296.0027 12824.9430 [54,] -7124.1614 -4296.0027 [55,] -10957.1039 -7124.1614 [56,] 16533.7845 -10957.1039 [57,] -14317.9978 16533.7845 [58,] -23110.2251 -14317.9978 [59,] -2511.9035 -23110.2251 [60,] 9427.7421 -2511.9035 [61,] 25812.4221 9427.7421 [62,] -19688.8328 25812.4221 [63,] -8481.3920 -19688.8328 [64,] 5842.3854 -8481.3920 [65,] -20172.1059 5842.3854 [66,] 26582.9013 -20172.1059 [67,] -27273.4346 26582.9013 [68,] -1546.1756 -27273.4346 [69,] 45368.4998 -1546.1756 [70,] -28249.8034 45368.4998 [71,] -18379.1118 -28249.8034 [72,] -27508.8547 -18379.1118 [73,] -2182.1164 -27508.8547 [74,] -28871.9564 -2182.1164 [75,] -7131.7770 -28871.9564 [76,] -7748.0558 -7131.7770 [77,] 168960.0089 -7748.0558 [78,] -29339.2729 168960.0089 [79,] -17717.5059 -29339.2729 [80,] -10106.2037 -17717.5059 [81,] 25964.0931 -10106.2037 [82,] -21133.8426 25964.0931 [83,] -9173.4095 -21133.8426 [84,] 14871.2774 -9173.4095 [85,] -35026.7439 14871.2774 [86,] 27516.1292 -35026.7439 [87,] 5664.9764 27516.1292 [88,] -1737.8998 5664.9764 [89,] 20074.1750 -1737.8998 [90,] -27078.0389 20074.1750 [91,] -6819.6431 -27078.0389 [92,] -15446.2453 -6819.6431 [93,] -44621.9497 -15446.2453 [94,] 26090.0286 -44621.9497 [95,] 35569.6440 26090.0286 [96,] 44295.4724 35569.6440 [97,] 48033.2291 44295.4724 [98,] -4680.5512 48033.2291 [99,] 8806.6980 -4680.5512 [100,] 19901.0729 8806.6980 [101,] 8652.0078 19901.0729 [102,] -6028.4850 8652.0078 [103,] -4125.6976 -6028.4850 [104,] -12206.3406 -4125.6976 [105,] -19839.8096 -12206.3406 [106,] -3235.2230 -19839.8096 [107,] -12553.0075 -3235.2230 [108,] 135751.0533 -12553.0075 [109,] 79067.6613 135751.0533 [110,] 37872.5234 79067.6613 [111,] -3779.6370 37872.5234 [112,] -10604.2013 -3779.6370 [113,] -12431.2106 -10604.2013 [114,] -4745.9106 -12431.2106 [115,] -46721.2068 -4745.9106 [116,] -32259.1640 -46721.2068 [117,] -7945.4333 -32259.1640 [118,] 19413.9779 -7945.4333 [119,] -11970.5099 19413.9779 [120,] -23112.9281 -11970.5099 [121,] 21306.0850 -23112.9281 [122,] 37957.7687 21306.0850 [123,] 61860.2747 37957.7687 [124,] -12892.4842 61860.2747 [125,] 14614.3414 -12892.4842 [126,] -22632.3614 14614.3414 [127,] -24723.6092 -22632.3614 [128,] -9011.4559 -24723.6092 [129,] 568.9095 -9011.4559 [130,] 101070.4908 568.9095 [131,] -13897.4325 101070.4908 [132,] 3802.7915 -13897.4325 [133,] -9252.4016 3802.7915 [134,] -4034.0747 -9252.4016 [135,] 91354.7871 -4034.0747 [136,] 24648.3487 91354.7871 [137,] -20574.4984 24648.3487 [138,] -23690.2220 -20574.4984 [139,] -45984.4235 -23690.2220 [140,] 47307.8015 -45984.4235 [141,] 12123.9741 47307.8015 [142,] -22369.3461 12123.9741 [143,] -8476.9193 -22369.3461 [144,] 8235.9282 -8476.9193 [145,] 30024.3225 8235.9282 [146,] 40116.6657 30024.3225 [147,] 12561.8320 40116.6657 [148,] -6104.3732 12561.8320 [149,] -2798.4047 -6104.3732 [150,] -6109.4782 -2798.4047 [151,] -6128.2664 -6109.4782 [152,] -6104.3206 -6128.2664 [153,] -6104.3206 -6104.3206 [154,] -8437.1328 -6104.3206 [155,] -60895.9936 -8437.1328 [156,] -6104.3206 -60895.9936 [157,] -6115.0041 -6104.3206 [158,] -7172.0893 -6115.0041 [159,] -11559.2361 -7172.0893 [160,] -5550.9412 -11559.2361 [161,] 2039.1174 -5550.9412 [162,] -6155.3172 2039.1174 [163,] 35775.1487 -6155.3172 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3541.8473 19107.7854 2 6569.4603 3541.8473 3 -5109.2772 6569.4603 4 -18578.0379 -5109.2772 5 19865.9032 -18578.0379 6 47592.7620 19865.9032 7 5473.1841 47592.7620 8 41843.2050 5473.1841 9 -12999.4474 41843.2050 10 -43580.6034 -12999.4474 11 -30794.8555 -43580.6034 12 -6415.1932 -30794.8555 13 -30291.4952 -6415.1932 14 -13944.1506 -30291.4952 15 -29277.2125 -13944.1506 16 27226.4211 -29277.2125 17 28614.8295 27226.4211 18 20963.5506 28614.8295 19 -9934.4060 20963.5506 20 -12262.1625 -9934.4060 21 -24793.3113 -12262.1625 22 13162.5412 -24793.3113 23 -10224.3061 13162.5412 24 -32111.5479 -10224.3061 25 -1003.6636 -32111.5479 26 -11350.2986 -1003.6636 27 -28238.6215 -11350.2986 28 -34260.0333 -28238.6215 29 -7154.4102 -34260.0333 30 7978.3999 -7154.4102 31 -35844.5409 7978.3999 32 -28149.1308 -35844.5409 33 3448.5920 -28149.1308 34 -23671.9228 3448.5920 35 -21573.0245 -23671.9228 36 -16301.2102 -21573.0245 37 -17818.3742 -16301.2102 38 -11817.4388 -17818.3742 39 -22228.2156 -11817.4388 40 -16677.9887 -22228.2156 41 -8361.9603 -16677.9887 42 8755.1145 -8361.9603 43 -18567.9991 8755.1145 44 44223.9022 -18567.9991 45 6973.6138 44223.9022 46 -6672.2614 6973.6138 47 -38014.5664 -6672.2614 48 9138.9083 -38014.5664 49 -23936.2158 9138.9083 50 -13282.1742 -23936.2158 51 -6635.7472 -13282.1742 52 12824.9430 -6635.7472 53 -4296.0027 12824.9430 54 -7124.1614 -4296.0027 55 -10957.1039 -7124.1614 56 16533.7845 -10957.1039 57 -14317.9978 16533.7845 58 -23110.2251 -14317.9978 59 -2511.9035 -23110.2251 60 9427.7421 -2511.9035 61 25812.4221 9427.7421 62 -19688.8328 25812.4221 63 -8481.3920 -19688.8328 64 5842.3854 -8481.3920 65 -20172.1059 5842.3854 66 26582.9013 -20172.1059 67 -27273.4346 26582.9013 68 -1546.1756 -27273.4346 69 45368.4998 -1546.1756 70 -28249.8034 45368.4998 71 -18379.1118 -28249.8034 72 -27508.8547 -18379.1118 73 -2182.1164 -27508.8547 74 -28871.9564 -2182.1164 75 -7131.7770 -28871.9564 76 -7748.0558 -7131.7770 77 168960.0089 -7748.0558 78 -29339.2729 168960.0089 79 -17717.5059 -29339.2729 80 -10106.2037 -17717.5059 81 25964.0931 -10106.2037 82 -21133.8426 25964.0931 83 -9173.4095 -21133.8426 84 14871.2774 -9173.4095 85 -35026.7439 14871.2774 86 27516.1292 -35026.7439 87 5664.9764 27516.1292 88 -1737.8998 5664.9764 89 20074.1750 -1737.8998 90 -27078.0389 20074.1750 91 -6819.6431 -27078.0389 92 -15446.2453 -6819.6431 93 -44621.9497 -15446.2453 94 26090.0286 -44621.9497 95 35569.6440 26090.0286 96 44295.4724 35569.6440 97 48033.2291 44295.4724 98 -4680.5512 48033.2291 99 8806.6980 -4680.5512 100 19901.0729 8806.6980 101 8652.0078 19901.0729 102 -6028.4850 8652.0078 103 -4125.6976 -6028.4850 104 -12206.3406 -4125.6976 105 -19839.8096 -12206.3406 106 -3235.2230 -19839.8096 107 -12553.0075 -3235.2230 108 135751.0533 -12553.0075 109 79067.6613 135751.0533 110 37872.5234 79067.6613 111 -3779.6370 37872.5234 112 -10604.2013 -3779.6370 113 -12431.2106 -10604.2013 114 -4745.9106 -12431.2106 115 -46721.2068 -4745.9106 116 -32259.1640 -46721.2068 117 -7945.4333 -32259.1640 118 19413.9779 -7945.4333 119 -11970.5099 19413.9779 120 -23112.9281 -11970.5099 121 21306.0850 -23112.9281 122 37957.7687 21306.0850 123 61860.2747 37957.7687 124 -12892.4842 61860.2747 125 14614.3414 -12892.4842 126 -22632.3614 14614.3414 127 -24723.6092 -22632.3614 128 -9011.4559 -24723.6092 129 568.9095 -9011.4559 130 101070.4908 568.9095 131 -13897.4325 101070.4908 132 3802.7915 -13897.4325 133 -9252.4016 3802.7915 134 -4034.0747 -9252.4016 135 91354.7871 -4034.0747 136 24648.3487 91354.7871 137 -20574.4984 24648.3487 138 -23690.2220 -20574.4984 139 -45984.4235 -23690.2220 140 47307.8015 -45984.4235 141 12123.9741 47307.8015 142 -22369.3461 12123.9741 143 -8476.9193 -22369.3461 144 8235.9282 -8476.9193 145 30024.3225 8235.9282 146 40116.6657 30024.3225 147 12561.8320 40116.6657 148 -6104.3732 12561.8320 149 -2798.4047 -6104.3732 150 -6109.4782 -2798.4047 151 -6128.2664 -6109.4782 152 -6104.3206 -6128.2664 153 -6104.3206 -6104.3206 154 -8437.1328 -6104.3206 155 -60895.9936 -8437.1328 156 -6104.3206 -60895.9936 157 -6115.0041 -6104.3206 158 -7172.0893 -6115.0041 159 -11559.2361 -7172.0893 160 -5550.9412 -11559.2361 161 2039.1174 -5550.9412 162 -6155.3172 2039.1174 163 35775.1487 -6155.3172 > 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/wessaorg/rcomp/tmp/7v4ho1324314933.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/wessaorg/rcomp/tmp/8hjl61324314933.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/wessaorg/rcomp/tmp/9b93c1324314933.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/wessaorg/rcomp/tmp/10ac5o1324314933.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/113t451324314933.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/wessaorg/rcomp/tmp/122tok1324314933.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/wessaorg/rcomp/tmp/13ux7j1324314933.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/wessaorg/rcomp/tmp/14h0yc1324314933.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/wessaorg/rcomp/tmp/154f1m1324314933.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/wessaorg/rcomp/tmp/16yns91324314933.tab") + } > > try(system("convert tmp/1osox1324314933.ps tmp/1osox1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/2118s1324314933.ps tmp/2118s1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/3drog1324314933.ps tmp/3drog1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/418pj1324314933.ps tmp/418pj1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/5i08n1324314933.ps tmp/5i08n1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/6oksf1324314933.ps tmp/6oksf1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/7v4ho1324314933.ps tmp/7v4ho1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/8hjl61324314933.ps tmp/8hjl61324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/9b93c1324314933.ps tmp/9b93c1324314933.png",intern=TRUE)) character(0) > try(system("convert tmp/10ac5o1324314933.ps tmp/10ac5o1324314933.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.088 0.748 5.843