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(1.43,0.51,1.43,0.51,1.43,0.51,1.43,0.51,1.43,0.52,1.43,0.52,1.44,0.52,1.48,0.53,1.48,0.53,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.52,1.48,0.53,1.48,0.53,1.48,0.53,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.54,1.48,0.53,1.48,0.53,1.48,0.53,1.48,0.53,1.48,0.53,1.57,0.54,1.58,0.55,1.58,0.55,1.58,0.55,1.58,0.55,1.59,0.55,1.6,0.55,1.6,0.55,1.61,0.55,1.61,0.56,1.61,0.56,1.62,0.56,1.63,0.56,1.63,0.56,1.64,0.55,1.64,0.56,1.64,0.55,1.64,0.55,1.64,0.56,1.65,0.55,1.65,0.55,1.65,0.55,1.65,0.55),dim=c(2,60),dimnames=list(c('Broodprijs','Bakmeelprijs'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Broodprijs','Bakmeelprijs'),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 Broodprijs Bakmeelprijs 1 1.43 0.51 2 1.43 0.51 3 1.43 0.51 4 1.43 0.51 5 1.43 0.52 6 1.43 0.52 7 1.44 0.52 8 1.48 0.53 9 1.48 0.53 10 1.48 0.52 11 1.48 0.52 12 1.48 0.52 13 1.48 0.52 14 1.48 0.52 15 1.48 0.52 16 1.48 0.52 17 1.48 0.52 18 1.48 0.52 19 1.48 0.52 20 1.48 0.53 21 1.48 0.53 22 1.48 0.53 23 1.48 0.54 24 1.48 0.54 25 1.48 0.54 26 1.48 0.54 27 1.48 0.54 28 1.48 0.54 29 1.48 0.54 30 1.48 0.54 31 1.48 0.54 32 1.48 0.54 33 1.48 0.53 34 1.48 0.53 35 1.48 0.53 36 1.48 0.53 37 1.48 0.53 38 1.57 0.54 39 1.58 0.55 40 1.58 0.55 41 1.58 0.55 42 1.58 0.55 43 1.59 0.55 44 1.60 0.55 45 1.60 0.55 46 1.61 0.55 47 1.61 0.56 48 1.61 0.56 49 1.62 0.56 50 1.63 0.56 51 1.63 0.56 52 1.64 0.55 53 1.64 0.56 54 1.64 0.55 55 1.64 0.55 56 1.64 0.56 57 1.65 0.55 58 1.65 0.55 59 1.65 0.55 60 1.65 0.55 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Bakmeelprijs -0.7997 4.3337 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.060557 -0.017219 -0.000563 0.026118 0.066106 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.7997 0.1710 -4.676 1.79e-05 *** Bakmeelprijs 4.3337 0.3184 13.610 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.037 on 58 degrees of freedom Multiple R-squared: 0.7615, Adjusted R-squared: 0.7574 F-statistic: 185.2 on 1 and 58 DF, p-value: < 2.2e-16 > 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,] 3.878097e-43 7.756194e-43 1.000000e+00 [2,] 2.950960e-57 5.901919e-57 1.000000e+00 [3,] 2.346283e-05 4.692566e-05 9.999765e-01 [4,] 2.666780e-03 5.333561e-03 9.973332e-01 [5,] 1.324674e-03 2.649349e-03 9.986753e-01 [6,] 4.356403e-03 8.712806e-03 9.956436e-01 [7,] 5.819962e-03 1.163992e-02 9.941800e-01 [8,] 5.758726e-03 1.151745e-02 9.942413e-01 [9,] 4.934832e-03 9.869663e-03 9.950652e-01 [10,] 3.912695e-03 7.825391e-03 9.960873e-01 [11,] 2.984512e-03 5.969024e-03 9.970155e-01 [12,] 2.261213e-03 4.522426e-03 9.977388e-01 [13,] 1.763804e-03 3.527607e-03 9.982362e-01 [14,] 1.491527e-03 2.983053e-03 9.985085e-01 [15,] 1.495909e-03 2.991819e-03 9.985041e-01 [16,] 8.291217e-04 1.658243e-03 9.991709e-01 [17,] 4.306091e-04 8.612181e-04 9.995694e-01 [18,] 2.143417e-04 4.286834e-04 9.997857e-01 [19,] 2.683663e-04 5.367326e-04 9.997316e-01 [20,] 2.394958e-04 4.789916e-04 9.997605e-01 [21,] 1.948104e-04 3.896208e-04 9.998052e-01 [22,] 1.574444e-04 3.148889e-04 9.998426e-01 [23,] 1.327698e-04 2.655397e-04 9.998672e-01 [24,] 1.216627e-04 2.433254e-04 9.998783e-01 [25,] 1.265443e-04 2.530887e-04 9.998735e-01 [26,] 1.577720e-04 3.155439e-04 9.998422e-01 [27,] 2.540141e-04 5.080282e-04 9.997460e-01 [28,] 5.882658e-04 1.176532e-03 9.994117e-01 [29,] 3.592928e-04 7.185855e-04 9.996407e-01 [30,] 2.348560e-04 4.697120e-04 9.997651e-01 [31,] 1.815589e-04 3.631177e-04 9.998184e-01 [32,] 2.234998e-04 4.469996e-04 9.997765e-01 [33,] 1.852706e-03 3.705412e-03 9.981473e-01 [34,] 8.106894e-02 1.621379e-01 9.189311e-01 [35,] 2.651364e-01 5.302728e-01 7.348636e-01 [36,] 4.705301e-01 9.410602e-01 5.294699e-01 [37,] 6.711915e-01 6.576171e-01 3.288085e-01 [38,] 8.552595e-01 2.894810e-01 1.447405e-01 [39,] 9.491818e-01 1.016363e-01 5.081817e-02 [40,] 9.833951e-01 3.320971e-02 1.660485e-02 [41,] 9.980691e-01 3.861895e-03 1.930947e-03 [42,] 9.999070e-01 1.859792e-04 9.298959e-05 [43,] 9.999337e-01 1.326949e-04 6.634744e-05 [44,] 9.999885e-01 2.293435e-05 1.146718e-05 [45,] 9.999946e-01 1.081367e-05 5.406837e-06 [46,] 9.999837e-01 3.250743e-05 1.625371e-05 [47,] 9.999722e-01 5.551066e-05 2.775533e-05 [48,] 9.999420e-01 1.159143e-04 5.795716e-05 [49,] 9.996213e-01 7.574005e-04 3.787002e-04 [50,] 9.992611e-01 1.477894e-03 7.389469e-04 [51,] 1.000000e+00 0.000000e+00 0.000000e+00 > postscript(file="/var/www/html/rcomp/tmp/116hw1258718673.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/2f59w1258718673.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/3x1oj1258718673.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/42c4d1258718673.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/5z68q1258718673.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 0.019455488 0.019455488 0.019455488 0.019455488 -0.023881961 -0.023881961 7 8 9 10 11 12 -0.013881961 -0.017219410 -0.017219410 0.026118039 0.026118039 0.026118039 13 14 15 16 17 18 0.026118039 0.026118039 0.026118039 0.026118039 0.026118039 0.026118039 19 20 21 22 23 24 0.026118039 -0.017219410 -0.017219410 -0.017219410 -0.060556859 -0.060556859 25 26 27 28 29 30 -0.060556859 -0.060556859 -0.060556859 -0.060556859 -0.060556859 -0.060556859 31 32 33 34 35 36 -0.060556859 -0.060556859 -0.017219410 -0.017219410 -0.017219410 -0.017219410 37 38 39 40 41 42 -0.017219410 0.029443141 -0.003894308 -0.003894308 -0.003894308 -0.003894308 43 44 45 46 47 48 0.006105692 0.016105692 0.016105692 0.026105692 -0.017231757 -0.017231757 49 50 51 52 53 54 -0.007231757 0.002768243 0.002768243 0.056105692 0.012768243 0.056105692 55 56 57 58 59 60 0.056105692 0.012768243 0.066105692 0.066105692 0.066105692 0.066105692 > postscript(file="/var/www/html/rcomp/tmp/65zh11258718673.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 0.019455488 NA 1 0.019455488 0.019455488 2 0.019455488 0.019455488 3 0.019455488 0.019455488 4 -0.023881961 0.019455488 5 -0.023881961 -0.023881961 6 -0.013881961 -0.023881961 7 -0.017219410 -0.013881961 8 -0.017219410 -0.017219410 9 0.026118039 -0.017219410 10 0.026118039 0.026118039 11 0.026118039 0.026118039 12 0.026118039 0.026118039 13 0.026118039 0.026118039 14 0.026118039 0.026118039 15 0.026118039 0.026118039 16 0.026118039 0.026118039 17 0.026118039 0.026118039 18 0.026118039 0.026118039 19 -0.017219410 0.026118039 20 -0.017219410 -0.017219410 21 -0.017219410 -0.017219410 22 -0.060556859 -0.017219410 23 -0.060556859 -0.060556859 24 -0.060556859 -0.060556859 25 -0.060556859 -0.060556859 26 -0.060556859 -0.060556859 27 -0.060556859 -0.060556859 28 -0.060556859 -0.060556859 29 -0.060556859 -0.060556859 30 -0.060556859 -0.060556859 31 -0.060556859 -0.060556859 32 -0.017219410 -0.060556859 33 -0.017219410 -0.017219410 34 -0.017219410 -0.017219410 35 -0.017219410 -0.017219410 36 -0.017219410 -0.017219410 37 0.029443141 -0.017219410 38 -0.003894308 0.029443141 39 -0.003894308 -0.003894308 40 -0.003894308 -0.003894308 41 -0.003894308 -0.003894308 42 0.006105692 -0.003894308 43 0.016105692 0.006105692 44 0.016105692 0.016105692 45 0.026105692 0.016105692 46 -0.017231757 0.026105692 47 -0.017231757 -0.017231757 48 -0.007231757 -0.017231757 49 0.002768243 -0.007231757 50 0.002768243 0.002768243 51 0.056105692 0.002768243 52 0.012768243 0.056105692 53 0.056105692 0.012768243 54 0.056105692 0.056105692 55 0.012768243 0.056105692 56 0.066105692 0.012768243 57 0.066105692 0.066105692 58 0.066105692 0.066105692 59 0.066105692 0.066105692 60 NA 0.066105692 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.019455488 0.019455488 [2,] 0.019455488 0.019455488 [3,] 0.019455488 0.019455488 [4,] -0.023881961 0.019455488 [5,] -0.023881961 -0.023881961 [6,] -0.013881961 -0.023881961 [7,] -0.017219410 -0.013881961 [8,] -0.017219410 -0.017219410 [9,] 0.026118039 -0.017219410 [10,] 0.026118039 0.026118039 [11,] 0.026118039 0.026118039 [12,] 0.026118039 0.026118039 [13,] 0.026118039 0.026118039 [14,] 0.026118039 0.026118039 [15,] 0.026118039 0.026118039 [16,] 0.026118039 0.026118039 [17,] 0.026118039 0.026118039 [18,] 0.026118039 0.026118039 [19,] -0.017219410 0.026118039 [20,] -0.017219410 -0.017219410 [21,] -0.017219410 -0.017219410 [22,] -0.060556859 -0.017219410 [23,] -0.060556859 -0.060556859 [24,] -0.060556859 -0.060556859 [25,] -0.060556859 -0.060556859 [26,] -0.060556859 -0.060556859 [27,] -0.060556859 -0.060556859 [28,] -0.060556859 -0.060556859 [29,] -0.060556859 -0.060556859 [30,] -0.060556859 -0.060556859 [31,] -0.060556859 -0.060556859 [32,] -0.017219410 -0.060556859 [33,] -0.017219410 -0.017219410 [34,] -0.017219410 -0.017219410 [35,] -0.017219410 -0.017219410 [36,] -0.017219410 -0.017219410 [37,] 0.029443141 -0.017219410 [38,] -0.003894308 0.029443141 [39,] -0.003894308 -0.003894308 [40,] -0.003894308 -0.003894308 [41,] -0.003894308 -0.003894308 [42,] 0.006105692 -0.003894308 [43,] 0.016105692 0.006105692 [44,] 0.016105692 0.016105692 [45,] 0.026105692 0.016105692 [46,] -0.017231757 0.026105692 [47,] -0.017231757 -0.017231757 [48,] -0.007231757 -0.017231757 [49,] 0.002768243 -0.007231757 [50,] 0.002768243 0.002768243 [51,] 0.056105692 0.002768243 [52,] 0.012768243 0.056105692 [53,] 0.056105692 0.012768243 [54,] 0.056105692 0.056105692 [55,] 0.012768243 0.056105692 [56,] 0.066105692 0.012768243 [57,] 0.066105692 0.066105692 [58,] 0.066105692 0.066105692 [59,] 0.066105692 0.066105692 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.019455488 0.019455488 2 0.019455488 0.019455488 3 0.019455488 0.019455488 4 -0.023881961 0.019455488 5 -0.023881961 -0.023881961 6 -0.013881961 -0.023881961 7 -0.017219410 -0.013881961 8 -0.017219410 -0.017219410 9 0.026118039 -0.017219410 10 0.026118039 0.026118039 11 0.026118039 0.026118039 12 0.026118039 0.026118039 13 0.026118039 0.026118039 14 0.026118039 0.026118039 15 0.026118039 0.026118039 16 0.026118039 0.026118039 17 0.026118039 0.026118039 18 0.026118039 0.026118039 19 -0.017219410 0.026118039 20 -0.017219410 -0.017219410 21 -0.017219410 -0.017219410 22 -0.060556859 -0.017219410 23 -0.060556859 -0.060556859 24 -0.060556859 -0.060556859 25 -0.060556859 -0.060556859 26 -0.060556859 -0.060556859 27 -0.060556859 -0.060556859 28 -0.060556859 -0.060556859 29 -0.060556859 -0.060556859 30 -0.060556859 -0.060556859 31 -0.060556859 -0.060556859 32 -0.017219410 -0.060556859 33 -0.017219410 -0.017219410 34 -0.017219410 -0.017219410 35 -0.017219410 -0.017219410 36 -0.017219410 -0.017219410 37 0.029443141 -0.017219410 38 -0.003894308 0.029443141 39 -0.003894308 -0.003894308 40 -0.003894308 -0.003894308 41 -0.003894308 -0.003894308 42 0.006105692 -0.003894308 43 0.016105692 0.006105692 44 0.016105692 0.016105692 45 0.026105692 0.016105692 46 -0.017231757 0.026105692 47 -0.017231757 -0.017231757 48 -0.007231757 -0.017231757 49 0.002768243 -0.007231757 50 0.002768243 0.002768243 51 0.056105692 0.002768243 52 0.012768243 0.056105692 53 0.056105692 0.012768243 54 0.056105692 0.056105692 55 0.012768243 0.056105692 56 0.066105692 0.012768243 57 0.066105692 0.066105692 58 0.066105692 0.066105692 59 0.066105692 0.066105692 > 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/7qwq81258718673.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/8ttst1258718673.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/9kf3w1258718673.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/10w76m1258718673.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/11ixrr1258718673.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/12w1591258718673.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/13luls1258718673.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/14kwdc1258718673.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/15eqge1258718673.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/16jc811258718673.tab") + } > > system("convert tmp/116hw1258718673.ps tmp/116hw1258718673.png") > system("convert tmp/2f59w1258718673.ps tmp/2f59w1258718673.png") > system("convert tmp/3x1oj1258718673.ps tmp/3x1oj1258718673.png") > system("convert tmp/42c4d1258718673.ps tmp/42c4d1258718673.png") > system("convert tmp/5z68q1258718673.ps tmp/5z68q1258718673.png") > system("convert tmp/65zh11258718673.ps tmp/65zh11258718673.png") > system("convert tmp/7qwq81258718673.ps tmp/7qwq81258718673.png") > system("convert tmp/8ttst1258718673.ps tmp/8ttst1258718673.png") > system("convert tmp/9kf3w1258718673.ps tmp/9kf3w1258718673.png") > system("convert tmp/10w76m1258718673.ps tmp/10w76m1258718673.png") > > > proc.time() user system elapsed 2.436 1.530 2.845