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(4143,0,4429,0,5219,0,4929,0,5761,0,5592,0,4163,0,4962,0,5208,0,4755,0,4491,0,5732,0,5731,0,5040,0,6102,0,4904,0,5369,0,5578,0,4619,0,4731,0,5011,0,5299,0,4146,0,4625,0,4736,0,4219,0,5116,0,4205,1,4121,1,5103,1,4300,1,4578,1,3809,1,5526,1,4248,1,3830,1,4428,1,4834,1,4406,1,4565,1,4104,1,4798,1,3935,1,3792,1,4387,1,4006,1,4078,1,4724,1),dim=c(2,48),dimnames=list(c('y','x '),1:48)) > y <- array(NA,dim=c(2,48),dimnames=list(c('y','x '),1:48)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly 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\r M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 4143 0 1 0 0 0 0 0 0 0 0 0 0 1 2 4429 0 0 1 0 0 0 0 0 0 0 0 0 2 3 5219 0 0 0 1 0 0 0 0 0 0 0 0 3 4 4929 0 0 0 0 1 0 0 0 0 0 0 0 4 5 5761 0 0 0 0 0 1 0 0 0 0 0 0 5 6 5592 0 0 0 0 0 0 1 0 0 0 0 0 6 7 4163 0 0 0 0 0 0 0 1 0 0 0 0 7 8 4962 0 0 0 0 0 0 0 0 1 0 0 0 8 9 5208 0 0 0 0 0 0 0 0 0 1 0 0 9 10 4755 0 0 0 0 0 0 0 0 0 0 1 0 10 11 4491 0 0 0 0 0 0 0 0 0 0 0 1 11 12 5732 0 0 0 0 0 0 0 0 0 0 0 0 12 13 5731 0 1 0 0 0 0 0 0 0 0 0 0 13 14 5040 0 0 1 0 0 0 0 0 0 0 0 0 14 15 6102 0 0 0 1 0 0 0 0 0 0 0 0 15 16 4904 0 0 0 0 1 0 0 0 0 0 0 0 16 17 5369 0 0 0 0 0 1 0 0 0 0 0 0 17 18 5578 0 0 0 0 0 0 1 0 0 0 0 0 18 19 4619 0 0 0 0 0 0 0 1 0 0 0 0 19 20 4731 0 0 0 0 0 0 0 0 1 0 0 0 20 21 5011 0 0 0 0 0 0 0 0 0 1 0 0 21 22 5299 0 0 0 0 0 0 0 0 0 0 1 0 22 23 4146 0 0 0 0 0 0 0 0 0 0 0 1 23 24 4625 0 0 0 0 0 0 0 0 0 0 0 0 24 25 4736 0 1 0 0 0 0 0 0 0 0 0 0 25 26 4219 0 0 1 0 0 0 0 0 0 0 0 0 26 27 5116 0 0 0 1 0 0 0 0 0 0 0 0 27 28 4205 1 0 0 0 1 0 0 0 0 0 0 0 28 29 4121 1 0 0 0 0 1 0 0 0 0 0 0 29 30 5103 1 0 0 0 0 0 1 0 0 0 0 0 30 31 4300 1 0 0 0 0 0 0 1 0 0 0 0 31 32 4578 1 0 0 0 0 0 0 0 1 0 0 0 32 33 3809 1 0 0 0 0 0 0 0 0 1 0 0 33 34 5526 1 0 0 0 0 0 0 0 0 0 1 0 34 35 4248 1 0 0 0 0 0 0 0 0 0 0 1 35 36 3830 1 0 0 0 0 0 0 0 0 0 0 0 36 37 4428 1 1 0 0 0 0 0 0 0 0 0 0 37 38 4834 1 0 1 0 0 0 0 0 0 0 0 0 38 39 4406 1 0 0 1 0 0 0 0 0 0 0 0 39 40 4565 1 0 0 0 1 0 0 0 0 0 0 0 40 41 4104 1 0 0 0 0 1 0 0 0 0 0 0 41 42 4798 1 0 0 0 0 0 1 0 0 0 0 0 42 43 3935 1 0 0 0 0 0 0 1 0 0 0 0 43 44 3792 1 0 0 0 0 0 0 0 1 0 0 0 44 45 4387 1 0 0 0 0 0 0 0 0 1 0 0 45 46 4006 1 0 0 0 0 0 0 0 0 0 1 0 46 47 4078 1 0 0 0 0 0 0 0 0 0 0 1 47 48 4724 1 0 0 0 0 0 0 0 0 0 0 0 48 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `x\r` M1 M2 M3 M4 5134.772 -467.044 -148.628 -271.844 314.189 -123.267 M5 M6 M7 M8 M9 M10 70.517 505.300 -502.417 -235.133 -141.350 157.183 M11 t -492.783 -5.783 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -837.4 -365.0 2.5 259.0 897.7 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5134.772 307.393 16.704 <2e-16 *** `x\r` -467.044 282.083 -1.656 0.107 M1 -148.628 340.191 -0.437 0.665 M2 -271.844 338.818 -0.802 0.428 M3 314.189 337.746 0.930 0.359 M4 -123.267 344.278 -0.358 0.723 M5 70.517 342.014 0.206 0.838 M6 505.300 340.039 1.486 0.146 M7 -502.417 338.359 -1.485 0.147 M8 -235.133 336.978 -0.698 0.490 M9 -141.350 335.900 -0.421 0.677 M10 157.183 335.128 0.469 0.642 M11 -492.783 334.664 -1.472 0.150 t -5.783 10.179 -0.568 0.574 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 473.1 on 34 degrees of freedom Multiple R-squared: 0.5309, Adjusted R-squared: 0.3515 F-statistic: 2.96 on 13 and 34 DF, p-value: 0.00555 > 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.88387506 0.2322499 0.1161249 [2,] 0.82056847 0.3588631 0.1794315 [3,] 0.70240313 0.5951937 0.2975969 [4,] 0.64449290 0.7110142 0.3555071 [5,] 0.60673601 0.7865280 0.3932640 [6,] 0.49594679 0.9918936 0.5040532 [7,] 0.43952463 0.8790493 0.5604754 [8,] 0.53861227 0.9227755 0.4613877 [9,] 0.43348211 0.8669642 0.5665179 [10,] 0.46313827 0.9262765 0.5368617 [11,] 0.36528439 0.7305688 0.6347156 [12,] 0.27775977 0.5555195 0.7222402 [13,] 0.19489245 0.3897849 0.8051076 [14,] 0.11937646 0.2387529 0.8806235 [15,] 0.07072583 0.1414517 0.9292742 > postscript(file="/var/www/html/rcomp/tmp/1x2cv1258729920.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/2nkht1258729920.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/3wg2k1258729920.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/40z271258729920.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/5ur4b1258729920.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 = 48 Frequency = 1 1 2 3 4 5 6 7 -837.36111 -422.36111 -212.61111 -59.37222 584.62778 -13.37222 -428.87222 8 9 10 11 12 13 14 108.62778 266.62778 -479.12222 -87.37222 666.62778 820.03889 258.03889 15 16 17 18 19 20 21 739.78889 -14.97222 262.02778 42.02778 96.52778 -52.97222 139.02778 22 23 24 25 26 27 28 134.27778 -362.97222 -370.97222 -105.56111 -493.56111 -176.81111 -177.52778 29 30 31 32 33 34 35 -449.52778 103.47222 313.97222 330.47222 -526.52778 897.72222 275.47222 36 37 38 39 40 41 42 -629.52778 122.88333 657.88333 -350.36667 251.87222 -397.12778 -132.12778 43 44 45 46 47 48 18.37222 -386.12778 120.87222 -552.87778 174.87222 333.87222 > postscript(file="/var/www/html/rcomp/tmp/6wezz1258729920.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 = 48 Frequency = 1 lag(myerror, k = 1) myerror 0 -837.36111 NA 1 -422.36111 -837.36111 2 -212.61111 -422.36111 3 -59.37222 -212.61111 4 584.62778 -59.37222 5 -13.37222 584.62778 6 -428.87222 -13.37222 7 108.62778 -428.87222 8 266.62778 108.62778 9 -479.12222 266.62778 10 -87.37222 -479.12222 11 666.62778 -87.37222 12 820.03889 666.62778 13 258.03889 820.03889 14 739.78889 258.03889 15 -14.97222 739.78889 16 262.02778 -14.97222 17 42.02778 262.02778 18 96.52778 42.02778 19 -52.97222 96.52778 20 139.02778 -52.97222 21 134.27778 139.02778 22 -362.97222 134.27778 23 -370.97222 -362.97222 24 -105.56111 -370.97222 25 -493.56111 -105.56111 26 -176.81111 -493.56111 27 -177.52778 -176.81111 28 -449.52778 -177.52778 29 103.47222 -449.52778 30 313.97222 103.47222 31 330.47222 313.97222 32 -526.52778 330.47222 33 897.72222 -526.52778 34 275.47222 897.72222 35 -629.52778 275.47222 36 122.88333 -629.52778 37 657.88333 122.88333 38 -350.36667 657.88333 39 251.87222 -350.36667 40 -397.12778 251.87222 41 -132.12778 -397.12778 42 18.37222 -132.12778 43 -386.12778 18.37222 44 120.87222 -386.12778 45 -552.87778 120.87222 46 174.87222 -552.87778 47 333.87222 174.87222 48 NA 333.87222 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -422.36111 -837.36111 [2,] -212.61111 -422.36111 [3,] -59.37222 -212.61111 [4,] 584.62778 -59.37222 [5,] -13.37222 584.62778 [6,] -428.87222 -13.37222 [7,] 108.62778 -428.87222 [8,] 266.62778 108.62778 [9,] -479.12222 266.62778 [10,] -87.37222 -479.12222 [11,] 666.62778 -87.37222 [12,] 820.03889 666.62778 [13,] 258.03889 820.03889 [14,] 739.78889 258.03889 [15,] -14.97222 739.78889 [16,] 262.02778 -14.97222 [17,] 42.02778 262.02778 [18,] 96.52778 42.02778 [19,] -52.97222 96.52778 [20,] 139.02778 -52.97222 [21,] 134.27778 139.02778 [22,] -362.97222 134.27778 [23,] -370.97222 -362.97222 [24,] -105.56111 -370.97222 [25,] -493.56111 -105.56111 [26,] -176.81111 -493.56111 [27,] -177.52778 -176.81111 [28,] -449.52778 -177.52778 [29,] 103.47222 -449.52778 [30,] 313.97222 103.47222 [31,] 330.47222 313.97222 [32,] -526.52778 330.47222 [33,] 897.72222 -526.52778 [34,] 275.47222 897.72222 [35,] -629.52778 275.47222 [36,] 122.88333 -629.52778 [37,] 657.88333 122.88333 [38,] -350.36667 657.88333 [39,] 251.87222 -350.36667 [40,] -397.12778 251.87222 [41,] -132.12778 -397.12778 [42,] 18.37222 -132.12778 [43,] -386.12778 18.37222 [44,] 120.87222 -386.12778 [45,] -552.87778 120.87222 [46,] 174.87222 -552.87778 [47,] 333.87222 174.87222 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -422.36111 -837.36111 2 -212.61111 -422.36111 3 -59.37222 -212.61111 4 584.62778 -59.37222 5 -13.37222 584.62778 6 -428.87222 -13.37222 7 108.62778 -428.87222 8 266.62778 108.62778 9 -479.12222 266.62778 10 -87.37222 -479.12222 11 666.62778 -87.37222 12 820.03889 666.62778 13 258.03889 820.03889 14 739.78889 258.03889 15 -14.97222 739.78889 16 262.02778 -14.97222 17 42.02778 262.02778 18 96.52778 42.02778 19 -52.97222 96.52778 20 139.02778 -52.97222 21 134.27778 139.02778 22 -362.97222 134.27778 23 -370.97222 -362.97222 24 -105.56111 -370.97222 25 -493.56111 -105.56111 26 -176.81111 -493.56111 27 -177.52778 -176.81111 28 -449.52778 -177.52778 29 103.47222 -449.52778 30 313.97222 103.47222 31 330.47222 313.97222 32 -526.52778 330.47222 33 897.72222 -526.52778 34 275.47222 897.72222 35 -629.52778 275.47222 36 122.88333 -629.52778 37 657.88333 122.88333 38 -350.36667 657.88333 39 251.87222 -350.36667 40 -397.12778 251.87222 41 -132.12778 -397.12778 42 18.37222 -132.12778 43 -386.12778 18.37222 44 120.87222 -386.12778 45 -552.87778 120.87222 46 174.87222 -552.87778 47 333.87222 174.87222 > 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/7pnvw1258729920.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/83mz91258729920.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/99lst1258729920.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/109knp1258729920.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/11pnro1258729920.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/12af031258729920.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/137i6s1258729921.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/14gh0e1258729921.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/1546091258729921.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/1671zu1258729921.tab") + } > > system("convert tmp/1x2cv1258729920.ps tmp/1x2cv1258729920.png") > system("convert tmp/2nkht1258729920.ps tmp/2nkht1258729920.png") > system("convert tmp/3wg2k1258729920.ps tmp/3wg2k1258729920.png") > system("convert tmp/40z271258729920.ps tmp/40z271258729920.png") > system("convert tmp/5ur4b1258729920.ps tmp/5ur4b1258729920.png") > system("convert tmp/6wezz1258729920.ps tmp/6wezz1258729920.png") > system("convert tmp/7pnvw1258729920.ps tmp/7pnvw1258729920.png") > system("convert tmp/83mz91258729920.ps tmp/83mz91258729920.png") > system("convert tmp/99lst1258729920.ps tmp/99lst1258729920.png") > system("convert tmp/109knp1258729920.ps tmp/109knp1258729920.png") > > > proc.time() user system elapsed 2.273 1.524 2.700