R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(2 + ,73 + ,69 + ,1 + ,58 + ,53 + ,1 + ,68 + ,43 + ,2 + ,69 + ,60 + ,1 + ,62 + ,49 + ,1 + ,68 + ,62 + ,1 + ,65 + ,45 + ,1 + ,65 + ,50 + ,1 + ,81 + ,75 + ,1 + ,73 + ,82 + ,2 + ,64 + ,60 + ,1 + ,68 + ,59 + ,1 + ,51 + ,21 + ,1 + ,68 + ,40 + ,1 + ,61 + ,62 + ,2 + ,77 + ,54 + ,1 + ,69 + ,47 + ,1 + ,73 + ,59 + ,2 + ,61 + ,37 + ,2 + ,62 + ,43 + ,1 + ,63 + ,48 + ,1 + ,69 + ,59 + ,2 + ,47 + ,79 + ,2 + ,66 + ,62 + ,1 + ,58 + ,16 + ,2 + ,63 + ,38 + ,1 + ,69 + ,58 + ,2 + ,59 + ,60 + ,1 + ,59 + ,72 + ,2 + ,63 + ,67 + ,2 + ,65 + ,55 + ,1 + ,65 + ,47 + ,2 + ,71 + ,59 + ,1 + ,60 + ,49 + ,2 + ,66 + ,47 + ,1 + ,67 + ,57 + ,2 + ,81 + ,39 + ,1 + ,62 + ,49 + ,1 + ,63 + ,26 + ,2 + ,73 + ,53 + ,2 + ,55 + ,75 + ,1 + ,59 + ,65 + ,1 + ,64 + ,49 + ,2 + ,63 + ,48 + ,2 + ,74 + ,45 + ,2 + ,67 + ,31 + ,1 + ,64 + ,67 + ,1 + ,73 + ,61 + ,1 + ,54 + ,49 + ,1 + ,76 + ,69 + ,2 + ,74 + ,54 + ,2 + ,63 + ,80 + ,2 + ,73 + ,57 + ,2 + ,67 + ,34 + ,2 + ,68 + ,69 + ,1 + ,66 + ,44 + ,2 + ,62 + ,70 + ,2 + ,71 + ,51 + ,1 + ,68 + ,66 + ,1 + ,63 + ,18 + ,1 + ,75 + ,74 + ,1 + ,77 + ,59 + ,2 + ,62 + ,48 + ,1 + ,74 + ,55 + ,2 + ,67 + ,44 + ,2 + ,56 + ,56 + ,2 + ,60 + ,65 + ,2 + ,58 + ,77 + ,1 + ,65 + ,46 + ,2 + ,49 + ,70 + ,1 + ,61 + ,39 + ,2 + ,66 + ,55 + ,2 + ,64 + ,44 + ,2 + ,65 + ,45 + ,1 + ,46 + ,45 + ,2 + ,81 + ,25 + ,2 + ,65 + ,49 + ,1 + ,72 + ,65 + ,2 + ,65 + ,45 + ,2 + ,74 + ,71 + ,1 + ,69 + ,48 + ,1 + ,59 + ,41 + ,2 + ,58 + ,40 + ,1 + ,71 + ,64 + ,2 + ,79 + ,56 + ,2 + ,68 + ,52 + ,1 + ,66 + ,41 + ,2 + ,62 + ,45 + ,1 + ,69 + ,49 + ,1 + ,60 + ,42 + ,2 + ,63 + ,54 + ,1 + ,62 + ,40 + ,1 + ,61 + ,40 + ,2 + ,65 + ,51 + ,1 + ,64 + ,48 + ,2 + ,67 + ,80 + ,2 + ,56 + ,38 + ,2 + ,56 + ,57 + ,1 + ,48 + ,28 + ,1 + ,74 + ,51 + ,1 + ,69 + ,46 + ,1 + ,62 + ,58 + ,1 + ,73 + ,67 + ,1 + ,64 + ,72 + ,1 + ,57 + ,26 + ,1 + ,57 + ,54 + ,2 + ,60 + ,53 + ,2 + ,61 + ,69 + ,1 + ,72 + ,64 + ,1 + ,57 + ,47 + ,1 + ,51 + ,43 + ,1 + ,63 + ,66 + ,1 + ,54 + ,54 + ,1 + ,72 + ,62 + ,1 + ,62 + ,52 + ,1 + ,68 + ,64 + ,1 + ,62 + ,55 + ,2 + ,63 + ,57 + ,1 + ,77 + ,74 + ,1 + ,57 + ,32 + ,1 + ,57 + ,38 + ,1 + ,61 + ,66 + ,2 + ,66 + ,37 + ,1 + ,65 + ,26 + ,1 + ,63 + ,64 + ,1 + ,59 + ,28 + ,2 + ,66 + ,66 + ,1 + ,68 + ,65 + ,1 + ,72 + ,48 + ,1 + ,68 + ,44 + ,2 + ,68 + ,64 + ,1 + ,67 + ,39 + ,1 + ,59 + ,50 + ,1 + ,56 + ,52 + ,1 + ,62 + ,66 + ,2 + ,55 + ,48 + ,2 + ,72 + ,70 + ,2 + ,68 + ,66 + ,1 + ,67 + ,61 + ,1 + ,54 + ,31 + ,2 + ,69 + ,61 + ,1 + ,61 + ,54 + ,1 + ,55 + ,34 + ,2 + ,75 + ,62 + ,1 + ,55 + ,47 + ,1 + ,49 + ,52 + ,2 + ,54 + ,37 + ,1 + ,51 + ,46 + ,1 + ,66 + ,50 + ,1 + ,73 + ,61 + ,2 + ,63 + ,70 + ,2 + ,61 + ,38 + ,1 + ,74 + ,63 + ,2 + ,81 + ,34 + ,1 + ,58 + ,46 + ,1 + ,62 + ,40 + ,1 + ,64 + ,30 + ,1 + ,62 + ,35 + ,1 + ,85 + ,51 + ,1 + ,74 + ,56 + ,1 + ,51 + ,68 + ,1 + ,66 + ,39 + ,2 + ,61 + ,44 + ,1 + ,72 + ,58) + ,dim=c(3 + ,164) + ,dimnames=list(c('Gender' + ,'Nonverbal' + ,'Anxiety') + ,1:164)) > y <- array(NA,dim=c(3,164),dimnames=list(c('Gender','Nonverbal','Anxiety'),1:164)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > #'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.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 Nonverbal Gender Anxiety 1 73 2 69 2 58 1 53 3 68 1 43 4 69 2 60 5 62 1 49 6 68 1 62 7 65 1 45 8 65 1 50 9 81 1 75 10 73 1 82 11 64 2 60 12 68 1 59 13 51 1 21 14 68 1 40 15 61 1 62 16 77 2 54 17 69 1 47 18 73 1 59 19 61 2 37 20 62 2 43 21 63 1 48 22 69 1 59 23 47 2 79 24 66 2 62 25 58 1 16 26 63 2 38 27 69 1 58 28 59 2 60 29 59 1 72 30 63 2 67 31 65 2 55 32 65 1 47 33 71 2 59 34 60 1 49 35 66 2 47 36 67 1 57 37 81 2 39 38 62 1 49 39 63 1 26 40 73 2 53 41 55 2 75 42 59 1 65 43 64 1 49 44 63 2 48 45 74 2 45 46 67 2 31 47 64 1 67 48 73 1 61 49 54 1 49 50 76 1 69 51 74 2 54 52 63 2 80 53 73 2 57 54 67 2 34 55 68 2 69 56 66 1 44 57 62 2 70 58 71 2 51 59 68 1 66 60 63 1 18 61 75 1 74 62 77 1 59 63 62 2 48 64 74 1 55 65 67 2 44 66 56 2 56 67 60 2 65 68 58 2 77 69 65 1 46 70 49 2 70 71 61 1 39 72 66 2 55 73 64 2 44 74 65 2 45 75 46 1 45 76 81 2 25 77 65 2 49 78 72 1 65 79 65 2 45 80 74 2 71 81 69 1 48 82 59 1 41 83 58 2 40 84 71 1 64 85 79 2 56 86 68 2 52 87 66 1 41 88 62 2 45 89 69 1 49 90 60 1 42 91 63 2 54 92 62 1 40 93 61 1 40 94 65 2 51 95 64 1 48 96 67 2 80 97 56 2 38 98 56 2 57 99 48 1 28 100 74 1 51 101 69 1 46 102 62 1 58 103 73 1 67 104 64 1 72 105 57 1 26 106 57 1 54 107 60 2 53 108 61 2 69 109 72 1 64 110 57 1 47 111 51 1 43 112 63 1 66 113 54 1 54 114 72 1 62 115 62 1 52 116 68 1 64 117 62 1 55 118 63 2 57 119 77 1 74 120 57 1 32 121 57 1 38 122 61 1 66 123 66 2 37 124 65 1 26 125 63 1 64 126 59 1 28 127 66 2 66 128 68 1 65 129 72 1 48 130 68 1 44 131 68 2 64 132 67 1 39 133 59 1 50 134 56 1 52 135 62 1 66 136 55 2 48 137 72 2 70 138 68 2 66 139 67 1 61 140 54 1 31 141 69 2 61 142 61 1 54 143 55 1 34 144 75 2 62 145 55 1 47 146 49 1 52 147 54 2 37 148 51 1 46 149 66 1 50 150 73 1 61 151 63 2 70 152 61 2 38 153 74 1 63 154 81 2 34 155 58 1 46 156 62 1 40 157 64 1 30 158 62 1 35 159 85 1 51 160 74 1 56 161 51 1 68 162 66 1 39 163 61 2 44 164 72 1 58 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Gender Anxiety 57.5800 0.6803 0.1172 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -21.20143 -4.18683 0.03828 4.73766 20.76120 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 57.57997 2.62245 21.957 < 2e-16 *** Gender 0.68030 1.15872 0.587 0.55795 Anxiety 0.11723 0.04225 2.775 0.00618 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.196 on 161 degrees of freedom Multiple R-squared: 0.0508, Adjusted R-squared: 0.03901 F-statistic: 4.309 on 2 and 161 DF, p-value: 0.01504 > 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.310210909 0.620421819 0.6897891 [2,] 0.172998790 0.345997581 0.8270012 [3,] 0.087369745 0.174739489 0.9126303 [4,] 0.166990481 0.333980961 0.8330095 [5,] 0.136134866 0.272269731 0.8638651 [6,] 0.106647401 0.213294803 0.8933526 [7,] 0.062476226 0.124952452 0.9375238 [8,] 0.040248176 0.080496352 0.9597518 [9,] 0.053327787 0.106655573 0.9466722 [10,] 0.077329885 0.154659771 0.9226701 [11,] 0.140720820 0.281441640 0.8592792 [12,] 0.123873630 0.247747259 0.8761264 [13,] 0.109973715 0.219947431 0.8900263 [14,] 0.078322531 0.156645062 0.9216775 [15,] 0.055490937 0.110981874 0.9445091 [16,] 0.037456357 0.074912714 0.9625436 [17,] 0.024547000 0.049093999 0.9754530 [18,] 0.616261801 0.767476399 0.3837382 [19,] 0.550615560 0.898768880 0.4493844 [20,] 0.486306876 0.972613752 0.5136931 [21,] 0.425548727 0.851097454 0.5744513 [22,] 0.369581342 0.739162683 0.6304187 [23,] 0.356718587 0.713437174 0.6432814 [24,] 0.413122366 0.826244733 0.5868776 [25,] 0.363823835 0.727647671 0.6361762 [26,] 0.309875724 0.619751447 0.6901243 [27,] 0.259163076 0.518326152 0.7408369 [28,] 0.247964078 0.495928157 0.7520359 [29,] 0.224007082 0.448014165 0.7759929 [30,] 0.188544316 0.377088632 0.8114557 [31,] 0.153109785 0.306219570 0.8468902 [32,] 0.396833247 0.793666494 0.6031668 [33,] 0.352246208 0.704492416 0.6477538 [34,] 0.303642744 0.607285487 0.6963573 [35,] 0.307147092 0.614294184 0.6928529 [36,] 0.414364244 0.828728487 0.5856358 [37,] 0.411369553 0.822739106 0.5886304 [38,] 0.361397539 0.722795079 0.6386025 [39,] 0.316705786 0.633411571 0.6832942 [40,] 0.348143233 0.696286465 0.6518568 [41,] 0.311450973 0.622901945 0.6885490 [42,] 0.270490447 0.540980894 0.7295096 [43,] 0.275412969 0.550825939 0.7245870 [44,] 0.326742551 0.653485102 0.6732574 [45,] 0.366426771 0.732853543 0.6335732 [46,] 0.380981136 0.761962271 0.6190189 [47,] 0.358040820 0.716081640 0.6419592 [48,] 0.354946486 0.709892972 0.6450535 [49,] 0.319405081 0.638810163 0.6805949 [50,] 0.277795223 0.555590446 0.7222048 [51,] 0.241677253 0.483354506 0.7583227 [52,] 0.224507628 0.449015256 0.7754924 [53,] 0.210247248 0.420494495 0.7897528 [54,] 0.179855844 0.359711687 0.8201442 [55,] 0.153389693 0.306779386 0.8466103 [56,] 0.162565941 0.325131883 0.8374341 [57,] 0.211911337 0.423822674 0.7880887 [58,] 0.186370486 0.372740971 0.8136295 [59,] 0.202171568 0.404343136 0.7978284 [60,] 0.174728746 0.349457492 0.8252713 [61,] 0.203729872 0.407459744 0.7962701 [62,] 0.198878101 0.397756201 0.8011219 [63,] 0.226878328 0.453756656 0.7731217 [64,] 0.195164123 0.390328247 0.8048359 [65,] 0.402580997 0.805161994 0.5974190 [66,] 0.368644382 0.737288765 0.6313556 [67,] 0.326818579 0.653637158 0.6731814 [68,] 0.286900971 0.573801942 0.7130990 [69,] 0.249619145 0.499238289 0.7503809 [70,] 0.474738048 0.949476097 0.5252620 [71,] 0.734575167 0.530849667 0.2654248 [72,] 0.696735290 0.606529419 0.3032647 [73,] 0.683060818 0.633878364 0.3169392 [74,] 0.643470593 0.713058814 0.3565294 [75,] 0.639738265 0.720523470 0.3602617 [76,] 0.618066841 0.763866317 0.3819332 [77,] 0.592893688 0.814212625 0.4071063 [78,] 0.576138592 0.847722815 0.4238614 [79,] 0.552507004 0.894985992 0.4474930 [80,] 0.667042957 0.665914085 0.3329570 [81,] 0.635032733 0.729934534 0.3649673 [82,] 0.602095087 0.795809826 0.3979049 [83,] 0.562467244 0.875065512 0.4375328 [84,] 0.540536091 0.918927817 0.4594639 [85,] 0.506789090 0.986421820 0.4932109 [86,] 0.465110438 0.930220875 0.5348896 [87,] 0.423967927 0.847935853 0.5760321 [88,] 0.385424786 0.770849573 0.6145752 [89,] 0.343758237 0.687516475 0.6562418 [90,] 0.304070917 0.608141834 0.6959291 [91,] 0.267788805 0.535577611 0.7322112 [92,] 0.264567989 0.529135979 0.7354320 [93,] 0.292490098 0.584980195 0.7075099 [94,] 0.386751622 0.773503244 0.6132484 [95,] 0.427310386 0.854620771 0.5726896 [96,] 0.412012319 0.824024638 0.5879877 [97,] 0.375036168 0.750072336 0.6249638 [98,] 0.370145561 0.740291122 0.6298544 [99,] 0.333396067 0.666792135 0.6666039 [100,] 0.303960503 0.607921005 0.6960395 [101,] 0.304692879 0.609385758 0.6953071 [102,] 0.283789111 0.567578222 0.7162109 [103,] 0.277902568 0.555805136 0.7220974 [104,] 0.267127334 0.534254668 0.7328727 [105,] 0.257287666 0.514575331 0.7427123 [106,] 0.321917992 0.643835984 0.6780820 [107,] 0.287076997 0.574153995 0.7129230 [108,] 0.331026714 0.662053429 0.6689733 [109,] 0.320059602 0.640119204 0.6799404 [110,] 0.280868680 0.561737360 0.7191313 [111,] 0.243998441 0.487996881 0.7560016 [112,] 0.210963220 0.421926441 0.7890368 [113,] 0.182776318 0.365552637 0.8172237 [114,] 0.211024944 0.422049888 0.7889751 [115,] 0.188346953 0.376693906 0.8116530 [116,] 0.171611676 0.343223352 0.8283883 [117,] 0.152682838 0.305365676 0.8473172 [118,] 0.126971475 0.253942951 0.8730285 [119,] 0.110535214 0.221070427 0.8894648 [120,] 0.090622279 0.181244557 0.9093777 [121,] 0.072026679 0.144053358 0.9279733 [122,] 0.056227463 0.112454927 0.9437725 [123,] 0.043509508 0.087019016 0.9564905 [124,] 0.047021305 0.094042611 0.9529787 [125,] 0.040866325 0.081732650 0.9591337 [126,] 0.030341865 0.060683730 0.9696581 [127,] 0.025982259 0.051964519 0.9740177 [128,] 0.020629513 0.041259025 0.9793705 [129,] 0.020426373 0.040852746 0.9795736 [130,] 0.015930931 0.031861861 0.9840691 [131,] 0.020282264 0.040564528 0.9797177 [132,] 0.014937719 0.029875439 0.9850623 [133,] 0.010267303 0.020534607 0.9897327 [134,] 0.006932873 0.013865745 0.9930671 [135,] 0.006132565 0.012265130 0.9938674 [136,] 0.004006839 0.008013678 0.9959932 [137,] 0.002697727 0.005395454 0.9973023 [138,] 0.002340791 0.004681582 0.9976592 [139,] 0.002458066 0.004916133 0.9975419 [140,] 0.002716703 0.005433406 0.9972833 [141,] 0.010609451 0.021218902 0.9893905 [142,] 0.014033420 0.028066839 0.9859666 [143,] 0.039548173 0.079096347 0.9604518 [144,] 0.025974052 0.051948104 0.9740259 [145,] 0.021327892 0.042655784 0.9786721 [146,] 0.014306546 0.028613092 0.9856935 [147,] 0.012725958 0.025451916 0.9872740 [148,] 0.011583729 0.023167457 0.9884163 [149,] 0.031952827 0.063905654 0.9680472 [150,] 0.029757759 0.059515518 0.9702422 [151,] 0.019271244 0.038542487 0.9807288 [152,] 0.011686379 0.023372759 0.9883136 [153,] 0.018568108 0.037136217 0.9814319 > postscript(file="/var/www/html/rcomp/tmp/192r01292347764.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/html/rcomp/tmp/2ktql1292347764.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/html/rcomp/tmp/3ktql1292347764.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/html/rcomp/tmp/4ktql1292347764.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/html/rcomp/tmp/5vkqo1292347764.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 164 Frequency = 1 1 2 3 4 5 5.970830878 -6.473252082 4.699009999 3.025866752 -2.004347250 6 7 8 9 10 2.471712045 1.464557583 0.878426542 13.947771339 5.127187882 11 12 13 14 15 -1.974133248 2.823390669 -9.722013422 5.050688624 -4.528287955 16 17 18 19 20 11.729224001 5.230105167 7.823390669 -2.277930461 -1.981287710 21 22 23 24 25 -0.887121041 3.823390669 -21.201431203 -0.208585665 -2.135882381 26 27 28 29 30 -0.395156669 3.940616877 -6.974133248 -7.700550037 -3.794716705 31 32 33 34 35 -0.388002208 1.230105167 5.143092960 -4.004347250 1.549807458 36 37 38 39 40 2.057843085 17.487617123 -2.004347250 1.691855538 7.846450209 41 42 43 44 45 -12.732526370 -6.879966580 -0.004347250 -1.567418751 9.784259874 46 47 48 49 50 4.425426788 -2.114418996 7.588938253 -10.004347250 9.651128588 51 52 53 54 55 8.729224001 -5.318657411 7.377545376 4.073748163 0.970830878 56 57 58 59 60 2.581783791 -5.146395330 6.080902625 2.002807212 2.629665203 61 62 63 64 65 8.064997547 11.823390669 -2.567418751 9.292295502 2.901486082 66 67 68 69 70 -9.505228416 -6.560264289 -9.966978787 1.347331375 -18.146395330 71 72 73 74 75 -1.832085168 0.611997792 -0.098513918 0.784259874 -17.535442417 76 77 78 79 80 19.128784037 0.315355041 6.120033420 0.784259874 6.736378462 81 82 83 84 85 5.112878959 -4.066537584 -5.629609085 5.237259628 13.494771584 86 87 88 89 90 2.963676417 2.933462416 -2.215740126 4.995652750 -3.183763793 91 92 93 94 95 -2.270775999 -0.949311376 -1.949311376 0.080902625 0.112878959 96 97 98 99 100 -1.318657411 -7.395156669 -9.622454624 -13.542596879 9.761200334 101 102 103 104 105 5.347331375 -3.059383123 6.885581004 -2.700550037 -4.308144462 106 107 108 109 110 -7.590478290 -5.153549791 -6.029169122 6.237259628 -6.769894833 111 112 113 114 115 -12.300990001 -2.997192788 -10.590478290 6.471712045 -2.356025874 116 117 118 119 120 2.237259628 -2.707704498 -2.622454624 10.064997547 -5.011501711 121 122 123 124 125 -5.714858960 -4.997192788 2.722069539 3.691855538 -2.762740372 126 127 128 129 130 -2.542596879 -0.677490497 2.120033420 8.112878959 4.581783791 131 132 133 134 135 1.556961919 4.167914832 -5.121573458 -8.356025874 -3.997192788 136 137 138 139 140 -9.567418751 4.853604670 1.322509503 1.588938253 -7.894275503 141 142 143 144 145 2.908640544 -3.590478290 -7.245954127 8.791414335 -8.769894833 146 147 148 149 150 -15.356025874 -9.277930461 -12.652668625 1.878426542 7.588938253 151 152 153 154 155 -4.146395330 -2.395156669 8.354485836 18.073748163 -5.652668625 156 157 158 159 160 -0.949311376 2.222950705 -0.363180336 20.761200334 9.175069293 161 162 163 164 -15.231645204 3.167914832 -3.098513918 6.940616877 > postscript(file="/var/www/html/rcomp/tmp/6vkqo1292347764.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 164 Frequency = 1 lag(myerror, k = 1) myerror 0 5.970830878 NA 1 -6.473252082 5.970830878 2 4.699009999 -6.473252082 3 3.025866752 4.699009999 4 -2.004347250 3.025866752 5 2.471712045 -2.004347250 6 1.464557583 2.471712045 7 0.878426542 1.464557583 8 13.947771339 0.878426542 9 5.127187882 13.947771339 10 -1.974133248 5.127187882 11 2.823390669 -1.974133248 12 -9.722013422 2.823390669 13 5.050688624 -9.722013422 14 -4.528287955 5.050688624 15 11.729224001 -4.528287955 16 5.230105167 11.729224001 17 7.823390669 5.230105167 18 -2.277930461 7.823390669 19 -1.981287710 -2.277930461 20 -0.887121041 -1.981287710 21 3.823390669 -0.887121041 22 -21.201431203 3.823390669 23 -0.208585665 -21.201431203 24 -2.135882381 -0.208585665 25 -0.395156669 -2.135882381 26 3.940616877 -0.395156669 27 -6.974133248 3.940616877 28 -7.700550037 -6.974133248 29 -3.794716705 -7.700550037 30 -0.388002208 -3.794716705 31 1.230105167 -0.388002208 32 5.143092960 1.230105167 33 -4.004347250 5.143092960 34 1.549807458 -4.004347250 35 2.057843085 1.549807458 36 17.487617123 2.057843085 37 -2.004347250 17.487617123 38 1.691855538 -2.004347250 39 7.846450209 1.691855538 40 -12.732526370 7.846450209 41 -6.879966580 -12.732526370 42 -0.004347250 -6.879966580 43 -1.567418751 -0.004347250 44 9.784259874 -1.567418751 45 4.425426788 9.784259874 46 -2.114418996 4.425426788 47 7.588938253 -2.114418996 48 -10.004347250 7.588938253 49 9.651128588 -10.004347250 50 8.729224001 9.651128588 51 -5.318657411 8.729224001 52 7.377545376 -5.318657411 53 4.073748163 7.377545376 54 0.970830878 4.073748163 55 2.581783791 0.970830878 56 -5.146395330 2.581783791 57 6.080902625 -5.146395330 58 2.002807212 6.080902625 59 2.629665203 2.002807212 60 8.064997547 2.629665203 61 11.823390669 8.064997547 62 -2.567418751 11.823390669 63 9.292295502 -2.567418751 64 2.901486082 9.292295502 65 -9.505228416 2.901486082 66 -6.560264289 -9.505228416 67 -9.966978787 -6.560264289 68 1.347331375 -9.966978787 69 -18.146395330 1.347331375 70 -1.832085168 -18.146395330 71 0.611997792 -1.832085168 72 -0.098513918 0.611997792 73 0.784259874 -0.098513918 74 -17.535442417 0.784259874 75 19.128784037 -17.535442417 76 0.315355041 19.128784037 77 6.120033420 0.315355041 78 0.784259874 6.120033420 79 6.736378462 0.784259874 80 5.112878959 6.736378462 81 -4.066537584 5.112878959 82 -5.629609085 -4.066537584 83 5.237259628 -5.629609085 84 13.494771584 5.237259628 85 2.963676417 13.494771584 86 2.933462416 2.963676417 87 -2.215740126 2.933462416 88 4.995652750 -2.215740126 89 -3.183763793 4.995652750 90 -2.270775999 -3.183763793 91 -0.949311376 -2.270775999 92 -1.949311376 -0.949311376 93 0.080902625 -1.949311376 94 0.112878959 0.080902625 95 -1.318657411 0.112878959 96 -7.395156669 -1.318657411 97 -9.622454624 -7.395156669 98 -13.542596879 -9.622454624 99 9.761200334 -13.542596879 100 5.347331375 9.761200334 101 -3.059383123 5.347331375 102 6.885581004 -3.059383123 103 -2.700550037 6.885581004 104 -4.308144462 -2.700550037 105 -7.590478290 -4.308144462 106 -5.153549791 -7.590478290 107 -6.029169122 -5.153549791 108 6.237259628 -6.029169122 109 -6.769894833 6.237259628 110 -12.300990001 -6.769894833 111 -2.997192788 -12.300990001 112 -10.590478290 -2.997192788 113 6.471712045 -10.590478290 114 -2.356025874 6.471712045 115 2.237259628 -2.356025874 116 -2.707704498 2.237259628 117 -2.622454624 -2.707704498 118 10.064997547 -2.622454624 119 -5.011501711 10.064997547 120 -5.714858960 -5.011501711 121 -4.997192788 -5.714858960 122 2.722069539 -4.997192788 123 3.691855538 2.722069539 124 -2.762740372 3.691855538 125 -2.542596879 -2.762740372 126 -0.677490497 -2.542596879 127 2.120033420 -0.677490497 128 8.112878959 2.120033420 129 4.581783791 8.112878959 130 1.556961919 4.581783791 131 4.167914832 1.556961919 132 -5.121573458 4.167914832 133 -8.356025874 -5.121573458 134 -3.997192788 -8.356025874 135 -9.567418751 -3.997192788 136 4.853604670 -9.567418751 137 1.322509503 4.853604670 138 1.588938253 1.322509503 139 -7.894275503 1.588938253 140 2.908640544 -7.894275503 141 -3.590478290 2.908640544 142 -7.245954127 -3.590478290 143 8.791414335 -7.245954127 144 -8.769894833 8.791414335 145 -15.356025874 -8.769894833 146 -9.277930461 -15.356025874 147 -12.652668625 -9.277930461 148 1.878426542 -12.652668625 149 7.588938253 1.878426542 150 -4.146395330 7.588938253 151 -2.395156669 -4.146395330 152 8.354485836 -2.395156669 153 18.073748163 8.354485836 154 -5.652668625 18.073748163 155 -0.949311376 -5.652668625 156 2.222950705 -0.949311376 157 -0.363180336 2.222950705 158 20.761200334 -0.363180336 159 9.175069293 20.761200334 160 -15.231645204 9.175069293 161 3.167914832 -15.231645204 162 -3.098513918 3.167914832 163 6.940616877 -3.098513918 164 NA 6.940616877 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -6.473252082 5.970830878 [2,] 4.699009999 -6.473252082 [3,] 3.025866752 4.699009999 [4,] -2.004347250 3.025866752 [5,] 2.471712045 -2.004347250 [6,] 1.464557583 2.471712045 [7,] 0.878426542 1.464557583 [8,] 13.947771339 0.878426542 [9,] 5.127187882 13.947771339 [10,] -1.974133248 5.127187882 [11,] 2.823390669 -1.974133248 [12,] -9.722013422 2.823390669 [13,] 5.050688624 -9.722013422 [14,] -4.528287955 5.050688624 [15,] 11.729224001 -4.528287955 [16,] 5.230105167 11.729224001 [17,] 7.823390669 5.230105167 [18,] -2.277930461 7.823390669 [19,] -1.981287710 -2.277930461 [20,] -0.887121041 -1.981287710 [21,] 3.823390669 -0.887121041 [22,] -21.201431203 3.823390669 [23,] -0.208585665 -21.201431203 [24,] -2.135882381 -0.208585665 [25,] -0.395156669 -2.135882381 [26,] 3.940616877 -0.395156669 [27,] -6.974133248 3.940616877 [28,] -7.700550037 -6.974133248 [29,] -3.794716705 -7.700550037 [30,] -0.388002208 -3.794716705 [31,] 1.230105167 -0.388002208 [32,] 5.143092960 1.230105167 [33,] -4.004347250 5.143092960 [34,] 1.549807458 -4.004347250 [35,] 2.057843085 1.549807458 [36,] 17.487617123 2.057843085 [37,] -2.004347250 17.487617123 [38,] 1.691855538 -2.004347250 [39,] 7.846450209 1.691855538 [40,] -12.732526370 7.846450209 [41,] -6.879966580 -12.732526370 [42,] -0.004347250 -6.879966580 [43,] -1.567418751 -0.004347250 [44,] 9.784259874 -1.567418751 [45,] 4.425426788 9.784259874 [46,] -2.114418996 4.425426788 [47,] 7.588938253 -2.114418996 [48,] -10.004347250 7.588938253 [49,] 9.651128588 -10.004347250 [50,] 8.729224001 9.651128588 [51,] -5.318657411 8.729224001 [52,] 7.377545376 -5.318657411 [53,] 4.073748163 7.377545376 [54,] 0.970830878 4.073748163 [55,] 2.581783791 0.970830878 [56,] -5.146395330 2.581783791 [57,] 6.080902625 -5.146395330 [58,] 2.002807212 6.080902625 [59,] 2.629665203 2.002807212 [60,] 8.064997547 2.629665203 [61,] 11.823390669 8.064997547 [62,] -2.567418751 11.823390669 [63,] 9.292295502 -2.567418751 [64,] 2.901486082 9.292295502 [65,] -9.505228416 2.901486082 [66,] -6.560264289 -9.505228416 [67,] -9.966978787 -6.560264289 [68,] 1.347331375 -9.966978787 [69,] -18.146395330 1.347331375 [70,] -1.832085168 -18.146395330 [71,] 0.611997792 -1.832085168 [72,] -0.098513918 0.611997792 [73,] 0.784259874 -0.098513918 [74,] -17.535442417 0.784259874 [75,] 19.128784037 -17.535442417 [76,] 0.315355041 19.128784037 [77,] 6.120033420 0.315355041 [78,] 0.784259874 6.120033420 [79,] 6.736378462 0.784259874 [80,] 5.112878959 6.736378462 [81,] -4.066537584 5.112878959 [82,] -5.629609085 -4.066537584 [83,] 5.237259628 -5.629609085 [84,] 13.494771584 5.237259628 [85,] 2.963676417 13.494771584 [86,] 2.933462416 2.963676417 [87,] -2.215740126 2.933462416 [88,] 4.995652750 -2.215740126 [89,] -3.183763793 4.995652750 [90,] -2.270775999 -3.183763793 [91,] -0.949311376 -2.270775999 [92,] -1.949311376 -0.949311376 [93,] 0.080902625 -1.949311376 [94,] 0.112878959 0.080902625 [95,] -1.318657411 0.112878959 [96,] -7.395156669 -1.318657411 [97,] -9.622454624 -7.395156669 [98,] -13.542596879 -9.622454624 [99,] 9.761200334 -13.542596879 [100,] 5.347331375 9.761200334 [101,] -3.059383123 5.347331375 [102,] 6.885581004 -3.059383123 [103,] -2.700550037 6.885581004 [104,] -4.308144462 -2.700550037 [105,] -7.590478290 -4.308144462 [106,] -5.153549791 -7.590478290 [107,] -6.029169122 -5.153549791 [108,] 6.237259628 -6.029169122 [109,] -6.769894833 6.237259628 [110,] -12.300990001 -6.769894833 [111,] -2.997192788 -12.300990001 [112,] -10.590478290 -2.997192788 [113,] 6.471712045 -10.590478290 [114,] -2.356025874 6.471712045 [115,] 2.237259628 -2.356025874 [116,] -2.707704498 2.237259628 [117,] -2.622454624 -2.707704498 [118,] 10.064997547 -2.622454624 [119,] -5.011501711 10.064997547 [120,] -5.714858960 -5.011501711 [121,] -4.997192788 -5.714858960 [122,] 2.722069539 -4.997192788 [123,] 3.691855538 2.722069539 [124,] -2.762740372 3.691855538 [125,] -2.542596879 -2.762740372 [126,] -0.677490497 -2.542596879 [127,] 2.120033420 -0.677490497 [128,] 8.112878959 2.120033420 [129,] 4.581783791 8.112878959 [130,] 1.556961919 4.581783791 [131,] 4.167914832 1.556961919 [132,] -5.121573458 4.167914832 [133,] -8.356025874 -5.121573458 [134,] -3.997192788 -8.356025874 [135,] -9.567418751 -3.997192788 [136,] 4.853604670 -9.567418751 [137,] 1.322509503 4.853604670 [138,] 1.588938253 1.322509503 [139,] -7.894275503 1.588938253 [140,] 2.908640544 -7.894275503 [141,] -3.590478290 2.908640544 [142,] -7.245954127 -3.590478290 [143,] 8.791414335 -7.245954127 [144,] -8.769894833 8.791414335 [145,] -15.356025874 -8.769894833 [146,] -9.277930461 -15.356025874 [147,] -12.652668625 -9.277930461 [148,] 1.878426542 -12.652668625 [149,] 7.588938253 1.878426542 [150,] -4.146395330 7.588938253 [151,] -2.395156669 -4.146395330 [152,] 8.354485836 -2.395156669 [153,] 18.073748163 8.354485836 [154,] -5.652668625 18.073748163 [155,] -0.949311376 -5.652668625 [156,] 2.222950705 -0.949311376 [157,] -0.363180336 2.222950705 [158,] 20.761200334 -0.363180336 [159,] 9.175069293 20.761200334 [160,] -15.231645204 9.175069293 [161,] 3.167914832 -15.231645204 [162,] -3.098513918 3.167914832 [163,] 6.940616877 -3.098513918 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -6.473252082 5.970830878 2 4.699009999 -6.473252082 3 3.025866752 4.699009999 4 -2.004347250 3.025866752 5 2.471712045 -2.004347250 6 1.464557583 2.471712045 7 0.878426542 1.464557583 8 13.947771339 0.878426542 9 5.127187882 13.947771339 10 -1.974133248 5.127187882 11 2.823390669 -1.974133248 12 -9.722013422 2.823390669 13 5.050688624 -9.722013422 14 -4.528287955 5.050688624 15 11.729224001 -4.528287955 16 5.230105167 11.729224001 17 7.823390669 5.230105167 18 -2.277930461 7.823390669 19 -1.981287710 -2.277930461 20 -0.887121041 -1.981287710 21 3.823390669 -0.887121041 22 -21.201431203 3.823390669 23 -0.208585665 -21.201431203 24 -2.135882381 -0.208585665 25 -0.395156669 -2.135882381 26 3.940616877 -0.395156669 27 -6.974133248 3.940616877 28 -7.700550037 -6.974133248 29 -3.794716705 -7.700550037 30 -0.388002208 -3.794716705 31 1.230105167 -0.388002208 32 5.143092960 1.230105167 33 -4.004347250 5.143092960 34 1.549807458 -4.004347250 35 2.057843085 1.549807458 36 17.487617123 2.057843085 37 -2.004347250 17.487617123 38 1.691855538 -2.004347250 39 7.846450209 1.691855538 40 -12.732526370 7.846450209 41 -6.879966580 -12.732526370 42 -0.004347250 -6.879966580 43 -1.567418751 -0.004347250 44 9.784259874 -1.567418751 45 4.425426788 9.784259874 46 -2.114418996 4.425426788 47 7.588938253 -2.114418996 48 -10.004347250 7.588938253 49 9.651128588 -10.004347250 50 8.729224001 9.651128588 51 -5.318657411 8.729224001 52 7.377545376 -5.318657411 53 4.073748163 7.377545376 54 0.970830878 4.073748163 55 2.581783791 0.970830878 56 -5.146395330 2.581783791 57 6.080902625 -5.146395330 58 2.002807212 6.080902625 59 2.629665203 2.002807212 60 8.064997547 2.629665203 61 11.823390669 8.064997547 62 -2.567418751 11.823390669 63 9.292295502 -2.567418751 64 2.901486082 9.292295502 65 -9.505228416 2.901486082 66 -6.560264289 -9.505228416 67 -9.966978787 -6.560264289 68 1.347331375 -9.966978787 69 -18.146395330 1.347331375 70 -1.832085168 -18.146395330 71 0.611997792 -1.832085168 72 -0.098513918 0.611997792 73 0.784259874 -0.098513918 74 -17.535442417 0.784259874 75 19.128784037 -17.535442417 76 0.315355041 19.128784037 77 6.120033420 0.315355041 78 0.784259874 6.120033420 79 6.736378462 0.784259874 80 5.112878959 6.736378462 81 -4.066537584 5.112878959 82 -5.629609085 -4.066537584 83 5.237259628 -5.629609085 84 13.494771584 5.237259628 85 2.963676417 13.494771584 86 2.933462416 2.963676417 87 -2.215740126 2.933462416 88 4.995652750 -2.215740126 89 -3.183763793 4.995652750 90 -2.270775999 -3.183763793 91 -0.949311376 -2.270775999 92 -1.949311376 -0.949311376 93 0.080902625 -1.949311376 94 0.112878959 0.080902625 95 -1.318657411 0.112878959 96 -7.395156669 -1.318657411 97 -9.622454624 -7.395156669 98 -13.542596879 -9.622454624 99 9.761200334 -13.542596879 100 5.347331375 9.761200334 101 -3.059383123 5.347331375 102 6.885581004 -3.059383123 103 -2.700550037 6.885581004 104 -4.308144462 -2.700550037 105 -7.590478290 -4.308144462 106 -5.153549791 -7.590478290 107 -6.029169122 -5.153549791 108 6.237259628 -6.029169122 109 -6.769894833 6.237259628 110 -12.300990001 -6.769894833 111 -2.997192788 -12.300990001 112 -10.590478290 -2.997192788 113 6.471712045 -10.590478290 114 -2.356025874 6.471712045 115 2.237259628 -2.356025874 116 -2.707704498 2.237259628 117 -2.622454624 -2.707704498 118 10.064997547 -2.622454624 119 -5.011501711 10.064997547 120 -5.714858960 -5.011501711 121 -4.997192788 -5.714858960 122 2.722069539 -4.997192788 123 3.691855538 2.722069539 124 -2.762740372 3.691855538 125 -2.542596879 -2.762740372 126 -0.677490497 -2.542596879 127 2.120033420 -0.677490497 128 8.112878959 2.120033420 129 4.581783791 8.112878959 130 1.556961919 4.581783791 131 4.167914832 1.556961919 132 -5.121573458 4.167914832 133 -8.356025874 -5.121573458 134 -3.997192788 -8.356025874 135 -9.567418751 -3.997192788 136 4.853604670 -9.567418751 137 1.322509503 4.853604670 138 1.588938253 1.322509503 139 -7.894275503 1.588938253 140 2.908640544 -7.894275503 141 -3.590478290 2.908640544 142 -7.245954127 -3.590478290 143 8.791414335 -7.245954127 144 -8.769894833 8.791414335 145 -15.356025874 -8.769894833 146 -9.277930461 -15.356025874 147 -12.652668625 -9.277930461 148 1.878426542 -12.652668625 149 7.588938253 1.878426542 150 -4.146395330 7.588938253 151 -2.395156669 -4.146395330 152 8.354485836 -2.395156669 153 18.073748163 8.354485836 154 -5.652668625 18.073748163 155 -0.949311376 -5.652668625 156 2.222950705 -0.949311376 157 -0.363180336 2.222950705 158 20.761200334 -0.363180336 159 9.175069293 20.761200334 160 -15.231645204 9.175069293 161 3.167914832 -15.231645204 162 -3.098513918 3.167914832 163 6.940616877 -3.098513918 > 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/html/rcomp/tmp/76upr1292347764.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/html/rcomp/tmp/86upr1292347764.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/html/rcomp/tmp/9y3oc1292347764.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/html/rcomp/tmp/10y3oc1292347764.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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/html/rcomp/tmp/1123ni1292347764.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/html/rcomp/tmp/12nm361292347764.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/html/rcomp/tmp/13uniz1292347764.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/html/rcomp/tmp/144whk1292347764.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/html/rcomp/tmp/15qxyq1292347764.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/html/rcomp/tmp/1646wh1292347764.tab") + } > > try(system("convert tmp/192r01292347764.ps tmp/192r01292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/2ktql1292347764.ps tmp/2ktql1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/3ktql1292347764.ps tmp/3ktql1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/4ktql1292347764.ps tmp/4ktql1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/5vkqo1292347764.ps tmp/5vkqo1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/6vkqo1292347764.ps tmp/6vkqo1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/76upr1292347764.ps tmp/76upr1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/86upr1292347764.ps tmp/86upr1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/9y3oc1292347764.ps tmp/9y3oc1292347764.png",intern=TRUE)) character(0) > try(system("convert tmp/10y3oc1292347764.ps tmp/10y3oc1292347764.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.211 1.835 11.191