R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(989236.00 + ,10489.94 + ,1008380.00 + ,10766.23 + ,1207763.00 + ,10503.76 + ,1368839.00 + ,10192.51 + ,1469798.00 + ,10467.48 + ,1498721.00 + ,10274.97 + ,1761769.00 + ,10640.91 + ,1653214.00 + ,10481.60 + ,1599104.00 + ,10568.70 + ,1421179.00 + ,10440.07 + ,1163995.00 + ,10805.87 + ,1037735.00 + ,10717.50 + ,1015407.00 + ,10864.86 + ,1039210.00 + ,10993.41 + ,1258049.00 + ,11109.32 + ,1469445.00 + ,11367.14 + ,1552346.00 + ,11168.31 + ,1549144.00 + ,11150.22 + ,1785895.00 + ,11185.68 + ,1662335.00 + ,11381.15 + ,1629440.00 + ,11679.07 + ,1467430.00 + ,12080.73 + ,1202209.00 + ,12221.93 + ,1076982.00 + ,12463.15 + ,1039367.00 + ,12621.69 + ,1063449.00 + ,12268.63 + ,1335135.00 + ,12354.35 + ,1491602.00 + ,13062.91 + ,1591972.00 + ,13627.64 + ,1641248.00 + ,13408.62 + ,1898849.00 + ,13211.99 + ,1798580.00 + ,13357.74 + ,1762444.00 + ,13895.63 + ,1622044.00 + ,13930.01 + ,1368955.00 + ,13371.72 + ,1262973.00 + ,13264.82 + ,1195650.00 + ,12650.36 + ,1269530.00 + ,12266.39 + ,1479279.00 + ,12262.89 + ,1607819.00 + ,12820.13 + ,1712466.00 + ,12638.32 + ,1721766.00 + ,11350.01 + ,1949843.00 + ,11378.02 + ,1821326.00 + ,11543.55 + ,1757802.00 + ,10850.66 + ,1590367.00 + ,9325.01 + ,1260647.00 + ,8829.04 + ,1149235.00 + ,8776.39 + ,1016367.00 + ,8000.86 + ,1027885.00 + ,7062.93 + ,1262159.00 + ,7608.92 + ,1520854.00 + ,8168.12 + ,1544144.00 + ,8500.33 + ,1564709.00 + ,8447.00 + ,1821776.00 + ,9171.61 + ,1741365.00 + ,9496.28 + ,1623386.00 + ,9712.28 + ,1498658.00 + ,9712.73 + ,1241822.00 + ,10344.84 + ,1136029.00 + ,10428.05) + ,dim=c(2 + ,60) + ,dimnames=list(c('Passengersbrussels' + ,'DJIA') + ,1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Passengersbrussels','DJIA'),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 Passengersbrussels DJIA 1 989236 10489.94 2 1008380 10766.23 3 1207763 10503.76 4 1368839 10192.51 5 1469798 10467.48 6 1498721 10274.97 7 1761769 10640.91 8 1653214 10481.60 9 1599104 10568.70 10 1421179 10440.07 11 1163995 10805.87 12 1037735 10717.50 13 1015407 10864.86 14 1039210 10993.41 15 1258049 11109.32 16 1469445 11367.14 17 1552346 11168.31 18 1549144 11150.22 19 1785895 11185.68 20 1662335 11381.15 21 1629440 11679.07 22 1467430 12080.73 23 1202209 12221.93 24 1076982 12463.15 25 1039367 12621.69 26 1063449 12268.63 27 1335135 12354.35 28 1491602 13062.91 29 1591972 13627.64 30 1641248 13408.62 31 1898849 13211.99 32 1798580 13357.74 33 1762444 13895.63 34 1622044 13930.01 35 1368955 13371.72 36 1262973 13264.82 37 1195650 12650.36 38 1269530 12266.39 39 1479279 12262.89 40 1607819 12820.13 41 1712466 12638.32 42 1721766 11350.01 43 1949843 11378.02 44 1821326 11543.55 45 1757802 10850.66 46 1590367 9325.01 47 1260647 8829.04 48 1149235 8776.39 49 1016367 8000.86 50 1027885 7062.93 51 1262159 7608.92 52 1520854 8168.12 53 1544144 8500.33 54 1564709 8447.00 55 1821776 9171.61 56 1741365 9496.28 57 1623386 9712.28 58 1498658 9712.73 59 1241822 10344.84 60 1136029 10428.05 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) DJIA 1.072e+06 3.311e+01 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -450247 -221788 36435 213427 501403 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.072e+06 2.346e+05 4.569 2.61e-05 *** DJIA 3.311e+01 2.098e+01 1.578 0.12 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 266200 on 58 degrees of freedom Multiple R-squared: 0.04118, Adjusted R-squared: 0.02465 F-statistic: 2.491 on 1 and 58 DF, p-value: 0.1199 > 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.3365510 0.67310205 0.663448973 [2,] 0.2257263 0.45145260 0.774273701 [3,] 0.7096520 0.58069607 0.290348036 [4,] 0.7136026 0.57279486 0.286397430 [5,] 0.6763855 0.64722901 0.323614506 [6,] 0.5688218 0.86235645 0.431178225 [7,] 0.4961139 0.99222785 0.503886073 [8,] 0.4976296 0.99525915 0.502370427 [9,] 0.4695757 0.93915148 0.530424259 [10,] 0.4246069 0.84921388 0.575393058 [11,] 0.4080193 0.81603853 0.591980737 [12,] 0.4902205 0.98044103 0.509779487 [13,] 0.4987039 0.99740776 0.501296121 [14,] 0.4728683 0.94573653 0.527131737 [15,] 0.5785103 0.84297939 0.421489696 [16,] 0.5536702 0.89265969 0.446329846 [17,] 0.4927485 0.98549692 0.507251540 [18,] 0.4189964 0.83799278 0.581003609 [19,] 0.4369067 0.87381333 0.563093335 [20,] 0.5118646 0.97627086 0.488135431 [21,] 0.5978512 0.80429765 0.402148826 [22,] 0.6688087 0.66238258 0.331191290 [23,] 0.6300370 0.73992595 0.369962974 [24,] 0.5995868 0.80082632 0.400413162 [25,] 0.5745311 0.85093775 0.425468876 [26,] 0.5386909 0.92261812 0.461309059 [27,] 0.6219768 0.75604643 0.378023215 [28,] 0.6145845 0.77083109 0.385415544 [29,] 0.5731228 0.85375449 0.426877244 [30,] 0.4976108 0.99522150 0.502389249 [31,] 0.4620200 0.92403992 0.537980040 [32,] 0.4984715 0.99694295 0.501528523 [33,] 0.6036299 0.79274013 0.396370063 [34,] 0.6774180 0.64516408 0.322582042 [35,] 0.6611774 0.67764511 0.338822555 [36,] 0.6441494 0.71170127 0.355850636 [37,] 0.6169493 0.76610148 0.383050741 [38,] 0.5743732 0.85125350 0.425626751 [39,] 0.6317541 0.73649178 0.368245892 [40,] 0.6046294 0.79074113 0.395370566 [41,] 0.5800371 0.83992585 0.419962924 [42,] 0.5296470 0.94070596 0.470352980 [43,] 0.4518143 0.90362869 0.548185654 [44,] 0.4257176 0.85143520 0.574282399 [45,] 0.4869650 0.97393009 0.513034955 [46,] 0.6412071 0.71758587 0.358792934 [47,] 0.7737825 0.45243491 0.226217454 [48,] 0.7527180 0.49456402 0.247282012 [49,] 0.7316505 0.53669901 0.268349505 [50,] 0.9946087 0.01078265 0.005391323 [51,] 0.9840460 0.03190799 0.015953995 > postscript(file="/var/www/html/freestat/rcomp/tmp/1ob8r1292105910.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/freestat/rcomp/tmp/2ob8r1292105910.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/freestat/rcomp/tmp/3hl7c1292105910.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/freestat/rcomp/tmp/4hl7c1292105910.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/freestat/rcomp/tmp/5hl7c1292105910.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 = 60 Frequency = 1 1 2 3 4 5 6 -429802.117 -419805.190 -211732.652 -40352.165 51503.462 86799.849 7 8 9 10 11 12 337732.752 234451.994 177458.393 3791.919 -265502.543 -388836.897 13 14 15 16 17 18 -416043.513 -396496.390 -181494.797 21365.611 110849.233 108246.135 19 20 21 22 23 24 343823.168 213791.785 171033.612 -4274.060 -274169.738 -407382.757 25 26 27 28 29 30 -450246.506 -414475.825 -145627.738 -12618.882 69054.723 125581.771 31 32 33 34 35 36 389692.558 284598.244 230654.435 89116.224 -145489.589 -247932.473 37 38 39 40 41 42 -294912.678 -208320.666 1544.208 111635.783 222301.928 274253.730 43 44 45 46 47 48 501403.409 367406.243 326821.604 209895.971 -103404.057 -213072.985 49 50 51 52 53 54 -320265.679 -277695.832 -61497.806 178683.880 190975.475 213306.060 55 56 57 58 59 60 446383.552 355223.772 230093.706 105350.808 -172412.322 -280960.138 > postscript(file="/var/www/html/freestat/rcomp/tmp/6au6w1292105910.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 -429802.117 NA 1 -419805.190 -429802.117 2 -211732.652 -419805.190 3 -40352.165 -211732.652 4 51503.462 -40352.165 5 86799.849 51503.462 6 337732.752 86799.849 7 234451.994 337732.752 8 177458.393 234451.994 9 3791.919 177458.393 10 -265502.543 3791.919 11 -388836.897 -265502.543 12 -416043.513 -388836.897 13 -396496.390 -416043.513 14 -181494.797 -396496.390 15 21365.611 -181494.797 16 110849.233 21365.611 17 108246.135 110849.233 18 343823.168 108246.135 19 213791.785 343823.168 20 171033.612 213791.785 21 -4274.060 171033.612 22 -274169.738 -4274.060 23 -407382.757 -274169.738 24 -450246.506 -407382.757 25 -414475.825 -450246.506 26 -145627.738 -414475.825 27 -12618.882 -145627.738 28 69054.723 -12618.882 29 125581.771 69054.723 30 389692.558 125581.771 31 284598.244 389692.558 32 230654.435 284598.244 33 89116.224 230654.435 34 -145489.589 89116.224 35 -247932.473 -145489.589 36 -294912.678 -247932.473 37 -208320.666 -294912.678 38 1544.208 -208320.666 39 111635.783 1544.208 40 222301.928 111635.783 41 274253.730 222301.928 42 501403.409 274253.730 43 367406.243 501403.409 44 326821.604 367406.243 45 209895.971 326821.604 46 -103404.057 209895.971 47 -213072.985 -103404.057 48 -320265.679 -213072.985 49 -277695.832 -320265.679 50 -61497.806 -277695.832 51 178683.880 -61497.806 52 190975.475 178683.880 53 213306.060 190975.475 54 446383.552 213306.060 55 355223.772 446383.552 56 230093.706 355223.772 57 105350.808 230093.706 58 -172412.322 105350.808 59 -280960.138 -172412.322 60 NA -280960.138 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -419805.190 -429802.117 [2,] -211732.652 -419805.190 [3,] -40352.165 -211732.652 [4,] 51503.462 -40352.165 [5,] 86799.849 51503.462 [6,] 337732.752 86799.849 [7,] 234451.994 337732.752 [8,] 177458.393 234451.994 [9,] 3791.919 177458.393 [10,] -265502.543 3791.919 [11,] -388836.897 -265502.543 [12,] -416043.513 -388836.897 [13,] -396496.390 -416043.513 [14,] -181494.797 -396496.390 [15,] 21365.611 -181494.797 [16,] 110849.233 21365.611 [17,] 108246.135 110849.233 [18,] 343823.168 108246.135 [19,] 213791.785 343823.168 [20,] 171033.612 213791.785 [21,] -4274.060 171033.612 [22,] -274169.738 -4274.060 [23,] -407382.757 -274169.738 [24,] -450246.506 -407382.757 [25,] -414475.825 -450246.506 [26,] -145627.738 -414475.825 [27,] -12618.882 -145627.738 [28,] 69054.723 -12618.882 [29,] 125581.771 69054.723 [30,] 389692.558 125581.771 [31,] 284598.244 389692.558 [32,] 230654.435 284598.244 [33,] 89116.224 230654.435 [34,] -145489.589 89116.224 [35,] -247932.473 -145489.589 [36,] -294912.678 -247932.473 [37,] -208320.666 -294912.678 [38,] 1544.208 -208320.666 [39,] 111635.783 1544.208 [40,] 222301.928 111635.783 [41,] 274253.730 222301.928 [42,] 501403.409 274253.730 [43,] 367406.243 501403.409 [44,] 326821.604 367406.243 [45,] 209895.971 326821.604 [46,] -103404.057 209895.971 [47,] -213072.985 -103404.057 [48,] -320265.679 -213072.985 [49,] -277695.832 -320265.679 [50,] -61497.806 -277695.832 [51,] 178683.880 -61497.806 [52,] 190975.475 178683.880 [53,] 213306.060 190975.475 [54,] 446383.552 213306.060 [55,] 355223.772 446383.552 [56,] 230093.706 355223.772 [57,] 105350.808 230093.706 [58,] -172412.322 105350.808 [59,] -280960.138 -172412.322 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -419805.190 -429802.117 2 -211732.652 -419805.190 3 -40352.165 -211732.652 4 51503.462 -40352.165 5 86799.849 51503.462 6 337732.752 86799.849 7 234451.994 337732.752 8 177458.393 234451.994 9 3791.919 177458.393 10 -265502.543 3791.919 11 -388836.897 -265502.543 12 -416043.513 -388836.897 13 -396496.390 -416043.513 14 -181494.797 -396496.390 15 21365.611 -181494.797 16 110849.233 21365.611 17 108246.135 110849.233 18 343823.168 108246.135 19 213791.785 343823.168 20 171033.612 213791.785 21 -4274.060 171033.612 22 -274169.738 -4274.060 23 -407382.757 -274169.738 24 -450246.506 -407382.757 25 -414475.825 -450246.506 26 -145627.738 -414475.825 27 -12618.882 -145627.738 28 69054.723 -12618.882 29 125581.771 69054.723 30 389692.558 125581.771 31 284598.244 389692.558 32 230654.435 284598.244 33 89116.224 230654.435 34 -145489.589 89116.224 35 -247932.473 -145489.589 36 -294912.678 -247932.473 37 -208320.666 -294912.678 38 1544.208 -208320.666 39 111635.783 1544.208 40 222301.928 111635.783 41 274253.730 222301.928 42 501403.409 274253.730 43 367406.243 501403.409 44 326821.604 367406.243 45 209895.971 326821.604 46 -103404.057 209895.971 47 -213072.985 -103404.057 48 -320265.679 -213072.985 49 -277695.832 -320265.679 50 -61497.806 -277695.832 51 178683.880 -61497.806 52 190975.475 178683.880 53 213306.060 190975.475 54 446383.552 213306.060 55 355223.772 446383.552 56 230093.706 355223.772 57 105350.808 230093.706 58 -172412.322 105350.808 59 -280960.138 -172412.322 > 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/freestat/rcomp/tmp/7k3nh1292105910.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/freestat/rcomp/tmp/8k3nh1292105910.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/freestat/rcomp/tmp/9k3nh1292105910.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/freestat/rcomp/tmp/10vcn21292105910.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11zv381292105910.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/freestat/rcomp/tmp/12kd1e1292105910.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/freestat/rcomp/tmp/13ynzn1292105910.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/freestat/rcomp/tmp/14795h1292105910.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/freestat/rcomp/tmp/15n6wz1292105910.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/freestat/rcomp/tmp/168pvn1292105910.tab") + } > > try(system("convert tmp/1ob8r1292105910.ps tmp/1ob8r1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/2ob8r1292105910.ps tmp/2ob8r1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/3hl7c1292105910.ps tmp/3hl7c1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/4hl7c1292105910.ps tmp/4hl7c1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/5hl7c1292105910.ps tmp/5hl7c1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/6au6w1292105910.ps tmp/6au6w1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/7k3nh1292105910.ps tmp/7k3nh1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/8k3nh1292105910.ps tmp/8k3nh1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/9k3nh1292105910.ps tmp/9k3nh1292105910.png",intern=TRUE)) character(0) > try(system("convert tmp/10vcn21292105910.ps tmp/10vcn21292105910.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.826 2.479 4.167