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. 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(147768,0,137507,0,136919,0,136151,0,133001,0,125554,0,119647,0,114158,0,116193,0,152803,0,161761,0,160942,0,149470,0,139208,0,134588,0,130322,0,126611,0,122401,0,117352,0,112135,0,112879,0,148729,0,157230,0,157221,0,146681,1,136524,1,132111,1,125326,1,122716,1,116615,1,113719,1,110737,1,112093,1,143565,1,149946,1,149147,1,134339,1,122683,1,115614,1,116566,1,111272,1,104609,1,101802,1,94542,1,93051,1,124129,1,130374,1,123946,1,114971,1,105531,0,104919,0,104782,0,101281,0,94545,0,93248,0,84031,0,87486,0,115867,0,120327,0,117008,0,108811,0),dim=c(2,61),dimnames=list(c('jonger_dan_25','plan'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('jonger_dan_25','plan'),1:61)) > 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 jonger_dan_25 plan 1 147768 0 2 137507 0 3 136919 0 4 136151 0 5 133001 0 6 125554 0 7 119647 0 8 114158 0 9 116193 0 10 152803 0 11 161761 0 12 160942 0 13 149470 0 14 139208 0 15 134588 0 16 130322 0 17 126611 0 18 122401 0 19 117352 0 20 112135 0 21 112879 0 22 148729 0 23 157230 0 24 157221 0 25 146681 1 26 136524 1 27 132111 1 28 125326 1 29 122716 1 30 116615 1 31 113719 1 32 110737 1 33 112093 1 34 143565 1 35 149946 1 36 149147 1 37 134339 1 38 122683 1 39 115614 1 40 116566 1 41 111272 1 42 104609 1 43 101802 1 44 94542 1 45 93051 1 46 124129 1 47 130374 1 48 123946 1 49 114971 1 50 105531 0 51 104919 0 52 104782 0 53 101281 0 54 94545 0 55 93248 0 56 84031 0 57 87486 0 58 115867 0 59 120327 0 60 117008 0 61 108811 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) plan 124677 -2794 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -40646 -11146 -2276 12456 37084 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 124677 3204 38.920 <2e-16 *** plan -2794 5004 -0.558 0.579 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 19220 on 59 degrees of freedom Multiple R-squared: 0.005257, Adjusted R-squared: -0.0116 F-statistic: 0.3118 on 1 and 59 DF, p-value: 0.5787 > 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.04558382 0.09116765 0.95441618 [2,] 0.04580164 0.09160329 0.95419836 [3,] 0.06161369 0.12322739 0.93838631 [4,] 0.08993549 0.17987098 0.91006451 [5,] 0.07952289 0.15904579 0.92047711 [6,] 0.13230343 0.26460685 0.86769657 [7,] 0.28803419 0.57606839 0.71196581 [8,] 0.42380083 0.84760165 0.57619917 [9,] 0.41171737 0.82343474 0.58828263 [10,] 0.34556606 0.69113213 0.65443394 [11,] 0.28170713 0.56341426 0.71829287 [12,] 0.22939108 0.45878216 0.77060892 [13,] 0.19109137 0.38218274 0.80890863 [14,] 0.16842034 0.33684068 0.83157966 [15,] 0.16455442 0.32910883 0.83544558 [16,] 0.18159647 0.36319293 0.81840353 [17,] 0.18372156 0.36744311 0.81627844 [18,] 0.22967602 0.45935205 0.77032398 [19,] 0.43131412 0.86262824 0.56868588 [20,] 0.74141192 0.51717616 0.25858808 [21,] 0.75459133 0.49081735 0.24540867 [22,] 0.73238663 0.53522674 0.26761337 [23,] 0.69683299 0.60633402 0.30316701 [24,] 0.65320981 0.69358038 0.34679019 [25,] 0.60286173 0.79427654 0.39713827 [26,] 0.56423709 0.87152581 0.43576291 [27,] 0.53010560 0.93978880 0.46989440 [28,] 0.50657459 0.98685082 0.49342541 [29,] 0.46612005 0.93224010 0.53387995 [30,] 0.53779539 0.92440922 0.46220461 [31,] 0.72325038 0.55349925 0.27674962 [32,] 0.88878408 0.22243183 0.11121592 [33,] 0.91090262 0.17819477 0.08909738 [34,] 0.89346586 0.21306828 0.10653414 [35,] 0.86548747 0.26902507 0.13451253 [36,] 0.83141985 0.33716030 0.16858015 [37,] 0.79395704 0.41208592 0.20604296 [38,] 0.77709373 0.44581254 0.22290627 [39,] 0.77821224 0.44357552 0.22178776 [40,] 0.86232100 0.27535799 0.13767900 [41,] 0.96186519 0.07626961 0.03813481 [42,] 0.93710379 0.12579242 0.06289621 [43,] 0.91734438 0.16531124 0.08265562 [44,] 0.88090351 0.23819299 0.11909649 [45,] 0.82167620 0.35664759 0.17832380 [46,] 0.78085109 0.43829781 0.21914891 [47,] 0.72508569 0.54982861 0.27491431 [48,] 0.65211196 0.69577608 0.34788804 [49,] 0.56739260 0.86521481 0.43260740 [50,] 0.50956387 0.98087226 0.49043613 [51,] 0.45428024 0.90856048 0.54571976 [52,] 0.59634207 0.80731585 0.40365793 > postscript(file="/var/www/html/rcomp/tmp/1hbih1227723279.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/2xwyt1227723279.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/3na3b1227723279.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/474j11227723279.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/53ttb1227723279.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 = 61 Frequency = 1 1 2 3 4 5 6 23090.6111 12829.6111 12241.6111 11473.6111 8323.6111 876.6111 7 8 9 10 11 12 -5030.3889 -10519.3889 -8484.3889 28125.6111 37083.6111 36264.6111 13 14 15 16 17 18 24792.6111 14530.6111 9910.6111 5644.6111 1933.6111 -2276.3889 19 20 21 22 23 24 -7325.3889 -12542.3889 -11798.3889 24051.6111 32552.6111 32543.6111 25 26 27 28 29 30 24797.8800 14640.8800 10227.8800 3442.8800 832.8800 -5268.1200 31 32 33 34 35 36 -8164.1200 -11146.1200 -9790.1200 21681.8800 28062.8800 27263.8800 37 38 39 40 41 42 12455.8800 799.8800 -6269.1200 -5317.1200 -10611.1200 -17274.1200 43 44 45 46 47 48 -20081.1200 -27341.1200 -28832.1200 2245.8800 8490.8800 2062.8800 49 50 51 52 53 54 -6912.1200 -19146.3889 -19758.3889 -19895.3889 -23396.3889 -30132.3889 55 56 57 58 59 60 -31429.3889 -40646.3889 -37191.3889 -8810.3889 -4350.3889 -7669.3889 61 -15866.3889 > postscript(file="/var/www/html/rcomp/tmp/629u81227723279.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 23090.6111 NA 1 12829.6111 23090.6111 2 12241.6111 12829.6111 3 11473.6111 12241.6111 4 8323.6111 11473.6111 5 876.6111 8323.6111 6 -5030.3889 876.6111 7 -10519.3889 -5030.3889 8 -8484.3889 -10519.3889 9 28125.6111 -8484.3889 10 37083.6111 28125.6111 11 36264.6111 37083.6111 12 24792.6111 36264.6111 13 14530.6111 24792.6111 14 9910.6111 14530.6111 15 5644.6111 9910.6111 16 1933.6111 5644.6111 17 -2276.3889 1933.6111 18 -7325.3889 -2276.3889 19 -12542.3889 -7325.3889 20 -11798.3889 -12542.3889 21 24051.6111 -11798.3889 22 32552.6111 24051.6111 23 32543.6111 32552.6111 24 24797.8800 32543.6111 25 14640.8800 24797.8800 26 10227.8800 14640.8800 27 3442.8800 10227.8800 28 832.8800 3442.8800 29 -5268.1200 832.8800 30 -8164.1200 -5268.1200 31 -11146.1200 -8164.1200 32 -9790.1200 -11146.1200 33 21681.8800 -9790.1200 34 28062.8800 21681.8800 35 27263.8800 28062.8800 36 12455.8800 27263.8800 37 799.8800 12455.8800 38 -6269.1200 799.8800 39 -5317.1200 -6269.1200 40 -10611.1200 -5317.1200 41 -17274.1200 -10611.1200 42 -20081.1200 -17274.1200 43 -27341.1200 -20081.1200 44 -28832.1200 -27341.1200 45 2245.8800 -28832.1200 46 8490.8800 2245.8800 47 2062.8800 8490.8800 48 -6912.1200 2062.8800 49 -19146.3889 -6912.1200 50 -19758.3889 -19146.3889 51 -19895.3889 -19758.3889 52 -23396.3889 -19895.3889 53 -30132.3889 -23396.3889 54 -31429.3889 -30132.3889 55 -40646.3889 -31429.3889 56 -37191.3889 -40646.3889 57 -8810.3889 -37191.3889 58 -4350.3889 -8810.3889 59 -7669.3889 -4350.3889 60 -15866.3889 -7669.3889 61 NA -15866.3889 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 12829.6111 23090.6111 [2,] 12241.6111 12829.6111 [3,] 11473.6111 12241.6111 [4,] 8323.6111 11473.6111 [5,] 876.6111 8323.6111 [6,] -5030.3889 876.6111 [7,] -10519.3889 -5030.3889 [8,] -8484.3889 -10519.3889 [9,] 28125.6111 -8484.3889 [10,] 37083.6111 28125.6111 [11,] 36264.6111 37083.6111 [12,] 24792.6111 36264.6111 [13,] 14530.6111 24792.6111 [14,] 9910.6111 14530.6111 [15,] 5644.6111 9910.6111 [16,] 1933.6111 5644.6111 [17,] -2276.3889 1933.6111 [18,] -7325.3889 -2276.3889 [19,] -12542.3889 -7325.3889 [20,] -11798.3889 -12542.3889 [21,] 24051.6111 -11798.3889 [22,] 32552.6111 24051.6111 [23,] 32543.6111 32552.6111 [24,] 24797.8800 32543.6111 [25,] 14640.8800 24797.8800 [26,] 10227.8800 14640.8800 [27,] 3442.8800 10227.8800 [28,] 832.8800 3442.8800 [29,] -5268.1200 832.8800 [30,] -8164.1200 -5268.1200 [31,] -11146.1200 -8164.1200 [32,] -9790.1200 -11146.1200 [33,] 21681.8800 -9790.1200 [34,] 28062.8800 21681.8800 [35,] 27263.8800 28062.8800 [36,] 12455.8800 27263.8800 [37,] 799.8800 12455.8800 [38,] -6269.1200 799.8800 [39,] -5317.1200 -6269.1200 [40,] -10611.1200 -5317.1200 [41,] -17274.1200 -10611.1200 [42,] -20081.1200 -17274.1200 [43,] -27341.1200 -20081.1200 [44,] -28832.1200 -27341.1200 [45,] 2245.8800 -28832.1200 [46,] 8490.8800 2245.8800 [47,] 2062.8800 8490.8800 [48,] -6912.1200 2062.8800 [49,] -19146.3889 -6912.1200 [50,] -19758.3889 -19146.3889 [51,] -19895.3889 -19758.3889 [52,] -23396.3889 -19895.3889 [53,] -30132.3889 -23396.3889 [54,] -31429.3889 -30132.3889 [55,] -40646.3889 -31429.3889 [56,] -37191.3889 -40646.3889 [57,] -8810.3889 -37191.3889 [58,] -4350.3889 -8810.3889 [59,] -7669.3889 -4350.3889 [60,] -15866.3889 -7669.3889 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 12829.6111 23090.6111 2 12241.6111 12829.6111 3 11473.6111 12241.6111 4 8323.6111 11473.6111 5 876.6111 8323.6111 6 -5030.3889 876.6111 7 -10519.3889 -5030.3889 8 -8484.3889 -10519.3889 9 28125.6111 -8484.3889 10 37083.6111 28125.6111 11 36264.6111 37083.6111 12 24792.6111 36264.6111 13 14530.6111 24792.6111 14 9910.6111 14530.6111 15 5644.6111 9910.6111 16 1933.6111 5644.6111 17 -2276.3889 1933.6111 18 -7325.3889 -2276.3889 19 -12542.3889 -7325.3889 20 -11798.3889 -12542.3889 21 24051.6111 -11798.3889 22 32552.6111 24051.6111 23 32543.6111 32552.6111 24 24797.8800 32543.6111 25 14640.8800 24797.8800 26 10227.8800 14640.8800 27 3442.8800 10227.8800 28 832.8800 3442.8800 29 -5268.1200 832.8800 30 -8164.1200 -5268.1200 31 -11146.1200 -8164.1200 32 -9790.1200 -11146.1200 33 21681.8800 -9790.1200 34 28062.8800 21681.8800 35 27263.8800 28062.8800 36 12455.8800 27263.8800 37 799.8800 12455.8800 38 -6269.1200 799.8800 39 -5317.1200 -6269.1200 40 -10611.1200 -5317.1200 41 -17274.1200 -10611.1200 42 -20081.1200 -17274.1200 43 -27341.1200 -20081.1200 44 -28832.1200 -27341.1200 45 2245.8800 -28832.1200 46 8490.8800 2245.8800 47 2062.8800 8490.8800 48 -6912.1200 2062.8800 49 -19146.3889 -6912.1200 50 -19758.3889 -19146.3889 51 -19895.3889 -19758.3889 52 -23396.3889 -19895.3889 53 -30132.3889 -23396.3889 54 -31429.3889 -30132.3889 55 -40646.3889 -31429.3889 56 -37191.3889 -40646.3889 57 -8810.3889 -37191.3889 58 -4350.3889 -8810.3889 59 -7669.3889 -4350.3889 60 -15866.3889 -7669.3889 > 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/78his1227723279.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/8wzs11227723279.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/9rusg1227723279.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/10gm3a1227723279.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/11482v1227723279.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/12z1sp1227723279.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/13xpg11227723279.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/147k9o1227723279.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/15a00d1227723279.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/160wwc1227723279.tab") + } > > system("convert tmp/1hbih1227723279.ps tmp/1hbih1227723279.png") > system("convert tmp/2xwyt1227723279.ps tmp/2xwyt1227723279.png") > system("convert tmp/3na3b1227723279.ps tmp/3na3b1227723279.png") > system("convert tmp/474j11227723279.ps tmp/474j11227723279.png") > system("convert tmp/53ttb1227723279.ps tmp/53ttb1227723279.png") > system("convert tmp/629u81227723279.ps tmp/629u81227723279.png") > system("convert tmp/78his1227723279.ps tmp/78his1227723279.png") > system("convert tmp/8wzs11227723279.ps tmp/8wzs11227723279.png") > system("convert tmp/9rusg1227723279.ps tmp/9rusg1227723279.png") > system("convert tmp/10gm3a1227723279.ps tmp/10gm3a1227723279.png") > > > proc.time() user system elapsed 2.460 1.557 2.867