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(0 + ,1 + ,23 + ,14 + ,11 + ,12 + ,24 + ,26 + ,1 + ,1 + ,25 + ,11 + ,7 + ,8 + ,25 + ,23 + ,1 + ,0 + ,17 + ,6 + ,17 + ,8 + ,30 + ,25 + ,0 + ,1 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,1 + ,0 + ,16 + ,10 + ,12 + ,7 + ,22 + ,29 + ,1 + ,1 + ,20 + ,10 + ,11 + ,4 + ,25 + ,25 + ,1 + ,1 + ,16 + ,11 + ,11 + ,11 + ,23 + ,21 + ,1 + ,1 + ,18 + ,16 + ,12 + ,7 + ,17 + ,22 + ,1 + ,1 + ,17 + ,11 + ,13 + ,7 + ,21 + ,25 + ,0 + ,1 + ,23 + ,13 + ,14 + ,12 + ,19 + ,24 + ,1 + ,1 + ,30 + ,12 + ,16 + ,10 + ,19 + ,18 + ,1 + ,1 + ,18 + ,12 + ,10 + ,8 + ,16 + ,15 + ,0 + ,1 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,0 + ,1 + ,12 + ,4 + ,15 + ,4 + ,27 + ,28 + ,1 + ,1 + ,21 + ,9 + ,9 + ,9 + ,22 + ,20 + ,0 + ,1 + ,20 + ,8 + ,17 + ,7 + ,22 + ,24 + ,1 + ,1 + ,27 + ,15 + ,11 + ,9 + ,23 + ,21 + ,0 + ,1 + ,34 + ,16 + ,18 + ,11 + ,21 + ,20 + ,1 + ,1 + ,21 + ,9 + ,14 + ,13 + ,19 + ,21 + ,0 + ,1 + ,31 + ,14 + ,10 + ,8 + ,18 + ,23 + ,0 + ,1 + ,19 + ,11 + ,11 + ,8 + ,20 + ,28 + ,1 + ,1 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,1 + ,1 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,0 + ,1 + ,21 + ,9 + ,13 + ,9 + ,19 + ,24 + ,0 + ,1 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,1 + ,1 + ,17 + ,9 + ,13 + ,6 + ,22 + ,23 + ,0 + ,1 + ,24 + ,10 + ,9 + ,6 + ,25 + ,29 + ,1 + ,1 + ,25 + ,16 + ,18 + ,16 + ,26 + ,24 + ,1 + ,1 + ,26 + ,11 + ,18 + ,5 + ,29 + ,18 + ,1 + ,1 + ,25 + ,8 + ,12 + ,7 + ,32 + ,25 + ,1 + ,1 + ,17 + ,9 + ,17 + ,9 + ,25 + ,21 + ,0 + ,1 + ,32 + ,16 + ,9 + ,6 + ,29 + ,26 + ,0 + ,1 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,0 + ,0 + ,32 + ,12 + ,18 + ,12 + ,28 + ,22 + ,0 + ,1 + ,25 + ,12 + ,12 + ,7 + ,29 + ,23 + ,0 + ,1 + ,29 + ,14 + ,18 + ,10 + ,26 + ,30 + ,1 + ,1 + ,22 + ,9 + ,14 + ,9 + ,25 + ,23 + ,0 + ,1 + ,18 + ,10 + ,15 + ,8 + ,14 + ,17 + ,1 + ,1 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,0 + ,1 + ,20 + ,10 + ,10 + ,8 + ,26 + ,23 + ,0 + ,1 + ,15 + ,12 + ,11 + ,8 + ,20 + ,25 + ,1 + ,1 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,0 + ,1 + ,33 + ,14 + ,9 + ,6 + ,32 + ,24 + ,1 + ,1 + ,23 + ,14 + ,17 + ,7 + ,25 + ,21 + ,0 + ,1 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,0 + ,1 + ,18 + ,9 + ,12 + ,8 + ,21 + ,24 + ,1 + ,1 + ,20 + ,10 + ,12 + ,8 + ,20 + ,28 + ,1 + ,1 + ,11 + ,6 + ,6 + ,4 + ,15 + ,16 + ,0 + ,1 + ,28 + ,8 + ,24 + ,20 + ,30 + ,20 + ,1 + ,1 + ,26 + ,13 + ,12 + ,8 + ,24 + ,29 + ,1 + ,1 + ,22 + ,10 + ,12 + ,8 + ,26 + ,27 + ,0 + ,1 + ,17 + ,8 + ,14 + ,6 + ,24 + ,22 + ,0 + ,1 + ,12 + ,7 + ,7 + ,4 + ,22 + ,28 + ,0 + ,1 + ,17 + ,9 + ,12 + ,9 + ,24 + ,25 + ,1 + ,0 + ,19 + ,12 + ,14 + ,7 + ,24 + ,28 + ,0 + ,1 + ,18 + ,13 + ,8 + ,9 + ,24 + ,24 + ,0 + ,1 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,0 + ,1 + ,29 + ,11 + ,9 + ,5 + ,31 + ,30 + ,0 + ,1 + ,31 + ,8 + ,11 + ,8 + ,22 + ,24 + ,0 + ,1 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,1 + ,0 + ,20 + ,11 + ,11 + ,8 + ,25 + ,25 + ,1 + ,1 + ,28 + ,8 + ,12 + ,7 + ,20 + ,22 + ,1 + ,1 + ,19 + ,9 + ,9 + ,7 + ,21 + ,23 + ,1 + ,1 + ,29 + ,15 + ,18 + ,11 + ,23 + ,23 + ,1 + ,1 + ,26 + ,9 + ,15 + ,6 + ,25 + ,25 + ,1 + ,1 + ,23 + ,10 + ,12 + ,8 + ,20 + ,21 + ,0 + ,1 + ,13 + ,14 + ,13 + ,6 + ,21 + ,25 + ,1 + ,1 + ,21 + ,12 + ,14 + ,9 + ,22 + ,24 + ,0 + ,1 + ,19 + ,12 + ,10 + ,8 + ,23 + ,29 + ,1 + ,1 + ,28 + ,11 + ,13 + ,6 + ,25 + ,22 + ,1 + ,1 + ,23 + ,14 + ,13 + ,10 + ,25 + ,27 + ,1 + ,0 + ,18 + ,6 + ,11 + ,8 + ,17 + ,26 + ,0 + ,1 + ,21 + ,12 + ,13 + ,8 + ,19 + ,22 + ,1 + ,1 + ,20 + ,8 + ,16 + ,10 + ,25 + ,24 + ,1 + ,1 + ,21 + ,10 + ,11 + ,5 + ,26 + ,24 + ,1 + ,1 + ,28 + ,12 + ,16 + ,14 + ,27 + ,22 + ,0 + ,1 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,1 + ,1 + ,10 + ,5 + ,8 + ,6 + ,19 + ,24 + ,0 + ,0 + ,16 + ,11 + ,9 + ,5 + ,17 + ,23 + ,0 + ,1 + ,22 + ,10 + ,15 + ,6 + ,22 + ,20 + ,0 + ,1 + ,19 + ,9 + ,11 + ,10 + ,21 + ,27 + ,1 + ,1 + ,31 + ,10 + ,21 + ,12 + ,32 + ,26 + ,0 + ,1 + ,31 + ,16 + ,14 + ,9 + ,21 + ,25 + ,1 + ,1 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,0 + ,1 + ,19 + ,9 + ,12 + ,7 + ,18 + ,21 + ,1 + ,1 + ,22 + ,10 + ,13 + ,8 + ,18 + ,19 + ,0 + ,1 + ,15 + ,7 + ,12 + ,6 + ,19 + ,21 + ,1 + ,1 + ,20 + ,9 + ,19 + ,10 + ,20 + ,16 + ,0 + ,1 + ,23 + ,14 + ,11 + ,10 + ,20 + ,29 + ,1 + ,1 + ,24 + ,9 + ,13 + ,10 + ,19 + ,15 + ,1 + ,1 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,1 + ,1 + ,13 + ,8 + ,12 + ,7 + ,14 + ,19 + ,1 + ,1 + ,28 + ,8 + ,16 + ,12 + ,18 + ,24 + ,1 + ,0 + ,25 + ,7 + ,18 + ,11 + ,35 + ,17 + ,1 + ,1 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,0 + ,1 + ,17 + ,11 + ,9 + ,6 + ,20 + ,19 + ,0 + ,1 + ,25 + ,14 + ,15 + ,9 + ,22 + ,24 + ,1 + ,1 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,0 + ,1 + ,19 + ,20 + ,8 + ,7 + ,19 + ,25 + ,1 + ,0 + ,15 + ,8 + ,10 + ,4 + ,22 + ,24 + ,1 + ,1 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,1 + ,1 + ,18 + ,10 + ,14 + ,9 + ,21 + ,26 + ,1 + ,1 + ,33 + ,14 + ,11 + ,8 + ,26 + ,25 + ,1 + ,1 + ,16 + ,9 + ,12 + ,8 + ,16 + ,21 + ,0 + ,1 + ,17 + ,9 + ,11 + ,5 + ,23 + ,26 + ,1 + ,1 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,0 + ,1 + ,21 + ,10 + ,12 + ,8 + ,16 + ,23 + ,0 + ,1 + ,26 + ,13 + ,20 + ,10 + ,26 + ,22 + ,1 + ,1 + ,18 + ,12 + ,13 + ,9 + ,21 + ,13 + ,1 + ,1 + ,22 + ,13 + ,12 + ,13 + ,22 + ,15 + ,1 + ,1 + ,30 + ,14 + ,9 + ,9 + ,23 + ,14 + ,1 + ,1 + ,24 + ,14 + ,24 + ,20 + ,21 + ,10 + ,1 + ,1 + ,29 + ,16 + ,11 + ,6 + ,27 + ,24 + ,1 + ,1 + ,31 + ,9 + ,17 + ,9 + ,25 + ,19 + ,1 + ,0 + ,20 + ,9 + ,11 + ,7 + ,21 + ,20 + ,1 + ,1 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,1 + ,1 + ,28 + ,16 + ,16 + ,8 + ,24 + ,24 + ,1 + ,1 + ,17 + ,9 + ,13 + ,6 + ,19 + ,21 + ,0 + ,1 + ,28 + ,14 + ,11 + ,8 + ,24 + ,24 + ,1 + ,1 + ,31 + ,16 + ,19 + ,16 + ,17 + ,20) + ,dim=c(8 + ,120) + ,dimnames=list(c('Gender' + ,'Browser' + ,'CM' + ,'D' + ,'PE' + ,'PC' + ,'PS' + ,'O') + ,1:120)) > y <- array(NA,dim=c(8,120),dimnames=list(c('Gender','Browser','CM','D','PE','PC','PS','O'),1:120)) > 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 = '5' > #'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 PE Gender Browser CM D PC PS O 1 11 0 1 23 14 12 24 26 2 7 1 1 25 11 8 25 23 3 17 1 0 17 6 8 30 25 4 10 0 1 18 12 8 19 23 5 12 1 0 16 10 7 22 29 6 11 1 1 20 10 4 25 25 7 11 1 1 16 11 11 23 21 8 12 1 1 18 16 7 17 22 9 13 1 1 17 11 7 21 25 10 14 0 1 23 13 12 19 24 11 16 1 1 30 12 10 19 18 12 10 1 1 18 12 8 16 15 13 11 0 1 15 11 8 23 22 14 15 0 1 12 4 4 27 28 15 9 1 1 21 9 9 22 20 16 17 0 1 20 8 7 22 24 17 11 1 1 27 15 9 23 21 18 18 0 1 34 16 11 21 20 19 14 1 1 21 9 13 19 21 20 10 0 1 31 14 8 18 23 21 11 0 1 19 11 8 20 28 22 15 1 1 16 8 9 23 24 23 15 1 1 20 9 6 25 24 24 13 0 1 21 9 9 19 24 25 16 0 1 22 9 9 24 23 26 13 1 1 17 9 6 22 23 27 9 0 1 24 10 6 25 29 28 18 1 1 25 16 16 26 24 29 18 1 1 26 11 5 29 18 30 12 1 1 25 8 7 32 25 31 17 1 1 17 9 9 25 21 32 9 0 1 32 16 6 29 26 33 9 0 1 33 11 6 28 22 34 18 0 0 32 12 12 28 22 35 12 0 1 25 12 7 29 23 36 18 0 1 29 14 10 26 30 37 14 1 1 22 9 9 25 23 38 15 0 1 18 10 8 14 17 39 16 1 1 17 9 5 25 23 40 10 0 1 20 10 8 26 23 41 11 0 1 15 12 8 20 25 42 14 1 1 20 14 10 18 24 43 9 0 1 33 14 6 32 24 44 17 1 1 23 14 7 25 21 45 5 0 1 26 16 4 23 24 46 12 0 1 18 9 8 21 24 47 12 1 1 20 10 8 20 28 48 6 1 1 11 6 4 15 16 49 24 0 1 28 8 20 30 20 50 12 1 1 26 13 8 24 29 51 12 1 1 22 10 8 26 27 52 14 0 1 17 8 6 24 22 53 7 0 1 12 7 4 22 28 54 12 0 1 17 9 9 24 25 55 14 1 0 19 12 7 24 28 56 8 0 1 18 13 9 24 24 57 11 0 1 10 10 5 19 23 58 9 0 1 29 11 5 31 30 59 11 0 1 31 8 8 22 24 60 10 0 1 9 13 6 19 25 61 11 1 0 20 11 8 25 25 62 12 1 1 28 8 7 20 22 63 9 1 1 19 9 7 21 23 64 18 1 1 29 15 11 23 23 65 15 1 1 26 9 6 25 25 66 12 1 1 23 10 8 20 21 67 13 0 1 13 14 6 21 25 68 14 1 1 21 12 9 22 24 69 10 0 1 19 12 8 23 29 70 13 1 1 28 11 6 25 22 71 13 1 1 23 14 10 25 27 72 11 1 0 18 6 8 17 26 73 13 0 1 21 12 8 19 22 74 16 1 1 20 8 10 25 24 75 11 1 1 21 10 5 26 24 76 16 1 1 28 12 14 27 22 77 14 0 1 26 14 8 17 24 78 8 1 1 10 5 6 19 24 79 9 0 0 16 11 5 17 23 80 15 0 1 22 10 6 22 20 81 11 0 1 19 9 10 21 27 82 21 1 1 31 10 12 32 26 83 14 0 1 31 16 9 21 25 84 18 1 1 29 13 12 21 21 85 12 0 1 19 9 7 18 21 86 13 1 1 22 10 8 18 19 87 12 0 1 15 7 6 19 21 88 19 1 1 20 9 10 20 16 89 11 0 1 23 14 10 20 29 90 13 1 1 24 9 10 19 15 91 15 1 1 25 14 11 22 21 92 12 1 1 13 8 7 14 19 93 16 1 1 28 8 12 18 24 94 18 1 0 25 7 11 35 17 95 8 1 1 9 6 11 29 23 96 9 0 1 17 11 6 20 19 97 15 0 1 25 14 9 22 24 98 6 1 1 15 8 6 20 25 99 8 0 1 19 20 7 19 25 100 10 1 0 15 8 4 22 24 101 11 1 1 20 11 8 24 26 102 14 1 1 18 10 9 21 26 103 11 1 1 33 14 8 26 25 104 12 1 1 16 9 8 16 21 105 11 0 1 17 9 5 23 26 106 9 1 1 16 8 4 18 23 107 12 0 1 21 10 8 16 23 108 20 0 1 26 13 10 26 22 109 13 1 1 18 12 9 21 13 110 12 1 1 22 13 13 22 15 111 9 1 1 30 14 9 23 14 112 24 1 1 24 14 20 21 10 113 11 1 1 29 16 6 27 24 114 17 1 1 31 9 9 25 19 115 11 1 0 20 9 7 21 20 116 11 1 1 20 7 9 26 22 117 16 1 1 28 16 8 24 24 118 13 1 1 17 9 6 19 21 119 11 0 1 28 14 8 24 24 120 19 1 1 31 16 16 17 20 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Gender Browser CM D PC 7.08589 0.18344 -0.54504 0.09889 -0.16149 0.67943 PS O 0.10350 -0.09753 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.87750 -1.79476 0.08038 1.84293 5.83780 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.08589 2.64374 2.680 0.00847 ** Gender 0.18344 0.54162 0.339 0.73549 Browser -0.54504 0.93364 -0.584 0.56054 CM 0.09889 0.05714 1.731 0.08628 . D -0.16149 0.10606 -1.523 0.13067 PC 0.67943 0.09968 6.816 4.95e-10 *** PS 0.10350 0.07257 1.426 0.15655 O -0.09753 0.07961 -1.225 0.22312 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.73 on 112 degrees of freedom Multiple R-squared: 0.4366, Adjusted R-squared: 0.4014 F-statistic: 12.4 on 7 and 112 DF, p-value: 1.128e-11 > 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.87247376 0.25505248 0.12752624 [2,] 0.86490018 0.27019963 0.13509982 [3,] 0.78534184 0.42931631 0.21465816 [4,] 0.74959261 0.50081477 0.25040739 [5,] 0.80889456 0.38221087 0.19110544 [6,] 0.81499678 0.37000644 0.18500322 [7,] 0.76178439 0.47643123 0.23821561 [8,] 0.77245401 0.45509198 0.22754599 [9,] 0.72437659 0.55124682 0.27562341 [10,] 0.84102073 0.31795854 0.15897927 [11,] 0.79598635 0.40802731 0.20401365 [12,] 0.79581056 0.40837889 0.20418944 [13,] 0.80289826 0.39420348 0.19710174 [14,] 0.75202719 0.49594562 0.24797281 [15,] 0.71632495 0.56735010 0.28367505 [16,] 0.66590401 0.66819198 0.33409599 [17,] 0.70512609 0.58974783 0.29487391 [18,] 0.76303788 0.47392423 0.23696212 [19,] 0.83428347 0.33143306 0.16571653 [20,] 0.83183378 0.33633244 0.16816622 [21,] 0.84155651 0.31688698 0.15844349 [22,] 0.84241761 0.31516479 0.15758239 [23,] 0.88322700 0.23354600 0.11677300 [24,] 0.85096950 0.29806101 0.14903050 [25,] 0.81569021 0.36861959 0.18430979 [26,] 0.89887658 0.20224684 0.10112342 [27,] 0.86932394 0.26135212 0.13067606 [28,] 0.86293016 0.27413968 0.13706984 [29,] 0.91887544 0.16224912 0.08112456 [30,] 0.92484959 0.15030082 0.07515041 [31,] 0.90257386 0.19485229 0.09742614 [32,] 0.88275860 0.23448281 0.11724140 [33,] 0.89150082 0.21699837 0.10849918 [34,] 0.94104645 0.11790709 0.05895355 [35,] 0.96354311 0.07291378 0.03645689 [36,] 0.95114391 0.09771218 0.04885609 [37,] 0.93567529 0.12864942 0.06432471 [38,] 0.95755666 0.08488667 0.04244334 [39,] 0.94678168 0.10643665 0.05321832 [40,] 0.92974265 0.14051470 0.07025735 [41,] 0.91152148 0.17695704 0.08847852 [42,] 0.90924955 0.18150091 0.09075045 [43,] 0.89996367 0.20007266 0.10003633 [44,] 0.87695637 0.24608726 0.12304363 [45,] 0.86930952 0.26138096 0.13069048 [46,] 0.90973038 0.18053924 0.09026962 [47,] 0.89980959 0.20038083 0.10019041 [48,] 0.89352922 0.21294156 0.10647078 [49,] 0.90711187 0.18577626 0.09288813 [50,] 0.89018170 0.21963660 0.10981830 [51,] 0.88223082 0.23553836 0.11776918 [52,] 0.86028544 0.27942912 0.13971456 [53,] 0.86050592 0.27898817 0.13949408 [54,] 0.87556588 0.24886824 0.12443412 [55,] 0.87765260 0.24469480 0.12234740 [56,] 0.84993122 0.30013755 0.15006878 [57,] 0.89306682 0.21386635 0.10693318 [58,] 0.87537349 0.24925302 0.12462651 [59,] 0.85054323 0.29891354 0.14945677 [60,] 0.81648792 0.36702417 0.18351208 [61,] 0.77789586 0.44420827 0.22210414 [62,] 0.74862382 0.50275235 0.25137618 [63,] 0.70672113 0.58655774 0.29327887 [64,] 0.68434209 0.63131581 0.31565791 [65,] 0.63805685 0.72388631 0.36194315 [66,] 0.60474702 0.79050597 0.39525298 [67,] 0.57974579 0.84050841 0.42025421 [68,] 0.55445176 0.89109648 0.44554824 [69,] 0.50056865 0.99886271 0.49943135 [70,] 0.51920421 0.96159158 0.48079579 [71,] 0.51277883 0.97444233 0.48722117 [72,] 0.58159355 0.83681290 0.41840645 [73,] 0.53043264 0.93913472 0.46956736 [74,] 0.49938208 0.99876415 0.50061792 [75,] 0.43828548 0.87657096 0.56171452 [76,] 0.37669807 0.75339614 0.62330193 [77,] 0.32347999 0.64695997 0.67652001 [78,] 0.45116690 0.90233381 0.54883310 [79,] 0.44694230 0.89388461 0.55305770 [80,] 0.40772823 0.81545647 0.59227177 [81,] 0.34656503 0.69313006 0.65343497 [82,] 0.31520812 0.63041624 0.68479188 [83,] 0.26960499 0.53920998 0.73039501 [84,] 0.22967467 0.45934934 0.77032533 [85,] 0.39048362 0.78096724 0.60951638 [86,] 0.33555042 0.67110084 0.66444958 [87,] 0.28096006 0.56192013 0.71903994 [88,] 0.37520208 0.75040417 0.62479792 [89,] 0.34900532 0.69801063 0.65099468 [90,] 0.28040512 0.56081024 0.71959488 [91,] 0.24350052 0.48700104 0.75649948 [92,] 0.18088382 0.36176764 0.81911618 [93,] 0.16338500 0.32676999 0.83661500 [94,] 0.11012849 0.22025699 0.88987151 [95,] 0.07057871 0.14115743 0.92942129 [96,] 0.04128577 0.08257154 0.95871423 [97,] 0.02464682 0.04929365 0.97535318 [98,] 0.06842256 0.13684511 0.93157744 [99,] 0.04156174 0.08312348 0.95843826 > postscript(file="/var/www/html/rcomp/tmp/173ib1292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2hczw1292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3hczw1292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4hczw1292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5hczw1292234129.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 = 120 Frequency = 1 1 2 3 4 5 6 -3.65590468 -6.19994613 2.91621536 -1.54178355 0.55864775 1.04580218 7 8 9 10 11 12 -3.33630928 1.70965190 1.87966817 -0.49493966 1.24160136 -2.19495454 13 14 15 16 17 18 -0.91815318 5.13698740 -4.78888992 5.08093420 -2.41925069 2.98406517 19 20 21 22 23 24 -2.09858526 -2.40084636 -0.41801157 1.83068047 3.42791326 0.09517812 25 26 27 28 29 30 2.38124256 1.93755708 -2.13506055 0.16605996 5.83780076 -1.53444443 31 32 33 34 35 36 3.39368359 -2.66383061 -3.85678920 0.78194701 -0.58960013 4.29275048 37 38 39 40 41 42 0.09430410 3.06756839 5.30648111 -2.78706354 -0.15356084 1.24215129 43 44 45 46 47 48 -3.59127056 4.96667328 -4.28567494 -0.13572995 0.13817495 -3.55290806 49 50 51 52 53 54 1.23903695 -0.28716629 -0.77815213 2.65496466 -1.86102548 -0.92925503 55 56 57 58 59 60 2.28042611 -4.47971331 1.96464369 -2.31206656 -2.68626990 1.06362981 61 62 63 64 65 66 -2.05548177 -0.88166126 -2.83614999 3.21916636 2.93211485 -0.84120474 67 68 69 70 71 72 3.62256056 1.08570349 -1.46950066 0.76472660 -0.48644438 -1.73959884 73 74 75 76 77 78 1.06402116 1.54868704 0.06644591 -1.71626201 2.29462865 -2.60814552 79 80 81 82 83 84 -0.80522668 3.49544923 -2.30089398 3.89556741 1.12725142 2.22869722 85 86 87 88 89 90 0.46273367 0.26962865 1.11123679 4.44744799 -1.59043114 -1.94213217 91 92 93 94 95 96 0.36167083 0.93008936 0.12323678 -0.04946453 -6.87750125 -1.73914374 97 98 99 100 101 102 2.19656618 -4.62408859 -1.47425498 -0.11479599 -1.30940966 1.35795252 103 104 105 106 107 108 -2.41502303 0.10353574 0.98951509 -0.35216355 0.14908155 5.64767905 109 110 111 112 113 114 -0.58696666 -4.44720718 -5.56012053 2.37631817 -0.53865598 1.81418747 115 116 117 118 119 120 -1.77266842 -3.23193390 3.51187416 2.05300560 -1.62767103 1.11413784 > postscript(file="/var/www/html/rcomp/tmp/6s3gz1292234129.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 = 120 Frequency = 1 lag(myerror, k = 1) myerror 0 -3.65590468 NA 1 -6.19994613 -3.65590468 2 2.91621536 -6.19994613 3 -1.54178355 2.91621536 4 0.55864775 -1.54178355 5 1.04580218 0.55864775 6 -3.33630928 1.04580218 7 1.70965190 -3.33630928 8 1.87966817 1.70965190 9 -0.49493966 1.87966817 10 1.24160136 -0.49493966 11 -2.19495454 1.24160136 12 -0.91815318 -2.19495454 13 5.13698740 -0.91815318 14 -4.78888992 5.13698740 15 5.08093420 -4.78888992 16 -2.41925069 5.08093420 17 2.98406517 -2.41925069 18 -2.09858526 2.98406517 19 -2.40084636 -2.09858526 20 -0.41801157 -2.40084636 21 1.83068047 -0.41801157 22 3.42791326 1.83068047 23 0.09517812 3.42791326 24 2.38124256 0.09517812 25 1.93755708 2.38124256 26 -2.13506055 1.93755708 27 0.16605996 -2.13506055 28 5.83780076 0.16605996 29 -1.53444443 5.83780076 30 3.39368359 -1.53444443 31 -2.66383061 3.39368359 32 -3.85678920 -2.66383061 33 0.78194701 -3.85678920 34 -0.58960013 0.78194701 35 4.29275048 -0.58960013 36 0.09430410 4.29275048 37 3.06756839 0.09430410 38 5.30648111 3.06756839 39 -2.78706354 5.30648111 40 -0.15356084 -2.78706354 41 1.24215129 -0.15356084 42 -3.59127056 1.24215129 43 4.96667328 -3.59127056 44 -4.28567494 4.96667328 45 -0.13572995 -4.28567494 46 0.13817495 -0.13572995 47 -3.55290806 0.13817495 48 1.23903695 -3.55290806 49 -0.28716629 1.23903695 50 -0.77815213 -0.28716629 51 2.65496466 -0.77815213 52 -1.86102548 2.65496466 53 -0.92925503 -1.86102548 54 2.28042611 -0.92925503 55 -4.47971331 2.28042611 56 1.96464369 -4.47971331 57 -2.31206656 1.96464369 58 -2.68626990 -2.31206656 59 1.06362981 -2.68626990 60 -2.05548177 1.06362981 61 -0.88166126 -2.05548177 62 -2.83614999 -0.88166126 63 3.21916636 -2.83614999 64 2.93211485 3.21916636 65 -0.84120474 2.93211485 66 3.62256056 -0.84120474 67 1.08570349 3.62256056 68 -1.46950066 1.08570349 69 0.76472660 -1.46950066 70 -0.48644438 0.76472660 71 -1.73959884 -0.48644438 72 1.06402116 -1.73959884 73 1.54868704 1.06402116 74 0.06644591 1.54868704 75 -1.71626201 0.06644591 76 2.29462865 -1.71626201 77 -2.60814552 2.29462865 78 -0.80522668 -2.60814552 79 3.49544923 -0.80522668 80 -2.30089398 3.49544923 81 3.89556741 -2.30089398 82 1.12725142 3.89556741 83 2.22869722 1.12725142 84 0.46273367 2.22869722 85 0.26962865 0.46273367 86 1.11123679 0.26962865 87 4.44744799 1.11123679 88 -1.59043114 4.44744799 89 -1.94213217 -1.59043114 90 0.36167083 -1.94213217 91 0.93008936 0.36167083 92 0.12323678 0.93008936 93 -0.04946453 0.12323678 94 -6.87750125 -0.04946453 95 -1.73914374 -6.87750125 96 2.19656618 -1.73914374 97 -4.62408859 2.19656618 98 -1.47425498 -4.62408859 99 -0.11479599 -1.47425498 100 -1.30940966 -0.11479599 101 1.35795252 -1.30940966 102 -2.41502303 1.35795252 103 0.10353574 -2.41502303 104 0.98951509 0.10353574 105 -0.35216355 0.98951509 106 0.14908155 -0.35216355 107 5.64767905 0.14908155 108 -0.58696666 5.64767905 109 -4.44720718 -0.58696666 110 -5.56012053 -4.44720718 111 2.37631817 -5.56012053 112 -0.53865598 2.37631817 113 1.81418747 -0.53865598 114 -1.77266842 1.81418747 115 -3.23193390 -1.77266842 116 3.51187416 -3.23193390 117 2.05300560 3.51187416 118 -1.62767103 2.05300560 119 1.11413784 -1.62767103 120 NA 1.11413784 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -6.19994613 -3.65590468 [2,] 2.91621536 -6.19994613 [3,] -1.54178355 2.91621536 [4,] 0.55864775 -1.54178355 [5,] 1.04580218 0.55864775 [6,] -3.33630928 1.04580218 [7,] 1.70965190 -3.33630928 [8,] 1.87966817 1.70965190 [9,] -0.49493966 1.87966817 [10,] 1.24160136 -0.49493966 [11,] -2.19495454 1.24160136 [12,] -0.91815318 -2.19495454 [13,] 5.13698740 -0.91815318 [14,] -4.78888992 5.13698740 [15,] 5.08093420 -4.78888992 [16,] -2.41925069 5.08093420 [17,] 2.98406517 -2.41925069 [18,] -2.09858526 2.98406517 [19,] -2.40084636 -2.09858526 [20,] -0.41801157 -2.40084636 [21,] 1.83068047 -0.41801157 [22,] 3.42791326 1.83068047 [23,] 0.09517812 3.42791326 [24,] 2.38124256 0.09517812 [25,] 1.93755708 2.38124256 [26,] -2.13506055 1.93755708 [27,] 0.16605996 -2.13506055 [28,] 5.83780076 0.16605996 [29,] -1.53444443 5.83780076 [30,] 3.39368359 -1.53444443 [31,] -2.66383061 3.39368359 [32,] -3.85678920 -2.66383061 [33,] 0.78194701 -3.85678920 [34,] -0.58960013 0.78194701 [35,] 4.29275048 -0.58960013 [36,] 0.09430410 4.29275048 [37,] 3.06756839 0.09430410 [38,] 5.30648111 3.06756839 [39,] -2.78706354 5.30648111 [40,] -0.15356084 -2.78706354 [41,] 1.24215129 -0.15356084 [42,] -3.59127056 1.24215129 [43,] 4.96667328 -3.59127056 [44,] -4.28567494 4.96667328 [45,] -0.13572995 -4.28567494 [46,] 0.13817495 -0.13572995 [47,] -3.55290806 0.13817495 [48,] 1.23903695 -3.55290806 [49,] -0.28716629 1.23903695 [50,] -0.77815213 -0.28716629 [51,] 2.65496466 -0.77815213 [52,] -1.86102548 2.65496466 [53,] -0.92925503 -1.86102548 [54,] 2.28042611 -0.92925503 [55,] -4.47971331 2.28042611 [56,] 1.96464369 -4.47971331 [57,] -2.31206656 1.96464369 [58,] -2.68626990 -2.31206656 [59,] 1.06362981 -2.68626990 [60,] -2.05548177 1.06362981 [61,] -0.88166126 -2.05548177 [62,] -2.83614999 -0.88166126 [63,] 3.21916636 -2.83614999 [64,] 2.93211485 3.21916636 [65,] -0.84120474 2.93211485 [66,] 3.62256056 -0.84120474 [67,] 1.08570349 3.62256056 [68,] -1.46950066 1.08570349 [69,] 0.76472660 -1.46950066 [70,] -0.48644438 0.76472660 [71,] -1.73959884 -0.48644438 [72,] 1.06402116 -1.73959884 [73,] 1.54868704 1.06402116 [74,] 0.06644591 1.54868704 [75,] -1.71626201 0.06644591 [76,] 2.29462865 -1.71626201 [77,] -2.60814552 2.29462865 [78,] -0.80522668 -2.60814552 [79,] 3.49544923 -0.80522668 [80,] -2.30089398 3.49544923 [81,] 3.89556741 -2.30089398 [82,] 1.12725142 3.89556741 [83,] 2.22869722 1.12725142 [84,] 0.46273367 2.22869722 [85,] 0.26962865 0.46273367 [86,] 1.11123679 0.26962865 [87,] 4.44744799 1.11123679 [88,] -1.59043114 4.44744799 [89,] -1.94213217 -1.59043114 [90,] 0.36167083 -1.94213217 [91,] 0.93008936 0.36167083 [92,] 0.12323678 0.93008936 [93,] -0.04946453 0.12323678 [94,] -6.87750125 -0.04946453 [95,] -1.73914374 -6.87750125 [96,] 2.19656618 -1.73914374 [97,] -4.62408859 2.19656618 [98,] -1.47425498 -4.62408859 [99,] -0.11479599 -1.47425498 [100,] -1.30940966 -0.11479599 [101,] 1.35795252 -1.30940966 [102,] -2.41502303 1.35795252 [103,] 0.10353574 -2.41502303 [104,] 0.98951509 0.10353574 [105,] -0.35216355 0.98951509 [106,] 0.14908155 -0.35216355 [107,] 5.64767905 0.14908155 [108,] -0.58696666 5.64767905 [109,] -4.44720718 -0.58696666 [110,] -5.56012053 -4.44720718 [111,] 2.37631817 -5.56012053 [112,] -0.53865598 2.37631817 [113,] 1.81418747 -0.53865598 [114,] -1.77266842 1.81418747 [115,] -3.23193390 -1.77266842 [116,] 3.51187416 -3.23193390 [117,] 2.05300560 3.51187416 [118,] -1.62767103 2.05300560 [119,] 1.11413784 -1.62767103 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -6.19994613 -3.65590468 2 2.91621536 -6.19994613 3 -1.54178355 2.91621536 4 0.55864775 -1.54178355 5 1.04580218 0.55864775 6 -3.33630928 1.04580218 7 1.70965190 -3.33630928 8 1.87966817 1.70965190 9 -0.49493966 1.87966817 10 1.24160136 -0.49493966 11 -2.19495454 1.24160136 12 -0.91815318 -2.19495454 13 5.13698740 -0.91815318 14 -4.78888992 5.13698740 15 5.08093420 -4.78888992 16 -2.41925069 5.08093420 17 2.98406517 -2.41925069 18 -2.09858526 2.98406517 19 -2.40084636 -2.09858526 20 -0.41801157 -2.40084636 21 1.83068047 -0.41801157 22 3.42791326 1.83068047 23 0.09517812 3.42791326 24 2.38124256 0.09517812 25 1.93755708 2.38124256 26 -2.13506055 1.93755708 27 0.16605996 -2.13506055 28 5.83780076 0.16605996 29 -1.53444443 5.83780076 30 3.39368359 -1.53444443 31 -2.66383061 3.39368359 32 -3.85678920 -2.66383061 33 0.78194701 -3.85678920 34 -0.58960013 0.78194701 35 4.29275048 -0.58960013 36 0.09430410 4.29275048 37 3.06756839 0.09430410 38 5.30648111 3.06756839 39 -2.78706354 5.30648111 40 -0.15356084 -2.78706354 41 1.24215129 -0.15356084 42 -3.59127056 1.24215129 43 4.96667328 -3.59127056 44 -4.28567494 4.96667328 45 -0.13572995 -4.28567494 46 0.13817495 -0.13572995 47 -3.55290806 0.13817495 48 1.23903695 -3.55290806 49 -0.28716629 1.23903695 50 -0.77815213 -0.28716629 51 2.65496466 -0.77815213 52 -1.86102548 2.65496466 53 -0.92925503 -1.86102548 54 2.28042611 -0.92925503 55 -4.47971331 2.28042611 56 1.96464369 -4.47971331 57 -2.31206656 1.96464369 58 -2.68626990 -2.31206656 59 1.06362981 -2.68626990 60 -2.05548177 1.06362981 61 -0.88166126 -2.05548177 62 -2.83614999 -0.88166126 63 3.21916636 -2.83614999 64 2.93211485 3.21916636 65 -0.84120474 2.93211485 66 3.62256056 -0.84120474 67 1.08570349 3.62256056 68 -1.46950066 1.08570349 69 0.76472660 -1.46950066 70 -0.48644438 0.76472660 71 -1.73959884 -0.48644438 72 1.06402116 -1.73959884 73 1.54868704 1.06402116 74 0.06644591 1.54868704 75 -1.71626201 0.06644591 76 2.29462865 -1.71626201 77 -2.60814552 2.29462865 78 -0.80522668 -2.60814552 79 3.49544923 -0.80522668 80 -2.30089398 3.49544923 81 3.89556741 -2.30089398 82 1.12725142 3.89556741 83 2.22869722 1.12725142 84 0.46273367 2.22869722 85 0.26962865 0.46273367 86 1.11123679 0.26962865 87 4.44744799 1.11123679 88 -1.59043114 4.44744799 89 -1.94213217 -1.59043114 90 0.36167083 -1.94213217 91 0.93008936 0.36167083 92 0.12323678 0.93008936 93 -0.04946453 0.12323678 94 -6.87750125 -0.04946453 95 -1.73914374 -6.87750125 96 2.19656618 -1.73914374 97 -4.62408859 2.19656618 98 -1.47425498 -4.62408859 99 -0.11479599 -1.47425498 100 -1.30940966 -0.11479599 101 1.35795252 -1.30940966 102 -2.41502303 1.35795252 103 0.10353574 -2.41502303 104 0.98951509 0.10353574 105 -0.35216355 0.98951509 106 0.14908155 -0.35216355 107 5.64767905 0.14908155 108 -0.58696666 5.64767905 109 -4.44720718 -0.58696666 110 -5.56012053 -4.44720718 111 2.37631817 -5.56012053 112 -0.53865598 2.37631817 113 1.81418747 -0.53865598 114 -1.77266842 1.81418747 115 -3.23193390 -1.77266842 116 3.51187416 -3.23193390 117 2.05300560 3.51187416 118 -1.62767103 2.05300560 119 1.11413784 -1.62767103 > 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/7ldyk1292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8ldyk1292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9ldyk1292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10v4f51292234129.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11z4vt1292234129.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/12k5cz1292234129.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/1330zw1292234129.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/1470xj1292234129.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/15ngp11292234129.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/16qy571292234129.tab") + } > try(system("convert tmp/173ib1292234129.ps tmp/173ib1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/2hczw1292234129.ps tmp/2hczw1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/3hczw1292234129.ps tmp/3hczw1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/4hczw1292234129.ps tmp/4hczw1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/5hczw1292234129.ps tmp/5hczw1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/6s3gz1292234129.ps tmp/6s3gz1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/7ldyk1292234129.ps tmp/7ldyk1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/8ldyk1292234129.ps tmp/8ldyk1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/9ldyk1292234129.ps tmp/9ldyk1292234129.png",intern=TRUE)) character(0) > try(system("convert tmp/10v4f51292234129.ps tmp/10v4f51292234129.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.510 1.817 8.186