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(9.3,96.8,9.3,114.1,8.7,110.3,8.2,103.9,8.3,101.6,8.5,94.6,8.6,95.9,8.5,104.7,8.2,102.8,8.1,98.1,7.9,113.9,8.6,80.9,8.7,95.7,8.7,113.2,8.5,105.9,8.4,108.8,8.5,102.3,8.7,99,8.7,100.7,8.6,115.5,8.5,100.7,8.3,109.9,8,114.6,8.2,85.4,8.1,100.5,8.1,114.8,8,116.5,7.9,112.9,7.9,102,8,106,8,105.3,7.9,118.8,8,106.1,7.7,109.3,7.2,117.2,7.5,92.5,7.3,104.2,7,112.5,7,122.4,7,113.3,7.2,100,7.3,110.7,7.1,112.8,6.8,109.8,6.4,117.3,6.1,109.1,6.5,115.9,7.7,96,7.9,99.8,7.5,116.8,6.9,115.7,6.6,99.4,6.9,94.3,7.7,91,8,93.2,8,103.1,7.7,94.1,7.3,91.8,7.4,102.7,8.1,82.6),dim=c(2,60),dimnames=list(c('werklh','ecogr'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('werklh','ecogr'),1:60)) > 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 werklh ecogr t 1 9.3 96.8 1 2 9.3 114.1 2 3 8.7 110.3 3 4 8.2 103.9 4 5 8.3 101.6 5 6 8.5 94.6 6 7 8.6 95.9 7 8 8.5 104.7 8 9 8.2 102.8 9 10 8.1 98.1 10 11 7.9 113.9 11 12 8.6 80.9 12 13 8.7 95.7 13 14 8.7 113.2 14 15 8.5 105.9 15 16 8.4 108.8 16 17 8.5 102.3 17 18 8.7 99.0 18 19 8.7 100.7 19 20 8.6 115.5 20 21 8.5 100.7 21 22 8.3 109.9 22 23 8.0 114.6 23 24 8.2 85.4 24 25 8.1 100.5 25 26 8.1 114.8 26 27 8.0 116.5 27 28 7.9 112.9 28 29 7.9 102.0 29 30 8.0 106.0 30 31 8.0 105.3 31 32 7.9 118.8 32 33 8.0 106.1 33 34 7.7 109.3 34 35 7.2 117.2 35 36 7.5 92.5 36 37 7.3 104.2 37 38 7.0 112.5 38 39 7.0 122.4 39 40 7.0 113.3 40 41 7.2 100.0 41 42 7.3 110.7 42 43 7.1 112.8 43 44 6.8 109.8 44 45 6.4 117.3 45 46 6.1 109.1 46 47 6.5 115.9 47 48 7.7 96.0 48 49 7.9 99.8 49 50 7.5 116.8 50 51 6.9 115.7 51 52 6.6 99.4 52 53 6.9 94.3 53 54 7.7 91.0 54 55 8.0 93.2 55 56 8.0 103.1 56 57 7.7 94.1 57 58 7.3 91.8 58 59 7.4 102.7 59 60 8.1 82.6 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ecogr t 11.16034 -0.02264 -0.03048 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.18879 -0.36016 0.07606 0.30702 0.88017 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 11.160344 0.640388 17.427 < 2e-16 *** ecogr -0.022636 0.005980 -3.785 0.000371 *** t -0.030478 0.003241 -9.403 3.41e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4344 on 57 degrees of freedom Multiple R-squared: 0.6364, Adjusted R-squared: 0.6237 F-statistic: 49.89 on 2 and 57 DF, p-value: 2.994e-13 > 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.410342298 0.82068460 0.5896577 [2,] 0.436673088 0.87334618 0.5633269 [3,] 0.369274745 0.73854949 0.6307253 [4,] 0.252672911 0.50534582 0.7473271 [5,] 0.174297513 0.34859503 0.8257025 [6,] 0.111581855 0.22316371 0.8884181 [7,] 0.164812152 0.32962430 0.8351878 [8,] 0.265324271 0.53064854 0.7346757 [9,] 0.382679857 0.76535971 0.6173201 [10,] 0.320755050 0.64151010 0.6792450 [11,] 0.248124663 0.49624933 0.7518753 [12,] 0.194404971 0.38880994 0.8055950 [13,] 0.175205126 0.35041025 0.8247949 [14,] 0.151567028 0.30313406 0.8484330 [15,] 0.144536313 0.28907263 0.8554637 [16,] 0.105050389 0.21010078 0.8949496 [17,] 0.079646050 0.15929210 0.9203539 [18,] 0.070464087 0.14092817 0.9295359 [19,] 0.054076918 0.10815384 0.9459231 [20,] 0.037237218 0.07447444 0.9627628 [21,] 0.028989911 0.05797982 0.9710101 [22,] 0.024265357 0.04853071 0.9757346 [23,] 0.019148610 0.03829722 0.9808514 [24,] 0.012789749 0.02557950 0.9872103 [25,] 0.008763741 0.01752748 0.9912363 [26,] 0.006302349 0.01260470 0.9936977 [27,] 0.009119894 0.01823979 0.9908801 [28,] 0.010456888 0.02091378 0.9895431 [29,] 0.012040744 0.02408149 0.9879593 [30,] 0.022314358 0.04462872 0.9776856 [31,] 0.017452595 0.03490519 0.9825474 [32,] 0.015910244 0.03182049 0.9840898 [33,] 0.019680284 0.03936057 0.9803197 [34,] 0.022582537 0.04516507 0.9774175 [35,] 0.019820318 0.03964064 0.9801797 [36,] 0.013033309 0.02606662 0.9869667 [37,] 0.012292049 0.02458410 0.9877080 [38,] 0.010717827 0.02143565 0.9892822 [39,] 0.008096624 0.01619325 0.9919034 [40,] 0.009848285 0.01969657 0.9901517 [41,] 0.057856348 0.11571270 0.9421437 [42,] 0.070899308 0.14179862 0.9291007 [43,] 0.073899218 0.14779844 0.9261008 [44,] 0.179029540 0.35805908 0.8209705 [45,] 0.258766903 0.51753381 0.7412331 [46,] 0.177641637 0.35528327 0.8223584 [47,] 0.238285940 0.47657188 0.7617141 [48,] 0.499218528 0.99843706 0.5007815 [49,] 0.441614037 0.88322807 0.5583860 > postscript(file="/var/www/html/rcomp/tmp/1gsko1261074836.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/2qqxe1261074836.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/3ogur1261074836.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/4rzw21261074836.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/576o91261074836.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 = 60 Frequency = 1 1 2 3 4 5 6 0.36127618 0.78335294 0.12781508 -0.48657576 -0.40815998 -0.33613228 7 8 9 10 11 12 -0.17622774 -0.04655497 -0.35908488 -0.53499492 -0.34687181 -0.36337398 13 14 15 16 17 18 0.10211338 0.52871729 0.19395426 0.19007602 0.17342160 0.32920162 19 20 21 22 23 24 0.39816047 0.66364782 0.25911656 0.29784363 0.13470976 -0.29577650 25 26 27 28 29 30 -0.02349842 0.33067105 0.29962990 0.14861919 -0.06763259 0.15338851 31 32 33 34 35 36 0.16802152 0.40408238 0.24708622 0.04999871 -0.24070071 -0.46932604 37 38 39 40 41 42 -0.37400955 -0.45565467 -0.20108256 -0.37658997 -0.44716758 -0.07448686 43 44 45 46 47 48 -0.19647371 -0.53390296 -0.73365669 -1.18879191 -0.60439066 0.17563568 49 50 51 52 53 54 0.49212962 0.50741566 -0.08700564 -0.72549055 -0.51045490 0.24532513 55 56 57 58 59 60 0.62560185 0.88017396 0.40693013 -0.01465408 0.36255379 0.63805298 > postscript(file="/var/www/html/rcomp/tmp/611ow1261074836.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 0.36127618 NA 1 0.78335294 0.36127618 2 0.12781508 0.78335294 3 -0.48657576 0.12781508 4 -0.40815998 -0.48657576 5 -0.33613228 -0.40815998 6 -0.17622774 -0.33613228 7 -0.04655497 -0.17622774 8 -0.35908488 -0.04655497 9 -0.53499492 -0.35908488 10 -0.34687181 -0.53499492 11 -0.36337398 -0.34687181 12 0.10211338 -0.36337398 13 0.52871729 0.10211338 14 0.19395426 0.52871729 15 0.19007602 0.19395426 16 0.17342160 0.19007602 17 0.32920162 0.17342160 18 0.39816047 0.32920162 19 0.66364782 0.39816047 20 0.25911656 0.66364782 21 0.29784363 0.25911656 22 0.13470976 0.29784363 23 -0.29577650 0.13470976 24 -0.02349842 -0.29577650 25 0.33067105 -0.02349842 26 0.29962990 0.33067105 27 0.14861919 0.29962990 28 -0.06763259 0.14861919 29 0.15338851 -0.06763259 30 0.16802152 0.15338851 31 0.40408238 0.16802152 32 0.24708622 0.40408238 33 0.04999871 0.24708622 34 -0.24070071 0.04999871 35 -0.46932604 -0.24070071 36 -0.37400955 -0.46932604 37 -0.45565467 -0.37400955 38 -0.20108256 -0.45565467 39 -0.37658997 -0.20108256 40 -0.44716758 -0.37658997 41 -0.07448686 -0.44716758 42 -0.19647371 -0.07448686 43 -0.53390296 -0.19647371 44 -0.73365669 -0.53390296 45 -1.18879191 -0.73365669 46 -0.60439066 -1.18879191 47 0.17563568 -0.60439066 48 0.49212962 0.17563568 49 0.50741566 0.49212962 50 -0.08700564 0.50741566 51 -0.72549055 -0.08700564 52 -0.51045490 -0.72549055 53 0.24532513 -0.51045490 54 0.62560185 0.24532513 55 0.88017396 0.62560185 56 0.40693013 0.88017396 57 -0.01465408 0.40693013 58 0.36255379 -0.01465408 59 0.63805298 0.36255379 60 NA 0.63805298 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.78335294 0.36127618 [2,] 0.12781508 0.78335294 [3,] -0.48657576 0.12781508 [4,] -0.40815998 -0.48657576 [5,] -0.33613228 -0.40815998 [6,] -0.17622774 -0.33613228 [7,] -0.04655497 -0.17622774 [8,] -0.35908488 -0.04655497 [9,] -0.53499492 -0.35908488 [10,] -0.34687181 -0.53499492 [11,] -0.36337398 -0.34687181 [12,] 0.10211338 -0.36337398 [13,] 0.52871729 0.10211338 [14,] 0.19395426 0.52871729 [15,] 0.19007602 0.19395426 [16,] 0.17342160 0.19007602 [17,] 0.32920162 0.17342160 [18,] 0.39816047 0.32920162 [19,] 0.66364782 0.39816047 [20,] 0.25911656 0.66364782 [21,] 0.29784363 0.25911656 [22,] 0.13470976 0.29784363 [23,] -0.29577650 0.13470976 [24,] -0.02349842 -0.29577650 [25,] 0.33067105 -0.02349842 [26,] 0.29962990 0.33067105 [27,] 0.14861919 0.29962990 [28,] -0.06763259 0.14861919 [29,] 0.15338851 -0.06763259 [30,] 0.16802152 0.15338851 [31,] 0.40408238 0.16802152 [32,] 0.24708622 0.40408238 [33,] 0.04999871 0.24708622 [34,] -0.24070071 0.04999871 [35,] -0.46932604 -0.24070071 [36,] -0.37400955 -0.46932604 [37,] -0.45565467 -0.37400955 [38,] -0.20108256 -0.45565467 [39,] -0.37658997 -0.20108256 [40,] -0.44716758 -0.37658997 [41,] -0.07448686 -0.44716758 [42,] -0.19647371 -0.07448686 [43,] -0.53390296 -0.19647371 [44,] -0.73365669 -0.53390296 [45,] -1.18879191 -0.73365669 [46,] -0.60439066 -1.18879191 [47,] 0.17563568 -0.60439066 [48,] 0.49212962 0.17563568 [49,] 0.50741566 0.49212962 [50,] -0.08700564 0.50741566 [51,] -0.72549055 -0.08700564 [52,] -0.51045490 -0.72549055 [53,] 0.24532513 -0.51045490 [54,] 0.62560185 0.24532513 [55,] 0.88017396 0.62560185 [56,] 0.40693013 0.88017396 [57,] -0.01465408 0.40693013 [58,] 0.36255379 -0.01465408 [59,] 0.63805298 0.36255379 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.78335294 0.36127618 2 0.12781508 0.78335294 3 -0.48657576 0.12781508 4 -0.40815998 -0.48657576 5 -0.33613228 -0.40815998 6 -0.17622774 -0.33613228 7 -0.04655497 -0.17622774 8 -0.35908488 -0.04655497 9 -0.53499492 -0.35908488 10 -0.34687181 -0.53499492 11 -0.36337398 -0.34687181 12 0.10211338 -0.36337398 13 0.52871729 0.10211338 14 0.19395426 0.52871729 15 0.19007602 0.19395426 16 0.17342160 0.19007602 17 0.32920162 0.17342160 18 0.39816047 0.32920162 19 0.66364782 0.39816047 20 0.25911656 0.66364782 21 0.29784363 0.25911656 22 0.13470976 0.29784363 23 -0.29577650 0.13470976 24 -0.02349842 -0.29577650 25 0.33067105 -0.02349842 26 0.29962990 0.33067105 27 0.14861919 0.29962990 28 -0.06763259 0.14861919 29 0.15338851 -0.06763259 30 0.16802152 0.15338851 31 0.40408238 0.16802152 32 0.24708622 0.40408238 33 0.04999871 0.24708622 34 -0.24070071 0.04999871 35 -0.46932604 -0.24070071 36 -0.37400955 -0.46932604 37 -0.45565467 -0.37400955 38 -0.20108256 -0.45565467 39 -0.37658997 -0.20108256 40 -0.44716758 -0.37658997 41 -0.07448686 -0.44716758 42 -0.19647371 -0.07448686 43 -0.53390296 -0.19647371 44 -0.73365669 -0.53390296 45 -1.18879191 -0.73365669 46 -0.60439066 -1.18879191 47 0.17563568 -0.60439066 48 0.49212962 0.17563568 49 0.50741566 0.49212962 50 -0.08700564 0.50741566 51 -0.72549055 -0.08700564 52 -0.51045490 -0.72549055 53 0.24532513 -0.51045490 54 0.62560185 0.24532513 55 0.88017396 0.62560185 56 0.40693013 0.88017396 57 -0.01465408 0.40693013 58 0.36255379 -0.01465408 59 0.63805298 0.36255379 > 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/71yx71261074836.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/8k4ku1261074836.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/9nnlz1261074836.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/10qs7y1261074836.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/11hsry1261074836.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/12w08g1261074836.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/13yswu1261074836.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/14jg411261074837.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/15jfey1261074837.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/16g08j1261074837.tab") + } > > try(system("convert tmp/1gsko1261074836.ps tmp/1gsko1261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/2qqxe1261074836.ps tmp/2qqxe1261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/3ogur1261074836.ps tmp/3ogur1261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/4rzw21261074836.ps tmp/4rzw21261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/576o91261074836.ps tmp/576o91261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/611ow1261074836.ps tmp/611ow1261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/71yx71261074836.ps tmp/71yx71261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/8k4ku1261074836.ps tmp/8k4ku1261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/9nnlz1261074836.ps tmp/9nnlz1261074836.png",intern=TRUE)) character(0) > try(system("convert tmp/10qs7y1261074836.ps tmp/10qs7y1261074836.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.588 1.640 9.923