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(13 + ,13 + ,14 + ,13 + ,3 + ,1 + ,12 + ,12 + ,8 + ,13 + ,5 + ,1 + ,15 + ,10 + ,12 + ,16 + ,6 + ,1 + ,12 + ,9 + ,7 + ,12 + ,6 + ,1 + ,10 + ,10 + ,10 + ,11 + ,5 + ,1 + ,12 + ,12 + ,7 + ,12 + ,3 + ,1 + ,15 + ,13 + ,16 + ,18 + ,8 + ,1 + ,9 + ,12 + ,11 + ,11 + ,4 + ,1 + ,12 + ,12 + ,14 + ,14 + ,4 + ,1 + ,11 + ,6 + ,6 + ,9 + ,4 + ,1 + ,11 + ,5 + ,16 + ,14 + ,6 + ,1 + ,11 + ,12 + ,11 + ,12 + ,6 + ,1 + ,15 + ,11 + ,16 + ,11 + ,5 + ,1 + ,7 + ,14 + ,12 + ,12 + ,4 + ,1 + ,11 + ,14 + ,7 + ,13 + ,6 + ,1 + ,11 + ,12 + ,13 + ,11 + ,4 + ,1 + ,10 + ,12 + ,11 + ,12 + ,6 + ,1 + ,14 + ,11 + ,15 + ,16 + ,6 + ,1 + ,10 + ,11 + ,7 + ,9 + ,4 + ,2 + ,6 + ,7 + ,9 + ,11 + ,4 + ,2 + ,11 + ,9 + ,7 + ,13 + ,2 + ,2 + ,15 + ,11 + ,14 + ,15 + ,7 + ,2 + ,11 + ,11 + ,15 + ,10 + ,5 + ,2 + ,12 + ,12 + ,7 + ,11 + ,4 + ,2 + ,14 + ,12 + ,15 + ,13 + ,6 + ,2 + ,15 + ,11 + ,17 + ,16 + ,6 + ,2 + ,9 + ,11 + ,15 + ,15 + ,7 + ,2 + ,13 + ,8 + ,14 + ,14 + ,5 + ,2 + ,13 + ,9 + ,14 + ,14 + ,6 + ,2 + ,16 + ,12 + ,8 + ,14 + ,4 + ,2 + ,13 + ,10 + ,8 + ,8 + ,4 + ,2 + ,12 + ,10 + ,14 + ,13 + ,7 + ,2 + ,14 + ,12 + ,14 + ,15 + ,7 + ,2 + ,11 + ,8 + ,8 + ,13 + ,4 + ,3 + ,9 + ,12 + ,11 + ,11 + ,4 + ,3 + ,16 + ,11 + ,16 + ,15 + ,6 + ,3 + ,12 + ,12 + ,10 + ,15 + ,6 + ,3 + ,10 + ,7 + ,8 + ,9 + ,5 + ,3 + ,13 + ,11 + ,14 + ,13 + ,6 + ,3 + ,16 + ,11 + ,16 + ,16 + ,7 + ,3 + ,14 + ,12 + ,13 + ,13 + ,6 + ,3 + ,15 + ,9 + ,5 + ,11 + ,3 + ,3 + ,5 + ,15 + ,8 + ,12 + ,3 + ,3 + ,8 + ,11 + ,10 + ,12 + ,4 + ,3 + ,11 + ,11 + ,8 + ,12 + ,6 + ,3 + ,16 + ,11 + ,13 + ,14 + ,7 + ,3 + ,17 + ,11 + ,15 + ,14 + ,5 + ,3 + ,9 + ,15 + ,6 + ,8 + ,4 + ,3 + ,9 + ,11 + ,12 + ,13 + ,5 + ,3 + ,13 + ,12 + ,16 + ,16 + ,6 + ,3 + ,10 + ,12 + ,5 + ,13 + ,6 + ,3 + ,6 + ,9 + ,15 + ,11 + ,6 + ,4 + ,12 + ,12 + ,12 + ,14 + ,5 + ,4 + ,8 + ,12 + ,8 + ,13 + ,4 + ,4 + ,14 + ,13 + ,13 + ,13 + ,5 + ,4 + ,12 + ,11 + ,14 + ,13 + ,5 + ,4 + ,11 + ,9 + ,12 + ,12 + ,4 + ,4 + ,16 + ,9 + ,16 + ,16 + ,6 + ,4 + ,8 + ,11 + ,10 + ,15 + ,2 + ,4 + ,15 + ,11 + ,15 + ,15 + ,8 + ,4 + ,7 + ,12 + ,8 + ,12 + ,3 + ,4 + ,16 + ,12 + ,16 + ,14 + ,6 + ,4 + ,14 + ,9 + ,19 + ,12 + ,6 + ,4 + ,16 + ,11 + ,14 + ,15 + ,6 + ,4 + ,9 + ,9 + ,6 + ,12 + ,5 + ,4 + ,14 + ,12 + ,13 + ,13 + ,5 + ,4 + ,11 + ,12 + ,15 + ,12 + ,6 + ,4 + ,13 + ,12 + ,7 + ,12 + ,5 + ,4 + ,15 + ,12 + ,13 + ,13 + ,6 + ,5 + ,5 + ,14 + ,4 + ,5 + ,2 + ,5 + ,15 + ,11 + ,14 + ,13 + ,5 + ,5 + ,13 + ,12 + ,13 + ,13 + ,5 + ,5 + ,11 + ,11 + ,11 + ,14 + ,5 + ,5 + ,11 + ,6 + ,14 + ,17 + ,6 + ,5 + ,12 + ,10 + ,12 + ,13 + ,6 + ,5 + ,12 + ,12 + ,15 + ,13 + ,6 + ,5 + ,12 + ,13 + ,14 + ,12 + ,5 + ,5 + ,12 + ,8 + ,13 + ,13 + ,5 + ,5 + ,14 + ,12 + ,8 + ,14 + ,4 + ,5 + ,6 + ,12 + ,6 + ,11 + ,2 + ,5 + ,7 + ,12 + ,7 + ,12 + ,4 + ,5 + ,14 + ,6 + ,13 + ,12 + ,6 + ,5 + ,14 + ,11 + ,13 + ,16 + ,6 + ,5 + ,10 + ,10 + ,11 + ,12 + ,5 + ,5 + ,13 + ,12 + ,5 + ,12 + ,3 + ,5 + ,12 + ,13 + ,12 + ,12 + ,6 + ,5 + ,9 + ,11 + ,8 + ,10 + ,4 + ,6 + ,12 + ,7 + ,11 + ,15 + ,5 + ,6 + ,16 + ,11 + ,14 + ,15 + ,8 + ,6 + ,10 + ,11 + ,9 + ,12 + ,4 + ,6 + ,14 + ,11 + ,10 + ,16 + ,6 + ,6 + ,10 + ,11 + ,13 + ,15 + ,6 + ,6 + ,16 + ,12 + ,16 + ,16 + ,7 + ,6 + ,15 + ,10 + ,16 + ,13 + ,6 + ,6 + ,12 + ,11 + ,11 + ,12 + ,5 + ,6 + ,10 + ,12 + ,8 + ,11 + ,4 + ,6 + ,8 + ,7 + ,4 + ,13 + ,6 + ,6 + ,8 + ,13 + ,7 + ,10 + ,3 + ,6 + ,11 + ,8 + ,14 + ,15 + ,5 + ,6 + ,13 + ,12 + ,11 + ,13 + ,6 + ,6 + ,16 + ,11 + ,17 + ,16 + ,7 + ,6 + ,16 + ,12 + ,15 + ,15 + ,7 + ,6 + ,14 + ,14 + ,17 + ,18 + ,6 + ,6 + ,11 + ,10 + ,5 + ,13 + ,3 + ,6 + ,4 + ,10 + ,4 + ,10 + ,2 + ,6 + ,14 + ,13 + ,10 + ,16 + ,8 + ,6 + ,9 + ,10 + ,11 + ,13 + ,3 + ,7 + ,14 + ,11 + ,15 + ,15 + ,8 + ,7 + ,8 + ,10 + ,10 + ,14 + ,3 + ,7 + ,8 + ,7 + ,9 + ,15 + ,4 + ,7 + ,11 + ,10 + ,12 + ,14 + ,5 + ,7 + ,12 + ,8 + ,15 + ,13 + ,7 + ,7 + ,11 + ,12 + ,7 + ,13 + ,6 + ,7 + ,14 + ,12 + ,13 + ,15 + ,6 + ,7 + ,15 + ,12 + ,12 + ,16 + ,7 + ,7 + ,16 + ,11 + ,14 + ,14 + ,6 + ,7 + ,16 + ,12 + ,14 + ,14 + ,6 + ,7 + ,11 + ,12 + ,8 + ,16 + ,6 + ,7 + ,14 + ,12 + ,15 + ,14 + ,6 + ,7 + ,14 + ,11 + ,12 + ,12 + ,4 + ,7 + ,12 + ,12 + ,12 + ,13 + ,4 + ,7 + ,14 + ,11 + ,16 + ,12 + ,5 + ,7 + ,8 + ,11 + ,9 + ,12 + ,4 + ,7 + ,13 + ,13 + ,15 + ,14 + ,6 + ,7 + ,16 + ,12 + ,15 + ,14 + ,6 + ,7 + ,12 + ,12 + ,6 + ,14 + ,5 + ,7 + ,16 + ,12 + ,14 + ,16 + ,8 + ,7 + ,12 + ,12 + ,15 + ,13 + ,6 + ,7 + ,11 + ,8 + ,10 + ,14 + ,5 + ,7 + ,4 + ,8 + ,6 + ,4 + ,4 + ,7 + ,16 + ,12 + ,14 + ,16 + ,8 + ,7 + ,15 + ,11 + ,12 + ,13 + ,6 + ,7 + ,10 + ,12 + ,8 + ,16 + ,4 + ,7 + ,13 + ,13 + ,11 + ,15 + ,6 + ,7 + ,15 + ,12 + ,13 + ,14 + ,6 + ,7 + ,12 + ,12 + ,9 + ,13 + ,4 + ,7 + ,14 + ,11 + ,15 + ,14 + ,6 + ,7 + ,7 + ,12 + ,13 + ,12 + ,3 + ,8 + ,19 + ,12 + ,15 + ,15 + ,6 + ,8 + ,12 + ,10 + ,14 + ,14 + ,5 + ,8 + ,12 + ,11 + ,16 + ,13 + ,4 + ,8 + ,13 + ,12 + ,14 + ,14 + ,6 + ,8 + ,15 + ,12 + ,14 + ,16 + ,4 + ,8 + ,8 + ,10 + ,10 + ,6 + ,4 + ,8 + ,12 + ,12 + ,10 + ,13 + ,4 + ,8 + ,10 + ,13 + ,4 + ,13 + ,6 + ,8 + ,8 + ,12 + ,8 + ,14 + ,5 + ,8 + ,10 + ,15 + ,15 + ,15 + ,6 + ,8 + ,15 + ,11 + ,16 + ,14 + ,6 + ,8 + ,16 + ,12 + ,12 + ,15 + ,8 + ,9 + ,13 + ,11 + ,12 + ,13 + ,7 + ,10 + ,16 + ,12 + ,15 + ,16 + ,7 + ,10 + ,9 + ,11 + ,9 + ,12 + ,4 + ,14 + ,14 + ,10 + ,12 + ,15 + ,6 + ,14 + ,14 + ,11 + ,14 + ,12 + ,6 + ,14 + ,12 + ,11 + ,11 + ,14 + ,2 + ,14) + ,dim=c(6 + ,156) + ,dimnames=list(c('Popularity' + ,'FindingFriends' + ,'KnowingPeople' + ,'Liked' + ,'Celebrity' + ,'Date') + ,1:156)) > y <- array(NA,dim=c(6,156),dimnames=list(c('Popularity','FindingFriends','KnowingPeople','Liked','Celebrity','Date'),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 = '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 Date t 1 13 13 14 13 3 1 1 2 12 12 8 13 5 1 2 3 15 10 12 16 6 1 3 4 12 9 7 12 6 1 4 5 10 10 10 11 5 1 5 6 12 12 7 12 3 1 6 7 15 13 16 18 8 1 7 8 9 12 11 11 4 1 8 9 12 12 14 14 4 1 9 10 11 6 6 9 4 1 10 11 11 5 16 14 6 1 11 12 11 12 11 12 6 1 12 13 15 11 16 11 5 1 13 14 7 14 12 12 4 1 14 15 11 14 7 13 6 1 15 16 11 12 13 11 4 1 16 17 10 12 11 12 6 1 17 18 14 11 15 16 6 1 18 19 10 11 7 9 4 2 19 20 6 7 9 11 4 2 20 21 11 9 7 13 2 2 21 22 15 11 14 15 7 2 22 23 11 11 15 10 5 2 23 24 12 12 7 11 4 2 24 25 14 12 15 13 6 2 25 26 15 11 17 16 6 2 26 27 9 11 15 15 7 2 27 28 13 8 14 14 5 2 28 29 13 9 14 14 6 2 29 30 16 12 8 14 4 2 30 31 13 10 8 8 4 2 31 32 12 10 14 13 7 2 32 33 14 12 14 15 7 2 33 34 11 8 8 13 4 3 34 35 9 12 11 11 4 3 35 36 16 11 16 15 6 3 36 37 12 12 10 15 6 3 37 38 10 7 8 9 5 3 38 39 13 11 14 13 6 3 39 40 16 11 16 16 7 3 40 41 14 12 13 13 6 3 41 42 15 9 5 11 3 3 42 43 5 15 8 12 3 3 43 44 8 11 10 12 4 3 44 45 11 11 8 12 6 3 45 46 16 11 13 14 7 3 46 47 17 11 15 14 5 3 47 48 9 15 6 8 4 3 48 49 9 11 12 13 5 3 49 50 13 12 16 16 6 3 50 51 10 12 5 13 6 3 51 52 6 9 15 11 6 4 52 53 12 12 12 14 5 4 53 54 8 12 8 13 4 4 54 55 14 13 13 13 5 4 55 56 12 11 14 13 5 4 56 57 11 9 12 12 4 4 57 58 16 9 16 16 6 4 58 59 8 11 10 15 2 4 59 60 15 11 15 15 8 4 60 61 7 12 8 12 3 4 61 62 16 12 16 14 6 4 62 63 14 9 19 12 6 4 63 64 16 11 14 15 6 4 64 65 9 9 6 12 5 4 65 66 14 12 13 13 5 4 66 67 11 12 15 12 6 4 67 68 13 12 7 12 5 4 68 69 15 12 13 13 6 5 69 70 5 14 4 5 2 5 70 71 15 11 14 13 5 5 71 72 13 12 13 13 5 5 72 73 11 11 11 14 5 5 73 74 11 6 14 17 6 5 74 75 12 10 12 13 6 5 75 76 12 12 15 13 6 5 76 77 12 13 14 12 5 5 77 78 12 8 13 13 5 5 78 79 14 12 8 14 4 5 79 80 6 12 6 11 2 5 80 81 7 12 7 12 4 5 81 82 14 6 13 12 6 5 82 83 14 11 13 16 6 5 83 84 10 10 11 12 5 5 84 85 13 12 5 12 3 5 85 86 12 13 12 12 6 5 86 87 9 11 8 10 4 6 87 88 12 7 11 15 5 6 88 89 16 11 14 15 8 6 89 90 10 11 9 12 4 6 90 91 14 11 10 16 6 6 91 92 10 11 13 15 6 6 92 93 16 12 16 16 7 6 93 94 15 10 16 13 6 6 94 95 12 11 11 12 5 6 95 96 10 12 8 11 4 6 96 97 8 7 4 13 6 6 97 98 8 13 7 10 3 6 98 99 11 8 14 15 5 6 99 100 13 12 11 13 6 6 100 101 16 11 17 16 7 6 101 102 16 12 15 15 7 6 102 103 14 14 17 18 6 6 103 104 11 10 5 13 3 6 104 105 4 10 4 10 2 6 105 106 14 13 10 16 8 6 106 107 9 10 11 13 3 7 107 108 14 11 15 15 8 7 108 109 8 10 10 14 3 7 109 110 8 7 9 15 4 7 110 111 11 10 12 14 5 7 111 112 12 8 15 13 7 7 112 113 11 12 7 13 6 7 113 114 14 12 13 15 6 7 114 115 15 12 12 16 7 7 115 116 16 11 14 14 6 7 116 117 16 12 14 14 6 7 117 118 11 12 8 16 6 7 118 119 14 12 15 14 6 7 119 120 14 11 12 12 4 7 120 121 12 12 12 13 4 7 121 122 14 11 16 12 5 7 122 123 8 11 9 12 4 7 123 124 13 13 15 14 6 7 124 125 16 12 15 14 6 7 125 126 12 12 6 14 5 7 126 127 16 12 14 16 8 7 127 128 12 12 15 13 6 7 128 129 11 8 10 14 5 7 129 130 4 8 6 4 4 7 130 131 16 12 14 16 8 7 131 132 15 11 12 13 6 7 132 133 10 12 8 16 4 7 133 134 13 13 11 15 6 7 134 135 15 12 13 14 6 7 135 136 12 12 9 13 4 7 136 137 14 11 15 14 6 7 137 138 7 12 13 12 3 8 138 139 19 12 15 15 6 8 139 140 12 10 14 14 5 8 140 141 12 11 16 13 4 8 141 142 13 12 14 14 6 8 142 143 15 12 14 16 4 8 143 144 8 10 10 6 4 8 144 145 12 12 10 13 4 8 145 146 10 13 4 13 6 8 146 147 8 12 8 14 5 8 147 148 10 15 15 15 6 8 148 149 15 11 16 14 6 8 149 150 16 12 12 15 8 9 150 151 13 11 12 13 7 10 151 152 16 12 15 16 7 10 152 153 9 11 9 12 4 14 153 154 14 10 12 15 6 14 154 155 14 11 14 12 6 14 155 156 12 11 11 14 2 14 156 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) FindingFriends KnowingPeople Liked Celebrity 0.184728 0.102459 0.241835 0.349829 0.637259 Date t 0.098801 -0.006413 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.46780 -1.29639 -0.05226 1.27491 6.89700 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.184728 1.456114 0.127 0.899219 FindingFriends 0.102459 0.097707 1.049 0.296043 KnowingPeople 0.241835 0.061846 3.910 0.000140 *** Liked 0.349829 0.097950 3.571 0.000478 *** Celebrity 0.637259 0.158123 4.030 8.86e-05 *** Date 0.098801 0.196706 0.502 0.616215 t -0.006413 0.011948 -0.537 0.592247 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.118 on 149 degrees of freedom Multiple R-squared: 0.5002, Adjusted R-squared: 0.48 F-statistic: 24.85 on 6 and 149 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.07385393 0.147707868 0.926146066 [2,] 0.11141217 0.222824337 0.888587831 [3,] 0.07345787 0.146915748 0.926542126 [4,] 0.54882735 0.902345309 0.451172655 [5,] 0.71869921 0.562601583 0.281300791 [6,] 0.65209041 0.695819175 0.347909588 [7,] 0.57611249 0.847775016 0.423887508 [8,] 0.48920417 0.978408337 0.510795831 [9,] 0.45187949 0.903758985 0.548120507 [10,] 0.36600042 0.732000833 0.633999583 [11,] 0.51003874 0.979922519 0.489961259 [12,] 0.51642667 0.967146651 0.483573325 [13,] 0.54584659 0.908306828 0.454153414 [14,] 0.47236154 0.944723072 0.527638464 [15,] 0.47794543 0.955890863 0.522054568 [16,] 0.43473137 0.869462732 0.565268634 [17,] 0.37438615 0.748772302 0.625613849 [18,] 0.62007360 0.759852804 0.379926402 [19,] 0.57495464 0.850090714 0.425045357 [20,] 0.51976054 0.960478927 0.480239464 [21,] 0.71176397 0.576472060 0.288236030 [22,] 0.81257060 0.374858803 0.187429401 [23,] 0.77682572 0.446348566 0.223174283 [24,] 0.73078310 0.538433810 0.269216905 [25,] 0.69786199 0.604276028 0.302138014 [26,] 0.69575087 0.608498257 0.304249128 [27,] 0.70844533 0.583109343 0.291554671 [28,] 0.67539471 0.649210588 0.324605294 [29,] 0.62633492 0.747330166 0.373665083 [30,] 0.57289741 0.854205177 0.427102589 [31,] 0.54355096 0.912898070 0.456449035 [32,] 0.50209156 0.995816882 0.497908441 [33,] 0.75752882 0.484942369 0.242471184 [34,] 0.95630705 0.087385905 0.043692952 [35,] 0.96668342 0.066633158 0.033316579 [36,] 0.95629027 0.087419452 0.043709726 [37,] 0.96122545 0.077549106 0.038774553 [38,] 0.98065098 0.038698035 0.019349018 [39,] 0.97421653 0.051566949 0.025783475 [40,] 0.98213664 0.035726717 0.017863358 [41,] 0.97921015 0.041579698 0.020789849 [42,] 0.97446675 0.051066508 0.025533254 [43,] 0.99759746 0.004805077 0.002402539 [44,] 0.99653455 0.006930891 0.003465446 [45,] 0.99712135 0.005757308 0.002878654 [46,] 0.99710451 0.005790972 0.002895486 [47,] 0.99591307 0.008173859 0.004086930 [48,] 0.99422923 0.011541532 0.005770766 [49,] 0.99356498 0.012870039 0.006435019 [50,] 0.99514768 0.009704646 0.004852323 [51,] 0.99366228 0.012675447 0.006337723 [52,] 0.99448678 0.011026439 0.005513219 [53,] 0.99504169 0.009916624 0.004958312 [54,] 0.99335491 0.013290179 0.006645090 [55,] 0.99371541 0.012569188 0.006284594 [56,] 0.99207410 0.015851797 0.007925899 [57,] 0.99123301 0.017533973 0.008766987 [58,] 0.99119366 0.017612689 0.008806345 [59,] 0.99240860 0.015182793 0.007591397 [60,] 0.99262299 0.014754022 0.007377011 [61,] 0.99003546 0.019929081 0.009964541 [62,] 0.99151234 0.016975311 0.008487655 [63,] 0.98874471 0.022510576 0.011255288 [64,] 0.98587554 0.028248929 0.014124464 [65,] 0.98968395 0.020632092 0.010316046 [66,] 0.98606498 0.027870031 0.013935015 [67,] 0.98381401 0.032371979 0.016185989 [68,] 0.97875723 0.042485539 0.021242769 [69,] 0.97189841 0.056203173 0.028101587 [70,] 0.98192884 0.036142321 0.018071160 [71,] 0.98117119 0.037657622 0.018828811 [72,] 0.98446562 0.031068762 0.015534381 [73,] 0.98553158 0.028936839 0.014468419 [74,] 0.98054811 0.038903774 0.019451887 [75,] 0.97602519 0.047949610 0.023974805 [76,] 0.99361474 0.012770514 0.006385257 [77,] 0.99118616 0.017627683 0.008813842 [78,] 0.98793741 0.024125173 0.012062587 [79,] 0.98416877 0.031662456 0.015831228 [80,] 0.98026700 0.039466009 0.019733005 [81,] 0.97393345 0.052133108 0.026066554 [82,] 0.96894738 0.062105247 0.031052623 [83,] 0.98148321 0.037033587 0.018516793 [84,] 0.97607710 0.047845802 0.023922901 [85,] 0.97282461 0.054350782 0.027175391 [86,] 0.96597904 0.068041929 0.034020964 [87,] 0.95754400 0.084912006 0.042456003 [88,] 0.95359737 0.092805260 0.046402630 [89,] 0.94102872 0.117942566 0.058971283 [90,] 0.93533203 0.129335932 0.064667966 [91,] 0.92149837 0.157003253 0.078501627 [92,] 0.90266029 0.194679421 0.097339710 [93,] 0.88868717 0.222625662 0.111312831 [94,] 0.89189046 0.216219075 0.108109538 [95,] 0.92892920 0.142141590 0.071070795 [96,] 0.92545692 0.149086167 0.074543084 [97,] 0.90562530 0.188749399 0.094374700 [98,] 0.88523091 0.229538181 0.114769090 [99,] 0.87954822 0.240903568 0.120451784 [100,] 0.87697145 0.246057103 0.123028552 [101,] 0.89671471 0.206570590 0.103285295 [102,] 0.88881883 0.222362336 0.111181168 [103,] 0.92652960 0.146940795 0.073470397 [104,] 0.90486601 0.190267983 0.095133991 [105,] 0.88276184 0.234476319 0.117238159 [106,] 0.85657865 0.286842696 0.143421348 [107,] 0.84736048 0.305279035 0.152639517 [108,] 0.84516007 0.309679864 0.154839932 [109,] 0.84621391 0.307572190 0.153786095 [110,] 0.81404065 0.371918694 0.185959347 [111,] 0.85132102 0.297357960 0.148678980 [112,] 0.81899052 0.362018968 0.181009484 [113,] 0.79045237 0.419095266 0.209547633 [114,] 0.78251078 0.434978438 0.217489219 [115,] 0.74670636 0.506587288 0.253293644 [116,] 0.73413091 0.531738181 0.265869091 [117,] 0.71539815 0.569203696 0.284601848 [118,] 0.65721142 0.685577167 0.342788584 [119,] 0.62927898 0.741442030 0.370721015 [120,] 0.63626513 0.727469742 0.363734871 [121,] 0.64008455 0.719830891 0.359915445 [122,] 0.59454615 0.810907707 0.405453853 [123,] 0.55310335 0.893793301 0.446896650 [124,] 0.54369990 0.912600197 0.456300098 [125,] 0.47134678 0.942693566 0.528653217 [126,] 0.41431560 0.828631191 0.585684404 [127,] 0.39370284 0.787405671 0.606297164 [128,] 0.32079045 0.641580902 0.679209549 [129,] 0.41161517 0.823230338 0.588384831 [130,] 0.77136457 0.457270857 0.228635429 [131,] 0.76377510 0.472449798 0.236224899 [132,] 0.70961141 0.580777182 0.290388591 [133,] 0.62334924 0.753301519 0.376650760 [134,] 0.55995156 0.880096890 0.440048445 [135,] 0.43466229 0.869324572 0.565337714 [136,] 0.69958066 0.600838689 0.300419344 [137,] 0.84924859 0.301502825 0.150751412 > postscript(file="/var/www/html/rcomp/tmp/1ea041290276880.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/2ea041290276880.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/371zp1290276880.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/471zp1290276880.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/571zp1290276880.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 1.54567249 0.83103819 1.38828198 1.10564515 -0.72881948 2.72287163 7 8 9 10 11 12 -1.83496131 -1.51907532 -0.28765467 3.01733797 -2.31580620 -1.11777154 13 14 15 16 17 18 2.76901080 -4.27718083 -0.68593807 0.04855561 -2.08570793 -0.34349239 19 20 21 22 23 24 1.22212161 -3.54495806 2.31506904 0.53776241 -0.67399881 2.45206912 25 26 27 28 29 30 0.54962268 0.12533768 -5.67200941 0.50796261 -0.22534284 5.19922425 31 32 33 34 35 36 4.50952636 -1.59599426 -0.49415655 0.88573854 -1.54353351 1.68232807 37 38 39 40 41 42 -0.96270553 0.77590345 -0.11510571 0.72089111 1.03709625 6.89700415 43 44 45 46 47 48 -4.78667151 -2.49135325 -0.27578819 2.18453093 3.98179131 0.49111808 49 50 51 52 53 54 -2.93004835 -1.68018132 -0.96409306 -6.46780158 -0.45548583 -2.49464353 55 56 57 58 59 60 1.56287386 -0.46763102 0.21445826 1.57969636 -2.26893052 -0.29525053 61 62 63 64 65 66 -2.46266661 1.99762769 0.28556805 2.24675432 -0.92048663 1.73587273 67 68 69 70 71 72 -2.02881608 2.54953936 2.01905078 -0.65526965 2.52975897 0.67554821 73 74 75 76 77 78 -1.08173788 -2.97528192 -0.49571962 -1.41973102 -0.28685393 0.12386021 79 80 81 82 83 84 3.21704510 -1.96886701 -2.82863684 2.06699827 0.16180204 -1.20908183 85 86 87 88 89 90 4.31794418 -0.38272782 -0.32868069 -0.02434083 0.93495215 -0.25093514 91 92 93 94 95 96 0.83980926 -3.52945572 0.66190393 1.55997953 0.66019835 0.27674631 97 98 99 100 101 102 -2.21138037 -0.58396388 -1.78176608 0.60271519 0.57382920 1.31128247 103 104 105 106 107 108 -1.78312002 2.19607429 -2.86893251 -0.54343625 -1.33450099 -1.28384240 109 110 111 112 113 114 -2.42966870 -2.86113165 -1.17503264 -1.61389831 -0.44537854 0.41036441 115 116 117 118 119 120 0.67152471 2.63364193 2.53759574 -1.70463613 0.30858575 3.11713940 121 122 123 124 125 126 0.67126461 1.52536385 -2.13811614 -0.76180955 2.34706209 1.16725296 127 128 129 130 131 132 0.62754726 -1.28387115 -0.37101493 -2.26171529 0.65319815 2.56974496 133 134 135 136 137 138 -1.33392677 -0.08016918 1.89486018 1.49296175 0.52647368 -3.57326753 139 140 141 142 143 144 4.98821076 -0.57153540 -0.16416460 -0.40088705 2.18038701 -0.14265477 145 146 147 148 149 150 1.21003997 -0.70951216 -3.28055158 -4.26145148 1.26279007 1.41093763 151 152 153 154 155 156 -0.24207515 0.88688659 -1.63734046 0.42202058 0.89178930 1.47308818 > postscript(file="/var/www/html/rcomp/tmp/60sys1290276880.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 1.54567249 NA 1 0.83103819 1.54567249 2 1.38828198 0.83103819 3 1.10564515 1.38828198 4 -0.72881948 1.10564515 5 2.72287163 -0.72881948 6 -1.83496131 2.72287163 7 -1.51907532 -1.83496131 8 -0.28765467 -1.51907532 9 3.01733797 -0.28765467 10 -2.31580620 3.01733797 11 -1.11777154 -2.31580620 12 2.76901080 -1.11777154 13 -4.27718083 2.76901080 14 -0.68593807 -4.27718083 15 0.04855561 -0.68593807 16 -2.08570793 0.04855561 17 -0.34349239 -2.08570793 18 1.22212161 -0.34349239 19 -3.54495806 1.22212161 20 2.31506904 -3.54495806 21 0.53776241 2.31506904 22 -0.67399881 0.53776241 23 2.45206912 -0.67399881 24 0.54962268 2.45206912 25 0.12533768 0.54962268 26 -5.67200941 0.12533768 27 0.50796261 -5.67200941 28 -0.22534284 0.50796261 29 5.19922425 -0.22534284 30 4.50952636 5.19922425 31 -1.59599426 4.50952636 32 -0.49415655 -1.59599426 33 0.88573854 -0.49415655 34 -1.54353351 0.88573854 35 1.68232807 -1.54353351 36 -0.96270553 1.68232807 37 0.77590345 -0.96270553 38 -0.11510571 0.77590345 39 0.72089111 -0.11510571 40 1.03709625 0.72089111 41 6.89700415 1.03709625 42 -4.78667151 6.89700415 43 -2.49135325 -4.78667151 44 -0.27578819 -2.49135325 45 2.18453093 -0.27578819 46 3.98179131 2.18453093 47 0.49111808 3.98179131 48 -2.93004835 0.49111808 49 -1.68018132 -2.93004835 50 -0.96409306 -1.68018132 51 -6.46780158 -0.96409306 52 -0.45548583 -6.46780158 53 -2.49464353 -0.45548583 54 1.56287386 -2.49464353 55 -0.46763102 1.56287386 56 0.21445826 -0.46763102 57 1.57969636 0.21445826 58 -2.26893052 1.57969636 59 -0.29525053 -2.26893052 60 -2.46266661 -0.29525053 61 1.99762769 -2.46266661 62 0.28556805 1.99762769 63 2.24675432 0.28556805 64 -0.92048663 2.24675432 65 1.73587273 -0.92048663 66 -2.02881608 1.73587273 67 2.54953936 -2.02881608 68 2.01905078 2.54953936 69 -0.65526965 2.01905078 70 2.52975897 -0.65526965 71 0.67554821 2.52975897 72 -1.08173788 0.67554821 73 -2.97528192 -1.08173788 74 -0.49571962 -2.97528192 75 -1.41973102 -0.49571962 76 -0.28685393 -1.41973102 77 0.12386021 -0.28685393 78 3.21704510 0.12386021 79 -1.96886701 3.21704510 80 -2.82863684 -1.96886701 81 2.06699827 -2.82863684 82 0.16180204 2.06699827 83 -1.20908183 0.16180204 84 4.31794418 -1.20908183 85 -0.38272782 4.31794418 86 -0.32868069 -0.38272782 87 -0.02434083 -0.32868069 88 0.93495215 -0.02434083 89 -0.25093514 0.93495215 90 0.83980926 -0.25093514 91 -3.52945572 0.83980926 92 0.66190393 -3.52945572 93 1.55997953 0.66190393 94 0.66019835 1.55997953 95 0.27674631 0.66019835 96 -2.21138037 0.27674631 97 -0.58396388 -2.21138037 98 -1.78176608 -0.58396388 99 0.60271519 -1.78176608 100 0.57382920 0.60271519 101 1.31128247 0.57382920 102 -1.78312002 1.31128247 103 2.19607429 -1.78312002 104 -2.86893251 2.19607429 105 -0.54343625 -2.86893251 106 -1.33450099 -0.54343625 107 -1.28384240 -1.33450099 108 -2.42966870 -1.28384240 109 -2.86113165 -2.42966870 110 -1.17503264 -2.86113165 111 -1.61389831 -1.17503264 112 -0.44537854 -1.61389831 113 0.41036441 -0.44537854 114 0.67152471 0.41036441 115 2.63364193 0.67152471 116 2.53759574 2.63364193 117 -1.70463613 2.53759574 118 0.30858575 -1.70463613 119 3.11713940 0.30858575 120 0.67126461 3.11713940 121 1.52536385 0.67126461 122 -2.13811614 1.52536385 123 -0.76180955 -2.13811614 124 2.34706209 -0.76180955 125 1.16725296 2.34706209 126 0.62754726 1.16725296 127 -1.28387115 0.62754726 128 -0.37101493 -1.28387115 129 -2.26171529 -0.37101493 130 0.65319815 -2.26171529 131 2.56974496 0.65319815 132 -1.33392677 2.56974496 133 -0.08016918 -1.33392677 134 1.89486018 -0.08016918 135 1.49296175 1.89486018 136 0.52647368 1.49296175 137 -3.57326753 0.52647368 138 4.98821076 -3.57326753 139 -0.57153540 4.98821076 140 -0.16416460 -0.57153540 141 -0.40088705 -0.16416460 142 2.18038701 -0.40088705 143 -0.14265477 2.18038701 144 1.21003997 -0.14265477 145 -0.70951216 1.21003997 146 -3.28055158 -0.70951216 147 -4.26145148 -3.28055158 148 1.26279007 -4.26145148 149 1.41093763 1.26279007 150 -0.24207515 1.41093763 151 0.88688659 -0.24207515 152 -1.63734046 0.88688659 153 0.42202058 -1.63734046 154 0.89178930 0.42202058 155 1.47308818 0.89178930 156 NA 1.47308818 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.83103819 1.54567249 [2,] 1.38828198 0.83103819 [3,] 1.10564515 1.38828198 [4,] -0.72881948 1.10564515 [5,] 2.72287163 -0.72881948 [6,] -1.83496131 2.72287163 [7,] -1.51907532 -1.83496131 [8,] -0.28765467 -1.51907532 [9,] 3.01733797 -0.28765467 [10,] -2.31580620 3.01733797 [11,] -1.11777154 -2.31580620 [12,] 2.76901080 -1.11777154 [13,] -4.27718083 2.76901080 [14,] -0.68593807 -4.27718083 [15,] 0.04855561 -0.68593807 [16,] -2.08570793 0.04855561 [17,] -0.34349239 -2.08570793 [18,] 1.22212161 -0.34349239 [19,] -3.54495806 1.22212161 [20,] 2.31506904 -3.54495806 [21,] 0.53776241 2.31506904 [22,] -0.67399881 0.53776241 [23,] 2.45206912 -0.67399881 [24,] 0.54962268 2.45206912 [25,] 0.12533768 0.54962268 [26,] -5.67200941 0.12533768 [27,] 0.50796261 -5.67200941 [28,] -0.22534284 0.50796261 [29,] 5.19922425 -0.22534284 [30,] 4.50952636 5.19922425 [31,] -1.59599426 4.50952636 [32,] -0.49415655 -1.59599426 [33,] 0.88573854 -0.49415655 [34,] -1.54353351 0.88573854 [35,] 1.68232807 -1.54353351 [36,] -0.96270553 1.68232807 [37,] 0.77590345 -0.96270553 [38,] -0.11510571 0.77590345 [39,] 0.72089111 -0.11510571 [40,] 1.03709625 0.72089111 [41,] 6.89700415 1.03709625 [42,] -4.78667151 6.89700415 [43,] -2.49135325 -4.78667151 [44,] -0.27578819 -2.49135325 [45,] 2.18453093 -0.27578819 [46,] 3.98179131 2.18453093 [47,] 0.49111808 3.98179131 [48,] -2.93004835 0.49111808 [49,] -1.68018132 -2.93004835 [50,] -0.96409306 -1.68018132 [51,] -6.46780158 -0.96409306 [52,] -0.45548583 -6.46780158 [53,] -2.49464353 -0.45548583 [54,] 1.56287386 -2.49464353 [55,] -0.46763102 1.56287386 [56,] 0.21445826 -0.46763102 [57,] 1.57969636 0.21445826 [58,] -2.26893052 1.57969636 [59,] -0.29525053 -2.26893052 [60,] -2.46266661 -0.29525053 [61,] 1.99762769 -2.46266661 [62,] 0.28556805 1.99762769 [63,] 2.24675432 0.28556805 [64,] -0.92048663 2.24675432 [65,] 1.73587273 -0.92048663 [66,] -2.02881608 1.73587273 [67,] 2.54953936 -2.02881608 [68,] 2.01905078 2.54953936 [69,] -0.65526965 2.01905078 [70,] 2.52975897 -0.65526965 [71,] 0.67554821 2.52975897 [72,] -1.08173788 0.67554821 [73,] -2.97528192 -1.08173788 [74,] -0.49571962 -2.97528192 [75,] -1.41973102 -0.49571962 [76,] -0.28685393 -1.41973102 [77,] 0.12386021 -0.28685393 [78,] 3.21704510 0.12386021 [79,] -1.96886701 3.21704510 [80,] -2.82863684 -1.96886701 [81,] 2.06699827 -2.82863684 [82,] 0.16180204 2.06699827 [83,] -1.20908183 0.16180204 [84,] 4.31794418 -1.20908183 [85,] -0.38272782 4.31794418 [86,] -0.32868069 -0.38272782 [87,] -0.02434083 -0.32868069 [88,] 0.93495215 -0.02434083 [89,] -0.25093514 0.93495215 [90,] 0.83980926 -0.25093514 [91,] -3.52945572 0.83980926 [92,] 0.66190393 -3.52945572 [93,] 1.55997953 0.66190393 [94,] 0.66019835 1.55997953 [95,] 0.27674631 0.66019835 [96,] -2.21138037 0.27674631 [97,] -0.58396388 -2.21138037 [98,] -1.78176608 -0.58396388 [99,] 0.60271519 -1.78176608 [100,] 0.57382920 0.60271519 [101,] 1.31128247 0.57382920 [102,] -1.78312002 1.31128247 [103,] 2.19607429 -1.78312002 [104,] -2.86893251 2.19607429 [105,] -0.54343625 -2.86893251 [106,] -1.33450099 -0.54343625 [107,] -1.28384240 -1.33450099 [108,] -2.42966870 -1.28384240 [109,] -2.86113165 -2.42966870 [110,] -1.17503264 -2.86113165 [111,] -1.61389831 -1.17503264 [112,] -0.44537854 -1.61389831 [113,] 0.41036441 -0.44537854 [114,] 0.67152471 0.41036441 [115,] 2.63364193 0.67152471 [116,] 2.53759574 2.63364193 [117,] -1.70463613 2.53759574 [118,] 0.30858575 -1.70463613 [119,] 3.11713940 0.30858575 [120,] 0.67126461 3.11713940 [121,] 1.52536385 0.67126461 [122,] -2.13811614 1.52536385 [123,] -0.76180955 -2.13811614 [124,] 2.34706209 -0.76180955 [125,] 1.16725296 2.34706209 [126,] 0.62754726 1.16725296 [127,] -1.28387115 0.62754726 [128,] -0.37101493 -1.28387115 [129,] -2.26171529 -0.37101493 [130,] 0.65319815 -2.26171529 [131,] 2.56974496 0.65319815 [132,] -1.33392677 2.56974496 [133,] -0.08016918 -1.33392677 [134,] 1.89486018 -0.08016918 [135,] 1.49296175 1.89486018 [136,] 0.52647368 1.49296175 [137,] -3.57326753 0.52647368 [138,] 4.98821076 -3.57326753 [139,] -0.57153540 4.98821076 [140,] -0.16416460 -0.57153540 [141,] -0.40088705 -0.16416460 [142,] 2.18038701 -0.40088705 [143,] -0.14265477 2.18038701 [144,] 1.21003997 -0.14265477 [145,] -0.70951216 1.21003997 [146,] -3.28055158 -0.70951216 [147,] -4.26145148 -3.28055158 [148,] 1.26279007 -4.26145148 [149,] 1.41093763 1.26279007 [150,] -0.24207515 1.41093763 [151,] 0.88688659 -0.24207515 [152,] -1.63734046 0.88688659 [153,] 0.42202058 -1.63734046 [154,] 0.89178930 0.42202058 [155,] 1.47308818 0.89178930 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.83103819 1.54567249 2 1.38828198 0.83103819 3 1.10564515 1.38828198 4 -0.72881948 1.10564515 5 2.72287163 -0.72881948 6 -1.83496131 2.72287163 7 -1.51907532 -1.83496131 8 -0.28765467 -1.51907532 9 3.01733797 -0.28765467 10 -2.31580620 3.01733797 11 -1.11777154 -2.31580620 12 2.76901080 -1.11777154 13 -4.27718083 2.76901080 14 -0.68593807 -4.27718083 15 0.04855561 -0.68593807 16 -2.08570793 0.04855561 17 -0.34349239 -2.08570793 18 1.22212161 -0.34349239 19 -3.54495806 1.22212161 20 2.31506904 -3.54495806 21 0.53776241 2.31506904 22 -0.67399881 0.53776241 23 2.45206912 -0.67399881 24 0.54962268 2.45206912 25 0.12533768 0.54962268 26 -5.67200941 0.12533768 27 0.50796261 -5.67200941 28 -0.22534284 0.50796261 29 5.19922425 -0.22534284 30 4.50952636 5.19922425 31 -1.59599426 4.50952636 32 -0.49415655 -1.59599426 33 0.88573854 -0.49415655 34 -1.54353351 0.88573854 35 1.68232807 -1.54353351 36 -0.96270553 1.68232807 37 0.77590345 -0.96270553 38 -0.11510571 0.77590345 39 0.72089111 -0.11510571 40 1.03709625 0.72089111 41 6.89700415 1.03709625 42 -4.78667151 6.89700415 43 -2.49135325 -4.78667151 44 -0.27578819 -2.49135325 45 2.18453093 -0.27578819 46 3.98179131 2.18453093 47 0.49111808 3.98179131 48 -2.93004835 0.49111808 49 -1.68018132 -2.93004835 50 -0.96409306 -1.68018132 51 -6.46780158 -0.96409306 52 -0.45548583 -6.46780158 53 -2.49464353 -0.45548583 54 1.56287386 -2.49464353 55 -0.46763102 1.56287386 56 0.21445826 -0.46763102 57 1.57969636 0.21445826 58 -2.26893052 1.57969636 59 -0.29525053 -2.26893052 60 -2.46266661 -0.29525053 61 1.99762769 -2.46266661 62 0.28556805 1.99762769 63 2.24675432 0.28556805 64 -0.92048663 2.24675432 65 1.73587273 -0.92048663 66 -2.02881608 1.73587273 67 2.54953936 -2.02881608 68 2.01905078 2.54953936 69 -0.65526965 2.01905078 70 2.52975897 -0.65526965 71 0.67554821 2.52975897 72 -1.08173788 0.67554821 73 -2.97528192 -1.08173788 74 -0.49571962 -2.97528192 75 -1.41973102 -0.49571962 76 -0.28685393 -1.41973102 77 0.12386021 -0.28685393 78 3.21704510 0.12386021 79 -1.96886701 3.21704510 80 -2.82863684 -1.96886701 81 2.06699827 -2.82863684 82 0.16180204 2.06699827 83 -1.20908183 0.16180204 84 4.31794418 -1.20908183 85 -0.38272782 4.31794418 86 -0.32868069 -0.38272782 87 -0.02434083 -0.32868069 88 0.93495215 -0.02434083 89 -0.25093514 0.93495215 90 0.83980926 -0.25093514 91 -3.52945572 0.83980926 92 0.66190393 -3.52945572 93 1.55997953 0.66190393 94 0.66019835 1.55997953 95 0.27674631 0.66019835 96 -2.21138037 0.27674631 97 -0.58396388 -2.21138037 98 -1.78176608 -0.58396388 99 0.60271519 -1.78176608 100 0.57382920 0.60271519 101 1.31128247 0.57382920 102 -1.78312002 1.31128247 103 2.19607429 -1.78312002 104 -2.86893251 2.19607429 105 -0.54343625 -2.86893251 106 -1.33450099 -0.54343625 107 -1.28384240 -1.33450099 108 -2.42966870 -1.28384240 109 -2.86113165 -2.42966870 110 -1.17503264 -2.86113165 111 -1.61389831 -1.17503264 112 -0.44537854 -1.61389831 113 0.41036441 -0.44537854 114 0.67152471 0.41036441 115 2.63364193 0.67152471 116 2.53759574 2.63364193 117 -1.70463613 2.53759574 118 0.30858575 -1.70463613 119 3.11713940 0.30858575 120 0.67126461 3.11713940 121 1.52536385 0.67126461 122 -2.13811614 1.52536385 123 -0.76180955 -2.13811614 124 2.34706209 -0.76180955 125 1.16725296 2.34706209 126 0.62754726 1.16725296 127 -1.28387115 0.62754726 128 -0.37101493 -1.28387115 129 -2.26171529 -0.37101493 130 0.65319815 -2.26171529 131 2.56974496 0.65319815 132 -1.33392677 2.56974496 133 -0.08016918 -1.33392677 134 1.89486018 -0.08016918 135 1.49296175 1.89486018 136 0.52647368 1.49296175 137 -3.57326753 0.52647368 138 4.98821076 -3.57326753 139 -0.57153540 4.98821076 140 -0.16416460 -0.57153540 141 -0.40088705 -0.16416460 142 2.18038701 -0.40088705 143 -0.14265477 2.18038701 144 1.21003997 -0.14265477 145 -0.70951216 1.21003997 146 -3.28055158 -0.70951216 147 -4.26145148 -3.28055158 148 1.26279007 -4.26145148 149 1.41093763 1.26279007 150 -0.24207515 1.41093763 151 0.88688659 -0.24207515 152 -1.63734046 0.88688659 153 0.42202058 -1.63734046 154 0.89178930 0.42202058 155 1.47308818 0.89178930 > 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/7akfd1290276880.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/8akfd1290276880.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/9akfd1290276880.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/103tfg1290276880.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/11obvl1290276880.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/12auc91290276880.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/13gd931290276880.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/14rm8o1290276880.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/15cn6u1290276880.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/16rxml1290276880.tab") + } > > try(system("convert tmp/1ea041290276880.ps tmp/1ea041290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/2ea041290276880.ps tmp/2ea041290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/371zp1290276880.ps tmp/371zp1290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/471zp1290276880.ps tmp/471zp1290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/571zp1290276880.ps tmp/571zp1290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/60sys1290276880.ps tmp/60sys1290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/7akfd1290276880.ps tmp/7akfd1290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/8akfd1290276880.ps tmp/8akfd1290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/9akfd1290276880.ps tmp/9akfd1290276880.png",intern=TRUE)) character(0) > try(system("convert tmp/103tfg1290276880.ps tmp/103tfg1290276880.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.973 1.776 8.979