R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(13 + ,13 + ,14 + ,13 + ,3 + ,2 + ,12 + ,12 + ,8 + ,13 + ,5 + ,1 + ,15 + ,10 + ,12 + ,16 + ,6 + ,0 + ,12 + ,9 + ,7 + ,12 + ,6 + ,3 + ,10 + ,10 + ,10 + ,11 + ,5 + ,3 + ,12 + ,12 + ,7 + ,12 + ,3 + ,1 + ,15 + ,13 + ,16 + ,18 + ,8 + ,3 + ,9 + ,12 + ,11 + ,11 + ,4 + ,1 + ,12 + ,12 + ,14 + ,14 + ,4 + ,4 + ,11 + ,6 + ,6 + ,9 + ,4 + ,0 + ,11 + ,5 + ,16 + ,14 + ,6 + ,3 + ,11 + ,12 + ,11 + ,12 + ,6 + ,2 + ,15 + ,11 + ,16 + ,11 + ,5 + ,4 + ,7 + ,14 + ,12 + ,12 + ,4 + ,3 + ,11 + ,14 + ,7 + ,13 + ,6 + ,1 + ,11 + ,12 + ,13 + ,11 + ,4 + ,1 + ,10 + ,12 + ,11 + ,12 + ,6 + ,2 + ,14 + ,11 + ,15 + ,16 + ,6 + ,3 + ,10 + ,11 + ,7 + ,9 + ,4 + ,1 + ,6 + ,7 + ,9 + ,11 + ,4 + ,1 + ,11 + ,9 + ,7 + ,13 + ,2 + ,2 + ,15 + ,11 + ,14 + ,15 + ,7 + ,3 + ,11 + ,11 + ,15 + ,10 + ,5 + ,4 + ,12 + ,12 + ,7 + ,11 + ,4 + ,2 + ,14 + ,12 + ,15 + ,13 + ,6 + ,1 + ,15 + ,11 + ,17 + ,16 + ,6 + ,2 + ,9 + ,11 + ,15 + ,15 + ,7 + ,2 + ,13 + ,8 + ,14 + ,14 + ,5 + ,4 + ,13 + ,9 + ,14 + ,14 + ,6 + ,2 + ,16 + ,12 + ,8 + ,14 + ,4 + ,3 + ,13 + ,10 + ,8 + ,8 + ,4 + ,3 + ,12 + ,10 + ,14 + ,13 + ,7 + ,3 + ,14 + ,12 + ,14 + ,15 + ,7 + ,4 + ,11 + ,8 + ,8 + ,13 + ,4 + ,2 + ,9 + ,12 + ,11 + ,11 + ,4 + ,2 + ,16 + ,11 + ,16 + ,15 + ,6 + ,4 + ,12 + ,12 + ,10 + ,15 + ,6 + ,3 + ,10 + ,7 + ,8 + ,9 + ,5 + ,4 + ,13 + ,11 + ,14 + ,13 + ,6 + ,2 + ,16 + ,11 + ,16 + ,16 + ,7 + ,5 + ,14 + ,12 + ,13 + ,13 + ,6 + ,3 + ,15 + ,9 + ,5 + ,11 + ,3 + ,1 + ,5 + ,15 + ,8 + ,12 + ,3 + ,1 + ,8 + ,11 + ,10 + ,12 + ,4 + ,1 + ,11 + ,11 + ,8 + ,12 + ,6 + ,2 + ,16 + ,11 + ,13 + ,14 + ,7 + ,3 + ,17 + ,11 + ,15 + ,14 + ,5 + ,9 + ,9 + ,15 + ,6 + ,8 + ,4 + ,0 + ,9 + ,11 + ,12 + ,13 + ,5 + ,0 + ,13 + ,12 + ,16 + ,16 + ,6 + ,2 + ,10 + ,12 + ,5 + ,13 + ,6 + ,2 + ,6 + ,9 + ,15 + ,11 + ,6 + ,3 + ,12 + ,12 + ,12 + ,14 + ,5 + ,1 + ,8 + ,12 + ,8 + ,13 + ,4 + ,2 + ,14 + ,13 + ,13 + ,13 + ,5 + ,0 + ,12 + ,11 + ,14 + ,13 + ,5 + ,5 + ,11 + ,9 + ,12 + ,12 + ,4 + ,2 + ,16 + ,9 + ,16 + ,16 + ,6 + ,4 + ,8 + ,11 + ,10 + ,15 + ,2 + ,3 + ,15 + ,11 + ,15 + ,15 + ,8 + ,0 + ,7 + ,12 + ,8 + ,12 + ,3 + ,0 + ,16 + ,12 + ,16 + ,14 + ,6 + ,4 + ,14 + ,9 + ,19 + ,12 + ,6 + ,1 + ,16 + ,11 + ,14 + ,15 + ,6 + ,1 + ,9 + ,9 + ,6 + ,12 + ,5 + ,4 + ,14 + ,12 + ,13 + ,13 + ,5 + ,2 + ,11 + ,12 + ,15 + ,12 + ,6 + ,4 + ,13 + ,12 + ,7 + ,12 + ,5 + ,1 + ,15 + ,12 + ,13 + ,13 + ,6 + ,4 + ,5 + ,14 + ,4 + ,5 + ,2 + ,2 + ,15 + ,11 + ,14 + ,13 + ,5 + ,5 + ,13 + ,12 + ,13 + ,13 + ,5 + ,4 + ,11 + ,11 + ,11 + ,14 + ,5 + ,4 + ,11 + ,6 + ,14 + ,17 + ,6 + ,4 + ,12 + ,10 + ,12 + ,13 + ,6 + ,4 + ,12 + ,12 + ,15 + ,13 + ,6 + ,3 + ,12 + ,13 + ,14 + ,12 + ,5 + ,3 + ,12 + ,8 + ,13 + ,13 + ,5 + ,3 + ,14 + ,12 + ,8 + ,14 + ,4 + ,2 + ,6 + ,12 + ,6 + ,11 + ,2 + ,1 + ,7 + ,12 + ,7 + ,12 + ,4 + ,1 + ,14 + ,6 + ,13 + ,12 + ,6 + ,5 + ,14 + ,11 + ,13 + ,16 + ,6 + ,4 + ,10 + ,10 + ,11 + ,12 + ,5 + ,2 + ,13 + ,12 + ,5 + ,12 + ,3 + ,3 + ,12 + ,13 + ,12 + ,12 + ,6 + ,2 + ,9 + ,11 + ,8 + ,10 + ,4 + ,2 + ,12 + ,7 + ,11 + ,15 + ,5 + ,2 + ,16 + ,11 + ,14 + ,15 + ,8 + ,2 + ,10 + ,11 + ,9 + ,12 + ,4 + ,3 + ,14 + ,11 + ,10 + ,16 + ,6 + ,2 + ,10 + ,11 + ,13 + ,15 + ,6 + ,3 + ,16 + ,12 + ,16 + ,16 + ,7 + ,4 + ,15 + ,10 + ,16 + ,13 + ,6 + ,3 + ,12 + ,11 + ,11 + ,12 + ,5 + ,3 + ,10 + ,12 + ,8 + ,11 + ,4 + ,0 + ,8 + ,7 + ,4 + ,13 + ,6 + ,1 + ,8 + ,13 + ,7 + ,10 + ,3 + ,2 + ,11 + ,8 + ,14 + ,15 + ,5 + ,2 + ,13 + ,12 + ,11 + ,13 + ,6 + ,3 + ,16 + ,11 + ,17 + ,16 + ,7 + ,4 + ,16 + ,12 + ,15 + ,15 + ,7 + ,4 + ,14 + ,14 + ,17 + ,18 + ,6 + ,1 + ,11 + ,10 + ,5 + ,13 + ,3 + ,2 + ,4 + ,10 + ,4 + ,10 + ,2 + ,2 + ,14 + ,13 + ,10 + ,16 + ,8 + ,3 + ,9 + ,10 + ,11 + ,13 + ,3 + ,3 + ,14 + ,11 + ,15 + ,15 + ,8 + ,3 + ,8 + ,10 + ,10 + ,14 + ,3 + ,1 + ,8 + ,7 + ,9 + ,15 + ,4 + ,1 + ,11 + ,10 + ,12 + ,14 + ,5 + ,1 + ,12 + ,8 + ,15 + ,13 + ,7 + ,1 + ,11 + ,12 + ,7 + ,13 + ,6 + ,0 + ,14 + ,12 + ,13 + ,15 + ,6 + ,1 + ,15 + ,12 + ,12 + ,16 + ,7 + ,3 + ,16 + ,11 + ,14 + ,14 + ,6 + ,3 + ,16 + ,12 + ,14 + ,14 + ,6 + ,0 + ,11 + ,12 + ,8 + ,16 + ,6 + ,2 + ,14 + ,12 + ,15 + ,14 + ,6 + ,5 + ,14 + ,11 + ,12 + ,12 + ,4 + ,2 + ,12 + ,12 + ,12 + ,13 + ,4 + ,3 + ,14 + ,11 + ,16 + ,12 + ,5 + ,3 + ,8 + ,11 + ,9 + ,12 + ,4 + ,5 + ,13 + ,13 + ,15 + ,14 + ,6 + ,4 + ,16 + ,12 + ,15 + ,14 + ,6 + ,4 + ,12 + ,12 + ,6 + ,14 + ,5 + ,0 + ,16 + ,12 + ,14 + ,16 + ,8 + ,3 + ,12 + ,12 + ,15 + ,13 + ,6 + ,0 + ,11 + ,8 + ,10 + ,14 + ,5 + ,2 + ,4 + ,8 + ,6 + ,4 + ,4 + ,0 + ,16 + ,12 + ,14 + ,16 + ,8 + ,6 + ,15 + ,11 + ,12 + ,13 + ,6 + ,3 + ,10 + ,12 + ,8 + ,16 + ,4 + ,1 + ,13 + ,13 + ,11 + ,15 + ,6 + ,6 + ,15 + ,12 + ,13 + ,14 + ,6 + ,2 + ,12 + ,12 + ,9 + ,13 + ,4 + ,1 + ,14 + ,11 + ,15 + ,14 + ,6 + ,3 + ,7 + ,12 + ,13 + ,12 + ,3 + ,1 + ,19 + ,12 + ,15 + ,15 + ,6 + ,2 + ,12 + ,10 + ,14 + ,14 + ,5 + ,4 + ,12 + ,11 + ,16 + ,13 + ,4 + ,1 + ,13 + ,12 + ,14 + ,14 + ,6 + ,2 + ,15 + ,12 + ,14 + ,16 + ,4 + ,0 + ,8 + ,10 + ,10 + ,6 + ,4 + ,5 + ,12 + ,12 + ,10 + ,13 + ,4 + ,2 + ,10 + ,13 + ,4 + ,13 + ,6 + ,1 + ,8 + ,12 + ,8 + ,14 + ,5 + ,1 + ,10 + ,15 + ,15 + ,15 + ,6 + ,4 + ,15 + ,11 + ,16 + ,14 + ,6 + ,3 + ,16 + ,12 + ,12 + ,15 + ,8 + ,0 + ,13 + ,11 + ,12 + ,13 + ,7 + ,3 + ,16 + ,12 + ,15 + ,16 + ,7 + ,3 + ,9 + ,11 + ,9 + ,12 + ,4 + ,0 + ,14 + ,10 + ,12 + ,15 + ,6 + ,2 + ,14 + ,11 + ,14 + ,12 + ,6 + ,5 + ,12 + ,11 + ,11 + ,14 + ,2 + ,2) + ,dim=c(6 + ,156) + ,dimnames=list(c('Popularity' + ,'FindingFriends' + ,'KnowingPeople' + ,'Liked' + ,'Celebrity' + ,'Sum') + ,1:156)) > y <- array(NA,dim=c(6,156),dimnames=list(c('Popularity','FindingFriends','KnowingPeople','Liked','Celebrity','Sum'),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 Popularity FindingFriends KnowingPeople Liked Celebrity Sum 1 13 13 14 13 3 2 2 12 12 8 13 5 1 3 15 10 12 16 6 0 4 12 9 7 12 6 3 5 10 10 10 11 5 3 6 12 12 7 12 3 1 7 15 13 16 18 8 3 8 9 12 11 11 4 1 9 12 12 14 14 4 4 10 11 6 6 9 4 0 11 11 5 16 14 6 3 12 11 12 11 12 6 2 13 15 11 16 11 5 4 14 7 14 12 12 4 3 15 11 14 7 13 6 1 16 11 12 13 11 4 1 17 10 12 11 12 6 2 18 14 11 15 16 6 3 19 10 11 7 9 4 1 20 6 7 9 11 4 1 21 11 9 7 13 2 2 22 15 11 14 15 7 3 23 11 11 15 10 5 4 24 12 12 7 11 4 2 25 14 12 15 13 6 1 26 15 11 17 16 6 2 27 9 11 15 15 7 2 28 13 8 14 14 5 4 29 13 9 14 14 6 2 30 16 12 8 14 4 3 31 13 10 8 8 4 3 32 12 10 14 13 7 3 33 14 12 14 15 7 4 34 11 8 8 13 4 2 35 9 12 11 11 4 2 36 16 11 16 15 6 4 37 12 12 10 15 6 3 38 10 7 8 9 5 4 39 13 11 14 13 6 2 40 16 11 16 16 7 5 41 14 12 13 13 6 3 42 15 9 5 11 3 1 43 5 15 8 12 3 1 44 8 11 10 12 4 1 45 11 11 8 12 6 2 46 16 11 13 14 7 3 47 17 11 15 14 5 9 48 9 15 6 8 4 0 49 9 11 12 13 5 0 50 13 12 16 16 6 2 51 10 12 5 13 6 2 52 6 9 15 11 6 3 53 12 12 12 14 5 1 54 8 12 8 13 4 2 55 14 13 13 13 5 0 56 12 11 14 13 5 5 57 11 9 12 12 4 2 58 16 9 16 16 6 4 59 8 11 10 15 2 3 60 15 11 15 15 8 0 61 7 12 8 12 3 0 62 16 12 16 14 6 4 63 14 9 19 12 6 1 64 16 11 14 15 6 1 65 9 9 6 12 5 4 66 14 12 13 13 5 2 67 11 12 15 12 6 4 68 13 12 7 12 5 1 69 15 12 13 13 6 4 70 5 14 4 5 2 2 71 15 11 14 13 5 5 72 13 12 13 13 5 4 73 11 11 11 14 5 4 74 11 6 14 17 6 4 75 12 10 12 13 6 4 76 12 12 15 13 6 3 77 12 13 14 12 5 3 78 12 8 13 13 5 3 79 14 12 8 14 4 2 80 6 12 6 11 2 1 81 7 12 7 12 4 1 82 14 6 13 12 6 5 83 14 11 13 16 6 4 84 10 10 11 12 5 2 85 13 12 5 12 3 3 86 12 13 12 12 6 2 87 9 11 8 10 4 2 88 12 7 11 15 5 2 89 16 11 14 15 8 2 90 10 11 9 12 4 3 91 14 11 10 16 6 2 92 10 11 13 15 6 3 93 16 12 16 16 7 4 94 15 10 16 13 6 3 95 12 11 11 12 5 3 96 10 12 8 11 4 0 97 8 7 4 13 6 1 98 8 13 7 10 3 2 99 11 8 14 15 5 2 100 13 12 11 13 6 3 101 16 11 17 16 7 4 102 16 12 15 15 7 4 103 14 14 17 18 6 1 104 11 10 5 13 3 2 105 4 10 4 10 2 2 106 14 13 10 16 8 3 107 9 10 11 13 3 3 108 14 11 15 15 8 3 109 8 10 10 14 3 1 110 8 7 9 15 4 1 111 11 10 12 14 5 1 112 12 8 15 13 7 1 113 11 12 7 13 6 0 114 14 12 13 15 6 1 115 15 12 12 16 7 3 116 16 11 14 14 6 3 117 16 12 14 14 6 0 118 11 12 8 16 6 2 119 14 12 15 14 6 5 120 14 11 12 12 4 2 121 12 12 12 13 4 3 122 14 11 16 12 5 3 123 8 11 9 12 4 5 124 13 13 15 14 6 4 125 16 12 15 14 6 4 126 12 12 6 14 5 0 127 16 12 14 16 8 3 128 12 12 15 13 6 0 129 11 8 10 14 5 2 130 4 8 6 4 4 0 131 16 12 14 16 8 6 132 15 11 12 13 6 3 133 10 12 8 16 4 1 134 13 13 11 15 6 6 135 15 12 13 14 6 2 136 12 12 9 13 4 1 137 14 11 15 14 6 3 138 7 12 13 12 3 1 139 19 12 15 15 6 2 140 12 10 14 14 5 4 141 12 11 16 13 4 1 142 13 12 14 14 6 2 143 15 12 14 16 4 0 144 8 10 10 6 4 5 145 12 12 10 13 4 2 146 10 13 4 13 6 1 147 8 12 8 14 5 1 148 10 15 15 15 6 4 149 15 11 16 14 6 3 150 16 12 12 15 8 0 151 13 11 12 13 7 3 152 16 12 15 16 7 3 153 9 11 9 12 4 0 154 14 10 12 15 6 2 155 14 11 14 12 6 5 156 12 11 11 14 2 2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) FindingFriends KnowingPeople Liked Celebrity 0.03428 0.10631 0.21144 0.35765 0.60600 Sum 0.21260 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.37066 -1.21142 0.01483 1.39245 6.98698 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.03428 1.42328 0.024 0.980818 FindingFriends 0.10631 0.09552 1.113 0.267509 KnowingPeople 0.21144 0.06363 3.323 0.001118 ** Liked 0.35765 0.09593 3.728 0.000273 *** Celebrity 0.60600 0.15540 3.900 0.000145 *** Sum 0.21260 0.12003 1.771 0.078554 . --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.091 on 150 degrees of freedom Multiple R-squared: 0.5095, Adjusted R-squared: 0.4931 F-statistic: 31.16 on 5 and 150 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.11304340 0.22608680 0.886956601 [2,] 0.05013383 0.10026766 0.949866172 [3,] 0.07267912 0.14535824 0.927320880 [4,] 0.03629399 0.07258798 0.963706011 [5,] 0.45572322 0.91144644 0.544276780 [6,] 0.76911690 0.46176621 0.230883104 [7,] 0.69084332 0.61831336 0.309156678 [8,] 0.60249265 0.79501471 0.397507353 [9,] 0.54677609 0.90644783 0.453223915 [10,] 0.46048375 0.92096750 0.539516251 [11,] 0.38396188 0.76792377 0.616038115 [12,] 0.68164900 0.63670200 0.318351000 [13,] 0.62248048 0.75503905 0.377519525 [14,] 0.59138436 0.81723128 0.408615640 [15,] 0.52172208 0.95655583 0.478277916 [16,] 0.50547172 0.98905655 0.494528276 [17,] 0.46660037 0.93320075 0.533399626 [18,] 0.40570234 0.81140469 0.594297657 [19,] 0.66565254 0.66869492 0.334347461 [20,] 0.60924066 0.78151868 0.390759341 [21,] 0.54821781 0.90356439 0.451782194 [22,] 0.69672924 0.60654151 0.303270756 [23,] 0.79677970 0.40644061 0.203220305 [24,] 0.75901583 0.48196834 0.240984169 [25,] 0.71263249 0.57473503 0.287367513 [26,] 0.67086218 0.65827564 0.329137821 [27,] 0.66048547 0.67902906 0.339514532 [28,] 0.66208648 0.67582705 0.337913525 [29,] 0.63156704 0.73686592 0.368432960 [30,] 0.58145829 0.83708341 0.418541706 [31,] 0.53426092 0.93147816 0.465739081 [32,] 0.49375292 0.98750584 0.506247079 [33,] 0.46102623 0.92205245 0.538973774 [34,] 0.78697458 0.42605084 0.213025420 [35,] 0.94415076 0.11169847 0.055849236 [36,] 0.95016026 0.09967948 0.049839742 [37,] 0.93608557 0.12782886 0.063914431 [38,] 0.94292614 0.11414773 0.057073863 [39,] 0.94101550 0.11796899 0.058984496 [40,] 0.92861446 0.14277109 0.071385543 [41,] 0.92821674 0.14356651 0.071783255 [42,] 0.91721158 0.16557684 0.082788418 [43,] 0.91100894 0.17798211 0.088991057 [44,] 0.98813680 0.02372640 0.011863199 [45,] 0.98391564 0.03216872 0.016084359 [46,] 0.98911419 0.02177162 0.010885812 [47,] 0.99160499 0.01679001 0.008395007 [48,] 0.98927482 0.02145036 0.010725182 [49,] 0.98551005 0.02897991 0.014489953 [50,] 0.98309982 0.03380035 0.016900175 [51,] 0.98973176 0.02053648 0.010268240 [52,] 0.98791679 0.02416642 0.012083208 [53,] 0.98839547 0.02320905 0.011604527 [54,] 0.98818156 0.02363688 0.011818439 [55,] 0.98619508 0.02760983 0.013804916 [56,] 0.98883872 0.02232257 0.011161283 [57,] 0.98792790 0.02414419 0.012072096 [58,] 0.98704719 0.02590563 0.012952814 [59,] 0.98768991 0.02462018 0.012310091 [60,] 0.99003550 0.01992899 0.009964497 [61,] 0.98933713 0.02132573 0.010662867 [62,] 0.98621897 0.02756207 0.013781034 [63,] 0.98649015 0.02701970 0.013509852 [64,] 0.98204296 0.03591409 0.017957043 [65,] 0.97909896 0.04180208 0.020901039 [66,] 0.98622214 0.02755572 0.013777861 [67,] 0.98208894 0.03582212 0.017911061 [68,] 0.97937542 0.04124916 0.020624580 [69,] 0.97306390 0.05387221 0.026936103 [70,] 0.96481255 0.07037491 0.035187453 [71,] 0.97679718 0.04640564 0.023202822 [72,] 0.97583366 0.04833269 0.024166343 [73,] 0.97969665 0.04060671 0.020303353 [74,] 0.97895084 0.04209831 0.021049156 [75,] 0.97211565 0.05576871 0.027884353 [76,] 0.96615919 0.06768163 0.033840814 [77,] 0.98874936 0.02250128 0.011250639 [78,] 0.98500097 0.02999806 0.014999032 [79,] 0.98008463 0.03983075 0.019915373 [80,] 0.97418620 0.05162760 0.025813798 [81,] 0.96854269 0.06291462 0.031457312 [82,] 0.95970275 0.08059451 0.040297254 [83,] 0.95182776 0.09634448 0.048172242 [84,] 0.97287740 0.05424520 0.027122602 [85,] 0.96483251 0.07033498 0.035167490 [86,] 0.96001348 0.07997303 0.039986516 [87,] 0.94984346 0.10031307 0.050156537 [88,] 0.93770790 0.12458421 0.062292104 [89,] 0.93266633 0.13466734 0.067333671 [90,] 0.91641257 0.16717487 0.083587433 [91,] 0.91116538 0.17766924 0.088834618 [92,] 0.89111134 0.21777733 0.108888663 [93,] 0.86694616 0.26610767 0.133053837 [94,] 0.84385114 0.31229772 0.156148860 [95,] 0.85640740 0.28718520 0.143592601 [96,] 0.89709608 0.20580784 0.102903922 [97,] 0.89919149 0.20161702 0.100808512 [98,] 0.87691450 0.24617100 0.123085499 [99,] 0.85625313 0.28749374 0.143746870 [100,] 0.85173783 0.29652434 0.148262172 [101,] 0.84924068 0.30151865 0.150759324 [102,] 0.87388402 0.25223196 0.126115979 [103,] 0.86209912 0.27580176 0.137900878 [104,] 0.90242470 0.19515061 0.097575304 [105,] 0.87652872 0.24694256 0.123471278 [106,] 0.84869105 0.30261791 0.151308953 [107,] 0.81393019 0.37213963 0.186069813 [108,] 0.81280926 0.37438149 0.187190743 [109,] 0.82538322 0.34923355 0.174616776 [110,] 0.81493250 0.37013499 0.185067497 [111,] 0.77335508 0.45328984 0.226644918 [112,] 0.83456194 0.33087612 0.165438060 [113,] 0.80460573 0.39078854 0.195394272 [114,] 0.77741150 0.44517699 0.222588497 [115,] 0.77577687 0.44844627 0.224223134 [116,] 0.73424285 0.53151431 0.265757154 [117,] 0.73035881 0.53928239 0.269641195 [118,] 0.71378386 0.57243227 0.286216137 [119,] 0.65818546 0.68362908 0.341814541 [120,] 0.62702138 0.74595724 0.372978620 [121,] 0.64415479 0.71169042 0.355845212 [122,] 0.63879873 0.72240254 0.361201270 [123,] 0.57307075 0.85385850 0.426929248 [124,] 0.56002562 0.87994876 0.439974380 [125,] 0.52771348 0.94457304 0.472286522 [126,] 0.46011729 0.92023457 0.539882714 [127,] 0.43375822 0.86751645 0.566241777 [128,] 0.42831495 0.85662991 0.571685045 [129,] 0.35592945 0.71185891 0.644070547 [130,] 0.44005218 0.88010436 0.559947821 [131,] 0.78911606 0.42176788 0.210883938 [132,] 0.81133831 0.37732338 0.188661690 [133,] 0.76831239 0.46337522 0.231687609 [134,] 0.68483084 0.63033833 0.315169164 [135,] 0.64226336 0.71547327 0.357736637 [136,] 0.52794501 0.94410997 0.472054986 [137,] 0.50804577 0.98390846 0.491954232 [138,] 0.67279669 0.65440661 0.327203307 [139,] 0.57144807 0.85710386 0.428551928 > postscript(file="/var/www/html/freestat/rcomp/tmp/1fnww1293194265.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/freestat/rcomp/tmp/2pxvz1293194265.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/freestat/rcomp/tmp/3pxvz1293194265.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/freestat/rcomp/tmp/4pxvz1293194265.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/freestat/rcomp/tmp/5pxvz1293194265.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 = 156 Frequency = 1 1 2 3 4 5 6 1.73086477 1.10642240 2.00690323 0.96323097 -0.81374830 2.88752260 7 8 9 10 11 12 -1.72289501 -1.20659915 -0.55168494 3.41635289 -2.22983677 -0.98885675 13 14 15 16 17 18 2.59868890 -4.41350573 -0.50074843 0.37051518 -1.98885675 -0.37153155 19 20 21 22 23 24 1.46078211 -3.25218578 2.24218937 0.59156089 -0.83221607 2.42657196 25 26 27 28 29 30 1.02031996 0.41818302 -5.40728170 0.26753463 -0.01957301 4.92957231 31 32 33 34 35 36 4.28809652 -1.58682919 -0.72734489 0.92504690 -1.41919939 1.56207756 37 38 39 40 41 42 -1.06297072 0.43075812 0.12546810 0.38582255 1.01800515 6.98697707 43 44 45 46 47 48 -4.64283686 -2.24650296 -0.24822270 2.16065592 2.67417396 0.81725522 49 50 51 52 53 54 -2.42044316 -1.47667968 -1.07785192 -6.37065953 -0.09700113 -2.50017526 55 56 57 58 59 60 2.15550292 -0.90633004 0.33062221 1.41703646 -2.53265484 0.41191620 61 62 63 64 65 66 -2.11132000 1.81342421 0.85111743 2.62276396 -1.43192385 1.83660798 67 68 69 70 71 72 -2.25982858 2.67551742 1.80540491 -0.79379232 2.09366996 0.41140749 73 74 75 76 77 78 -1.41705348 -3.19881344 -0.77054118 -1.40488052 -0.33608845 0.04922989 79 80 81 82 83 84 3.14217256 -1.93737980 -2.71847999 1.58829009 -0.16124612 -1.17024308 85 86 87 88 89 90 3.88520778 -0.30660512 -0.32091315 0.07571697 1.19815855 -0.46026061 91 92 93 94 95 96 0.89828288 -3.59099369 0.49211725 1.59628772 0.51085114 0.64032960 97 98 99 100 101 102 -2.12228114 -0.71607881 -1.66491708 0.44089082 0.38697995 1.06121228 103 104 105 106 107 108 -1.40343773 1.95276692 -3.15683110 -0.73893362 -1.52849034 -1.22588453 109 110 111 112 113 114 -2.24949921 -2.68279453 -0.88439005 -1.16046046 -0.07553711 0.72790126 115 116 117 118 119 120 0.55048884 2.55521567 3.08671085 -1.78513699 -0.18773319 3.11801113 121 122 123 124 125 126 0.44145316 1.45363696 -2.88546109 -1.08143849 2.02486705 1.38425613 127 128 129 130 131 132 0.52160058 -0.76707980 -0.46149354 -2.00799725 -0.11620015 2.33575353 133 134 135 136 137 138 -1.36053158 -1.01851982 1.87295320 1.50098215 0.34377283 -3.38113442 139 140 141 142 143 144 5.09241534 -0.94507645 0.12718784 -0.33848963 2.58341165 -0.84468526 145 146 147 148 149 150 1.07693907 -0.76011438 -3.25122979 -4.65170176 1.13232999 1.93993916 151 152 153 154 155 156 -0.27024906 0.91616033 -0.82245988 0.93935493 0.84531956 1.82615476 > postscript(file="/var/www/html/freestat/rcomp/tmp/6ioc21293194265.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 1.73086477 NA 1 1.10642240 1.73086477 2 2.00690323 1.10642240 3 0.96323097 2.00690323 4 -0.81374830 0.96323097 5 2.88752260 -0.81374830 6 -1.72289501 2.88752260 7 -1.20659915 -1.72289501 8 -0.55168494 -1.20659915 9 3.41635289 -0.55168494 10 -2.22983677 3.41635289 11 -0.98885675 -2.22983677 12 2.59868890 -0.98885675 13 -4.41350573 2.59868890 14 -0.50074843 -4.41350573 15 0.37051518 -0.50074843 16 -1.98885675 0.37051518 17 -0.37153155 -1.98885675 18 1.46078211 -0.37153155 19 -3.25218578 1.46078211 20 2.24218937 -3.25218578 21 0.59156089 2.24218937 22 -0.83221607 0.59156089 23 2.42657196 -0.83221607 24 1.02031996 2.42657196 25 0.41818302 1.02031996 26 -5.40728170 0.41818302 27 0.26753463 -5.40728170 28 -0.01957301 0.26753463 29 4.92957231 -0.01957301 30 4.28809652 4.92957231 31 -1.58682919 4.28809652 32 -0.72734489 -1.58682919 33 0.92504690 -0.72734489 34 -1.41919939 0.92504690 35 1.56207756 -1.41919939 36 -1.06297072 1.56207756 37 0.43075812 -1.06297072 38 0.12546810 0.43075812 39 0.38582255 0.12546810 40 1.01800515 0.38582255 41 6.98697707 1.01800515 42 -4.64283686 6.98697707 43 -2.24650296 -4.64283686 44 -0.24822270 -2.24650296 45 2.16065592 -0.24822270 46 2.67417396 2.16065592 47 0.81725522 2.67417396 48 -2.42044316 0.81725522 49 -1.47667968 -2.42044316 50 -1.07785192 -1.47667968 51 -6.37065953 -1.07785192 52 -0.09700113 -6.37065953 53 -2.50017526 -0.09700113 54 2.15550292 -2.50017526 55 -0.90633004 2.15550292 56 0.33062221 -0.90633004 57 1.41703646 0.33062221 58 -2.53265484 1.41703646 59 0.41191620 -2.53265484 60 -2.11132000 0.41191620 61 1.81342421 -2.11132000 62 0.85111743 1.81342421 63 2.62276396 0.85111743 64 -1.43192385 2.62276396 65 1.83660798 -1.43192385 66 -2.25982858 1.83660798 67 2.67551742 -2.25982858 68 1.80540491 2.67551742 69 -0.79379232 1.80540491 70 2.09366996 -0.79379232 71 0.41140749 2.09366996 72 -1.41705348 0.41140749 73 -3.19881344 -1.41705348 74 -0.77054118 -3.19881344 75 -1.40488052 -0.77054118 76 -0.33608845 -1.40488052 77 0.04922989 -0.33608845 78 3.14217256 0.04922989 79 -1.93737980 3.14217256 80 -2.71847999 -1.93737980 81 1.58829009 -2.71847999 82 -0.16124612 1.58829009 83 -1.17024308 -0.16124612 84 3.88520778 -1.17024308 85 -0.30660512 3.88520778 86 -0.32091315 -0.30660512 87 0.07571697 -0.32091315 88 1.19815855 0.07571697 89 -0.46026061 1.19815855 90 0.89828288 -0.46026061 91 -3.59099369 0.89828288 92 0.49211725 -3.59099369 93 1.59628772 0.49211725 94 0.51085114 1.59628772 95 0.64032960 0.51085114 96 -2.12228114 0.64032960 97 -0.71607881 -2.12228114 98 -1.66491708 -0.71607881 99 0.44089082 -1.66491708 100 0.38697995 0.44089082 101 1.06121228 0.38697995 102 -1.40343773 1.06121228 103 1.95276692 -1.40343773 104 -3.15683110 1.95276692 105 -0.73893362 -3.15683110 106 -1.52849034 -0.73893362 107 -1.22588453 -1.52849034 108 -2.24949921 -1.22588453 109 -2.68279453 -2.24949921 110 -0.88439005 -2.68279453 111 -1.16046046 -0.88439005 112 -0.07553711 -1.16046046 113 0.72790126 -0.07553711 114 0.55048884 0.72790126 115 2.55521567 0.55048884 116 3.08671085 2.55521567 117 -1.78513699 3.08671085 118 -0.18773319 -1.78513699 119 3.11801113 -0.18773319 120 0.44145316 3.11801113 121 1.45363696 0.44145316 122 -2.88546109 1.45363696 123 -1.08143849 -2.88546109 124 2.02486705 -1.08143849 125 1.38425613 2.02486705 126 0.52160058 1.38425613 127 -0.76707980 0.52160058 128 -0.46149354 -0.76707980 129 -2.00799725 -0.46149354 130 -0.11620015 -2.00799725 131 2.33575353 -0.11620015 132 -1.36053158 2.33575353 133 -1.01851982 -1.36053158 134 1.87295320 -1.01851982 135 1.50098215 1.87295320 136 0.34377283 1.50098215 137 -3.38113442 0.34377283 138 5.09241534 -3.38113442 139 -0.94507645 5.09241534 140 0.12718784 -0.94507645 141 -0.33848963 0.12718784 142 2.58341165 -0.33848963 143 -0.84468526 2.58341165 144 1.07693907 -0.84468526 145 -0.76011438 1.07693907 146 -3.25122979 -0.76011438 147 -4.65170176 -3.25122979 148 1.13232999 -4.65170176 149 1.93993916 1.13232999 150 -0.27024906 1.93993916 151 0.91616033 -0.27024906 152 -0.82245988 0.91616033 153 0.93935493 -0.82245988 154 0.84531956 0.93935493 155 1.82615476 0.84531956 156 NA 1.82615476 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.10642240 1.73086477 [2,] 2.00690323 1.10642240 [3,] 0.96323097 2.00690323 [4,] -0.81374830 0.96323097 [5,] 2.88752260 -0.81374830 [6,] -1.72289501 2.88752260 [7,] -1.20659915 -1.72289501 [8,] -0.55168494 -1.20659915 [9,] 3.41635289 -0.55168494 [10,] -2.22983677 3.41635289 [11,] -0.98885675 -2.22983677 [12,] 2.59868890 -0.98885675 [13,] -4.41350573 2.59868890 [14,] -0.50074843 -4.41350573 [15,] 0.37051518 -0.50074843 [16,] -1.98885675 0.37051518 [17,] -0.37153155 -1.98885675 [18,] 1.46078211 -0.37153155 [19,] -3.25218578 1.46078211 [20,] 2.24218937 -3.25218578 [21,] 0.59156089 2.24218937 [22,] -0.83221607 0.59156089 [23,] 2.42657196 -0.83221607 [24,] 1.02031996 2.42657196 [25,] 0.41818302 1.02031996 [26,] -5.40728170 0.41818302 [27,] 0.26753463 -5.40728170 [28,] -0.01957301 0.26753463 [29,] 4.92957231 -0.01957301 [30,] 4.28809652 4.92957231 [31,] -1.58682919 4.28809652 [32,] -0.72734489 -1.58682919 [33,] 0.92504690 -0.72734489 [34,] -1.41919939 0.92504690 [35,] 1.56207756 -1.41919939 [36,] -1.06297072 1.56207756 [37,] 0.43075812 -1.06297072 [38,] 0.12546810 0.43075812 [39,] 0.38582255 0.12546810 [40,] 1.01800515 0.38582255 [41,] 6.98697707 1.01800515 [42,] -4.64283686 6.98697707 [43,] -2.24650296 -4.64283686 [44,] -0.24822270 -2.24650296 [45,] 2.16065592 -0.24822270 [46,] 2.67417396 2.16065592 [47,] 0.81725522 2.67417396 [48,] -2.42044316 0.81725522 [49,] -1.47667968 -2.42044316 [50,] -1.07785192 -1.47667968 [51,] -6.37065953 -1.07785192 [52,] -0.09700113 -6.37065953 [53,] -2.50017526 -0.09700113 [54,] 2.15550292 -2.50017526 [55,] -0.90633004 2.15550292 [56,] 0.33062221 -0.90633004 [57,] 1.41703646 0.33062221 [58,] -2.53265484 1.41703646 [59,] 0.41191620 -2.53265484 [60,] -2.11132000 0.41191620 [61,] 1.81342421 -2.11132000 [62,] 0.85111743 1.81342421 [63,] 2.62276396 0.85111743 [64,] -1.43192385 2.62276396 [65,] 1.83660798 -1.43192385 [66,] -2.25982858 1.83660798 [67,] 2.67551742 -2.25982858 [68,] 1.80540491 2.67551742 [69,] -0.79379232 1.80540491 [70,] 2.09366996 -0.79379232 [71,] 0.41140749 2.09366996 [72,] -1.41705348 0.41140749 [73,] -3.19881344 -1.41705348 [74,] -0.77054118 -3.19881344 [75,] -1.40488052 -0.77054118 [76,] -0.33608845 -1.40488052 [77,] 0.04922989 -0.33608845 [78,] 3.14217256 0.04922989 [79,] -1.93737980 3.14217256 [80,] -2.71847999 -1.93737980 [81,] 1.58829009 -2.71847999 [82,] -0.16124612 1.58829009 [83,] -1.17024308 -0.16124612 [84,] 3.88520778 -1.17024308 [85,] -0.30660512 3.88520778 [86,] -0.32091315 -0.30660512 [87,] 0.07571697 -0.32091315 [88,] 1.19815855 0.07571697 [89,] -0.46026061 1.19815855 [90,] 0.89828288 -0.46026061 [91,] -3.59099369 0.89828288 [92,] 0.49211725 -3.59099369 [93,] 1.59628772 0.49211725 [94,] 0.51085114 1.59628772 [95,] 0.64032960 0.51085114 [96,] -2.12228114 0.64032960 [97,] -0.71607881 -2.12228114 [98,] -1.66491708 -0.71607881 [99,] 0.44089082 -1.66491708 [100,] 0.38697995 0.44089082 [101,] 1.06121228 0.38697995 [102,] -1.40343773 1.06121228 [103,] 1.95276692 -1.40343773 [104,] -3.15683110 1.95276692 [105,] -0.73893362 -3.15683110 [106,] -1.52849034 -0.73893362 [107,] -1.22588453 -1.52849034 [108,] -2.24949921 -1.22588453 [109,] -2.68279453 -2.24949921 [110,] -0.88439005 -2.68279453 [111,] -1.16046046 -0.88439005 [112,] -0.07553711 -1.16046046 [113,] 0.72790126 -0.07553711 [114,] 0.55048884 0.72790126 [115,] 2.55521567 0.55048884 [116,] 3.08671085 2.55521567 [117,] -1.78513699 3.08671085 [118,] -0.18773319 -1.78513699 [119,] 3.11801113 -0.18773319 [120,] 0.44145316 3.11801113 [121,] 1.45363696 0.44145316 [122,] -2.88546109 1.45363696 [123,] -1.08143849 -2.88546109 [124,] 2.02486705 -1.08143849 [125,] 1.38425613 2.02486705 [126,] 0.52160058 1.38425613 [127,] -0.76707980 0.52160058 [128,] -0.46149354 -0.76707980 [129,] -2.00799725 -0.46149354 [130,] -0.11620015 -2.00799725 [131,] 2.33575353 -0.11620015 [132,] -1.36053158 2.33575353 [133,] -1.01851982 -1.36053158 [134,] 1.87295320 -1.01851982 [135,] 1.50098215 1.87295320 [136,] 0.34377283 1.50098215 [137,] -3.38113442 0.34377283 [138,] 5.09241534 -3.38113442 [139,] -0.94507645 5.09241534 [140,] 0.12718784 -0.94507645 [141,] -0.33848963 0.12718784 [142,] 2.58341165 -0.33848963 [143,] -0.84468526 2.58341165 [144,] 1.07693907 -0.84468526 [145,] -0.76011438 1.07693907 [146,] -3.25122979 -0.76011438 [147,] -4.65170176 -3.25122979 [148,] 1.13232999 -4.65170176 [149,] 1.93993916 1.13232999 [150,] -0.27024906 1.93993916 [151,] 0.91616033 -0.27024906 [152,] -0.82245988 0.91616033 [153,] 0.93935493 -0.82245988 [154,] 0.84531956 0.93935493 [155,] 1.82615476 0.84531956 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.10642240 1.73086477 2 2.00690323 1.10642240 3 0.96323097 2.00690323 4 -0.81374830 0.96323097 5 2.88752260 -0.81374830 6 -1.72289501 2.88752260 7 -1.20659915 -1.72289501 8 -0.55168494 -1.20659915 9 3.41635289 -0.55168494 10 -2.22983677 3.41635289 11 -0.98885675 -2.22983677 12 2.59868890 -0.98885675 13 -4.41350573 2.59868890 14 -0.50074843 -4.41350573 15 0.37051518 -0.50074843 16 -1.98885675 0.37051518 17 -0.37153155 -1.98885675 18 1.46078211 -0.37153155 19 -3.25218578 1.46078211 20 2.24218937 -3.25218578 21 0.59156089 2.24218937 22 -0.83221607 0.59156089 23 2.42657196 -0.83221607 24 1.02031996 2.42657196 25 0.41818302 1.02031996 26 -5.40728170 0.41818302 27 0.26753463 -5.40728170 28 -0.01957301 0.26753463 29 4.92957231 -0.01957301 30 4.28809652 4.92957231 31 -1.58682919 4.28809652 32 -0.72734489 -1.58682919 33 0.92504690 -0.72734489 34 -1.41919939 0.92504690 35 1.56207756 -1.41919939 36 -1.06297072 1.56207756 37 0.43075812 -1.06297072 38 0.12546810 0.43075812 39 0.38582255 0.12546810 40 1.01800515 0.38582255 41 6.98697707 1.01800515 42 -4.64283686 6.98697707 43 -2.24650296 -4.64283686 44 -0.24822270 -2.24650296 45 2.16065592 -0.24822270 46 2.67417396 2.16065592 47 0.81725522 2.67417396 48 -2.42044316 0.81725522 49 -1.47667968 -2.42044316 50 -1.07785192 -1.47667968 51 -6.37065953 -1.07785192 52 -0.09700113 -6.37065953 53 -2.50017526 -0.09700113 54 2.15550292 -2.50017526 55 -0.90633004 2.15550292 56 0.33062221 -0.90633004 57 1.41703646 0.33062221 58 -2.53265484 1.41703646 59 0.41191620 -2.53265484 60 -2.11132000 0.41191620 61 1.81342421 -2.11132000 62 0.85111743 1.81342421 63 2.62276396 0.85111743 64 -1.43192385 2.62276396 65 1.83660798 -1.43192385 66 -2.25982858 1.83660798 67 2.67551742 -2.25982858 68 1.80540491 2.67551742 69 -0.79379232 1.80540491 70 2.09366996 -0.79379232 71 0.41140749 2.09366996 72 -1.41705348 0.41140749 73 -3.19881344 -1.41705348 74 -0.77054118 -3.19881344 75 -1.40488052 -0.77054118 76 -0.33608845 -1.40488052 77 0.04922989 -0.33608845 78 3.14217256 0.04922989 79 -1.93737980 3.14217256 80 -2.71847999 -1.93737980 81 1.58829009 -2.71847999 82 -0.16124612 1.58829009 83 -1.17024308 -0.16124612 84 3.88520778 -1.17024308 85 -0.30660512 3.88520778 86 -0.32091315 -0.30660512 87 0.07571697 -0.32091315 88 1.19815855 0.07571697 89 -0.46026061 1.19815855 90 0.89828288 -0.46026061 91 -3.59099369 0.89828288 92 0.49211725 -3.59099369 93 1.59628772 0.49211725 94 0.51085114 1.59628772 95 0.64032960 0.51085114 96 -2.12228114 0.64032960 97 -0.71607881 -2.12228114 98 -1.66491708 -0.71607881 99 0.44089082 -1.66491708 100 0.38697995 0.44089082 101 1.06121228 0.38697995 102 -1.40343773 1.06121228 103 1.95276692 -1.40343773 104 -3.15683110 1.95276692 105 -0.73893362 -3.15683110 106 -1.52849034 -0.73893362 107 -1.22588453 -1.52849034 108 -2.24949921 -1.22588453 109 -2.68279453 -2.24949921 110 -0.88439005 -2.68279453 111 -1.16046046 -0.88439005 112 -0.07553711 -1.16046046 113 0.72790126 -0.07553711 114 0.55048884 0.72790126 115 2.55521567 0.55048884 116 3.08671085 2.55521567 117 -1.78513699 3.08671085 118 -0.18773319 -1.78513699 119 3.11801113 -0.18773319 120 0.44145316 3.11801113 121 1.45363696 0.44145316 122 -2.88546109 1.45363696 123 -1.08143849 -2.88546109 124 2.02486705 -1.08143849 125 1.38425613 2.02486705 126 0.52160058 1.38425613 127 -0.76707980 0.52160058 128 -0.46149354 -0.76707980 129 -2.00799725 -0.46149354 130 -0.11620015 -2.00799725 131 2.33575353 -0.11620015 132 -1.36053158 2.33575353 133 -1.01851982 -1.36053158 134 1.87295320 -1.01851982 135 1.50098215 1.87295320 136 0.34377283 1.50098215 137 -3.38113442 0.34377283 138 5.09241534 -3.38113442 139 -0.94507645 5.09241534 140 0.12718784 -0.94507645 141 -0.33848963 0.12718784 142 2.58341165 -0.33848963 143 -0.84468526 2.58341165 144 1.07693907 -0.84468526 145 -0.76011438 1.07693907 146 -3.25122979 -0.76011438 147 -4.65170176 -3.25122979 148 1.13232999 -4.65170176 149 1.93993916 1.13232999 150 -0.27024906 1.93993916 151 0.91616033 -0.27024906 152 -0.82245988 0.91616033 153 0.93935493 -0.82245988 154 0.84531956 0.93935493 155 1.82615476 0.84531956 > 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/freestat/rcomp/tmp/7bxt51293194265.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/freestat/rcomp/tmp/8bxt51293194265.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/freestat/rcomp/tmp/937tq1293194265.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/freestat/rcomp/tmp/1037tq1293194265.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11p7rw1293194265.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/freestat/rcomp/tmp/12s88k1293194265.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/freestat/rcomp/tmp/13h9nd1293194265.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/freestat/rcomp/tmp/14si4y1293194265.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/freestat/rcomp/tmp/15d0341293194265.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/freestat/rcomp/tmp/16rs0v1293194265.tab") + } > > try(system("convert tmp/1fnww1293194265.ps tmp/1fnww1293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/2pxvz1293194265.ps tmp/2pxvz1293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/3pxvz1293194265.ps tmp/3pxvz1293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/4pxvz1293194265.ps tmp/4pxvz1293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/5pxvz1293194265.ps tmp/5pxvz1293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/6ioc21293194265.ps tmp/6ioc21293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/7bxt51293194265.ps tmp/7bxt51293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/8bxt51293194265.ps tmp/8bxt51293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/937tq1293194265.ps tmp/937tq1293194265.png",intern=TRUE)) character(0) > try(system("convert tmp/1037tq1293194265.ps tmp/1037tq1293194265.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.637 2.682 5.981