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(10414.9 + ,10723.8 + ,12476.8 + ,13938.9 + ,12384.6 + ,13979.8 + ,12266.7 + ,13807.4 + ,12919.9 + ,12973.9 + ,11497.3 + ,12509.8 + ,12142 + ,12934.1 + ,13919.4 + ,14908.3 + ,12656.8 + ,13772.1 + ,12034.1 + ,13012.6 + ,13199.7 + ,14049.9 + ,10881.3 + ,11816.5 + ,11301.2 + ,11593.2 + ,13643.9 + ,14466.2 + ,12517 + ,13615.9 + ,13981.1 + ,14733.9 + ,14275.7 + ,13880.7 + ,13435 + ,13527.5 + ,13565.7 + ,13584 + ,16216.3 + ,16170.2 + ,12970 + ,13260.6 + ,14079.9 + ,14741.9 + ,14235 + ,15486.5 + ,12213.4 + ,13154.5 + ,12581 + ,12621.2 + ,14130.4 + ,15031.6 + ,14210.8 + ,15452.4 + ,14378.5 + ,15428 + ,13142.8 + ,13105.9 + ,13714.7 + ,14716.8 + ,13621.9 + ,14180 + ,15379.8 + ,16202.2 + ,13306.3 + ,14392.4 + ,14391.2 + ,15140.6 + ,14909.9 + ,15960.1 + ,14025.4 + ,14351.3 + ,12951.2 + ,13230.2 + ,14344.3 + ,15202.1 + ,16093.4 + ,17056 + ,15413.6 + ,16077.7 + ,14705.7 + ,13348.2 + ,15972.8 + ,16402.4 + ,16241.4 + ,16559.1 + ,16626.4 + ,16579 + ,17136.2 + ,17561.2 + ,15622.9 + ,16129.6 + ,18003.9 + ,18484.3 + ,16136.1 + ,16402.6 + ,14423.7 + ,14032.3 + ,16789.4 + ,17109.1 + ,16782.2 + ,17157.2 + ,14133.8 + ,13879.8 + ,12607 + ,12362.4 + ,12004.5 + ,12683.5 + ,12175.4 + ,12608.8 + ,13268 + ,13583.7 + ,12299.3 + ,12846.3 + ,11800.6 + ,12347.1 + ,13873.3 + ,13967 + ,12269.6 + ,13114.3) + ,dim=c(2 + ,60) + ,dimnames=list(c('InIEU' + ,'UitIEU') + ,1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('InIEU','UitIEU'),1:60)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x InIEU UitIEU 1 10414.9 10723.8 2 12476.8 13938.9 3 12384.6 13979.8 4 12266.7 13807.4 5 12919.9 12973.9 6 11497.3 12509.8 7 12142.0 12934.1 8 13919.4 14908.3 9 12656.8 13772.1 10 12034.1 13012.6 11 13199.7 14049.9 12 10881.3 11816.5 13 11301.2 11593.2 14 13643.9 14466.2 15 12517.0 13615.9 16 13981.1 14733.9 17 14275.7 13880.7 18 13435.0 13527.5 19 13565.7 13584.0 20 16216.3 16170.2 21 12970.0 13260.6 22 14079.9 14741.9 23 14235.0 15486.5 24 12213.4 13154.5 25 12581.0 12621.2 26 14130.4 15031.6 27 14210.8 15452.4 28 14378.5 15428.0 29 13142.8 13105.9 30 13714.7 14716.8 31 13621.9 14180.0 32 15379.8 16202.2 33 13306.3 14392.4 34 14391.2 15140.6 35 14909.9 15960.1 36 14025.4 14351.3 37 12951.2 13230.2 38 14344.3 15202.1 39 16093.4 17056.0 40 15413.6 16077.7 41 14705.7 13348.2 42 15972.8 16402.4 43 16241.4 16559.1 44 16626.4 16579.0 45 17136.2 17561.2 46 15622.9 16129.6 47 18003.9 18484.3 48 16136.1 16402.6 49 14423.7 14032.3 50 16789.4 17109.1 51 16782.2 17157.2 52 14133.8 13879.8 53 12607.0 12362.4 54 12004.5 12683.5 55 12175.4 12608.8 56 13268.0 13583.7 57 12299.3 12846.3 58 11800.6 12347.1 59 13873.3 13967.0 60 12269.6 13114.3 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) UitIEU -113.7583 0.9693 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1052.81 -419.54 -46.77 307.49 1880.52 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -113.75834 618.45841 -0.184 0.855 UitIEU 0.96934 0.04278 22.659 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 537 on 58 degrees of freedom Multiple R-squared: 0.8985, Adjusted R-squared: 0.8968 F-statistic: 513.4 on 1 and 58 DF, p-value: < 2.2e-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,] 0.7256198 0.54876041 0.27438020 [2,] 0.6112854 0.77742918 0.38871459 [3,] 0.4840616 0.96812315 0.51593842 [4,] 0.5143005 0.97139898 0.48569949 [5,] 0.4124873 0.82497463 0.58751268 [6,] 0.3200984 0.64019677 0.67990162 [7,] 0.2741132 0.54822638 0.72588681 [8,] 0.2429235 0.48584700 0.75707650 [9,] 0.1933617 0.38672332 0.80663834 [10,] 0.1795201 0.35904016 0.82047992 [11,] 0.1464831 0.29296618 0.85351691 [12,] 0.1474288 0.29485762 0.85257119 [13,] 0.6017236 0.79655287 0.39827644 [14,] 0.6469093 0.70618134 0.35309067 [15,] 0.6958797 0.60824065 0.30412033 [16,] 0.7991632 0.40167355 0.20083678 [17,] 0.7600205 0.47995893 0.23997946 [18,] 0.6979284 0.60414316 0.30207158 [19,] 0.7141334 0.57173329 0.28586665 [20,] 0.6952707 0.60945863 0.30472931 [21,] 0.6835062 0.63298755 0.31649378 [22,] 0.6373192 0.72536156 0.36268078 [23,] 0.6605757 0.67884864 0.33942432 [24,] 0.6418704 0.71625921 0.35812960 [25,] 0.6487062 0.70258765 0.35129383 [26,] 0.6361150 0.72776999 0.36388499 [27,] 0.5754991 0.84900179 0.42450089 [28,] 0.5236355 0.95272907 0.47636454 [29,] 0.5588056 0.88238875 0.44119437 [30,] 0.5127010 0.97459809 0.48729905 [31,] 0.5226033 0.95479336 0.47739668 [32,] 0.4712445 0.94248901 0.52875549 [33,] 0.4117940 0.82358791 0.58820604 [34,] 0.3965134 0.79302673 0.60348663 [35,] 0.3938142 0.78762840 0.60618580 [36,] 0.3564486 0.71289720 0.64355140 [37,] 0.9854520 0.02909604 0.01454802 [38,] 0.9778185 0.04436300 0.02218150 [39,] 0.9663516 0.06729673 0.03364836 [40,] 0.9671094 0.06578123 0.03289061 [41,] 0.9478060 0.10438795 0.05219397 [42,] 0.9224316 0.15513687 0.07756844 [43,] 0.8910513 0.21789737 0.10894869 [44,] 0.8389746 0.32205084 0.16102542 [45,] 0.9149195 0.17016098 0.08508049 [46,] 0.8621238 0.27575237 0.13787618 [47,] 0.8273620 0.34527609 0.17263804 [48,] 0.8486351 0.30272971 0.15136486 [49,] 0.9831659 0.03366815 0.01683407 [50,] 0.9554777 0.08904452 0.04452226 [51,] 0.9017766 0.19644673 0.09822336 > postscript(file="/var/www/html/rcomp/tmp/1wwhq1258756696.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/2lp8o1258756696.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/3xo811258756696.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/4ut881258756696.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/5ll2m1258756696.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 60 Frequency = 1 1 2 3 4 5 6 133.658205 -920.964385 -1052.810360 -1003.596275 457.547981 -515.181678 7 8 9 10 11 12 -281.772317 -418.041844 -579.278600 -465.765447 -305.661041 -459.138783 13 14 15 16 17 18 177.214670 -264.996966 -567.667811 -187.289081 934.351159 436.021778 19 20 21 22 23 24 511.954111 655.648969 229.738421 -96.243795 -662.913793 -424.014685 25 26 27 28 29 30 460.533931 -326.561372 -654.059325 -462.707447 552.495202 -437.113380 31 32 33 34 35 36 -9.572076 -211.869886 -531.059730 -171.419350 -447.092857 227.880112 37 38 39 40 41 42 240.406334 -277.933713 -325.891729 -57.387151 1880.524304 187.068398 43 44 45 46 47 48 303.772939 669.483088 227.198087 101.604142 200.101034 350.174530 49 50 51 52 53 54 935.399330 318.636357 264.811140 793.323564 737.398926 -176.355904 55 56 57 58 59 60 66.953738 214.544913 -39.364332 -54.170183 448.297182 -328.847248 > postscript(file="/var/www/html/rcomp/tmp/6ify31258756696.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 133.658205 NA 1 -920.964385 133.658205 2 -1052.810360 -920.964385 3 -1003.596275 -1052.810360 4 457.547981 -1003.596275 5 -515.181678 457.547981 6 -281.772317 -515.181678 7 -418.041844 -281.772317 8 -579.278600 -418.041844 9 -465.765447 -579.278600 10 -305.661041 -465.765447 11 -459.138783 -305.661041 12 177.214670 -459.138783 13 -264.996966 177.214670 14 -567.667811 -264.996966 15 -187.289081 -567.667811 16 934.351159 -187.289081 17 436.021778 934.351159 18 511.954111 436.021778 19 655.648969 511.954111 20 229.738421 655.648969 21 -96.243795 229.738421 22 -662.913793 -96.243795 23 -424.014685 -662.913793 24 460.533931 -424.014685 25 -326.561372 460.533931 26 -654.059325 -326.561372 27 -462.707447 -654.059325 28 552.495202 -462.707447 29 -437.113380 552.495202 30 -9.572076 -437.113380 31 -211.869886 -9.572076 32 -531.059730 -211.869886 33 -171.419350 -531.059730 34 -447.092857 -171.419350 35 227.880112 -447.092857 36 240.406334 227.880112 37 -277.933713 240.406334 38 -325.891729 -277.933713 39 -57.387151 -325.891729 40 1880.524304 -57.387151 41 187.068398 1880.524304 42 303.772939 187.068398 43 669.483088 303.772939 44 227.198087 669.483088 45 101.604142 227.198087 46 200.101034 101.604142 47 350.174530 200.101034 48 935.399330 350.174530 49 318.636357 935.399330 50 264.811140 318.636357 51 793.323564 264.811140 52 737.398926 793.323564 53 -176.355904 737.398926 54 66.953738 -176.355904 55 214.544913 66.953738 56 -39.364332 214.544913 57 -54.170183 -39.364332 58 448.297182 -54.170183 59 -328.847248 448.297182 60 NA -328.847248 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -920.964385 133.658205 [2,] -1052.810360 -920.964385 [3,] -1003.596275 -1052.810360 [4,] 457.547981 -1003.596275 [5,] -515.181678 457.547981 [6,] -281.772317 -515.181678 [7,] -418.041844 -281.772317 [8,] -579.278600 -418.041844 [9,] -465.765447 -579.278600 [10,] -305.661041 -465.765447 [11,] -459.138783 -305.661041 [12,] 177.214670 -459.138783 [13,] -264.996966 177.214670 [14,] -567.667811 -264.996966 [15,] -187.289081 -567.667811 [16,] 934.351159 -187.289081 [17,] 436.021778 934.351159 [18,] 511.954111 436.021778 [19,] 655.648969 511.954111 [20,] 229.738421 655.648969 [21,] -96.243795 229.738421 [22,] -662.913793 -96.243795 [23,] -424.014685 -662.913793 [24,] 460.533931 -424.014685 [25,] -326.561372 460.533931 [26,] -654.059325 -326.561372 [27,] -462.707447 -654.059325 [28,] 552.495202 -462.707447 [29,] -437.113380 552.495202 [30,] -9.572076 -437.113380 [31,] -211.869886 -9.572076 [32,] -531.059730 -211.869886 [33,] -171.419350 -531.059730 [34,] -447.092857 -171.419350 [35,] 227.880112 -447.092857 [36,] 240.406334 227.880112 [37,] -277.933713 240.406334 [38,] -325.891729 -277.933713 [39,] -57.387151 -325.891729 [40,] 1880.524304 -57.387151 [41,] 187.068398 1880.524304 [42,] 303.772939 187.068398 [43,] 669.483088 303.772939 [44,] 227.198087 669.483088 [45,] 101.604142 227.198087 [46,] 200.101034 101.604142 [47,] 350.174530 200.101034 [48,] 935.399330 350.174530 [49,] 318.636357 935.399330 [50,] 264.811140 318.636357 [51,] 793.323564 264.811140 [52,] 737.398926 793.323564 [53,] -176.355904 737.398926 [54,] 66.953738 -176.355904 [55,] 214.544913 66.953738 [56,] -39.364332 214.544913 [57,] -54.170183 -39.364332 [58,] 448.297182 -54.170183 [59,] -328.847248 448.297182 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -920.964385 133.658205 2 -1052.810360 -920.964385 3 -1003.596275 -1052.810360 4 457.547981 -1003.596275 5 -515.181678 457.547981 6 -281.772317 -515.181678 7 -418.041844 -281.772317 8 -579.278600 -418.041844 9 -465.765447 -579.278600 10 -305.661041 -465.765447 11 -459.138783 -305.661041 12 177.214670 -459.138783 13 -264.996966 177.214670 14 -567.667811 -264.996966 15 -187.289081 -567.667811 16 934.351159 -187.289081 17 436.021778 934.351159 18 511.954111 436.021778 19 655.648969 511.954111 20 229.738421 655.648969 21 -96.243795 229.738421 22 -662.913793 -96.243795 23 -424.014685 -662.913793 24 460.533931 -424.014685 25 -326.561372 460.533931 26 -654.059325 -326.561372 27 -462.707447 -654.059325 28 552.495202 -462.707447 29 -437.113380 552.495202 30 -9.572076 -437.113380 31 -211.869886 -9.572076 32 -531.059730 -211.869886 33 -171.419350 -531.059730 34 -447.092857 -171.419350 35 227.880112 -447.092857 36 240.406334 227.880112 37 -277.933713 240.406334 38 -325.891729 -277.933713 39 -57.387151 -325.891729 40 1880.524304 -57.387151 41 187.068398 1880.524304 42 303.772939 187.068398 43 669.483088 303.772939 44 227.198087 669.483088 45 101.604142 227.198087 46 200.101034 101.604142 47 350.174530 200.101034 48 935.399330 350.174530 49 318.636357 935.399330 50 264.811140 318.636357 51 793.323564 264.811140 52 737.398926 793.323564 53 -176.355904 737.398926 54 66.953738 -176.355904 55 214.544913 66.953738 56 -39.364332 214.544913 57 -54.170183 -39.364332 58 448.297182 -54.170183 59 -328.847248 448.297182 > 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/7qeep1258756696.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/8lxd71258756696.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/915cd1258756696.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/10ezi01258756696.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/11wp9h1258756696.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/12c6z61258756696.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/13iscq1258756696.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/14v3yy1258756696.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/1532e01258756696.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/16nir61258756697.tab") + } > > system("convert tmp/1wwhq1258756696.ps tmp/1wwhq1258756696.png") > system("convert tmp/2lp8o1258756696.ps tmp/2lp8o1258756696.png") > system("convert tmp/3xo811258756696.ps tmp/3xo811258756696.png") > system("convert tmp/4ut881258756696.ps tmp/4ut881258756696.png") > system("convert tmp/5ll2m1258756696.ps tmp/5ll2m1258756696.png") > system("convert tmp/6ify31258756696.ps tmp/6ify31258756696.png") > system("convert tmp/7qeep1258756696.ps tmp/7qeep1258756696.png") > system("convert tmp/8lxd71258756696.ps tmp/8lxd71258756696.png") > system("convert tmp/915cd1258756696.ps tmp/915cd1258756696.png") > system("convert tmp/10ezi01258756696.ps tmp/10ezi01258756696.png") > > > proc.time() user system elapsed 2.498 1.589 2.905