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(6.5 + ,8.9 + ,-0.6 + ,9 + ,6.3 + ,8.4 + ,1.1 + ,11 + ,5.9 + ,8.1 + ,1.4 + ,13 + ,5.5 + ,8.3 + ,1.4 + ,12 + ,5.2 + ,8.1 + ,1.3 + ,13 + ,4.9 + ,8 + ,1.4 + ,15 + ,5.4 + ,8.7 + ,-0.1 + ,13 + ,5.8 + ,9.2 + ,1.8 + ,16 + ,5.7 + ,9 + ,1.5 + ,10 + ,5.6 + ,8.9 + ,1.5 + ,14 + ,5.5 + ,8.5 + ,1.4 + ,14 + ,5.4 + ,8.1 + ,1.6 + ,15 + ,5.4 + ,7.5 + ,1.6 + ,13 + ,5.4 + ,7.1 + ,1.6 + ,8 + ,5.5 + ,6.9 + ,1.4 + ,7 + ,5.8 + ,7.1 + ,1.7 + ,3 + ,5.7 + ,7 + ,1.8 + ,3 + ,5.4 + ,6.7 + ,1.9 + ,4 + ,5.6 + ,7 + ,2.2 + ,4 + ,5.8 + ,7.3 + ,2.1 + ,0 + ,6.2 + ,7.7 + ,2.4 + ,-4 + ,6.8 + ,8.4 + ,2.6 + ,-14 + ,6.7 + ,8.4 + ,2.8 + ,-18 + ,6.7 + ,8.8 + ,2.7 + ,-8 + ,6.4 + ,9.1 + ,2.6 + ,-1 + ,6.3 + ,9 + ,2.9 + ,1 + ,6.3 + ,8.6 + ,2.8 + ,2 + ,6.4 + ,7.9 + ,2.2 + ,0 + ,6.3 + ,7.7 + ,2.2 + ,1 + ,6 + ,7.8 + ,2.2 + ,0 + ,6.3 + ,9.2 + ,2 + ,-1 + ,6.3 + ,9.4 + ,2 + ,-3 + ,6.6 + ,9.2 + ,1.7 + ,-3 + ,7.5 + ,8.7 + ,1.4 + ,-3 + ,7.8 + ,8.4 + ,1.3 + ,-4 + ,7.9 + ,8.6 + ,1.4 + ,-8 + ,7.8 + ,9 + ,1.3 + ,-9 + ,7.6 + ,9.1 + ,1.3 + ,-13 + ,7.5 + ,8.7 + ,1.4 + ,-18 + ,7.6 + ,8.2 + ,2 + ,-11 + ,7.5 + ,7.9 + ,1.7 + ,-9 + ,7.3 + ,7.9 + ,1.8 + ,-10 + ,7.6 + ,9.1 + ,1.7 + ,-13 + ,7.5 + ,9.4 + ,1.6 + ,-11 + ,7.6 + ,9.4 + ,1.7 + ,-5 + ,7.9 + ,9.1 + ,1.9 + ,-15 + ,7.9 + ,9 + ,1.8 + ,-6 + ,8.1 + ,9.3 + ,1.7 + ,-6 + ,8.2 + ,9.9 + ,1.6 + ,-3 + ,8 + ,9.8 + ,1.8 + ,-1 + ,7.5 + ,9.3 + ,1.6 + ,-3 + ,6.8 + ,8.3 + ,1.5 + ,-4 + ,6.5 + ,8 + ,1.5 + ,-6 + ,6.6 + ,8.5 + ,1.3 + ,0 + ,7.6 + ,10.4 + ,1.4 + ,-4 + ,8 + ,11.1 + ,1.4 + ,-2 + ,8.1 + ,10.9 + ,1.3 + ,-2 + ,7.7 + ,10 + ,1.3 + ,-6 + ,7.5 + ,9.2 + ,1.2 + ,-7 + ,7.6 + ,9.2 + ,1.1 + ,-6 + ,7.8 + ,9.5 + ,1.4 + ,-6 + ,7.8 + ,9.6 + ,1.2 + ,-3 + ,7.8 + ,9.5 + ,1.5 + ,-2 + ,7.5 + ,9.1 + ,1.1 + ,-5 + ,7.5 + ,8.9 + ,1.3 + ,-11 + ,7.1 + ,9 + ,1.5 + ,-11 + ,7.5 + ,10.1 + ,1.1 + ,-11 + ,7.5 + ,10.3 + ,1.4 + ,-10 + ,7.6 + ,10.2 + ,1.3 + ,-14 + ,7.7 + ,9.6 + ,1.5 + ,-8 + ,7.7 + ,9.2 + ,1.6 + ,-9 + ,7.9 + ,9.3 + ,1.7 + ,-5 + ,8.1 + ,9.4 + ,1.1 + ,-1 + ,8.2 + ,9.4 + ,1.6 + ,-2 + ,8.2 + ,9.2 + ,1.3 + ,-5 + ,8.2 + ,9 + ,1.7 + ,-4 + ,7.9 + ,9 + ,1.6 + ,-6 + ,7.3 + ,9 + ,1.7 + ,-2 + ,6.9 + ,9.8 + ,1.9 + ,-2 + ,6.6 + ,10 + ,1.8 + ,-2 + ,6.7 + ,9.8 + ,1.9 + ,-2 + ,6.9 + ,9.3 + ,1.6 + ,2 + ,7 + ,9 + ,1.5 + ,1 + ,7.1 + ,9 + ,1.6 + ,-8 + ,7.2 + ,9.1 + ,1.6 + ,-1 + ,7.1 + ,9.1 + ,1.7 + ,1 + ,6.9 + ,9.1 + ,2 + ,-1 + ,7 + ,9.2 + ,2 + ,2 + ,6.8 + ,8.8 + ,1.9 + ,2 + ,6.4 + ,8.3 + ,1.7 + ,1 + ,6.7 + ,8.4 + ,1.8 + ,-1 + ,6.6 + ,8.1 + ,1.9 + ,-2 + ,6.4 + ,7.7 + ,1.7 + ,-2 + ,6.3 + ,7.9 + ,2 + ,-1 + ,6.2 + ,7.9 + ,2.1 + ,-8 + ,6.5 + ,8 + ,2.4 + ,-4 + ,6.8 + ,7.9 + ,2.5 + ,-6 + ,6.8 + ,7.6 + ,2.5 + ,-3 + ,6.4 + ,7.1 + ,2.6 + ,-3 + ,6.1 + ,6.8 + ,2.2 + ,-7 + ,5.8 + ,6.5 + ,2.5 + ,-9 + ,6.1 + ,6.9 + ,2.8 + ,-11 + ,7.2 + ,8.2 + ,2.8 + ,-13 + ,7.3 + ,8.7 + ,2.9 + ,-11 + ,6.9 + ,8.3 + ,3 + ,-9 + ,6.1 + ,7.9 + ,3.1 + ,-17 + ,5.8 + ,7.5 + ,2.9 + ,-22 + ,6.2 + ,7.8 + ,2.7 + ,-25 + ,7.1 + ,8.3 + ,2.2 + ,-20 + ,7.7 + ,8.4 + ,2.5 + ,-24 + ,8 + ,8.2 + ,2.3 + ,-24 + ,7.8 + ,7.6 + ,2.6 + ,-22 + ,7.4 + ,7.2 + ,2.3 + ,-19 + ,7.4 + ,7.5 + ,2.2 + ,-18 + ,7.7 + ,8.7 + ,1.8 + ,-17 + ,7.8 + ,9 + ,1.8 + ,-11 + ,7.8 + ,8.6 + ,2 + ,-11 + ,8 + ,7.9 + ,1.6 + ,-12 + ,8.1 + ,7.8 + ,1.5 + ,-10 + ,8.4 + ,8.2 + ,1.4 + ,-15) + ,dim=c(4 + ,120) + ,dimnames=list(c('Mannen' + ,'Vrouwen' + ,'Inflatie' + ,'Consumvertr') + ,1:120)) > y <- array(NA,dim=c(4,120),dimnames=list(c('Mannen','Vrouwen','Inflatie','Consumvertr'),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 = '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 Mannen Vrouwen Inflatie Consumvertr t 1 6.5 8.9 -0.6 9 1 2 6.3 8.4 1.1 11 2 3 5.9 8.1 1.4 13 3 4 5.5 8.3 1.4 12 4 5 5.2 8.1 1.3 13 5 6 4.9 8.0 1.4 15 6 7 5.4 8.7 -0.1 13 7 8 5.8 9.2 1.8 16 8 9 5.7 9.0 1.5 10 9 10 5.6 8.9 1.5 14 10 11 5.5 8.5 1.4 14 11 12 5.4 8.1 1.6 15 12 13 5.4 7.5 1.6 13 13 14 5.4 7.1 1.6 8 14 15 5.5 6.9 1.4 7 15 16 5.8 7.1 1.7 3 16 17 5.7 7.0 1.8 3 17 18 5.4 6.7 1.9 4 18 19 5.6 7.0 2.2 4 19 20 5.8 7.3 2.1 0 20 21 6.2 7.7 2.4 -4 21 22 6.8 8.4 2.6 -14 22 23 6.7 8.4 2.8 -18 23 24 6.7 8.8 2.7 -8 24 25 6.4 9.1 2.6 -1 25 26 6.3 9.0 2.9 1 26 27 6.3 8.6 2.8 2 27 28 6.4 7.9 2.2 0 28 29 6.3 7.7 2.2 1 29 30 6.0 7.8 2.2 0 30 31 6.3 9.2 2.0 -1 31 32 6.3 9.4 2.0 -3 32 33 6.6 9.2 1.7 -3 33 34 7.5 8.7 1.4 -3 34 35 7.8 8.4 1.3 -4 35 36 7.9 8.6 1.4 -8 36 37 7.8 9.0 1.3 -9 37 38 7.6 9.1 1.3 -13 38 39 7.5 8.7 1.4 -18 39 40 7.6 8.2 2.0 -11 40 41 7.5 7.9 1.7 -9 41 42 7.3 7.9 1.8 -10 42 43 7.6 9.1 1.7 -13 43 44 7.5 9.4 1.6 -11 44 45 7.6 9.4 1.7 -5 45 46 7.9 9.1 1.9 -15 46 47 7.9 9.0 1.8 -6 47 48 8.1 9.3 1.7 -6 48 49 8.2 9.9 1.6 -3 49 50 8.0 9.8 1.8 -1 50 51 7.5 9.3 1.6 -3 51 52 6.8 8.3 1.5 -4 52 53 6.5 8.0 1.5 -6 53 54 6.6 8.5 1.3 0 54 55 7.6 10.4 1.4 -4 55 56 8.0 11.1 1.4 -2 56 57 8.1 10.9 1.3 -2 57 58 7.7 10.0 1.3 -6 58 59 7.5 9.2 1.2 -7 59 60 7.6 9.2 1.1 -6 60 61 7.8 9.5 1.4 -6 61 62 7.8 9.6 1.2 -3 62 63 7.8 9.5 1.5 -2 63 64 7.5 9.1 1.1 -5 64 65 7.5 8.9 1.3 -11 65 66 7.1 9.0 1.5 -11 66 67 7.5 10.1 1.1 -11 67 68 7.5 10.3 1.4 -10 68 69 7.6 10.2 1.3 -14 69 70 7.7 9.6 1.5 -8 70 71 7.7 9.2 1.6 -9 71 72 7.9 9.3 1.7 -5 72 73 8.1 9.4 1.1 -1 73 74 8.2 9.4 1.6 -2 74 75 8.2 9.2 1.3 -5 75 76 8.2 9.0 1.7 -4 76 77 7.9 9.0 1.6 -6 77 78 7.3 9.0 1.7 -2 78 79 6.9 9.8 1.9 -2 79 80 6.6 10.0 1.8 -2 80 81 6.7 9.8 1.9 -2 81 82 6.9 9.3 1.6 2 82 83 7.0 9.0 1.5 1 83 84 7.1 9.0 1.6 -8 84 85 7.2 9.1 1.6 -1 85 86 7.1 9.1 1.7 1 86 87 6.9 9.1 2.0 -1 87 88 7.0 9.2 2.0 2 88 89 6.8 8.8 1.9 2 89 90 6.4 8.3 1.7 1 90 91 6.7 8.4 1.8 -1 91 92 6.6 8.1 1.9 -2 92 93 6.4 7.7 1.7 -2 93 94 6.3 7.9 2.0 -1 94 95 6.2 7.9 2.1 -8 95 96 6.5 8.0 2.4 -4 96 97 6.8 7.9 2.5 -6 97 98 6.8 7.6 2.5 -3 98 99 6.4 7.1 2.6 -3 99 100 6.1 6.8 2.2 -7 100 101 5.8 6.5 2.5 -9 101 102 6.1 6.9 2.8 -11 102 103 7.2 8.2 2.8 -13 103 104 7.3 8.7 2.9 -11 104 105 6.9 8.3 3.0 -9 105 106 6.1 7.9 3.1 -17 106 107 5.8 7.5 2.9 -22 107 108 6.2 7.8 2.7 -25 108 109 7.1 8.3 2.2 -20 109 110 7.7 8.4 2.5 -24 110 111 8.0 8.2 2.3 -24 111 112 7.8 7.6 2.6 -22 112 113 7.4 7.2 2.3 -19 113 114 7.4 7.5 2.2 -18 114 115 7.7 8.7 1.8 -17 115 116 7.8 9.0 1.8 -11 116 117 7.8 8.6 2.0 -11 117 118 8.0 7.9 1.6 -12 118 119 8.1 7.8 1.5 -10 119 120 8.4 8.2 1.4 -15 120 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Vrouwen Inflatie Consumvertr t 3.511845 0.424760 -0.431370 -0.054045 0.005112 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.382561 -0.243238 -0.004503 0.298765 0.993947 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3.511845 0.546731 6.423 3.12e-09 *** Vrouwen 0.424760 0.052987 8.016 1.00e-12 *** Inflatie -0.431370 0.093452 -4.616 1.03e-05 *** Consumvertr -0.054045 0.006619 -8.165 4.61e-13 *** t 0.005112 0.001651 3.096 0.00246 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4739 on 115 degrees of freedom Multiple R-squared: 0.7094, Adjusted R-squared: 0.6993 F-statistic: 70.18 on 4 and 115 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.1078794554 0.2157589109 0.892120545 [2,] 0.0635432549 0.1270865099 0.936456745 [3,] 0.0641880504 0.1283761009 0.935811950 [4,] 0.1571601002 0.3143202004 0.842839900 [5,] 0.2377194576 0.4754389152 0.762280542 [6,] 0.2272135179 0.4544270358 0.772786482 [7,] 0.1563823123 0.3127646245 0.843617688 [8,] 0.1050809340 0.2101618681 0.894919066 [9,] 0.0665690862 0.1331381724 0.933430914 [10,] 0.0411245833 0.0822491666 0.958875417 [11,] 0.0265328424 0.0530656848 0.973467158 [12,] 0.0151697819 0.0303395638 0.984830218 [13,] 0.0095562436 0.0191124873 0.990443756 [14,] 0.0052940102 0.0105880204 0.994705990 [15,] 0.0035760792 0.0071521585 0.996423921 [16,] 0.0033700659 0.0067401319 0.996629934 [17,] 0.0024567665 0.0049135330 0.997543234 [18,] 0.0016106297 0.0032212594 0.998389370 [19,] 0.0010330188 0.0020660377 0.998966981 [20,] 0.0008662631 0.0017325262 0.999133737 [21,] 0.0009235820 0.0018471640 0.999076418 [22,] 0.0007362595 0.0014725190 0.999263740 [23,] 0.0004257307 0.0008514613 0.999574269 [24,] 0.0003629585 0.0007259171 0.999637041 [25,] 0.0004238447 0.0008476895 0.999576155 [26,] 0.0002827006 0.0005654012 0.999717299 [27,] 0.0042901746 0.0085803493 0.995709825 [28,] 0.0278337598 0.0556675196 0.972166240 [29,] 0.0427285469 0.0854570938 0.957271453 [30,] 0.0334267494 0.0668534988 0.966573251 [31,] 0.0260730971 0.0521461943 0.973926903 [32,] 0.0251390003 0.0502780007 0.974861000 [33,] 0.0247203744 0.0494407487 0.975279626 [34,] 0.0214005319 0.0428010637 0.978599468 [35,] 0.0157256327 0.0314512654 0.984274367 [36,] 0.0113896486 0.0227792973 0.988610351 [37,] 0.0089988036 0.0179976072 0.991001196 [38,] 0.0064068763 0.0128137527 0.993593124 [39,] 0.0048269067 0.0096538135 0.995173093 [40,] 0.0065880262 0.0131760525 0.993411974 [41,] 0.0102192376 0.0204384753 0.989780762 [42,] 0.0143075501 0.0286151001 0.985692450 [43,] 0.0208268690 0.0416537379 0.979173131 [44,] 0.0209445055 0.0418890110 0.979055495 [45,] 0.0375663797 0.0751327594 0.962433620 [46,] 0.0840210559 0.1680421118 0.915978944 [47,] 0.1074218084 0.2148436167 0.892578192 [48,] 0.1016011945 0.2032023889 0.898398806 [49,] 0.0824165061 0.1648330122 0.917583494 [50,] 0.0664239157 0.1328478315 0.933576084 [51,] 0.0567982969 0.1135965938 0.943201703 [52,] 0.0485761122 0.0971522244 0.951423888 [53,] 0.0381233318 0.0762466636 0.961876668 [54,] 0.0310067292 0.0620134583 0.968993271 [55,] 0.0239252457 0.0478504913 0.976074754 [56,] 0.0232674064 0.0465348129 0.976732594 [57,] 0.0183911255 0.0367822510 0.981608874 [58,] 0.0170552706 0.0341105412 0.982944729 [59,] 0.0261519929 0.0523039857 0.973848007 [60,] 0.0484660642 0.0969321284 0.951533936 [61,] 0.0668951266 0.1337902532 0.933104873 [62,] 0.1110631812 0.2221263623 0.888936819 [63,] 0.0888213214 0.1776426429 0.911178679 [64,] 0.0695412918 0.1390825835 0.930458708 [65,] 0.0714198669 0.1428397338 0.928580133 [66,] 0.0733384609 0.1466769218 0.926661539 [67,] 0.1329942319 0.2659884638 0.867005768 [68,] 0.1772213935 0.3544427869 0.822778607 [69,] 0.4686567157 0.9373134315 0.531343284 [70,] 0.7239259896 0.5521480207 0.276074010 [71,] 0.8177169841 0.3645660317 0.182283016 [72,] 0.8378636487 0.3242727026 0.162136351 [73,] 0.9031826518 0.1936346964 0.096817348 [74,] 0.9180739021 0.1638521957 0.081926098 [75,] 0.8986477824 0.2027044352 0.101352218 [76,] 0.8748370271 0.2503259458 0.125162973 [77,] 0.8735290395 0.2529419211 0.126470961 [78,] 0.8601228810 0.2797542380 0.139877119 [79,] 0.8377870290 0.3244259420 0.162212971 [80,] 0.8097771729 0.3804456542 0.190222827 [81,] 0.7739727590 0.4520544820 0.226027241 [82,] 0.7293741969 0.5412516061 0.270625803 [83,] 0.6959555913 0.6080888174 0.304044409 [84,] 0.6439576778 0.7120846444 0.356042322 [85,] 0.5915635730 0.8168728541 0.408436427 [86,] 0.5360548933 0.9278902134 0.463945107 [87,] 0.4896824975 0.9793649949 0.510317503 [88,] 0.5095266283 0.9809467433 0.490473372 [89,] 0.4481024308 0.8962048615 0.551897569 [90,] 0.3914424673 0.7828849346 0.608557533 [91,] 0.3728944045 0.7457888089 0.627105596 [92,] 0.3315363628 0.6630727256 0.668463637 [93,] 0.2738574689 0.5477149379 0.726142531 [94,] 0.2420690262 0.4841380524 0.757930974 [95,] 0.1987639268 0.3975278537 0.801236073 [96,] 0.1953564755 0.3907129511 0.804643524 [97,] 0.2598395797 0.5196791594 0.740160420 [98,] 0.5917301266 0.8165397468 0.408269873 [99,] 0.5983044489 0.8033911023 0.401695551 [100,] 0.7085824171 0.5828351657 0.291417583 [101,] 0.9882408537 0.0235182926 0.011759146 [102,] 0.9733319146 0.0533361707 0.026668085 [103,] 0.9379543805 0.1240912389 0.062045619 [104,] 0.9555299672 0.0889400657 0.044470033 [105,] 0.9958414077 0.0083171846 0.004158592 > postscript(file="/var/www/html/rcomp/tmp/1jw4t1292700717.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/2jw4t1292700717.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/3c64x1292700717.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/4c64x1292700717.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/5c64x1292700717.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 -5.697312e-01 2.789565e-01 2.387741e-01 -3.053353e-01 -5.145871e-01 6 7 8 9 10 -6.259955e-01 -1.183585e+00 -1.933774e-02 -4.931812e-01 -3.396359e-01 11 12 13 14 15 -3.179811e-01 -1.128700e-01 2.878288e-02 -7.665223e-02 -3.713182e-02 16 17 18 19 20 8.603377e-02 6.653464e-02 -1.396720e-02 1.829039e-01 -8.954551e-03 21 22 23 24 25 1.292591e-01 -2.736428e-02 -2.623838e-01 5.991692e-02 -3.744249e-02 26 27 28 29 30 1.374232e-01 3.131232e-01 3.384300e-01 3.723152e-01 -2.931826e-02 31 32 33 34 35 -4.694131e-01 -6.675679e-01 -4.171391e-01 5.607175e-01 8.858509e-01 36 37 38 39 40 7.227425e-01 3.505442e-01 -1.132253e-01 -2.755234e-01 6.688839e-01 41 42 43 44 45 6.698794e-01 4.538589e-01 3.376225e-02 -1.338240e-01 3.284731e-01 46 47 48 49 50 2.966093e-01 7.772444e-01 8.015674e-01 7.605987e-01 7.923273e-01 51 52 53 54 55 3.052302e-01 -7.230471e-02 -3.580797e-01 -2.375734e-01 -2.227731e-01 56 57 58 59 60 -1.712611e-02 1.195767e-01 -1.194333e-01 -8.192012e-02 2.387614e-02 61 62 63 64 65 2.207472e-01 2.490212e-01 4.698415e-01 -5.092375e-05 -1.582093e-01 66 67 68 69 70 -5.195233e-01 -7.644190e-01 -6.710265e-01 -7.929812e-01 -3.269130e-02 71 72 73 74 75 1.211921e-01 5.329225e-01 6.426938e-01 8.992214e-01 6.875141e-01 76 77 78 79 80 9.939474e-01 5.376075e-01 1.918139e-01 -4.668318e-01 -9.000328e-01 81 82 83 84 85 -6.770560e-01 -1.830179e-01 -5.788451e-02 -4.062679e-01 2.446163e-02 86 87 88 89 90 7.057729e-02 -1.132145e-01 1.013336e-01 2.298827e-02 -3.100635e-01 91 92 93 94 95 -1.226052e-01 -1.111978e-01 -2.326801e-01 -2.392877e-01 -6.795803e-01 96 97 98 99 100 -8.157587e-02 1.908343e-01 4.752861e-01 3.256908e-01 -2.407229e-01 101 102 103 104 105 -3.970868e-01 -2.507824e-01 1.838273e-01 2.175632e-01 1.335827e-01 106 107 108 109 110 -8.908515e-01 -1.382561e+00 -1.363511e+00 -6.264609e-01 -1.608193e-01 111 112 113 114 115 1.327465e-01 4.199919e-01 2.175086e-01 9.587703e-02 -2.374492e-01 116 117 118 119 120 5.428301e-02 3.053488e-01 5.709749e-01 7.732925e-01 5.849127e-01 > postscript(file="/var/www/html/rcomp/tmp/6mf3z1292700717.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 -5.697312e-01 NA 1 2.789565e-01 -5.697312e-01 2 2.387741e-01 2.789565e-01 3 -3.053353e-01 2.387741e-01 4 -5.145871e-01 -3.053353e-01 5 -6.259955e-01 -5.145871e-01 6 -1.183585e+00 -6.259955e-01 7 -1.933774e-02 -1.183585e+00 8 -4.931812e-01 -1.933774e-02 9 -3.396359e-01 -4.931812e-01 10 -3.179811e-01 -3.396359e-01 11 -1.128700e-01 -3.179811e-01 12 2.878288e-02 -1.128700e-01 13 -7.665223e-02 2.878288e-02 14 -3.713182e-02 -7.665223e-02 15 8.603377e-02 -3.713182e-02 16 6.653464e-02 8.603377e-02 17 -1.396720e-02 6.653464e-02 18 1.829039e-01 -1.396720e-02 19 -8.954551e-03 1.829039e-01 20 1.292591e-01 -8.954551e-03 21 -2.736428e-02 1.292591e-01 22 -2.623838e-01 -2.736428e-02 23 5.991692e-02 -2.623838e-01 24 -3.744249e-02 5.991692e-02 25 1.374232e-01 -3.744249e-02 26 3.131232e-01 1.374232e-01 27 3.384300e-01 3.131232e-01 28 3.723152e-01 3.384300e-01 29 -2.931826e-02 3.723152e-01 30 -4.694131e-01 -2.931826e-02 31 -6.675679e-01 -4.694131e-01 32 -4.171391e-01 -6.675679e-01 33 5.607175e-01 -4.171391e-01 34 8.858509e-01 5.607175e-01 35 7.227425e-01 8.858509e-01 36 3.505442e-01 7.227425e-01 37 -1.132253e-01 3.505442e-01 38 -2.755234e-01 -1.132253e-01 39 6.688839e-01 -2.755234e-01 40 6.698794e-01 6.688839e-01 41 4.538589e-01 6.698794e-01 42 3.376225e-02 4.538589e-01 43 -1.338240e-01 3.376225e-02 44 3.284731e-01 -1.338240e-01 45 2.966093e-01 3.284731e-01 46 7.772444e-01 2.966093e-01 47 8.015674e-01 7.772444e-01 48 7.605987e-01 8.015674e-01 49 7.923273e-01 7.605987e-01 50 3.052302e-01 7.923273e-01 51 -7.230471e-02 3.052302e-01 52 -3.580797e-01 -7.230471e-02 53 -2.375734e-01 -3.580797e-01 54 -2.227731e-01 -2.375734e-01 55 -1.712611e-02 -2.227731e-01 56 1.195767e-01 -1.712611e-02 57 -1.194333e-01 1.195767e-01 58 -8.192012e-02 -1.194333e-01 59 2.387614e-02 -8.192012e-02 60 2.207472e-01 2.387614e-02 61 2.490212e-01 2.207472e-01 62 4.698415e-01 2.490212e-01 63 -5.092375e-05 4.698415e-01 64 -1.582093e-01 -5.092375e-05 65 -5.195233e-01 -1.582093e-01 66 -7.644190e-01 -5.195233e-01 67 -6.710265e-01 -7.644190e-01 68 -7.929812e-01 -6.710265e-01 69 -3.269130e-02 -7.929812e-01 70 1.211921e-01 -3.269130e-02 71 5.329225e-01 1.211921e-01 72 6.426938e-01 5.329225e-01 73 8.992214e-01 6.426938e-01 74 6.875141e-01 8.992214e-01 75 9.939474e-01 6.875141e-01 76 5.376075e-01 9.939474e-01 77 1.918139e-01 5.376075e-01 78 -4.668318e-01 1.918139e-01 79 -9.000328e-01 -4.668318e-01 80 -6.770560e-01 -9.000328e-01 81 -1.830179e-01 -6.770560e-01 82 -5.788451e-02 -1.830179e-01 83 -4.062679e-01 -5.788451e-02 84 2.446163e-02 -4.062679e-01 85 7.057729e-02 2.446163e-02 86 -1.132145e-01 7.057729e-02 87 1.013336e-01 -1.132145e-01 88 2.298827e-02 1.013336e-01 89 -3.100635e-01 2.298827e-02 90 -1.226052e-01 -3.100635e-01 91 -1.111978e-01 -1.226052e-01 92 -2.326801e-01 -1.111978e-01 93 -2.392877e-01 -2.326801e-01 94 -6.795803e-01 -2.392877e-01 95 -8.157587e-02 -6.795803e-01 96 1.908343e-01 -8.157587e-02 97 4.752861e-01 1.908343e-01 98 3.256908e-01 4.752861e-01 99 -2.407229e-01 3.256908e-01 100 -3.970868e-01 -2.407229e-01 101 -2.507824e-01 -3.970868e-01 102 1.838273e-01 -2.507824e-01 103 2.175632e-01 1.838273e-01 104 1.335827e-01 2.175632e-01 105 -8.908515e-01 1.335827e-01 106 -1.382561e+00 -8.908515e-01 107 -1.363511e+00 -1.382561e+00 108 -6.264609e-01 -1.363511e+00 109 -1.608193e-01 -6.264609e-01 110 1.327465e-01 -1.608193e-01 111 4.199919e-01 1.327465e-01 112 2.175086e-01 4.199919e-01 113 9.587703e-02 2.175086e-01 114 -2.374492e-01 9.587703e-02 115 5.428301e-02 -2.374492e-01 116 3.053488e-01 5.428301e-02 117 5.709749e-01 3.053488e-01 118 7.732925e-01 5.709749e-01 119 5.849127e-01 7.732925e-01 120 NA 5.849127e-01 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.789565e-01 -5.697312e-01 [2,] 2.387741e-01 2.789565e-01 [3,] -3.053353e-01 2.387741e-01 [4,] -5.145871e-01 -3.053353e-01 [5,] -6.259955e-01 -5.145871e-01 [6,] -1.183585e+00 -6.259955e-01 [7,] -1.933774e-02 -1.183585e+00 [8,] -4.931812e-01 -1.933774e-02 [9,] -3.396359e-01 -4.931812e-01 [10,] -3.179811e-01 -3.396359e-01 [11,] -1.128700e-01 -3.179811e-01 [12,] 2.878288e-02 -1.128700e-01 [13,] -7.665223e-02 2.878288e-02 [14,] -3.713182e-02 -7.665223e-02 [15,] 8.603377e-02 -3.713182e-02 [16,] 6.653464e-02 8.603377e-02 [17,] -1.396720e-02 6.653464e-02 [18,] 1.829039e-01 -1.396720e-02 [19,] -8.954551e-03 1.829039e-01 [20,] 1.292591e-01 -8.954551e-03 [21,] -2.736428e-02 1.292591e-01 [22,] -2.623838e-01 -2.736428e-02 [23,] 5.991692e-02 -2.623838e-01 [24,] -3.744249e-02 5.991692e-02 [25,] 1.374232e-01 -3.744249e-02 [26,] 3.131232e-01 1.374232e-01 [27,] 3.384300e-01 3.131232e-01 [28,] 3.723152e-01 3.384300e-01 [29,] -2.931826e-02 3.723152e-01 [30,] -4.694131e-01 -2.931826e-02 [31,] -6.675679e-01 -4.694131e-01 [32,] -4.171391e-01 -6.675679e-01 [33,] 5.607175e-01 -4.171391e-01 [34,] 8.858509e-01 5.607175e-01 [35,] 7.227425e-01 8.858509e-01 [36,] 3.505442e-01 7.227425e-01 [37,] -1.132253e-01 3.505442e-01 [38,] -2.755234e-01 -1.132253e-01 [39,] 6.688839e-01 -2.755234e-01 [40,] 6.698794e-01 6.688839e-01 [41,] 4.538589e-01 6.698794e-01 [42,] 3.376225e-02 4.538589e-01 [43,] -1.338240e-01 3.376225e-02 [44,] 3.284731e-01 -1.338240e-01 [45,] 2.966093e-01 3.284731e-01 [46,] 7.772444e-01 2.966093e-01 [47,] 8.015674e-01 7.772444e-01 [48,] 7.605987e-01 8.015674e-01 [49,] 7.923273e-01 7.605987e-01 [50,] 3.052302e-01 7.923273e-01 [51,] -7.230471e-02 3.052302e-01 [52,] -3.580797e-01 -7.230471e-02 [53,] -2.375734e-01 -3.580797e-01 [54,] -2.227731e-01 -2.375734e-01 [55,] -1.712611e-02 -2.227731e-01 [56,] 1.195767e-01 -1.712611e-02 [57,] -1.194333e-01 1.195767e-01 [58,] -8.192012e-02 -1.194333e-01 [59,] 2.387614e-02 -8.192012e-02 [60,] 2.207472e-01 2.387614e-02 [61,] 2.490212e-01 2.207472e-01 [62,] 4.698415e-01 2.490212e-01 [63,] -5.092375e-05 4.698415e-01 [64,] -1.582093e-01 -5.092375e-05 [65,] -5.195233e-01 -1.582093e-01 [66,] -7.644190e-01 -5.195233e-01 [67,] -6.710265e-01 -7.644190e-01 [68,] -7.929812e-01 -6.710265e-01 [69,] -3.269130e-02 -7.929812e-01 [70,] 1.211921e-01 -3.269130e-02 [71,] 5.329225e-01 1.211921e-01 [72,] 6.426938e-01 5.329225e-01 [73,] 8.992214e-01 6.426938e-01 [74,] 6.875141e-01 8.992214e-01 [75,] 9.939474e-01 6.875141e-01 [76,] 5.376075e-01 9.939474e-01 [77,] 1.918139e-01 5.376075e-01 [78,] -4.668318e-01 1.918139e-01 [79,] -9.000328e-01 -4.668318e-01 [80,] -6.770560e-01 -9.000328e-01 [81,] -1.830179e-01 -6.770560e-01 [82,] -5.788451e-02 -1.830179e-01 [83,] -4.062679e-01 -5.788451e-02 [84,] 2.446163e-02 -4.062679e-01 [85,] 7.057729e-02 2.446163e-02 [86,] -1.132145e-01 7.057729e-02 [87,] 1.013336e-01 -1.132145e-01 [88,] 2.298827e-02 1.013336e-01 [89,] -3.100635e-01 2.298827e-02 [90,] -1.226052e-01 -3.100635e-01 [91,] -1.111978e-01 -1.226052e-01 [92,] -2.326801e-01 -1.111978e-01 [93,] -2.392877e-01 -2.326801e-01 [94,] -6.795803e-01 -2.392877e-01 [95,] -8.157587e-02 -6.795803e-01 [96,] 1.908343e-01 -8.157587e-02 [97,] 4.752861e-01 1.908343e-01 [98,] 3.256908e-01 4.752861e-01 [99,] -2.407229e-01 3.256908e-01 [100,] -3.970868e-01 -2.407229e-01 [101,] -2.507824e-01 -3.970868e-01 [102,] 1.838273e-01 -2.507824e-01 [103,] 2.175632e-01 1.838273e-01 [104,] 1.335827e-01 2.175632e-01 [105,] -8.908515e-01 1.335827e-01 [106,] -1.382561e+00 -8.908515e-01 [107,] -1.363511e+00 -1.382561e+00 [108,] -6.264609e-01 -1.363511e+00 [109,] -1.608193e-01 -6.264609e-01 [110,] 1.327465e-01 -1.608193e-01 [111,] 4.199919e-01 1.327465e-01 [112,] 2.175086e-01 4.199919e-01 [113,] 9.587703e-02 2.175086e-01 [114,] -2.374492e-01 9.587703e-02 [115,] 5.428301e-02 -2.374492e-01 [116,] 3.053488e-01 5.428301e-02 [117,] 5.709749e-01 3.053488e-01 [118,] 7.732925e-01 5.709749e-01 [119,] 5.849127e-01 7.732925e-01 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.789565e-01 -5.697312e-01 2 2.387741e-01 2.789565e-01 3 -3.053353e-01 2.387741e-01 4 -5.145871e-01 -3.053353e-01 5 -6.259955e-01 -5.145871e-01 6 -1.183585e+00 -6.259955e-01 7 -1.933774e-02 -1.183585e+00 8 -4.931812e-01 -1.933774e-02 9 -3.396359e-01 -4.931812e-01 10 -3.179811e-01 -3.396359e-01 11 -1.128700e-01 -3.179811e-01 12 2.878288e-02 -1.128700e-01 13 -7.665223e-02 2.878288e-02 14 -3.713182e-02 -7.665223e-02 15 8.603377e-02 -3.713182e-02 16 6.653464e-02 8.603377e-02 17 -1.396720e-02 6.653464e-02 18 1.829039e-01 -1.396720e-02 19 -8.954551e-03 1.829039e-01 20 1.292591e-01 -8.954551e-03 21 -2.736428e-02 1.292591e-01 22 -2.623838e-01 -2.736428e-02 23 5.991692e-02 -2.623838e-01 24 -3.744249e-02 5.991692e-02 25 1.374232e-01 -3.744249e-02 26 3.131232e-01 1.374232e-01 27 3.384300e-01 3.131232e-01 28 3.723152e-01 3.384300e-01 29 -2.931826e-02 3.723152e-01 30 -4.694131e-01 -2.931826e-02 31 -6.675679e-01 -4.694131e-01 32 -4.171391e-01 -6.675679e-01 33 5.607175e-01 -4.171391e-01 34 8.858509e-01 5.607175e-01 35 7.227425e-01 8.858509e-01 36 3.505442e-01 7.227425e-01 37 -1.132253e-01 3.505442e-01 38 -2.755234e-01 -1.132253e-01 39 6.688839e-01 -2.755234e-01 40 6.698794e-01 6.688839e-01 41 4.538589e-01 6.698794e-01 42 3.376225e-02 4.538589e-01 43 -1.338240e-01 3.376225e-02 44 3.284731e-01 -1.338240e-01 45 2.966093e-01 3.284731e-01 46 7.772444e-01 2.966093e-01 47 8.015674e-01 7.772444e-01 48 7.605987e-01 8.015674e-01 49 7.923273e-01 7.605987e-01 50 3.052302e-01 7.923273e-01 51 -7.230471e-02 3.052302e-01 52 -3.580797e-01 -7.230471e-02 53 -2.375734e-01 -3.580797e-01 54 -2.227731e-01 -2.375734e-01 55 -1.712611e-02 -2.227731e-01 56 1.195767e-01 -1.712611e-02 57 -1.194333e-01 1.195767e-01 58 -8.192012e-02 -1.194333e-01 59 2.387614e-02 -8.192012e-02 60 2.207472e-01 2.387614e-02 61 2.490212e-01 2.207472e-01 62 4.698415e-01 2.490212e-01 63 -5.092375e-05 4.698415e-01 64 -1.582093e-01 -5.092375e-05 65 -5.195233e-01 -1.582093e-01 66 -7.644190e-01 -5.195233e-01 67 -6.710265e-01 -7.644190e-01 68 -7.929812e-01 -6.710265e-01 69 -3.269130e-02 -7.929812e-01 70 1.211921e-01 -3.269130e-02 71 5.329225e-01 1.211921e-01 72 6.426938e-01 5.329225e-01 73 8.992214e-01 6.426938e-01 74 6.875141e-01 8.992214e-01 75 9.939474e-01 6.875141e-01 76 5.376075e-01 9.939474e-01 77 1.918139e-01 5.376075e-01 78 -4.668318e-01 1.918139e-01 79 -9.000328e-01 -4.668318e-01 80 -6.770560e-01 -9.000328e-01 81 -1.830179e-01 -6.770560e-01 82 -5.788451e-02 -1.830179e-01 83 -4.062679e-01 -5.788451e-02 84 2.446163e-02 -4.062679e-01 85 7.057729e-02 2.446163e-02 86 -1.132145e-01 7.057729e-02 87 1.013336e-01 -1.132145e-01 88 2.298827e-02 1.013336e-01 89 -3.100635e-01 2.298827e-02 90 -1.226052e-01 -3.100635e-01 91 -1.111978e-01 -1.226052e-01 92 -2.326801e-01 -1.111978e-01 93 -2.392877e-01 -2.326801e-01 94 -6.795803e-01 -2.392877e-01 95 -8.157587e-02 -6.795803e-01 96 1.908343e-01 -8.157587e-02 97 4.752861e-01 1.908343e-01 98 3.256908e-01 4.752861e-01 99 -2.407229e-01 3.256908e-01 100 -3.970868e-01 -2.407229e-01 101 -2.507824e-01 -3.970868e-01 102 1.838273e-01 -2.507824e-01 103 2.175632e-01 1.838273e-01 104 1.335827e-01 2.175632e-01 105 -8.908515e-01 1.335827e-01 106 -1.382561e+00 -8.908515e-01 107 -1.363511e+00 -1.382561e+00 108 -6.264609e-01 -1.363511e+00 109 -1.608193e-01 -6.264609e-01 110 1.327465e-01 -1.608193e-01 111 4.199919e-01 1.327465e-01 112 2.175086e-01 4.199919e-01 113 9.587703e-02 2.175086e-01 114 -2.374492e-01 9.587703e-02 115 5.428301e-02 -2.374492e-01 116 3.053488e-01 5.428301e-02 117 5.709749e-01 3.053488e-01 118 7.732925e-01 5.709749e-01 119 5.849127e-01 7.732925e-01 > 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/7mf3z1292700717.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/8x6221292700717.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/9x6221292700717.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/10qgk51292700717.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/11tyit1292700717.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/12egyh1292700717.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/13sqwq1292700717.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/14wrvw1292700717.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/15zru21292700717.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/163aa71292700717.tab") + } > > try(system("convert tmp/1jw4t1292700717.ps tmp/1jw4t1292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/2jw4t1292700717.ps tmp/2jw4t1292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/3c64x1292700717.ps tmp/3c64x1292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/4c64x1292700717.ps tmp/4c64x1292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/5c64x1292700717.ps tmp/5c64x1292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/6mf3z1292700717.ps tmp/6mf3z1292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/7mf3z1292700717.ps tmp/7mf3z1292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/8x6221292700717.ps tmp/8x6221292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/9x6221292700717.ps tmp/9x6221292700717.png",intern=TRUE)) character(0) > try(system("convert tmp/10qgk51292700717.ps tmp/10qgk51292700717.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.349 1.718 8.638