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(65 + ,44 + ,21387 + ,68 + ,127 + ,1 + ,54 + ,48 + ,12341 + ,72 + ,90 + ,4 + ,58 + ,37 + ,11397 + ,37 + ,68 + ,9 + ,75 + ,68 + ,25533 + ,70 + ,111 + ,2 + ,41 + ,29 + ,6630 + ,30 + ,51 + ,1 + ,0 + ,17 + ,7745 + ,53 + ,33 + ,2 + ,111 + ,77 + ,25304 + ,74 + ,123 + ,0 + ,1 + ,16 + ,1271 + ,22 + ,5 + ,0 + ,36 + ,35 + ,18035 + ,68 + ,63 + ,5 + ,60 + ,24 + ,13284 + ,47 + ,66 + ,0 + ,63 + ,60 + ,15628 + ,87 + ,99 + ,0 + ,71 + ,72 + ,13990 + ,123 + ,72 + ,7 + ,38 + ,41 + ,8532 + ,69 + ,55 + ,6 + ,76 + ,39 + ,13953 + ,89 + ,116 + ,3 + ,61 + ,51 + ,7210 + ,45 + ,71 + ,4 + ,125 + ,100 + ,22436 + ,122 + ,125 + ,0 + ,84 + ,39 + ,20238 + ,75 + ,123 + ,4 + ,69 + ,97 + ,10244 + ,45 + ,74 + ,3 + ,77 + ,34 + ,17390 + ,53 + ,116 + ,0 + ,95 + ,47 + ,9917 + ,86 + ,117 + ,5 + ,78 + ,45 + ,29625 + ,82 + ,98 + ,0 + ,76 + ,54 + ,13193 + ,76 + ,101 + ,1 + ,40 + ,17 + ,6815 + ,51 + ,43 + ,3 + ,81 + ,31 + ,11807 + ,104 + ,103 + ,5 + ,102 + ,73 + ,21472 + ,83 + ,107 + ,0 + ,70 + ,85 + ,19589 + ,78 + ,77 + ,0 + ,75 + ,74 + ,12266 + ,59 + ,87 + ,4 + ,93 + ,52 + ,18391 + ,83 + ,99 + ,0 + ,42 + ,32 + ,6711 + ,71 + ,46 + ,0 + ,95 + ,32 + ,9004 + ,81 + ,96 + ,0 + ,87 + ,52 + ,34301 + ,93 + ,92 + ,3 + ,44 + ,45 + ,8061 + ,72 + ,96 + ,4 + ,84 + ,60 + ,19463 + ,107 + ,96 + ,1 + ,28 + ,23 + ,2053 + ,75 + ,15 + ,4 + ,87 + ,51 + ,29618 + ,84 + ,147 + ,1 + ,71 + ,37 + ,3963 + ,69 + ,56 + ,0 + ,68 + ,79 + ,17609 + ,90 + ,81 + ,0 + ,50 + ,45 + ,11738 + ,51 + ,69 + ,2 + ,30 + ,26 + ,11082 + ,18 + ,34 + ,1 + ,86 + ,101 + ,22648 + ,75 + ,98 + ,2 + ,75 + ,53 + ,16538 + ,59 + ,82 + ,8 + ,46 + ,38 + ,10149 + ,63 + ,64 + ,5 + ,52 + ,43 + ,19787 + ,68 + ,61 + ,3 + ,31 + ,27 + ,7740 + ,47 + ,45 + ,4 + ,30 + ,49 + ,5873 + ,29 + ,37 + ,1 + ,70 + ,88 + ,11694 + ,69 + ,64 + ,2 + ,20 + ,42 + ,7935 + ,66 + ,21 + ,2 + ,84 + ,51 + ,15093 + ,106 + ,104 + ,0 + ,81 + ,63 + ,14533 + ,73 + ,126 + ,6 + ,79 + ,38 + ,15834 + ,87 + ,104 + ,3 + ,70 + ,51 + ,15699 + ,65 + ,87 + ,0 + ,8 + ,24 + ,2694 + ,7 + ,7 + ,0 + ,67 + ,186 + ,13834 + ,111 + ,130 + ,6 + ,21 + ,17 + ,3597 + ,61 + ,21 + ,5 + ,30 + ,57 + ,5296 + ,41 + ,35 + ,3 + ,70 + ,27 + ,21637 + ,70 + ,97 + ,1 + ,87 + ,54 + ,18081 + ,112 + ,103 + ,5 + ,87 + ,101 + ,29016 + ,71 + ,210 + ,5 + ,112 + ,69 + ,27279 + ,90 + ,151 + ,0 + ,54 + ,49 + ,12889 + ,69 + ,57 + ,9 + ,96 + ,82 + ,21550 + ,85 + ,117 + ,6 + ,93 + ,70 + ,34042 + ,47 + ,152 + ,6 + ,49 + ,55 + ,8190 + ,50 + ,52 + ,5 + ,49 + ,57 + ,16163 + ,76 + ,83 + ,6 + ,38 + ,37 + ,23471 + ,60 + ,87 + ,2 + ,64 + ,32 + ,14220 + ,35 + ,80 + ,0 + ,62 + ,80 + ,12759 + ,72 + ,88 + ,3 + ,66 + ,94 + ,18142 + ,88 + ,83 + ,8 + ,98 + ,48 + ,13883 + ,66 + ,140 + ,2 + ,97 + ,31 + ,14069 + ,58 + ,76 + ,5 + ,56 + ,33 + ,11131 + ,81 + ,70 + ,11 + ,22 + ,28 + ,3007 + ,63 + ,26 + ,6 + ,51 + ,43 + ,12530 + ,91 + ,66 + ,5 + ,56 + ,35 + ,13205 + ,50 + ,89 + ,1 + ,94 + ,30 + ,13025 + ,75 + ,100 + ,0 + ,98 + ,44 + ,18778 + ,85 + ,98 + ,3 + ,76 + ,55 + ,19793 + ,75 + ,109 + ,3 + ,57 + ,58 + ,8238 + ,70 + ,51 + ,6 + ,75 + ,36 + ,11285 + ,78 + ,82 + ,1 + ,48 + ,37 + ,10490 + ,61 + ,65 + ,0 + ,48 + ,29 + ,10457 + ,55 + ,46 + ,1 + ,109 + ,65 + ,17313 + ,60 + ,104 + ,0 + ,27 + ,52 + ,9592 + ,83 + ,36 + ,5 + ,83 + ,48 + ,14282 + ,38 + ,123 + ,2 + ,49 + ,25 + ,7905 + ,27 + ,59 + ,0 + ,24 + ,37 + ,4525 + ,62 + ,27 + ,0 + ,43 + ,34 + ,21179 + ,82 + ,84 + ,5 + ,44 + ,95 + ,13724 + ,79 + ,61 + ,1 + ,49 + ,52 + ,18446 + ,59 + ,46 + ,0 + ,106 + ,66 + ,25961 + ,80 + ,125 + ,1 + ,42 + ,46 + ,6602 + ,36 + ,58 + ,1 + ,108 + ,47 + ,16795 + ,88 + ,152 + ,2 + ,27 + ,41 + ,5463 + ,63 + ,52 + ,4 + ,79 + ,48 + ,11299 + ,73 + ,85 + ,1 + ,49 + ,48 + ,20390 + ,71 + ,95 + ,4 + ,64 + ,27 + ,18558 + ,76 + ,78 + ,0 + ,75 + ,29 + ,26262 + ,67 + ,144 + ,2 + ,115 + ,51 + ,25267 + ,66 + ,149 + ,0 + ,92 + ,88 + ,21091 + ,123 + ,101 + ,7 + ,106 + ,69 + ,32425 + ,65 + ,205 + ,7 + ,73 + ,60 + ,24380 + ,87 + ,61 + ,6 + ,105 + ,37 + ,20460 + ,77 + ,145 + ,0 + ,30 + ,101 + ,6515 + ,37 + ,28 + ,0 + ,13 + ,14 + ,7409 + ,64 + ,49 + ,4 + ,69 + ,43 + ,12300 + ,22 + ,68 + ,4 + ,72 + ,90 + ,27127 + ,35 + ,142 + ,0 + ,80 + ,27 + ,27687 + ,61 + ,82 + ,0 + ,106 + ,60 + ,19255 + ,80 + ,105 + ,0 + ,28 + ,32 + ,15070 + ,54 + ,52 + ,0 + ,70 + ,61 + ,6291 + ,60 + ,56 + ,0 + ,51 + ,39 + ,16577 + ,87 + ,81 + ,4 + ,90 + ,55 + ,13027 + ,75 + ,100 + ,0 + ,12 + ,10 + ,238 + ,0 + ,11 + ,0 + ,84 + ,47 + ,17103 + ,54 + ,87 + ,0 + ,23 + ,25 + ,3913 + ,30 + ,31 + ,4 + ,57 + ,31 + ,5654 + ,66 + ,67 + ,0 + ,84 + ,53 + ,14354 + ,56 + ,150 + ,1 + ,4 + ,16 + ,338 + ,0 + ,4 + ,0 + ,56 + ,33 + ,8852 + ,32 + ,75 + ,5 + ,18 + ,19 + ,3988 + ,9 + ,39 + ,0 + ,86 + ,71 + ,15964 + ,78 + ,88 + ,1 + ,39 + ,34 + ,14784 + ,90 + ,67 + ,7 + ,16 + ,42 + ,2667 + ,56 + ,24 + ,5 + ,18 + ,27 + ,7164 + ,35 + ,58 + ,2 + ,16 + ,34 + ,1888 + ,21 + ,16 + ,0 + ,42 + ,25 + ,12367 + ,78 + ,49 + ,1 + ,75 + ,45 + ,20505 + ,114 + ,109 + ,0 + ,30 + ,36 + ,18330 + ,83 + ,124 + ,0 + ,104 + ,45 + ,24993 + ,89 + ,115 + ,2 + ,121 + ,61 + ,11869 + ,83 + ,128 + ,0 + ,106 + ,69 + ,31156 + ,116 + ,159 + ,2 + ,57 + ,23 + ,15234 + ,76 + ,75 + ,0 + ,28 + ,27 + ,6645 + ,57 + ,30 + ,0 + ,56 + ,178 + ,15007 + ,91 + ,83 + ,4 + ,81 + ,100 + ,16597 + ,89 + ,135 + ,4 + ,2 + ,15 + ,317 + ,66 + ,8 + ,8 + ,88 + ,77 + ,27627 + ,82 + ,115 + ,0 + ,41 + ,41 + ,8658 + ,63 + ,60 + ,4 + ,83 + ,29 + ,20493 + ,75 + ,99 + ,0 + ,55 + ,44 + ,8877 + ,59 + ,98 + ,1 + ,3 + ,72 + ,867 + ,19 + ,36 + ,0 + ,54 + ,77 + ,13259 + ,57 + ,93 + ,9 + ,89 + ,49 + ,20613 + ,62 + ,158 + ,0 + ,41 + ,63 + ,2805 + ,78 + ,16 + ,3 + ,94 + ,63 + ,20588 + ,73 + ,100 + ,7 + ,101 + ,39 + ,9812 + ,112 + ,49 + ,5 + ,70 + ,46 + ,20001 + ,79 + ,89 + ,2 + ,111 + ,63 + ,23042 + ,84 + ,153 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,9 + ,4 + ,10 + ,2065 + ,0 + ,5 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42 + ,55 + ,10902 + ,48 + ,80 + ,2 + ,97 + ,66 + ,11309 + ,55 + ,122 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,0 + ,0 + ,0 + ,0 + ,7 + ,5 + ,556 + ,0 + ,6 + ,0 + ,12 + ,20 + ,2089 + ,13 + ,13 + ,0 + ,0 + ,5 + ,2658 + ,4 + ,3 + ,0 + ,37 + ,27 + ,1419 + ,31 + ,18 + ,0 + ,0 + ,2 + ,0 + ,0 + ,0 + ,0 + ,39 + ,30 + ,10699 + ,29 + ,49 + ,2) + ,dim=c(6 + ,164) + ,dimnames=list(c('Geblogde_berekeningen' + ,'Aantal_Logins' + ,'Aantal_revisions' + ,'Aantal_lange_feedback' + ,'Aantal_hyperlinks' + ,'Aantal_gedeelde_compendiums') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('Geblogde_berekeningen','Aantal_Logins','Aantal_revisions','Aantal_lange_feedback','Aantal_hyperlinks','Aantal_gedeelde_compendiums'),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 Geblogde_berekeningen Aantal_Logins Aantal_revisions Aantal_lange_feedback 1 65 44 21387 68 2 54 48 12341 72 3 58 37 11397 37 4 75 68 25533 70 5 41 29 6630 30 6 0 17 7745 53 7 111 77 25304 74 8 1 16 1271 22 9 36 35 18035 68 10 60 24 13284 47 11 63 60 15628 87 12 71 72 13990 123 13 38 41 8532 69 14 76 39 13953 89 15 61 51 7210 45 16 125 100 22436 122 17 84 39 20238 75 18 69 97 10244 45 19 77 34 17390 53 20 95 47 9917 86 21 78 45 29625 82 22 76 54 13193 76 23 40 17 6815 51 24 81 31 11807 104 25 102 73 21472 83 26 70 85 19589 78 27 75 74 12266 59 28 93 52 18391 83 29 42 32 6711 71 30 95 32 9004 81 31 87 52 34301 93 32 44 45 8061 72 33 84 60 19463 107 34 28 23 2053 75 35 87 51 29618 84 36 71 37 3963 69 37 68 79 17609 90 38 50 45 11738 51 39 30 26 11082 18 40 86 101 22648 75 41 75 53 16538 59 42 46 38 10149 63 43 52 43 19787 68 44 31 27 7740 47 45 30 49 5873 29 46 70 88 11694 69 47 20 42 7935 66 48 84 51 15093 106 49 81 63 14533 73 50 79 38 15834 87 51 70 51 15699 65 52 8 24 2694 7 53 67 186 13834 111 54 21 17 3597 61 55 30 57 5296 41 56 70 27 21637 70 57 87 54 18081 112 58 87 101 29016 71 59 112 69 27279 90 60 54 49 12889 69 61 96 82 21550 85 62 93 70 34042 47 63 49 55 8190 50 64 49 57 16163 76 65 38 37 23471 60 66 64 32 14220 35 67 62 80 12759 72 68 66 94 18142 88 69 98 48 13883 66 70 97 31 14069 58 71 56 33 11131 81 72 22 28 3007 63 73 51 43 12530 91 74 56 35 13205 50 75 94 30 13025 75 76 98 44 18778 85 77 76 55 19793 75 78 57 58 8238 70 79 75 36 11285 78 80 48 37 10490 61 81 48 29 10457 55 82 109 65 17313 60 83 27 52 9592 83 84 83 48 14282 38 85 49 25 7905 27 86 24 37 4525 62 87 43 34 21179 82 88 44 95 13724 79 89 49 52 18446 59 90 106 66 25961 80 91 42 46 6602 36 92 108 47 16795 88 93 27 41 5463 63 94 79 48 11299 73 95 49 48 20390 71 96 64 27 18558 76 97 75 29 26262 67 98 115 51 25267 66 99 92 88 21091 123 100 106 69 32425 65 101 73 60 24380 87 102 105 37 20460 77 103 30 101 6515 37 104 13 14 7409 64 105 69 43 12300 22 106 72 90 27127 35 107 80 27 27687 61 108 106 60 19255 80 109 28 32 15070 54 110 70 61 6291 60 111 51 39 16577 87 112 90 55 13027 75 113 12 10 238 0 114 84 47 17103 54 115 23 25 3913 30 116 57 31 5654 66 117 84 53 14354 56 118 4 16 338 0 119 56 33 8852 32 120 18 19 3988 9 121 86 71 15964 78 122 39 34 14784 90 123 16 42 2667 56 124 18 27 7164 35 125 16 34 1888 21 126 42 25 12367 78 127 75 45 20505 114 128 30 36 18330 83 129 104 45 24993 89 130 121 61 11869 83 131 106 69 31156 116 132 57 23 15234 76 133 28 27 6645 57 134 56 178 15007 91 135 81 100 16597 89 136 2 15 317 66 137 88 77 27627 82 138 41 41 8658 63 139 83 29 20493 75 140 55 44 8877 59 141 3 72 867 19 142 54 77 13259 57 143 89 49 20613 62 144 41 63 2805 78 145 94 63 20588 73 146 101 39 9812 112 147 70 46 20001 79 148 111 63 23042 84 149 0 0 0 0 150 4 10 2065 0 151 0 1 0 0 152 0 2 0 0 153 0 0 0 0 154 0 0 0 0 155 42 55 10902 48 156 97 66 11309 55 157 0 0 0 0 158 0 4 0 0 159 7 5 556 0 160 12 20 2089 13 161 0 5 2658 4 162 37 27 1419 31 163 0 2 0 0 164 39 30 10699 29 Aantal_hyperlinks Aantal_gedeelde_compendiums 1 127 1 2 90 4 3 68 9 4 111 2 5 51 1 6 33 2 7 123 0 8 5 0 9 63 5 10 66 0 11 99 0 12 72 7 13 55 6 14 116 3 15 71 4 16 125 0 17 123 4 18 74 3 19 116 0 20 117 5 21 98 0 22 101 1 23 43 3 24 103 5 25 107 0 26 77 0 27 87 4 28 99 0 29 46 0 30 96 0 31 92 3 32 96 4 33 96 1 34 15 4 35 147 1 36 56 0 37 81 0 38 69 2 39 34 1 40 98 2 41 82 8 42 64 5 43 61 3 44 45 4 45 37 1 46 64 2 47 21 2 48 104 0 49 126 6 50 104 3 51 87 0 52 7 0 53 130 6 54 21 5 55 35 3 56 97 1 57 103 5 58 210 5 59 151 0 60 57 9 61 117 6 62 152 6 63 52 5 64 83 6 65 87 2 66 80 0 67 88 3 68 83 8 69 140 2 70 76 5 71 70 11 72 26 6 73 66 5 74 89 1 75 100 0 76 98 3 77 109 3 78 51 6 79 82 1 80 65 0 81 46 1 82 104 0 83 36 5 84 123 2 85 59 0 86 27 0 87 84 5 88 61 1 89 46 0 90 125 1 91 58 1 92 152 2 93 52 4 94 85 1 95 95 4 96 78 0 97 144 2 98 149 0 99 101 7 100 205 7 101 61 6 102 145 0 103 28 0 104 49 4 105 68 4 106 142 0 107 82 0 108 105 0 109 52 0 110 56 0 111 81 4 112 100 0 113 11 0 114 87 0 115 31 4 116 67 0 117 150 1 118 4 0 119 75 5 120 39 0 121 88 1 122 67 7 123 24 5 124 58 2 125 16 0 126 49 1 127 109 0 128 124 0 129 115 2 130 128 0 131 159 2 132 75 0 133 30 0 134 83 4 135 135 4 136 8 8 137 115 0 138 60 4 139 99 0 140 98 1 141 36 0 142 93 9 143 158 0 144 16 3 145 100 7 146 49 5 147 89 2 148 153 1 149 0 9 150 5 0 151 0 0 152 0 0 153 0 1 154 0 0 155 80 2 156 122 1 157 0 0 158 0 0 159 6 0 160 13 0 161 3 0 162 18 0 163 0 0 164 49 2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Aantal_Logins 2.3911120 0.0329154 Aantal_revisions Aantal_lange_feedback 0.0002832 0.2987856 Aantal_hyperlinks Aantal_gedeelde_compendiums 0.4578736 -1.2103276 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -60.343 -7.766 -0.503 9.118 44.698 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.3911120 2.9815315 0.802 0.4238 Aantal_Logins 0.0329154 0.0534787 0.615 0.5391 Aantal_revisions 0.0002832 0.0002649 1.069 0.2867 Aantal_lange_feedback 0.2987856 0.0582506 5.129 8.42e-07 *** Aantal_hyperlinks 0.4578736 0.0505984 9.049 5.05e-16 *** Aantal_gedeelde_compendiums -1.2103276 0.4781978 -2.531 0.0124 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 15.16 on 158 degrees of freedom Multiple R-squared: 0.7858, Adjusted R-squared: 0.779 F-statistic: 115.9 on 5 and 158 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.330575001 0.661150001 0.6694249994 [2,] 0.687669824 0.624660352 0.3123301761 [3,] 0.568837976 0.862324048 0.4311620239 [4,] 0.619800375 0.760399251 0.3801996255 [5,] 0.508390696 0.983218608 0.4916093038 [6,] 0.485806277 0.971612553 0.5141937234 [7,] 0.388972939 0.777945878 0.6110270609 [8,] 0.362790451 0.725580903 0.6372095486 [9,] 0.328900751 0.657801501 0.6710992494 [10,] 0.396613474 0.793226947 0.6033865263 [11,] 0.321748062 0.643496125 0.6782519376 [12,] 0.295061497 0.590122995 0.7049385027 [13,] 0.273418171 0.546836343 0.7265818287 [14,] 0.210737486 0.421474973 0.7892625136 [15,] 0.220612354 0.441224708 0.7793876458 [16,] 0.191080953 0.382161907 0.8089190465 [17,] 0.191763254 0.383526507 0.8082367463 [18,] 0.150509252 0.301018505 0.8494907477 [19,] 0.116592482 0.233184964 0.8834075182 [20,] 0.129524598 0.259049195 0.8704754024 [21,] 0.099355393 0.198710787 0.9006446067 [22,] 0.149268930 0.298537859 0.8507310705 [23,] 0.161953112 0.323906224 0.8380468882 [24,] 0.268317259 0.536634518 0.7316827412 [25,] 0.219246817 0.438493633 0.7807531833 [26,] 0.191721996 0.383443992 0.8082780039 [27,] 0.204779374 0.409558748 0.7952206261 [28,] 0.243753794 0.487507588 0.7562462059 [29,] 0.228725560 0.457451120 0.7712744399 [30,] 0.188435646 0.376871292 0.8115643540 [31,] 0.158141158 0.316282317 0.8418588416 [32,] 0.129963584 0.259927168 0.8700364158 [33,] 0.143738636 0.287477272 0.8562613640 [34,] 0.115747654 0.231495309 0.8842523457 [35,] 0.090855992 0.181711984 0.9091440082 [36,] 0.071223815 0.142447629 0.9287761853 [37,] 0.055838790 0.111677580 0.9441612100 [38,] 0.045495347 0.090990694 0.9545046529 [39,] 0.040635241 0.081270482 0.9593647592 [40,] 0.030400975 0.060801951 0.9695990245 [41,] 0.024830941 0.049661881 0.9751690594 [42,] 0.018308379 0.036616757 0.9816916214 [43,] 0.013186414 0.026372827 0.9868135863 [44,] 0.009321977 0.018643954 0.9906780228 [45,] 0.097034721 0.194069441 0.9029652794 [46,] 0.077804941 0.155609883 0.9221950585 [47,] 0.060971425 0.121942851 0.9390285747 [48,] 0.048170591 0.096341182 0.9518294088 [49,] 0.037841076 0.075682151 0.9621589244 [50,] 0.139035811 0.278071621 0.8609641893 [51,] 0.116215922 0.232431843 0.8837840784 [52,] 0.104566683 0.209133366 0.8954333168 [53,] 0.100703711 0.201407422 0.8992962888 [54,] 0.081567402 0.163134805 0.9184325977 [55,] 0.070464576 0.140929152 0.9295354241 [56,] 0.067856215 0.135712431 0.9321437847 [57,] 0.113663477 0.227326954 0.8863365228 [58,] 0.100629502 0.201259005 0.8993704977 [59,] 0.083098199 0.166196397 0.9169018014 [60,] 0.066352795 0.132705589 0.9336472053 [61,] 0.058029214 0.116058428 0.9419707858 [62,] 0.230441569 0.460883138 0.7695584312 [63,] 0.202008924 0.404017849 0.7979910757 [64,] 0.176974929 0.353949859 0.8230250707 [65,] 0.155392209 0.310784417 0.8446077914 [66,] 0.133056010 0.266112020 0.8669439899 [67,] 0.145922565 0.291845129 0.8540774354 [68,] 0.177398381 0.354796761 0.8226016193 [69,] 0.149573769 0.299147538 0.8504262312 [70,] 0.143172389 0.286344777 0.8568276114 [71,] 0.125852750 0.251705500 0.8741472500 [72,] 0.108018018 0.216036035 0.8919819823 [73,] 0.090086114 0.180172228 0.9099138862 [74,] 0.184801699 0.369603397 0.8151983014 [75,] 0.182338463 0.364676926 0.8176615370 [76,] 0.163392446 0.326784892 0.8366075542 [77,] 0.142928734 0.285857468 0.8570712659 [78,] 0.133691384 0.267382768 0.8663086162 [79,] 0.166624008 0.333248016 0.8333759918 [80,] 0.167864297 0.335728595 0.8321357027 [81,] 0.140749324 0.281498648 0.8592506761 [82,] 0.136527037 0.273054074 0.8634729628 [83,] 0.113320488 0.226640976 0.8866795122 [84,] 0.096641803 0.193283607 0.9033581966 [85,] 0.098258671 0.196517342 0.9017413292 [86,] 0.091296022 0.182592044 0.9087039780 [87,] 0.107110959 0.214221918 0.8928890410 [88,] 0.087929991 0.175859982 0.9120700090 [89,] 0.099024690 0.198049380 0.9009753102 [90,] 0.100333814 0.200667628 0.8996661860 [91,] 0.085094281 0.170188562 0.9149057188 [92,] 0.078556956 0.157113912 0.9214430439 [93,] 0.076491432 0.152982863 0.9235085684 [94,] 0.064080629 0.128161257 0.9359193715 [95,] 0.050823410 0.101646819 0.9491765904 [96,] 0.087493471 0.174986943 0.9125065287 [97,] 0.142819881 0.285639763 0.8571801187 [98,] 0.141912714 0.283825429 0.8580872856 [99,] 0.135888776 0.271777552 0.8641112238 [100,] 0.183808089 0.367616177 0.8161919114 [101,] 0.197927921 0.395855842 0.8020720788 [102,] 0.225176277 0.450352554 0.7748237232 [103,] 0.225067060 0.450134119 0.7749329404 [104,] 0.225470335 0.450940670 0.7745296648 [105,] 0.194155364 0.388310727 0.8058446363 [106,] 0.224793458 0.449586916 0.7752065419 [107,] 0.188940394 0.377880788 0.8110596058 [108,] 0.158666817 0.317333633 0.8413331834 [109,] 0.135081825 0.270163650 0.8649181750 [110,] 0.110331653 0.220663306 0.8896683469 [111,] 0.102179321 0.204358643 0.8978206785 [112,] 0.083757701 0.167515403 0.9162422985 [113,] 0.086667160 0.173334321 0.9133328397 [114,] 0.100912999 0.201825997 0.8990870014 [115,] 0.091634090 0.183268180 0.9083659102 [116,] 0.109207624 0.218415248 0.8907923762 [117,] 0.086723631 0.173447262 0.9132763689 [118,] 0.074319110 0.148638221 0.9256808896 [119,] 0.084071821 0.168143642 0.9159281790 [120,] 0.802709553 0.394580894 0.1972904472 [121,] 0.794399503 0.411200995 0.2056004974 [122,] 0.903578742 0.192842517 0.0964212584 [123,] 0.917177204 0.165645593 0.0828227963 [124,] 0.922073144 0.155853712 0.0779268559 [125,] 0.920200332 0.159599335 0.0797996676 [126,] 0.899900508 0.200198983 0.1000994917 [127,] 0.885222690 0.229554620 0.1147773102 [128,] 0.985748360 0.028503280 0.0142516402 [129,] 0.977758229 0.044483542 0.0222417709 [130,] 0.987266258 0.025467483 0.0127337416 [131,] 0.980811909 0.038376182 0.0191880911 [132,] 0.992552280 0.014895440 0.0074477199 [133,] 0.990547149 0.018905702 0.0094528512 [134,] 0.990742128 0.018515744 0.0092578721 [135,] 0.994742609 0.010514783 0.0052573914 [136,] 0.996228117 0.007543767 0.0037718834 [137,] 0.999333020 0.001333959 0.0006669797 [138,] 0.998953345 0.002093311 0.0010466553 [139,] 0.997521562 0.004956877 0.0024784385 [140,] 0.994541437 0.010917126 0.0054585628 [141,] 0.994623766 0.010752467 0.0053762336 [142,] 0.992540102 0.014919796 0.0074598981 [143,] 0.982996541 0.034006918 0.0170034591 [144,] 0.961289180 0.077421641 0.0387108204 [145,] 0.934410411 0.131179177 0.0655895887 [146,] 0.869758726 0.260482547 0.1302412737 [147,] 0.990852112 0.018295776 0.0091478882 > postscript(file="/var/wessaorg/rcomp/tmp/17iiq1321532206.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/2t0tn1321532206.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/3sapf1321532206.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/4rf861321532206.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/5msfz1321532206.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 -22.15310543 -11.34582801 19.86592987 -6.17846433 4.67196931 -33.66882275 7 8 9 10 11 12 20.47986740 -11.14034927 -15.76237779 8.79438553 -17.11562914 1.03185824 13 14 15 16 17 18 -6.69414484 -7.70049472 13.77530443 19.27755878 0.70784015 16.81803545 19 20 21 22 23 24 -0.38395824 15.03829212 -3.63396557 0.35266302 3.82371050 2.06179201 25 26 27 28 29 30 17.33363689 0.70204286 14.07744400 13.56037095 -5.62088391 20.84821529 31 32 33 34 35 36 6.90299368 -22.78225226 -0.59344196 -0.16527623 -16.65252635 20.01159167 37 38 39 40 41 42 -5.95666149 -1.60712791 3.87921337 9.01077120 20.68954083 -2.59180031 43 44 45 46 47 48 -2.02676544 -4.27767560 -0.06294488 13.90119728 -12.93524427 -3.63417551 49 50 51 52 53 54 0.17809860 0.89178694 2.22826892 -1.24062154 -30.85789164 -4.75895152 55 56 57 58 59 60 -0.41188960 -3.52570457 3.13769233 -38.24832905 3.58285177 10.52389038 61 62 63 64 65 66 13.10096753 2.28656604 9.78211087 -13.29380674 -27.59731736 9.44118873 67 68 69 70 71 72 -4.81207702 0.76310978 8.69586398 43.52793087 6.43126387 -5.63054814 73 74 75 76 77 78 -7.71240619 -5.76243396 18.73654126 22.20538354 -2.49288218 13.36226101 79 80 81 82 83 84 8.58750262 -6.56739479 5.40791375 34.02045404 -15.05012735 9.73271710 85 86 87 88 89 90 8.46559856 -11.77772961 -23.41816892 -15.72865745 0.98295069 14.15774538 91 92 93 94 95 96 0.12250786 5.83635182 -16.07934282 12.30885991 -20.61584062 -2.95719205 97 98 99 100 101 102 -19.31468409 15.83171713 6.21591469 -12.65770784 15.06701843 6.19870063 103 104 105 106 107 108 -1.43610710 -28.66688714 28.84285843 -16.51125725 13.10781729 24.20148285 109 110 111 112 113 114 -19.65599110 20.25141569 -15.61012099 13.91308938 4.17572387 19.24896729 115 116 117 118 119 120 0.36152486 1.58994976 -8.40330560 -0.84497277 12.16582280 -6.69202456 121 122 123 124 125 126 14.36315559 -17.79291989 -10.19815936 -21.90214109 -1.64538183 -9.24701461 127 128 129 130 131 132 -18.64898269 -60.34254786 16.22309476 29.83278992 -12.52585078 -7.51057201 133 134 135 136 137 138 -7.92864008 -16.85163894 -12.94637180 -14.67483167 -1.90528843 -6.64713720 139 140 141 142 143 144 6.11243600 -12.64294097 -24.16692762 -3.40054642 -11.71018644 8.74058696 145 146 147 148 149 150 24.57839934 44.69833165 -1.50354546 6.06753199 8.50183683 -1.59443025 151 152 153 154 155 156 -2.42402738 -2.45694280 -1.18078432 -2.39111196 -13.83978478 18.15036707 157 158 159 160 161 162 -2.39111196 -2.52277364 1.53961328 -1.47758253 -5.87718239 15.81424119 163 164 -2.45694280 3.91159714 > postscript(file="/var/wessaorg/rcomp/tmp/6kp8o1321532206.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 -22.15310543 NA 1 -11.34582801 -22.15310543 2 19.86592987 -11.34582801 3 -6.17846433 19.86592987 4 4.67196931 -6.17846433 5 -33.66882275 4.67196931 6 20.47986740 -33.66882275 7 -11.14034927 20.47986740 8 -15.76237779 -11.14034927 9 8.79438553 -15.76237779 10 -17.11562914 8.79438553 11 1.03185824 -17.11562914 12 -6.69414484 1.03185824 13 -7.70049472 -6.69414484 14 13.77530443 -7.70049472 15 19.27755878 13.77530443 16 0.70784015 19.27755878 17 16.81803545 0.70784015 18 -0.38395824 16.81803545 19 15.03829212 -0.38395824 20 -3.63396557 15.03829212 21 0.35266302 -3.63396557 22 3.82371050 0.35266302 23 2.06179201 3.82371050 24 17.33363689 2.06179201 25 0.70204286 17.33363689 26 14.07744400 0.70204286 27 13.56037095 14.07744400 28 -5.62088391 13.56037095 29 20.84821529 -5.62088391 30 6.90299368 20.84821529 31 -22.78225226 6.90299368 32 -0.59344196 -22.78225226 33 -0.16527623 -0.59344196 34 -16.65252635 -0.16527623 35 20.01159167 -16.65252635 36 -5.95666149 20.01159167 37 -1.60712791 -5.95666149 38 3.87921337 -1.60712791 39 9.01077120 3.87921337 40 20.68954083 9.01077120 41 -2.59180031 20.68954083 42 -2.02676544 -2.59180031 43 -4.27767560 -2.02676544 44 -0.06294488 -4.27767560 45 13.90119728 -0.06294488 46 -12.93524427 13.90119728 47 -3.63417551 -12.93524427 48 0.17809860 -3.63417551 49 0.89178694 0.17809860 50 2.22826892 0.89178694 51 -1.24062154 2.22826892 52 -30.85789164 -1.24062154 53 -4.75895152 -30.85789164 54 -0.41188960 -4.75895152 55 -3.52570457 -0.41188960 56 3.13769233 -3.52570457 57 -38.24832905 3.13769233 58 3.58285177 -38.24832905 59 10.52389038 3.58285177 60 13.10096753 10.52389038 61 2.28656604 13.10096753 62 9.78211087 2.28656604 63 -13.29380674 9.78211087 64 -27.59731736 -13.29380674 65 9.44118873 -27.59731736 66 -4.81207702 9.44118873 67 0.76310978 -4.81207702 68 8.69586398 0.76310978 69 43.52793087 8.69586398 70 6.43126387 43.52793087 71 -5.63054814 6.43126387 72 -7.71240619 -5.63054814 73 -5.76243396 -7.71240619 74 18.73654126 -5.76243396 75 22.20538354 18.73654126 76 -2.49288218 22.20538354 77 13.36226101 -2.49288218 78 8.58750262 13.36226101 79 -6.56739479 8.58750262 80 5.40791375 -6.56739479 81 34.02045404 5.40791375 82 -15.05012735 34.02045404 83 9.73271710 -15.05012735 84 8.46559856 9.73271710 85 -11.77772961 8.46559856 86 -23.41816892 -11.77772961 87 -15.72865745 -23.41816892 88 0.98295069 -15.72865745 89 14.15774538 0.98295069 90 0.12250786 14.15774538 91 5.83635182 0.12250786 92 -16.07934282 5.83635182 93 12.30885991 -16.07934282 94 -20.61584062 12.30885991 95 -2.95719205 -20.61584062 96 -19.31468409 -2.95719205 97 15.83171713 -19.31468409 98 6.21591469 15.83171713 99 -12.65770784 6.21591469 100 15.06701843 -12.65770784 101 6.19870063 15.06701843 102 -1.43610710 6.19870063 103 -28.66688714 -1.43610710 104 28.84285843 -28.66688714 105 -16.51125725 28.84285843 106 13.10781729 -16.51125725 107 24.20148285 13.10781729 108 -19.65599110 24.20148285 109 20.25141569 -19.65599110 110 -15.61012099 20.25141569 111 13.91308938 -15.61012099 112 4.17572387 13.91308938 113 19.24896729 4.17572387 114 0.36152486 19.24896729 115 1.58994976 0.36152486 116 -8.40330560 1.58994976 117 -0.84497277 -8.40330560 118 12.16582280 -0.84497277 119 -6.69202456 12.16582280 120 14.36315559 -6.69202456 121 -17.79291989 14.36315559 122 -10.19815936 -17.79291989 123 -21.90214109 -10.19815936 124 -1.64538183 -21.90214109 125 -9.24701461 -1.64538183 126 -18.64898269 -9.24701461 127 -60.34254786 -18.64898269 128 16.22309476 -60.34254786 129 29.83278992 16.22309476 130 -12.52585078 29.83278992 131 -7.51057201 -12.52585078 132 -7.92864008 -7.51057201 133 -16.85163894 -7.92864008 134 -12.94637180 -16.85163894 135 -14.67483167 -12.94637180 136 -1.90528843 -14.67483167 137 -6.64713720 -1.90528843 138 6.11243600 -6.64713720 139 -12.64294097 6.11243600 140 -24.16692762 -12.64294097 141 -3.40054642 -24.16692762 142 -11.71018644 -3.40054642 143 8.74058696 -11.71018644 144 24.57839934 8.74058696 145 44.69833165 24.57839934 146 -1.50354546 44.69833165 147 6.06753199 -1.50354546 148 8.50183683 6.06753199 149 -1.59443025 8.50183683 150 -2.42402738 -1.59443025 151 -2.45694280 -2.42402738 152 -1.18078432 -2.45694280 153 -2.39111196 -1.18078432 154 -13.83978478 -2.39111196 155 18.15036707 -13.83978478 156 -2.39111196 18.15036707 157 -2.52277364 -2.39111196 158 1.53961328 -2.52277364 159 -1.47758253 1.53961328 160 -5.87718239 -1.47758253 161 15.81424119 -5.87718239 162 -2.45694280 15.81424119 163 3.91159714 -2.45694280 164 NA 3.91159714 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -11.34582801 -22.15310543 [2,] 19.86592987 -11.34582801 [3,] -6.17846433 19.86592987 [4,] 4.67196931 -6.17846433 [5,] -33.66882275 4.67196931 [6,] 20.47986740 -33.66882275 [7,] -11.14034927 20.47986740 [8,] -15.76237779 -11.14034927 [9,] 8.79438553 -15.76237779 [10,] -17.11562914 8.79438553 [11,] 1.03185824 -17.11562914 [12,] -6.69414484 1.03185824 [13,] -7.70049472 -6.69414484 [14,] 13.77530443 -7.70049472 [15,] 19.27755878 13.77530443 [16,] 0.70784015 19.27755878 [17,] 16.81803545 0.70784015 [18,] -0.38395824 16.81803545 [19,] 15.03829212 -0.38395824 [20,] -3.63396557 15.03829212 [21,] 0.35266302 -3.63396557 [22,] 3.82371050 0.35266302 [23,] 2.06179201 3.82371050 [24,] 17.33363689 2.06179201 [25,] 0.70204286 17.33363689 [26,] 14.07744400 0.70204286 [27,] 13.56037095 14.07744400 [28,] -5.62088391 13.56037095 [29,] 20.84821529 -5.62088391 [30,] 6.90299368 20.84821529 [31,] -22.78225226 6.90299368 [32,] -0.59344196 -22.78225226 [33,] -0.16527623 -0.59344196 [34,] -16.65252635 -0.16527623 [35,] 20.01159167 -16.65252635 [36,] -5.95666149 20.01159167 [37,] -1.60712791 -5.95666149 [38,] 3.87921337 -1.60712791 [39,] 9.01077120 3.87921337 [40,] 20.68954083 9.01077120 [41,] -2.59180031 20.68954083 [42,] -2.02676544 -2.59180031 [43,] -4.27767560 -2.02676544 [44,] -0.06294488 -4.27767560 [45,] 13.90119728 -0.06294488 [46,] -12.93524427 13.90119728 [47,] -3.63417551 -12.93524427 [48,] 0.17809860 -3.63417551 [49,] 0.89178694 0.17809860 [50,] 2.22826892 0.89178694 [51,] -1.24062154 2.22826892 [52,] -30.85789164 -1.24062154 [53,] -4.75895152 -30.85789164 [54,] -0.41188960 -4.75895152 [55,] -3.52570457 -0.41188960 [56,] 3.13769233 -3.52570457 [57,] -38.24832905 3.13769233 [58,] 3.58285177 -38.24832905 [59,] 10.52389038 3.58285177 [60,] 13.10096753 10.52389038 [61,] 2.28656604 13.10096753 [62,] 9.78211087 2.28656604 [63,] -13.29380674 9.78211087 [64,] -27.59731736 -13.29380674 [65,] 9.44118873 -27.59731736 [66,] -4.81207702 9.44118873 [67,] 0.76310978 -4.81207702 [68,] 8.69586398 0.76310978 [69,] 43.52793087 8.69586398 [70,] 6.43126387 43.52793087 [71,] -5.63054814 6.43126387 [72,] -7.71240619 -5.63054814 [73,] -5.76243396 -7.71240619 [74,] 18.73654126 -5.76243396 [75,] 22.20538354 18.73654126 [76,] -2.49288218 22.20538354 [77,] 13.36226101 -2.49288218 [78,] 8.58750262 13.36226101 [79,] -6.56739479 8.58750262 [80,] 5.40791375 -6.56739479 [81,] 34.02045404 5.40791375 [82,] -15.05012735 34.02045404 [83,] 9.73271710 -15.05012735 [84,] 8.46559856 9.73271710 [85,] -11.77772961 8.46559856 [86,] -23.41816892 -11.77772961 [87,] -15.72865745 -23.41816892 [88,] 0.98295069 -15.72865745 [89,] 14.15774538 0.98295069 [90,] 0.12250786 14.15774538 [91,] 5.83635182 0.12250786 [92,] -16.07934282 5.83635182 [93,] 12.30885991 -16.07934282 [94,] -20.61584062 12.30885991 [95,] -2.95719205 -20.61584062 [96,] -19.31468409 -2.95719205 [97,] 15.83171713 -19.31468409 [98,] 6.21591469 15.83171713 [99,] -12.65770784 6.21591469 [100,] 15.06701843 -12.65770784 [101,] 6.19870063 15.06701843 [102,] -1.43610710 6.19870063 [103,] -28.66688714 -1.43610710 [104,] 28.84285843 -28.66688714 [105,] -16.51125725 28.84285843 [106,] 13.10781729 -16.51125725 [107,] 24.20148285 13.10781729 [108,] -19.65599110 24.20148285 [109,] 20.25141569 -19.65599110 [110,] -15.61012099 20.25141569 [111,] 13.91308938 -15.61012099 [112,] 4.17572387 13.91308938 [113,] 19.24896729 4.17572387 [114,] 0.36152486 19.24896729 [115,] 1.58994976 0.36152486 [116,] -8.40330560 1.58994976 [117,] -0.84497277 -8.40330560 [118,] 12.16582280 -0.84497277 [119,] -6.69202456 12.16582280 [120,] 14.36315559 -6.69202456 [121,] -17.79291989 14.36315559 [122,] -10.19815936 -17.79291989 [123,] -21.90214109 -10.19815936 [124,] -1.64538183 -21.90214109 [125,] -9.24701461 -1.64538183 [126,] -18.64898269 -9.24701461 [127,] -60.34254786 -18.64898269 [128,] 16.22309476 -60.34254786 [129,] 29.83278992 16.22309476 [130,] -12.52585078 29.83278992 [131,] -7.51057201 -12.52585078 [132,] -7.92864008 -7.51057201 [133,] -16.85163894 -7.92864008 [134,] -12.94637180 -16.85163894 [135,] -14.67483167 -12.94637180 [136,] -1.90528843 -14.67483167 [137,] -6.64713720 -1.90528843 [138,] 6.11243600 -6.64713720 [139,] -12.64294097 6.11243600 [140,] -24.16692762 -12.64294097 [141,] -3.40054642 -24.16692762 [142,] -11.71018644 -3.40054642 [143,] 8.74058696 -11.71018644 [144,] 24.57839934 8.74058696 [145,] 44.69833165 24.57839934 [146,] -1.50354546 44.69833165 [147,] 6.06753199 -1.50354546 [148,] 8.50183683 6.06753199 [149,] -1.59443025 8.50183683 [150,] -2.42402738 -1.59443025 [151,] -2.45694280 -2.42402738 [152,] -1.18078432 -2.45694280 [153,] -2.39111196 -1.18078432 [154,] -13.83978478 -2.39111196 [155,] 18.15036707 -13.83978478 [156,] -2.39111196 18.15036707 [157,] -2.52277364 -2.39111196 [158,] 1.53961328 -2.52277364 [159,] -1.47758253 1.53961328 [160,] -5.87718239 -1.47758253 [161,] 15.81424119 -5.87718239 [162,] -2.45694280 15.81424119 [163,] 3.91159714 -2.45694280 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -11.34582801 -22.15310543 2 19.86592987 -11.34582801 3 -6.17846433 19.86592987 4 4.67196931 -6.17846433 5 -33.66882275 4.67196931 6 20.47986740 -33.66882275 7 -11.14034927 20.47986740 8 -15.76237779 -11.14034927 9 8.79438553 -15.76237779 10 -17.11562914 8.79438553 11 1.03185824 -17.11562914 12 -6.69414484 1.03185824 13 -7.70049472 -6.69414484 14 13.77530443 -7.70049472 15 19.27755878 13.77530443 16 0.70784015 19.27755878 17 16.81803545 0.70784015 18 -0.38395824 16.81803545 19 15.03829212 -0.38395824 20 -3.63396557 15.03829212 21 0.35266302 -3.63396557 22 3.82371050 0.35266302 23 2.06179201 3.82371050 24 17.33363689 2.06179201 25 0.70204286 17.33363689 26 14.07744400 0.70204286 27 13.56037095 14.07744400 28 -5.62088391 13.56037095 29 20.84821529 -5.62088391 30 6.90299368 20.84821529 31 -22.78225226 6.90299368 32 -0.59344196 -22.78225226 33 -0.16527623 -0.59344196 34 -16.65252635 -0.16527623 35 20.01159167 -16.65252635 36 -5.95666149 20.01159167 37 -1.60712791 -5.95666149 38 3.87921337 -1.60712791 39 9.01077120 3.87921337 40 20.68954083 9.01077120 41 -2.59180031 20.68954083 42 -2.02676544 -2.59180031 43 -4.27767560 -2.02676544 44 -0.06294488 -4.27767560 45 13.90119728 -0.06294488 46 -12.93524427 13.90119728 47 -3.63417551 -12.93524427 48 0.17809860 -3.63417551 49 0.89178694 0.17809860 50 2.22826892 0.89178694 51 -1.24062154 2.22826892 52 -30.85789164 -1.24062154 53 -4.75895152 -30.85789164 54 -0.41188960 -4.75895152 55 -3.52570457 -0.41188960 56 3.13769233 -3.52570457 57 -38.24832905 3.13769233 58 3.58285177 -38.24832905 59 10.52389038 3.58285177 60 13.10096753 10.52389038 61 2.28656604 13.10096753 62 9.78211087 2.28656604 63 -13.29380674 9.78211087 64 -27.59731736 -13.29380674 65 9.44118873 -27.59731736 66 -4.81207702 9.44118873 67 0.76310978 -4.81207702 68 8.69586398 0.76310978 69 43.52793087 8.69586398 70 6.43126387 43.52793087 71 -5.63054814 6.43126387 72 -7.71240619 -5.63054814 73 -5.76243396 -7.71240619 74 18.73654126 -5.76243396 75 22.20538354 18.73654126 76 -2.49288218 22.20538354 77 13.36226101 -2.49288218 78 8.58750262 13.36226101 79 -6.56739479 8.58750262 80 5.40791375 -6.56739479 81 34.02045404 5.40791375 82 -15.05012735 34.02045404 83 9.73271710 -15.05012735 84 8.46559856 9.73271710 85 -11.77772961 8.46559856 86 -23.41816892 -11.77772961 87 -15.72865745 -23.41816892 88 0.98295069 -15.72865745 89 14.15774538 0.98295069 90 0.12250786 14.15774538 91 5.83635182 0.12250786 92 -16.07934282 5.83635182 93 12.30885991 -16.07934282 94 -20.61584062 12.30885991 95 -2.95719205 -20.61584062 96 -19.31468409 -2.95719205 97 15.83171713 -19.31468409 98 6.21591469 15.83171713 99 -12.65770784 6.21591469 100 15.06701843 -12.65770784 101 6.19870063 15.06701843 102 -1.43610710 6.19870063 103 -28.66688714 -1.43610710 104 28.84285843 -28.66688714 105 -16.51125725 28.84285843 106 13.10781729 -16.51125725 107 24.20148285 13.10781729 108 -19.65599110 24.20148285 109 20.25141569 -19.65599110 110 -15.61012099 20.25141569 111 13.91308938 -15.61012099 112 4.17572387 13.91308938 113 19.24896729 4.17572387 114 0.36152486 19.24896729 115 1.58994976 0.36152486 116 -8.40330560 1.58994976 117 -0.84497277 -8.40330560 118 12.16582280 -0.84497277 119 -6.69202456 12.16582280 120 14.36315559 -6.69202456 121 -17.79291989 14.36315559 122 -10.19815936 -17.79291989 123 -21.90214109 -10.19815936 124 -1.64538183 -21.90214109 125 -9.24701461 -1.64538183 126 -18.64898269 -9.24701461 127 -60.34254786 -18.64898269 128 16.22309476 -60.34254786 129 29.83278992 16.22309476 130 -12.52585078 29.83278992 131 -7.51057201 -12.52585078 132 -7.92864008 -7.51057201 133 -16.85163894 -7.92864008 134 -12.94637180 -16.85163894 135 -14.67483167 -12.94637180 136 -1.90528843 -14.67483167 137 -6.64713720 -1.90528843 138 6.11243600 -6.64713720 139 -12.64294097 6.11243600 140 -24.16692762 -12.64294097 141 -3.40054642 -24.16692762 142 -11.71018644 -3.40054642 143 8.74058696 -11.71018644 144 24.57839934 8.74058696 145 44.69833165 24.57839934 146 -1.50354546 44.69833165 147 6.06753199 -1.50354546 148 8.50183683 6.06753199 149 -1.59443025 8.50183683 150 -2.42402738 -1.59443025 151 -2.45694280 -2.42402738 152 -1.18078432 -2.45694280 153 -2.39111196 -1.18078432 154 -13.83978478 -2.39111196 155 18.15036707 -13.83978478 156 -2.39111196 18.15036707 157 -2.52277364 -2.39111196 158 1.53961328 -2.52277364 159 -1.47758253 1.53961328 160 -5.87718239 -1.47758253 161 15.81424119 -5.87718239 162 -2.45694280 15.81424119 163 3.91159714 -2.45694280 > 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/7se6n1321532206.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/8gsso1321532206.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/9abe41321532206.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/10c7r41321532206.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/11hhj81321532206.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/12wsfj1321532206.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/13lvi51321532206.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/14lrtd1321532206.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/15601m1321532206.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/16sua31321532206.tab") + } > > try(system("convert tmp/17iiq1321532206.ps tmp/17iiq1321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/2t0tn1321532206.ps tmp/2t0tn1321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/3sapf1321532206.ps tmp/3sapf1321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/4rf861321532206.ps tmp/4rf861321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/5msfz1321532206.ps tmp/5msfz1321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/6kp8o1321532206.ps tmp/6kp8o1321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/7se6n1321532206.ps tmp/7se6n1321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/8gsso1321532206.ps tmp/8gsso1321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/9abe41321532206.ps tmp/9abe41321532206.png",intern=TRUE)) character(0) > try(system("convert tmp/10c7r41321532206.ps tmp/10c7r41321532206.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.093 0.533 5.711