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(63031 + ,68 + ,13 + ,5 + ,20 + ,10345 + ,66751 + ,17 + ,26 + ,7 + ,21 + ,17607 + ,7176 + ,1 + ,0 + ,0 + ,0 + ,1423 + ,78306 + ,114 + ,37 + ,12 + ,28 + ,20050 + ,137944 + ,95 + ,47 + ,15 + ,59 + ,21212 + ,261308 + ,148 + ,80 + ,16 + ,58 + ,93979 + ,69266 + ,56 + ,21 + ,12 + ,36 + ,15524 + ,80226 + ,26 + ,36 + ,13 + ,50 + ,16182 + ,73226 + ,63 + ,35 + ,15 + ,29 + ,19238 + ,178519 + ,96 + ,40 + ,13 + ,48 + ,28909 + ,66476 + ,74 + ,35 + ,6 + ,24 + ,22357 + ,98606 + ,65 + ,46 + ,16 + ,44 + ,25560 + ,50001 + ,40 + ,20 + ,7 + ,16 + ,9954 + ,91093 + ,173 + ,24 + ,12 + ,46 + ,18490 + ,73884 + ,28 + ,19 + ,9 + ,35 + ,17777 + ,72961 + ,55 + ,15 + ,10 + ,35 + ,25268 + ,69388 + ,58 + ,48 + ,16 + ,63 + ,37525 + ,15629 + ,25 + ,0 + ,5 + ,15 + ,6023 + ,71693 + ,103 + ,38 + ,20 + ,62 + ,25042 + ,19920 + ,29 + ,12 + ,7 + ,12 + ,35713 + ,39403 + ,31 + ,10 + ,13 + ,33 + ,7039 + ,99933 + ,43 + ,51 + ,13 + ,44 + ,40841 + ,56088 + ,74 + ,4 + ,11 + ,29 + ,9214 + ,62006 + ,99 + ,24 + ,9 + ,26 + ,17446 + ,81665 + ,25 + ,39 + ,10 + ,31 + ,10295 + ,65223 + ,69 + ,19 + ,7 + ,22 + ,13206 + ,88794 + ,62 + ,23 + ,13 + ,46 + ,26093 + ,90642 + ,25 + ,39 + ,15 + ,39 + ,20744 + ,203699 + ,38 + ,37 + ,13 + ,45 + ,68013 + ,99340 + ,57 + ,20 + ,7 + ,23 + ,12840 + ,56695 + ,52 + ,20 + ,14 + ,41 + ,12672 + ,108143 + ,91 + ,41 + ,11 + ,32 + ,10872 + ,58313 + ,48 + ,26 + ,3 + ,12 + ,21325 + ,29101 + ,52 + ,0 + ,8 + ,18 + ,24542 + ,113060 + ,35 + ,31 + ,12 + ,41 + ,16401 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,65773 + ,31 + ,8 + ,12 + ,32 + ,12821 + ,67047 + ,107 + ,35 + ,8 + ,24 + ,14662 + ,41953 + ,242 + ,3 + ,20 + ,54 + ,22190 + ,109835 + ,41 + ,47 + ,18 + ,71 + ,37929 + ,86584 + ,57 + ,42 + ,9 + ,32 + ,18009 + ,59588 + ,32 + ,11 + ,14 + ,53 + ,11076 + ,40064 + ,17 + ,10 + ,7 + ,24 + ,24981 + ,70227 + ,36 + ,26 + ,13 + ,35 + ,30691 + ,60437 + ,29 + ,27 + ,11 + ,42 + ,29164 + ,47000 + ,22 + ,0 + ,11 + ,33 + ,13985 + ,40295 + ,21 + ,15 + ,14 + ,30 + ,7588 + ,103397 + ,41 + ,32 + ,9 + ,36 + ,20023 + ,78982 + ,64 + ,13 + ,12 + ,48 + ,25524 + ,60206 + ,71 + ,24 + ,11 + ,31 + ,14717 + ,39887 + ,28 + ,10 + ,17 + ,34 + ,6832 + ,49791 + ,36 + ,14 + ,10 + ,30 + ,9624 + ,129283 + ,45 + ,24 + ,11 + ,43 + ,24300 + ,104816 + ,22 + ,29 + ,12 + ,41 + ,21790 + ,101395 + ,27 + ,40 + ,17 + ,66 + ,16493 + ,72824 + ,38 + ,22 + ,6 + ,20 + ,9269 + ,76018 + ,26 + ,27 + ,8 + ,23 + ,20105 + ,33891 + ,41 + ,8 + ,12 + ,30 + ,11216 + ,62164 + ,21 + ,27 + ,13 + ,49 + ,15569 + ,28266 + ,28 + ,0 + ,14 + ,37 + ,21799 + ,35093 + ,36 + ,0 + ,17 + ,61 + ,3772 + ,35252 + ,58 + ,17 + ,8 + ,25 + ,6057 + ,36977 + ,65 + ,7 + ,9 + ,28 + ,20828 + ,42406 + ,29 + ,18 + ,9 + ,25 + ,9976 + ,56353 + ,21 + ,7 + ,9 + ,29 + ,14055 + ,58817 + ,19 + ,24 + ,15 + ,53 + ,17455 + ,76053 + ,55 + ,18 + ,16 + ,55 + ,39553 + ,70872 + ,119 + ,39 + ,13 + ,33 + ,14818 + ,42372 + ,34 + ,17 + ,12 + ,37 + ,17065 + ,19144 + ,25 + ,0 + ,10 + ,27 + ,1536 + ,114177 + ,113 + ,39 + ,9 + ,26 + ,11938 + ,53544 + ,46 + ,20 + ,3 + ,2 + ,24589 + ,51379 + ,28 + ,29 + ,12 + ,46 + ,21332 + ,40756 + ,63 + ,27 + ,8 + ,15 + ,13229 + ,46956 + ,52 + ,23 + ,17 + ,63 + ,11331 + ,17799 + ,35 + ,0 + ,9 + ,28 + ,853 + ,71154 + ,32 + ,31 + ,8 + ,24 + ,19821 + ,58305 + ,45 + ,19 + ,9 + ,31 + ,34666 + ,27454 + ,42 + ,12 + ,12 + ,25 + ,15051 + ,34323 + ,28 + ,23 + ,5 + ,7 + ,27969 + ,44761 + ,32 + ,33 + ,14 + ,35 + ,17897 + ,113862 + ,32 + ,21 + ,14 + ,42 + ,6031 + ,35027 + ,27 + ,17 + ,10 + ,10 + ,7153 + ,62396 + ,69 + ,27 + ,12 + ,33 + ,13365 + ,29613 + ,30 + ,14 + ,10 + ,28 + ,11197 + ,65559 + ,48 + ,12 + ,12 + ,25 + ,25291 + ,110811 + ,57 + ,21 + ,17 + ,62 + ,28994 + ,27883 + ,36 + ,14 + ,11 + ,29 + ,10461 + ,40181 + ,20 + ,14 + ,10 + ,30 + ,16415 + ,53398 + ,54 + ,22 + ,11 + ,36 + ,8495 + ,56435 + ,26 + ,25 + ,7 + ,17 + ,18318 + ,77283 + ,58 + ,36 + ,10 + ,34 + ,25143 + ,71738 + ,35 + ,10 + ,11 + ,37 + ,20471 + ,48503 + ,28 + ,16 + ,5 + ,20 + ,14561 + ,25214 + ,8 + ,12 + ,6 + ,7 + ,16902 + ,119424 + ,96 + ,20 + ,14 + ,46 + ,12994 + ,79201 + ,50 + ,38 + ,13 + ,43 + ,29697 + ,19349 + ,15 + ,13 + ,1 + ,0 + ,3895 + ,78760 + ,65 + ,12 + ,13 + ,45 + ,9807 + ,54133 + ,33 + ,11 + ,9 + ,26 + ,10711 + ,21623 + ,7 + ,8 + ,1 + ,1 + ,2325 + ,25497 + ,17 + ,22 + ,6 + ,16 + ,19000 + ,69535 + ,55 + ,14 + ,12 + ,29 + ,22418 + ,30709 + ,32 + ,7 + ,9 + ,21 + ,7872 + ,37043 + ,22 + ,14 + ,9 + ,19 + ,5650 + ,24716 + ,41 + ,2 + ,12 + ,10 + ,3979 + ,54865 + ,50 + ,35 + ,10 + ,39 + ,14956 + ,27246 + ,7 + ,5 + ,2 + ,7 + ,3738 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,38814 + ,26 + ,34 + ,8 + ,11 + ,10586 + ,27646 + ,22 + ,12 + ,7 + ,28 + ,18122 + ,65373 + ,26 + ,34 + ,11 + ,27 + ,17899 + ,43021 + ,37 + ,30 + ,14 + ,46 + ,10913 + ,43116 + ,29 + ,21 + ,4 + ,9 + ,18060 + ,3058 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,96347 + ,42 + ,28 + ,13 + ,49 + ,15452 + ,48626 + ,51 + ,16 + ,17 + ,27 + ,33996 + ,73073 + ,77 + ,12 + ,13 + ,31 + ,8877 + ,45266 + ,32 + ,14 + ,12 + ,46 + ,18708 + ,43410 + ,63 + ,7 + ,1 + ,3 + ,2781 + ,83842 + ,50 + ,41 + ,12 + ,41 + ,20854 + ,39296 + ,18 + ,21 + ,6 + ,15 + ,8179 + ,38490 + ,37 + ,28 + ,11 + ,21 + ,7139 + ,39841 + ,23 + ,1 + ,8 + ,23 + ,13798 + ,19764 + ,19 + ,10 + ,2 + ,4 + ,5619 + ,59975 + ,39 + ,31 + ,12 + ,41 + ,13050 + ,64589 + ,38 + ,7 + ,12 + ,46 + ,11297 + ,63339 + ,55 + ,26 + ,14 + ,54 + ,16170 + ,11796 + ,22 + ,1 + ,2 + ,1 + ,0 + ,7627 + ,7 + ,0 + ,0 + ,0 + ,0 + ,68998 + ,21 + ,12 + ,9 + ,21 + ,20539 + ,6836 + ,5 + ,0 + ,1 + ,0 + ,0 + ,33365 + ,21 + ,17 + ,3 + ,3 + ,10056 + ,5118 + ,1 + ,5 + ,0 + ,0 + ,0 + ,20898 + ,22 + ,4 + ,2 + ,3 + ,2418 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42690 + ,31 + ,6 + ,12 + ,44 + ,11806 + ,14507 + ,25 + ,0 + ,14 + ,19 + ,15924 + ,7131 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4194 + ,4 + ,0 + ,0 + ,0 + ,0 + ,21416 + ,20 + ,15 + ,4 + ,12 + ,7084 + ,30591 + ,29 + ,0 + ,7 + ,24 + ,14831 + ,42419 + ,33 + ,12 + ,10 + ,26 + ,6585) + ,dim=c(6 + ,144) + ,dimnames=list(c('time' + ,'comp' + ,'blog' + ,'review' + ,'fbm' + ,'charac') + ,1:144)) > y <- array(NA,dim=c(6,144),dimnames=list(c('time','comp','blog','review','fbm','charac'),1:144)) > 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' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > 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 comp blog review fbm charac 1 63031 68 13 5 20 10345 2 66751 17 26 7 21 17607 3 7176 1 0 0 0 1423 4 78306 114 37 12 28 20050 5 137944 95 47 15 59 21212 6 261308 148 80 16 58 93979 7 69266 56 21 12 36 15524 8 80226 26 36 13 50 16182 9 73226 63 35 15 29 19238 10 178519 96 40 13 48 28909 11 66476 74 35 6 24 22357 12 98606 65 46 16 44 25560 13 50001 40 20 7 16 9954 14 91093 173 24 12 46 18490 15 73884 28 19 9 35 17777 16 72961 55 15 10 35 25268 17 69388 58 48 16 63 37525 18 15629 25 0 5 15 6023 19 71693 103 38 20 62 25042 20 19920 29 12 7 12 35713 21 39403 31 10 13 33 7039 22 99933 43 51 13 44 40841 23 56088 74 4 11 29 9214 24 62006 99 24 9 26 17446 25 81665 25 39 10 31 10295 26 65223 69 19 7 22 13206 27 88794 62 23 13 46 26093 28 90642 25 39 15 39 20744 29 203699 38 37 13 45 68013 30 99340 57 20 7 23 12840 31 56695 52 20 14 41 12672 32 108143 91 41 11 32 10872 33 58313 48 26 3 12 21325 34 29101 52 0 8 18 24542 35 113060 35 31 12 41 16401 36 0 0 0 0 0 0 37 65773 31 8 12 32 12821 38 67047 107 35 8 24 14662 39 41953 242 3 20 54 22190 40 109835 41 47 18 71 37929 41 86584 57 42 9 32 18009 42 59588 32 11 14 53 11076 43 40064 17 10 7 24 24981 44 70227 36 26 13 35 30691 45 60437 29 27 11 42 29164 46 47000 22 0 11 33 13985 47 40295 21 15 14 30 7588 48 103397 41 32 9 36 20023 49 78982 64 13 12 48 25524 50 60206 71 24 11 31 14717 51 39887 28 10 17 34 6832 52 49791 36 14 10 30 9624 53 129283 45 24 11 43 24300 54 104816 22 29 12 41 21790 55 101395 27 40 17 66 16493 56 72824 38 22 6 20 9269 57 76018 26 27 8 23 20105 58 33891 41 8 12 30 11216 59 62164 21 27 13 49 15569 60 28266 28 0 14 37 21799 61 35093 36 0 17 61 3772 62 35252 58 17 8 25 6057 63 36977 65 7 9 28 20828 64 42406 29 18 9 25 9976 65 56353 21 7 9 29 14055 66 58817 19 24 15 53 17455 67 76053 55 18 16 55 39553 68 70872 119 39 13 33 14818 69 42372 34 17 12 37 17065 70 19144 25 0 10 27 1536 71 114177 113 39 9 26 11938 72 53544 46 20 3 2 24589 73 51379 28 29 12 46 21332 74 40756 63 27 8 15 13229 75 46956 52 23 17 63 11331 76 17799 35 0 9 28 853 77 71154 32 31 8 24 19821 78 58305 45 19 9 31 34666 79 27454 42 12 12 25 15051 80 34323 28 23 5 7 27969 81 44761 32 33 14 35 17897 82 113862 32 21 14 42 6031 83 35027 27 17 10 10 7153 84 62396 69 27 12 33 13365 85 29613 30 14 10 28 11197 86 65559 48 12 12 25 25291 87 110811 57 21 17 62 28994 88 27883 36 14 11 29 10461 89 40181 20 14 10 30 16415 90 53398 54 22 11 36 8495 91 56435 26 25 7 17 18318 92 77283 58 36 10 34 25143 93 71738 35 10 11 37 20471 94 48503 28 16 5 20 14561 95 25214 8 12 6 7 16902 96 119424 96 20 14 46 12994 97 79201 50 38 13 43 29697 98 19349 15 13 1 0 3895 99 78760 65 12 13 45 9807 100 54133 33 11 9 26 10711 101 21623 7 8 1 1 2325 102 25497 17 22 6 16 19000 103 69535 55 14 12 29 22418 104 30709 32 7 9 21 7872 105 37043 22 14 9 19 5650 106 24716 41 2 12 10 3979 107 54865 50 35 10 39 14956 108 27246 7 5 2 7 3738 109 0 0 0 0 0 0 110 38814 26 34 8 11 10586 111 27646 22 12 7 28 18122 112 65373 26 34 11 27 17899 113 43021 37 30 14 46 10913 114 43116 29 21 4 9 18060 115 3058 0 0 0 0 0 116 0 0 0 0 0 0 117 96347 42 28 13 49 15452 118 48626 51 16 17 27 33996 119 73073 77 12 13 31 8877 120 45266 32 14 12 46 18708 121 43410 63 7 1 3 2781 122 83842 50 41 12 41 20854 123 39296 18 21 6 15 8179 124 38490 37 28 11 21 7139 125 39841 23 1 8 23 13798 126 19764 19 10 2 4 5619 127 59975 39 31 12 41 13050 128 64589 38 7 12 46 11297 129 63339 55 26 14 54 16170 130 11796 22 1 2 1 0 131 7627 7 0 0 0 0 132 68998 21 12 9 21 20539 133 6836 5 0 1 0 0 134 33365 21 17 3 3 10056 135 5118 1 5 0 0 0 136 20898 22 4 2 3 2418 137 0 0 0 0 0 0 138 42690 31 6 12 44 11806 139 14507 25 0 14 19 15924 140 7131 0 0 0 0 0 141 4194 4 0 0 0 0 142 21416 20 15 4 12 7084 143 30591 29 0 7 24 14831 144 42419 33 12 10 26 6585 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) comp blog review fbm charac 5775.5833 173.8655 1023.2217 -1814.3373 908.9425 0.9919 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -61041 -12222 -2487 9511 68680 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5775.5833 3946.8981 1.463 0.14565 comp 173.8655 59.3196 2.931 0.00396 ** blog 1023.2217 160.1088 6.391 2.36e-09 *** review -1814.3373 804.3030 -2.256 0.02566 * fbm 908.9425 228.2179 3.983 0.00011 *** charac 0.9919 0.1837 5.400 2.83e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 20010 on 138 degrees of freedom Multiple R-squared: 0.7306, Adjusted R-squared: 0.7208 F-statistic: 74.85 on 5 and 138 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.2026228 4.052456e-01 7.973772e-01 [2,] 0.8476634 3.046732e-01 1.523366e-01 [3,] 0.8300842 3.398316e-01 1.699158e-01 [4,] 0.7425764 5.148473e-01 2.574236e-01 [5,] 0.6693197 6.613607e-01 3.306803e-01 [6,] 0.7867390 4.265221e-01 2.132610e-01 [7,] 0.7225686 5.548627e-01 2.774314e-01 [8,] 0.6770020 6.459959e-01 3.229980e-01 [9,] 0.9900005 1.999900e-02 9.999499e-03 [10,] 0.9839721 3.205578e-02 1.602789e-02 [11,] 0.9880662 2.386762e-02 1.193381e-02 [12,] 0.9927859 1.442825e-02 7.214124e-03 [13,] 0.9919997 1.600060e-02 8.000301e-03 [14,] 0.9913552 1.728966e-02 8.644828e-03 [15,] 0.9908169 1.836626e-02 9.183129e-03 [16,] 0.9882381 2.352382e-02 1.176191e-02 [17,] 0.9840944 3.181124e-02 1.590562e-02 [18,] 0.9768652 4.626963e-02 2.313482e-02 [19,] 0.9684056 6.318879e-02 3.159440e-02 [20,] 0.9633692 7.326168e-02 3.663084e-02 [21,] 0.9990254 1.949222e-03 9.746109e-04 [22,] 0.9997522 4.955758e-04 2.477879e-04 [23,] 0.9995815 8.370810e-04 4.185405e-04 [24,] 0.9996608 6.783604e-04 3.391802e-04 [25,] 0.9995604 8.791546e-04 4.395773e-04 [26,] 0.9994067 1.186560e-03 5.932798e-04 [27,] 0.9997870 4.260717e-04 2.130359e-04 [28,] 0.9996717 6.565758e-04 3.282879e-04 [29,] 0.9997372 5.256332e-04 2.628166e-04 [30,] 0.9996442 7.115774e-04 3.557887e-04 [31,] 0.9999407 1.186730e-04 5.933648e-05 [32,] 0.9999475 1.050873e-04 5.254364e-05 [33,] 0.9999149 1.701546e-04 8.507731e-05 [34,] 0.9998589 2.822911e-04 1.411456e-04 [35,] 0.9998181 3.638852e-04 1.819426e-04 [36,] 0.9997235 5.529100e-04 2.764550e-04 [37,] 0.9997660 4.680767e-04 2.340383e-04 [38,] 0.9996988 6.024165e-04 3.012082e-04 [39,] 0.9995404 9.192726e-04 4.596363e-04 [40,] 0.9996084 7.832923e-04 3.916461e-04 [41,] 0.9993847 1.230580e-03 6.152899e-04 [42,] 0.9991012 1.797622e-03 8.988109e-04 [43,] 0.9988037 2.392607e-03 1.196304e-03 [44,] 0.9982133 3.573494e-03 1.786747e-03 [45,] 0.9998382 3.235176e-04 1.617588e-04 [46,] 0.9999458 1.083201e-04 5.416005e-05 [47,] 0.9999362 1.275156e-04 6.375781e-05 [48,] 0.9999460 1.080871e-04 5.404357e-05 [49,] 0.9999494 1.011520e-04 5.057599e-05 [50,] 0.9999226 1.547985e-04 7.739924e-05 [51,] 0.9998932 2.135825e-04 1.067912e-04 [52,] 0.9998615 2.770075e-04 1.385038e-04 [53,] 0.9998231 3.537702e-04 1.768851e-04 [54,] 0.9998102 3.795738e-04 1.897869e-04 [55,] 0.9998487 3.025530e-04 1.512765e-04 [56,] 0.9997624 4.751310e-04 2.375655e-04 [57,] 0.9997417 5.165241e-04 2.582620e-04 [58,] 0.9996424 7.152584e-04 3.576292e-04 [59,] 0.9995534 8.931011e-04 4.465505e-04 [60,] 0.9997910 4.180817e-04 2.090409e-04 [61,] 0.9997402 5.195536e-04 2.597768e-04 [62,] 0.9996210 7.579260e-04 3.789630e-04 [63,] 0.9996392 7.215501e-04 3.607751e-04 [64,] 0.9994713 1.057364e-03 5.286818e-04 [65,] 0.9995812 8.375831e-04 4.187916e-04 [66,] 0.9996160 7.679952e-04 3.839976e-04 [67,] 0.9998620 2.759959e-04 1.379979e-04 [68,] 0.9998657 2.685516e-04 1.342758e-04 [69,] 0.9998484 3.032737e-04 1.516369e-04 [70,] 0.9998183 3.633903e-04 1.816951e-04 [71,] 0.9998373 3.254141e-04 1.627070e-04 [72,] 0.9998270 3.459531e-04 1.729766e-04 [73,] 0.9998285 3.429829e-04 1.714915e-04 [74,] 0.9999999 1.033104e-07 5.165522e-08 [75,] 0.9999999 1.573940e-07 7.869699e-08 [76,] 0.9999999 2.113810e-07 1.056905e-07 [77,] 0.9999999 2.592654e-07 1.296327e-07 [78,] 0.9999998 4.444586e-07 2.222293e-07 [79,] 0.9999999 2.656087e-07 1.328044e-07 [80,] 0.9999999 2.161660e-07 1.080830e-07 [81,] 0.9999998 4.368755e-07 2.184377e-07 [82,] 0.9999997 6.203440e-07 3.101720e-07 [83,] 0.9999996 8.587502e-07 4.293751e-07 [84,] 0.9999993 1.478968e-06 7.394838e-07 [85,] 0.9999994 1.228614e-06 6.143072e-07 [86,] 0.9999988 2.376343e-06 1.188171e-06 [87,] 0.9999978 4.305985e-06 2.152993e-06 [88,] 0.9999996 8.991840e-07 4.495920e-07 [89,] 0.9999992 1.628450e-06 8.142248e-07 [90,] 0.9999983 3.358407e-06 1.679204e-06 [91,] 0.9999978 4.382983e-06 2.191492e-06 [92,] 0.9999973 5.449535e-06 2.724768e-06 [93,] 0.9999955 9.006314e-06 4.503157e-06 [94,] 0.9999960 8.012487e-06 4.006243e-06 [95,] 0.9999938 1.238664e-05 6.193321e-06 [96,] 0.9999876 2.486908e-05 1.243454e-05 [97,] 0.9999788 4.241863e-05 2.120931e-05 [98,] 0.9999625 7.506336e-05 3.753168e-05 [99,] 0.9999766 4.679917e-05 2.339958e-05 [100,] 0.9999698 6.046257e-05 3.023129e-05 [101,] 0.9999407 1.186694e-04 5.933469e-05 [102,] 0.9998894 2.212569e-04 1.106285e-04 [103,] 0.9999240 1.520959e-04 7.604795e-05 [104,] 0.9999003 1.993120e-04 9.965599e-05 [105,] 0.9999377 1.246067e-04 6.230335e-05 [106,] 0.9998727 2.545032e-04 1.272516e-04 [107,] 0.9997387 5.226501e-04 2.613251e-04 [108,] 0.9994997 1.000560e-03 5.002800e-04 [109,] 0.9998916 2.167006e-04 1.083503e-04 [110,] 0.9999280 1.440055e-04 7.200277e-05 [111,] 0.9999341 1.318657e-04 6.593287e-05 [112,] 0.9999526 9.472396e-05 4.736198e-05 [113,] 0.9999206 1.587494e-04 7.937470e-05 [114,] 0.9998054 3.892663e-04 1.946331e-04 [115,] 0.9995648 8.703537e-04 4.351768e-04 [116,] 0.9990219 1.956266e-03 9.781329e-04 [117,] 0.9978610 4.277928e-03 2.138964e-03 [118,] 0.9955486 8.902817e-03 4.451409e-03 [119,] 0.9908085 1.838300e-02 9.191500e-03 [120,] 0.9944462 1.110767e-02 5.553836e-03 [121,] 0.9920464 1.590711e-02 7.953554e-03 [122,] 0.9840904 3.181914e-02 1.590957e-02 [123,] 0.9665012 6.699759e-02 3.349880e-02 [124,] 0.9992298 1.540460e-03 7.702302e-04 [125,] 0.9967773 6.445447e-03 3.222724e-03 [126,] 0.9984968 3.006313e-03 1.503157e-03 [127,] 0.9907549 1.849020e-02 9.245099e-03 > postscript(file="/var/wessaorg/rcomp/tmp/1st4b1322147198.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/2yzxa1322147198.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/3q9u51322147198.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/4b7041322147198.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/5y9lk1322147198.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 = 144 Frequency = 1 1 2 3 4 5 6 12762.3594 7564.2045 -184.9160 -8715.2989 20107.1409 31035.9780 7 8 9 10 11 12 5918.2266 -4817.6593 2457.7733 66405.9012 -21082.7923 -1855.9595 13 14 15 16 17 18 5090.3166 -7698.0879 10682.0941 3541.6615 -61041.2802 -5029.8573 19 20 21 22 23 24 -35779.8877 -36806.8531 4614.7005 -22420.1932 17812.5375 -10147.6650 25 26 27 28 29 30 11391.7243 7614.1403 4598.1601 11804.5558 68679.5141 42248.3958 31 32 33 34 35 36 -3021.2417 24681.2294 -9028.3599 -11904.9523 37716.5798 -5775.5833 37 38 39 40 41 42 26390.6098 -14988.0437 -43774.0046 -20658.9359 -2697.3977 3233.8193 43 44 45 46 47 48 -12792.3118 -7080.3703 -25153.1812 13490.3272 6125.8608 21496.2204 49 50 51 52 53 54 1602.8128 -5288.5864 12174.0261 4760.2519 47896.2730 28433.9503 55 56 57 58 59 60 4490.3784 21443.9453 11761.8909 -3820.1680 -11284.3617 -12230.2945 61 62 63 64 65 66 -5284.9272 -12219.3255 -17042.9438 -3119.3488 15792.3031 -13091.7756 67 68 69 70 71 72 -17898.0554 -16605.8481 -15495.2989 1100.1543 29704.2518 -1458.4204 73 74 75 76 77 78 -30136.6669 -15841.3197 -29053.4977 -4029.3158 1134.5668 -20968.9711 79 80 81 82 83 84 -13783.1270 -24888.1510 -24508.8133 62278.0814 9121.1991 -4483.0257 85 86 87 88 89 90 -14116.9217 13121.6709 19367.7121 -15254.6848 -8803.8620 -5467.5686 91 92 93 94 95 96 -362.8310 -13112.6623 15666.6548 -2062.5172 -6472.7580 47193.5739 97 98 99 100 101 102 -19104.7439 -4385.5438 22360.9540 13436.7559 5043.8222 -28248.2438 103 104 105 106 107 108 13048.1146 1640.2118 6572.1910 18501.3590 -27556.7903 8695.6217 109 110 111 112 113 114 -5775.5833 -12255.4992 -24958.4419 -2050.2980 -27119.4451 -8026.1036 115 116 117 118 119 120 -2717.5833 -5775.5833 18340.2929 -9806.4606 28235.2255 -18994.0690 121 122 123 124 125 126 15847.3871 -8758.5303 -1957.6448 -8580.0384 8966.1372 -5127.8008 127 128 129 130 131 132 -12740.0406 13799.2272 -18324.0710 3891.8862 634.3582 24161.2842 133 134 135 136 137 138 2005.4265 -714.8442 -5947.5575 5707.9329 -5775.5833 -4546.4825 139 140 141 142 143 144 -3279.3480 1355.4167 -2277.0453 -13861.7670 -4051.7417 6606.4319 > postscript(file="/var/wessaorg/rcomp/tmp/6wutn1322147198.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 = 144 Frequency = 1 lag(myerror, k = 1) myerror 0 12762.3594 NA 1 7564.2045 12762.3594 2 -184.9160 7564.2045 3 -8715.2989 -184.9160 4 20107.1409 -8715.2989 5 31035.9780 20107.1409 6 5918.2266 31035.9780 7 -4817.6593 5918.2266 8 2457.7733 -4817.6593 9 66405.9012 2457.7733 10 -21082.7923 66405.9012 11 -1855.9595 -21082.7923 12 5090.3166 -1855.9595 13 -7698.0879 5090.3166 14 10682.0941 -7698.0879 15 3541.6615 10682.0941 16 -61041.2802 3541.6615 17 -5029.8573 -61041.2802 18 -35779.8877 -5029.8573 19 -36806.8531 -35779.8877 20 4614.7005 -36806.8531 21 -22420.1932 4614.7005 22 17812.5375 -22420.1932 23 -10147.6650 17812.5375 24 11391.7243 -10147.6650 25 7614.1403 11391.7243 26 4598.1601 7614.1403 27 11804.5558 4598.1601 28 68679.5141 11804.5558 29 42248.3958 68679.5141 30 -3021.2417 42248.3958 31 24681.2294 -3021.2417 32 -9028.3599 24681.2294 33 -11904.9523 -9028.3599 34 37716.5798 -11904.9523 35 -5775.5833 37716.5798 36 26390.6098 -5775.5833 37 -14988.0437 26390.6098 38 -43774.0046 -14988.0437 39 -20658.9359 -43774.0046 40 -2697.3977 -20658.9359 41 3233.8193 -2697.3977 42 -12792.3118 3233.8193 43 -7080.3703 -12792.3118 44 -25153.1812 -7080.3703 45 13490.3272 -25153.1812 46 6125.8608 13490.3272 47 21496.2204 6125.8608 48 1602.8128 21496.2204 49 -5288.5864 1602.8128 50 12174.0261 -5288.5864 51 4760.2519 12174.0261 52 47896.2730 4760.2519 53 28433.9503 47896.2730 54 4490.3784 28433.9503 55 21443.9453 4490.3784 56 11761.8909 21443.9453 57 -3820.1680 11761.8909 58 -11284.3617 -3820.1680 59 -12230.2945 -11284.3617 60 -5284.9272 -12230.2945 61 -12219.3255 -5284.9272 62 -17042.9438 -12219.3255 63 -3119.3488 -17042.9438 64 15792.3031 -3119.3488 65 -13091.7756 15792.3031 66 -17898.0554 -13091.7756 67 -16605.8481 -17898.0554 68 -15495.2989 -16605.8481 69 1100.1543 -15495.2989 70 29704.2518 1100.1543 71 -1458.4204 29704.2518 72 -30136.6669 -1458.4204 73 -15841.3197 -30136.6669 74 -29053.4977 -15841.3197 75 -4029.3158 -29053.4977 76 1134.5668 -4029.3158 77 -20968.9711 1134.5668 78 -13783.1270 -20968.9711 79 -24888.1510 -13783.1270 80 -24508.8133 -24888.1510 81 62278.0814 -24508.8133 82 9121.1991 62278.0814 83 -4483.0257 9121.1991 84 -14116.9217 -4483.0257 85 13121.6709 -14116.9217 86 19367.7121 13121.6709 87 -15254.6848 19367.7121 88 -8803.8620 -15254.6848 89 -5467.5686 -8803.8620 90 -362.8310 -5467.5686 91 -13112.6623 -362.8310 92 15666.6548 -13112.6623 93 -2062.5172 15666.6548 94 -6472.7580 -2062.5172 95 47193.5739 -6472.7580 96 -19104.7439 47193.5739 97 -4385.5438 -19104.7439 98 22360.9540 -4385.5438 99 13436.7559 22360.9540 100 5043.8222 13436.7559 101 -28248.2438 5043.8222 102 13048.1146 -28248.2438 103 1640.2118 13048.1146 104 6572.1910 1640.2118 105 18501.3590 6572.1910 106 -27556.7903 18501.3590 107 8695.6217 -27556.7903 108 -5775.5833 8695.6217 109 -12255.4992 -5775.5833 110 -24958.4419 -12255.4992 111 -2050.2980 -24958.4419 112 -27119.4451 -2050.2980 113 -8026.1036 -27119.4451 114 -2717.5833 -8026.1036 115 -5775.5833 -2717.5833 116 18340.2929 -5775.5833 117 -9806.4606 18340.2929 118 28235.2255 -9806.4606 119 -18994.0690 28235.2255 120 15847.3871 -18994.0690 121 -8758.5303 15847.3871 122 -1957.6448 -8758.5303 123 -8580.0384 -1957.6448 124 8966.1372 -8580.0384 125 -5127.8008 8966.1372 126 -12740.0406 -5127.8008 127 13799.2272 -12740.0406 128 -18324.0710 13799.2272 129 3891.8862 -18324.0710 130 634.3582 3891.8862 131 24161.2842 634.3582 132 2005.4265 24161.2842 133 -714.8442 2005.4265 134 -5947.5575 -714.8442 135 5707.9329 -5947.5575 136 -5775.5833 5707.9329 137 -4546.4825 -5775.5833 138 -3279.3480 -4546.4825 139 1355.4167 -3279.3480 140 -2277.0453 1355.4167 141 -13861.7670 -2277.0453 142 -4051.7417 -13861.7670 143 6606.4319 -4051.7417 144 NA 6606.4319 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 7564.2045 12762.3594 [2,] -184.9160 7564.2045 [3,] -8715.2989 -184.9160 [4,] 20107.1409 -8715.2989 [5,] 31035.9780 20107.1409 [6,] 5918.2266 31035.9780 [7,] -4817.6593 5918.2266 [8,] 2457.7733 -4817.6593 [9,] 66405.9012 2457.7733 [10,] -21082.7923 66405.9012 [11,] -1855.9595 -21082.7923 [12,] 5090.3166 -1855.9595 [13,] -7698.0879 5090.3166 [14,] 10682.0941 -7698.0879 [15,] 3541.6615 10682.0941 [16,] -61041.2802 3541.6615 [17,] -5029.8573 -61041.2802 [18,] -35779.8877 -5029.8573 [19,] -36806.8531 -35779.8877 [20,] 4614.7005 -36806.8531 [21,] -22420.1932 4614.7005 [22,] 17812.5375 -22420.1932 [23,] -10147.6650 17812.5375 [24,] 11391.7243 -10147.6650 [25,] 7614.1403 11391.7243 [26,] 4598.1601 7614.1403 [27,] 11804.5558 4598.1601 [28,] 68679.5141 11804.5558 [29,] 42248.3958 68679.5141 [30,] -3021.2417 42248.3958 [31,] 24681.2294 -3021.2417 [32,] -9028.3599 24681.2294 [33,] -11904.9523 -9028.3599 [34,] 37716.5798 -11904.9523 [35,] -5775.5833 37716.5798 [36,] 26390.6098 -5775.5833 [37,] -14988.0437 26390.6098 [38,] -43774.0046 -14988.0437 [39,] -20658.9359 -43774.0046 [40,] -2697.3977 -20658.9359 [41,] 3233.8193 -2697.3977 [42,] -12792.3118 3233.8193 [43,] -7080.3703 -12792.3118 [44,] -25153.1812 -7080.3703 [45,] 13490.3272 -25153.1812 [46,] 6125.8608 13490.3272 [47,] 21496.2204 6125.8608 [48,] 1602.8128 21496.2204 [49,] -5288.5864 1602.8128 [50,] 12174.0261 -5288.5864 [51,] 4760.2519 12174.0261 [52,] 47896.2730 4760.2519 [53,] 28433.9503 47896.2730 [54,] 4490.3784 28433.9503 [55,] 21443.9453 4490.3784 [56,] 11761.8909 21443.9453 [57,] -3820.1680 11761.8909 [58,] -11284.3617 -3820.1680 [59,] -12230.2945 -11284.3617 [60,] -5284.9272 -12230.2945 [61,] -12219.3255 -5284.9272 [62,] -17042.9438 -12219.3255 [63,] -3119.3488 -17042.9438 [64,] 15792.3031 -3119.3488 [65,] -13091.7756 15792.3031 [66,] -17898.0554 -13091.7756 [67,] -16605.8481 -17898.0554 [68,] -15495.2989 -16605.8481 [69,] 1100.1543 -15495.2989 [70,] 29704.2518 1100.1543 [71,] -1458.4204 29704.2518 [72,] -30136.6669 -1458.4204 [73,] -15841.3197 -30136.6669 [74,] -29053.4977 -15841.3197 [75,] -4029.3158 -29053.4977 [76,] 1134.5668 -4029.3158 [77,] -20968.9711 1134.5668 [78,] -13783.1270 -20968.9711 [79,] -24888.1510 -13783.1270 [80,] -24508.8133 -24888.1510 [81,] 62278.0814 -24508.8133 [82,] 9121.1991 62278.0814 [83,] -4483.0257 9121.1991 [84,] -14116.9217 -4483.0257 [85,] 13121.6709 -14116.9217 [86,] 19367.7121 13121.6709 [87,] -15254.6848 19367.7121 [88,] -8803.8620 -15254.6848 [89,] -5467.5686 -8803.8620 [90,] -362.8310 -5467.5686 [91,] -13112.6623 -362.8310 [92,] 15666.6548 -13112.6623 [93,] -2062.5172 15666.6548 [94,] -6472.7580 -2062.5172 [95,] 47193.5739 -6472.7580 [96,] -19104.7439 47193.5739 [97,] -4385.5438 -19104.7439 [98,] 22360.9540 -4385.5438 [99,] 13436.7559 22360.9540 [100,] 5043.8222 13436.7559 [101,] -28248.2438 5043.8222 [102,] 13048.1146 -28248.2438 [103,] 1640.2118 13048.1146 [104,] 6572.1910 1640.2118 [105,] 18501.3590 6572.1910 [106,] -27556.7903 18501.3590 [107,] 8695.6217 -27556.7903 [108,] -5775.5833 8695.6217 [109,] -12255.4992 -5775.5833 [110,] -24958.4419 -12255.4992 [111,] -2050.2980 -24958.4419 [112,] -27119.4451 -2050.2980 [113,] -8026.1036 -27119.4451 [114,] -2717.5833 -8026.1036 [115,] -5775.5833 -2717.5833 [116,] 18340.2929 -5775.5833 [117,] -9806.4606 18340.2929 [118,] 28235.2255 -9806.4606 [119,] -18994.0690 28235.2255 [120,] 15847.3871 -18994.0690 [121,] -8758.5303 15847.3871 [122,] -1957.6448 -8758.5303 [123,] -8580.0384 -1957.6448 [124,] 8966.1372 -8580.0384 [125,] -5127.8008 8966.1372 [126,] -12740.0406 -5127.8008 [127,] 13799.2272 -12740.0406 [128,] -18324.0710 13799.2272 [129,] 3891.8862 -18324.0710 [130,] 634.3582 3891.8862 [131,] 24161.2842 634.3582 [132,] 2005.4265 24161.2842 [133,] -714.8442 2005.4265 [134,] -5947.5575 -714.8442 [135,] 5707.9329 -5947.5575 [136,] -5775.5833 5707.9329 [137,] -4546.4825 -5775.5833 [138,] -3279.3480 -4546.4825 [139,] 1355.4167 -3279.3480 [140,] -2277.0453 1355.4167 [141,] -13861.7670 -2277.0453 [142,] -4051.7417 -13861.7670 [143,] 6606.4319 -4051.7417 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 7564.2045 12762.3594 2 -184.9160 7564.2045 3 -8715.2989 -184.9160 4 20107.1409 -8715.2989 5 31035.9780 20107.1409 6 5918.2266 31035.9780 7 -4817.6593 5918.2266 8 2457.7733 -4817.6593 9 66405.9012 2457.7733 10 -21082.7923 66405.9012 11 -1855.9595 -21082.7923 12 5090.3166 -1855.9595 13 -7698.0879 5090.3166 14 10682.0941 -7698.0879 15 3541.6615 10682.0941 16 -61041.2802 3541.6615 17 -5029.8573 -61041.2802 18 -35779.8877 -5029.8573 19 -36806.8531 -35779.8877 20 4614.7005 -36806.8531 21 -22420.1932 4614.7005 22 17812.5375 -22420.1932 23 -10147.6650 17812.5375 24 11391.7243 -10147.6650 25 7614.1403 11391.7243 26 4598.1601 7614.1403 27 11804.5558 4598.1601 28 68679.5141 11804.5558 29 42248.3958 68679.5141 30 -3021.2417 42248.3958 31 24681.2294 -3021.2417 32 -9028.3599 24681.2294 33 -11904.9523 -9028.3599 34 37716.5798 -11904.9523 35 -5775.5833 37716.5798 36 26390.6098 -5775.5833 37 -14988.0437 26390.6098 38 -43774.0046 -14988.0437 39 -20658.9359 -43774.0046 40 -2697.3977 -20658.9359 41 3233.8193 -2697.3977 42 -12792.3118 3233.8193 43 -7080.3703 -12792.3118 44 -25153.1812 -7080.3703 45 13490.3272 -25153.1812 46 6125.8608 13490.3272 47 21496.2204 6125.8608 48 1602.8128 21496.2204 49 -5288.5864 1602.8128 50 12174.0261 -5288.5864 51 4760.2519 12174.0261 52 47896.2730 4760.2519 53 28433.9503 47896.2730 54 4490.3784 28433.9503 55 21443.9453 4490.3784 56 11761.8909 21443.9453 57 -3820.1680 11761.8909 58 -11284.3617 -3820.1680 59 -12230.2945 -11284.3617 60 -5284.9272 -12230.2945 61 -12219.3255 -5284.9272 62 -17042.9438 -12219.3255 63 -3119.3488 -17042.9438 64 15792.3031 -3119.3488 65 -13091.7756 15792.3031 66 -17898.0554 -13091.7756 67 -16605.8481 -17898.0554 68 -15495.2989 -16605.8481 69 1100.1543 -15495.2989 70 29704.2518 1100.1543 71 -1458.4204 29704.2518 72 -30136.6669 -1458.4204 73 -15841.3197 -30136.6669 74 -29053.4977 -15841.3197 75 -4029.3158 -29053.4977 76 1134.5668 -4029.3158 77 -20968.9711 1134.5668 78 -13783.1270 -20968.9711 79 -24888.1510 -13783.1270 80 -24508.8133 -24888.1510 81 62278.0814 -24508.8133 82 9121.1991 62278.0814 83 -4483.0257 9121.1991 84 -14116.9217 -4483.0257 85 13121.6709 -14116.9217 86 19367.7121 13121.6709 87 -15254.6848 19367.7121 88 -8803.8620 -15254.6848 89 -5467.5686 -8803.8620 90 -362.8310 -5467.5686 91 -13112.6623 -362.8310 92 15666.6548 -13112.6623 93 -2062.5172 15666.6548 94 -6472.7580 -2062.5172 95 47193.5739 -6472.7580 96 -19104.7439 47193.5739 97 -4385.5438 -19104.7439 98 22360.9540 -4385.5438 99 13436.7559 22360.9540 100 5043.8222 13436.7559 101 -28248.2438 5043.8222 102 13048.1146 -28248.2438 103 1640.2118 13048.1146 104 6572.1910 1640.2118 105 18501.3590 6572.1910 106 -27556.7903 18501.3590 107 8695.6217 -27556.7903 108 -5775.5833 8695.6217 109 -12255.4992 -5775.5833 110 -24958.4419 -12255.4992 111 -2050.2980 -24958.4419 112 -27119.4451 -2050.2980 113 -8026.1036 -27119.4451 114 -2717.5833 -8026.1036 115 -5775.5833 -2717.5833 116 18340.2929 -5775.5833 117 -9806.4606 18340.2929 118 28235.2255 -9806.4606 119 -18994.0690 28235.2255 120 15847.3871 -18994.0690 121 -8758.5303 15847.3871 122 -1957.6448 -8758.5303 123 -8580.0384 -1957.6448 124 8966.1372 -8580.0384 125 -5127.8008 8966.1372 126 -12740.0406 -5127.8008 127 13799.2272 -12740.0406 128 -18324.0710 13799.2272 129 3891.8862 -18324.0710 130 634.3582 3891.8862 131 24161.2842 634.3582 132 2005.4265 24161.2842 133 -714.8442 2005.4265 134 -5947.5575 -714.8442 135 5707.9329 -5947.5575 136 -5775.5833 5707.9329 137 -4546.4825 -5775.5833 138 -3279.3480 -4546.4825 139 1355.4167 -3279.3480 140 -2277.0453 1355.4167 141 -13861.7670 -2277.0453 142 -4051.7417 -13861.7670 143 6606.4319 -4051.7417 > 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/7y1a21322147198.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/8n88g1322147198.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/91drz1322147198.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/10cpa31322147198.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/11y5891322147198.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/12d9eb1322147198.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/13j0wf1322147198.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/14up3s1322147198.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/15rdve1322147198.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/16m3un1322147198.tab") + } > > try(system("convert tmp/1st4b1322147198.ps tmp/1st4b1322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/2yzxa1322147198.ps tmp/2yzxa1322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/3q9u51322147198.ps tmp/3q9u51322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/4b7041322147198.ps tmp/4b7041322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/5y9lk1322147198.ps tmp/5y9lk1322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/6wutn1322147198.ps tmp/6wutn1322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/7y1a21322147198.ps tmp/7y1a21322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/8n88g1322147198.ps tmp/8n88g1322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/91drz1322147198.ps tmp/91drz1322147198.png",intern=TRUE)) character(0) > try(system("convert tmp/10cpa31322147198.ps tmp/10cpa31322147198.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.574 0.550 5.207