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(3 + ,4 + ,3 + ,3 + ,3 + ,4 + ,3 + ,2 + ,4 + ,3 + ,3 + ,4 + ,3 + ,4 + ,3 + ,1 + ,3 + ,3 + ,2 + ,2 + ,3 + ,4 + ,2 + ,2 + ,3 + ,4 + ,4 + ,3 + ,2 + ,4 + ,2 + ,2 + ,3 + ,4 + ,3 + ,2 + ,3 + ,2 + ,2 + ,2 + ,3 + ,2 + ,4 + ,4 + ,3 + ,4 + ,3 + ,3 + ,3 + ,4 + ,3 + ,4 + ,2 + ,4 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,3 + ,3 + ,2 + ,3 + ,2 + ,4 + ,3 + ,3 + ,3 + ,4 + ,3 + ,4 + ,2 + ,3 + ,2 + ,2 + ,1 + ,2 + ,3 + ,2 + ,2 + ,2 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,3 + ,3 + ,3 + ,4 + ,3 + ,4 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,3 + ,3 + ,3 + ,4 + ,2 + ,3 + ,4 + ,3 + ,3 + ,2 + ,3 + ,3 + ,3 + ,3 + ,3 + ,3 + ,4 + ,4 + ,2 + ,2 + ,3 + ,3 + ,2 + ,2 + ,3 + ,3 + ,4 + ,4 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,3 + ,3 + ,2 + ,3 + ,3 + ,2 + ,3 + ,4 + ,4 + ,4 + ,3 + ,2 + ,3 + ,3 + ,3 + ,3 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,4 + ,4 + ,4 + ,4 + ,3 + ,3 + ,3 + ,4 + ,3 + ,5 + ,3 + ,2 + ,1 + ,3 + ,2 + ,1 + ,2 + ,3 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,4 + ,4 + ,4 + ,3 + ,4 + ,5 + ,4 + ,4 + ,2 + ,3 + ,2 + ,2 + ,1 + ,4 + ,3 + ,3 + ,3 + ,4 + ,3 + ,4 + ,3 + ,2 + ,3 + ,2 + ,1 + ,4 + ,2 + ,2 + ,3 + ,4 + ,4 + ,3 + ,2 + ,4 + ,3 + ,2 + ,3 + ,3 + ,4 + ,4 + ,3 + ,3 + ,3 + ,3 + ,2 + ,3 + ,3 + ,3 + ,4 + ,2 + ,4 + ,4 + ,1 + ,4 + ,1 + ,4 + ,3 + ,4 + ,4 + ,4 + ,2 + ,4 + ,2 + ,2 + ,4 + ,3 + ,3 + ,4 + ,3 + ,4 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,3 + ,4 + ,3 + ,2 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,2 + ,3 + ,3 + ,4 + ,2 + ,2 + ,3 + ,4 + ,4 + ,4 + ,1 + ,4 + ,1 + ,1 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,4 + ,3 + ,3 + ,2 + ,3 + ,2 + ,2 + ,3 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,3 + ,4 + ,3 + ,3 + ,3 + ,3 + ,3 + ,3 + ,2 + ,4 + ,3 + ,3 + ,3 + ,4 + ,4 + ,3 + ,2 + ,4 + ,2 + ,2 + ,2 + ,3 + ,3 + ,2 + ,3 + ,3 + ,3 + ,3 + ,3 + ,3 + ,3 + ,3 + ,2 + ,3 + ,2 + ,2 + ,2 + ,4 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,2 + ,2 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,4 + ,3 + ,3 + ,3 + ,2 + ,4 + ,3 + ,2 + ,3 + ,3 + ,3 + ,3 + ,2 + ,4 + ,4 + ,3 + ,4 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,4 + ,3 + ,4 + ,3 + ,3 + ,3 + ,3 + ,2 + ,2 + ,3 + ,4 + ,3 + ,1 + ,2 + ,2 + ,2 + ,2 + ,3 + ,4 + ,3 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,4 + ,4 + ,5 + ,4 + ,4 + ,3 + ,4 + ,3 + ,4 + ,3 + ,5 + ,3 + ,3 + ,2 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,3 + ,3 + ,3 + ,1 + ,4 + ,3 + ,3 + ,3 + ,3 + ,4 + ,4 + ,2 + ,3 + ,2 + ,2 + ,2 + ,2 + ,3 + ,2 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,3 + ,4 + ,2 + ,4 + ,4 + ,2 + ,3 + ,1 + ,4 + ,3 + ,3 + ,4 + ,3 + ,3 + ,4 + ,4 + ,3 + ,4 + ,4 + ,4 + ,3 + ,4 + ,3 + ,3 + ,3 + ,2 + ,3 + ,4 + ,3 + ,3 + ,3 + ,4 + ,3 + ,2 + ,3 + ,3 + ,3 + ,3 + ,3 + ,4 + ,3 + ,4 + ,1 + ,4 + ,4 + ,2 + ,2 + ,4 + ,3 + ,4 + ,4 + ,4 + ,2 + ,4 + ,3 + ,4 + ,4 + ,2 + ,4 + ,3 + ,3 + ,3 + ,3 + ,3 + ,3 + ,3 + ,2 + ,4 + ,1 + ,3 + ,1 + ,4 + ,4 + ,3 + ,4 + ,4 + ,3 + ,4 + ,3 + ,4 + ,2 + ,3 + ,3 + ,4 + ,2 + ,2 + ,3 + ,4 + ,4 + ,3 + ,4 + ,4 + ,3 + ,3 + ,3 + ,4 + ,4 + ,3 + ,3 + ,4 + ,2 + ,4 + ,1 + ,3 + ,4 + ,3 + ,4 + ,3 + ,4 + ,4 + ,2 + ,4 + ,3 + ,4 + ,2 + ,4 + ,3 + ,4 + ,3 + ,2 + ,3 + ,3 + ,3 + ,4 + ,2 + ,3 + ,2 + ,4 + ,3 + ,2 + ,3 + ,4 + ,3 + ,3 + ,3 + ,5 + ,3 + ,1 + ,2 + ,4 + ,4 + ,2 + ,3 + ,4 + ,4 + ,4 + ,4 + ,4 + ,3 + ,4 + ,4 + ,4 + ,3 + ,3 + ,4 + ,4 + ,4 + ,3 + ,2 + ,4 + ,2 + ,4 + ,3 + ,4 + ,3 + ,2 + ,3 + ,4 + ,4 + ,4 + ,3 + ,2 + ,3 + ,3) + ,dim=c(4 + ,156) + ,dimnames=list(c('Poular' + ,'Friends' + ,'Considerfriends' + ,'FriendStudents') + ,1:156)) > y <- array(NA,dim=c(4,156),dimnames=list(c('Poular','Friends','Considerfriends','FriendStudents'),1:156)) > 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 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 Poular Friends Considerfriends FriendStudents 1 3 4 3 3 2 3 4 3 2 3 4 3 3 4 4 3 4 3 1 5 3 3 2 2 6 3 4 2 2 7 3 4 4 3 8 2 4 2 2 9 3 4 3 2 10 3 2 2 2 11 3 2 4 4 12 3 4 3 3 13 3 4 3 4 14 2 4 2 2 15 3 4 3 3 16 3 3 2 3 17 2 4 3 3 18 3 4 3 4 19 2 3 2 2 20 1 2 3 2 21 2 2 2 2 22 3 4 3 3 23 3 3 3 4 24 3 4 2 2 25 3 4 3 3 26 3 3 3 4 27 2 3 4 3 28 3 2 3 3 29 3 3 3 3 30 4 4 2 2 31 3 3 2 2 32 3 3 4 4 33 3 4 4 3 34 3 4 3 3 35 2 3 3 2 36 3 4 4 4 37 3 2 3 3 38 3 3 2 2 39 3 4 3 3 40 4 4 4 4 41 3 3 3 4 42 3 5 3 2 43 1 3 2 1 44 2 3 2 2 45 3 4 3 3 46 4 4 4 3 47 4 5 4 4 48 2 3 2 2 49 1 4 3 3 50 3 4 3 4 51 3 2 3 2 52 1 4 2 2 53 3 4 4 3 54 2 4 3 2 55 3 3 4 4 56 3 3 3 3 57 2 3 3 3 58 4 2 4 4 59 1 4 1 4 60 3 4 4 4 61 2 4 2 2 62 4 3 3 4 63 3 4 3 4 64 4 3 3 4 65 3 4 3 2 66 3 4 4 3 67 3 4 2 3 68 3 4 2 2 69 3 4 4 4 70 1 4 1 1 71 3 4 4 3 72 3 4 4 3 73 3 2 3 2 74 2 3 2 2 75 3 4 3 3 76 3 4 3 3 77 3 3 3 3 78 2 4 3 3 79 3 4 4 3 80 2 4 2 2 81 2 3 3 2 82 3 3 3 3 83 3 3 3 3 84 2 3 2 2 85 2 4 2 2 86 3 4 3 3 87 2 2 2 2 88 3 4 3 3 89 4 3 3 3 90 2 4 3 2 91 3 3 3 3 92 2 4 4 3 93 4 3 4 4 94 3 3 4 4 95 3 4 3 3 96 3 3 2 2 97 3 4 3 1 98 2 2 2 2 99 3 4 3 3 100 4 4 3 3 101 4 4 4 5 102 4 4 3 4 103 3 4 3 5 104 3 3 2 2 105 1 4 1 1 106 4 3 3 3 107 1 4 3 3 108 3 3 4 4 109 2 3 2 2 110 2 2 3 2 111 3 4 4 3 112 3 4 3 4 113 2 4 4 2 114 3 1 4 3 115 3 4 3 3 116 4 4 3 4 117 4 4 3 4 118 3 3 3 2 119 3 4 3 3 120 3 4 3 2 121 3 3 3 3 122 3 4 3 4 123 1 4 4 2 124 2 4 3 4 125 4 4 2 4 126 3 4 4 2 127 4 3 3 3 128 3 3 3 3 129 2 4 1 3 130 1 4 4 3 131 4 4 3 4 132 3 4 2 3 133 3 4 2 2 134 3 4 4 3 135 4 4 3 3 136 3 4 4 3 137 3 4 2 4 138 1 3 4 3 139 4 3 4 4 140 2 4 3 4 141 2 4 3 4 142 3 2 3 3 143 3 4 2 3 144 2 4 3 2 145 3 4 3 3 146 3 5 3 1 147 2 4 4 2 148 3 4 4 4 149 4 4 3 4 150 4 4 3 3 151 4 4 4 3 152 2 4 2 4 153 3 4 3 2 154 3 4 4 4 155 3 2 3 3 156 3 4 3 3 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Friends Considerfriends FriendStudents 1.350860 0.004249 0.151351 0.341802 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.9987 -0.3499 0.1527 0.4955 1.6458 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.350860 0.363066 3.721 0.000279 *** Friends 0.004249 0.079078 0.054 0.957218 Considerfriends 0.151351 0.083278 1.817 0.071120 . FriendStudents 0.341802 0.072283 4.729 5.12e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6987 on 152 degrees of freedom Multiple R-squared: 0.2125, Adjusted R-squared: 0.1969 F-statistic: 13.67 on 3 and 152 DF, p-value: 6.097e-08 > 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.099707720 0.199415440 0.9002923 [2,] 0.184142139 0.368284279 0.8158579 [3,] 0.097224860 0.194449721 0.9027751 [4,] 0.083765895 0.167531790 0.9162341 [5,] 0.120747973 0.241495945 0.8792520 [6,] 0.069600622 0.139201243 0.9303994 [7,] 0.040757098 0.081514195 0.9592429 [8,] 0.059586586 0.119173171 0.9404134 [9,] 0.034313597 0.068627195 0.9656864 [10,] 0.019256519 0.038513038 0.9807435 [11,] 0.046676418 0.093352836 0.9533236 [12,] 0.028266294 0.056532589 0.9717337 [13,] 0.038003646 0.076007293 0.9619964 [14,] 0.280344394 0.560688788 0.7196556 [15,] 0.229403280 0.458806560 0.7705967 [16,] 0.176252537 0.352505074 0.8237475 [17,] 0.132468063 0.264936126 0.8675319 [18,] 0.109851137 0.219702274 0.8901489 [19,] 0.079752764 0.159505528 0.9202472 [20,] 0.056745984 0.113491967 0.9432540 [21,] 0.062669654 0.125339307 0.9373303 [22,] 0.053850322 0.107700644 0.9461497 [23,] 0.039935727 0.079871454 0.9600643 [24,] 0.108999833 0.217999667 0.8910002 [25,] 0.093394092 0.186788184 0.9066059 [26,] 0.071461373 0.142922747 0.9285386 [27,] 0.053512939 0.107025879 0.9464871 [28,] 0.038771081 0.077542162 0.9612289 [29,] 0.033080054 0.066160108 0.9669199 [30,] 0.024095625 0.048191249 0.9759044 [31,] 0.019759956 0.039519912 0.9802400 [32,] 0.016225597 0.032451193 0.9837744 [33,] 0.011176918 0.022353835 0.9888231 [34,] 0.014649431 0.029298862 0.9853506 [35,] 0.010331844 0.020663687 0.9896682 [36,] 0.007537580 0.015075159 0.9924624 [37,] 0.018876716 0.037753433 0.9811233 [38,] 0.016423521 0.032847043 0.9835765 [39,] 0.011624744 0.023249488 0.9883753 [40,] 0.020955254 0.041910509 0.9790447 [41,] 0.017757681 0.035515362 0.9822423 [42,] 0.014770407 0.029540814 0.9852296 [43,] 0.134356518 0.268713037 0.8656435 [44,] 0.113730990 0.227461981 0.8862690 [45,] 0.115440019 0.230880038 0.8845600 [46,] 0.237122356 0.474244711 0.7628776 [47,] 0.200080847 0.400161695 0.7999192 [48,] 0.188557814 0.377115627 0.8114422 [49,] 0.161450095 0.322900190 0.8385499 [50,] 0.135063355 0.270126711 0.8649366 [51,] 0.145690184 0.291380368 0.8543098 [52,] 0.157520479 0.315040957 0.8424795 [53,] 0.368002496 0.736004992 0.6319975 [54,] 0.334184411 0.668368823 0.6658156 [55,] 0.301291341 0.602582682 0.6987087 [56,] 0.332207429 0.664414858 0.6677926 [57,] 0.291883997 0.583767993 0.7081160 [58,] 0.316157893 0.632315785 0.6838421 [59,] 0.291693523 0.583387046 0.7083065 [60,] 0.253841543 0.507683085 0.7461585 [61,] 0.227225029 0.454450058 0.7727750 [62,] 0.222187210 0.444374420 0.7778128 [63,] 0.197089190 0.394178381 0.8029108 [64,] 0.212758090 0.425516180 0.7872419 [65,] 0.181261365 0.362522730 0.8187386 [66,] 0.152823870 0.305647740 0.8471761 [67,] 0.137759226 0.275518451 0.8622408 [68,] 0.119343487 0.238686974 0.8806565 [69,] 0.098502503 0.197005007 0.9014975 [70,] 0.080465899 0.160931799 0.9195341 [71,] 0.065072006 0.130144011 0.9349280 [72,] 0.072367478 0.144734956 0.9276325 [73,] 0.058001848 0.116003696 0.9419982 [74,] 0.048603029 0.097206059 0.9513970 [75,] 0.044047785 0.088095569 0.9559522 [76,] 0.034639199 0.069278398 0.9653608 [77,] 0.026941709 0.053883418 0.9730583 [78,] 0.022131116 0.044262233 0.9778689 [79,] 0.018089629 0.036179259 0.9819104 [80,] 0.013681358 0.027362716 0.9863186 [81,] 0.011239348 0.022478697 0.9887607 [82,] 0.008337146 0.016674293 0.9916629 [83,] 0.013940601 0.027881203 0.9860594 [84,] 0.012332505 0.024665011 0.9876675 [85,] 0.009155764 0.018311528 0.9908442 [86,] 0.012743763 0.025487526 0.9872562 [87,] 0.012459602 0.024919205 0.9875404 [88,] 0.009771683 0.019543367 0.9902283 [89,] 0.007188675 0.014377351 0.9928113 [90,] 0.006649659 0.013299317 0.9933503 [91,] 0.007169277 0.014338554 0.9928307 [92,] 0.005718778 0.011437556 0.9942812 [93,] 0.004114477 0.008228954 0.9958855 [94,] 0.007156189 0.014312378 0.9928438 [95,] 0.005629016 0.011258032 0.9943710 [96,] 0.006399682 0.012799364 0.9936003 [97,] 0.005286634 0.010573269 0.9947134 [98,] 0.004784006 0.009568013 0.9952160 [99,] 0.006655351 0.013310703 0.9933446 [100,] 0.010951813 0.021903627 0.9890482 [101,] 0.054592218 0.109184436 0.9454078 [102,] 0.043833626 0.087667253 0.9561664 [103,] 0.039212963 0.078425927 0.9607870 [104,] 0.037076246 0.074152492 0.9629238 [105,] 0.028548450 0.057096900 0.9714515 [106,] 0.021419301 0.042838601 0.9785807 [107,] 0.020015554 0.040031107 0.9799844 [108,] 0.014617349 0.029234699 0.9853827 [109,] 0.010568553 0.021137106 0.9894314 [110,] 0.012113662 0.024227325 0.9878863 [111,] 0.014344218 0.028688437 0.9856558 [112,] 0.011000112 0.022000224 0.9889999 [113,] 0.007799507 0.015599014 0.9922005 [114,] 0.005952794 0.011905587 0.9940472 [115,] 0.004065077 0.008130154 0.9959349 [116,] 0.002722839 0.005445678 0.9972772 [117,] 0.012153546 0.024307092 0.9878465 [118,] 0.017936618 0.035873235 0.9820634 [119,] 0.021963567 0.043927134 0.9780364 [120,] 0.016157481 0.032314961 0.9838425 [121,] 0.025072939 0.050145877 0.9749271 [122,] 0.017942428 0.035884856 0.9820576 [123,] 0.019886370 0.039772740 0.9801136 [124,] 0.110662058 0.221324115 0.8893379 [125,] 0.126129657 0.252259314 0.8738703 [126,] 0.096779237 0.193558475 0.9032208 [127,] 0.076645851 0.153291702 0.9233541 [128,] 0.055253817 0.110507634 0.9447462 [129,] 0.081437153 0.162874306 0.9185628 [130,] 0.058204123 0.116408247 0.9417959 [131,] 0.040516862 0.081033724 0.9594831 [132,] 0.286707147 0.573414293 0.7132929 [133,] 0.289746661 0.579493323 0.7102533 [134,] 0.341146988 0.682293976 0.6588530 [135,] 0.450307508 0.900615017 0.5496925 [136,] 0.363274126 0.726548251 0.6367259 [137,] 0.284862182 0.569724365 0.7151378 [138,] 0.305020075 0.610040151 0.6949799 [139,] 0.219713365 0.439426730 0.7802866 [140,] 0.155540620 0.311081240 0.8444594 [141,] 0.364695392 0.729390783 0.6353046 [142,] 0.306309818 0.612619637 0.6936902 [143,] 0.463510207 0.927020414 0.5364898 > postscript(file="/var/www/html/rcomp/tmp/1gcu61290560674.ps",horizontal=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/2gcu61290560674.ps",horizontal=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/394b91290560674.ps",horizontal=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/494b91290560674.ps",horizontal=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/52dtu1290560674.ps",horizontal=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 = 156 Frequency = 1 1 2 3 4 5 6 0.152684490 0.494486094 0.815132015 0.836287698 0.650086522 0.645837394 7 8 9 10 11 12 0.001333190 -0.354162606 0.494486094 0.654335651 -0.331970156 0.152684490 13 14 15 16 17 18 -0.189117114 -0.354162606 0.152684490 0.308284918 -0.847315510 -0.189117114 19 20 21 22 23 24 -0.349913478 -1.497015649 -0.345664349 0.152684490 -0.184867985 0.645837394 25 26 27 28 29 30 0.152684490 -0.184867985 -0.994417681 0.161182747 0.156933619 1.645837394 31 32 33 34 35 36 0.650086522 -0.336219285 0.001333190 0.152684490 -0.501264777 -0.340468414 37 38 39 40 41 42 0.161182747 0.650086522 0.152684490 0.659531586 -0.184867985 0.490236965 43 44 45 46 47 48 -1.008111874 -0.349913478 0.152684490 1.001333190 0.655282458 -0.349913478 49 50 51 52 53 54 -1.847315510 -0.189117114 0.502984351 -1.354162606 0.001333190 -0.505513906 55 56 57 58 59 60 -0.336219285 0.156933619 -0.843066381 0.668029844 -1.886414514 -0.340468414 61 62 63 64 65 66 -0.354162606 0.815132015 -0.189117114 0.815132015 0.494486094 0.001333190 67 68 69 70 71 72 0.304035790 0.645837394 -0.340468414 -0.861009703 0.001333190 0.001333190 73 74 75 76 77 78 0.502984351 -0.349913478 0.152684490 0.152684490 0.156933619 -0.847315510 79 80 81 82 83 84 0.001333190 -0.354162606 -0.501264777 0.156933619 0.156933619 -0.349913478 85 86 87 88 89 90 -0.354162606 0.152684490 -0.345664349 0.152684490 1.156933619 -0.505513906 91 92 93 94 95 96 0.156933619 -0.998666810 0.663780715 -0.336219285 0.152684490 0.650086522 97 98 99 100 101 102 0.836287698 -0.345664349 0.152684490 1.152684490 0.317729982 0.810882886 103 104 105 106 107 108 -0.530918718 0.650086522 -0.861009703 1.156933619 -1.847315510 -0.336219285 109 110 111 112 113 114 -0.349913478 -0.497015649 0.001333190 -0.189117114 -0.656865206 0.014080576 115 116 117 118 119 120 0.152684490 0.810882886 0.810882886 0.498735223 0.152684490 0.494486094 121 122 123 124 125 126 0.156933619 -0.189117114 -1.656865206 -1.189117114 0.962234186 0.343134794 127 128 129 130 131 132 1.156933619 0.156933619 -0.544612911 -1.998666810 0.810882886 0.304035790 133 134 135 136 137 138 0.645837394 0.001333190 1.152684490 0.001333190 -0.037765814 -1.994417681 139 140 141 142 143 144 0.663780715 -1.189117114 -1.189117114 0.161182747 0.304035790 -0.505513906 145 146 147 148 149 150 0.152684490 0.832038569 -0.656865206 -0.340468414 0.810882886 1.152684490 151 152 153 154 155 156 1.001333190 -1.037765814 0.494486094 -0.340468414 0.161182747 0.152684490 > postscript(file="/var/www/html/rcomp/tmp/62dtu1290560674.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 0.152684490 NA 1 0.494486094 0.152684490 2 0.815132015 0.494486094 3 0.836287698 0.815132015 4 0.650086522 0.836287698 5 0.645837394 0.650086522 6 0.001333190 0.645837394 7 -0.354162606 0.001333190 8 0.494486094 -0.354162606 9 0.654335651 0.494486094 10 -0.331970156 0.654335651 11 0.152684490 -0.331970156 12 -0.189117114 0.152684490 13 -0.354162606 -0.189117114 14 0.152684490 -0.354162606 15 0.308284918 0.152684490 16 -0.847315510 0.308284918 17 -0.189117114 -0.847315510 18 -0.349913478 -0.189117114 19 -1.497015649 -0.349913478 20 -0.345664349 -1.497015649 21 0.152684490 -0.345664349 22 -0.184867985 0.152684490 23 0.645837394 -0.184867985 24 0.152684490 0.645837394 25 -0.184867985 0.152684490 26 -0.994417681 -0.184867985 27 0.161182747 -0.994417681 28 0.156933619 0.161182747 29 1.645837394 0.156933619 30 0.650086522 1.645837394 31 -0.336219285 0.650086522 32 0.001333190 -0.336219285 33 0.152684490 0.001333190 34 -0.501264777 0.152684490 35 -0.340468414 -0.501264777 36 0.161182747 -0.340468414 37 0.650086522 0.161182747 38 0.152684490 0.650086522 39 0.659531586 0.152684490 40 -0.184867985 0.659531586 41 0.490236965 -0.184867985 42 -1.008111874 0.490236965 43 -0.349913478 -1.008111874 44 0.152684490 -0.349913478 45 1.001333190 0.152684490 46 0.655282458 1.001333190 47 -0.349913478 0.655282458 48 -1.847315510 -0.349913478 49 -0.189117114 -1.847315510 50 0.502984351 -0.189117114 51 -1.354162606 0.502984351 52 0.001333190 -1.354162606 53 -0.505513906 0.001333190 54 -0.336219285 -0.505513906 55 0.156933619 -0.336219285 56 -0.843066381 0.156933619 57 0.668029844 -0.843066381 58 -1.886414514 0.668029844 59 -0.340468414 -1.886414514 60 -0.354162606 -0.340468414 61 0.815132015 -0.354162606 62 -0.189117114 0.815132015 63 0.815132015 -0.189117114 64 0.494486094 0.815132015 65 0.001333190 0.494486094 66 0.304035790 0.001333190 67 0.645837394 0.304035790 68 -0.340468414 0.645837394 69 -0.861009703 -0.340468414 70 0.001333190 -0.861009703 71 0.001333190 0.001333190 72 0.502984351 0.001333190 73 -0.349913478 0.502984351 74 0.152684490 -0.349913478 75 0.152684490 0.152684490 76 0.156933619 0.152684490 77 -0.847315510 0.156933619 78 0.001333190 -0.847315510 79 -0.354162606 0.001333190 80 -0.501264777 -0.354162606 81 0.156933619 -0.501264777 82 0.156933619 0.156933619 83 -0.349913478 0.156933619 84 -0.354162606 -0.349913478 85 0.152684490 -0.354162606 86 -0.345664349 0.152684490 87 0.152684490 -0.345664349 88 1.156933619 0.152684490 89 -0.505513906 1.156933619 90 0.156933619 -0.505513906 91 -0.998666810 0.156933619 92 0.663780715 -0.998666810 93 -0.336219285 0.663780715 94 0.152684490 -0.336219285 95 0.650086522 0.152684490 96 0.836287698 0.650086522 97 -0.345664349 0.836287698 98 0.152684490 -0.345664349 99 1.152684490 0.152684490 100 0.317729982 1.152684490 101 0.810882886 0.317729982 102 -0.530918718 0.810882886 103 0.650086522 -0.530918718 104 -0.861009703 0.650086522 105 1.156933619 -0.861009703 106 -1.847315510 1.156933619 107 -0.336219285 -1.847315510 108 -0.349913478 -0.336219285 109 -0.497015649 -0.349913478 110 0.001333190 -0.497015649 111 -0.189117114 0.001333190 112 -0.656865206 -0.189117114 113 0.014080576 -0.656865206 114 0.152684490 0.014080576 115 0.810882886 0.152684490 116 0.810882886 0.810882886 117 0.498735223 0.810882886 118 0.152684490 0.498735223 119 0.494486094 0.152684490 120 0.156933619 0.494486094 121 -0.189117114 0.156933619 122 -1.656865206 -0.189117114 123 -1.189117114 -1.656865206 124 0.962234186 -1.189117114 125 0.343134794 0.962234186 126 1.156933619 0.343134794 127 0.156933619 1.156933619 128 -0.544612911 0.156933619 129 -1.998666810 -0.544612911 130 0.810882886 -1.998666810 131 0.304035790 0.810882886 132 0.645837394 0.304035790 133 0.001333190 0.645837394 134 1.152684490 0.001333190 135 0.001333190 1.152684490 136 -0.037765814 0.001333190 137 -1.994417681 -0.037765814 138 0.663780715 -1.994417681 139 -1.189117114 0.663780715 140 -1.189117114 -1.189117114 141 0.161182747 -1.189117114 142 0.304035790 0.161182747 143 -0.505513906 0.304035790 144 0.152684490 -0.505513906 145 0.832038569 0.152684490 146 -0.656865206 0.832038569 147 -0.340468414 -0.656865206 148 0.810882886 -0.340468414 149 1.152684490 0.810882886 150 1.001333190 1.152684490 151 -1.037765814 1.001333190 152 0.494486094 -1.037765814 153 -0.340468414 0.494486094 154 0.161182747 -0.340468414 155 0.152684490 0.161182747 156 NA 0.152684490 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.494486094 0.152684490 [2,] 0.815132015 0.494486094 [3,] 0.836287698 0.815132015 [4,] 0.650086522 0.836287698 [5,] 0.645837394 0.650086522 [6,] 0.001333190 0.645837394 [7,] -0.354162606 0.001333190 [8,] 0.494486094 -0.354162606 [9,] 0.654335651 0.494486094 [10,] -0.331970156 0.654335651 [11,] 0.152684490 -0.331970156 [12,] -0.189117114 0.152684490 [13,] -0.354162606 -0.189117114 [14,] 0.152684490 -0.354162606 [15,] 0.308284918 0.152684490 [16,] -0.847315510 0.308284918 [17,] -0.189117114 -0.847315510 [18,] -0.349913478 -0.189117114 [19,] -1.497015649 -0.349913478 [20,] -0.345664349 -1.497015649 [21,] 0.152684490 -0.345664349 [22,] -0.184867985 0.152684490 [23,] 0.645837394 -0.184867985 [24,] 0.152684490 0.645837394 [25,] -0.184867985 0.152684490 [26,] -0.994417681 -0.184867985 [27,] 0.161182747 -0.994417681 [28,] 0.156933619 0.161182747 [29,] 1.645837394 0.156933619 [30,] 0.650086522 1.645837394 [31,] -0.336219285 0.650086522 [32,] 0.001333190 -0.336219285 [33,] 0.152684490 0.001333190 [34,] -0.501264777 0.152684490 [35,] -0.340468414 -0.501264777 [36,] 0.161182747 -0.340468414 [37,] 0.650086522 0.161182747 [38,] 0.152684490 0.650086522 [39,] 0.659531586 0.152684490 [40,] -0.184867985 0.659531586 [41,] 0.490236965 -0.184867985 [42,] -1.008111874 0.490236965 [43,] -0.349913478 -1.008111874 [44,] 0.152684490 -0.349913478 [45,] 1.001333190 0.152684490 [46,] 0.655282458 1.001333190 [47,] -0.349913478 0.655282458 [48,] -1.847315510 -0.349913478 [49,] -0.189117114 -1.847315510 [50,] 0.502984351 -0.189117114 [51,] -1.354162606 0.502984351 [52,] 0.001333190 -1.354162606 [53,] -0.505513906 0.001333190 [54,] -0.336219285 -0.505513906 [55,] 0.156933619 -0.336219285 [56,] -0.843066381 0.156933619 [57,] 0.668029844 -0.843066381 [58,] -1.886414514 0.668029844 [59,] -0.340468414 -1.886414514 [60,] -0.354162606 -0.340468414 [61,] 0.815132015 -0.354162606 [62,] -0.189117114 0.815132015 [63,] 0.815132015 -0.189117114 [64,] 0.494486094 0.815132015 [65,] 0.001333190 0.494486094 [66,] 0.304035790 0.001333190 [67,] 0.645837394 0.304035790 [68,] -0.340468414 0.645837394 [69,] -0.861009703 -0.340468414 [70,] 0.001333190 -0.861009703 [71,] 0.001333190 0.001333190 [72,] 0.502984351 0.001333190 [73,] -0.349913478 0.502984351 [74,] 0.152684490 -0.349913478 [75,] 0.152684490 0.152684490 [76,] 0.156933619 0.152684490 [77,] -0.847315510 0.156933619 [78,] 0.001333190 -0.847315510 [79,] -0.354162606 0.001333190 [80,] -0.501264777 -0.354162606 [81,] 0.156933619 -0.501264777 [82,] 0.156933619 0.156933619 [83,] -0.349913478 0.156933619 [84,] -0.354162606 -0.349913478 [85,] 0.152684490 -0.354162606 [86,] -0.345664349 0.152684490 [87,] 0.152684490 -0.345664349 [88,] 1.156933619 0.152684490 [89,] -0.505513906 1.156933619 [90,] 0.156933619 -0.505513906 [91,] -0.998666810 0.156933619 [92,] 0.663780715 -0.998666810 [93,] -0.336219285 0.663780715 [94,] 0.152684490 -0.336219285 [95,] 0.650086522 0.152684490 [96,] 0.836287698 0.650086522 [97,] -0.345664349 0.836287698 [98,] 0.152684490 -0.345664349 [99,] 1.152684490 0.152684490 [100,] 0.317729982 1.152684490 [101,] 0.810882886 0.317729982 [102,] -0.530918718 0.810882886 [103,] 0.650086522 -0.530918718 [104,] -0.861009703 0.650086522 [105,] 1.156933619 -0.861009703 [106,] -1.847315510 1.156933619 [107,] -0.336219285 -1.847315510 [108,] -0.349913478 -0.336219285 [109,] -0.497015649 -0.349913478 [110,] 0.001333190 -0.497015649 [111,] -0.189117114 0.001333190 [112,] -0.656865206 -0.189117114 [113,] 0.014080576 -0.656865206 [114,] 0.152684490 0.014080576 [115,] 0.810882886 0.152684490 [116,] 0.810882886 0.810882886 [117,] 0.498735223 0.810882886 [118,] 0.152684490 0.498735223 [119,] 0.494486094 0.152684490 [120,] 0.156933619 0.494486094 [121,] -0.189117114 0.156933619 [122,] -1.656865206 -0.189117114 [123,] -1.189117114 -1.656865206 [124,] 0.962234186 -1.189117114 [125,] 0.343134794 0.962234186 [126,] 1.156933619 0.343134794 [127,] 0.156933619 1.156933619 [128,] -0.544612911 0.156933619 [129,] -1.998666810 -0.544612911 [130,] 0.810882886 -1.998666810 [131,] 0.304035790 0.810882886 [132,] 0.645837394 0.304035790 [133,] 0.001333190 0.645837394 [134,] 1.152684490 0.001333190 [135,] 0.001333190 1.152684490 [136,] -0.037765814 0.001333190 [137,] -1.994417681 -0.037765814 [138,] 0.663780715 -1.994417681 [139,] -1.189117114 0.663780715 [140,] -1.189117114 -1.189117114 [141,] 0.161182747 -1.189117114 [142,] 0.304035790 0.161182747 [143,] -0.505513906 0.304035790 [144,] 0.152684490 -0.505513906 [145,] 0.832038569 0.152684490 [146,] -0.656865206 0.832038569 [147,] -0.340468414 -0.656865206 [148,] 0.810882886 -0.340468414 [149,] 1.152684490 0.810882886 [150,] 1.001333190 1.152684490 [151,] -1.037765814 1.001333190 [152,] 0.494486094 -1.037765814 [153,] -0.340468414 0.494486094 [154,] 0.161182747 -0.340468414 [155,] 0.152684490 0.161182747 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.494486094 0.152684490 2 0.815132015 0.494486094 3 0.836287698 0.815132015 4 0.650086522 0.836287698 5 0.645837394 0.650086522 6 0.001333190 0.645837394 7 -0.354162606 0.001333190 8 0.494486094 -0.354162606 9 0.654335651 0.494486094 10 -0.331970156 0.654335651 11 0.152684490 -0.331970156 12 -0.189117114 0.152684490 13 -0.354162606 -0.189117114 14 0.152684490 -0.354162606 15 0.308284918 0.152684490 16 -0.847315510 0.308284918 17 -0.189117114 -0.847315510 18 -0.349913478 -0.189117114 19 -1.497015649 -0.349913478 20 -0.345664349 -1.497015649 21 0.152684490 -0.345664349 22 -0.184867985 0.152684490 23 0.645837394 -0.184867985 24 0.152684490 0.645837394 25 -0.184867985 0.152684490 26 -0.994417681 -0.184867985 27 0.161182747 -0.994417681 28 0.156933619 0.161182747 29 1.645837394 0.156933619 30 0.650086522 1.645837394 31 -0.336219285 0.650086522 32 0.001333190 -0.336219285 33 0.152684490 0.001333190 34 -0.501264777 0.152684490 35 -0.340468414 -0.501264777 36 0.161182747 -0.340468414 37 0.650086522 0.161182747 38 0.152684490 0.650086522 39 0.659531586 0.152684490 40 -0.184867985 0.659531586 41 0.490236965 -0.184867985 42 -1.008111874 0.490236965 43 -0.349913478 -1.008111874 44 0.152684490 -0.349913478 45 1.001333190 0.152684490 46 0.655282458 1.001333190 47 -0.349913478 0.655282458 48 -1.847315510 -0.349913478 49 -0.189117114 -1.847315510 50 0.502984351 -0.189117114 51 -1.354162606 0.502984351 52 0.001333190 -1.354162606 53 -0.505513906 0.001333190 54 -0.336219285 -0.505513906 55 0.156933619 -0.336219285 56 -0.843066381 0.156933619 57 0.668029844 -0.843066381 58 -1.886414514 0.668029844 59 -0.340468414 -1.886414514 60 -0.354162606 -0.340468414 61 0.815132015 -0.354162606 62 -0.189117114 0.815132015 63 0.815132015 -0.189117114 64 0.494486094 0.815132015 65 0.001333190 0.494486094 66 0.304035790 0.001333190 67 0.645837394 0.304035790 68 -0.340468414 0.645837394 69 -0.861009703 -0.340468414 70 0.001333190 -0.861009703 71 0.001333190 0.001333190 72 0.502984351 0.001333190 73 -0.349913478 0.502984351 74 0.152684490 -0.349913478 75 0.152684490 0.152684490 76 0.156933619 0.152684490 77 -0.847315510 0.156933619 78 0.001333190 -0.847315510 79 -0.354162606 0.001333190 80 -0.501264777 -0.354162606 81 0.156933619 -0.501264777 82 0.156933619 0.156933619 83 -0.349913478 0.156933619 84 -0.354162606 -0.349913478 85 0.152684490 -0.354162606 86 -0.345664349 0.152684490 87 0.152684490 -0.345664349 88 1.156933619 0.152684490 89 -0.505513906 1.156933619 90 0.156933619 -0.505513906 91 -0.998666810 0.156933619 92 0.663780715 -0.998666810 93 -0.336219285 0.663780715 94 0.152684490 -0.336219285 95 0.650086522 0.152684490 96 0.836287698 0.650086522 97 -0.345664349 0.836287698 98 0.152684490 -0.345664349 99 1.152684490 0.152684490 100 0.317729982 1.152684490 101 0.810882886 0.317729982 102 -0.530918718 0.810882886 103 0.650086522 -0.530918718 104 -0.861009703 0.650086522 105 1.156933619 -0.861009703 106 -1.847315510 1.156933619 107 -0.336219285 -1.847315510 108 -0.349913478 -0.336219285 109 -0.497015649 -0.349913478 110 0.001333190 -0.497015649 111 -0.189117114 0.001333190 112 -0.656865206 -0.189117114 113 0.014080576 -0.656865206 114 0.152684490 0.014080576 115 0.810882886 0.152684490 116 0.810882886 0.810882886 117 0.498735223 0.810882886 118 0.152684490 0.498735223 119 0.494486094 0.152684490 120 0.156933619 0.494486094 121 -0.189117114 0.156933619 122 -1.656865206 -0.189117114 123 -1.189117114 -1.656865206 124 0.962234186 -1.189117114 125 0.343134794 0.962234186 126 1.156933619 0.343134794 127 0.156933619 1.156933619 128 -0.544612911 0.156933619 129 -1.998666810 -0.544612911 130 0.810882886 -1.998666810 131 0.304035790 0.810882886 132 0.645837394 0.304035790 133 0.001333190 0.645837394 134 1.152684490 0.001333190 135 0.001333190 1.152684490 136 -0.037765814 0.001333190 137 -1.994417681 -0.037765814 138 0.663780715 -1.994417681 139 -1.189117114 0.663780715 140 -1.189117114 -1.189117114 141 0.161182747 -1.189117114 142 0.304035790 0.161182747 143 -0.505513906 0.304035790 144 0.152684490 -0.505513906 145 0.832038569 0.152684490 146 -0.656865206 0.832038569 147 -0.340468414 -0.656865206 148 0.810882886 -0.340468414 149 1.152684490 0.810882886 150 1.001333190 1.152684490 151 -1.037765814 1.001333190 152 0.494486094 -1.037765814 153 -0.340468414 0.494486094 154 0.161182747 -0.340468414 155 0.152684490 0.161182747 > 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/7v4ax1290560674.ps",horizontal=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/8v4ax1290560674.ps",horizontal=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/95vr01290560674.ps",horizontal=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/105vr01290560674.ps",horizontal=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/111n791290560674.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/12ueoc1290560674.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/131fl51290560674.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/14u7281290560674.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/15x71w1290560674.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/16thzn1290560674.tab") + } > > try(system("convert tmp/1gcu61290560674.ps tmp/1gcu61290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/2gcu61290560674.ps tmp/2gcu61290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/394b91290560674.ps tmp/394b91290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/494b91290560674.ps tmp/494b91290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/52dtu1290560674.ps tmp/52dtu1290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/62dtu1290560674.ps tmp/62dtu1290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/7v4ax1290560674.ps tmp/7v4ax1290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/8v4ax1290560674.ps tmp/8v4ax1290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/95vr01290560674.ps tmp/95vr01290560674.png",intern=TRUE)) character(0) > try(system("convert tmp/105vr01290560674.ps tmp/105vr01290560674.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.800 1.681 9.214