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(159129,0,157928,0,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,0,136524,0,132111,0,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,1,104919,1,104782,0,101281,0,94545,0,93248,0,84031,0,87486,0,115867,0,120327,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 159129 0 2 157928 0 3 147768 0 4 137507 0 5 136919 0 6 136151 0 7 133001 0 8 125554 0 9 119647 0 10 114158 0 11 116193 0 12 152803 0 13 161761 0 14 160942 0 15 149470 0 16 139208 0 17 134588 0 18 130322 0 19 126611 0 20 122401 0 21 117352 0 22 112135 0 23 112879 0 24 148729 0 25 157230 0 26 157221 0 27 146681 0 28 136524 0 29 132111 0 30 125326 1 31 122716 1 32 116615 1 33 113719 1 34 110737 1 35 112093 1 36 143565 1 37 149946 1 38 149147 1 39 134339 1 40 122683 1 41 115614 1 42 116566 1 43 111272 1 44 104609 1 45 101802 1 46 94542 1 47 93051 1 48 124129 1 49 130374 1 50 123946 1 51 114971 1 52 105531 1 53 104919 1 54 104782 0 55 101281 0 56 94545 0 57 93248 0 58 84031 0 59 87486 0 60 115867 0 61 120327 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) plan 129311 -10885 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -45280 -13118 -1811 11948 32450 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 129310 3192 40.511 <2e-16 *** plan -10885 5089 -2.139 0.0366 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 19420 on 59 degrees of freedom Multiple R-squared: 0.07197, Adjusted R-squared: 0.05624 F-statistic: 4.575 on 1 and 59 DF, p-value: 0.03658 > 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.2562968 0.5125936 0.74370321 [2,] 0.1801091 0.3602182 0.81989092 [3,] 0.1376181 0.2752361 0.86238194 [4,] 0.1496662 0.2993324 0.85033382 [5,] 0.1897199 0.3794399 0.81028006 [6,] 0.2545584 0.5091168 0.74544161 [7,] 0.2608240 0.5216480 0.73917601 [8,] 0.2613302 0.5226603 0.73866983 [9,] 0.3547873 0.7095745 0.64521274 [10,] 0.4326985 0.8653971 0.56730147 [11,] 0.3991285 0.7982570 0.60087149 [12,] 0.3310660 0.6621321 0.66893397 [13,] 0.2699367 0.5398735 0.73006327 [14,] 0.2222038 0.4444076 0.77779622 [15,] 0.1884091 0.3768181 0.81159094 [16,] 0.1698149 0.3396297 0.83018515 [17,] 0.1698785 0.3397570 0.83012152 [18,] 0.1915936 0.3831872 0.80840642 [19,] 0.1988120 0.3976240 0.80118798 [20,] 0.2082553 0.4165105 0.79174474 [21,] 0.3115753 0.6231506 0.68842470 [22,] 0.4804988 0.9609976 0.51950119 [23,] 0.5808277 0.8383446 0.41917232 [24,] 0.6317960 0.7364080 0.36820400 [25,] 0.6917756 0.6164488 0.30822442 [26,] 0.6296769 0.7406462 0.37032308 [27,] 0.5600795 0.8798410 0.43992049 [28,] 0.4901399 0.9802798 0.50986010 [29,] 0.4245136 0.8490271 0.57548643 [30,] 0.3691487 0.7382974 0.63085131 [31,] 0.3095411 0.6190822 0.69045890 [32,] 0.4218504 0.8437008 0.57814960 [33,] 0.6580367 0.6839267 0.34196334 [34,] 0.8699456 0.2601088 0.13005439 [35,] 0.9035230 0.1929540 0.09647701 [36,] 0.8865696 0.2268608 0.11343041 [37,] 0.8532100 0.2935801 0.14679004 [38,] 0.8140771 0.3718457 0.18592286 [39,] 0.7653524 0.4692951 0.23464757 [40,] 0.7300758 0.5398485 0.26992424 [41,] 0.7086903 0.5826194 0.29130968 [42,] 0.7710717 0.4578565 0.22892826 [43,] 0.8698289 0.2603423 0.13017114 [44,] 0.8257590 0.3484820 0.17424099 [45,] 0.8405279 0.3189442 0.15947208 [46,] 0.8299557 0.3400887 0.17004434 [47,] 0.7741941 0.4516117 0.22580587 [48,] 0.6821608 0.6356783 0.31783916 [49,] 0.5704982 0.8590035 0.42950175 [50,] 0.4936004 0.9872008 0.50639959 [51,] 0.3950152 0.7900304 0.60498481 [52,] 0.3024075 0.6048151 0.69759247 > postscript(file="/var/www/html/rcomp/tmp/13f3a1227720969.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/2f1xa1227720969.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/36u921227720969.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/44lqv1227720969.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/5dkoh1227720969.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 7 29818.459 28617.459 18457.459 8196.459 7608.459 6840.459 3690.459 8 9 10 11 12 13 14 -3756.541 -9663.541 -15152.541 -13117.541 23492.459 32450.459 31631.459 15 16 17 18 19 20 21 20159.459 9897.459 5277.459 1011.459 -2699.541 -6909.541 -11958.541 22 23 24 25 26 27 28 -17175.541 -16431.541 19418.459 27919.459 27910.459 17370.459 7213.459 29 30 31 32 33 34 35 2800.459 6900.500 4290.500 -1810.500 -4706.500 -7688.500 -6332.500 36 37 38 39 40 41 42 25139.500 31520.500 30721.500 15913.500 4257.500 -2811.500 -1859.500 43 44 45 46 47 48 49 -7153.500 -13816.500 -16623.500 -23883.500 -25374.500 5703.500 11948.500 50 51 52 53 54 55 56 5520.500 -3454.500 -12894.500 -13506.500 -24528.541 -28029.541 -34765.541 57 58 59 60 61 -36062.541 -45279.541 -41824.541 -13443.541 -8983.541 > postscript(file="/var/www/html/rcomp/tmp/6d5i01227720969.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 29818.459 NA 1 28617.459 29818.459 2 18457.459 28617.459 3 8196.459 18457.459 4 7608.459 8196.459 5 6840.459 7608.459 6 3690.459 6840.459 7 -3756.541 3690.459 8 -9663.541 -3756.541 9 -15152.541 -9663.541 10 -13117.541 -15152.541 11 23492.459 -13117.541 12 32450.459 23492.459 13 31631.459 32450.459 14 20159.459 31631.459 15 9897.459 20159.459 16 5277.459 9897.459 17 1011.459 5277.459 18 -2699.541 1011.459 19 -6909.541 -2699.541 20 -11958.541 -6909.541 21 -17175.541 -11958.541 22 -16431.541 -17175.541 23 19418.459 -16431.541 24 27919.459 19418.459 25 27910.459 27919.459 26 17370.459 27910.459 27 7213.459 17370.459 28 2800.459 7213.459 29 6900.500 2800.459 30 4290.500 6900.500 31 -1810.500 4290.500 32 -4706.500 -1810.500 33 -7688.500 -4706.500 34 -6332.500 -7688.500 35 25139.500 -6332.500 36 31520.500 25139.500 37 30721.500 31520.500 38 15913.500 30721.500 39 4257.500 15913.500 40 -2811.500 4257.500 41 -1859.500 -2811.500 42 -7153.500 -1859.500 43 -13816.500 -7153.500 44 -16623.500 -13816.500 45 -23883.500 -16623.500 46 -25374.500 -23883.500 47 5703.500 -25374.500 48 11948.500 5703.500 49 5520.500 11948.500 50 -3454.500 5520.500 51 -12894.500 -3454.500 52 -13506.500 -12894.500 53 -24528.541 -13506.500 54 -28029.541 -24528.541 55 -34765.541 -28029.541 56 -36062.541 -34765.541 57 -45279.541 -36062.541 58 -41824.541 -45279.541 59 -13443.541 -41824.541 60 -8983.541 -13443.541 61 NA -8983.541 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 28617.459 29818.459 [2,] 18457.459 28617.459 [3,] 8196.459 18457.459 [4,] 7608.459 8196.459 [5,] 6840.459 7608.459 [6,] 3690.459 6840.459 [7,] -3756.541 3690.459 [8,] -9663.541 -3756.541 [9,] -15152.541 -9663.541 [10,] -13117.541 -15152.541 [11,] 23492.459 -13117.541 [12,] 32450.459 23492.459 [13,] 31631.459 32450.459 [14,] 20159.459 31631.459 [15,] 9897.459 20159.459 [16,] 5277.459 9897.459 [17,] 1011.459 5277.459 [18,] -2699.541 1011.459 [19,] -6909.541 -2699.541 [20,] -11958.541 -6909.541 [21,] -17175.541 -11958.541 [22,] -16431.541 -17175.541 [23,] 19418.459 -16431.541 [24,] 27919.459 19418.459 [25,] 27910.459 27919.459 [26,] 17370.459 27910.459 [27,] 7213.459 17370.459 [28,] 2800.459 7213.459 [29,] 6900.500 2800.459 [30,] 4290.500 6900.500 [31,] -1810.500 4290.500 [32,] -4706.500 -1810.500 [33,] -7688.500 -4706.500 [34,] -6332.500 -7688.500 [35,] 25139.500 -6332.500 [36,] 31520.500 25139.500 [37,] 30721.500 31520.500 [38,] 15913.500 30721.500 [39,] 4257.500 15913.500 [40,] -2811.500 4257.500 [41,] -1859.500 -2811.500 [42,] -7153.500 -1859.500 [43,] -13816.500 -7153.500 [44,] -16623.500 -13816.500 [45,] -23883.500 -16623.500 [46,] -25374.500 -23883.500 [47,] 5703.500 -25374.500 [48,] 11948.500 5703.500 [49,] 5520.500 11948.500 [50,] -3454.500 5520.500 [51,] -12894.500 -3454.500 [52,] -13506.500 -12894.500 [53,] -24528.541 -13506.500 [54,] -28029.541 -24528.541 [55,] -34765.541 -28029.541 [56,] -36062.541 -34765.541 [57,] -45279.541 -36062.541 [58,] -41824.541 -45279.541 [59,] -13443.541 -41824.541 [60,] -8983.541 -13443.541 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 28617.459 29818.459 2 18457.459 28617.459 3 8196.459 18457.459 4 7608.459 8196.459 5 6840.459 7608.459 6 3690.459 6840.459 7 -3756.541 3690.459 8 -9663.541 -3756.541 9 -15152.541 -9663.541 10 -13117.541 -15152.541 11 23492.459 -13117.541 12 32450.459 23492.459 13 31631.459 32450.459 14 20159.459 31631.459 15 9897.459 20159.459 16 5277.459 9897.459 17 1011.459 5277.459 18 -2699.541 1011.459 19 -6909.541 -2699.541 20 -11958.541 -6909.541 21 -17175.541 -11958.541 22 -16431.541 -17175.541 23 19418.459 -16431.541 24 27919.459 19418.459 25 27910.459 27919.459 26 17370.459 27910.459 27 7213.459 17370.459 28 2800.459 7213.459 29 6900.500 2800.459 30 4290.500 6900.500 31 -1810.500 4290.500 32 -4706.500 -1810.500 33 -7688.500 -4706.500 34 -6332.500 -7688.500 35 25139.500 -6332.500 36 31520.500 25139.500 37 30721.500 31520.500 38 15913.500 30721.500 39 4257.500 15913.500 40 -2811.500 4257.500 41 -1859.500 -2811.500 42 -7153.500 -1859.500 43 -13816.500 -7153.500 44 -16623.500 -13816.500 45 -23883.500 -16623.500 46 -25374.500 -23883.500 47 5703.500 -25374.500 48 11948.500 5703.500 49 5520.500 11948.500 50 -3454.500 5520.500 51 -12894.500 -3454.500 52 -13506.500 -12894.500 53 -24528.541 -13506.500 54 -28029.541 -24528.541 55 -34765.541 -28029.541 56 -36062.541 -34765.541 57 -45279.541 -36062.541 58 -41824.541 -45279.541 59 -13443.541 -41824.541 60 -8983.541 -13443.541 > 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/7riwf1227720969.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/8h2911227720969.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/9l2jq1227720969.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/10k5u31227720969.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/11h9ei1227720969.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/12rneq1227720969.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/13uwd11227720969.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/14ac7m1227720969.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/158t4m1227720969.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/16hkpv1227720969.tab") + } > > system("convert tmp/13f3a1227720969.ps tmp/13f3a1227720969.png") > system("convert tmp/2f1xa1227720969.ps tmp/2f1xa1227720969.png") > system("convert tmp/36u921227720969.ps tmp/36u921227720969.png") > system("convert tmp/44lqv1227720969.ps tmp/44lqv1227720969.png") > system("convert tmp/5dkoh1227720969.ps tmp/5dkoh1227720969.png") > system("convert tmp/6d5i01227720969.ps tmp/6d5i01227720969.png") > system("convert tmp/7riwf1227720969.ps tmp/7riwf1227720969.png") > system("convert tmp/8h2911227720969.ps tmp/8h2911227720969.png") > system("convert tmp/9l2jq1227720969.ps tmp/9l2jq1227720969.png") > system("convert tmp/10k5u31227720969.ps tmp/10k5u31227720969.png") > > > proc.time() user system elapsed 2.488 1.550 3.036