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,1,133001,1,125554,1,119647,0,114158,0,116193,0,152803,0,161761,0,160942,0,149470,0,139208,0,134588,0,130322,1,126611,1,122401,1,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,0,110737,0,112093,0,143565,0,149946,0,149147,0,134339,0,122683,0,115614,0,116566,1,111272,1,104609,1,101802,0,94542,0,93051,0,124129,0,130374,0,123946,0,114971,0,105531,0,104919,0,104782,1,101281,1,94545,1,93248,0,84031,0,87486,0,115867,0,120327,0,117008,0,108811,0),dim=c(2,61),dimnames=list(c('jonger_dan_25','winter'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('jonger_dan_25','winter'),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 winter 1 147768 0 2 137507 0 3 136919 0 4 136151 1 5 133001 1 6 125554 1 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 1 17 126611 1 18 122401 1 19 117352 0 20 112135 0 21 112879 0 22 148729 0 23 157230 0 24 157221 0 25 146681 0 26 136524 0 27 132111 0 28 125326 1 29 122716 1 30 116615 1 31 113719 0 32 110737 0 33 112093 0 34 143565 0 35 149946 0 36 149147 0 37 134339 0 38 122683 0 39 115614 0 40 116566 1 41 111272 1 42 104609 1 43 101802 0 44 94542 0 45 93051 0 46 124129 0 47 130374 0 48 123946 0 49 114971 0 50 105531 0 51 104919 0 52 104782 1 53 101281 1 54 94545 1 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) winter 125298 -7181 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -41267 -13163 -1502 12209 36463 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 125298 2803 44.70 <2e-16 *** winter -7181 5653 -1.27 0.209 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 19010 on 59 degrees of freedom Multiple R-squared: 0.02662, Adjusted R-squared: 0.01012 F-statistic: 1.614 on 1 and 59 DF, p-value: 0.2090 > 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.02527749 0.05055497 0.97472251 [2,] 0.01469423 0.02938845 0.98530577 [3,] 0.06013771 0.12027542 0.93986229 [4,] 0.09902375 0.19804749 0.90097625 [5,] 0.08556507 0.17113013 0.91443493 [6,] 0.14630192 0.29260384 0.85369808 [7,] 0.29824594 0.59649187 0.70175406 [8,] 0.41103596 0.82207192 0.58896404 [9,] 0.37903675 0.75807350 0.62096325 [10,] 0.30553060 0.61106121 0.69446940 [11,] 0.24074543 0.48149085 0.75925457 [12,] 0.18440960 0.36881921 0.81559040 [13,] 0.13859907 0.27719815 0.86140093 [14,] 0.10458212 0.20916425 0.89541788 [15,] 0.11967613 0.23935226 0.88032387 [16,] 0.15415312 0.30830625 0.84584688 [17,] 0.17005762 0.34011524 0.82994238 [18,] 0.17960751 0.35921503 0.82039249 [19,] 0.27165596 0.54331191 0.72834404 [20,] 0.39798844 0.79597689 0.60201156 [21,] 0.42843539 0.85687079 0.57156461 [22,] 0.40120862 0.80241725 0.59879138 [23,] 0.36641780 0.73283561 0.63358220 [24,] 0.32492824 0.64985647 0.67507176 [25,] 0.28677174 0.57354349 0.71322826 [26,] 0.25177207 0.50354413 0.74822793 [27,] 0.26620175 0.53240349 0.73379825 [28,] 0.28833340 0.57666680 0.71166660 [29,] 0.28888259 0.57776518 0.71111741 [30,] 0.33675165 0.67350330 0.66324835 [31,] 0.51131374 0.97737253 0.48868626 [32,] 0.74348816 0.51302368 0.25651184 [33,] 0.80454819 0.39090363 0.19545181 [34,] 0.80355625 0.39288750 0.19644375 [35,] 0.79024156 0.41951688 0.20975844 [36,] 0.76919552 0.46160895 0.23080448 [37,] 0.73853148 0.52293704 0.26146852 [38,] 0.70210854 0.59578292 0.29789146 [39,] 0.72230558 0.55538884 0.27769442 [40,] 0.79170994 0.41658013 0.20829006 [41,] 0.85276177 0.29447646 0.14723823 [42,] 0.84041834 0.31916332 0.15958166 [43,] 0.88789518 0.22420964 0.11210482 [44,] 0.90445688 0.19108625 0.09554312 [45,] 0.88371983 0.23256033 0.11628017 [46,] 0.83892971 0.32214058 0.16107029 [47,] 0.77872449 0.44255102 0.22127551 [48,] 0.70150983 0.59698034 0.29849017 [49,] 0.60579656 0.78840688 0.39420344 [50,] 0.49221354 0.98442708 0.50778646 [51,] 0.43880987 0.87761975 0.56119013 [52,] 0.58554467 0.82891067 0.41445533 > postscript(file="/var/www/html/rcomp/tmp/1rs7y1227723576.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/2oeka1227723576.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/3ld2s1227723576.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/4fthv1227723576.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/54lsp1227723576.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 22469.913 12208.913 11620.913 18034.200 14884.200 7437.200 -5651.087 8 9 10 11 12 13 14 -11140.087 -9105.087 27504.913 36462.913 35643.913 24171.913 13909.913 15 16 17 18 19 20 21 9289.913 12205.200 8494.200 4284.200 -7946.087 -13163.087 -12419.087 22 23 24 25 26 27 28 23430.913 31931.913 31922.913 21382.913 11225.913 6812.913 7209.200 29 30 31 32 33 34 35 4599.200 -1501.800 -11579.087 -14561.087 -13205.087 18266.913 24647.913 36 37 38 39 40 41 42 23848.913 9040.913 -2615.087 -9684.087 -1550.800 -6844.800 -13507.800 43 44 45 46 47 48 49 -23496.087 -30756.087 -32247.087 -1169.087 5075.913 -1352.087 -10327.087 50 51 52 53 54 55 56 -19767.087 -20379.087 -13334.800 -16835.800 -23571.800 -32050.087 -41267.087 57 58 59 60 61 -37812.087 -9431.087 -4971.087 -8290.087 -16487.087 > postscript(file="/var/www/html/rcomp/tmp/6dftk1227723576.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 22469.913 NA 1 12208.913 22469.913 2 11620.913 12208.913 3 18034.200 11620.913 4 14884.200 18034.200 5 7437.200 14884.200 6 -5651.087 7437.200 7 -11140.087 -5651.087 8 -9105.087 -11140.087 9 27504.913 -9105.087 10 36462.913 27504.913 11 35643.913 36462.913 12 24171.913 35643.913 13 13909.913 24171.913 14 9289.913 13909.913 15 12205.200 9289.913 16 8494.200 12205.200 17 4284.200 8494.200 18 -7946.087 4284.200 19 -13163.087 -7946.087 20 -12419.087 -13163.087 21 23430.913 -12419.087 22 31931.913 23430.913 23 31922.913 31931.913 24 21382.913 31922.913 25 11225.913 21382.913 26 6812.913 11225.913 27 7209.200 6812.913 28 4599.200 7209.200 29 -1501.800 4599.200 30 -11579.087 -1501.800 31 -14561.087 -11579.087 32 -13205.087 -14561.087 33 18266.913 -13205.087 34 24647.913 18266.913 35 23848.913 24647.913 36 9040.913 23848.913 37 -2615.087 9040.913 38 -9684.087 -2615.087 39 -1550.800 -9684.087 40 -6844.800 -1550.800 41 -13507.800 -6844.800 42 -23496.087 -13507.800 43 -30756.087 -23496.087 44 -32247.087 -30756.087 45 -1169.087 -32247.087 46 5075.913 -1169.087 47 -1352.087 5075.913 48 -10327.087 -1352.087 49 -19767.087 -10327.087 50 -20379.087 -19767.087 51 -13334.800 -20379.087 52 -16835.800 -13334.800 53 -23571.800 -16835.800 54 -32050.087 -23571.800 55 -41267.087 -32050.087 56 -37812.087 -41267.087 57 -9431.087 -37812.087 58 -4971.087 -9431.087 59 -8290.087 -4971.087 60 -16487.087 -8290.087 61 NA -16487.087 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 12208.913 22469.913 [2,] 11620.913 12208.913 [3,] 18034.200 11620.913 [4,] 14884.200 18034.200 [5,] 7437.200 14884.200 [6,] -5651.087 7437.200 [7,] -11140.087 -5651.087 [8,] -9105.087 -11140.087 [9,] 27504.913 -9105.087 [10,] 36462.913 27504.913 [11,] 35643.913 36462.913 [12,] 24171.913 35643.913 [13,] 13909.913 24171.913 [14,] 9289.913 13909.913 [15,] 12205.200 9289.913 [16,] 8494.200 12205.200 [17,] 4284.200 8494.200 [18,] -7946.087 4284.200 [19,] -13163.087 -7946.087 [20,] -12419.087 -13163.087 [21,] 23430.913 -12419.087 [22,] 31931.913 23430.913 [23,] 31922.913 31931.913 [24,] 21382.913 31922.913 [25,] 11225.913 21382.913 [26,] 6812.913 11225.913 [27,] 7209.200 6812.913 [28,] 4599.200 7209.200 [29,] -1501.800 4599.200 [30,] -11579.087 -1501.800 [31,] -14561.087 -11579.087 [32,] -13205.087 -14561.087 [33,] 18266.913 -13205.087 [34,] 24647.913 18266.913 [35,] 23848.913 24647.913 [36,] 9040.913 23848.913 [37,] -2615.087 9040.913 [38,] -9684.087 -2615.087 [39,] -1550.800 -9684.087 [40,] -6844.800 -1550.800 [41,] -13507.800 -6844.800 [42,] -23496.087 -13507.800 [43,] -30756.087 -23496.087 [44,] -32247.087 -30756.087 [45,] -1169.087 -32247.087 [46,] 5075.913 -1169.087 [47,] -1352.087 5075.913 [48,] -10327.087 -1352.087 [49,] -19767.087 -10327.087 [50,] -20379.087 -19767.087 [51,] -13334.800 -20379.087 [52,] -16835.800 -13334.800 [53,] -23571.800 -16835.800 [54,] -32050.087 -23571.800 [55,] -41267.087 -32050.087 [56,] -37812.087 -41267.087 [57,] -9431.087 -37812.087 [58,] -4971.087 -9431.087 [59,] -8290.087 -4971.087 [60,] -16487.087 -8290.087 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 12208.913 22469.913 2 11620.913 12208.913 3 18034.200 11620.913 4 14884.200 18034.200 5 7437.200 14884.200 6 -5651.087 7437.200 7 -11140.087 -5651.087 8 -9105.087 -11140.087 9 27504.913 -9105.087 10 36462.913 27504.913 11 35643.913 36462.913 12 24171.913 35643.913 13 13909.913 24171.913 14 9289.913 13909.913 15 12205.200 9289.913 16 8494.200 12205.200 17 4284.200 8494.200 18 -7946.087 4284.200 19 -13163.087 -7946.087 20 -12419.087 -13163.087 21 23430.913 -12419.087 22 31931.913 23430.913 23 31922.913 31931.913 24 21382.913 31922.913 25 11225.913 21382.913 26 6812.913 11225.913 27 7209.200 6812.913 28 4599.200 7209.200 29 -1501.800 4599.200 30 -11579.087 -1501.800 31 -14561.087 -11579.087 32 -13205.087 -14561.087 33 18266.913 -13205.087 34 24647.913 18266.913 35 23848.913 24647.913 36 9040.913 23848.913 37 -2615.087 9040.913 38 -9684.087 -2615.087 39 -1550.800 -9684.087 40 -6844.800 -1550.800 41 -13507.800 -6844.800 42 -23496.087 -13507.800 43 -30756.087 -23496.087 44 -32247.087 -30756.087 45 -1169.087 -32247.087 46 5075.913 -1169.087 47 -1352.087 5075.913 48 -10327.087 -1352.087 49 -19767.087 -10327.087 50 -20379.087 -19767.087 51 -13334.800 -20379.087 52 -16835.800 -13334.800 53 -23571.800 -16835.800 54 -32050.087 -23571.800 55 -41267.087 -32050.087 56 -37812.087 -41267.087 57 -9431.087 -37812.087 58 -4971.087 -9431.087 59 -8290.087 -4971.087 60 -16487.087 -8290.087 > 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/7bswm1227723576.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/8txmh1227723576.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/99hu21227723576.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/10f6191227723576.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/11vj0e1227723576.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/12oelf1227723576.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/132pey1227723576.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/14d3lp1227723576.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/1583nn1227723576.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/16lgmh1227723577.tab") + } > > system("convert tmp/1rs7y1227723576.ps tmp/1rs7y1227723576.png") > system("convert tmp/2oeka1227723576.ps tmp/2oeka1227723576.png") > system("convert tmp/3ld2s1227723576.ps tmp/3ld2s1227723576.png") > system("convert tmp/4fthv1227723576.ps tmp/4fthv1227723576.png") > system("convert tmp/54lsp1227723576.ps tmp/54lsp1227723576.png") > system("convert tmp/6dftk1227723576.ps tmp/6dftk1227723576.png") > system("convert tmp/7bswm1227723576.ps tmp/7bswm1227723576.png") > system("convert tmp/8txmh1227723576.ps tmp/8txmh1227723576.png") > system("convert tmp/99hu21227723576.ps tmp/99hu21227723576.png") > system("convert tmp/10f6191227723576.ps tmp/10f6191227723576.png") > > > proc.time() user system elapsed 2.484 1.562 2.950