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 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x werklh ecogr 1 9.3 96.8 2 9.3 114.1 3 8.7 110.3 4 8.2 103.9 5 8.3 101.6 6 8.5 94.6 7 8.6 95.9 8 8.5 104.7 9 8.2 102.8 10 8.1 98.1 11 7.9 113.9 12 8.6 80.9 13 8.7 95.7 14 8.7 113.2 15 8.5 105.9 16 8.4 108.8 17 8.5 102.3 18 8.7 99.0 19 8.7 100.7 20 8.6 115.5 21 8.5 100.7 22 8.3 109.9 23 8.0 114.6 24 8.2 85.4 25 8.1 100.5 26 8.1 114.8 27 8.0 116.5 28 7.9 112.9 29 7.9 102.0 30 8.0 106.0 31 8.0 105.3 32 7.9 118.8 33 8.0 106.1 34 7.7 109.3 35 7.2 117.2 36 7.5 92.5 37 7.3 104.2 38 7.0 112.5 39 7.0 122.4 40 7.0 113.3 41 7.2 100.0 42 7.3 110.7 43 7.1 112.8 44 6.8 109.8 45 6.4 117.3 46 6.1 109.1 47 6.5 115.9 48 7.7 96.0 49 7.9 99.8 50 7.5 116.8 51 6.9 115.7 52 6.6 99.4 53 6.9 94.3 54 7.7 91.0 55 8.0 93.2 56 8.0 103.1 57 7.7 94.1 58 7.3 91.8 59 7.4 102.7 60 8.1 82.6 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ecogr 9.96949 -0.02014 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.6723 -0.5020 0.1290 0.4678 1.6284 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.969488 0.993981 10.030 2.78e-14 *** ecogr -0.020139 0.009459 -2.129 0.0375 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6878 on 58 degrees of freedom Multiple R-squared: 0.07249, Adjusted R-squared: 0.0565 F-statistic: 4.533 on 1 and 58 DF, p-value: 0.0375 > 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.54552811 0.90894379 0.45447189 [2,] 0.38103350 0.76206700 0.61896650 [3,] 0.24961319 0.49922638 0.75038681 [4,] 0.17065767 0.34131533 0.82934233 [5,] 0.14555066 0.29110132 0.85444934 [6,] 0.11732023 0.23464046 0.88267977 [7,] 0.16289100 0.32578199 0.83710900 [8,] 0.10693952 0.21387905 0.89306048 [9,] 0.07676523 0.15353045 0.92323477 [10,] 0.06308999 0.12617998 0.93691001 [11,] 0.04436095 0.08872189 0.95563905 [12,] 0.03177406 0.06354811 0.96822594 [13,] 0.02219605 0.04439209 0.97780395 [14,] 0.01831090 0.03662180 0.98168910 [15,] 0.01645441 0.03290882 0.98354559 [16,] 0.01775810 0.03551621 0.98224190 [17,] 0.01522195 0.03044390 0.98477805 [18,] 0.01520081 0.03040163 0.98479919 [19,] 0.02021307 0.04042614 0.97978693 [20,] 0.01820387 0.03640773 0.98179613 [21,] 0.01890971 0.03781941 0.98109029 [22,] 0.02350941 0.04701882 0.97649059 [23,] 0.03196143 0.06392285 0.96803857 [24,] 0.04343414 0.08686827 0.95656586 [25,] 0.05299971 0.10599943 0.94700029 [26,] 0.06274882 0.12549763 0.93725118 [27,] 0.07545311 0.15090622 0.92454689 [28,] 0.12766973 0.25533946 0.87233027 [29,] 0.17349629 0.34699258 0.82650371 [30,] 0.23725011 0.47450022 0.76274989 [31,] 0.36119683 0.72239366 0.63880317 [32,] 0.44875850 0.89751700 0.55124150 [33,] 0.51433478 0.97133043 0.48566522 [34,] 0.59826707 0.80346586 0.40173293 [35,] 0.63738057 0.72523886 0.36261943 [36,] 0.65577956 0.68844088 0.34422044 [37,] 0.67412824 0.65174352 0.32587176 [38,] 0.65520355 0.68959290 0.34479645 [39,] 0.63373706 0.73252588 0.36626294 [40,] 0.64316301 0.71367399 0.35683699 [41,] 0.67773929 0.64452141 0.32226071 [42,] 0.89395068 0.21209864 0.10604932 [43,] 0.91477273 0.17045455 0.08522727 [44,] 0.87433920 0.25132159 0.12566080 [45,] 0.84564596 0.30870808 0.15435404 [46,] 0.81723204 0.36553592 0.18276796 [47,] 0.73733946 0.52532108 0.26266054 [48,] 0.87693235 0.24613530 0.12306765 [49,] 0.95713484 0.08573031 0.04286516 [50,] 0.90270646 0.19458708 0.09729354 [51,] 0.81938167 0.36123666 0.18061833 > postscript(file="/var/www/html/rcomp/tmp/1jbrv1261057258.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/286vr1261057258.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/32zf61261057258.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/4fe7y1261057258.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/55l461261057258.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 1.28000421 1.62841555 0.95188589 0.32299384 0.37667325 0.43569757 7 8 9 10 11 12 0.56187877 0.63910534 0.30084051 0.10618541 0.22438767 0.25978801 13 14 15 16 17 18 0.65785089 1.01029010 0.66327260 0.62167682 0.59077082 0.72431086 19 20 21 22 23 24 0.75854781 0.95661069 0.55854781 0.54383014 0.33848524 -0.04958476 25 26 27 28 29 30 0.15451993 0.44251312 0.37675007 0.20424829 -0.01527099 0.16528654 31 32 33 34 35 36 0.15118897 0.32307065 0.16730048 -0.06825349 -0.40915236 -0.60659514 37 38 39 40 41 42 -0.57096435 -0.70380746 -0.50442757 -0.68769596 -0.75554976 -0.44005836 43 44 45 46 47 48 -0.59776565 -0.95818380 -1.20713842 -1.67228137 -1.13533356 -0.33610729 49 50 51 52 53 54 -0.05957764 -0.11720811 -0.73936144 -1.36763339 -1.17034425 -0.43680421 55 56 57 58 59 60 -0.09249757 0.10688233 -0.37437212 -0.82069271 -0.50117342 -0.20597504 > postscript(file="/var/www/html/rcomp/tmp/6q9s21261057258.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 1.28000421 NA 1 1.62841555 1.28000421 2 0.95188589 1.62841555 3 0.32299384 0.95188589 4 0.37667325 0.32299384 5 0.43569757 0.37667325 6 0.56187877 0.43569757 7 0.63910534 0.56187877 8 0.30084051 0.63910534 9 0.10618541 0.30084051 10 0.22438767 0.10618541 11 0.25978801 0.22438767 12 0.65785089 0.25978801 13 1.01029010 0.65785089 14 0.66327260 1.01029010 15 0.62167682 0.66327260 16 0.59077082 0.62167682 17 0.72431086 0.59077082 18 0.75854781 0.72431086 19 0.95661069 0.75854781 20 0.55854781 0.95661069 21 0.54383014 0.55854781 22 0.33848524 0.54383014 23 -0.04958476 0.33848524 24 0.15451993 -0.04958476 25 0.44251312 0.15451993 26 0.37675007 0.44251312 27 0.20424829 0.37675007 28 -0.01527099 0.20424829 29 0.16528654 -0.01527099 30 0.15118897 0.16528654 31 0.32307065 0.15118897 32 0.16730048 0.32307065 33 -0.06825349 0.16730048 34 -0.40915236 -0.06825349 35 -0.60659514 -0.40915236 36 -0.57096435 -0.60659514 37 -0.70380746 -0.57096435 38 -0.50442757 -0.70380746 39 -0.68769596 -0.50442757 40 -0.75554976 -0.68769596 41 -0.44005836 -0.75554976 42 -0.59776565 -0.44005836 43 -0.95818380 -0.59776565 44 -1.20713842 -0.95818380 45 -1.67228137 -1.20713842 46 -1.13533356 -1.67228137 47 -0.33610729 -1.13533356 48 -0.05957764 -0.33610729 49 -0.11720811 -0.05957764 50 -0.73936144 -0.11720811 51 -1.36763339 -0.73936144 52 -1.17034425 -1.36763339 53 -0.43680421 -1.17034425 54 -0.09249757 -0.43680421 55 0.10688233 -0.09249757 56 -0.37437212 0.10688233 57 -0.82069271 -0.37437212 58 -0.50117342 -0.82069271 59 -0.20597504 -0.50117342 60 NA -0.20597504 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.62841555 1.28000421 [2,] 0.95188589 1.62841555 [3,] 0.32299384 0.95188589 [4,] 0.37667325 0.32299384 [5,] 0.43569757 0.37667325 [6,] 0.56187877 0.43569757 [7,] 0.63910534 0.56187877 [8,] 0.30084051 0.63910534 [9,] 0.10618541 0.30084051 [10,] 0.22438767 0.10618541 [11,] 0.25978801 0.22438767 [12,] 0.65785089 0.25978801 [13,] 1.01029010 0.65785089 [14,] 0.66327260 1.01029010 [15,] 0.62167682 0.66327260 [16,] 0.59077082 0.62167682 [17,] 0.72431086 0.59077082 [18,] 0.75854781 0.72431086 [19,] 0.95661069 0.75854781 [20,] 0.55854781 0.95661069 [21,] 0.54383014 0.55854781 [22,] 0.33848524 0.54383014 [23,] -0.04958476 0.33848524 [24,] 0.15451993 -0.04958476 [25,] 0.44251312 0.15451993 [26,] 0.37675007 0.44251312 [27,] 0.20424829 0.37675007 [28,] -0.01527099 0.20424829 [29,] 0.16528654 -0.01527099 [30,] 0.15118897 0.16528654 [31,] 0.32307065 0.15118897 [32,] 0.16730048 0.32307065 [33,] -0.06825349 0.16730048 [34,] -0.40915236 -0.06825349 [35,] -0.60659514 -0.40915236 [36,] -0.57096435 -0.60659514 [37,] -0.70380746 -0.57096435 [38,] -0.50442757 -0.70380746 [39,] -0.68769596 -0.50442757 [40,] -0.75554976 -0.68769596 [41,] -0.44005836 -0.75554976 [42,] -0.59776565 -0.44005836 [43,] -0.95818380 -0.59776565 [44,] -1.20713842 -0.95818380 [45,] -1.67228137 -1.20713842 [46,] -1.13533356 -1.67228137 [47,] -0.33610729 -1.13533356 [48,] -0.05957764 -0.33610729 [49,] -0.11720811 -0.05957764 [50,] -0.73936144 -0.11720811 [51,] -1.36763339 -0.73936144 [52,] -1.17034425 -1.36763339 [53,] -0.43680421 -1.17034425 [54,] -0.09249757 -0.43680421 [55,] 0.10688233 -0.09249757 [56,] -0.37437212 0.10688233 [57,] -0.82069271 -0.37437212 [58,] -0.50117342 -0.82069271 [59,] -0.20597504 -0.50117342 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.62841555 1.28000421 2 0.95188589 1.62841555 3 0.32299384 0.95188589 4 0.37667325 0.32299384 5 0.43569757 0.37667325 6 0.56187877 0.43569757 7 0.63910534 0.56187877 8 0.30084051 0.63910534 9 0.10618541 0.30084051 10 0.22438767 0.10618541 11 0.25978801 0.22438767 12 0.65785089 0.25978801 13 1.01029010 0.65785089 14 0.66327260 1.01029010 15 0.62167682 0.66327260 16 0.59077082 0.62167682 17 0.72431086 0.59077082 18 0.75854781 0.72431086 19 0.95661069 0.75854781 20 0.55854781 0.95661069 21 0.54383014 0.55854781 22 0.33848524 0.54383014 23 -0.04958476 0.33848524 24 0.15451993 -0.04958476 25 0.44251312 0.15451993 26 0.37675007 0.44251312 27 0.20424829 0.37675007 28 -0.01527099 0.20424829 29 0.16528654 -0.01527099 30 0.15118897 0.16528654 31 0.32307065 0.15118897 32 0.16730048 0.32307065 33 -0.06825349 0.16730048 34 -0.40915236 -0.06825349 35 -0.60659514 -0.40915236 36 -0.57096435 -0.60659514 37 -0.70380746 -0.57096435 38 -0.50442757 -0.70380746 39 -0.68769596 -0.50442757 40 -0.75554976 -0.68769596 41 -0.44005836 -0.75554976 42 -0.59776565 -0.44005836 43 -0.95818380 -0.59776565 44 -1.20713842 -0.95818380 45 -1.67228137 -1.20713842 46 -1.13533356 -1.67228137 47 -0.33610729 -1.13533356 48 -0.05957764 -0.33610729 49 -0.11720811 -0.05957764 50 -0.73936144 -0.11720811 51 -1.36763339 -0.73936144 52 -1.17034425 -1.36763339 53 -0.43680421 -1.17034425 54 -0.09249757 -0.43680421 55 0.10688233 -0.09249757 56 -0.37437212 0.10688233 57 -0.82069271 -0.37437212 58 -0.50117342 -0.82069271 59 -0.20597504 -0.50117342 > 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/7jox01261057258.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/87cek1261057258.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/9924g1261057258.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/10w2xd1261057258.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/11vv5f1261057258.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/12r1091261057258.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/13dnl41261057258.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/149d891261057258.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/15d6cr1261057258.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/16ey4x1261057258.tab") + } > > try(system("convert tmp/1jbrv1261057258.ps tmp/1jbrv1261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/286vr1261057258.ps tmp/286vr1261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/32zf61261057258.ps tmp/32zf61261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/4fe7y1261057258.ps tmp/4fe7y1261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/55l461261057258.ps tmp/55l461261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/6q9s21261057258.ps tmp/6q9s21261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/7jox01261057258.ps tmp/7jox01261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/87cek1261057258.ps tmp/87cek1261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/9924g1261057258.ps tmp/9924g1261057258.png",intern=TRUE)) character(0) > try(system("convert tmp/10w2xd1261057258.ps tmp/10w2xd1261057258.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.497 1.572 3.269