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(101645 + ,63 + ,20 + ,38 + ,17140 + ,28 + ,101011 + ,34 + ,30 + ,39 + ,27570 + ,35 + ,7176 + ,17 + ,0 + ,0 + ,1423 + ,0 + ,96560 + ,76 + ,42 + ,38 + ,22996 + ,47 + ,175824 + ,107 + ,57 + ,77 + ,39992 + ,70 + ,341570 + ,168 + ,94 + ,78 + ,117105 + ,135 + ,103597 + ,43 + ,27 + ,49 + ,23789 + ,26 + ,112611 + ,41 + ,46 + ,73 + ,26706 + ,48 + ,85574 + ,34 + ,37 + ,36 + ,24266 + ,40 + ,220801 + ,75 + ,51 + ,63 + ,44418 + ,66 + ,92661 + ,61 + ,40 + ,41 + ,35232 + ,39 + ,133328 + ,55 + ,56 + ,56 + ,40909 + ,66 + ,61361 + ,77 + ,27 + ,25 + ,13294 + ,27 + ,125930 + ,75 + ,37 + ,65 + ,32387 + ,65 + ,82316 + ,32 + ,27 + ,38 + ,21233 + ,25 + ,102010 + ,53 + ,28 + ,44 + ,44332 + ,26 + ,101523 + ,42 + ,59 + ,87 + ,61056 + ,77 + ,41566 + ,35 + ,0 + ,27 + ,13497 + ,2 + ,99923 + ,66 + ,44 + ,80 + ,32334 + ,36 + ,22648 + ,19 + ,12 + ,28 + ,44339 + ,24 + ,46698 + ,45 + ,14 + ,33 + ,10288 + ,14 + ,131698 + ,65 + ,60 + ,59 + ,65622 + ,78 + ,91735 + ,35 + ,7 + ,49 + ,16563 + ,15 + ,79863 + ,37 + ,29 + ,49 + ,29011 + ,24 + ,108043 + ,62 + ,45 + ,38 + ,34553 + ,40 + ,98866 + ,18 + ,25 + ,39 + ,23517 + ,50 + ,120445 + ,118 + ,36 + ,56 + ,51009 + ,63 + ,116048 + ,64 + ,50 + ,50 + ,33416 + ,63 + ,250047 + ,81 + ,41 + ,61 + ,83305 + ,55 + ,136084 + ,30 + ,27 + ,41 + ,27142 + ,40 + ,92499 + ,32 + ,25 + ,55 + ,21399 + ,21 + ,135781 + ,31 + ,45 + ,44 + ,24874 + ,32 + ,74408 + ,67 + ,29 + ,21 + ,34988 + ,36 + ,81240 + ,66 + ,58 + ,50 + ,45549 + ,13 + ,133368 + ,36 + ,37 + ,57 + ,32755 + ,57 + ,98146 + ,40 + ,15 + ,48 + ,27114 + ,21 + ,79619 + ,43 + ,42 + ,32 + ,20760 + ,43 + ,59194 + ,31 + ,7 + ,68 + ,37636 + ,20 + ,139942 + ,42 + ,54 + ,87 + ,65461 + ,82 + ,118612 + ,46 + ,54 + ,43 + ,30080 + ,90 + ,72880 + ,33 + ,14 + ,67 + ,24094 + ,25 + ,65475 + ,18 + ,16 + ,46 + ,69008 + ,60 + ,99643 + ,55 + ,33 + ,46 + ,54968 + ,61 + ,71965 + ,35 + ,32 + ,56 + ,46090 + ,85 + ,77272 + ,59 + ,21 + ,48 + ,27507 + ,43 + ,49289 + ,19 + ,15 + ,44 + ,10672 + ,25 + ,135131 + ,66 + ,38 + ,60 + ,34029 + ,41 + ,108446 + ,60 + ,22 + ,65 + ,46300 + ,26 + ,89746 + ,36 + ,28 + ,55 + ,24760 + ,38 + ,44296 + ,25 + ,10 + ,38 + ,18779 + ,12 + ,77648 + ,47 + ,31 + ,52 + ,21280 + ,29 + ,181528 + ,54 + ,32 + ,60 + ,40662 + ,49 + ,134019 + ,53 + ,32 + ,54 + ,28987 + ,46 + ,124064 + ,40 + ,43 + ,86 + ,22827 + ,41 + ,92630 + ,40 + ,27 + ,24 + ,18513 + ,31 + ,121848 + ,39 + ,37 + ,52 + ,30594 + ,41 + ,52915 + ,14 + ,20 + ,49 + ,24006 + ,26 + ,81872 + ,45 + ,32 + ,61 + ,27913 + ,23 + ,58981 + ,36 + ,0 + ,61 + ,42744 + ,14 + ,53515 + ,28 + ,5 + ,81 + ,12934 + ,16 + ,60812 + ,44 + ,26 + ,43 + ,22574 + ,25 + ,56375 + ,30 + ,10 + ,40 + ,41385 + ,21 + ,65490 + ,22 + ,27 + ,40 + ,18653 + ,32 + ,80949 + ,17 + ,11 + ,56 + ,18472 + ,9 + ,76302 + ,31 + ,29 + ,68 + ,30976 + ,35 + ,104011 + ,55 + ,25 + ,79 + ,63339 + ,42 + ,98104 + ,54 + ,55 + ,47 + ,25568 + ,68 + ,67989 + ,21 + ,23 + ,57 + ,33747 + ,32 + ,30989 + ,14 + ,5 + ,41 + ,4154 + ,6 + ,135458 + ,81 + ,43 + ,29 + ,19474 + ,68 + ,73504 + ,35 + ,23 + ,3 + ,35130 + ,33 + ,63123 + ,43 + ,34 + ,60 + ,39067 + ,84 + ,61254 + ,46 + ,36 + ,30 + ,13310 + ,46 + ,74914 + ,30 + ,35 + ,79 + ,65892 + ,30 + ,31774 + ,23 + ,0 + ,47 + ,4143 + ,0 + ,81437 + ,38 + ,37 + ,40 + ,28579 + ,36 + ,87186 + ,54 + ,28 + ,48 + ,51776 + ,47 + ,50090 + ,20 + ,16 + ,36 + ,21152 + ,20 + ,65745 + ,53 + ,26 + ,42 + ,38084 + ,50 + ,56653 + ,45 + ,38 + ,49 + ,27717 + ,30 + ,158399 + ,39 + ,23 + ,57 + ,32928 + ,30 + ,46455 + ,20 + ,22 + ,12 + ,11342 + ,34 + ,73624 + ,24 + ,30 + ,40 + ,19499 + ,33 + ,38395 + ,31 + ,16 + ,43 + ,16380 + ,34 + ,91899 + ,35 + ,18 + ,33 + ,36874 + ,37 + ,139526 + ,151 + ,28 + ,77 + ,48259 + ,83 + ,52164 + ,52 + ,32 + ,43 + ,16734 + ,32 + ,51567 + ,30 + ,21 + ,45 + ,28207 + ,30 + ,70551 + ,31 + ,23 + ,47 + ,30143 + ,43 + ,84856 + ,29 + ,29 + ,43 + ,41369 + ,41 + ,102538 + ,57 + ,50 + ,45 + ,45833 + ,51 + ,86678 + ,40 + ,12 + ,50 + ,29156 + ,19 + ,85709 + ,44 + ,21 + ,35 + ,35944 + ,37 + ,34662 + ,25 + ,18 + ,7 + ,36278 + ,33 + ,150580 + ,77 + ,27 + ,71 + ,45588 + ,41 + ,99611 + ,35 + ,41 + ,67 + ,45097 + ,54 + ,19349 + ,11 + ,13 + ,0 + ,3895 + ,14 + ,99373 + ,63 + ,12 + ,62 + ,28394 + ,25 + ,86230 + ,44 + ,21 + ,54 + ,18632 + ,25 + ,30837 + ,19 + ,8 + ,4 + ,2325 + ,8 + ,31706 + ,13 + ,26 + ,25 + ,25139 + ,26 + ,89806 + ,42 + ,27 + ,40 + ,27975 + ,20 + ,62088 + ,38 + ,13 + ,38 + ,14483 + ,11 + ,40151 + ,29 + ,16 + ,19 + ,13127 + ,14 + ,27634 + ,20 + ,2 + ,17 + ,5839 + ,3 + ,76990 + ,27 + ,42 + ,67 + ,24069 + ,40 + ,37460 + ,20 + ,5 + ,14 + ,3738 + ,5 + ,54157 + ,19 + ,37 + ,30 + ,18625 + ,38 + ,49862 + ,37 + ,17 + ,54 + ,36341 + ,32 + ,84337 + ,26 + ,38 + ,35 + ,24548 + ,41 + ,64175 + ,42 + ,37 + ,59 + ,21792 + ,46 + ,59382 + ,49 + ,29 + ,24 + ,26263 + ,47 + ,119308 + ,30 + ,32 + ,58 + ,23686 + ,37 + ,76702 + ,49 + ,35 + ,42 + ,49303 + ,51 + ,103425 + ,67 + ,17 + ,46 + ,25659 + ,49 + ,70344 + ,28 + ,20 + ,61 + ,28904 + ,21 + ,43410 + ,19 + ,7 + ,3 + ,2781 + ,1 + ,104838 + ,49 + ,46 + ,52 + ,29236 + ,44 + ,62215 + ,27 + ,24 + ,25 + ,19546 + ,26 + ,69304 + ,30 + ,40 + ,40 + ,22818 + ,21 + ,53117 + ,22 + ,3 + ,32 + ,32689 + ,4 + ,19764 + ,12 + ,10 + ,4 + ,5752 + ,10 + ,86680 + ,31 + ,37 + ,49 + ,22197 + ,43 + ,84105 + ,20 + ,17 + ,63 + ,20055 + ,34 + ,77945 + ,20 + ,28 + ,67 + ,25272 + ,32 + ,89113 + ,39 + ,19 + ,32 + ,82206 + ,20 + ,91005 + ,29 + ,29 + ,23 + ,32073 + ,34 + ,40248 + ,16 + ,8 + ,7 + ,5444 + ,6 + ,64187 + ,27 + ,10 + ,54 + ,20154 + ,12 + ,50857 + ,21 + ,15 + ,37 + ,36944 + ,24 + ,56613 + ,19 + ,15 + ,35 + ,8019 + ,16 + ,62792 + ,35 + ,28 + ,51 + ,30884 + ,72 + ,72535 + ,14 + ,17 + ,39 + ,19540 + ,27) + ,dim=c(6 + ,133) + ,dimnames=list(c('time_in_rfc' + ,'logins' + ,'blogged_computations' + ,'feedback_messages_p120' + ,'totsize' + ,'tothyperlinks ') + ,1:133)) > y <- array(NA,dim=c(6,133),dimnames=list(c('time_in_rfc','logins','blogged_computations','feedback_messages_p120','totsize','tothyperlinks '),1:133)) > 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 time_in_rfc logins blogged_computations feedback_messages_p120 totsize 1 101645 63 20 38 17140 2 101011 34 30 39 27570 3 7176 17 0 0 1423 4 96560 76 42 38 22996 5 175824 107 57 77 39992 6 341570 168 94 78 117105 7 103597 43 27 49 23789 8 112611 41 46 73 26706 9 85574 34 37 36 24266 10 220801 75 51 63 44418 11 92661 61 40 41 35232 12 133328 55 56 56 40909 13 61361 77 27 25 13294 14 125930 75 37 65 32387 15 82316 32 27 38 21233 16 102010 53 28 44 44332 17 101523 42 59 87 61056 18 41566 35 0 27 13497 19 99923 66 44 80 32334 20 22648 19 12 28 44339 21 46698 45 14 33 10288 22 131698 65 60 59 65622 23 91735 35 7 49 16563 24 79863 37 29 49 29011 25 108043 62 45 38 34553 26 98866 18 25 39 23517 27 120445 118 36 56 51009 28 116048 64 50 50 33416 29 250047 81 41 61 83305 30 136084 30 27 41 27142 31 92499 32 25 55 21399 32 135781 31 45 44 24874 33 74408 67 29 21 34988 34 81240 66 58 50 45549 35 133368 36 37 57 32755 36 98146 40 15 48 27114 37 79619 43 42 32 20760 38 59194 31 7 68 37636 39 139942 42 54 87 65461 40 118612 46 54 43 30080 41 72880 33 14 67 24094 42 65475 18 16 46 69008 43 99643 55 33 46 54968 44 71965 35 32 56 46090 45 77272 59 21 48 27507 46 49289 19 15 44 10672 47 135131 66 38 60 34029 48 108446 60 22 65 46300 49 89746 36 28 55 24760 50 44296 25 10 38 18779 51 77648 47 31 52 21280 52 181528 54 32 60 40662 53 134019 53 32 54 28987 54 124064 40 43 86 22827 55 92630 40 27 24 18513 56 121848 39 37 52 30594 57 52915 14 20 49 24006 58 81872 45 32 61 27913 59 58981 36 0 61 42744 60 53515 28 5 81 12934 61 60812 44 26 43 22574 62 56375 30 10 40 41385 63 65490 22 27 40 18653 64 80949 17 11 56 18472 65 76302 31 29 68 30976 66 104011 55 25 79 63339 67 98104 54 55 47 25568 68 67989 21 23 57 33747 69 30989 14 5 41 4154 70 135458 81 43 29 19474 71 73504 35 23 3 35130 72 63123 43 34 60 39067 73 61254 46 36 30 13310 74 74914 30 35 79 65892 75 31774 23 0 47 4143 76 81437 38 37 40 28579 77 87186 54 28 48 51776 78 50090 20 16 36 21152 79 65745 53 26 42 38084 80 56653 45 38 49 27717 81 158399 39 23 57 32928 82 46455 20 22 12 11342 83 73624 24 30 40 19499 84 38395 31 16 43 16380 85 91899 35 18 33 36874 86 139526 151 28 77 48259 87 52164 52 32 43 16734 88 51567 30 21 45 28207 89 70551 31 23 47 30143 90 84856 29 29 43 41369 91 102538 57 50 45 45833 92 86678 40 12 50 29156 93 85709 44 21 35 35944 94 34662 25 18 7 36278 95 150580 77 27 71 45588 96 99611 35 41 67 45097 97 19349 11 13 0 3895 98 99373 63 12 62 28394 99 86230 44 21 54 18632 100 30837 19 8 4 2325 101 31706 13 26 25 25139 102 89806 42 27 40 27975 103 62088 38 13 38 14483 104 40151 29 16 19 13127 105 27634 20 2 17 5839 106 76990 27 42 67 24069 107 37460 20 5 14 3738 108 54157 19 37 30 18625 109 49862 37 17 54 36341 110 84337 26 38 35 24548 111 64175 42 37 59 21792 112 59382 49 29 24 26263 113 119308 30 32 58 23686 114 76702 49 35 42 49303 115 103425 67 17 46 25659 116 70344 28 20 61 28904 117 43410 19 7 3 2781 118 104838 49 46 52 29236 119 62215 27 24 25 19546 120 69304 30 40 40 22818 121 53117 22 3 32 32689 122 19764 12 10 4 5752 123 86680 31 37 49 22197 124 84105 20 17 63 20055 125 77945 20 28 67 25272 126 89113 39 19 32 82206 127 91005 29 29 23 32073 128 40248 16 8 7 5444 129 64187 27 10 54 20154 130 50857 21 15 37 36944 131 56613 19 15 35 8019 132 62792 35 28 51 30884 133 72535 14 17 39 19540 tothyperlinks\r 1 28 2 35 3 0 4 47 5 70 6 135 7 26 8 48 9 40 10 66 11 39 12 66 13 27 14 65 15 25 16 26 17 77 18 2 19 36 20 24 21 14 22 78 23 15 24 24 25 40 26 50 27 63 28 63 29 55 30 40 31 21 32 32 33 36 34 13 35 57 36 21 37 43 38 20 39 82 40 90 41 25 42 60 43 61 44 85 45 43 46 25 47 41 48 26 49 38 50 12 51 29 52 49 53 46 54 41 55 31 56 41 57 26 58 23 59 14 60 16 61 25 62 21 63 32 64 9 65 35 66 42 67 68 68 32 69 6 70 68 71 33 72 84 73 46 74 30 75 0 76 36 77 47 78 20 79 50 80 30 81 30 82 34 83 33 84 34 85 37 86 83 87 32 88 30 89 43 90 41 91 51 92 19 93 37 94 33 95 41 96 54 97 14 98 25 99 25 100 8 101 26 102 20 103 11 104 14 105 3 106 40 107 5 108 38 109 32 110 41 111 46 112 47 113 37 114 51 115 49 116 21 117 1 118 44 119 26 120 21 121 4 122 10 123 43 124 34 125 32 126 20 127 34 128 6 129 12 130 24 131 16 132 72 133 27 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) logins blogged_computations 1248.5303 672.4887 830.7121 feedback_messages_p120 totsize `tothyperlinks\r` 388.2222 0.4785 40.6794 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -54310 -14746 -2529 11181 94486 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1248.5303 6206.2845 0.201 0.840886 logins 672.4887 122.9729 5.469 2.31e-07 *** blogged_computations 830.7121 236.2986 3.516 0.000609 *** feedback_messages_p120 388.2222 139.0698 2.792 0.006056 ** totsize 0.4785 0.1762 2.716 0.007529 ** `tothyperlinks\r` 40.6794 186.1188 0.219 0.827338 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 25410 on 127 degrees of freedom Multiple R-squared: 0.6798, Adjusted R-squared: 0.6672 F-statistic: 53.93 on 5 and 127 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.04649216 9.298433e-02 9.535078e-01 [2,] 0.59900704 8.019859e-01 4.009930e-01 [3,] 0.46930073 9.386015e-01 5.306993e-01 [4,] 0.37829432 7.565886e-01 6.217057e-01 [5,] 0.27821089 5.564218e-01 7.217891e-01 [6,] 0.58984566 8.203087e-01 4.101543e-01 [7,] 0.48791374 9.758275e-01 5.120863e-01 [8,] 0.49125832 9.825166e-01 5.087417e-01 [9,] 0.91062265 1.787547e-01 8.937735e-02 [10,] 0.87297738 2.540452e-01 1.270226e-01 [11,] 0.84858859 3.028228e-01 1.514114e-01 [12,] 0.89347720 2.130456e-01 1.065228e-01 [13,] 0.85991894 2.801621e-01 1.400811e-01 [14,] 0.86048748 2.790250e-01 1.395125e-01 [15,] 0.88373918 2.325216e-01 1.162608e-01 [16,] 0.84787477 3.042505e-01 1.521252e-01 [17,] 0.80331138 3.933772e-01 1.966886e-01 [18,] 0.80415211 3.916958e-01 1.958479e-01 [19,] 0.90955777 1.808845e-01 9.044223e-02 [20,] 0.88920105 2.215979e-01 1.107990e-01 [21,] 0.99667830 6.643403e-03 3.321701e-03 [22,] 0.99943438 1.131232e-03 5.656161e-04 [23,] 0.99922501 1.549980e-03 7.749898e-04 [24,] 0.99979072 4.185519e-04 2.092759e-04 [25,] 0.99975969 4.806286e-04 2.403143e-04 [26,] 0.99987984 2.403228e-04 1.201614e-04 [27,] 0.99990829 1.834104e-04 9.170522e-05 [28,] 0.99988583 2.283311e-04 1.141656e-04 [29,] 0.99981093 3.781348e-04 1.890674e-04 [30,] 0.99982479 3.504229e-04 1.752115e-04 [31,] 0.99982635 3.473037e-04 1.736519e-04 [32,] 0.99978044 4.391244e-04 2.195622e-04 [33,] 0.99964511 7.097893e-04 3.548947e-04 [34,] 0.99975385 4.923056e-04 2.461528e-04 [35,] 0.99968374 6.325197e-04 3.162598e-04 [36,] 0.99974359 5.128142e-04 2.564071e-04 [37,] 0.99964445 7.111055e-04 3.555527e-04 [38,] 0.99942906 1.141872e-03 5.709360e-04 [39,] 0.99927933 1.441344e-03 7.206718e-04 [40,] 0.99887972 2.240557e-03 1.120279e-03 [41,] 0.99832843 3.343145e-03 1.671572e-03 [42,] 0.99757546 4.849077e-03 2.424538e-03 [43,] 0.99669744 6.605117e-03 3.302558e-03 [44,] 0.99992109 1.578131e-04 7.890653e-05 [45,] 0.99996085 7.830270e-05 3.915135e-05 [46,] 0.99994929 1.014100e-04 5.070502e-05 [47,] 0.99994899 1.020136e-04 5.100679e-05 [48,] 0.99996717 6.565610e-05 3.282805e-05 [49,] 0.99994590 1.081937e-04 5.409684e-05 [50,] 0.99992034 1.593292e-04 7.966461e-05 [51,] 0.99988620 2.275984e-04 1.137992e-04 [52,] 0.99984316 3.136777e-04 1.568389e-04 [53,] 0.99981462 3.707573e-04 1.853787e-04 [54,] 0.99972063 5.587358e-04 2.793679e-04 [55,] 0.99955405 8.919016e-04 4.459508e-04 [56,] 0.99956810 8.637965e-04 4.318982e-04 [57,] 0.99937706 1.245870e-03 6.229350e-04 [58,] 0.99915554 1.688920e-03 8.444599e-04 [59,] 0.99889385 2.212299e-03 1.106149e-03 [60,] 0.99832925 3.341499e-03 1.670749e-03 [61,] 0.99767776 4.644486e-03 2.322243e-03 [62,] 0.99864029 2.719411e-03 1.359706e-03 [63,] 0.99837389 3.252227e-03 1.626113e-03 [64,] 0.99891224 2.175524e-03 1.087762e-03 [65,] 0.99855215 2.895701e-03 1.447850e-03 [66,] 0.99931351 1.372973e-03 6.864864e-04 [67,] 0.99928060 1.438794e-03 7.193968e-04 [68,] 0.99888186 2.236288e-03 1.118144e-03 [69,] 0.99847203 3.055930e-03 1.527965e-03 [70,] 0.99775753 4.484940e-03 2.242470e-03 [71,] 0.99767028 4.659435e-03 2.329718e-03 [72,] 0.99871834 2.563318e-03 1.281659e-03 [73,] 0.99999289 1.422628e-05 7.113141e-06 [74,] 0.99998744 2.511486e-05 1.255743e-05 [75,] 0.99997839 4.321139e-05 2.160570e-05 [76,] 0.99998177 3.645976e-05 1.822988e-05 [77,] 0.99998602 2.795937e-05 1.397969e-05 [78,] 0.99998965 2.069782e-05 1.034891e-05 [79,] 0.99999773 4.537069e-06 2.268535e-06 [80,] 0.99999765 4.696502e-06 2.348251e-06 [81,] 0.99999517 9.665320e-06 4.832660e-06 [82,] 0.99999201 1.597108e-05 7.985538e-06 [83,] 0.99998606 2.787360e-05 1.393680e-05 [84,] 0.99997521 4.958665e-05 2.479332e-05 [85,] 0.99995808 8.384239e-05 4.192119e-05 [86,] 0.99993126 1.374870e-04 6.874352e-05 [87,] 0.99995399 9.201185e-05 4.600593e-05 [88,] 0.99991336 1.732865e-04 8.664326e-05 [89,] 0.99984491 3.101841e-04 1.550920e-04 [90,] 0.99971523 5.695361e-04 2.847681e-04 [91,] 0.99948821 1.023578e-03 5.117888e-04 [92,] 0.99908225 1.835509e-03 9.177544e-04 [93,] 0.99917060 1.658805e-03 8.294025e-04 [94,] 0.99873904 2.521919e-03 1.260959e-03 [95,] 0.99775147 4.497057e-03 2.248528e-03 [96,] 0.99676346 6.473081e-03 3.236541e-03 [97,] 0.99536544 9.269125e-03 4.634562e-03 [98,] 0.99358728 1.282544e-02 6.412718e-03 [99,] 0.98944497 2.111006e-02 1.055503e-02 [100,] 0.98551547 2.896906e-02 1.448453e-02 [101,] 0.99055113 1.889774e-02 9.448868e-03 [102,] 0.98613754 2.772492e-02 1.386246e-02 [103,] 0.99222435 1.555131e-02 7.775653e-03 [104,] 0.99091741 1.816518e-02 9.082588e-03 [105,] 0.99813669 3.726616e-03 1.863308e-03 [106,] 0.99826145 3.477106e-03 1.738553e-03 [107,] 0.99697784 6.044327e-03 3.022163e-03 [108,] 0.99431447 1.137105e-02 5.685527e-03 [109,] 0.98976653 2.046693e-02 1.023347e-02 [110,] 0.98072632 3.854737e-02 1.927368e-02 [111,] 0.96124250 7.751501e-02 3.875750e-02 [112,] 0.96331001 7.337998e-02 3.668999e-02 [113,] 0.92519847 1.496031e-01 7.480153e-02 [114,] 0.92401344 1.519731e-01 7.598656e-02 [115,] 0.84985762 3.002848e-01 1.501424e-01 [116,] 0.87183248 2.563350e-01 1.281675e-01 > postscript(file="/var/wessaorg/rcomp/tmp/1lak81324653465.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/2sq251324653465.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/36uu11324653465.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/43n641324653465.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/5ufzc1324653465.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 = 133 Frequency = 1 1 2 3 4 5 6 17322.3010 22219.5094 -6185.7590 -18355.7854 3391.3256 57447.3974 7 8 9 10 11 12 19538.3888 2505.7411 3509.7930 78352.1776 -17200.3167 4572.0402 13 14 15 16 17 18 -31263.6063 132.3424 11188.9610 2506.8583 -43105.6563 -241.4499 19 20 21 22 23 24 -30255.5119 -34409.5677 -14746.2524 -20583.9462 33575.7314 -4239.5264 25 26 27 28 29 30 -5195.4701 36317.1010 -38774.4250 -7739.2347 94486.4449 61699.5615 31 32 33 34 35 36 16516.8931 46017.2859 -22347.1774 -54309.7056 37052.5233 25073.9719 37 38 39 40 41 42 -9542.6575 -13938.5851 -2844.3319 6822.2354 -747.7324 -14489.7630 43 44 45 46 47 48 -12648.3424 -26656.1676 -14644.5885 -402.9238 16686.7318 125.3353 49 50 51 52 53 54 6281.9776 -6298.4148 -12509.5364 72638.4730 33839.9437 14217.3762 55 56 57 58 59 60 22615.6339 27141.1003 -5930.2907 -14195.1545 -11181.6440 -9002.6979 61 62 63 64 65 66 -20136.9850 -9541.6271 1261.2049 28184.7245 -12529.5626 -17678.6801 67 68 69 70 71 72 -18395.2879 -6066.8733 -1976.8517 20674.1045 10294.8231 -40691.1313 73 74 75 76 77 78 -20721.5414 -39004.0675 -5170.6825 -6771.1489 -18958.8198 -2810.7405 79 80 81 82 83 84 -29306.8457 -39930.7289 72711.5889 2011.9957 5112.5919 -22906.7314 85 86 87 88 89 90 20199.4780 -42890.2062 -36639.4217 -19488.8740 -5070.4603 1857.7327 91 92 93 94 95 96 -20054.2151 14425.9041 5133.5137 -19770.9481 24074.6416 -9020.7971 97 98 99 100 101 102 -2529.4741 7115.5460 7050.4200 7174.6261 -22675.8946 8154.9086 103 104 105 106 107 108 2355.4564 -8118.2381 1758.4327 -16460.9676 11180.9548 -12709.9064 109 110 111 112 113 114 -30046.0099 7034.5933 -31258.4684 -22705.5164 35945.9947 -28545.3890 115 116 117 118 119 120 10868.0055 -4715.1463 21033.1156 -3542.4167 2755.9971 -12649.4847 121 122 123 124 125 126 6353.7229 -2573.5916 2454.3708 19846.9625 581.2100 -6719.2565 127 128 129 130 131 132 20504.1664 16027.3102 5378.1008 -9993.0956 12050.6792 -22760.1443 133 22160.4161 > postscript(file="/var/wessaorg/rcomp/tmp/626ag1324653465.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 = 133 Frequency = 1 lag(myerror, k = 1) myerror 0 17322.3010 NA 1 22219.5094 17322.3010 2 -6185.7590 22219.5094 3 -18355.7854 -6185.7590 4 3391.3256 -18355.7854 5 57447.3974 3391.3256 6 19538.3888 57447.3974 7 2505.7411 19538.3888 8 3509.7930 2505.7411 9 78352.1776 3509.7930 10 -17200.3167 78352.1776 11 4572.0402 -17200.3167 12 -31263.6063 4572.0402 13 132.3424 -31263.6063 14 11188.9610 132.3424 15 2506.8583 11188.9610 16 -43105.6563 2506.8583 17 -241.4499 -43105.6563 18 -30255.5119 -241.4499 19 -34409.5677 -30255.5119 20 -14746.2524 -34409.5677 21 -20583.9462 -14746.2524 22 33575.7314 -20583.9462 23 -4239.5264 33575.7314 24 -5195.4701 -4239.5264 25 36317.1010 -5195.4701 26 -38774.4250 36317.1010 27 -7739.2347 -38774.4250 28 94486.4449 -7739.2347 29 61699.5615 94486.4449 30 16516.8931 61699.5615 31 46017.2859 16516.8931 32 -22347.1774 46017.2859 33 -54309.7056 -22347.1774 34 37052.5233 -54309.7056 35 25073.9719 37052.5233 36 -9542.6575 25073.9719 37 -13938.5851 -9542.6575 38 -2844.3319 -13938.5851 39 6822.2354 -2844.3319 40 -747.7324 6822.2354 41 -14489.7630 -747.7324 42 -12648.3424 -14489.7630 43 -26656.1676 -12648.3424 44 -14644.5885 -26656.1676 45 -402.9238 -14644.5885 46 16686.7318 -402.9238 47 125.3353 16686.7318 48 6281.9776 125.3353 49 -6298.4148 6281.9776 50 -12509.5364 -6298.4148 51 72638.4730 -12509.5364 52 33839.9437 72638.4730 53 14217.3762 33839.9437 54 22615.6339 14217.3762 55 27141.1003 22615.6339 56 -5930.2907 27141.1003 57 -14195.1545 -5930.2907 58 -11181.6440 -14195.1545 59 -9002.6979 -11181.6440 60 -20136.9850 -9002.6979 61 -9541.6271 -20136.9850 62 1261.2049 -9541.6271 63 28184.7245 1261.2049 64 -12529.5626 28184.7245 65 -17678.6801 -12529.5626 66 -18395.2879 -17678.6801 67 -6066.8733 -18395.2879 68 -1976.8517 -6066.8733 69 20674.1045 -1976.8517 70 10294.8231 20674.1045 71 -40691.1313 10294.8231 72 -20721.5414 -40691.1313 73 -39004.0675 -20721.5414 74 -5170.6825 -39004.0675 75 -6771.1489 -5170.6825 76 -18958.8198 -6771.1489 77 -2810.7405 -18958.8198 78 -29306.8457 -2810.7405 79 -39930.7289 -29306.8457 80 72711.5889 -39930.7289 81 2011.9957 72711.5889 82 5112.5919 2011.9957 83 -22906.7314 5112.5919 84 20199.4780 -22906.7314 85 -42890.2062 20199.4780 86 -36639.4217 -42890.2062 87 -19488.8740 -36639.4217 88 -5070.4603 -19488.8740 89 1857.7327 -5070.4603 90 -20054.2151 1857.7327 91 14425.9041 -20054.2151 92 5133.5137 14425.9041 93 -19770.9481 5133.5137 94 24074.6416 -19770.9481 95 -9020.7971 24074.6416 96 -2529.4741 -9020.7971 97 7115.5460 -2529.4741 98 7050.4200 7115.5460 99 7174.6261 7050.4200 100 -22675.8946 7174.6261 101 8154.9086 -22675.8946 102 2355.4564 8154.9086 103 -8118.2381 2355.4564 104 1758.4327 -8118.2381 105 -16460.9676 1758.4327 106 11180.9548 -16460.9676 107 -12709.9064 11180.9548 108 -30046.0099 -12709.9064 109 7034.5933 -30046.0099 110 -31258.4684 7034.5933 111 -22705.5164 -31258.4684 112 35945.9947 -22705.5164 113 -28545.3890 35945.9947 114 10868.0055 -28545.3890 115 -4715.1463 10868.0055 116 21033.1156 -4715.1463 117 -3542.4167 21033.1156 118 2755.9971 -3542.4167 119 -12649.4847 2755.9971 120 6353.7229 -12649.4847 121 -2573.5916 6353.7229 122 2454.3708 -2573.5916 123 19846.9625 2454.3708 124 581.2100 19846.9625 125 -6719.2565 581.2100 126 20504.1664 -6719.2565 127 16027.3102 20504.1664 128 5378.1008 16027.3102 129 -9993.0956 5378.1008 130 12050.6792 -9993.0956 131 -22760.1443 12050.6792 132 22160.4161 -22760.1443 133 NA 22160.4161 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 22219.5094 17322.3010 [2,] -6185.7590 22219.5094 [3,] -18355.7854 -6185.7590 [4,] 3391.3256 -18355.7854 [5,] 57447.3974 3391.3256 [6,] 19538.3888 57447.3974 [7,] 2505.7411 19538.3888 [8,] 3509.7930 2505.7411 [9,] 78352.1776 3509.7930 [10,] -17200.3167 78352.1776 [11,] 4572.0402 -17200.3167 [12,] -31263.6063 4572.0402 [13,] 132.3424 -31263.6063 [14,] 11188.9610 132.3424 [15,] 2506.8583 11188.9610 [16,] -43105.6563 2506.8583 [17,] -241.4499 -43105.6563 [18,] -30255.5119 -241.4499 [19,] -34409.5677 -30255.5119 [20,] -14746.2524 -34409.5677 [21,] -20583.9462 -14746.2524 [22,] 33575.7314 -20583.9462 [23,] -4239.5264 33575.7314 [24,] -5195.4701 -4239.5264 [25,] 36317.1010 -5195.4701 [26,] -38774.4250 36317.1010 [27,] -7739.2347 -38774.4250 [28,] 94486.4449 -7739.2347 [29,] 61699.5615 94486.4449 [30,] 16516.8931 61699.5615 [31,] 46017.2859 16516.8931 [32,] -22347.1774 46017.2859 [33,] -54309.7056 -22347.1774 [34,] 37052.5233 -54309.7056 [35,] 25073.9719 37052.5233 [36,] -9542.6575 25073.9719 [37,] -13938.5851 -9542.6575 [38,] -2844.3319 -13938.5851 [39,] 6822.2354 -2844.3319 [40,] -747.7324 6822.2354 [41,] -14489.7630 -747.7324 [42,] -12648.3424 -14489.7630 [43,] -26656.1676 -12648.3424 [44,] -14644.5885 -26656.1676 [45,] -402.9238 -14644.5885 [46,] 16686.7318 -402.9238 [47,] 125.3353 16686.7318 [48,] 6281.9776 125.3353 [49,] -6298.4148 6281.9776 [50,] -12509.5364 -6298.4148 [51,] 72638.4730 -12509.5364 [52,] 33839.9437 72638.4730 [53,] 14217.3762 33839.9437 [54,] 22615.6339 14217.3762 [55,] 27141.1003 22615.6339 [56,] -5930.2907 27141.1003 [57,] -14195.1545 -5930.2907 [58,] -11181.6440 -14195.1545 [59,] -9002.6979 -11181.6440 [60,] -20136.9850 -9002.6979 [61,] -9541.6271 -20136.9850 [62,] 1261.2049 -9541.6271 [63,] 28184.7245 1261.2049 [64,] -12529.5626 28184.7245 [65,] -17678.6801 -12529.5626 [66,] -18395.2879 -17678.6801 [67,] -6066.8733 -18395.2879 [68,] -1976.8517 -6066.8733 [69,] 20674.1045 -1976.8517 [70,] 10294.8231 20674.1045 [71,] -40691.1313 10294.8231 [72,] -20721.5414 -40691.1313 [73,] -39004.0675 -20721.5414 [74,] -5170.6825 -39004.0675 [75,] -6771.1489 -5170.6825 [76,] -18958.8198 -6771.1489 [77,] -2810.7405 -18958.8198 [78,] -29306.8457 -2810.7405 [79,] -39930.7289 -29306.8457 [80,] 72711.5889 -39930.7289 [81,] 2011.9957 72711.5889 [82,] 5112.5919 2011.9957 [83,] -22906.7314 5112.5919 [84,] 20199.4780 -22906.7314 [85,] -42890.2062 20199.4780 [86,] -36639.4217 -42890.2062 [87,] -19488.8740 -36639.4217 [88,] -5070.4603 -19488.8740 [89,] 1857.7327 -5070.4603 [90,] -20054.2151 1857.7327 [91,] 14425.9041 -20054.2151 [92,] 5133.5137 14425.9041 [93,] -19770.9481 5133.5137 [94,] 24074.6416 -19770.9481 [95,] -9020.7971 24074.6416 [96,] -2529.4741 -9020.7971 [97,] 7115.5460 -2529.4741 [98,] 7050.4200 7115.5460 [99,] 7174.6261 7050.4200 [100,] -22675.8946 7174.6261 [101,] 8154.9086 -22675.8946 [102,] 2355.4564 8154.9086 [103,] -8118.2381 2355.4564 [104,] 1758.4327 -8118.2381 [105,] -16460.9676 1758.4327 [106,] 11180.9548 -16460.9676 [107,] -12709.9064 11180.9548 [108,] -30046.0099 -12709.9064 [109,] 7034.5933 -30046.0099 [110,] -31258.4684 7034.5933 [111,] -22705.5164 -31258.4684 [112,] 35945.9947 -22705.5164 [113,] -28545.3890 35945.9947 [114,] 10868.0055 -28545.3890 [115,] -4715.1463 10868.0055 [116,] 21033.1156 -4715.1463 [117,] -3542.4167 21033.1156 [118,] 2755.9971 -3542.4167 [119,] -12649.4847 2755.9971 [120,] 6353.7229 -12649.4847 [121,] -2573.5916 6353.7229 [122,] 2454.3708 -2573.5916 [123,] 19846.9625 2454.3708 [124,] 581.2100 19846.9625 [125,] -6719.2565 581.2100 [126,] 20504.1664 -6719.2565 [127,] 16027.3102 20504.1664 [128,] 5378.1008 16027.3102 [129,] -9993.0956 5378.1008 [130,] 12050.6792 -9993.0956 [131,] -22760.1443 12050.6792 [132,] 22160.4161 -22760.1443 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 22219.5094 17322.3010 2 -6185.7590 22219.5094 3 -18355.7854 -6185.7590 4 3391.3256 -18355.7854 5 57447.3974 3391.3256 6 19538.3888 57447.3974 7 2505.7411 19538.3888 8 3509.7930 2505.7411 9 78352.1776 3509.7930 10 -17200.3167 78352.1776 11 4572.0402 -17200.3167 12 -31263.6063 4572.0402 13 132.3424 -31263.6063 14 11188.9610 132.3424 15 2506.8583 11188.9610 16 -43105.6563 2506.8583 17 -241.4499 -43105.6563 18 -30255.5119 -241.4499 19 -34409.5677 -30255.5119 20 -14746.2524 -34409.5677 21 -20583.9462 -14746.2524 22 33575.7314 -20583.9462 23 -4239.5264 33575.7314 24 -5195.4701 -4239.5264 25 36317.1010 -5195.4701 26 -38774.4250 36317.1010 27 -7739.2347 -38774.4250 28 94486.4449 -7739.2347 29 61699.5615 94486.4449 30 16516.8931 61699.5615 31 46017.2859 16516.8931 32 -22347.1774 46017.2859 33 -54309.7056 -22347.1774 34 37052.5233 -54309.7056 35 25073.9719 37052.5233 36 -9542.6575 25073.9719 37 -13938.5851 -9542.6575 38 -2844.3319 -13938.5851 39 6822.2354 -2844.3319 40 -747.7324 6822.2354 41 -14489.7630 -747.7324 42 -12648.3424 -14489.7630 43 -26656.1676 -12648.3424 44 -14644.5885 -26656.1676 45 -402.9238 -14644.5885 46 16686.7318 -402.9238 47 125.3353 16686.7318 48 6281.9776 125.3353 49 -6298.4148 6281.9776 50 -12509.5364 -6298.4148 51 72638.4730 -12509.5364 52 33839.9437 72638.4730 53 14217.3762 33839.9437 54 22615.6339 14217.3762 55 27141.1003 22615.6339 56 -5930.2907 27141.1003 57 -14195.1545 -5930.2907 58 -11181.6440 -14195.1545 59 -9002.6979 -11181.6440 60 -20136.9850 -9002.6979 61 -9541.6271 -20136.9850 62 1261.2049 -9541.6271 63 28184.7245 1261.2049 64 -12529.5626 28184.7245 65 -17678.6801 -12529.5626 66 -18395.2879 -17678.6801 67 -6066.8733 -18395.2879 68 -1976.8517 -6066.8733 69 20674.1045 -1976.8517 70 10294.8231 20674.1045 71 -40691.1313 10294.8231 72 -20721.5414 -40691.1313 73 -39004.0675 -20721.5414 74 -5170.6825 -39004.0675 75 -6771.1489 -5170.6825 76 -18958.8198 -6771.1489 77 -2810.7405 -18958.8198 78 -29306.8457 -2810.7405 79 -39930.7289 -29306.8457 80 72711.5889 -39930.7289 81 2011.9957 72711.5889 82 5112.5919 2011.9957 83 -22906.7314 5112.5919 84 20199.4780 -22906.7314 85 -42890.2062 20199.4780 86 -36639.4217 -42890.2062 87 -19488.8740 -36639.4217 88 -5070.4603 -19488.8740 89 1857.7327 -5070.4603 90 -20054.2151 1857.7327 91 14425.9041 -20054.2151 92 5133.5137 14425.9041 93 -19770.9481 5133.5137 94 24074.6416 -19770.9481 95 -9020.7971 24074.6416 96 -2529.4741 -9020.7971 97 7115.5460 -2529.4741 98 7050.4200 7115.5460 99 7174.6261 7050.4200 100 -22675.8946 7174.6261 101 8154.9086 -22675.8946 102 2355.4564 8154.9086 103 -8118.2381 2355.4564 104 1758.4327 -8118.2381 105 -16460.9676 1758.4327 106 11180.9548 -16460.9676 107 -12709.9064 11180.9548 108 -30046.0099 -12709.9064 109 7034.5933 -30046.0099 110 -31258.4684 7034.5933 111 -22705.5164 -31258.4684 112 35945.9947 -22705.5164 113 -28545.3890 35945.9947 114 10868.0055 -28545.3890 115 -4715.1463 10868.0055 116 21033.1156 -4715.1463 117 -3542.4167 21033.1156 118 2755.9971 -3542.4167 119 -12649.4847 2755.9971 120 6353.7229 -12649.4847 121 -2573.5916 6353.7229 122 2454.3708 -2573.5916 123 19846.9625 2454.3708 124 581.2100 19846.9625 125 -6719.2565 581.2100 126 20504.1664 -6719.2565 127 16027.3102 20504.1664 128 5378.1008 16027.3102 129 -9993.0956 5378.1008 130 12050.6792 -9993.0956 131 -22760.1443 12050.6792 132 22160.4161 -22760.1443 > 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/7q0nv1324653465.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/8uk1g1324653465.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/9vmon1324653465.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/10drsj1324653465.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/11lmlp1324653466.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/12aru41324653466.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/136uh91324653466.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/141rqr1324653466.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/15sdnm1324653466.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/16xo2s1324653466.tab") + } > > try(system("convert tmp/1lak81324653465.ps tmp/1lak81324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/2sq251324653465.ps tmp/2sq251324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/36uu11324653465.ps tmp/36uu11324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/43n641324653465.ps tmp/43n641324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/5ufzc1324653465.ps tmp/5ufzc1324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/626ag1324653465.ps tmp/626ag1324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/7q0nv1324653465.ps tmp/7q0nv1324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/8uk1g1324653465.ps tmp/8uk1g1324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/9vmon1324653465.ps tmp/9vmon1324653465.png",intern=TRUE)) character(0) > try(system("convert tmp/10drsj1324653465.ps tmp/10drsj1324653465.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.345 0.601 4.979