R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(1910 + ,61 + ,56 + ,51 + ,2598 + ,74 + ,73 + ,48 + ,2144 + ,57 + ,62 + ,46 + ,1331 + ,50 + ,42 + ,42 + ,1431 + ,48 + ,59 + ,38 + ,7334 + ,2 + ,27 + ,38 + ,1133 + ,41 + ,59 + ,36 + ,1535 + ,61 + ,56 + ,36 + ,1196 + ,31 + ,78 + ,35 + ,1551 + ,12 + ,47 + ,35 + ,2108 + ,46 + ,51 + ,34 + ,1335 + ,31 + ,47 + ,34 + ,1532 + ,60 + ,55 + ,32 + ,842 + ,49 + ,35 + ,31 + ,1539 + ,15 + ,47 + ,31 + ,1065 + ,33 + ,48 + ,31 + ,1474 + ,36 + ,47 + ,31 + ,1226 + ,55 + ,55 + ,30 + ,1598 + ,28 + ,42 + ,30 + ,1546 + ,44 + ,54 + ,30 + ,914 + ,41 + ,60 + ,30 + ,1371 + ,26 + ,51 + ,28 + ,1318 + ,28 + ,47 + ,27 + ,1313 + ,40 + ,52 + ,27 + ,1743 + ,28 + ,38 + ,27 + ,1060 + ,57 + ,46 + ,26 + ,1102 + ,67 + ,12 + ,26 + ,1275 + ,56 + ,48 + ,26 + ,1253 + ,54 + ,48 + ,26 + ,1487 + ,25 + ,32 + ,26 + ,1098 + ,19 + ,27 + ,26 + ,930 + ,28 + ,60 + ,25 + ,1176 + ,36 + ,47 + ,25 + ,1290 + ,19 + ,47 + ,25 + ,903 + ,42 + ,58 + ,25 + ,1240 + ,30 + ,47 + ,24 + ,1402 + ,28 + ,45 + ,24 + ,1495 + ,41 + ,48 + ,24 + ,1493 + ,35 + ,42 + ,24 + ,826 + ,10 + ,41 + ,24 + ,1469 + ,57 + ,48 + ,24 + ,1064 + ,48 + ,60 + ,24 + ,821 + ,32 + ,56 + ,24 + ,1317 + ,39 + ,41 + ,23 + ,873 + ,49 + ,52 + ,23 + ,982 + ,22 + ,50 + ,23 + ,708 + ,17 + ,49 + ,23 + ,1174 + ,30 + ,42 + ,23 + ,853 + ,55 + ,39 + ,23 + ,872 + ,33 + ,39 + ,23 + ,1202 + ,42 + ,41 + ,23 + ,793 + ,24 + ,46 + ,22 + ,1000 + ,13 + ,36 + ,22 + ,1205 + ,35 + ,49 + ,22 + ,1671 + ,37 + ,48 + ,22 + ,1106 + ,3 + ,55 + ,22 + ,1131 + ,15 + ,45 + ,22 + ,775 + ,19 + ,48 + ,21 + ,1224 + ,29 + ,52 + ,21 + ,1375 + ,28 + ,39 + ,21 + ,804 + ,38 + ,45 + ,21 + ,923 + ,23 + ,32 + ,20 + ,1233 + ,38 + ,51 + ,20 + ,1170 + ,35 + ,41 + ,20 + ,613 + ,27 + ,52 + ,20 + ,987 + ,23 + ,22 + ,20 + ,1204 + ,32 + ,54 + ,19 + ,933 + ,7 + ,27 + ,18 + ,861 + ,57 + ,41 + ,18 + ,932 + ,39 + ,45 + ,18 + ,705 + ,18 + ,52 + ,18 + ,828 + ,18 + ,57 + ,17 + ,1083 + ,41 + ,47 + ,17 + ,779 + ,33 + ,41 + ,16 + ,792 + ,0 + ,46 + ,16 + ,587 + ,35 + ,43 + ,16 + ,918 + ,37 + ,31 + ,16 + ,649 + ,16 + ,40 + ,16 + ,843 + ,34 + ,24 + ,16 + ,1060 + ,35 + ,30 + ,16 + ,575 + ,25 + ,45 + ,15 + ,548 + ,26 + ,32 + ,15 + ,503 + ,13 + ,46 + ,15 + ,743 + ,30 + ,9 + ,15 + ,846 + ,17 + ,44 + ,15 + ,861 + ,54 + ,32 + ,15 + ,486 + ,40 + ,37 + ,15 + ,634 + ,9 + ,64 + ,15 + ,871 + ,25 + ,21 + ,14 + ,715 + ,29 + ,20 + ,14 + ,812 + ,40 + ,33 + ,14 + ,970 + ,32 + ,26 + ,14 + ,959 + ,17 + ,36 + ,13 + ,960 + ,18 + ,33 + ,13 + ,646 + ,17 + ,20 + ,13 + ,562 + ,15 + ,31 + ,13 + ,636 + ,28 + ,13 + ,13 + ,646 + ,18 + ,35 + ,13 + ,428 + ,10 + ,24 + ,12 + ,830 + ,10 + ,40 + ,12 + ,460 + ,4 + ,19 + ,12 + ,781 + ,10 + ,15 + ,12 + ,567 + ,2 + ,34 + ,12 + ,694 + ,25 + ,32 + ,12 + ,475 + ,16 + ,58 + ,12 + ,485 + ,28 + ,21 + ,12 + ,613 + ,25 + ,31 + ,11 + ,480 + ,7 + ,21 + ,11 + ,582 + ,27 + ,26 + ,11 + ,569 + ,16 + ,47 + ,11 + ,559 + ,7 + ,37 + ,11 + ,508 + ,16 + ,28 + ,10 + ,488 + ,0 + ,9 + ,10 + ,475 + ,36 + ,45 + ,9 + ,630 + ,15 + ,32 + ,9 + ,386 + ,5 + ,35 + ,9 + ,511 + ,14 + ,29 + ,9 + ,585 + ,43 + ,1 + ,9 + ,580 + ,10 + ,20 + ,9 + ,516 + ,0 + ,15 + ,9 + ,413 + ,8 + ,11 + ,8 + ,495 + ,12 + ,33 + ,8 + ,478 + ,10 + ,18 + ,8 + ,350 + ,39 + ,10 + ,7 + ,427 + ,0 + ,41 + ,7 + ,349 + ,10 + ,10 + ,6 + ,335 + ,7 + ,0 + ,6 + ,470 + ,8 + ,28 + ,5 + ,250 + ,0 + ,31 + ,5 + ,308 + ,3 + ,24 + ,5 + ,229 + ,0 + ,38 + ,5 + ,244 + ,8 + ,0 + ,5 + ,242 + ,1 + ,25 + ,5 + ,352 + ,0 + ,40 + ,5 + ,428 + ,8 + ,4 + ,5 + ,270 + ,3 + ,23 + ,5 + ,242 + ,0 + ,13 + ,4 + ,291 + ,0 + ,6 + ,4 + ,135 + ,0 + ,0 + ,3 + ,210 + ,3 + ,3 + ,3 + ,231 + ,0 + ,0 + ,2 + ,268 + ,0 + ,7 + ,2 + ,126 + ,0 + ,2 + ,2 + ,340 + ,0 + ,0 + ,2 + ,44 + ,0 + ,0 + ,2 + ,25 + ,0 + ,0 + ,1 + ,104 + ,0 + ,0 + ,1 + ,142 + ,2 + ,5 + ,1 + ,11 + ,0 + ,0 + ,0) + ,dim=c(4 + ,149) + ,dimnames=list(c('pg' + ,'blogs' + ,'LFM' + ,'hours') + ,1:149)) > y <- array(NA,dim=c(4,149),dimnames=list(c('pg','blogs','LFM','hours'),1:149)) > 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 = '3' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '3' > #'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 Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > 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 LFM pg blogs hours 1 56 1910 61 51 2 73 2598 74 48 3 62 2144 57 46 4 42 1331 50 42 5 59 1431 48 38 6 27 7334 2 38 7 59 1133 41 36 8 56 1535 61 36 9 78 1196 31 35 10 47 1551 12 35 11 51 2108 46 34 12 47 1335 31 34 13 55 1532 60 32 14 35 842 49 31 15 47 1539 15 31 16 48 1065 33 31 17 47 1474 36 31 18 55 1226 55 30 19 42 1598 28 30 20 54 1546 44 30 21 60 914 41 30 22 51 1371 26 28 23 47 1318 28 27 24 52 1313 40 27 25 38 1743 28 27 26 46 1060 57 26 27 12 1102 67 26 28 48 1275 56 26 29 48 1253 54 26 30 32 1487 25 26 31 27 1098 19 26 32 60 930 28 25 33 47 1176 36 25 34 47 1290 19 25 35 58 903 42 25 36 47 1240 30 24 37 45 1402 28 24 38 48 1495 41 24 39 42 1493 35 24 40 41 826 10 24 41 48 1469 57 24 42 60 1064 48 24 43 56 821 32 24 44 41 1317 39 23 45 52 873 49 23 46 50 982 22 23 47 49 708 17 23 48 42 1174 30 23 49 39 853 55 23 50 39 872 33 23 51 41 1202 42 23 52 46 793 24 22 53 36 1000 13 22 54 49 1205 35 22 55 48 1671 37 22 56 55 1106 3 22 57 45 1131 15 22 58 48 775 19 21 59 52 1224 29 21 60 39 1375 28 21 61 45 804 38 21 62 32 923 23 20 63 51 1233 38 20 64 41 1170 35 20 65 52 613 27 20 66 22 987 23 20 67 54 1204 32 19 68 27 933 7 18 69 41 861 57 18 70 45 932 39 18 71 52 705 18 18 72 57 828 18 17 73 47 1083 41 17 74 41 779 33 16 75 46 792 0 16 76 43 587 35 16 77 31 918 37 16 78 40 649 16 16 79 24 843 34 16 80 30 1060 35 16 81 45 575 25 15 82 32 548 26 15 83 46 503 13 15 84 9 743 30 15 85 44 846 17 15 86 32 861 54 15 87 37 486 40 15 88 64 634 9 15 89 21 871 25 14 90 20 715 29 14 91 33 812 40 14 92 26 970 32 14 93 36 959 17 13 94 33 960 18 13 95 20 646 17 13 96 31 562 15 13 97 13 636 28 13 98 35 646 18 13 99 24 428 10 12 100 40 830 10 12 101 19 460 4 12 102 15 781 10 12 103 34 567 2 12 104 32 694 25 12 105 58 475 16 12 106 21 485 28 12 107 31 613 25 11 108 21 480 7 11 109 26 582 27 11 110 47 569 16 11 111 37 559 7 11 112 28 508 16 10 113 9 488 0 10 114 45 475 36 9 115 32 630 15 9 116 35 386 5 9 117 29 511 14 9 118 1 585 43 9 119 20 580 10 9 120 15 516 0 9 121 11 413 8 8 122 33 495 12 8 123 18 478 10 8 124 10 350 39 7 125 41 427 0 7 126 10 349 10 6 127 0 335 7 6 128 28 470 8 5 129 31 250 0 5 130 24 308 3 5 131 38 229 0 5 132 0 244 8 5 133 25 242 1 5 134 40 352 0 5 135 4 428 8 5 136 23 270 3 5 137 13 242 0 4 138 6 291 0 4 139 0 135 0 3 140 3 210 3 3 141 0 231 0 2 142 7 268 0 2 143 2 126 0 2 144 0 340 0 2 145 0 44 0 2 146 0 25 0 1 147 0 104 0 1 148 5 142 2 1 149 0 11 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) pg blogs hours 13.217050 -0.004963 0.006620 1.481203 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -34.702 -8.796 1.217 7.732 31.652 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13.217050 1.938188 6.819 2.29e-10 *** pg -0.004963 0.001994 -2.489 0.0139 * blogs 0.006620 0.078269 0.085 0.9327 hours 1.481203 0.176157 8.408 3.56e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.82 on 145 degrees of freedom Multiple R-squared: 0.5634, Adjusted R-squared: 0.5544 F-statistic: 62.38 on 3 and 145 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.32507464 0.6501492716 6.749254e-01 [2,] 0.37160778 0.7432155649 6.283922e-01 [3,] 0.80017643 0.3996471357 1.998236e-01 [4,] 0.72540244 0.5491951257 2.745976e-01 [5,] 0.65214320 0.6957135918 3.478568e-01 [6,] 0.59880330 0.8023933934 4.011967e-01 [7,] 0.50873704 0.9825259240 4.912630e-01 [8,] 0.69407879 0.6118424131 3.059212e-01 [9,] 0.61651976 0.7669604809 3.834802e-01 [10,] 0.54073207 0.9185358626 4.592679e-01 [11,] 0.46431423 0.9286284586 5.356858e-01 [12,] 0.38962839 0.7792567745 6.103716e-01 [13,] 0.33841050 0.6768210089 6.615895e-01 [14,] 0.28068294 0.5613658864 7.193171e-01 [15,] 0.25251600 0.5050320098 7.474840e-01 [16,] 0.20256901 0.4051380129 7.974310e-01 [17,] 0.15548533 0.3109706552 8.445147e-01 [18,] 0.11755423 0.2351084506 8.824458e-01 [19,] 0.10704453 0.2140890587 8.929555e-01 [20,] 0.08419373 0.1683874672 9.158063e-01 [21,] 0.57105980 0.8578803937 4.289402e-01 [22,] 0.52427319 0.9514536107 4.757268e-01 [23,] 0.47322867 0.9464573476 5.267713e-01 [24,] 0.50060431 0.9987913719 4.993957e-01 [25,] 0.62836423 0.7432715358 3.716358e-01 [26,] 0.67539575 0.6492085086 3.246043e-01 [27,] 0.62964852 0.7407029640 3.703515e-01 [28,] 0.58399854 0.8320029113 4.160015e-01 [29,] 0.59154977 0.8169004670 4.084502e-01 [30,] 0.54254837 0.9149032510 4.574516e-01 [31,] 0.49180902 0.9836180406 5.081910e-01 [32,] 0.44802003 0.8960400622 5.519800e-01 [33,] 0.40076807 0.8015361434 5.992319e-01 [34,] 0.37464340 0.7492867904 6.253566e-01 [35,] 0.33182576 0.6636515116 6.681742e-01 [36,] 0.36195185 0.7239036906 6.380482e-01 [37,] 0.34348078 0.6869615691 6.565192e-01 [38,] 0.30329113 0.6065822683 6.967089e-01 [39,] 0.26902345 0.5380468922 7.309766e-01 [40,] 0.23425243 0.4685048556 7.657476e-01 [41,] 0.19881390 0.3976278067 8.011861e-01 [42,] 0.17064852 0.3412970380 8.293515e-01 [43,] 0.15570982 0.3114196393 8.442902e-01 [44,] 0.14481231 0.2896246202 8.551877e-01 [45,] 0.12359861 0.2471972298 8.764014e-01 [46,] 0.10122754 0.2024550749 8.987725e-01 [47,] 0.10247983 0.2049596664 8.975202e-01 [48,] 0.08614700 0.1722939936 9.138530e-01 [49,] 0.07291964 0.1458392802 9.270804e-01 [50,] 0.07147152 0.1429430497 9.285285e-01 [51,] 0.05827033 0.1165406616 9.417297e-01 [52,] 0.04640187 0.0928037446 9.535981e-01 [53,] 0.04128732 0.0825746383 9.587127e-01 [54,] 0.03374450 0.0674889928 9.662555e-01 [55,] 0.02570341 0.0514068138 9.742966e-01 [56,] 0.03056922 0.0611384445 9.694308e-01 [57,] 0.02739267 0.0547853313 9.726073e-01 [58,] 0.02088840 0.0417767981 9.791116e-01 [59,] 0.01706369 0.0341273831 9.829363e-01 [60,] 0.05152910 0.1030582092 9.484709e-01 [61,] 0.05473023 0.1094604605 9.452698e-01 [62,] 0.08230463 0.1646092533 9.176954e-01 [63,] 0.06695070 0.1339014068 9.330493e-01 [64,] 0.05401634 0.1080326878 9.459837e-01 [65,] 0.04893951 0.0978790239 9.510605e-01 [66,] 0.06091794 0.1218358745 9.390821e-01 [67,] 0.05564089 0.1112817845 9.443591e-01 [68,] 0.04430464 0.0886092780 9.556954e-01 [69,] 0.03550657 0.0710131437 9.644934e-01 [70,] 0.02816940 0.0563388045 9.718306e-01 [71,] 0.02530021 0.0506004214 9.746998e-01 [72,] 0.01918398 0.0383679527 9.808160e-01 [73,] 0.02562255 0.0512451093 9.743774e-01 [74,] 0.02256472 0.0451294397 9.774353e-01 [75,] 0.01861099 0.0372219756 9.813890e-01 [76,] 0.01585249 0.0317049785 9.841475e-01 [77,] 0.01258590 0.0251717986 9.874141e-01 [78,] 0.06430839 0.1286167725 9.356916e-01 [79,] 0.05343398 0.1068679613 9.465660e-01 [80,] 0.04375331 0.0875066270 9.562467e-01 [81,] 0.03442804 0.0688560842 9.655720e-01 [82,] 0.08501489 0.1700297824 9.149851e-01 [83,] 0.10028860 0.2005771905 8.997114e-01 [84,] 0.12059665 0.2411932952 8.794034e-01 [85,] 0.09910345 0.1982068947 9.008966e-01 [86,] 0.09094487 0.1818897384 9.090551e-01 [87,] 0.07260227 0.1452045369 9.273977e-01 [88,] 0.05761343 0.1152268654 9.423866e-01 [89,] 0.06999588 0.1399917560 9.300041e-01 [90,] 0.05706385 0.1141277035 9.429361e-01 [91,] 0.10024031 0.2004806290 8.997597e-01 [92,] 0.08002754 0.1600550822 9.199725e-01 [93,] 0.07761068 0.1552213507 9.223893e-01 [94,] 0.06587300 0.1317459932 9.341270e-01 [95,] 0.09106007 0.1821201381 9.089399e-01 [96,] 0.13836029 0.2767205705 8.616397e-01 [97,] 0.11631681 0.2326336159 8.836832e-01 [98,] 0.09325995 0.1865199085 9.067400e-01 [99,] 0.18738570 0.3747714082 8.126143e-01 [100,] 0.18303989 0.3660797753 8.169601e-01 [101,] 0.15048288 0.3009657633 8.495171e-01 [102,] 0.16103439 0.3220687892 8.389656e-01 [103,] 0.13533160 0.2706632007 8.646684e-01 [104,] 0.15395098 0.3079019681 8.460490e-01 [105,] 0.12610754 0.2522150888 8.738925e-01 [106,] 0.10067823 0.2013564634 8.993218e-01 [107,] 0.23203318 0.4640663667 7.679668e-01 [108,] 0.49133449 0.9826689777 5.086655e-01 [109,] 0.45495644 0.9099128822 5.450436e-01 [110,] 0.40634791 0.8126958213 5.936521e-01 [111,] 0.35906246 0.7181249163 6.409375e-01 [112,] 0.39107951 0.7821590261 6.089205e-01 [113,] 0.36413301 0.7282660129 6.358670e-01 [114,] 0.51103887 0.9779222666 4.889611e-01 [115,] 0.63284775 0.7343045097 3.671523e-01 [116,] 0.58376111 0.8324777846 4.162389e-01 [117,] 0.59923531 0.8015293756 4.007647e-01 [118,] 0.82933410 0.3413318095 1.706659e-01 [119,] 0.79088691 0.4182261808 2.091131e-01 [120,] 0.75054269 0.4989146209 2.494573e-01 [121,] 0.86167137 0.2766572608 1.383286e-01 [122,] 0.94036315 0.1192736981 5.963685e-02 [123,] 0.91752342 0.1649531629 8.247658e-02 [124,] 0.89390435 0.2121913085 1.060957e-01 [125,] 0.92664250 0.1467149915 7.335750e-02 [126,] 0.91739130 0.1652173991 8.260870e-02 [127,] 0.88564140 0.2287171900 1.143586e-01 [128,] 0.99572153 0.0085569373 4.278469e-03 [129,] 0.99835498 0.0032900402 1.645020e-03 [130,] 0.99950577 0.0009884649 4.942325e-04 [131,] 0.99992620 0.0001475990 7.379951e-05 [132,] 0.99986855 0.0002629083 1.314541e-04 [133,] 0.99940833 0.0011833422 5.916711e-04 [134,] 0.99819037 0.0036192514 1.809626e-03 [135,] 0.99380542 0.0123891534 6.194577e-03 [136,] 0.99925953 0.0014809343 7.404671e-04 > postscript(file="/var/fisher/rcomp/tmp/12riz1352131957.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/fisher/rcomp/tmp/2enf61352131957.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/fisher/rcomp/tmp/3t9iz1352131957.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/fisher/rcomp/tmp/4177f1352131957.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/fisher/rcomp/tmp/5jqfj1352131957.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 = 149 Frequency = 1 1 2 3 4 5 -23.682431401 1.089820238 -9.088542517 -27.152498655 -3.718125114 6 7 8 9 10 -6.115661223 -2.188423025 -3.325602615 18.671662230 -10.440612791 11 12 13 14 15 -2.419967721 -10.157246091 1.590938303 -20.279668910 -4.595220575 16 17 18 19 20 -6.066950046 -5.056848598 3.067694735 -7.907246112 3.728747396 21 22 23 24 25 6.611845602 2.941745787 0.146657444 5.042402404 -6.743969700 26 27 28 29 30 -0.844630600 -34.702374003 2.229083811 2.133132560 -12.513494246 31 32 33 34 35 -19.404471368 14.183329459 2.351324840 3.029671515 11.956643538 36 37 38 39 40 4.189893696 3.007176811 6.382698427 0.412491412 -3.732485478 41 42 43 44 45 6.147735922 16.197206839 11.097060408 -0.006314066 8.723812630 46 47 48 49 50 7.443542227 5.116716676 0.343523175 -4.415171420 -4.175232082 51 52 53 54 55 -0.596945267 3.973454571 -4.926337786 8.945486451 10.245111931 56 57 58 59 60 14.665963694 4.710605561 7.398418639 13.560709945 1.316777620 61 62 63 64 65 4.416574075 -6.412300239 14.027002526 3.734178743 12.022618755 66 67 68 69 70 -16.094653503 18.403990969 -8.294344067 5.017307984 9.488855665 71 72 73 74 75 15.501220455 22.592900450 13.706266293 7.731606232 13.014585171 76 77 78 79 80 8.765426210 -1.604984393 6.198924726 -8.957366939 -1.886965883 81 82 83 84 85 12.253269196 -0.887357928 12.975355508 -22.946007659 12.651263853 86 87 88 89 90 0.480775732 3.712243093 31.652018300 -8.796411975 -10.597155523 91 92 93 94 95 2.811458829 -3.351391533 8.174514221 5.172857544 -9.378976846 96 97 98 99 100 1.217351628 -16.501428130 5.614403247 -4.933419013 13.061799547 101 102 103 104 105 -9.734876200 -12.181398735 5.809429251 4.287501622 29.260133364 106 107 108 109 110 -7.769673222 4.366682647 -6.174268642 -0.800417306 20.207879683 111 112 113 114 115 10.217826547 2.386325313 -16.607020773 20.571343242 8.479661986 116 117 118 119 120 10.334832880 4.895657494 -22.929040783 -3.735399989 -8.986847651 121 122 123 124 125 -12.069816950 10.310688300 -4.760446799 -12.106514911 19.533830208 126 127 128 129 130 -10.438298150 -20.487923652 9.656695200 11.617743805 4.885751437 131 132 133 134 135 18.513515969 -19.464994836 5.571418055 21.123993290 -14.551760471 136 137 138 139 140 3.697148687 -4.940759362 -11.697561080 -16.990622323 -13.638239777 141 142 143 144 145 -15.032949544 -7.849310025 -13.554088720 -14.491957447 -15.961073600 146 147 148 149 -14.574172300 -14.182077110 -9.006714176 -13.162454848 > postscript(file="/var/fisher/rcomp/tmp/6gt491352131957.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 = 149 Frequency = 1 lag(myerror, k = 1) myerror 0 -23.682431401 NA 1 1.089820238 -23.682431401 2 -9.088542517 1.089820238 3 -27.152498655 -9.088542517 4 -3.718125114 -27.152498655 5 -6.115661223 -3.718125114 6 -2.188423025 -6.115661223 7 -3.325602615 -2.188423025 8 18.671662230 -3.325602615 9 -10.440612791 18.671662230 10 -2.419967721 -10.440612791 11 -10.157246091 -2.419967721 12 1.590938303 -10.157246091 13 -20.279668910 1.590938303 14 -4.595220575 -20.279668910 15 -6.066950046 -4.595220575 16 -5.056848598 -6.066950046 17 3.067694735 -5.056848598 18 -7.907246112 3.067694735 19 3.728747396 -7.907246112 20 6.611845602 3.728747396 21 2.941745787 6.611845602 22 0.146657444 2.941745787 23 5.042402404 0.146657444 24 -6.743969700 5.042402404 25 -0.844630600 -6.743969700 26 -34.702374003 -0.844630600 27 2.229083811 -34.702374003 28 2.133132560 2.229083811 29 -12.513494246 2.133132560 30 -19.404471368 -12.513494246 31 14.183329459 -19.404471368 32 2.351324840 14.183329459 33 3.029671515 2.351324840 34 11.956643538 3.029671515 35 4.189893696 11.956643538 36 3.007176811 4.189893696 37 6.382698427 3.007176811 38 0.412491412 6.382698427 39 -3.732485478 0.412491412 40 6.147735922 -3.732485478 41 16.197206839 6.147735922 42 11.097060408 16.197206839 43 -0.006314066 11.097060408 44 8.723812630 -0.006314066 45 7.443542227 8.723812630 46 5.116716676 7.443542227 47 0.343523175 5.116716676 48 -4.415171420 0.343523175 49 -4.175232082 -4.415171420 50 -0.596945267 -4.175232082 51 3.973454571 -0.596945267 52 -4.926337786 3.973454571 53 8.945486451 -4.926337786 54 10.245111931 8.945486451 55 14.665963694 10.245111931 56 4.710605561 14.665963694 57 7.398418639 4.710605561 58 13.560709945 7.398418639 59 1.316777620 13.560709945 60 4.416574075 1.316777620 61 -6.412300239 4.416574075 62 14.027002526 -6.412300239 63 3.734178743 14.027002526 64 12.022618755 3.734178743 65 -16.094653503 12.022618755 66 18.403990969 -16.094653503 67 -8.294344067 18.403990969 68 5.017307984 -8.294344067 69 9.488855665 5.017307984 70 15.501220455 9.488855665 71 22.592900450 15.501220455 72 13.706266293 22.592900450 73 7.731606232 13.706266293 74 13.014585171 7.731606232 75 8.765426210 13.014585171 76 -1.604984393 8.765426210 77 6.198924726 -1.604984393 78 -8.957366939 6.198924726 79 -1.886965883 -8.957366939 80 12.253269196 -1.886965883 81 -0.887357928 12.253269196 82 12.975355508 -0.887357928 83 -22.946007659 12.975355508 84 12.651263853 -22.946007659 85 0.480775732 12.651263853 86 3.712243093 0.480775732 87 31.652018300 3.712243093 88 -8.796411975 31.652018300 89 -10.597155523 -8.796411975 90 2.811458829 -10.597155523 91 -3.351391533 2.811458829 92 8.174514221 -3.351391533 93 5.172857544 8.174514221 94 -9.378976846 5.172857544 95 1.217351628 -9.378976846 96 -16.501428130 1.217351628 97 5.614403247 -16.501428130 98 -4.933419013 5.614403247 99 13.061799547 -4.933419013 100 -9.734876200 13.061799547 101 -12.181398735 -9.734876200 102 5.809429251 -12.181398735 103 4.287501622 5.809429251 104 29.260133364 4.287501622 105 -7.769673222 29.260133364 106 4.366682647 -7.769673222 107 -6.174268642 4.366682647 108 -0.800417306 -6.174268642 109 20.207879683 -0.800417306 110 10.217826547 20.207879683 111 2.386325313 10.217826547 112 -16.607020773 2.386325313 113 20.571343242 -16.607020773 114 8.479661986 20.571343242 115 10.334832880 8.479661986 116 4.895657494 10.334832880 117 -22.929040783 4.895657494 118 -3.735399989 -22.929040783 119 -8.986847651 -3.735399989 120 -12.069816950 -8.986847651 121 10.310688300 -12.069816950 122 -4.760446799 10.310688300 123 -12.106514911 -4.760446799 124 19.533830208 -12.106514911 125 -10.438298150 19.533830208 126 -20.487923652 -10.438298150 127 9.656695200 -20.487923652 128 11.617743805 9.656695200 129 4.885751437 11.617743805 130 18.513515969 4.885751437 131 -19.464994836 18.513515969 132 5.571418055 -19.464994836 133 21.123993290 5.571418055 134 -14.551760471 21.123993290 135 3.697148687 -14.551760471 136 -4.940759362 3.697148687 137 -11.697561080 -4.940759362 138 -16.990622323 -11.697561080 139 -13.638239777 -16.990622323 140 -15.032949544 -13.638239777 141 -7.849310025 -15.032949544 142 -13.554088720 -7.849310025 143 -14.491957447 -13.554088720 144 -15.961073600 -14.491957447 145 -14.574172300 -15.961073600 146 -14.182077110 -14.574172300 147 -9.006714176 -14.182077110 148 -13.162454848 -9.006714176 149 NA -13.162454848 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.089820238 -23.682431401 [2,] -9.088542517 1.089820238 [3,] -27.152498655 -9.088542517 [4,] -3.718125114 -27.152498655 [5,] -6.115661223 -3.718125114 [6,] -2.188423025 -6.115661223 [7,] -3.325602615 -2.188423025 [8,] 18.671662230 -3.325602615 [9,] -10.440612791 18.671662230 [10,] -2.419967721 -10.440612791 [11,] -10.157246091 -2.419967721 [12,] 1.590938303 -10.157246091 [13,] -20.279668910 1.590938303 [14,] -4.595220575 -20.279668910 [15,] -6.066950046 -4.595220575 [16,] -5.056848598 -6.066950046 [17,] 3.067694735 -5.056848598 [18,] -7.907246112 3.067694735 [19,] 3.728747396 -7.907246112 [20,] 6.611845602 3.728747396 [21,] 2.941745787 6.611845602 [22,] 0.146657444 2.941745787 [23,] 5.042402404 0.146657444 [24,] -6.743969700 5.042402404 [25,] -0.844630600 -6.743969700 [26,] -34.702374003 -0.844630600 [27,] 2.229083811 -34.702374003 [28,] 2.133132560 2.229083811 [29,] -12.513494246 2.133132560 [30,] -19.404471368 -12.513494246 [31,] 14.183329459 -19.404471368 [32,] 2.351324840 14.183329459 [33,] 3.029671515 2.351324840 [34,] 11.956643538 3.029671515 [35,] 4.189893696 11.956643538 [36,] 3.007176811 4.189893696 [37,] 6.382698427 3.007176811 [38,] 0.412491412 6.382698427 [39,] -3.732485478 0.412491412 [40,] 6.147735922 -3.732485478 [41,] 16.197206839 6.147735922 [42,] 11.097060408 16.197206839 [43,] -0.006314066 11.097060408 [44,] 8.723812630 -0.006314066 [45,] 7.443542227 8.723812630 [46,] 5.116716676 7.443542227 [47,] 0.343523175 5.116716676 [48,] -4.415171420 0.343523175 [49,] -4.175232082 -4.415171420 [50,] -0.596945267 -4.175232082 [51,] 3.973454571 -0.596945267 [52,] -4.926337786 3.973454571 [53,] 8.945486451 -4.926337786 [54,] 10.245111931 8.945486451 [55,] 14.665963694 10.245111931 [56,] 4.710605561 14.665963694 [57,] 7.398418639 4.710605561 [58,] 13.560709945 7.398418639 [59,] 1.316777620 13.560709945 [60,] 4.416574075 1.316777620 [61,] -6.412300239 4.416574075 [62,] 14.027002526 -6.412300239 [63,] 3.734178743 14.027002526 [64,] 12.022618755 3.734178743 [65,] -16.094653503 12.022618755 [66,] 18.403990969 -16.094653503 [67,] -8.294344067 18.403990969 [68,] 5.017307984 -8.294344067 [69,] 9.488855665 5.017307984 [70,] 15.501220455 9.488855665 [71,] 22.592900450 15.501220455 [72,] 13.706266293 22.592900450 [73,] 7.731606232 13.706266293 [74,] 13.014585171 7.731606232 [75,] 8.765426210 13.014585171 [76,] -1.604984393 8.765426210 [77,] 6.198924726 -1.604984393 [78,] -8.957366939 6.198924726 [79,] -1.886965883 -8.957366939 [80,] 12.253269196 -1.886965883 [81,] -0.887357928 12.253269196 [82,] 12.975355508 -0.887357928 [83,] -22.946007659 12.975355508 [84,] 12.651263853 -22.946007659 [85,] 0.480775732 12.651263853 [86,] 3.712243093 0.480775732 [87,] 31.652018300 3.712243093 [88,] -8.796411975 31.652018300 [89,] -10.597155523 -8.796411975 [90,] 2.811458829 -10.597155523 [91,] -3.351391533 2.811458829 [92,] 8.174514221 -3.351391533 [93,] 5.172857544 8.174514221 [94,] -9.378976846 5.172857544 [95,] 1.217351628 -9.378976846 [96,] -16.501428130 1.217351628 [97,] 5.614403247 -16.501428130 [98,] -4.933419013 5.614403247 [99,] 13.061799547 -4.933419013 [100,] -9.734876200 13.061799547 [101,] -12.181398735 -9.734876200 [102,] 5.809429251 -12.181398735 [103,] 4.287501622 5.809429251 [104,] 29.260133364 4.287501622 [105,] -7.769673222 29.260133364 [106,] 4.366682647 -7.769673222 [107,] -6.174268642 4.366682647 [108,] -0.800417306 -6.174268642 [109,] 20.207879683 -0.800417306 [110,] 10.217826547 20.207879683 [111,] 2.386325313 10.217826547 [112,] -16.607020773 2.386325313 [113,] 20.571343242 -16.607020773 [114,] 8.479661986 20.571343242 [115,] 10.334832880 8.479661986 [116,] 4.895657494 10.334832880 [117,] -22.929040783 4.895657494 [118,] -3.735399989 -22.929040783 [119,] -8.986847651 -3.735399989 [120,] -12.069816950 -8.986847651 [121,] 10.310688300 -12.069816950 [122,] -4.760446799 10.310688300 [123,] -12.106514911 -4.760446799 [124,] 19.533830208 -12.106514911 [125,] -10.438298150 19.533830208 [126,] -20.487923652 -10.438298150 [127,] 9.656695200 -20.487923652 [128,] 11.617743805 9.656695200 [129,] 4.885751437 11.617743805 [130,] 18.513515969 4.885751437 [131,] -19.464994836 18.513515969 [132,] 5.571418055 -19.464994836 [133,] 21.123993290 5.571418055 [134,] -14.551760471 21.123993290 [135,] 3.697148687 -14.551760471 [136,] -4.940759362 3.697148687 [137,] -11.697561080 -4.940759362 [138,] -16.990622323 -11.697561080 [139,] -13.638239777 -16.990622323 [140,] -15.032949544 -13.638239777 [141,] -7.849310025 -15.032949544 [142,] -13.554088720 -7.849310025 [143,] -14.491957447 -13.554088720 [144,] -15.961073600 -14.491957447 [145,] -14.574172300 -15.961073600 [146,] -14.182077110 -14.574172300 [147,] -9.006714176 -14.182077110 [148,] -13.162454848 -9.006714176 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.089820238 -23.682431401 2 -9.088542517 1.089820238 3 -27.152498655 -9.088542517 4 -3.718125114 -27.152498655 5 -6.115661223 -3.718125114 6 -2.188423025 -6.115661223 7 -3.325602615 -2.188423025 8 18.671662230 -3.325602615 9 -10.440612791 18.671662230 10 -2.419967721 -10.440612791 11 -10.157246091 -2.419967721 12 1.590938303 -10.157246091 13 -20.279668910 1.590938303 14 -4.595220575 -20.279668910 15 -6.066950046 -4.595220575 16 -5.056848598 -6.066950046 17 3.067694735 -5.056848598 18 -7.907246112 3.067694735 19 3.728747396 -7.907246112 20 6.611845602 3.728747396 21 2.941745787 6.611845602 22 0.146657444 2.941745787 23 5.042402404 0.146657444 24 -6.743969700 5.042402404 25 -0.844630600 -6.743969700 26 -34.702374003 -0.844630600 27 2.229083811 -34.702374003 28 2.133132560 2.229083811 29 -12.513494246 2.133132560 30 -19.404471368 -12.513494246 31 14.183329459 -19.404471368 32 2.351324840 14.183329459 33 3.029671515 2.351324840 34 11.956643538 3.029671515 35 4.189893696 11.956643538 36 3.007176811 4.189893696 37 6.382698427 3.007176811 38 0.412491412 6.382698427 39 -3.732485478 0.412491412 40 6.147735922 -3.732485478 41 16.197206839 6.147735922 42 11.097060408 16.197206839 43 -0.006314066 11.097060408 44 8.723812630 -0.006314066 45 7.443542227 8.723812630 46 5.116716676 7.443542227 47 0.343523175 5.116716676 48 -4.415171420 0.343523175 49 -4.175232082 -4.415171420 50 -0.596945267 -4.175232082 51 3.973454571 -0.596945267 52 -4.926337786 3.973454571 53 8.945486451 -4.926337786 54 10.245111931 8.945486451 55 14.665963694 10.245111931 56 4.710605561 14.665963694 57 7.398418639 4.710605561 58 13.560709945 7.398418639 59 1.316777620 13.560709945 60 4.416574075 1.316777620 61 -6.412300239 4.416574075 62 14.027002526 -6.412300239 63 3.734178743 14.027002526 64 12.022618755 3.734178743 65 -16.094653503 12.022618755 66 18.403990969 -16.094653503 67 -8.294344067 18.403990969 68 5.017307984 -8.294344067 69 9.488855665 5.017307984 70 15.501220455 9.488855665 71 22.592900450 15.501220455 72 13.706266293 22.592900450 73 7.731606232 13.706266293 74 13.014585171 7.731606232 75 8.765426210 13.014585171 76 -1.604984393 8.765426210 77 6.198924726 -1.604984393 78 -8.957366939 6.198924726 79 -1.886965883 -8.957366939 80 12.253269196 -1.886965883 81 -0.887357928 12.253269196 82 12.975355508 -0.887357928 83 -22.946007659 12.975355508 84 12.651263853 -22.946007659 85 0.480775732 12.651263853 86 3.712243093 0.480775732 87 31.652018300 3.712243093 88 -8.796411975 31.652018300 89 -10.597155523 -8.796411975 90 2.811458829 -10.597155523 91 -3.351391533 2.811458829 92 8.174514221 -3.351391533 93 5.172857544 8.174514221 94 -9.378976846 5.172857544 95 1.217351628 -9.378976846 96 -16.501428130 1.217351628 97 5.614403247 -16.501428130 98 -4.933419013 5.614403247 99 13.061799547 -4.933419013 100 -9.734876200 13.061799547 101 -12.181398735 -9.734876200 102 5.809429251 -12.181398735 103 4.287501622 5.809429251 104 29.260133364 4.287501622 105 -7.769673222 29.260133364 106 4.366682647 -7.769673222 107 -6.174268642 4.366682647 108 -0.800417306 -6.174268642 109 20.207879683 -0.800417306 110 10.217826547 20.207879683 111 2.386325313 10.217826547 112 -16.607020773 2.386325313 113 20.571343242 -16.607020773 114 8.479661986 20.571343242 115 10.334832880 8.479661986 116 4.895657494 10.334832880 117 -22.929040783 4.895657494 118 -3.735399989 -22.929040783 119 -8.986847651 -3.735399989 120 -12.069816950 -8.986847651 121 10.310688300 -12.069816950 122 -4.760446799 10.310688300 123 -12.106514911 -4.760446799 124 19.533830208 -12.106514911 125 -10.438298150 19.533830208 126 -20.487923652 -10.438298150 127 9.656695200 -20.487923652 128 11.617743805 9.656695200 129 4.885751437 11.617743805 130 18.513515969 4.885751437 131 -19.464994836 18.513515969 132 5.571418055 -19.464994836 133 21.123993290 5.571418055 134 -14.551760471 21.123993290 135 3.697148687 -14.551760471 136 -4.940759362 3.697148687 137 -11.697561080 -4.940759362 138 -16.990622323 -11.697561080 139 -13.638239777 -16.990622323 140 -15.032949544 -13.638239777 141 -7.849310025 -15.032949544 142 -13.554088720 -7.849310025 143 -14.491957447 -13.554088720 144 -15.961073600 -14.491957447 145 -14.574172300 -15.961073600 146 -14.182077110 -14.574172300 147 -9.006714176 -14.182077110 148 -13.162454848 -9.006714176 > 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/fisher/rcomp/tmp/76sj71352131957.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/fisher/rcomp/tmp/8v6cu1352131957.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/fisher/rcomp/tmp/9s0pb1352131957.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/fisher/rcomp/tmp/10sn0r1352131957.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/11m5ll1352131957.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/fisher/rcomp/tmp/12ksiw1352131957.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/fisher/rcomp/tmp/13o6md1352131957.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/fisher/rcomp/tmp/146lp41352131957.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/fisher/rcomp/tmp/155txl1352131957.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/fisher/rcomp/tmp/16dca41352131957.tab") + } > > try(system("convert tmp/12riz1352131957.ps tmp/12riz1352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/2enf61352131957.ps tmp/2enf61352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/3t9iz1352131957.ps tmp/3t9iz1352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/4177f1352131957.ps tmp/4177f1352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/5jqfj1352131957.ps tmp/5jqfj1352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/6gt491352131957.ps tmp/6gt491352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/76sj71352131957.ps tmp/76sj71352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/8v6cu1352131957.ps tmp/8v6cu1352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/9s0pb1352131957.ps tmp/9s0pb1352131957.png",intern=TRUE)) character(0) > try(system("convert tmp/10sn0r1352131957.ps tmp/10sn0r1352131957.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.429 1.069 8.499