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(577992,0,565464,0,547344,0,554788,0,562325,0,560854,0,555332,1,543599,1,536662,1,542722,1,593530,1,610763,1,612613,1,611324,1,594167,1,595454,1,590865,1,589379,1,584428,1,573100,1,567456,1,569028,1,620735,1,628884,1,628232,1,612117,1,595404,1,597141,1,593408,1,590072,1,579799,1,574205,1,572775,1,572942,1,619567,1,625809,1,619916,1,587625,1,565742,1,557274,1,560576,1,548854,1,531673,1,525919,1,511038,1,498662,1,555362,1,564591,1,541657,1,527070,1,509846,1,514258,1,516922,1,507561,1,492622,1,490243,1,469357,1,477580,1,528379,1,533590,1,517945,1),dim=c(2,61),dimnames=list(c('Werkloosheid','Aanslag'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Werkloosheid','Aanslag'),1:61)) > 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 Werkloosheid Aanslag t 1 577992 0 1 2 565464 0 2 3 547344 0 3 4 554788 0 4 5 562325 0 5 6 560854 0 6 7 555332 1 7 8 543599 1 8 9 536662 1 9 10 542722 1 10 11 593530 1 11 12 610763 1 12 13 612613 1 13 14 611324 1 14 15 594167 1 15 16 595454 1 16 17 590865 1 17 18 589379 1 18 19 584428 1 19 20 573100 1 20 21 567456 1 21 22 569028 1 22 23 620735 1 23 24 628884 1 24 25 628232 1 25 26 612117 1 26 27 595404 1 27 28 597141 1 28 29 593408 1 29 30 590072 1 30 31 579799 1 31 32 574205 1 32 33 572775 1 33 34 572942 1 34 35 619567 1 35 36 625809 1 36 37 619916 1 37 38 587625 1 38 39 565742 1 39 40 557274 1 40 41 560576 1 41 42 548854 1 42 43 531673 1 43 44 525919 1 44 45 511038 1 45 46 498662 1 46 47 555362 1 47 48 564591 1 48 49 541657 1 49 50 527070 1 50 51 509846 1 51 52 514258 1 52 53 516922 1 53 54 507561 1 54 55 492622 1 55 56 490243 1 56 57 469357 1 57 58 477580 1 58 59 528379 1 59 60 533590 1 60 61 517945 1 61 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Aanslag t 567571 54248 -1746 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -69446 -15085 2607 13944 66832 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 567570.7 12461.7 45.545 < 2e-16 *** Aanslag 54248.0 15279.3 3.550 0.000771 *** t -1745.6 258.4 -6.754 7.57e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 30440 on 58 degrees of freedom Multiple R-squared: 0.4403, Adjusted R-squared: 0.421 F-statistic: 22.81 on 2 and 58 DF, p-value: 4.903e-08 > 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.063125532 0.126251065 0.9368745 [2,] 0.020760221 0.041520442 0.9792398 [3,] 0.008961403 0.017922805 0.9910386 [4,] 0.004956192 0.009912384 0.9950438 [5,] 0.002682623 0.005365246 0.9973174 [6,] 0.141821833 0.283643665 0.8581782 [7,] 0.319900099 0.639800197 0.6800999 [8,] 0.315833256 0.631666512 0.6841667 [9,] 0.243536049 0.487072098 0.7564640 [10,] 0.200845527 0.401691054 0.7991545 [11,] 0.164732445 0.329464890 0.8352676 [12,] 0.150762293 0.301524586 0.8492377 [13,] 0.141150232 0.282300464 0.8588498 [14,] 0.147464983 0.294929966 0.8525350 [15,] 0.208329739 0.416659477 0.7916703 [16,] 0.313311220 0.626622439 0.6866888 [17,] 0.418253128 0.836506256 0.5817469 [18,] 0.407503402 0.815006805 0.5924966 [19,] 0.400669742 0.801339484 0.5993303 [20,] 0.366047907 0.732095815 0.6339521 [21,] 0.295264108 0.590528215 0.7047359 [22,] 0.262838576 0.525677151 0.7371614 [23,] 0.222755974 0.445511948 0.7772440 [24,] 0.192601729 0.385203458 0.8073983 [25,] 0.169036315 0.338072630 0.8309637 [26,] 0.172842037 0.345684074 0.8271580 [27,] 0.187244655 0.374489309 0.8127553 [28,] 0.194570585 0.389141170 0.8054294 [29,] 0.189840027 0.379680053 0.8101600 [30,] 0.196344945 0.392689890 0.8036551 [31,] 0.280289784 0.560579568 0.7197102 [32,] 0.431030356 0.862060711 0.5689696 [33,] 0.463115168 0.926230337 0.5368848 [34,] 0.489388971 0.978777941 0.5106110 [35,] 0.513936435 0.972127131 0.4860636 [36,] 0.529696749 0.940606501 0.4703033 [37,] 0.541979219 0.916041563 0.4580208 [38,] 0.566404736 0.867190528 0.4335953 [39,] 0.575599033 0.848801935 0.4244010 [40,] 0.633958999 0.732082002 0.3660410 [41,] 0.773607427 0.452785146 0.2263926 [42,] 0.725875463 0.548249075 0.2741245 [43,] 0.788160776 0.423678448 0.2118392 [44,] 0.789953978 0.420092044 0.2100460 [45,] 0.767025693 0.465948614 0.2329743 [46,] 0.701381090 0.597237820 0.2986189 [47,] 0.644679025 0.710641950 0.3553210 [48,] 0.651108398 0.697783203 0.3488916 [49,] 0.670730967 0.658538065 0.3292690 [50,] 0.607980771 0.784038457 0.3920192 > postscript(file="/var/www/html/rcomp/tmp/1o8qe1227561468.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/2g3x91227561468.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/3koid1227561468.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/4jepm1227561468.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/59ts11227561468.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 = 61 Frequency = 1 1 2 3 4 5 6 12166.8522 1384.4446 -14989.9629 -5800.3704 3482.2220 3756.8145 7 8 9 10 11 12 -54267.6149 -64255.0224 -69446.4299 -61640.8375 -9087.2450 9891.3475 13 14 15 16 17 18 13486.9400 13943.5324 -1467.8751 1564.7174 -1278.6902 -1019.0977 19 20 21 22 23 24 -4224.5052 -13806.9128 -17705.3203 -14387.7278 39064.8647 48959.4571 25 26 27 28 29 30 50053.0496 35683.6421 20716.2345 24198.8270 22211.4195 20621.0119 31 32 33 34 35 36 12093.6044 8245.1969 8560.7893 10473.3818 58843.9743 66831.5668 37 38 39 40 41 42 62684.1592 32138.7517 12001.3442 5278.9366 10326.5291 350.1216 43 44 45 46 47 48 -15085.2860 -19093.6935 -32229.1010 -42859.5085 15586.0839 26560.6764 49 50 51 52 53 54 5372.2689 -7469.1387 -22947.5462 -16789.9537 -12380.3613 -19995.7688 55 56 57 58 59 60 -33189.1763 -33822.5838 -52962.9914 -42994.3989 9550.1936 16506.7860 61 2607.3785 > postscript(file="/var/www/html/rcomp/tmp/658v11227561468.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 12166.8522 NA 1 1384.4446 12166.8522 2 -14989.9629 1384.4446 3 -5800.3704 -14989.9629 4 3482.2220 -5800.3704 5 3756.8145 3482.2220 6 -54267.6149 3756.8145 7 -64255.0224 -54267.6149 8 -69446.4299 -64255.0224 9 -61640.8375 -69446.4299 10 -9087.2450 -61640.8375 11 9891.3475 -9087.2450 12 13486.9400 9891.3475 13 13943.5324 13486.9400 14 -1467.8751 13943.5324 15 1564.7174 -1467.8751 16 -1278.6902 1564.7174 17 -1019.0977 -1278.6902 18 -4224.5052 -1019.0977 19 -13806.9128 -4224.5052 20 -17705.3203 -13806.9128 21 -14387.7278 -17705.3203 22 39064.8647 -14387.7278 23 48959.4571 39064.8647 24 50053.0496 48959.4571 25 35683.6421 50053.0496 26 20716.2345 35683.6421 27 24198.8270 20716.2345 28 22211.4195 24198.8270 29 20621.0119 22211.4195 30 12093.6044 20621.0119 31 8245.1969 12093.6044 32 8560.7893 8245.1969 33 10473.3818 8560.7893 34 58843.9743 10473.3818 35 66831.5668 58843.9743 36 62684.1592 66831.5668 37 32138.7517 62684.1592 38 12001.3442 32138.7517 39 5278.9366 12001.3442 40 10326.5291 5278.9366 41 350.1216 10326.5291 42 -15085.2860 350.1216 43 -19093.6935 -15085.2860 44 -32229.1010 -19093.6935 45 -42859.5085 -32229.1010 46 15586.0839 -42859.5085 47 26560.6764 15586.0839 48 5372.2689 26560.6764 49 -7469.1387 5372.2689 50 -22947.5462 -7469.1387 51 -16789.9537 -22947.5462 52 -12380.3613 -16789.9537 53 -19995.7688 -12380.3613 54 -33189.1763 -19995.7688 55 -33822.5838 -33189.1763 56 -52962.9914 -33822.5838 57 -42994.3989 -52962.9914 58 9550.1936 -42994.3989 59 16506.7860 9550.1936 60 2607.3785 16506.7860 61 NA 2607.3785 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1384.4446 12166.8522 [2,] -14989.9629 1384.4446 [3,] -5800.3704 -14989.9629 [4,] 3482.2220 -5800.3704 [5,] 3756.8145 3482.2220 [6,] -54267.6149 3756.8145 [7,] -64255.0224 -54267.6149 [8,] -69446.4299 -64255.0224 [9,] -61640.8375 -69446.4299 [10,] -9087.2450 -61640.8375 [11,] 9891.3475 -9087.2450 [12,] 13486.9400 9891.3475 [13,] 13943.5324 13486.9400 [14,] -1467.8751 13943.5324 [15,] 1564.7174 -1467.8751 [16,] -1278.6902 1564.7174 [17,] -1019.0977 -1278.6902 [18,] -4224.5052 -1019.0977 [19,] -13806.9128 -4224.5052 [20,] -17705.3203 -13806.9128 [21,] -14387.7278 -17705.3203 [22,] 39064.8647 -14387.7278 [23,] 48959.4571 39064.8647 [24,] 50053.0496 48959.4571 [25,] 35683.6421 50053.0496 [26,] 20716.2345 35683.6421 [27,] 24198.8270 20716.2345 [28,] 22211.4195 24198.8270 [29,] 20621.0119 22211.4195 [30,] 12093.6044 20621.0119 [31,] 8245.1969 12093.6044 [32,] 8560.7893 8245.1969 [33,] 10473.3818 8560.7893 [34,] 58843.9743 10473.3818 [35,] 66831.5668 58843.9743 [36,] 62684.1592 66831.5668 [37,] 32138.7517 62684.1592 [38,] 12001.3442 32138.7517 [39,] 5278.9366 12001.3442 [40,] 10326.5291 5278.9366 [41,] 350.1216 10326.5291 [42,] -15085.2860 350.1216 [43,] -19093.6935 -15085.2860 [44,] -32229.1010 -19093.6935 [45,] -42859.5085 -32229.1010 [46,] 15586.0839 -42859.5085 [47,] 26560.6764 15586.0839 [48,] 5372.2689 26560.6764 [49,] -7469.1387 5372.2689 [50,] -22947.5462 -7469.1387 [51,] -16789.9537 -22947.5462 [52,] -12380.3613 -16789.9537 [53,] -19995.7688 -12380.3613 [54,] -33189.1763 -19995.7688 [55,] -33822.5838 -33189.1763 [56,] -52962.9914 -33822.5838 [57,] -42994.3989 -52962.9914 [58,] 9550.1936 -42994.3989 [59,] 16506.7860 9550.1936 [60,] 2607.3785 16506.7860 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1384.4446 12166.8522 2 -14989.9629 1384.4446 3 -5800.3704 -14989.9629 4 3482.2220 -5800.3704 5 3756.8145 3482.2220 6 -54267.6149 3756.8145 7 -64255.0224 -54267.6149 8 -69446.4299 -64255.0224 9 -61640.8375 -69446.4299 10 -9087.2450 -61640.8375 11 9891.3475 -9087.2450 12 13486.9400 9891.3475 13 13943.5324 13486.9400 14 -1467.8751 13943.5324 15 1564.7174 -1467.8751 16 -1278.6902 1564.7174 17 -1019.0977 -1278.6902 18 -4224.5052 -1019.0977 19 -13806.9128 -4224.5052 20 -17705.3203 -13806.9128 21 -14387.7278 -17705.3203 22 39064.8647 -14387.7278 23 48959.4571 39064.8647 24 50053.0496 48959.4571 25 35683.6421 50053.0496 26 20716.2345 35683.6421 27 24198.8270 20716.2345 28 22211.4195 24198.8270 29 20621.0119 22211.4195 30 12093.6044 20621.0119 31 8245.1969 12093.6044 32 8560.7893 8245.1969 33 10473.3818 8560.7893 34 58843.9743 10473.3818 35 66831.5668 58843.9743 36 62684.1592 66831.5668 37 32138.7517 62684.1592 38 12001.3442 32138.7517 39 5278.9366 12001.3442 40 10326.5291 5278.9366 41 350.1216 10326.5291 42 -15085.2860 350.1216 43 -19093.6935 -15085.2860 44 -32229.1010 -19093.6935 45 -42859.5085 -32229.1010 46 15586.0839 -42859.5085 47 26560.6764 15586.0839 48 5372.2689 26560.6764 49 -7469.1387 5372.2689 50 -22947.5462 -7469.1387 51 -16789.9537 -22947.5462 52 -12380.3613 -16789.9537 53 -19995.7688 -12380.3613 54 -33189.1763 -19995.7688 55 -33822.5838 -33189.1763 56 -52962.9914 -33822.5838 57 -42994.3989 -52962.9914 58 9550.1936 -42994.3989 59 16506.7860 9550.1936 60 2607.3785 16506.7860 > 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/7eyvz1227561468.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/8hh761227561468.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/998lj1227561468.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/10qt4y1227561468.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/11s7ht1227561468.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/12k0ot1227561468.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/139itc1227561468.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/14fv2z1227561468.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/15rki81227561468.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/16xp451227561468.tab") + } > > system("convert tmp/1o8qe1227561468.ps tmp/1o8qe1227561468.png") > system("convert tmp/2g3x91227561468.ps tmp/2g3x91227561468.png") > system("convert tmp/3koid1227561468.ps tmp/3koid1227561468.png") > system("convert tmp/4jepm1227561468.ps tmp/4jepm1227561468.png") > system("convert tmp/59ts11227561468.ps tmp/59ts11227561468.png") > system("convert tmp/658v11227561468.ps tmp/658v11227561468.png") > system("convert tmp/7eyvz1227561468.ps tmp/7eyvz1227561468.png") > system("convert tmp/8hh761227561468.ps tmp/8hh761227561468.png") > system("convert tmp/998lj1227561468.ps tmp/998lj1227561468.png") > system("convert tmp/10qt4y1227561468.ps tmp/10qt4y1227561468.png") > > > proc.time() user system elapsed 5.062 2.764 5.437