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. 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(121148,0,114624,0,109822,0,112081,0,113534,0,112110,0,109826,0,107423,0,105540,0,108573,0,128591,0,139145,0,129700,0,132828,0,126868,0,128390,0,126830,0,124105,0,122323,0,119296,0,116822,0,119224,0,139357,0,144322,0,133676,0,128283,0,121640,0,122877,1,117284,1,116463,1,112685,1,113235,1,111692,1,113152,1,129889,1,131153,1,123770,1,112516,1,105940,1,104320,1,103582,1,99064,1,94989,1,92241,1,89752,1,90610,1,109456,1,110213,1,97694,1,91844,1,87572,1,89812,1,89050,1,85990,1,85070,1,83277,1,79586,1,84215,1,99708,1,100698,1,90861,1,86700,1),dim=c(2,62),dimnames=list(c('werkl.vrouwen','Wetswijziging'),1:62)) > y <- array(NA,dim=c(2,62),dimnames=list(c('werkl.vrouwen','Wetswijziging'),1:62)) > 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 = '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 werkl.vrouwen Wetswijziging t 1 121148 0 1 2 114624 0 2 3 109822 0 3 4 112081 0 4 5 113534 0 5 6 112110 0 6 7 109826 0 7 8 107423 0 8 9 105540 0 9 10 108573 0 10 11 128591 0 11 12 139145 0 12 13 129700 0 13 14 132828 0 14 15 126868 0 15 16 128390 0 16 17 126830 0 17 18 124105 0 18 19 122323 0 19 20 119296 0 20 21 116822 0 21 22 119224 0 22 23 139357 0 23 24 144322 0 24 25 133676 0 25 26 128283 0 26 27 121640 0 27 28 122877 1 28 29 117284 1 29 30 116463 1 30 31 112685 1 31 32 113235 1 32 33 111692 1 33 34 113152 1 34 35 129889 1 35 36 131153 1 36 37 123770 1 37 38 112516 1 38 39 105940 1 39 40 104320 1 40 41 103582 1 41 42 99064 1 42 43 94989 1 43 44 92241 1 44 45 89752 1 45 46 90610 1 46 47 109456 1 47 48 110213 1 48 49 97694 1 49 50 91844 1 50 51 87572 1 51 52 89812 1 52 53 89050 1 53 54 85990 1 54 55 85070 1 55 56 83277 1 56 57 79586 1 57 58 84215 1 58 59 99708 1 59 60 100698 1 60 61 90861 1 61 62 86700 1 62 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Wetswijziging t 129316 -4421 -517 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -19122.3 -10643.2 765.7 7099.4 27415.4 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 129316 3253 39.751 < 2e-16 *** Wetswijziging -4421 5954 -0.743 0.46068 t -517 165 -3.134 0.00268 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11900 on 59 degrees of freedom Multiple R-squared: 0.4815, Adjusted R-squared: 0.464 F-statistic: 27.4 on 2 and 59 DF, p-value: 3.838e-09 > 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.053683184 0.107366367 0.94631682 [2,] 0.017551704 0.035103408 0.98244830 [3,] 0.006232561 0.012465122 0.99376744 [4,] 0.002718816 0.005437633 0.99728118 [5,] 0.002318308 0.004636616 0.99768169 [6,] 0.328482426 0.656964852 0.67151757 [7,] 0.765615198 0.468769603 0.23438480 [8,] 0.726307662 0.547384677 0.27369234 [9,] 0.677689929 0.644620142 0.32231007 [10,] 0.600102831 0.799794338 0.39989717 [11,] 0.514411217 0.971177565 0.48558878 [12,] 0.440577996 0.881155991 0.55942200 [13,] 0.400440244 0.800880488 0.59955976 [14,] 0.386149524 0.772299048 0.61385048 [15,] 0.424736877 0.849473754 0.57526312 [16,] 0.520570216 0.958859569 0.47942978 [17,] 0.571640161 0.856719677 0.42835984 [18,] 0.585497615 0.829004769 0.41450238 [19,] 0.673487115 0.653025770 0.32651289 [20,] 0.613535356 0.772929288 0.38646464 [21,] 0.559286101 0.881427798 0.44071390 [22,] 0.555453384 0.889093232 0.44454662 [23,] 0.481106798 0.962213596 0.51889320 [24,] 0.417528742 0.835057485 0.58247126 [25,] 0.353506301 0.707012602 0.64649370 [26,] 0.315435756 0.630871513 0.68456424 [27,] 0.268358479 0.536716957 0.73164152 [28,] 0.232817357 0.465634714 0.76718264 [29,] 0.188221185 0.376442369 0.81177882 [30,] 0.266695344 0.533390687 0.73330466 [31,] 0.476395917 0.952791835 0.52360408 [32,] 0.621699397 0.756601207 0.37830060 [33,] 0.660823806 0.678352389 0.33917619 [34,] 0.700167120 0.599665759 0.29983288 [35,] 0.730906626 0.538186748 0.26909337 [36,] 0.752835420 0.494329160 0.24716458 [37,] 0.773734218 0.452531563 0.22626578 [38,] 0.797554337 0.404891326 0.20244566 [39,] 0.820932449 0.358135101 0.17906755 [40,] 0.851475255 0.297049491 0.14852475 [41,] 0.861951939 0.276096122 0.13804806 [42,] 0.881009465 0.237981070 0.11899054 [43,] 0.962800708 0.074398583 0.03719929 [44,] 0.968221379 0.063557242 0.03177862 [45,] 0.960192564 0.079614872 0.03980744 [46,] 0.939464906 0.121070188 0.06053509 [47,] 0.914694769 0.170610462 0.08530523 [48,] 0.881025864 0.237948272 0.11897414 [49,] 0.813347317 0.373305366 0.18665268 [50,] 0.704283192 0.591433615 0.29571681 [51,] 0.548060587 0.903878826 0.45193941 > postscript(file="/var/www/html/rcomp/tmp/1oeyd1229886419.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/2kzuf1229886419.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/3hh2j1229886419.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/4bgus1229886419.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/5ki7k1229886419.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 = 62 Frequency = 1 1 2 3 4 5 6 -7650.6507 -13657.6063 -17942.5620 -15166.5176 -13196.4733 -14103.4289 7 8 9 10 11 12 -15870.3846 -17756.3402 -19122.2958 -15572.2515 4962.7929 16033.8372 13 14 15 16 17 18 7105.8816 10750.9259 5307.9703 7347.0146 6304.0590 4096.1033 19 20 21 22 23 24 2831.1477 321.1921 -1635.7636 1283.2808 21933.3251 27415.3695 25 26 27 28 29 30 17286.4138 12410.4582 6284.5025 12459.8174 7383.8618 7079.9061 31 32 33 34 35 36 3818.9505 4885.9948 3860.0392 5837.0835 23091.1279 24872.1722 37 38 39 40 41 42 18006.2166 7269.2609 1210.3053 107.3497 -113.6060 -4114.5616 43 44 45 46 47 48 -7672.5173 -9903.4729 -11875.4286 -10500.3842 8862.6601 10136.7045 49 50 51 52 53 54 -1865.2512 -7198.2068 -10953.1624 -8196.1181 -8441.0737 -10984.0294 55 56 57 58 59 60 -11386.9850 -12662.9407 -15836.8963 -10690.8520 5319.1924 6826.2368 61 62 -2493.7189 -6137.6745 > postscript(file="/var/www/html/rcomp/tmp/6fk6u1229886419.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 = 62 Frequency = 1 lag(myerror, k = 1) myerror 0 -7650.6507 NA 1 -13657.6063 -7650.6507 2 -17942.5620 -13657.6063 3 -15166.5176 -17942.5620 4 -13196.4733 -15166.5176 5 -14103.4289 -13196.4733 6 -15870.3846 -14103.4289 7 -17756.3402 -15870.3846 8 -19122.2958 -17756.3402 9 -15572.2515 -19122.2958 10 4962.7929 -15572.2515 11 16033.8372 4962.7929 12 7105.8816 16033.8372 13 10750.9259 7105.8816 14 5307.9703 10750.9259 15 7347.0146 5307.9703 16 6304.0590 7347.0146 17 4096.1033 6304.0590 18 2831.1477 4096.1033 19 321.1921 2831.1477 20 -1635.7636 321.1921 21 1283.2808 -1635.7636 22 21933.3251 1283.2808 23 27415.3695 21933.3251 24 17286.4138 27415.3695 25 12410.4582 17286.4138 26 6284.5025 12410.4582 27 12459.8174 6284.5025 28 7383.8618 12459.8174 29 7079.9061 7383.8618 30 3818.9505 7079.9061 31 4885.9948 3818.9505 32 3860.0392 4885.9948 33 5837.0835 3860.0392 34 23091.1279 5837.0835 35 24872.1722 23091.1279 36 18006.2166 24872.1722 37 7269.2609 18006.2166 38 1210.3053 7269.2609 39 107.3497 1210.3053 40 -113.6060 107.3497 41 -4114.5616 -113.6060 42 -7672.5173 -4114.5616 43 -9903.4729 -7672.5173 44 -11875.4286 -9903.4729 45 -10500.3842 -11875.4286 46 8862.6601 -10500.3842 47 10136.7045 8862.6601 48 -1865.2512 10136.7045 49 -7198.2068 -1865.2512 50 -10953.1624 -7198.2068 51 -8196.1181 -10953.1624 52 -8441.0737 -8196.1181 53 -10984.0294 -8441.0737 54 -11386.9850 -10984.0294 55 -12662.9407 -11386.9850 56 -15836.8963 -12662.9407 57 -10690.8520 -15836.8963 58 5319.1924 -10690.8520 59 6826.2368 5319.1924 60 -2493.7189 6826.2368 61 -6137.6745 -2493.7189 62 NA -6137.6745 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -13657.6063 -7650.6507 [2,] -17942.5620 -13657.6063 [3,] -15166.5176 -17942.5620 [4,] -13196.4733 -15166.5176 [5,] -14103.4289 -13196.4733 [6,] -15870.3846 -14103.4289 [7,] -17756.3402 -15870.3846 [8,] -19122.2958 -17756.3402 [9,] -15572.2515 -19122.2958 [10,] 4962.7929 -15572.2515 [11,] 16033.8372 4962.7929 [12,] 7105.8816 16033.8372 [13,] 10750.9259 7105.8816 [14,] 5307.9703 10750.9259 [15,] 7347.0146 5307.9703 [16,] 6304.0590 7347.0146 [17,] 4096.1033 6304.0590 [18,] 2831.1477 4096.1033 [19,] 321.1921 2831.1477 [20,] -1635.7636 321.1921 [21,] 1283.2808 -1635.7636 [22,] 21933.3251 1283.2808 [23,] 27415.3695 21933.3251 [24,] 17286.4138 27415.3695 [25,] 12410.4582 17286.4138 [26,] 6284.5025 12410.4582 [27,] 12459.8174 6284.5025 [28,] 7383.8618 12459.8174 [29,] 7079.9061 7383.8618 [30,] 3818.9505 7079.9061 [31,] 4885.9948 3818.9505 [32,] 3860.0392 4885.9948 [33,] 5837.0835 3860.0392 [34,] 23091.1279 5837.0835 [35,] 24872.1722 23091.1279 [36,] 18006.2166 24872.1722 [37,] 7269.2609 18006.2166 [38,] 1210.3053 7269.2609 [39,] 107.3497 1210.3053 [40,] -113.6060 107.3497 [41,] -4114.5616 -113.6060 [42,] -7672.5173 -4114.5616 [43,] -9903.4729 -7672.5173 [44,] -11875.4286 -9903.4729 [45,] -10500.3842 -11875.4286 [46,] 8862.6601 -10500.3842 [47,] 10136.7045 8862.6601 [48,] -1865.2512 10136.7045 [49,] -7198.2068 -1865.2512 [50,] -10953.1624 -7198.2068 [51,] -8196.1181 -10953.1624 [52,] -8441.0737 -8196.1181 [53,] -10984.0294 -8441.0737 [54,] -11386.9850 -10984.0294 [55,] -12662.9407 -11386.9850 [56,] -15836.8963 -12662.9407 [57,] -10690.8520 -15836.8963 [58,] 5319.1924 -10690.8520 [59,] 6826.2368 5319.1924 [60,] -2493.7189 6826.2368 [61,] -6137.6745 -2493.7189 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -13657.6063 -7650.6507 2 -17942.5620 -13657.6063 3 -15166.5176 -17942.5620 4 -13196.4733 -15166.5176 5 -14103.4289 -13196.4733 6 -15870.3846 -14103.4289 7 -17756.3402 -15870.3846 8 -19122.2958 -17756.3402 9 -15572.2515 -19122.2958 10 4962.7929 -15572.2515 11 16033.8372 4962.7929 12 7105.8816 16033.8372 13 10750.9259 7105.8816 14 5307.9703 10750.9259 15 7347.0146 5307.9703 16 6304.0590 7347.0146 17 4096.1033 6304.0590 18 2831.1477 4096.1033 19 321.1921 2831.1477 20 -1635.7636 321.1921 21 1283.2808 -1635.7636 22 21933.3251 1283.2808 23 27415.3695 21933.3251 24 17286.4138 27415.3695 25 12410.4582 17286.4138 26 6284.5025 12410.4582 27 12459.8174 6284.5025 28 7383.8618 12459.8174 29 7079.9061 7383.8618 30 3818.9505 7079.9061 31 4885.9948 3818.9505 32 3860.0392 4885.9948 33 5837.0835 3860.0392 34 23091.1279 5837.0835 35 24872.1722 23091.1279 36 18006.2166 24872.1722 37 7269.2609 18006.2166 38 1210.3053 7269.2609 39 107.3497 1210.3053 40 -113.6060 107.3497 41 -4114.5616 -113.6060 42 -7672.5173 -4114.5616 43 -9903.4729 -7672.5173 44 -11875.4286 -9903.4729 45 -10500.3842 -11875.4286 46 8862.6601 -10500.3842 47 10136.7045 8862.6601 48 -1865.2512 10136.7045 49 -7198.2068 -1865.2512 50 -10953.1624 -7198.2068 51 -8196.1181 -10953.1624 52 -8441.0737 -8196.1181 53 -10984.0294 -8441.0737 54 -11386.9850 -10984.0294 55 -12662.9407 -11386.9850 56 -15836.8963 -12662.9407 57 -10690.8520 -15836.8963 58 5319.1924 -10690.8520 59 6826.2368 5319.1924 60 -2493.7189 6826.2368 61 -6137.6745 -2493.7189 > 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/7vg2t1229886419.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/8r62v1229886419.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/99jnb1229886419.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/10p5gz1229886419.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/11jyb11229886419.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/124sqn1229886419.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/13xxbo1229886419.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/14uco81229886419.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/15f4pu1229886419.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/16aybb1229886419.tab") + } > > system("convert tmp/1oeyd1229886419.ps tmp/1oeyd1229886419.png") > system("convert tmp/2kzuf1229886419.ps tmp/2kzuf1229886419.png") > system("convert tmp/3hh2j1229886419.ps tmp/3hh2j1229886419.png") > system("convert tmp/4bgus1229886419.ps tmp/4bgus1229886419.png") > system("convert tmp/5ki7k1229886419.ps tmp/5ki7k1229886419.png") > system("convert tmp/6fk6u1229886419.ps tmp/6fk6u1229886419.png") > system("convert tmp/7vg2t1229886419.ps tmp/7vg2t1229886419.png") > system("convert tmp/8r62v1229886419.ps tmp/8r62v1229886419.png") > system("convert tmp/99jnb1229886419.ps tmp/99jnb1229886419.png") > system("convert tmp/10p5gz1229886419.ps tmp/10p5gz1229886419.png") > > > proc.time() user system elapsed 2.728 1.724 4.109