R version 2.7.0 (2008-04-22) 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(6.06,0,5.983,0,6.11,0,6.143,0,6.093,0,6.148,0,6.464,0,6.532,0,6.321,0,6.23,0,6.176,0,6.338,0,6.462,0,6.401,0,6.46,0,6.519,0,6.542,0,6.637,0,7.114,0,7.579,0,7.408,0,8.243,0,8.243,0,8.434,0,8.576,0,8.58,0,8.645,0,8.66,0,8.72,0,8.787,0,9.162,0,9.144,0,8.806,0,8.778,0,8.66,0,8.826,0,8.609,1,8.628,1,8.619,1,8.775,1,8.84,1,8.745,1,9.092,1,8.934,1,8.749,1,8.298,1,8.067,1,7.969,1,7.999,0,7.865,0,7.746,0,7.633,0,7.458,0,7.391,0,7.856,0,7.72,0,7.297,0,7.123,0,7.004,0,7.151,0),dim=c(2,60),dimnames=list(c('Textiel','dummy'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Textiel','dummy'),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 Textiel dummy 1 6.060 0 2 5.983 0 3 6.110 0 4 6.143 0 5 6.093 0 6 6.148 0 7 6.464 0 8 6.532 0 9 6.321 0 10 6.230 0 11 6.176 0 12 6.338 0 13 6.462 0 14 6.401 0 15 6.460 0 16 6.519 0 17 6.542 0 18 6.637 0 19 7.114 0 20 7.579 0 21 7.408 0 22 8.243 0 23 8.243 0 24 8.434 0 25 8.576 0 26 8.580 0 27 8.645 0 28 8.660 0 29 8.720 0 30 8.787 0 31 9.162 0 32 9.144 0 33 8.806 0 34 8.778 0 35 8.660 0 36 8.826 0 37 8.609 1 38 8.628 1 39 8.619 1 40 8.775 1 41 8.840 1 42 8.745 1 43 9.092 1 44 8.934 1 45 8.749 1 46 8.298 1 47 8.067 1 48 7.969 1 49 7.999 0 50 7.865 0 51 7.746 0 52 7.633 0 53 7.458 0 54 7.391 0 55 7.856 0 56 7.720 0 57 7.297 0 58 7.123 0 59 7.004 0 60 7.151 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) dummy 7.421 1.189 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.43840 -0.89265 0.01308 0.63860 1.74060 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.4214 0.1345 55.158 < 2e-16 *** dummy 1.1890 0.3009 3.952 0.000213 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.9322 on 58 degrees of freedom Multiple R-squared: 0.2122, Adjusted R-squared: 0.1986 F-statistic: 15.62 on 1 and 58 DF, p-value: 0.0002128 > 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,] 7.293033e-04 1.458607e-03 9.992707e-01 [2,] 8.532257e-05 1.706451e-04 9.999147e-01 [3,] 8.616457e-04 1.723291e-03 9.991384e-01 [4,] 1.106612e-03 2.213223e-03 9.988934e-01 [5,] 3.483022e-04 6.966045e-04 9.996517e-01 [6,] 9.837756e-05 1.967551e-04 9.999016e-01 [7,] 2.991105e-05 5.982210e-05 9.999701e-01 [8,] 1.152449e-05 2.304898e-05 9.999885e-01 [9,] 8.436672e-06 1.687334e-05 9.999916e-01 [10,] 4.643975e-06 9.287949e-06 9.999954e-01 [11,] 3.654259e-06 7.308517e-06 9.999963e-01 [12,] 4.257350e-06 8.514700e-06 9.999957e-01 [13,] 6.115605e-06 1.223121e-05 9.999939e-01 [14,] 1.612785e-05 3.225570e-05 9.999839e-01 [15,] 7.478727e-04 1.495745e-03 9.992521e-01 [16,] 3.161666e-02 6.323331e-02 9.683833e-01 [17,] 9.520081e-02 1.904016e-01 9.047992e-01 [18,] 4.775585e-01 9.551170e-01 5.224415e-01 [19,] 7.352408e-01 5.295183e-01 2.647592e-01 [20,] 8.852062e-01 2.295875e-01 1.147938e-01 [21,] 9.529449e-01 9.411012e-02 4.705506e-02 [22,] 9.770469e-01 4.590620e-02 2.295310e-02 [23,] 9.881450e-01 2.371000e-02 1.185500e-02 [24,] 9.931470e-01 1.370610e-02 6.853049e-03 [25,] 9.960322e-01 7.935692e-03 3.967846e-03 [26,] 9.978306e-01 4.338783e-03 2.169391e-03 [27,] 9.995636e-01 8.727413e-04 4.363707e-04 [28,] 9.999358e-01 1.283302e-04 6.416510e-05 [29,] 9.999784e-01 4.329590e-05 2.164795e-05 [30,] 9.999945e-01 1.097054e-05 5.485269e-06 [31,] 9.999987e-01 2.618170e-06 1.309085e-06 [32,] 1.000000e+00 4.734962e-08 2.367481e-08 [33,] 9.999999e-01 1.721993e-07 8.609964e-08 [34,] 9.999997e-01 6.028207e-07 3.014104e-07 [35,] 9.999990e-01 2.034505e-06 1.017252e-06 [36,] 9.999970e-01 5.960996e-06 2.980498e-06 [37,] 9.999925e-01 1.491404e-05 7.457022e-06 [38,] 9.999799e-01 4.018424e-05 2.009212e-05 [39,] 9.999826e-01 3.473975e-05 1.736988e-05 [40,] 9.999846e-01 3.089377e-05 1.544688e-05 [41,] 9.999856e-01 2.875525e-05 1.437763e-05 [42,] 9.999608e-01 7.842957e-05 3.921478e-05 [43,] 9.998735e-01 2.529307e-04 1.264654e-04 [44,] 9.996027e-01 7.946419e-04 3.973210e-04 [45,] 9.995328e-01 9.344583e-04 4.672292e-04 [46,] 9.992441e-01 1.511785e-03 7.558926e-04 [47,] 9.983891e-01 3.221884e-03 1.610942e-03 [48,] 9.957274e-01 8.545223e-03 4.272612e-03 [49,] 9.862795e-01 2.744098e-02 1.372049e-02 [50,] 9.583408e-01 8.331846e-02 4.165923e-02 [51,] 9.542681e-01 9.146375e-02 4.573188e-02 > postscript(file="/var/www/html/rcomp/tmp/1ajzd1227351524.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/2t87q1227351524.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/35xsi1227351524.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/4lbja1227351524.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/5q82g1227351524.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 -1.361395833 -1.438395833 -1.311395833 -1.278395833 -1.328395833 -1.273395833 7 8 9 10 11 12 -0.957395833 -0.889395833 -1.100395833 -1.191395833 -1.245395833 -1.083395833 13 14 15 16 17 18 -0.959395833 -1.020395833 -0.961395833 -0.902395833 -0.879395833 -0.784395833 19 20 21 22 23 24 -0.307395833 0.157604167 -0.013395833 0.821604167 0.821604167 1.012604167 25 26 27 28 29 30 1.154604167 1.158604167 1.223604167 1.238604167 1.298604167 1.365604167 31 32 33 34 35 36 1.740604167 1.722604167 1.384604167 1.356604167 1.238604167 1.404604167 37 38 39 40 41 42 -0.001416667 0.017583333 0.008583333 0.164583333 0.229583333 0.134583333 43 44 45 46 47 48 0.481583333 0.323583333 0.138583333 -0.312416667 -0.543416667 -0.641416667 49 50 51 52 53 54 0.577604167 0.443604167 0.324604167 0.211604167 0.036604167 -0.030395833 55 56 57 58 59 60 0.434604167 0.298604167 -0.124395833 -0.298395833 -0.417395833 -0.270395833 > postscript(file="/var/www/html/rcomp/tmp/6r7p71227351524.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 -1.361395833 NA 1 -1.438395833 -1.361395833 2 -1.311395833 -1.438395833 3 -1.278395833 -1.311395833 4 -1.328395833 -1.278395833 5 -1.273395833 -1.328395833 6 -0.957395833 -1.273395833 7 -0.889395833 -0.957395833 8 -1.100395833 -0.889395833 9 -1.191395833 -1.100395833 10 -1.245395833 -1.191395833 11 -1.083395833 -1.245395833 12 -0.959395833 -1.083395833 13 -1.020395833 -0.959395833 14 -0.961395833 -1.020395833 15 -0.902395833 -0.961395833 16 -0.879395833 -0.902395833 17 -0.784395833 -0.879395833 18 -0.307395833 -0.784395833 19 0.157604167 -0.307395833 20 -0.013395833 0.157604167 21 0.821604167 -0.013395833 22 0.821604167 0.821604167 23 1.012604167 0.821604167 24 1.154604167 1.012604167 25 1.158604167 1.154604167 26 1.223604167 1.158604167 27 1.238604167 1.223604167 28 1.298604167 1.238604167 29 1.365604167 1.298604167 30 1.740604167 1.365604167 31 1.722604167 1.740604167 32 1.384604167 1.722604167 33 1.356604167 1.384604167 34 1.238604167 1.356604167 35 1.404604167 1.238604167 36 -0.001416667 1.404604167 37 0.017583333 -0.001416667 38 0.008583333 0.017583333 39 0.164583333 0.008583333 40 0.229583333 0.164583333 41 0.134583333 0.229583333 42 0.481583333 0.134583333 43 0.323583333 0.481583333 44 0.138583333 0.323583333 45 -0.312416667 0.138583333 46 -0.543416667 -0.312416667 47 -0.641416667 -0.543416667 48 0.577604167 -0.641416667 49 0.443604167 0.577604167 50 0.324604167 0.443604167 51 0.211604167 0.324604167 52 0.036604167 0.211604167 53 -0.030395833 0.036604167 54 0.434604167 -0.030395833 55 0.298604167 0.434604167 56 -0.124395833 0.298604167 57 -0.298395833 -0.124395833 58 -0.417395833 -0.298395833 59 -0.270395833 -0.417395833 60 NA -0.270395833 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.438395833 -1.361395833 [2,] -1.311395833 -1.438395833 [3,] -1.278395833 -1.311395833 [4,] -1.328395833 -1.278395833 [5,] -1.273395833 -1.328395833 [6,] -0.957395833 -1.273395833 [7,] -0.889395833 -0.957395833 [8,] -1.100395833 -0.889395833 [9,] -1.191395833 -1.100395833 [10,] -1.245395833 -1.191395833 [11,] -1.083395833 -1.245395833 [12,] -0.959395833 -1.083395833 [13,] -1.020395833 -0.959395833 [14,] -0.961395833 -1.020395833 [15,] -0.902395833 -0.961395833 [16,] -0.879395833 -0.902395833 [17,] -0.784395833 -0.879395833 [18,] -0.307395833 -0.784395833 [19,] 0.157604167 -0.307395833 [20,] -0.013395833 0.157604167 [21,] 0.821604167 -0.013395833 [22,] 0.821604167 0.821604167 [23,] 1.012604167 0.821604167 [24,] 1.154604167 1.012604167 [25,] 1.158604167 1.154604167 [26,] 1.223604167 1.158604167 [27,] 1.238604167 1.223604167 [28,] 1.298604167 1.238604167 [29,] 1.365604167 1.298604167 [30,] 1.740604167 1.365604167 [31,] 1.722604167 1.740604167 [32,] 1.384604167 1.722604167 [33,] 1.356604167 1.384604167 [34,] 1.238604167 1.356604167 [35,] 1.404604167 1.238604167 [36,] -0.001416667 1.404604167 [37,] 0.017583333 -0.001416667 [38,] 0.008583333 0.017583333 [39,] 0.164583333 0.008583333 [40,] 0.229583333 0.164583333 [41,] 0.134583333 0.229583333 [42,] 0.481583333 0.134583333 [43,] 0.323583333 0.481583333 [44,] 0.138583333 0.323583333 [45,] -0.312416667 0.138583333 [46,] -0.543416667 -0.312416667 [47,] -0.641416667 -0.543416667 [48,] 0.577604167 -0.641416667 [49,] 0.443604167 0.577604167 [50,] 0.324604167 0.443604167 [51,] 0.211604167 0.324604167 [52,] 0.036604167 0.211604167 [53,] -0.030395833 0.036604167 [54,] 0.434604167 -0.030395833 [55,] 0.298604167 0.434604167 [56,] -0.124395833 0.298604167 [57,] -0.298395833 -0.124395833 [58,] -0.417395833 -0.298395833 [59,] -0.270395833 -0.417395833 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.438395833 -1.361395833 2 -1.311395833 -1.438395833 3 -1.278395833 -1.311395833 4 -1.328395833 -1.278395833 5 -1.273395833 -1.328395833 6 -0.957395833 -1.273395833 7 -0.889395833 -0.957395833 8 -1.100395833 -0.889395833 9 -1.191395833 -1.100395833 10 -1.245395833 -1.191395833 11 -1.083395833 -1.245395833 12 -0.959395833 -1.083395833 13 -1.020395833 -0.959395833 14 -0.961395833 -1.020395833 15 -0.902395833 -0.961395833 16 -0.879395833 -0.902395833 17 -0.784395833 -0.879395833 18 -0.307395833 -0.784395833 19 0.157604167 -0.307395833 20 -0.013395833 0.157604167 21 0.821604167 -0.013395833 22 0.821604167 0.821604167 23 1.012604167 0.821604167 24 1.154604167 1.012604167 25 1.158604167 1.154604167 26 1.223604167 1.158604167 27 1.238604167 1.223604167 28 1.298604167 1.238604167 29 1.365604167 1.298604167 30 1.740604167 1.365604167 31 1.722604167 1.740604167 32 1.384604167 1.722604167 33 1.356604167 1.384604167 34 1.238604167 1.356604167 35 1.404604167 1.238604167 36 -0.001416667 1.404604167 37 0.017583333 -0.001416667 38 0.008583333 0.017583333 39 0.164583333 0.008583333 40 0.229583333 0.164583333 41 0.134583333 0.229583333 42 0.481583333 0.134583333 43 0.323583333 0.481583333 44 0.138583333 0.323583333 45 -0.312416667 0.138583333 46 -0.543416667 -0.312416667 47 -0.641416667 -0.543416667 48 0.577604167 -0.641416667 49 0.443604167 0.577604167 50 0.324604167 0.443604167 51 0.211604167 0.324604167 52 0.036604167 0.211604167 53 -0.030395833 0.036604167 54 0.434604167 -0.030395833 55 0.298604167 0.434604167 56 -0.124395833 0.298604167 57 -0.298395833 -0.124395833 58 -0.417395833 -0.298395833 59 -0.270395833 -0.417395833 > 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/7tayq1227351524.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/8otqj1227351525.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/9yoj91227351525.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/10g5vx1227351525.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/11ggq11227351525.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/1248go1227351525.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/13yf4k1227351525.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/14mq3y1227351525.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/150ats1227351525.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/16abyj1227351525.tab") + } > > system("convert tmp/1ajzd1227351524.ps tmp/1ajzd1227351524.png") > system("convert tmp/2t87q1227351524.ps tmp/2t87q1227351524.png") > system("convert tmp/35xsi1227351524.ps tmp/35xsi1227351524.png") > system("convert tmp/4lbja1227351524.ps tmp/4lbja1227351524.png") > system("convert tmp/5q82g1227351524.ps tmp/5q82g1227351524.png") > system("convert tmp/6r7p71227351524.ps tmp/6r7p71227351524.png") > system("convert tmp/7tayq1227351524.ps tmp/7tayq1227351524.png") > system("convert tmp/8otqj1227351525.ps tmp/8otqj1227351525.png") > system("convert tmp/9yoj91227351525.ps tmp/9yoj91227351525.png") > system("convert tmp/10g5vx1227351525.ps tmp/10g5vx1227351525.png") > > > proc.time() user system elapsed 5.018 2.744 5.402