R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(159261 + ,0 + ,48 + ,19 + ,20465 + ,23975 + ,189672 + ,1 + ,53 + ,20 + ,33629 + ,85634 + ,7215 + ,0 + ,0 + ,0 + ,1423 + ,1929 + ,129098 + ,0 + ,51 + ,27 + ,25629 + ,36294 + ,230632 + ,0 + ,76 + ,31 + ,54002 + ,72255 + ,515038 + ,1 + ,136 + ,36 + ,151036 + ,189748 + ,180745 + ,1 + ,62 + ,23 + ,33287 + ,61834 + ,185559 + ,0 + ,83 + ,30 + ,31172 + ,68167 + ,154581 + ,0 + ,55 + ,30 + ,28113 + ,38462 + ,298001 + ,1 + ,67 + ,26 + ,57803 + ,101219 + ,121844 + ,2 + ,50 + ,24 + ,49830 + ,43270 + ,184039 + ,0 + ,77 + ,30 + ,52143 + ,76183 + ,100324 + ,0 + ,46 + ,22 + ,21055 + ,31476 + ,217742 + ,4 + ,79 + ,28 + ,47007 + ,62157 + ,168265 + ,4 + ,56 + ,18 + ,28735 + ,46261 + ,154647 + ,3 + ,54 + ,22 + ,59147 + ,50063 + ,142018 + ,0 + ,81 + ,33 + ,78950 + ,64483 + ,79030 + ,5 + ,6 + ,15 + ,13497 + ,2341 + ,167047 + ,0 + ,74 + ,34 + ,46154 + ,48149 + ,27997 + ,0 + ,13 + ,18 + ,53249 + ,12743 + ,73019 + ,0 + ,22 + ,15 + ,10726 + ,18743 + ,241082 + ,0 + ,99 + ,30 + ,83700 + ,97057 + ,195820 + ,0 + ,38 + ,25 + ,40400 + ,17675 + ,142001 + ,1 + ,59 + ,34 + ,33797 + ,33106 + ,145433 + ,1 + ,50 + ,21 + ,36205 + ,53311 + ,183744 + ,0 + ,50 + ,21 + ,30165 + ,42754 + ,202232 + ,0 + ,61 + ,25 + ,58534 + ,59056 + ,199532 + ,0 + ,87 + ,31 + ,44663 + ,101621 + ,354924 + ,0 + ,60 + ,31 + ,92556 + ,118120 + ,192399 + ,0 + ,52 + ,20 + ,40078 + ,79572 + ,182286 + ,0 + ,61 + ,28 + ,34711 + ,42744 + ,181590 + ,2 + ,60 + ,22 + ,31076 + ,65931 + ,133801 + ,4 + ,53 + ,17 + ,74608 + ,38575 + ,233686 + ,0 + ,76 + ,25 + ,58092 + ,28795 + ,219428 + ,1 + ,63 + ,24 + ,42009 + ,94440 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,223044 + ,0 + ,54 + ,28 + ,36022 + ,38229 + ,100129 + ,3 + ,44 + ,14 + ,23333 + ,31972 + ,136733 + ,9 + ,36 + ,35 + ,53349 + ,40071 + ,249965 + ,0 + ,83 + ,34 + ,92596 + ,132480 + ,242379 + ,2 + ,105 + ,22 + ,49598 + ,62797 + ,145794 + ,0 + ,37 + ,34 + ,44093 + ,40429 + ,96404 + ,2 + ,25 + ,23 + ,84205 + ,45545 + ,195891 + ,1 + ,64 + ,24 + ,63369 + ,57568 + ,117156 + ,2 + ,55 + ,26 + ,60132 + ,39019 + ,157787 + ,2 + ,41 + ,22 + ,37403 + ,53866 + ,81293 + ,1 + ,23 + ,35 + ,24460 + ,38345 + ,237435 + ,0 + ,75 + ,24 + ,46456 + ,50210 + ,233155 + ,1 + ,59 + ,31 + ,66616 + ,80947 + ,160344 + ,8 + ,68 + ,26 + ,41554 + ,43461 + ,48188 + ,0 + ,12 + ,22 + ,22346 + ,14812 + ,161922 + ,0 + ,99 + ,21 + ,30874 + ,37819 + ,307432 + ,0 + ,78 + ,27 + ,68701 + ,102738 + ,235223 + ,0 + ,56 + ,30 + ,35728 + ,54509 + ,195583 + ,1 + ,67 + ,33 + ,29010 + ,62956 + ,146061 + ,8 + ,40 + ,11 + ,23110 + ,55411 + ,208834 + ,0 + ,53 + ,26 + ,38844 + ,50611 + ,93764 + ,1 + ,26 + ,26 + ,27084 + ,26692 + ,151985 + ,0 + ,67 + ,23 + ,35139 + ,60056 + ,190545 + ,10 + ,36 + ,38 + ,57476 + ,25155 + ,148922 + ,6 + ,50 + ,31 + ,33277 + ,42840 + ,132856 + ,0 + ,48 + ,20 + ,31141 + ,39358 + ,129561 + ,11 + ,46 + ,22 + ,61281 + ,47241 + ,112718 + ,3 + ,53 + ,26 + ,25820 + ,49611 + ,160930 + ,0 + ,27 + ,26 + ,23284 + ,41833 + ,99184 + ,0 + ,38 + ,33 + ,35378 + ,48930 + ,192535 + ,8 + ,71 + ,36 + ,74990 + ,110600 + ,138708 + ,2 + ,93 + ,25 + ,29653 + ,52235 + ,114408 + ,0 + ,59 + ,24 + ,64622 + ,53986 + ,31970 + ,0 + ,5 + ,21 + ,4157 + ,4105 + ,225558 + ,3 + ,53 + ,19 + ,29245 + ,59331 + ,137011 + ,1 + ,40 + ,12 + ,50008 + ,47796 + ,113612 + ,2 + ,72 + ,30 + ,52338 + ,38302 + ,108641 + ,1 + ,51 + ,21 + ,13310 + ,14063 + ,162203 + ,0 + ,81 + ,34 + ,92901 + ,54414 + ,100098 + ,2 + ,27 + ,32 + ,10956 + ,9903 + ,174768 + ,1 + ,94 + ,28 + ,34241 + ,53987 + ,158459 + ,0 + ,71 + ,28 + ,75043 + ,88937 + ,80934 + ,0 + ,20 + ,21 + ,21152 + ,21928 + ,84971 + ,0 + ,34 + ,31 + ,42249 + ,29487 + ,80545 + ,0 + ,54 + ,26 + ,42005 + ,35334 + ,287191 + ,0 + ,49 + ,29 + ,41152 + ,57596 + ,62974 + ,1 + ,26 + ,23 + ,14399 + ,29750 + ,134091 + ,0 + ,48 + ,25 + ,28263 + ,41029 + ,75555 + ,0 + ,35 + ,22 + ,17215 + ,12416 + ,162154 + ,0 + ,32 + ,26 + ,48140 + ,51158 + ,226638 + ,0 + ,55 + ,33 + ,62897 + ,79935 + ,115019 + ,0 + ,58 + ,24 + ,22883 + ,26552 + ,108749 + ,7 + ,44 + ,24 + ,41622 + ,25807 + ,155537 + ,0 + ,45 + ,21 + ,40715 + ,50620 + ,153133 + ,5 + ,49 + ,28 + ,65897 + ,61467 + ,165618 + ,1 + ,72 + ,27 + ,76542 + ,65292 + ,151517 + ,0 + ,39 + ,25 + ,37477 + ,55516 + ,133686 + ,0 + ,28 + ,15 + ,53216 + ,42006 + ,61342 + ,0 + ,24 + ,13 + ,40911 + ,26273 + ,245196 + ,0 + ,52 + ,36 + ,57021 + ,90248 + ,195576 + ,0 + ,96 + ,24 + ,73116 + ,61476 + ,19349 + ,0 + ,13 + ,1 + ,3895 + ,9604 + ,225371 + ,3 + ,38 + ,24 + ,46609 + ,45108 + ,152796 + ,0 + ,41 + ,31 + ,29351 + ,47232 + ,59117 + ,0 + ,24 + ,4 + ,2325 + ,3439 + ,91762 + ,0 + ,54 + ,21 + ,31747 + ,30553 + ,136769 + ,0 + ,68 + ,23 + ,32665 + ,24751 + ,114798 + ,1 + ,28 + ,23 + ,19249 + ,34458 + ,85338 + ,1 + ,36 + ,12 + ,15292 + ,24649 + ,27676 + ,0 + ,2 + ,16 + ,5842 + ,2342 + ,153535 + ,0 + ,91 + ,29 + ,33994 + ,52739 + ,122417 + ,0 + ,29 + ,26 + ,13018 + ,6245 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,91529 + ,0 + ,46 + ,25 + ,98177 + ,35381 + ,107205 + ,0 + ,25 + ,21 + ,37941 + ,19595 + ,144664 + ,0 + ,51 + ,23 + ,31032 + ,50848 + ,136540 + ,0 + ,59 + ,21 + ,32683 + ,39443 + ,76656 + ,0 + ,36 + ,21 + ,34545 + ,27023 + ,3616 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,183065 + ,0 + ,40 + ,23 + ,27525 + ,61022 + ,144677 + ,0 + ,68 + ,33 + ,66856 + ,63528 + ,159104 + ,2 + ,28 + ,30 + ,28549 + ,34835 + ,113273 + ,0 + ,36 + ,23 + ,38610 + ,37172 + ,43410 + ,0 + ,7 + ,1 + ,2781 + ,13 + ,175774 + ,1 + ,70 + ,29 + ,41211 + ,62548 + ,95401 + ,0 + ,30 + ,18 + ,22698 + ,31334 + ,134837 + ,8 + ,69 + ,33 + ,41194 + ,20839 + ,60493 + ,3 + ,3 + ,12 + ,32689 + ,5084 + ,19764 + ,1 + ,10 + ,2 + ,5752 + ,9927 + ,164062 + ,3 + ,46 + ,21 + ,26757 + ,53229 + ,132696 + ,0 + ,34 + ,28 + ,22527 + ,29877 + ,155367 + ,0 + ,54 + ,29 + ,44810 + ,37310 + ,11796 + ,0 + ,1 + ,2 + ,0 + ,0 + ,10674 + ,0 + ,0 + ,0 + ,0 + ,0 + ,142261 + ,0 + ,39 + ,18 + ,100674 + ,50067 + ,6836 + ,0 + ,0 + ,1 + ,0 + ,0 + ,162563 + ,6 + ,48 + ,21 + ,57786 + ,47708 + ,5118 + ,0 + ,5 + ,0 + ,0 + ,0 + ,40248 + ,1 + ,8 + ,4 + ,5444 + ,6012 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,122641 + ,0 + ,38 + ,25 + ,28470 + ,27749 + ,88837 + ,0 + ,21 + ,26 + ,61849 + ,47555 + ,7131 + ,1 + ,0 + ,0 + ,0 + ,0 + ,9056 + ,0 + ,0 + ,4 + ,2179 + ,1336 + ,76611 + ,1 + ,15 + ,17 + ,8019 + ,11017 + ,132697 + ,0 + ,50 + ,21 + ,39644 + ,55184 + ,100681 + ,1 + ,17 + ,22 + ,23494 + ,43485) + ,dim=c(6 + ,144) + ,dimnames=list(c('time' + ,'shared' + ,'blogs' + ,'reviews' + ,'CWcharacters' + ,'Cwseconds') + ,1:144)) > y <- array(NA,dim=c(6,144),dimnames=list(c('time','shared','blogs','reviews','CWcharacters','Cwseconds'),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 shared blogs reviews CWcharacters Cwseconds 1 159261 0 48 19 20465 23975 2 189672 1 53 20 33629 85634 3 7215 0 0 0 1423 1929 4 129098 0 51 27 25629 36294 5 230632 0 76 31 54002 72255 6 515038 1 136 36 151036 189748 7 180745 1 62 23 33287 61834 8 185559 0 83 30 31172 68167 9 154581 0 55 30 28113 38462 10 298001 1 67 26 57803 101219 11 121844 2 50 24 49830 43270 12 184039 0 77 30 52143 76183 13 100324 0 46 22 21055 31476 14 217742 4 79 28 47007 62157 15 168265 4 56 18 28735 46261 16 154647 3 54 22 59147 50063 17 142018 0 81 33 78950 64483 18 79030 5 6 15 13497 2341 19 167047 0 74 34 46154 48149 20 27997 0 13 18 53249 12743 21 73019 0 22 15 10726 18743 22 241082 0 99 30 83700 97057 23 195820 0 38 25 40400 17675 24 142001 1 59 34 33797 33106 25 145433 1 50 21 36205 53311 26 183744 0 50 21 30165 42754 27 202232 0 61 25 58534 59056 28 199532 0 87 31 44663 101621 29 354924 0 60 31 92556 118120 30 192399 0 52 20 40078 79572 31 182286 0 61 28 34711 42744 32 181590 2 60 22 31076 65931 33 133801 4 53 17 74608 38575 34 233686 0 76 25 58092 28795 35 219428 1 63 24 42009 94440 36 0 0 0 0 0 0 37 223044 0 54 28 36022 38229 38 100129 3 44 14 23333 31972 39 136733 9 36 35 53349 40071 40 249965 0 83 34 92596 132480 41 242379 2 105 22 49598 62797 42 145794 0 37 34 44093 40429 43 96404 2 25 23 84205 45545 44 195891 1 64 24 63369 57568 45 117156 2 55 26 60132 39019 46 157787 2 41 22 37403 53866 47 81293 1 23 35 24460 38345 48 237435 0 75 24 46456 50210 49 233155 1 59 31 66616 80947 50 160344 8 68 26 41554 43461 51 48188 0 12 22 22346 14812 52 161922 0 99 21 30874 37819 53 307432 0 78 27 68701 102738 54 235223 0 56 30 35728 54509 55 195583 1 67 33 29010 62956 56 146061 8 40 11 23110 55411 57 208834 0 53 26 38844 50611 58 93764 1 26 26 27084 26692 59 151985 0 67 23 35139 60056 60 190545 10 36 38 57476 25155 61 148922 6 50 31 33277 42840 62 132856 0 48 20 31141 39358 63 129561 11 46 22 61281 47241 64 112718 3 53 26 25820 49611 65 160930 0 27 26 23284 41833 66 99184 0 38 33 35378 48930 67 192535 8 71 36 74990 110600 68 138708 2 93 25 29653 52235 69 114408 0 59 24 64622 53986 70 31970 0 5 21 4157 4105 71 225558 3 53 19 29245 59331 72 137011 1 40 12 50008 47796 73 113612 2 72 30 52338 38302 74 108641 1 51 21 13310 14063 75 162203 0 81 34 92901 54414 76 100098 2 27 32 10956 9903 77 174768 1 94 28 34241 53987 78 158459 0 71 28 75043 88937 79 80934 0 20 21 21152 21928 80 84971 0 34 31 42249 29487 81 80545 0 54 26 42005 35334 82 287191 0 49 29 41152 57596 83 62974 1 26 23 14399 29750 84 134091 0 48 25 28263 41029 85 75555 0 35 22 17215 12416 86 162154 0 32 26 48140 51158 87 226638 0 55 33 62897 79935 88 115019 0 58 24 22883 26552 89 108749 7 44 24 41622 25807 90 155537 0 45 21 40715 50620 91 153133 5 49 28 65897 61467 92 165618 1 72 27 76542 65292 93 151517 0 39 25 37477 55516 94 133686 0 28 15 53216 42006 95 61342 0 24 13 40911 26273 96 245196 0 52 36 57021 90248 97 195576 0 96 24 73116 61476 98 19349 0 13 1 3895 9604 99 225371 3 38 24 46609 45108 100 152796 0 41 31 29351 47232 101 59117 0 24 4 2325 3439 102 91762 0 54 21 31747 30553 103 136769 0 68 23 32665 24751 104 114798 1 28 23 19249 34458 105 85338 1 36 12 15292 24649 106 27676 0 2 16 5842 2342 107 153535 0 91 29 33994 52739 108 122417 0 29 26 13018 6245 109 0 0 0 0 0 0 110 91529 0 46 25 98177 35381 111 107205 0 25 21 37941 19595 112 144664 0 51 23 31032 50848 113 136540 0 59 21 32683 39443 114 76656 0 36 21 34545 27023 115 3616 0 0 0 0 0 116 0 0 0 0 0 0 117 183065 0 40 23 27525 61022 118 144677 0 68 33 66856 63528 119 159104 2 28 30 28549 34835 120 113273 0 36 23 38610 37172 121 43410 0 7 1 2781 13 122 175774 1 70 29 41211 62548 123 95401 0 30 18 22698 31334 124 134837 8 69 33 41194 20839 125 60493 3 3 12 32689 5084 126 19764 1 10 2 5752 9927 127 164062 3 46 21 26757 53229 128 132696 0 34 28 22527 29877 129 155367 0 54 29 44810 37310 130 11796 0 1 2 0 0 131 10674 0 0 0 0 0 132 142261 0 39 18 100674 50067 133 6836 0 0 1 0 0 134 162563 6 48 21 57786 47708 135 5118 0 5 0 0 0 136 40248 1 8 4 5444 6012 137 0 0 0 0 0 0 138 122641 0 38 25 28470 27749 139 88837 0 21 26 61849 47555 140 7131 1 0 0 0 0 141 9056 0 0 4 2179 1336 142 76611 1 15 17 8019 11017 143 132697 0 50 21 39644 55184 144 100681 1 17 22 23494 43485 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) shared blogs reviews CWcharacters 1.260e+04 6.282e+02 7.050e+02 1.246e+03 -4.052e-02 Cwseconds 1.535e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -86729 -19639 -4683 15548 117172 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.260e+04 7.630e+03 1.651 0.101048 shared 6.282e+02 1.370e+03 0.459 0.647285 blogs 7.050e+02 1.901e+02 3.709 0.000300 *** reviews 1.246e+03 4.506e+02 2.765 0.006463 ** CWcharacters -4.052e-02 1.917e-01 -0.211 0.832938 Cwseconds 1.535e+00 1.829e-01 8.391 5.09e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 35640 on 138 degrees of freedom Multiple R-squared: 0.7947, Adjusted R-squared: 0.7872 F-statistic: 106.8 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.2848924 5.697848e-01 7.151076e-01 [2,] 0.4279426 8.558853e-01 5.720574e-01 [3,] 0.4995284 9.990568e-01 5.004716e-01 [4,] 0.6302804 7.394391e-01 3.697196e-01 [5,] 0.5386095 9.227809e-01 4.613905e-01 [6,] 0.4709608 9.419216e-01 5.290392e-01 [7,] 0.3795332 7.590665e-01 6.204668e-01 [8,] 0.3122864 6.245727e-01 6.877136e-01 [9,] 0.5189917 9.620165e-01 4.810083e-01 [10,] 0.4970604 9.941209e-01 5.029396e-01 [11,] 0.4192105 8.384210e-01 5.807895e-01 [12,] 0.3534673 7.069346e-01 6.465327e-01 [13,] 0.2832808 5.665615e-01 7.167192e-01 [14,] 0.2491605 4.983210e-01 7.508395e-01 [15,] 0.8432620 3.134761e-01 1.567380e-01 [16,] 0.7972172 4.055657e-01 2.027828e-01 [17,] 0.7536112 4.927776e-01 2.463888e-01 [18,] 0.7837489 4.325023e-01 2.162511e-01 [19,] 0.7552275 4.895450e-01 2.447725e-01 [20,] 0.8471368 3.057264e-01 1.528632e-01 [21,] 0.9009685 1.980631e-01 9.903154e-02 [22,] 0.8749074 2.501852e-01 1.250926e-01 [23,] 0.8682300 2.635399e-01 1.317700e-01 [24,] 0.8337613 3.324773e-01 1.662387e-01 [25,] 0.8024158 3.951685e-01 1.975842e-01 [26,] 0.9556135 8.877309e-02 4.438654e-02 [27,] 0.9416290 1.167421e-01 5.837103e-02 [28,] 0.9264099 1.471802e-01 7.359010e-02 [29,] 0.9715281 5.694378e-02 2.847189e-02 [30,] 0.9621947 7.561051e-02 3.780525e-02 [31,] 0.9544899 9.102027e-02 4.551014e-02 [32,] 0.9782745 4.345094e-02 2.172547e-02 [33,] 0.9753931 4.921376e-02 2.460688e-02 [34,] 0.9665855 6.682902e-02 3.341451e-02 [35,] 0.9692943 6.141142e-02 3.070571e-02 [36,] 0.9621791 7.564183e-02 3.782091e-02 [37,] 0.9600316 7.993683e-02 3.996842e-02 [38,] 0.9478946 1.042109e-01 5.210543e-02 [39,] 0.9534591 9.308179e-02 4.654090e-02 [40,] 0.9738500 5.230003e-02 2.615002e-02 [41,] 0.9683705 6.325907e-02 3.162953e-02 [42,] 0.9584538 8.309244e-02 4.154622e-02 [43,] 0.9508364 9.832718e-02 4.916359e-02 [44,] 0.9462934 1.074132e-01 5.370662e-02 [45,] 0.9647963 7.040747e-02 3.520373e-02 [46,] 0.9833946 3.321077e-02 1.660538e-02 [47,] 0.9775151 4.496979e-02 2.248489e-02 [48,] 0.9703907 5.921850e-02 2.960925e-02 [49,] 0.9796730 4.065399e-02 2.032699e-02 [50,] 0.9736659 5.266812e-02 2.633406e-02 [51,] 0.9702982 5.940366e-02 2.970183e-02 [52,] 0.9817305 3.653893e-02 1.826947e-02 [53,] 0.9756453 4.870947e-02 2.435474e-02 [54,] 0.9681624 6.367525e-02 3.183763e-02 [55,] 0.9626524 7.469514e-02 3.734757e-02 [56,] 0.9677781 6.444372e-02 3.222186e-02 [57,] 0.9675683 6.486338e-02 3.243169e-02 [58,] 0.9791830 4.163405e-02 2.081702e-02 [59,] 0.9964495 7.101035e-03 3.550517e-03 [60,] 0.9974912 5.017564e-03 2.508782e-03 [61,] 0.9983574 3.285175e-03 1.642587e-03 [62,] 0.9978944 4.211220e-03 2.105610e-03 [63,] 0.9990800 1.839962e-03 9.199808e-04 [64,] 0.9987622 2.475673e-03 1.237836e-03 [65,] 0.9990226 1.954834e-03 9.774172e-04 [66,] 0.9986310 2.737968e-03 1.368984e-03 [67,] 0.9983996 3.200818e-03 1.600409e-03 [68,] 0.9977233 4.553449e-03 2.276725e-03 [69,] 0.9968663 6.267394e-03 3.133697e-03 [70,] 0.9990426 1.914796e-03 9.573980e-04 [71,] 0.9985661 2.867743e-03 1.433872e-03 [72,] 0.9986444 2.711226e-03 1.355613e-03 [73,] 0.9992787 1.442640e-03 7.213202e-04 [74,] 0.9999992 1.570781e-06 7.853906e-07 [75,] 0.9999997 5.251298e-07 2.625649e-07 [76,] 0.9999995 1.034266e-06 5.171331e-07 [77,] 0.9999991 1.894113e-06 9.470566e-07 [78,] 0.9999985 3.031977e-06 1.515989e-06 [79,] 0.9999977 4.680819e-06 2.340409e-06 [80,] 0.9999956 8.737267e-06 4.368633e-06 [81,] 0.9999937 1.265253e-05 6.326267e-06 [82,] 0.9999901 1.972922e-05 9.864610e-06 [83,] 0.9999909 1.824240e-05 9.121198e-06 [84,] 0.9999870 2.593904e-05 1.296952e-05 [85,] 0.9999761 4.780633e-05 2.390316e-05 [86,] 0.9999743 5.134090e-05 2.567045e-05 [87,] 0.9999623 7.532370e-05 3.766185e-05 [88,] 0.9999461 1.077618e-04 5.388092e-05 [89,] 0.9999337 1.326539e-04 6.632695e-05 [90,] 0.9998921 2.158537e-04 1.079269e-04 [91,] 0.9999994 1.161504e-06 5.807522e-07 [92,] 0.9999987 2.506439e-06 1.253219e-06 [93,] 0.9999986 2.730659e-06 1.365330e-06 [94,] 0.9999983 3.459315e-06 1.729657e-06 [95,] 0.9999977 4.612534e-06 2.306267e-06 [96,] 0.9999952 9.671195e-06 4.835598e-06 [97,] 0.9999900 1.999045e-05 9.995225e-06 [98,] 0.9999888 2.245340e-05 1.122670e-05 [99,] 0.9999847 3.059002e-05 1.529501e-05 [100,] 0.9999915 1.698940e-05 8.494699e-06 [101,] 0.9999836 3.271261e-05 1.635630e-05 [102,] 0.9999784 4.326097e-05 2.163048e-05 [103,] 0.9999739 5.217908e-05 2.608954e-05 [104,] 0.9999449 1.102910e-04 5.514549e-05 [105,] 0.9998991 2.017432e-04 1.008716e-04 [106,] 0.9998732 2.535355e-04 1.267677e-04 [107,] 0.9997498 5.003310e-04 2.501655e-04 [108,] 0.9995477 9.045173e-04 4.522587e-04 [109,] 0.9997148 5.704770e-04 2.852385e-04 [110,] 0.9999136 1.728497e-04 8.642487e-05 [111,] 0.9999608 7.839249e-05 3.919624e-05 [112,] 0.9999080 1.840377e-04 9.201885e-05 [113,] 0.9999213 1.573408e-04 7.867038e-05 [114,] 0.9998374 3.252216e-04 1.626108e-04 [115,] 0.9996113 7.774919e-04 3.887460e-04 [116,] 0.9999972 5.501965e-06 2.750982e-06 [117,] 0.9999911 1.782314e-05 8.911571e-06 [118,] 0.9999830 3.407701e-05 1.703851e-05 [119,] 0.9999818 3.646011e-05 1.823005e-05 [120,] 0.9999623 7.547905e-05 3.773952e-05 [121,] 0.9998624 2.752420e-04 1.376210e-04 [122,] 0.9994895 1.020947e-03 5.104737e-04 [123,] 0.9984224 3.155221e-03 1.577610e-03 [124,] 0.9999864 2.722553e-05 1.361277e-05 [125,] 0.9999024 1.952800e-04 9.764002e-05 [126,] 0.9996291 7.417632e-04 3.708816e-04 [127,] 0.9968517 6.296546e-03 3.148273e-03 > postscript(file="/var/www/rcomp/tmp/1mhcm1324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/23w0c1324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3ewbg1324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/4sc0v1324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/57gxe1324478474.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 7 53176.172 -15921.209 -8284.496 -7770.429 17105.251 75938.497 1585.636 8 9 10 11 12 13 14 -26307.093 7927.008 52118.218 -21564.530 -35051.197 -19578.718 18542.047 15 16 17 18 19 20 21 21400.883 233.100 -64585.826 37324.445 -12124.976 -33596.869 -2114.347 22 23 24 25 26 27 28 -24280.448 99786.598 -4634.385 -9573.288 45325.435 27200.620 -67203.284 29 30 31 32 33 34 35 83840.318 -2294.937 27588.804 -1919.567 3954.252 94509.747 -11377.063 36 37 38 39 40 41 42 -12596.272 80265.367 -10948.320 -9856.836 -63112.777 32703.880 4474.412 43 44 45 46 47 48 49 -30231.748 21842.327 -25327.523 6448.360 -49627.119 66867.891 18155.103 50 51 52 53 54 55 56 -2644.994 -22113.194 -3439.586 51285.930 63541.487 -1458.173 2414.939 57 58 59 60 61 62 63 50361.462 -10063.313 -27267.195 62650.870 -5732.769 2345.787 -19820.109 64 65 66 67 68 69 70 -46631.880 33631.491 -54996.064 -86729.200 -50841.259 -49938.427 -16452.323 71 72 73 74 75 76 77 60150.178 9294.495 -45056.802 12244.978 -29626.460 12577.248 -21099.752 78 79 80 81 82 83 84 -72557.411 -4732.289 -33774.646 -55055.359 117172.274 -42322.754 -5331.270 85 86 87 88 89 90 91 -7492.163 18024.209 13996.858 -8204.283 -7098.355 8997.301 -23719.659 92 93 94 95 96 97 98 -29131.348 -3423.178 20336.967 -23044.178 14863.789 -6009.130 -18242.476 99 100 101 102 103 104 105 86842.969 1355.178 19431.045 -30684.910 10902.255 1061.238 -5435.951 106 107 108 109 110 111 112 -9626.290 -38929.993 47917.578 -12596.272 -34981.149 22274.792 -9340.428 113 114 115 116 117 118 119 -3039.685 -27568.637 -8980.272 -12596.272 21057.458 -51785.558 35814.387 120 121 122 123 124 125 126 -8857.174 24725.106 -17277.200 -7952.192 -2871.223 22464.575 -18007.222 127 128 129 130 131 132 133 10362.517 16290.985 13108.924 -3997.536 -1922.272 6968.076 -7006.387 134 135 136 137 138 139 140 15300.464 -11003.438 7391.387 -12596.272 10661.328 -41451.611 -6093.461 141 142 143 144 -10487.113 15041.657 -24416.683 -17738.100 > postscript(file="/var/www/rcomp/tmp/65pbz1324478474.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 53176.172 NA 1 -15921.209 53176.172 2 -8284.496 -15921.209 3 -7770.429 -8284.496 4 17105.251 -7770.429 5 75938.497 17105.251 6 1585.636 75938.497 7 -26307.093 1585.636 8 7927.008 -26307.093 9 52118.218 7927.008 10 -21564.530 52118.218 11 -35051.197 -21564.530 12 -19578.718 -35051.197 13 18542.047 -19578.718 14 21400.883 18542.047 15 233.100 21400.883 16 -64585.826 233.100 17 37324.445 -64585.826 18 -12124.976 37324.445 19 -33596.869 -12124.976 20 -2114.347 -33596.869 21 -24280.448 -2114.347 22 99786.598 -24280.448 23 -4634.385 99786.598 24 -9573.288 -4634.385 25 45325.435 -9573.288 26 27200.620 45325.435 27 -67203.284 27200.620 28 83840.318 -67203.284 29 -2294.937 83840.318 30 27588.804 -2294.937 31 -1919.567 27588.804 32 3954.252 -1919.567 33 94509.747 3954.252 34 -11377.063 94509.747 35 -12596.272 -11377.063 36 80265.367 -12596.272 37 -10948.320 80265.367 38 -9856.836 -10948.320 39 -63112.777 -9856.836 40 32703.880 -63112.777 41 4474.412 32703.880 42 -30231.748 4474.412 43 21842.327 -30231.748 44 -25327.523 21842.327 45 6448.360 -25327.523 46 -49627.119 6448.360 47 66867.891 -49627.119 48 18155.103 66867.891 49 -2644.994 18155.103 50 -22113.194 -2644.994 51 -3439.586 -22113.194 52 51285.930 -3439.586 53 63541.487 51285.930 54 -1458.173 63541.487 55 2414.939 -1458.173 56 50361.462 2414.939 57 -10063.313 50361.462 58 -27267.195 -10063.313 59 62650.870 -27267.195 60 -5732.769 62650.870 61 2345.787 -5732.769 62 -19820.109 2345.787 63 -46631.880 -19820.109 64 33631.491 -46631.880 65 -54996.064 33631.491 66 -86729.200 -54996.064 67 -50841.259 -86729.200 68 -49938.427 -50841.259 69 -16452.323 -49938.427 70 60150.178 -16452.323 71 9294.495 60150.178 72 -45056.802 9294.495 73 12244.978 -45056.802 74 -29626.460 12244.978 75 12577.248 -29626.460 76 -21099.752 12577.248 77 -72557.411 -21099.752 78 -4732.289 -72557.411 79 -33774.646 -4732.289 80 -55055.359 -33774.646 81 117172.274 -55055.359 82 -42322.754 117172.274 83 -5331.270 -42322.754 84 -7492.163 -5331.270 85 18024.209 -7492.163 86 13996.858 18024.209 87 -8204.283 13996.858 88 -7098.355 -8204.283 89 8997.301 -7098.355 90 -23719.659 8997.301 91 -29131.348 -23719.659 92 -3423.178 -29131.348 93 20336.967 -3423.178 94 -23044.178 20336.967 95 14863.789 -23044.178 96 -6009.130 14863.789 97 -18242.476 -6009.130 98 86842.969 -18242.476 99 1355.178 86842.969 100 19431.045 1355.178 101 -30684.910 19431.045 102 10902.255 -30684.910 103 1061.238 10902.255 104 -5435.951 1061.238 105 -9626.290 -5435.951 106 -38929.993 -9626.290 107 47917.578 -38929.993 108 -12596.272 47917.578 109 -34981.149 -12596.272 110 22274.792 -34981.149 111 -9340.428 22274.792 112 -3039.685 -9340.428 113 -27568.637 -3039.685 114 -8980.272 -27568.637 115 -12596.272 -8980.272 116 21057.458 -12596.272 117 -51785.558 21057.458 118 35814.387 -51785.558 119 -8857.174 35814.387 120 24725.106 -8857.174 121 -17277.200 24725.106 122 -7952.192 -17277.200 123 -2871.223 -7952.192 124 22464.575 -2871.223 125 -18007.222 22464.575 126 10362.517 -18007.222 127 16290.985 10362.517 128 13108.924 16290.985 129 -3997.536 13108.924 130 -1922.272 -3997.536 131 6968.076 -1922.272 132 -7006.387 6968.076 133 15300.464 -7006.387 134 -11003.438 15300.464 135 7391.387 -11003.438 136 -12596.272 7391.387 137 10661.328 -12596.272 138 -41451.611 10661.328 139 -6093.461 -41451.611 140 -10487.113 -6093.461 141 15041.657 -10487.113 142 -24416.683 15041.657 143 -17738.100 -24416.683 144 NA -17738.100 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -15921.209 53176.172 [2,] -8284.496 -15921.209 [3,] -7770.429 -8284.496 [4,] 17105.251 -7770.429 [5,] 75938.497 17105.251 [6,] 1585.636 75938.497 [7,] -26307.093 1585.636 [8,] 7927.008 -26307.093 [9,] 52118.218 7927.008 [10,] -21564.530 52118.218 [11,] -35051.197 -21564.530 [12,] -19578.718 -35051.197 [13,] 18542.047 -19578.718 [14,] 21400.883 18542.047 [15,] 233.100 21400.883 [16,] -64585.826 233.100 [17,] 37324.445 -64585.826 [18,] -12124.976 37324.445 [19,] -33596.869 -12124.976 [20,] -2114.347 -33596.869 [21,] -24280.448 -2114.347 [22,] 99786.598 -24280.448 [23,] -4634.385 99786.598 [24,] -9573.288 -4634.385 [25,] 45325.435 -9573.288 [26,] 27200.620 45325.435 [27,] -67203.284 27200.620 [28,] 83840.318 -67203.284 [29,] -2294.937 83840.318 [30,] 27588.804 -2294.937 [31,] -1919.567 27588.804 [32,] 3954.252 -1919.567 [33,] 94509.747 3954.252 [34,] -11377.063 94509.747 [35,] -12596.272 -11377.063 [36,] 80265.367 -12596.272 [37,] -10948.320 80265.367 [38,] -9856.836 -10948.320 [39,] -63112.777 -9856.836 [40,] 32703.880 -63112.777 [41,] 4474.412 32703.880 [42,] -30231.748 4474.412 [43,] 21842.327 -30231.748 [44,] -25327.523 21842.327 [45,] 6448.360 -25327.523 [46,] -49627.119 6448.360 [47,] 66867.891 -49627.119 [48,] 18155.103 66867.891 [49,] -2644.994 18155.103 [50,] -22113.194 -2644.994 [51,] -3439.586 -22113.194 [52,] 51285.930 -3439.586 [53,] 63541.487 51285.930 [54,] -1458.173 63541.487 [55,] 2414.939 -1458.173 [56,] 50361.462 2414.939 [57,] -10063.313 50361.462 [58,] -27267.195 -10063.313 [59,] 62650.870 -27267.195 [60,] -5732.769 62650.870 [61,] 2345.787 -5732.769 [62,] -19820.109 2345.787 [63,] -46631.880 -19820.109 [64,] 33631.491 -46631.880 [65,] -54996.064 33631.491 [66,] -86729.200 -54996.064 [67,] -50841.259 -86729.200 [68,] -49938.427 -50841.259 [69,] -16452.323 -49938.427 [70,] 60150.178 -16452.323 [71,] 9294.495 60150.178 [72,] -45056.802 9294.495 [73,] 12244.978 -45056.802 [74,] -29626.460 12244.978 [75,] 12577.248 -29626.460 [76,] -21099.752 12577.248 [77,] -72557.411 -21099.752 [78,] -4732.289 -72557.411 [79,] -33774.646 -4732.289 [80,] -55055.359 -33774.646 [81,] 117172.274 -55055.359 [82,] -42322.754 117172.274 [83,] -5331.270 -42322.754 [84,] -7492.163 -5331.270 [85,] 18024.209 -7492.163 [86,] 13996.858 18024.209 [87,] -8204.283 13996.858 [88,] -7098.355 -8204.283 [89,] 8997.301 -7098.355 [90,] -23719.659 8997.301 [91,] -29131.348 -23719.659 [92,] -3423.178 -29131.348 [93,] 20336.967 -3423.178 [94,] -23044.178 20336.967 [95,] 14863.789 -23044.178 [96,] -6009.130 14863.789 [97,] -18242.476 -6009.130 [98,] 86842.969 -18242.476 [99,] 1355.178 86842.969 [100,] 19431.045 1355.178 [101,] -30684.910 19431.045 [102,] 10902.255 -30684.910 [103,] 1061.238 10902.255 [104,] -5435.951 1061.238 [105,] -9626.290 -5435.951 [106,] -38929.993 -9626.290 [107,] 47917.578 -38929.993 [108,] -12596.272 47917.578 [109,] -34981.149 -12596.272 [110,] 22274.792 -34981.149 [111,] -9340.428 22274.792 [112,] -3039.685 -9340.428 [113,] -27568.637 -3039.685 [114,] -8980.272 -27568.637 [115,] -12596.272 -8980.272 [116,] 21057.458 -12596.272 [117,] -51785.558 21057.458 [118,] 35814.387 -51785.558 [119,] -8857.174 35814.387 [120,] 24725.106 -8857.174 [121,] -17277.200 24725.106 [122,] -7952.192 -17277.200 [123,] -2871.223 -7952.192 [124,] 22464.575 -2871.223 [125,] -18007.222 22464.575 [126,] 10362.517 -18007.222 [127,] 16290.985 10362.517 [128,] 13108.924 16290.985 [129,] -3997.536 13108.924 [130,] -1922.272 -3997.536 [131,] 6968.076 -1922.272 [132,] -7006.387 6968.076 [133,] 15300.464 -7006.387 [134,] -11003.438 15300.464 [135,] 7391.387 -11003.438 [136,] -12596.272 7391.387 [137,] 10661.328 -12596.272 [138,] -41451.611 10661.328 [139,] -6093.461 -41451.611 [140,] -10487.113 -6093.461 [141,] 15041.657 -10487.113 [142,] -24416.683 15041.657 [143,] -17738.100 -24416.683 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -15921.209 53176.172 2 -8284.496 -15921.209 3 -7770.429 -8284.496 4 17105.251 -7770.429 5 75938.497 17105.251 6 1585.636 75938.497 7 -26307.093 1585.636 8 7927.008 -26307.093 9 52118.218 7927.008 10 -21564.530 52118.218 11 -35051.197 -21564.530 12 -19578.718 -35051.197 13 18542.047 -19578.718 14 21400.883 18542.047 15 233.100 21400.883 16 -64585.826 233.100 17 37324.445 -64585.826 18 -12124.976 37324.445 19 -33596.869 -12124.976 20 -2114.347 -33596.869 21 -24280.448 -2114.347 22 99786.598 -24280.448 23 -4634.385 99786.598 24 -9573.288 -4634.385 25 45325.435 -9573.288 26 27200.620 45325.435 27 -67203.284 27200.620 28 83840.318 -67203.284 29 -2294.937 83840.318 30 27588.804 -2294.937 31 -1919.567 27588.804 32 3954.252 -1919.567 33 94509.747 3954.252 34 -11377.063 94509.747 35 -12596.272 -11377.063 36 80265.367 -12596.272 37 -10948.320 80265.367 38 -9856.836 -10948.320 39 -63112.777 -9856.836 40 32703.880 -63112.777 41 4474.412 32703.880 42 -30231.748 4474.412 43 21842.327 -30231.748 44 -25327.523 21842.327 45 6448.360 -25327.523 46 -49627.119 6448.360 47 66867.891 -49627.119 48 18155.103 66867.891 49 -2644.994 18155.103 50 -22113.194 -2644.994 51 -3439.586 -22113.194 52 51285.930 -3439.586 53 63541.487 51285.930 54 -1458.173 63541.487 55 2414.939 -1458.173 56 50361.462 2414.939 57 -10063.313 50361.462 58 -27267.195 -10063.313 59 62650.870 -27267.195 60 -5732.769 62650.870 61 2345.787 -5732.769 62 -19820.109 2345.787 63 -46631.880 -19820.109 64 33631.491 -46631.880 65 -54996.064 33631.491 66 -86729.200 -54996.064 67 -50841.259 -86729.200 68 -49938.427 -50841.259 69 -16452.323 -49938.427 70 60150.178 -16452.323 71 9294.495 60150.178 72 -45056.802 9294.495 73 12244.978 -45056.802 74 -29626.460 12244.978 75 12577.248 -29626.460 76 -21099.752 12577.248 77 -72557.411 -21099.752 78 -4732.289 -72557.411 79 -33774.646 -4732.289 80 -55055.359 -33774.646 81 117172.274 -55055.359 82 -42322.754 117172.274 83 -5331.270 -42322.754 84 -7492.163 -5331.270 85 18024.209 -7492.163 86 13996.858 18024.209 87 -8204.283 13996.858 88 -7098.355 -8204.283 89 8997.301 -7098.355 90 -23719.659 8997.301 91 -29131.348 -23719.659 92 -3423.178 -29131.348 93 20336.967 -3423.178 94 -23044.178 20336.967 95 14863.789 -23044.178 96 -6009.130 14863.789 97 -18242.476 -6009.130 98 86842.969 -18242.476 99 1355.178 86842.969 100 19431.045 1355.178 101 -30684.910 19431.045 102 10902.255 -30684.910 103 1061.238 10902.255 104 -5435.951 1061.238 105 -9626.290 -5435.951 106 -38929.993 -9626.290 107 47917.578 -38929.993 108 -12596.272 47917.578 109 -34981.149 -12596.272 110 22274.792 -34981.149 111 -9340.428 22274.792 112 -3039.685 -9340.428 113 -27568.637 -3039.685 114 -8980.272 -27568.637 115 -12596.272 -8980.272 116 21057.458 -12596.272 117 -51785.558 21057.458 118 35814.387 -51785.558 119 -8857.174 35814.387 120 24725.106 -8857.174 121 -17277.200 24725.106 122 -7952.192 -17277.200 123 -2871.223 -7952.192 124 22464.575 -2871.223 125 -18007.222 22464.575 126 10362.517 -18007.222 127 16290.985 10362.517 128 13108.924 16290.985 129 -3997.536 13108.924 130 -1922.272 -3997.536 131 6968.076 -1922.272 132 -7006.387 6968.076 133 15300.464 -7006.387 134 -11003.438 15300.464 135 7391.387 -11003.438 136 -12596.272 7391.387 137 10661.328 -12596.272 138 -41451.611 10661.328 139 -6093.461 -41451.611 140 -10487.113 -6093.461 141 15041.657 -10487.113 142 -24416.683 15041.657 143 -17738.100 -24416.683 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/72cuc1324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/8gv521324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/9dipg1324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/rcomp/tmp/10eqss1324478474.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/11m49e1324478474.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/12gaao1324478474.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/13q72v1324478474.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/14xev01324478474.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/15rpc71324478474.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/16khay1324478475.tab") + } > > try(system("convert tmp/1mhcm1324478474.ps tmp/1mhcm1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/23w0c1324478474.ps tmp/23w0c1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/3ewbg1324478474.ps tmp/3ewbg1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/4sc0v1324478474.ps tmp/4sc0v1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/57gxe1324478474.ps tmp/57gxe1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/65pbz1324478474.ps tmp/65pbz1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/72cuc1324478474.ps tmp/72cuc1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/8gv521324478474.ps tmp/8gv521324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/9dipg1324478474.ps tmp/9dipg1324478474.png",intern=TRUE)) character(0) > try(system("convert tmp/10eqss1324478474.ps tmp/10eqss1324478474.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.030 0.400 5.461