R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale 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(162556 + ,1081 + ,807 + ,213118 + ,6282154 + ,29790 + ,309 + ,444 + ,81767 + ,4321023 + ,87550 + ,458 + ,412 + ,153198 + ,4111912 + ,84738 + ,588 + ,428 + ,-26007 + ,223193 + ,54660 + ,302 + ,315 + ,126942 + ,1491348 + ,42634 + ,156 + ,168 + ,157214 + ,1629616 + ,40949 + ,481 + ,263 + ,129352 + ,1398893 + ,45187 + ,353 + ,267 + ,234817 + ,1926517 + ,37704 + ,452 + ,228 + ,60448 + ,983660 + ,16275 + ,109 + ,129 + ,47818 + ,1443586 + ,25830 + ,115 + ,104 + ,245546 + ,1073089 + ,12679 + ,110 + ,122 + ,48020 + ,984885 + ,18014 + ,239 + ,393 + ,-1710 + ,1405225 + ,43556 + ,247 + ,190 + ,32648 + ,227132 + ,24811 + ,505 + ,280 + ,95350 + ,929118 + ,6575 + ,159 + ,63 + ,151352 + ,1071292 + ,7123 + ,109 + ,102 + ,288170 + ,638830 + ,21950 + ,519 + ,265 + ,114337 + ,856956 + ,37597 + ,248 + ,234 + ,37884 + ,992426 + ,17821 + ,373 + ,277 + ,122844 + ,444477 + ,12988 + ,119 + ,73 + ,82340 + ,857217 + ,22330 + ,84 + ,67 + ,79801 + ,711969 + ,13326 + ,102 + ,103 + ,165548 + ,702380 + ,16189 + ,295 + ,290 + ,116384 + ,358589 + ,7146 + ,105 + ,83 + ,134028 + ,297978 + ,15824 + ,64 + ,56 + ,63838 + ,585715 + ,27664 + ,282 + ,236 + ,74996 + ,657954 + ,11920 + ,182 + ,73 + ,31080 + ,209458 + ,8568 + ,37 + ,34 + ,32168 + ,786690 + ,14416 + ,361 + ,139 + ,49857 + ,439798 + ,3369 + ,28 + ,26 + ,87161 + ,688779 + ,11819 + ,85 + ,70 + ,106113 + ,574339 + ,6984 + ,45 + ,40 + ,80570 + ,741409 + ,4519 + ,49 + ,42 + ,102129 + ,597793 + ,2220 + ,22 + ,12 + ,301670 + ,644190 + ,18562 + ,155 + ,211 + ,102313 + ,377934 + ,10327 + ,91 + ,74 + ,88577 + ,640273 + ,5336 + ,81 + ,80 + ,112477 + ,697458 + ,2365 + ,79 + ,83 + ,191778 + ,550608 + ,4069 + ,145 + ,131 + ,79804 + ,207393 + ,8636 + ,855 + ,203 + ,128294 + ,301607 + ,13718 + ,61 + ,56 + ,96448 + ,345783 + ,4525 + ,226 + ,89 + ,93811 + ,501749 + ,6869 + ,105 + ,88 + ,117520 + ,379983 + ,4628 + ,62 + ,39 + ,69159 + ,387475 + ,3689 + ,25 + ,25 + ,101792 + ,377305 + ,4891 + ,217 + ,49 + ,210568 + ,370837 + ,7489 + ,322 + ,149 + ,136996 + ,430866 + ,4901 + ,84 + ,58 + ,121920 + ,469107 + ,2284 + ,33 + ,41 + ,76403 + ,194493) + ,dim=c(5 + ,50) + ,dimnames=list(c('Kosten' + ,'transacties' + ,'orders' + ,'dividenden' + ,'rijkdom') + ,1:50)) > y <- array(NA,dim=c(5,50),dimnames=list(c('Kosten','transacties','orders','dividenden','rijkdom'),1:50)) > 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 = 'Do not include Seasonal Dummies' > par1 = '5' > #'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 rijkdom Kosten transacties orders dividenden t 1 6282154 162556 1081 807 213118 1 2 4321023 29790 309 444 81767 2 3 4111912 87550 458 412 153198 3 4 223193 84738 588 428 -26007 4 5 1491348 54660 302 315 126942 5 6 1629616 42634 156 168 157214 6 7 1398893 40949 481 263 129352 7 8 1926517 45187 353 267 234817 8 9 983660 37704 452 228 60448 9 10 1443586 16275 109 129 47818 10 11 1073089 25830 115 104 245546 11 12 984885 12679 110 122 48020 12 13 1405225 18014 239 393 -1710 13 14 227132 43556 247 190 32648 14 15 929118 24811 505 280 95350 15 16 1071292 6575 159 63 151352 16 17 638830 7123 109 102 288170 17 18 856956 21950 519 265 114337 18 19 992426 37597 248 234 37884 19 20 444477 17821 373 277 122844 20 21 857217 12988 119 73 82340 21 22 711969 22330 84 67 79801 22 23 702380 13326 102 103 165548 23 24 358589 16189 295 290 116384 24 25 297978 7146 105 83 134028 25 26 585715 15824 64 56 63838 26 27 657954 27664 282 236 74996 27 28 209458 11920 182 73 31080 28 29 786690 8568 37 34 32168 29 30 439798 14416 361 139 49857 30 31 688779 3369 28 26 87161 31 32 574339 11819 85 70 106113 32 33 741409 6984 45 40 80570 33 34 597793 4519 49 42 102129 34 35 644190 2220 22 12 301670 35 36 377934 18562 155 211 102313 36 37 640273 10327 91 74 88577 37 38 697458 5336 81 80 112477 38 39 550608 2365 79 83 191778 39 40 207393 4069 145 131 79804 40 41 301607 8636 855 203 128294 41 42 345783 13718 61 56 96448 42 43 501749 4525 226 89 93811 43 44 379983 6869 105 88 117520 44 45 387475 4628 62 39 69159 45 46 377305 3689 25 25 101792 46 47 370837 4891 217 49 210568 47 48 430866 7489 322 149 136996 48 49 469107 4901 84 58 121920 49 50 194493 2284 33 41 76403 50 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Kosten transacties orders dividenden t -1.283e+05 1.560e+01 -1.747e+03 4.993e+03 3.722e+00 -3.998e+03 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1967195 -258613 -24220 285393 2011249 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.283e+05 3.701e+05 -0.347 0.73060 Kosten 1.560e+01 6.721e+00 2.321 0.02499 * transacties -1.747e+03 7.760e+02 -2.251 0.02940 * orders 4.993e+03 1.567e+03 3.186 0.00266 ** dividenden 3.722e+00 1.373e+00 2.712 0.00951 ** t -3.998e+03 8.853e+03 -0.452 0.65373 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 637000 on 44 degrees of freedom Multiple R-squared: 0.7053, Adjusted R-squared: 0.6718 F-statistic: 21.06 on 5 and 44 DF, p-value: 1.088e-10 > 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.9999999 1.163003e-07 5.815017e-08 [2,] 1.0000000 4.813768e-10 2.406884e-10 [3,] 1.0000000 4.333631e-10 2.166815e-10 [4,] 1.0000000 1.781551e-09 8.907753e-10 [5,] 1.0000000 6.506805e-11 3.253402e-11 [6,] 1.0000000 4.273099e-12 2.136549e-12 [7,] 1.0000000 1.208793e-11 6.043967e-12 [8,] 1.0000000 3.956177e-12 1.978089e-12 [9,] 1.0000000 4.883826e-12 2.441913e-12 [10,] 1.0000000 9.178543e-12 4.589272e-12 [11,] 1.0000000 8.398563e-12 4.199282e-12 [12,] 1.0000000 2.979218e-11 1.489609e-11 [13,] 1.0000000 1.987721e-11 9.938604e-12 [14,] 1.0000000 7.228842e-11 3.614421e-11 [15,] 1.0000000 3.816923e-10 1.908462e-10 [16,] 1.0000000 1.030495e-09 5.152474e-10 [17,] 1.0000000 4.696924e-10 2.348462e-10 [18,] 1.0000000 1.652434e-09 8.262169e-10 [19,] 1.0000000 5.135185e-09 2.567593e-09 [20,] 1.0000000 3.260078e-10 1.630039e-10 [21,] 1.0000000 8.945616e-10 4.472808e-10 [22,] 1.0000000 3.180579e-09 1.590289e-09 [23,] 1.0000000 1.869228e-08 9.346138e-09 [24,] 0.9999999 1.085476e-07 5.427378e-08 [25,] 0.9999998 4.496609e-07 2.248305e-07 [26,] 0.9999986 2.716687e-06 1.358344e-06 [27,] 0.9999942 1.163801e-05 5.819007e-06 [28,] 0.9999746 5.082440e-05 2.541220e-05 [29,] 0.9999028 1.943378e-04 9.716891e-05 [30,] 0.9998783 2.433987e-04 1.216993e-04 [31,] 0.9994445 1.111030e-03 5.555151e-04 [32,] 0.9989861 2.027710e-03 1.013855e-03 [33,] 0.9949276 1.014481e-02 5.072405e-03 > postscript(file="/var/www/html/freestat/rcomp/tmp/1y5h61291222615.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/2qxg91291222615.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/3qxg91291222615.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/4qxg91291222615.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/5jofu1291222615.ps",horizontal=F,onefile=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 = 50 Frequency = 1 1 2 3 4 5 6 944940.97 2011248.59 1059444.69 -1967194.94 -730614.44 -34541.70 7 8 9 10 11 12 -37824.15 -208434.54 -13899.00 726340.06 -389818.41 367671.20 13 14 15 16 17 18 -233843.41 -906654.90 -140295.36 560876.94 -667442.73 -127151.90 19 20 21 22 23 24 -265855.41 -813880.68 403813.31 95111.99 -237484.09 -1035455.33 25 26 27 28 29 30 -315079.19 165725.05 -502123.35 101553.44 672420.96 214257.57 31 32 33 34 35 36 483138.49 50249.46 471709.49 287300.93 -266505.49 -802911.55 37 38 39 40 41 42 215225.83 217873.89 -192264.05 -265656.12 461761.33 -103996.41 43 44 45 46 47 48 332667.35 -116305.65 279669.32 171946.59 -38525.86 -57048.85 49 50 120232.02 55628.03 > postscript(file="/var/www/html/freestat/rcomp/tmp/6jofu1291222615.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 50 Frequency = 1 lag(myerror, k = 1) myerror 0 944940.97 NA 1 2011248.59 944940.97 2 1059444.69 2011248.59 3 -1967194.94 1059444.69 4 -730614.44 -1967194.94 5 -34541.70 -730614.44 6 -37824.15 -34541.70 7 -208434.54 -37824.15 8 -13899.00 -208434.54 9 726340.06 -13899.00 10 -389818.41 726340.06 11 367671.20 -389818.41 12 -233843.41 367671.20 13 -906654.90 -233843.41 14 -140295.36 -906654.90 15 560876.94 -140295.36 16 -667442.73 560876.94 17 -127151.90 -667442.73 18 -265855.41 -127151.90 19 -813880.68 -265855.41 20 403813.31 -813880.68 21 95111.99 403813.31 22 -237484.09 95111.99 23 -1035455.33 -237484.09 24 -315079.19 -1035455.33 25 165725.05 -315079.19 26 -502123.35 165725.05 27 101553.44 -502123.35 28 672420.96 101553.44 29 214257.57 672420.96 30 483138.49 214257.57 31 50249.46 483138.49 32 471709.49 50249.46 33 287300.93 471709.49 34 -266505.49 287300.93 35 -802911.55 -266505.49 36 215225.83 -802911.55 37 217873.89 215225.83 38 -192264.05 217873.89 39 -265656.12 -192264.05 40 461761.33 -265656.12 41 -103996.41 461761.33 42 332667.35 -103996.41 43 -116305.65 332667.35 44 279669.32 -116305.65 45 171946.59 279669.32 46 -38525.86 171946.59 47 -57048.85 -38525.86 48 120232.02 -57048.85 49 55628.03 120232.02 50 NA 55628.03 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2011248.59 944940.97 [2,] 1059444.69 2011248.59 [3,] -1967194.94 1059444.69 [4,] -730614.44 -1967194.94 [5,] -34541.70 -730614.44 [6,] -37824.15 -34541.70 [7,] -208434.54 -37824.15 [8,] -13899.00 -208434.54 [9,] 726340.06 -13899.00 [10,] -389818.41 726340.06 [11,] 367671.20 -389818.41 [12,] -233843.41 367671.20 [13,] -906654.90 -233843.41 [14,] -140295.36 -906654.90 [15,] 560876.94 -140295.36 [16,] -667442.73 560876.94 [17,] -127151.90 -667442.73 [18,] -265855.41 -127151.90 [19,] -813880.68 -265855.41 [20,] 403813.31 -813880.68 [21,] 95111.99 403813.31 [22,] -237484.09 95111.99 [23,] -1035455.33 -237484.09 [24,] -315079.19 -1035455.33 [25,] 165725.05 -315079.19 [26,] -502123.35 165725.05 [27,] 101553.44 -502123.35 [28,] 672420.96 101553.44 [29,] 214257.57 672420.96 [30,] 483138.49 214257.57 [31,] 50249.46 483138.49 [32,] 471709.49 50249.46 [33,] 287300.93 471709.49 [34,] -266505.49 287300.93 [35,] -802911.55 -266505.49 [36,] 215225.83 -802911.55 [37,] 217873.89 215225.83 [38,] -192264.05 217873.89 [39,] -265656.12 -192264.05 [40,] 461761.33 -265656.12 [41,] -103996.41 461761.33 [42,] 332667.35 -103996.41 [43,] -116305.65 332667.35 [44,] 279669.32 -116305.65 [45,] 171946.59 279669.32 [46,] -38525.86 171946.59 [47,] -57048.85 -38525.86 [48,] 120232.02 -57048.85 [49,] 55628.03 120232.02 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2011248.59 944940.97 2 1059444.69 2011248.59 3 -1967194.94 1059444.69 4 -730614.44 -1967194.94 5 -34541.70 -730614.44 6 -37824.15 -34541.70 7 -208434.54 -37824.15 8 -13899.00 -208434.54 9 726340.06 -13899.00 10 -389818.41 726340.06 11 367671.20 -389818.41 12 -233843.41 367671.20 13 -906654.90 -233843.41 14 -140295.36 -906654.90 15 560876.94 -140295.36 16 -667442.73 560876.94 17 -127151.90 -667442.73 18 -265855.41 -127151.90 19 -813880.68 -265855.41 20 403813.31 -813880.68 21 95111.99 403813.31 22 -237484.09 95111.99 23 -1035455.33 -237484.09 24 -315079.19 -1035455.33 25 165725.05 -315079.19 26 -502123.35 165725.05 27 101553.44 -502123.35 28 672420.96 101553.44 29 214257.57 672420.96 30 483138.49 214257.57 31 50249.46 483138.49 32 471709.49 50249.46 33 287300.93 471709.49 34 -266505.49 287300.93 35 -802911.55 -266505.49 36 215225.83 -802911.55 37 217873.89 215225.83 38 -192264.05 217873.89 39 -265656.12 -192264.05 40 461761.33 -265656.12 41 -103996.41 461761.33 42 332667.35 -103996.41 43 -116305.65 332667.35 44 279669.32 -116305.65 45 171946.59 279669.32 46 -38525.86 171946.59 47 -57048.85 -38525.86 48 120232.02 -57048.85 49 55628.03 120232.02 > 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/freestat/rcomp/tmp/7cfff1291222615.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/8cfff1291222615.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/9m6ez1291222615.ps",horizontal=F,onefile=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/freestat/rcomp/tmp/10m6ez1291222615.ps",horizontal=F,onefile=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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11q7c51291222615.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/freestat/rcomp/tmp/12t7bt1291222615.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/freestat/rcomp/tmp/130q8n1291222615.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/freestat/rcomp/tmp/14b07q1291222615.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/freestat/rcomp/tmp/15w0oe1291222615.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/freestat/rcomp/tmp/16ssl51291222615.tab") + } > > try(system("convert tmp/1y5h61291222615.ps tmp/1y5h61291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/2qxg91291222615.ps tmp/2qxg91291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/3qxg91291222615.ps tmp/3qxg91291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/4qxg91291222615.ps tmp/4qxg91291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/5jofu1291222615.ps tmp/5jofu1291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/6jofu1291222615.ps tmp/6jofu1291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/7cfff1291222615.ps tmp/7cfff1291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/8cfff1291222615.ps tmp/8cfff1291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/9m6ez1291222615.ps tmp/9m6ez1291222615.png",intern=TRUE)) character(0) > try(system("convert tmp/10m6ez1291222615.ps tmp/10m6ez1291222615.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.822 2.534 4.213