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(593530.00,0,610943.00,0,612613.00,0,611324.00,0,594167.00,0,595454.00,0,590865.00,0,589379.00,0,584428.00,0,573100.00,0,567456.00,0,569028.00,0,620735.00,0,628884.00,0,628232.00,0,612117.00,0,595404.00,0,597141.00,0,593408.00,0,590072.00,0,579799.00,0,574205.00,0,572775.00,0,572942.00,0,619567.00,0,625809.00,0,619916.00,0,587625.00,0,565742.00,0,557274.00,0,560576.00,0,548854.00,0,531673.00,0,525919.00,0,511038.00,0,498662.00,0,555362.00,0,564591.00,0,541657.00,0,527070.00,0,509846.00,0,514258.00,0,516922.00,0,507561.00,0,492622.00,0,490243.00,0,469357.00,0,477580.00,0,528379.00,1,533590.00,1,517945.00,1,506174.00,1,501866.00,1,516141.00,1,528222.00,1,532638.00,1,536322.00,1,536535.00,1,523597.00,1,536214.00,1,586570.00,1,596594.00,1,580523.00,1),dim=c(2,63),dimnames=list(c('werklozen','crisis '),1:63)) > y <- array(NA,dim=c(2,63),dimnames=list(c('werklozen','crisis '),1:63)) > 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 werklozen crisis\r 1 593530 0 2 610943 0 3 612613 0 4 611324 0 5 594167 0 6 595454 0 7 590865 0 8 589379 0 9 584428 0 10 573100 0 11 567456 0 12 569028 0 13 620735 0 14 628884 0 15 628232 0 16 612117 0 17 595404 0 18 597141 0 19 593408 0 20 590072 0 21 579799 0 22 574205 0 23 572775 0 24 572942 0 25 619567 0 26 625809 0 27 619916 0 28 587625 0 29 565742 0 30 557274 0 31 560576 0 32 548854 0 33 531673 0 34 525919 0 35 511038 0 36 498662 0 37 555362 0 38 564591 0 39 541657 0 40 527070 0 41 509846 0 42 514258 0 43 516922 0 44 507561 0 45 492622 0 46 490243 0 47 469357 0 48 477580 0 49 528379 1 50 533590 1 51 517945 1 52 506174 1 53 501866 1 54 516141 1 55 528222 1 56 532638 1 57 536322 1 58 536535 1 59 523597 1 60 536214 1 61 586570 1 62 596594 1 63 580523 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `crisis\r` 566203 -28782 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -96845.6 -22912.6 -460.6 28582.9 62681.4 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 566203 5863 96.566 <2e-16 *** `crisis\r` -28782 12016 -2.395 0.0197 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 40620 on 61 degrees of freedom Multiple R-squared: 0.08597, Adjusted R-squared: 0.07098 F-statistic: 5.737 on 1 and 61 DF, p-value: 0.01970 > 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.0279517691 0.0559035382 0.97204823 [2,] 0.0086941345 0.0173882689 0.99130587 [3,] 0.0034924733 0.0069849466 0.99650753 [4,] 0.0014084431 0.0028168862 0.99859156 [5,] 0.0007884338 0.0015768677 0.99921157 [6,] 0.0011533968 0.0023067936 0.99884660 [7,] 0.0016750434 0.0033500868 0.99832496 [8,] 0.0014412132 0.0028824264 0.99855879 [9,] 0.0021376089 0.0042752179 0.99786239 [10,] 0.0045801216 0.0091602432 0.99541988 [11,] 0.0073634795 0.0147269590 0.99263652 [12,] 0.0054456311 0.0108912622 0.99455437 [13,] 0.0031252283 0.0062504566 0.99687477 [14,] 0.0018204518 0.0036409036 0.99817955 [15,] 0.0010683698 0.0021367397 0.99893163 [16,] 0.0006471457 0.0012942915 0.99935285 [17,] 0.0004807765 0.0009615530 0.99951922 [18,] 0.0004243834 0.0008487669 0.99957562 [19,] 0.0003796361 0.0007592721 0.99962036 [20,] 0.0003261571 0.0006523142 0.99967384 [21,] 0.0007741824 0.0015483648 0.99922582 [22,] 0.0035613282 0.0071226565 0.99643867 [23,] 0.0140683922 0.0281367844 0.98593161 [24,] 0.0206972230 0.0413944461 0.97930278 [25,] 0.0339502847 0.0679005695 0.96604972 [26,] 0.0600800530 0.1201601060 0.93991995 [27,] 0.0947842284 0.1895684568 0.90521577 [28,] 0.1561608681 0.3123217363 0.84383913 [29,] 0.2734914051 0.5469828101 0.72650859 [30,] 0.4013776159 0.8027552318 0.59862238 [31,] 0.5667447339 0.8665105322 0.43325527 [32,] 0.7308721794 0.5382556413 0.26912782 [33,] 0.7656856713 0.4686286573 0.23431433 [34,] 0.8496902700 0.3006194600 0.15030973 [35,] 0.8845448964 0.2309102071 0.11545510 [36,] 0.9052187540 0.1895624920 0.09478125 [37,] 0.9193597455 0.1612805090 0.08064025 [38,] 0.9277170605 0.1445658790 0.07228294 [39,] 0.9370452241 0.1259095517 0.06295478 [40,] 0.9433133521 0.1133732958 0.05668665 [41,] 0.9462576890 0.1074846220 0.05374231 [42,] 0.9467092483 0.1065815034 0.05329075 [43,] 0.9499700856 0.1000598288 0.05002991 [44,] 0.9432370170 0.1135259660 0.05676298 [45,] 0.9111602602 0.1776794797 0.08883974 [46,] 0.8634710343 0.2730579314 0.13652897 [47,] 0.8185430077 0.3629139846 0.18145699 [48,] 0.8048189678 0.3903620645 0.19518103 [49,] 0.8256917280 0.3486165440 0.17430827 [50,] 0.8057668807 0.3884662387 0.19423312 [51,] 0.7472414301 0.5055171398 0.25275857 [52,] 0.6675082760 0.6649834480 0.33249172 [53,] 0.5659207025 0.8681585949 0.43407930 [54,] 0.4607588041 0.9215176082 0.53924120 > postscript(file="/var/www/html/rcomp/tmp/1etdf1258645293.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/2k4py1258645293.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/3amto1258645293.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/4weix1258645293.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/5rbmm1258645293.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 = 63 Frequency = 1 1 2 3 4 5 6 27327.3958 44740.3958 46410.3958 45121.3958 27964.3958 29251.3958 7 8 9 10 11 12 24662.3958 23176.3958 18225.3958 6897.3958 1253.3958 2825.3958 13 14 15 16 17 18 54532.3958 62681.3958 62029.3958 45914.3958 29201.3958 30938.3958 19 20 21 22 23 24 27205.3958 23869.3958 13596.3958 8002.3958 6572.3958 6739.3958 25 26 27 28 29 30 53364.3958 59606.3958 53713.3958 21422.3958 -460.6042 -8928.6042 31 32 33 34 35 36 -5626.6042 -17348.6042 -34529.6042 -40283.6042 -55164.6042 -67540.6042 37 38 39 40 41 42 -10840.6042 -1611.6042 -24545.6042 -39132.6042 -56356.6042 -51944.6042 43 44 45 46 47 48 -49280.6042 -58641.6042 -73580.6042 -75959.6042 -96845.6042 -88622.6042 49 50 51 52 53 54 -9041.6667 -3830.6667 -19475.6667 -31246.6667 -35554.6667 -21279.6667 55 56 57 58 59 60 -9198.6667 -4782.6667 -1098.6667 -885.6667 -13823.6667 -1206.6667 61 62 63 49149.3333 59173.3333 43102.3333 > postscript(file="/var/www/html/rcomp/tmp/6mtwe1258645293.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 = 63 Frequency = 1 lag(myerror, k = 1) myerror 0 27327.3958 NA 1 44740.3958 27327.3958 2 46410.3958 44740.3958 3 45121.3958 46410.3958 4 27964.3958 45121.3958 5 29251.3958 27964.3958 6 24662.3958 29251.3958 7 23176.3958 24662.3958 8 18225.3958 23176.3958 9 6897.3958 18225.3958 10 1253.3958 6897.3958 11 2825.3958 1253.3958 12 54532.3958 2825.3958 13 62681.3958 54532.3958 14 62029.3958 62681.3958 15 45914.3958 62029.3958 16 29201.3958 45914.3958 17 30938.3958 29201.3958 18 27205.3958 30938.3958 19 23869.3958 27205.3958 20 13596.3958 23869.3958 21 8002.3958 13596.3958 22 6572.3958 8002.3958 23 6739.3958 6572.3958 24 53364.3958 6739.3958 25 59606.3958 53364.3958 26 53713.3958 59606.3958 27 21422.3958 53713.3958 28 -460.6042 21422.3958 29 -8928.6042 -460.6042 30 -5626.6042 -8928.6042 31 -17348.6042 -5626.6042 32 -34529.6042 -17348.6042 33 -40283.6042 -34529.6042 34 -55164.6042 -40283.6042 35 -67540.6042 -55164.6042 36 -10840.6042 -67540.6042 37 -1611.6042 -10840.6042 38 -24545.6042 -1611.6042 39 -39132.6042 -24545.6042 40 -56356.6042 -39132.6042 41 -51944.6042 -56356.6042 42 -49280.6042 -51944.6042 43 -58641.6042 -49280.6042 44 -73580.6042 -58641.6042 45 -75959.6042 -73580.6042 46 -96845.6042 -75959.6042 47 -88622.6042 -96845.6042 48 -9041.6667 -88622.6042 49 -3830.6667 -9041.6667 50 -19475.6667 -3830.6667 51 -31246.6667 -19475.6667 52 -35554.6667 -31246.6667 53 -21279.6667 -35554.6667 54 -9198.6667 -21279.6667 55 -4782.6667 -9198.6667 56 -1098.6667 -4782.6667 57 -885.6667 -1098.6667 58 -13823.6667 -885.6667 59 -1206.6667 -13823.6667 60 49149.3333 -1206.6667 61 59173.3333 49149.3333 62 43102.3333 59173.3333 63 NA 43102.3333 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 44740.3958 27327.3958 [2,] 46410.3958 44740.3958 [3,] 45121.3958 46410.3958 [4,] 27964.3958 45121.3958 [5,] 29251.3958 27964.3958 [6,] 24662.3958 29251.3958 [7,] 23176.3958 24662.3958 [8,] 18225.3958 23176.3958 [9,] 6897.3958 18225.3958 [10,] 1253.3958 6897.3958 [11,] 2825.3958 1253.3958 [12,] 54532.3958 2825.3958 [13,] 62681.3958 54532.3958 [14,] 62029.3958 62681.3958 [15,] 45914.3958 62029.3958 [16,] 29201.3958 45914.3958 [17,] 30938.3958 29201.3958 [18,] 27205.3958 30938.3958 [19,] 23869.3958 27205.3958 [20,] 13596.3958 23869.3958 [21,] 8002.3958 13596.3958 [22,] 6572.3958 8002.3958 [23,] 6739.3958 6572.3958 [24,] 53364.3958 6739.3958 [25,] 59606.3958 53364.3958 [26,] 53713.3958 59606.3958 [27,] 21422.3958 53713.3958 [28,] -460.6042 21422.3958 [29,] -8928.6042 -460.6042 [30,] -5626.6042 -8928.6042 [31,] -17348.6042 -5626.6042 [32,] -34529.6042 -17348.6042 [33,] -40283.6042 -34529.6042 [34,] -55164.6042 -40283.6042 [35,] -67540.6042 -55164.6042 [36,] -10840.6042 -67540.6042 [37,] -1611.6042 -10840.6042 [38,] -24545.6042 -1611.6042 [39,] -39132.6042 -24545.6042 [40,] -56356.6042 -39132.6042 [41,] -51944.6042 -56356.6042 [42,] -49280.6042 -51944.6042 [43,] -58641.6042 -49280.6042 [44,] -73580.6042 -58641.6042 [45,] -75959.6042 -73580.6042 [46,] -96845.6042 -75959.6042 [47,] -88622.6042 -96845.6042 [48,] -9041.6667 -88622.6042 [49,] -3830.6667 -9041.6667 [50,] -19475.6667 -3830.6667 [51,] -31246.6667 -19475.6667 [52,] -35554.6667 -31246.6667 [53,] -21279.6667 -35554.6667 [54,] -9198.6667 -21279.6667 [55,] -4782.6667 -9198.6667 [56,] -1098.6667 -4782.6667 [57,] -885.6667 -1098.6667 [58,] -13823.6667 -885.6667 [59,] -1206.6667 -13823.6667 [60,] 49149.3333 -1206.6667 [61,] 59173.3333 49149.3333 [62,] 43102.3333 59173.3333 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 44740.3958 27327.3958 2 46410.3958 44740.3958 3 45121.3958 46410.3958 4 27964.3958 45121.3958 5 29251.3958 27964.3958 6 24662.3958 29251.3958 7 23176.3958 24662.3958 8 18225.3958 23176.3958 9 6897.3958 18225.3958 10 1253.3958 6897.3958 11 2825.3958 1253.3958 12 54532.3958 2825.3958 13 62681.3958 54532.3958 14 62029.3958 62681.3958 15 45914.3958 62029.3958 16 29201.3958 45914.3958 17 30938.3958 29201.3958 18 27205.3958 30938.3958 19 23869.3958 27205.3958 20 13596.3958 23869.3958 21 8002.3958 13596.3958 22 6572.3958 8002.3958 23 6739.3958 6572.3958 24 53364.3958 6739.3958 25 59606.3958 53364.3958 26 53713.3958 59606.3958 27 21422.3958 53713.3958 28 -460.6042 21422.3958 29 -8928.6042 -460.6042 30 -5626.6042 -8928.6042 31 -17348.6042 -5626.6042 32 -34529.6042 -17348.6042 33 -40283.6042 -34529.6042 34 -55164.6042 -40283.6042 35 -67540.6042 -55164.6042 36 -10840.6042 -67540.6042 37 -1611.6042 -10840.6042 38 -24545.6042 -1611.6042 39 -39132.6042 -24545.6042 40 -56356.6042 -39132.6042 41 -51944.6042 -56356.6042 42 -49280.6042 -51944.6042 43 -58641.6042 -49280.6042 44 -73580.6042 -58641.6042 45 -75959.6042 -73580.6042 46 -96845.6042 -75959.6042 47 -88622.6042 -96845.6042 48 -9041.6667 -88622.6042 49 -3830.6667 -9041.6667 50 -19475.6667 -3830.6667 51 -31246.6667 -19475.6667 52 -35554.6667 -31246.6667 53 -21279.6667 -35554.6667 54 -9198.6667 -21279.6667 55 -4782.6667 -9198.6667 56 -1098.6667 -4782.6667 57 -885.6667 -1098.6667 58 -13823.6667 -885.6667 59 -1206.6667 -13823.6667 60 49149.3333 -1206.6667 61 59173.3333 49149.3333 62 43102.3333 59173.3333 > 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/77xxs1258645293.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/8d5a01258645293.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/98npo1258645293.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/10xhtb1258645293.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/11p7ck1258645293.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/12b35g1258645293.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/131xjf1258645293.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/14wdym1258645293.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/15n6hr1258645293.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/16bgow1258645293.tab") + } > > system("convert tmp/1etdf1258645293.ps tmp/1etdf1258645293.png") > system("convert tmp/2k4py1258645293.ps tmp/2k4py1258645293.png") > system("convert tmp/3amto1258645293.ps tmp/3amto1258645293.png") > system("convert tmp/4weix1258645293.ps tmp/4weix1258645293.png") > system("convert tmp/5rbmm1258645293.ps tmp/5rbmm1258645293.png") > system("convert tmp/6mtwe1258645293.ps tmp/6mtwe1258645293.png") > system("convert tmp/77xxs1258645293.ps tmp/77xxs1258645293.png") > system("convert tmp/8d5a01258645293.ps tmp/8d5a01258645293.png") > system("convert tmp/98npo1258645293.ps tmp/98npo1258645293.png") > system("convert tmp/10xhtb1258645293.ps tmp/10xhtb1258645293.png") > > > proc.time() user system elapsed 2.458 1.554 2.868