R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(921365,0,987921,0,1132614,0,1332224,0,1418133,0,1411549,0,1695920,0,1636173,0,1539653,0,1395314,0,1127575,0,1036076,0,989236,0,1008380,0,1207763,0,1368839,0,1469798,0,1498721,0,1761769,0,1653214,0,1599104,0,1421179,0,1163995,0,1037735,0,1015407,0,1039210,0,1258049,0,1469445,0,1552346,0,1549144,0,1785895,0,1662335,0,1629440,0,1467430,0,1202209,0,1076982,0,1039367,1,1063449,1,1335135,1,1491602,1,1591972,1,1641248,1,1898849,1,1798580,1,1762444,1,1622044,1,1368955,1,1262973,1,1195650,1,1269530,1,1479279,1,1607819,1,1712466,1,1721766,1,1949843,1,1821326,1,1757802,1,1590367,1,1260647,1,1149235,1),dim=c(2,60),dimnames=list(c('Y','X'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Y','X'),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 Y X 1 921365 0 2 987921 0 3 1132614 0 4 1332224 0 5 1418133 0 6 1411549 0 7 1695920 0 8 1636173 0 9 1539653 0 10 1395314 0 11 1127575 0 12 1036076 0 13 989236 0 14 1008380 0 15 1207763 0 16 1368839 0 17 1469798 0 18 1498721 0 19 1761769 0 20 1653214 0 21 1599104 0 22 1421179 0 23 1163995 0 24 1037735 0 25 1015407 0 26 1039210 0 27 1258049 0 28 1469445 0 29 1552346 0 30 1549144 0 31 1785895 0 32 1662335 0 33 1629440 0 34 1467430 0 35 1202209 0 36 1076982 0 37 1039367 1 38 1063449 1 39 1335135 1 40 1491602 1 41 1591972 1 42 1641248 1 43 1898849 1 44 1798580 1 45 1762444 1 46 1622044 1 47 1368955 1 48 1262973 1 49 1195650 1 50 1269530 1 51 1479279 1 52 1607819 1 53 1712466 1 54 1721766 1 55 1949843 1 56 1821326 1 57 1757802 1 58 1590367 1 59 1260647 1 60 1149235 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X 1347837 168511 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -476981 -248457 67004 204736 438058 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1347837 43663 30.869 <2e-16 *** X 168511 69037 2.441 0.0177 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 262000 on 58 degrees of freedom Multiple R-squared: 0.09315, Adjusted R-squared: 0.07752 F-statistic: 5.958 on 1 and 58 DF, p-value: 0.01773 > 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.5544579 0.8910842 0.4455421 [2,] 0.5050541 0.9898917 0.4949459 [3,] 0.7253954 0.5492093 0.2746046 [4,] 0.7584437 0.4831126 0.2415563 [5,] 0.7111278 0.5777445 0.2888722 [6,] 0.6113400 0.7773201 0.3886600 [7,] 0.5684146 0.8631707 0.4315854 [8,] 0.5794950 0.8410101 0.4205050 [9,] 0.6162995 0.7674009 0.3837005 [10,] 0.6320885 0.7358230 0.3679115 [11,] 0.5570555 0.8858891 0.4429445 [12,] 0.4795152 0.9590303 0.5204848 [13,] 0.4316521 0.8633042 0.5683479 [14,] 0.3930606 0.7861213 0.6069394 [15,] 0.5354838 0.9290324 0.4645162 [16,] 0.5648932 0.8702135 0.4351068 [17,] 0.5552466 0.8895067 0.4447534 [18,] 0.4809881 0.9619761 0.5190119 [19,] 0.4386991 0.8773983 0.5613009 [20,] 0.4664031 0.9328061 0.5335969 [21,] 0.5163701 0.9672598 0.4836299 [22,] 0.5618451 0.8763097 0.4381549 [23,] 0.5098749 0.9802502 0.4901251 [24,] 0.4501988 0.9003976 0.5498012 [25,] 0.4113085 0.8226169 0.5886915 [26,] 0.3699002 0.7398003 0.6300998 [27,] 0.4664996 0.9329991 0.5335004 [28,] 0.4857995 0.9715990 0.5142005 [29,] 0.5086473 0.9827053 0.4913527 [30,] 0.4804773 0.9609545 0.5195227 [31,] 0.4196382 0.8392765 0.5803618 [32,] 0.3774230 0.7548460 0.6225770 [33,] 0.4537454 0.9074908 0.5462546 [34,] 0.5537722 0.8924555 0.4462278 [35,] 0.5400300 0.9199400 0.4599700 [36,] 0.5001808 0.9996385 0.4998192 [37,] 0.4577655 0.9155310 0.5422345 [38,] 0.4134207 0.8268414 0.5865793 [39,] 0.5115089 0.9769822 0.4884911 [40,] 0.5194255 0.9611490 0.4805745 [41,] 0.5029224 0.9941552 0.4970776 [42,] 0.4249943 0.8499887 0.5750057 [43,] 0.3598596 0.7197192 0.6401404 [44,] 0.3506897 0.7013794 0.6493103 [45,] 0.4106521 0.8213043 0.5893479 [46,] 0.4374674 0.8749347 0.5625326 [47,] 0.3502435 0.7004871 0.6497565 [48,] 0.2507101 0.5014202 0.7492899 [49,] 0.1764416 0.3528833 0.8235584 [50,] 0.1159552 0.2319104 0.8840448 [51,] 0.1699379 0.3398759 0.8300621 > postscript(file="/var/www/html/rcomp/tmp/141ff1261310205.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/2pvt11261310205.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/3o2781261310205.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/4zjgc1261310205.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/5g1im1261310205.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 60 Frequency = 1 1 2 3 4 5 6 7 -426472.28 -359916.28 -215223.28 -15613.28 70295.72 63711.72 348082.72 8 9 10 11 12 13 14 288335.72 191815.72 47476.72 -220262.28 -311761.28 -358601.28 -339457.28 15 16 17 18 19 20 21 -140074.28 21001.72 121960.72 150883.72 413931.72 305376.72 251266.72 22 23 24 25 26 27 28 73341.72 -183842.28 -310102.28 -332430.28 -308627.28 -89788.28 121607.72 29 30 31 32 33 34 35 204508.72 201306.72 438057.72 314497.72 281602.72 119592.72 -145628.28 36 37 38 39 40 41 42 -270855.28 -476980.83 -452898.83 -181212.83 -24745.83 75624.17 124900.17 43 44 45 46 47 48 49 382501.17 282232.17 246096.17 105696.17 -147392.83 -253374.83 -320697.83 50 51 52 53 54 55 56 -246817.83 -37068.83 91471.17 196118.17 205418.17 433495.17 304978.17 57 58 59 60 241454.17 74019.17 -255700.83 -367112.83 > postscript(file="/var/www/html/rcomp/tmp/60l5n1261310205.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 -426472.28 NA 1 -359916.28 -426472.28 2 -215223.28 -359916.28 3 -15613.28 -215223.28 4 70295.72 -15613.28 5 63711.72 70295.72 6 348082.72 63711.72 7 288335.72 348082.72 8 191815.72 288335.72 9 47476.72 191815.72 10 -220262.28 47476.72 11 -311761.28 -220262.28 12 -358601.28 -311761.28 13 -339457.28 -358601.28 14 -140074.28 -339457.28 15 21001.72 -140074.28 16 121960.72 21001.72 17 150883.72 121960.72 18 413931.72 150883.72 19 305376.72 413931.72 20 251266.72 305376.72 21 73341.72 251266.72 22 -183842.28 73341.72 23 -310102.28 -183842.28 24 -332430.28 -310102.28 25 -308627.28 -332430.28 26 -89788.28 -308627.28 27 121607.72 -89788.28 28 204508.72 121607.72 29 201306.72 204508.72 30 438057.72 201306.72 31 314497.72 438057.72 32 281602.72 314497.72 33 119592.72 281602.72 34 -145628.28 119592.72 35 -270855.28 -145628.28 36 -476980.83 -270855.28 37 -452898.83 -476980.83 38 -181212.83 -452898.83 39 -24745.83 -181212.83 40 75624.17 -24745.83 41 124900.17 75624.17 42 382501.17 124900.17 43 282232.17 382501.17 44 246096.17 282232.17 45 105696.17 246096.17 46 -147392.83 105696.17 47 -253374.83 -147392.83 48 -320697.83 -253374.83 49 -246817.83 -320697.83 50 -37068.83 -246817.83 51 91471.17 -37068.83 52 196118.17 91471.17 53 205418.17 196118.17 54 433495.17 205418.17 55 304978.17 433495.17 56 241454.17 304978.17 57 74019.17 241454.17 58 -255700.83 74019.17 59 -367112.83 -255700.83 60 NA -367112.83 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -359916.28 -426472.28 [2,] -215223.28 -359916.28 [3,] -15613.28 -215223.28 [4,] 70295.72 -15613.28 [5,] 63711.72 70295.72 [6,] 348082.72 63711.72 [7,] 288335.72 348082.72 [8,] 191815.72 288335.72 [9,] 47476.72 191815.72 [10,] -220262.28 47476.72 [11,] -311761.28 -220262.28 [12,] -358601.28 -311761.28 [13,] -339457.28 -358601.28 [14,] -140074.28 -339457.28 [15,] 21001.72 -140074.28 [16,] 121960.72 21001.72 [17,] 150883.72 121960.72 [18,] 413931.72 150883.72 [19,] 305376.72 413931.72 [20,] 251266.72 305376.72 [21,] 73341.72 251266.72 [22,] -183842.28 73341.72 [23,] -310102.28 -183842.28 [24,] -332430.28 -310102.28 [25,] -308627.28 -332430.28 [26,] -89788.28 -308627.28 [27,] 121607.72 -89788.28 [28,] 204508.72 121607.72 [29,] 201306.72 204508.72 [30,] 438057.72 201306.72 [31,] 314497.72 438057.72 [32,] 281602.72 314497.72 [33,] 119592.72 281602.72 [34,] -145628.28 119592.72 [35,] -270855.28 -145628.28 [36,] -476980.83 -270855.28 [37,] -452898.83 -476980.83 [38,] -181212.83 -452898.83 [39,] -24745.83 -181212.83 [40,] 75624.17 -24745.83 [41,] 124900.17 75624.17 [42,] 382501.17 124900.17 [43,] 282232.17 382501.17 [44,] 246096.17 282232.17 [45,] 105696.17 246096.17 [46,] -147392.83 105696.17 [47,] -253374.83 -147392.83 [48,] -320697.83 -253374.83 [49,] -246817.83 -320697.83 [50,] -37068.83 -246817.83 [51,] 91471.17 -37068.83 [52,] 196118.17 91471.17 [53,] 205418.17 196118.17 [54,] 433495.17 205418.17 [55,] 304978.17 433495.17 [56,] 241454.17 304978.17 [57,] 74019.17 241454.17 [58,] -255700.83 74019.17 [59,] -367112.83 -255700.83 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -359916.28 -426472.28 2 -215223.28 -359916.28 3 -15613.28 -215223.28 4 70295.72 -15613.28 5 63711.72 70295.72 6 348082.72 63711.72 7 288335.72 348082.72 8 191815.72 288335.72 9 47476.72 191815.72 10 -220262.28 47476.72 11 -311761.28 -220262.28 12 -358601.28 -311761.28 13 -339457.28 -358601.28 14 -140074.28 -339457.28 15 21001.72 -140074.28 16 121960.72 21001.72 17 150883.72 121960.72 18 413931.72 150883.72 19 305376.72 413931.72 20 251266.72 305376.72 21 73341.72 251266.72 22 -183842.28 73341.72 23 -310102.28 -183842.28 24 -332430.28 -310102.28 25 -308627.28 -332430.28 26 -89788.28 -308627.28 27 121607.72 -89788.28 28 204508.72 121607.72 29 201306.72 204508.72 30 438057.72 201306.72 31 314497.72 438057.72 32 281602.72 314497.72 33 119592.72 281602.72 34 -145628.28 119592.72 35 -270855.28 -145628.28 36 -476980.83 -270855.28 37 -452898.83 -476980.83 38 -181212.83 -452898.83 39 -24745.83 -181212.83 40 75624.17 -24745.83 41 124900.17 75624.17 42 382501.17 124900.17 43 282232.17 382501.17 44 246096.17 282232.17 45 105696.17 246096.17 46 -147392.83 105696.17 47 -253374.83 -147392.83 48 -320697.83 -253374.83 49 -246817.83 -320697.83 50 -37068.83 -246817.83 51 91471.17 -37068.83 52 196118.17 91471.17 53 205418.17 196118.17 54 433495.17 205418.17 55 304978.17 433495.17 56 241454.17 304978.17 57 74019.17 241454.17 58 -255700.83 74019.17 59 -367112.83 -255700.83 > 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/76nyn1261310205.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/8g4de1261310205.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/996pe1261310205.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/101fzj1261310205.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/11snfh1261310205.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/12sycm1261310205.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/13aase1261310205.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/146tzt1261310205.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/15rbdf1261310205.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/16nz901261310205.tab") + } > > try(system("convert tmp/141ff1261310205.ps tmp/141ff1261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/2pvt11261310205.ps tmp/2pvt11261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/3o2781261310205.ps tmp/3o2781261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/4zjgc1261310205.ps tmp/4zjgc1261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/5g1im1261310205.ps tmp/5g1im1261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/60l5n1261310205.ps tmp/60l5n1261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/76nyn1261310205.ps tmp/76nyn1261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/8g4de1261310205.ps tmp/8g4de1261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/996pe1261310205.ps tmp/996pe1261310205.png",intern=TRUE)) character(0) > try(system("convert tmp/101fzj1261310205.ps tmp/101fzj1261310205.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.458 1.545 4.214