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(325412,285351,326011,286602,328282,283042,317480,276687,317539,277915,313737,277128,312276,277103,309391,275037,302950,270150,300316,267140,304035,264993,333476,287259,337698,291186,335932,292300,323931,288186,313927,281477,314485,282656,313218,280190,309664,280408,302963,276836,298989,275216,298423,274352,310631,271311,329765,289802,335083,290726,327616,292300,309119,278506,295916,269826,291413,265861,291542,269034,284678,264176,276475,255198,272566,253353,264981,246057,263290,235372,296806,258556,303598,260993,286994,254663,276427,250643,266424,243422,267153,247105,268381,248541,262522,245039,255542,237080,253158,237085,243803,225554,250741,226839,280445,247934,285257,248333,270976,246969,261076,245098,255603,246263,260376,255765,263903,264319,264291,268347,263276,273046,262572,273963,256167,267430,264221,271993,293860,292710,300713,295881,287224,293299),dim=c(2,62),dimnames=list(c('Werkl_vrouwen','Werkl_mannen'),1:62)) > y <- array(NA,dim=c(2,62),dimnames=list(c('Werkl_vrouwen','Werkl_mannen'),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 = '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 Werkl_vrouwen Werkl_mannen 1 325412 285351 2 326011 286602 3 328282 283042 4 317480 276687 5 317539 277915 6 313737 277128 7 312276 277103 8 309391 275037 9 302950 270150 10 300316 267140 11 304035 264993 12 333476 287259 13 337698 291186 14 335932 292300 15 323931 288186 16 313927 281477 17 314485 282656 18 313218 280190 19 309664 280408 20 302963 276836 21 298989 275216 22 298423 274352 23 310631 271311 24 329765 289802 25 335083 290726 26 327616 292300 27 309119 278506 28 295916 269826 29 291413 265861 30 291542 269034 31 284678 264176 32 276475 255198 33 272566 253353 34 264981 246057 35 263290 235372 36 296806 258556 37 303598 260993 38 286994 254663 39 276427 250643 40 266424 243422 41 267153 247105 42 268381 248541 43 262522 245039 44 255542 237080 45 253158 237085 46 243803 225554 47 250741 226839 48 280445 247934 49 285257 248333 50 270976 246969 51 261076 245098 52 255603 246263 53 260376 255765 54 263903 264319 55 264291 268347 56 263276 273046 57 262572 273963 58 256167 267430 59 264221 271993 60 293860 292710 61 300713 295881 62 287224 293299 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Werkl_mannen -21931.289 1.175 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -37352 -3007 3311 10849 18911 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -21931.289 28910.696 -0.759 0.451 Werkl_mannen 1.175 0.108 10.878 8.02e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 15320 on 60 degrees of freedom Multiple R-squared: 0.6636, Adjusted R-squared: 0.6579 F-statistic: 118.3 on 1 and 60 DF, p-value: 8.02e-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,] 8.118278e-03 1.623656e-02 0.99188172 [2,] 2.840417e-03 5.680834e-03 0.99715958 [3,] 1.064315e-03 2.128630e-03 0.99893569 [4,] 2.997808e-04 5.995616e-04 0.99970022 [5,] 6.012656e-05 1.202531e-04 0.99993987 [6,] 1.074675e-05 2.149350e-05 0.99998925 [7,] 1.377651e-05 2.755302e-05 0.99998622 [8,] 7.593187e-06 1.518637e-05 0.99999241 [9,] 2.432359e-06 4.864718e-06 0.99999757 [10,] 6.920007e-07 1.384001e-06 0.99999931 [11,] 1.171592e-06 2.343185e-06 0.99999883 [12,] 1.572183e-06 3.144365e-06 0.99999843 [13,] 2.166682e-06 4.333365e-06 0.99999783 [14,] 1.327340e-06 2.654680e-06 0.99999867 [15,] 2.135659e-06 4.271318e-06 0.99999786 [16,] 4.287184e-06 8.574368e-06 0.99999571 [17,] 8.994997e-06 1.798999e-05 0.99999101 [18,] 1.073292e-05 2.146584e-05 0.99998927 [19,] 1.068811e-05 2.137622e-05 0.99998931 [20,] 8.496072e-06 1.699214e-05 0.99999150 [21,] 1.625792e-05 3.251584e-05 0.99998374 [22,] 3.703682e-05 7.407364e-05 0.99996296 [23,] 4.931712e-05 9.863424e-05 0.99995068 [24,] 4.807949e-05 9.615898e-05 0.99995192 [25,] 3.670973e-05 7.341946e-05 0.99996329 [26,] 4.435764e-05 8.871527e-05 0.99995564 [27,] 3.685911e-05 7.371822e-05 0.99996314 [28,] 1.741856e-05 3.483712e-05 0.99998258 [29,] 7.621667e-06 1.524333e-05 0.99999238 [30,] 3.299157e-06 6.598315e-06 0.99999670 [31,] 1.089142e-05 2.178283e-05 0.99998911 [32,] 8.469528e-05 1.693906e-04 0.99991530 [33,] 3.083318e-03 6.166636e-03 0.99691668 [34,] 7.000530e-03 1.400106e-02 0.99299947 [35,] 6.624672e-03 1.324934e-02 0.99337533 [36,] 4.359160e-03 8.718319e-03 0.99564084 [37,] 2.957231e-03 5.914462e-03 0.99704277 [38,] 2.078846e-03 4.157692e-03 0.99792115 [39,] 1.294898e-03 2.589795e-03 0.99870510 [40,] 6.660691e-04 1.332138e-03 0.99933393 [41,] 3.569646e-04 7.139291e-04 0.99964304 [42,] 2.411650e-04 4.823300e-04 0.99975883 [43,] 1.691461e-04 3.382923e-04 0.99983085 [44,] 6.485260e-04 1.297052e-03 0.99935147 [45,] 3.041727e-02 6.083453e-02 0.96958273 [46,] 1.114301e-01 2.228602e-01 0.88856988 [47,] 2.373367e-01 4.746734e-01 0.76266328 [48,] 4.626562e-01 9.253123e-01 0.53734383 [49,] 8.147770e-01 3.704460e-01 0.18522298 [50,] 9.543230e-01 9.135402e-02 0.04567701 [51,] 9.817023e-01 3.659537e-02 0.01829769 [52,] 9.696860e-01 6.062803e-02 0.03031402 [53,] 9.463645e-01 1.072711e-01 0.05363553 > postscript(file="/var/www/html/rcomp/tmp/1j4zi1258480834.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/2q8h81258480834.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/3dhrr1258480834.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/4ive21258480834.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/5cv871258480834.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 12108.9056 11238.2131 17691.5514 14355.4951 12971.8234 10094.4021 7 8 9 10 11 12 8662.7724 8204.9384 7505.2550 8407.4455 14648.7714 17931.3602 13 14 15 16 17 18 17539.8652 14465.1223 7297.3076 5175.1355 4348.0296 5978.1212 19 20 21 22 23 24 2168.0118 -336.5522 -2407.3533 -1958.3139 13822.2958 11232.8079 25 26 27 28 29 30 15465.2797 6149.1223 3857.5082 851.8948 1007.0328 -2591.6524 31 32 33 34 35 36 -3748.4054 -1403.9243 -3145.3922 -2158.9484 8702.9404 14982.0499 37 38 39 40 41 42 18911.0279 9743.6013 3899.3540 2379.6868 -1218.1536 -1677.1867 43 44 45 46 47 48 -3421.9876 -1051.6421 -3441.5161 750.2655 6178.6293 11099.9255 49 50 51 52 53 54 15443.1746 2764.6211 -4937.3017 -11778.9601 -18169.0439 -24691.4039 55 56 57 58 59 60 -29035.5551 -35571.0067 -37352.3112 -36082.2506 -33388.9274 -28088.5515 61 62 -24960.8871 -35416.5170 > postscript(file="/var/www/html/rcomp/tmp/698q61258480834.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 12108.9056 NA 1 11238.2131 12108.9056 2 17691.5514 11238.2131 3 14355.4951 17691.5514 4 12971.8234 14355.4951 5 10094.4021 12971.8234 6 8662.7724 10094.4021 7 8204.9384 8662.7724 8 7505.2550 8204.9384 9 8407.4455 7505.2550 10 14648.7714 8407.4455 11 17931.3602 14648.7714 12 17539.8652 17931.3602 13 14465.1223 17539.8652 14 7297.3076 14465.1223 15 5175.1355 7297.3076 16 4348.0296 5175.1355 17 5978.1212 4348.0296 18 2168.0118 5978.1212 19 -336.5522 2168.0118 20 -2407.3533 -336.5522 21 -1958.3139 -2407.3533 22 13822.2958 -1958.3139 23 11232.8079 13822.2958 24 15465.2797 11232.8079 25 6149.1223 15465.2797 26 3857.5082 6149.1223 27 851.8948 3857.5082 28 1007.0328 851.8948 29 -2591.6524 1007.0328 30 -3748.4054 -2591.6524 31 -1403.9243 -3748.4054 32 -3145.3922 -1403.9243 33 -2158.9484 -3145.3922 34 8702.9404 -2158.9484 35 14982.0499 8702.9404 36 18911.0279 14982.0499 37 9743.6013 18911.0279 38 3899.3540 9743.6013 39 2379.6868 3899.3540 40 -1218.1536 2379.6868 41 -1677.1867 -1218.1536 42 -3421.9876 -1677.1867 43 -1051.6421 -3421.9876 44 -3441.5161 -1051.6421 45 750.2655 -3441.5161 46 6178.6293 750.2655 47 11099.9255 6178.6293 48 15443.1746 11099.9255 49 2764.6211 15443.1746 50 -4937.3017 2764.6211 51 -11778.9601 -4937.3017 52 -18169.0439 -11778.9601 53 -24691.4039 -18169.0439 54 -29035.5551 -24691.4039 55 -35571.0067 -29035.5551 56 -37352.3112 -35571.0067 57 -36082.2506 -37352.3112 58 -33388.9274 -36082.2506 59 -28088.5515 -33388.9274 60 -24960.8871 -28088.5515 61 -35416.5170 -24960.8871 62 NA -35416.5170 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 11238.2131 12108.9056 [2,] 17691.5514 11238.2131 [3,] 14355.4951 17691.5514 [4,] 12971.8234 14355.4951 [5,] 10094.4021 12971.8234 [6,] 8662.7724 10094.4021 [7,] 8204.9384 8662.7724 [8,] 7505.2550 8204.9384 [9,] 8407.4455 7505.2550 [10,] 14648.7714 8407.4455 [11,] 17931.3602 14648.7714 [12,] 17539.8652 17931.3602 [13,] 14465.1223 17539.8652 [14,] 7297.3076 14465.1223 [15,] 5175.1355 7297.3076 [16,] 4348.0296 5175.1355 [17,] 5978.1212 4348.0296 [18,] 2168.0118 5978.1212 [19,] -336.5522 2168.0118 [20,] -2407.3533 -336.5522 [21,] -1958.3139 -2407.3533 [22,] 13822.2958 -1958.3139 [23,] 11232.8079 13822.2958 [24,] 15465.2797 11232.8079 [25,] 6149.1223 15465.2797 [26,] 3857.5082 6149.1223 [27,] 851.8948 3857.5082 [28,] 1007.0328 851.8948 [29,] -2591.6524 1007.0328 [30,] -3748.4054 -2591.6524 [31,] -1403.9243 -3748.4054 [32,] -3145.3922 -1403.9243 [33,] -2158.9484 -3145.3922 [34,] 8702.9404 -2158.9484 [35,] 14982.0499 8702.9404 [36,] 18911.0279 14982.0499 [37,] 9743.6013 18911.0279 [38,] 3899.3540 9743.6013 [39,] 2379.6868 3899.3540 [40,] -1218.1536 2379.6868 [41,] -1677.1867 -1218.1536 [42,] -3421.9876 -1677.1867 [43,] -1051.6421 -3421.9876 [44,] -3441.5161 -1051.6421 [45,] 750.2655 -3441.5161 [46,] 6178.6293 750.2655 [47,] 11099.9255 6178.6293 [48,] 15443.1746 11099.9255 [49,] 2764.6211 15443.1746 [50,] -4937.3017 2764.6211 [51,] -11778.9601 -4937.3017 [52,] -18169.0439 -11778.9601 [53,] -24691.4039 -18169.0439 [54,] -29035.5551 -24691.4039 [55,] -35571.0067 -29035.5551 [56,] -37352.3112 -35571.0067 [57,] -36082.2506 -37352.3112 [58,] -33388.9274 -36082.2506 [59,] -28088.5515 -33388.9274 [60,] -24960.8871 -28088.5515 [61,] -35416.5170 -24960.8871 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 11238.2131 12108.9056 2 17691.5514 11238.2131 3 14355.4951 17691.5514 4 12971.8234 14355.4951 5 10094.4021 12971.8234 6 8662.7724 10094.4021 7 8204.9384 8662.7724 8 7505.2550 8204.9384 9 8407.4455 7505.2550 10 14648.7714 8407.4455 11 17931.3602 14648.7714 12 17539.8652 17931.3602 13 14465.1223 17539.8652 14 7297.3076 14465.1223 15 5175.1355 7297.3076 16 4348.0296 5175.1355 17 5978.1212 4348.0296 18 2168.0118 5978.1212 19 -336.5522 2168.0118 20 -2407.3533 -336.5522 21 -1958.3139 -2407.3533 22 13822.2958 -1958.3139 23 11232.8079 13822.2958 24 15465.2797 11232.8079 25 6149.1223 15465.2797 26 3857.5082 6149.1223 27 851.8948 3857.5082 28 1007.0328 851.8948 29 -2591.6524 1007.0328 30 -3748.4054 -2591.6524 31 -1403.9243 -3748.4054 32 -3145.3922 -1403.9243 33 -2158.9484 -3145.3922 34 8702.9404 -2158.9484 35 14982.0499 8702.9404 36 18911.0279 14982.0499 37 9743.6013 18911.0279 38 3899.3540 9743.6013 39 2379.6868 3899.3540 40 -1218.1536 2379.6868 41 -1677.1867 -1218.1536 42 -3421.9876 -1677.1867 43 -1051.6421 -3421.9876 44 -3441.5161 -1051.6421 45 750.2655 -3441.5161 46 6178.6293 750.2655 47 11099.9255 6178.6293 48 15443.1746 11099.9255 49 2764.6211 15443.1746 50 -4937.3017 2764.6211 51 -11778.9601 -4937.3017 52 -18169.0439 -11778.9601 53 -24691.4039 -18169.0439 54 -29035.5551 -24691.4039 55 -35571.0067 -29035.5551 56 -37352.3112 -35571.0067 57 -36082.2506 -37352.3112 58 -33388.9274 -36082.2506 59 -28088.5515 -33388.9274 60 -24960.8871 -28088.5515 61 -35416.5170 -24960.8871 > 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/7a2tm1258480834.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/8h6b31258480834.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/9zqxf1258480834.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/10k2731258480834.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/11fuha1258480834.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/121ikx1258480834.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/1319pb1258480834.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/14r1kg1258480834.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/15xtuy1258480834.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/16nbsi1258480834.tab") + } > > system("convert tmp/1j4zi1258480834.ps tmp/1j4zi1258480834.png") > system("convert tmp/2q8h81258480834.ps tmp/2q8h81258480834.png") > system("convert tmp/3dhrr1258480834.ps tmp/3dhrr1258480834.png") > system("convert tmp/4ive21258480834.ps tmp/4ive21258480834.png") > system("convert tmp/5cv871258480834.ps tmp/5cv871258480834.png") > system("convert tmp/698q61258480834.ps tmp/698q61258480834.png") > system("convert tmp/7a2tm1258480834.ps tmp/7a2tm1258480834.png") > system("convert tmp/8h6b31258480834.ps tmp/8h6b31258480834.png") > system("convert tmp/9zqxf1258480834.ps tmp/9zqxf1258480834.png") > system("convert tmp/10k2731258480834.ps tmp/10k2731258480834.png") > > > proc.time() user system elapsed 2.516 1.575 3.524