R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(308347,0,298427,0,289231,0,291975,0,294912,0,293488,0,290555,0,284736,0,281818,0,287854,0,316263,0,325412,0,326011,0,328282,0,317480,0,317539,0,313737,0,312276,0,309391,0,302950,0,300316,0,304035,0,333476,0,337698,0,335932,0,323931,0,313927,0,314485,1,313218,1,309664,1,302963,1,298989,1,298423,1,301631,1,329765,1,335083,1,327616,1,309119,1,295916,1,291413,1,291542,1,284678,1,276475,1,272566,1,264981,1,263290,1,296806,1,303598,1,286994,1,276427,1,266424,1,267153,1,268381,1,262522,1,255542,1,253158,1,243803,1,250741,1,280445,1,285257,1,270976,1,261076,1,255603,1),dim=c(2,63),dimnames=list(c('Vrouwen','Dummy'),1:63)) > y <- array(NA,dim=c(2,63),dimnames=list(c('Vrouwen','Dummy'),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 Vrouwen Dummy 1 308347 0 2 298427 0 3 289231 0 4 291975 0 5 294912 0 6 293488 0 7 290555 0 8 284736 0 9 281818 0 10 287854 0 11 316263 0 12 325412 0 13 326011 0 14 328282 0 15 317480 0 16 317539 0 17 313737 0 18 312276 0 19 309391 0 20 302950 0 21 300316 0 22 304035 0 23 333476 0 24 337698 0 25 335932 0 26 323931 0 27 313927 0 28 314485 1 29 313218 1 30 309664 1 31 302963 1 32 298989 1 33 298423 1 34 301631 1 35 329765 1 36 335083 1 37 327616 1 38 309119 1 39 295916 1 40 291413 1 41 291542 1 42 284678 1 43 276475 1 44 272566 1 45 264981 1 46 263290 1 47 296806 1 48 303598 1 49 286994 1 50 276427 1 51 266424 1 52 267153 1 53 268381 1 54 262522 1 55 255542 1 56 253158 1 57 243803 1 58 250741 1 59 280445 1 60 285257 1 61 270976 1 62 261076 1 63 255603 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummy 308889 -23702 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -41383.75 -17473.80 70.25 15743.20 49896.25 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 308889 4042 76.411 < 2e-16 *** Dummy -23702 5348 -4.432 3.95e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 21010 on 61 degrees of freedom Multiple R-squared: 0.2436, Adjusted R-squared: 0.2312 F-statistic: 19.64 on 1 and 61 DF, p-value: 3.953e-05 > 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.076753349 0.153506698 0.92324665 [2,] 0.026462333 0.052924666 0.97353767 [3,] 0.010345160 0.020690319 0.98965484 [4,] 0.007854075 0.015708149 0.99214593 [5,] 0.007689573 0.015379145 0.99231043 [6,] 0.003567032 0.007134064 0.99643297 [7,] 0.017910777 0.035821553 0.98208922 [8,] 0.074632681 0.149265362 0.92536732 [9,] 0.133421852 0.266843703 0.86657815 [10,] 0.192875681 0.385751361 0.80712432 [11,] 0.165144944 0.330289887 0.83485506 [12,] 0.137095161 0.274190322 0.86290484 [13,] 0.102296416 0.204592832 0.89770358 [14,] 0.072587569 0.145175137 0.92741243 [15,] 0.048689916 0.097379831 0.95131008 [16,] 0.032551199 0.065102398 0.96744880 [17,] 0.022925171 0.045850341 0.97707483 [18,] 0.015686978 0.031373957 0.98431302 [19,] 0.025482721 0.050965443 0.97451728 [20,] 0.043359338 0.086718677 0.95664066 [21,] 0.056996473 0.113992947 0.94300353 [22,] 0.046045912 0.092091825 0.95395409 [23,] 0.030724689 0.061449379 0.96927531 [24,] 0.025571546 0.051143093 0.97442845 [25,] 0.021401818 0.042803635 0.97859818 [26,] 0.017360966 0.034721931 0.98263903 [27,] 0.013401572 0.026803144 0.98659843 [28,] 0.010082070 0.020164140 0.98991793 [29,] 0.007353342 0.014706684 0.99264666 [30,] 0.005380383 0.010760766 0.99461962 [31,] 0.017660430 0.035320860 0.98233957 [32,] 0.092192182 0.184384365 0.90780782 [33,] 0.274221862 0.548443724 0.72577814 [34,] 0.385363407 0.770726813 0.61463659 [35,] 0.436275388 0.872550776 0.56372461 [36,] 0.475429746 0.950859492 0.52457025 [37,] 0.518953075 0.962093850 0.48104692 [38,] 0.539933100 0.920133800 0.46006690 [39,] 0.550985706 0.898028587 0.44901429 [40,] 0.554742913 0.890514173 0.44525709 [41,] 0.577121187 0.845757626 0.42287881 [42,] 0.587892000 0.824216000 0.41210800 [43,] 0.668445983 0.663108034 0.33155402 [44,] 0.878709638 0.242580724 0.12129036 [45,] 0.918655562 0.162688877 0.08134444 [46,] 0.913829784 0.172340433 0.08617022 [47,] 0.887053189 0.225893623 0.11294681 [48,] 0.849572079 0.300855842 0.15042792 [49,] 0.801127067 0.397745866 0.19887293 [50,] 0.733008698 0.533982604 0.26699130 [51,] 0.671349239 0.657301521 0.32865076 [52,] 0.612934875 0.774130250 0.38706512 [53,] 0.694837240 0.610325520 0.30516276 [54,] 0.706244797 0.587510406 0.29375520 > postscript(file="/var/www/html/rcomp/tmp/1kksw1229462128.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/2utey1229462128.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/3sqwn1229462128.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/4u6at1229462128.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/5m1iq1229462128.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 -541.8519 -10461.8519 -19657.8519 -16913.8519 -13976.8519 -15400.8519 7 8 9 10 11 12 -18333.8519 -24152.8519 -27070.8519 -21034.8519 7374.1481 16523.1481 13 14 15 16 17 18 17122.1481 19393.1481 8591.1481 8650.1481 4848.1481 3387.1481 19 20 21 22 23 24 502.1481 -5938.8519 -8572.8519 -4853.8519 24587.1481 28809.1481 25 26 27 28 29 30 27043.1481 15042.1481 5038.1481 29298.2500 28031.2500 24477.2500 31 32 33 34 35 36 17776.2500 13802.2500 13236.2500 16444.2500 44578.2500 49896.2500 37 38 39 40 41 42 42429.2500 23932.2500 10729.2500 6226.2500 6355.2500 -508.7500 43 44 45 46 47 48 -8711.7500 -12620.7500 -20205.7500 -21896.7500 11619.2500 18411.2500 49 50 51 52 53 54 1807.2500 -8759.7500 -18762.7500 -18033.7500 -16805.7500 -22664.7500 55 56 57 58 59 60 -29644.7500 -32028.7500 -41383.7500 -34445.7500 -4741.7500 70.2500 61 62 63 -14210.7500 -24110.7500 -29583.7500 > postscript(file="/var/www/html/rcomp/tmp/6pxlk1229462128.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 -541.8519 NA 1 -10461.8519 -541.8519 2 -19657.8519 -10461.8519 3 -16913.8519 -19657.8519 4 -13976.8519 -16913.8519 5 -15400.8519 -13976.8519 6 -18333.8519 -15400.8519 7 -24152.8519 -18333.8519 8 -27070.8519 -24152.8519 9 -21034.8519 -27070.8519 10 7374.1481 -21034.8519 11 16523.1481 7374.1481 12 17122.1481 16523.1481 13 19393.1481 17122.1481 14 8591.1481 19393.1481 15 8650.1481 8591.1481 16 4848.1481 8650.1481 17 3387.1481 4848.1481 18 502.1481 3387.1481 19 -5938.8519 502.1481 20 -8572.8519 -5938.8519 21 -4853.8519 -8572.8519 22 24587.1481 -4853.8519 23 28809.1481 24587.1481 24 27043.1481 28809.1481 25 15042.1481 27043.1481 26 5038.1481 15042.1481 27 29298.2500 5038.1481 28 28031.2500 29298.2500 29 24477.2500 28031.2500 30 17776.2500 24477.2500 31 13802.2500 17776.2500 32 13236.2500 13802.2500 33 16444.2500 13236.2500 34 44578.2500 16444.2500 35 49896.2500 44578.2500 36 42429.2500 49896.2500 37 23932.2500 42429.2500 38 10729.2500 23932.2500 39 6226.2500 10729.2500 40 6355.2500 6226.2500 41 -508.7500 6355.2500 42 -8711.7500 -508.7500 43 -12620.7500 -8711.7500 44 -20205.7500 -12620.7500 45 -21896.7500 -20205.7500 46 11619.2500 -21896.7500 47 18411.2500 11619.2500 48 1807.2500 18411.2500 49 -8759.7500 1807.2500 50 -18762.7500 -8759.7500 51 -18033.7500 -18762.7500 52 -16805.7500 -18033.7500 53 -22664.7500 -16805.7500 54 -29644.7500 -22664.7500 55 -32028.7500 -29644.7500 56 -41383.7500 -32028.7500 57 -34445.7500 -41383.7500 58 -4741.7500 -34445.7500 59 70.2500 -4741.7500 60 -14210.7500 70.2500 61 -24110.7500 -14210.7500 62 -29583.7500 -24110.7500 63 NA -29583.7500 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -10461.8519 -541.8519 [2,] -19657.8519 -10461.8519 [3,] -16913.8519 -19657.8519 [4,] -13976.8519 -16913.8519 [5,] -15400.8519 -13976.8519 [6,] -18333.8519 -15400.8519 [7,] -24152.8519 -18333.8519 [8,] -27070.8519 -24152.8519 [9,] -21034.8519 -27070.8519 [10,] 7374.1481 -21034.8519 [11,] 16523.1481 7374.1481 [12,] 17122.1481 16523.1481 [13,] 19393.1481 17122.1481 [14,] 8591.1481 19393.1481 [15,] 8650.1481 8591.1481 [16,] 4848.1481 8650.1481 [17,] 3387.1481 4848.1481 [18,] 502.1481 3387.1481 [19,] -5938.8519 502.1481 [20,] -8572.8519 -5938.8519 [21,] -4853.8519 -8572.8519 [22,] 24587.1481 -4853.8519 [23,] 28809.1481 24587.1481 [24,] 27043.1481 28809.1481 [25,] 15042.1481 27043.1481 [26,] 5038.1481 15042.1481 [27,] 29298.2500 5038.1481 [28,] 28031.2500 29298.2500 [29,] 24477.2500 28031.2500 [30,] 17776.2500 24477.2500 [31,] 13802.2500 17776.2500 [32,] 13236.2500 13802.2500 [33,] 16444.2500 13236.2500 [34,] 44578.2500 16444.2500 [35,] 49896.2500 44578.2500 [36,] 42429.2500 49896.2500 [37,] 23932.2500 42429.2500 [38,] 10729.2500 23932.2500 [39,] 6226.2500 10729.2500 [40,] 6355.2500 6226.2500 [41,] -508.7500 6355.2500 [42,] -8711.7500 -508.7500 [43,] -12620.7500 -8711.7500 [44,] -20205.7500 -12620.7500 [45,] -21896.7500 -20205.7500 [46,] 11619.2500 -21896.7500 [47,] 18411.2500 11619.2500 [48,] 1807.2500 18411.2500 [49,] -8759.7500 1807.2500 [50,] -18762.7500 -8759.7500 [51,] -18033.7500 -18762.7500 [52,] -16805.7500 -18033.7500 [53,] -22664.7500 -16805.7500 [54,] -29644.7500 -22664.7500 [55,] -32028.7500 -29644.7500 [56,] -41383.7500 -32028.7500 [57,] -34445.7500 -41383.7500 [58,] -4741.7500 -34445.7500 [59,] 70.2500 -4741.7500 [60,] -14210.7500 70.2500 [61,] -24110.7500 -14210.7500 [62,] -29583.7500 -24110.7500 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -10461.8519 -541.8519 2 -19657.8519 -10461.8519 3 -16913.8519 -19657.8519 4 -13976.8519 -16913.8519 5 -15400.8519 -13976.8519 6 -18333.8519 -15400.8519 7 -24152.8519 -18333.8519 8 -27070.8519 -24152.8519 9 -21034.8519 -27070.8519 10 7374.1481 -21034.8519 11 16523.1481 7374.1481 12 17122.1481 16523.1481 13 19393.1481 17122.1481 14 8591.1481 19393.1481 15 8650.1481 8591.1481 16 4848.1481 8650.1481 17 3387.1481 4848.1481 18 502.1481 3387.1481 19 -5938.8519 502.1481 20 -8572.8519 -5938.8519 21 -4853.8519 -8572.8519 22 24587.1481 -4853.8519 23 28809.1481 24587.1481 24 27043.1481 28809.1481 25 15042.1481 27043.1481 26 5038.1481 15042.1481 27 29298.2500 5038.1481 28 28031.2500 29298.2500 29 24477.2500 28031.2500 30 17776.2500 24477.2500 31 13802.2500 17776.2500 32 13236.2500 13802.2500 33 16444.2500 13236.2500 34 44578.2500 16444.2500 35 49896.2500 44578.2500 36 42429.2500 49896.2500 37 23932.2500 42429.2500 38 10729.2500 23932.2500 39 6226.2500 10729.2500 40 6355.2500 6226.2500 41 -508.7500 6355.2500 42 -8711.7500 -508.7500 43 -12620.7500 -8711.7500 44 -20205.7500 -12620.7500 45 -21896.7500 -20205.7500 46 11619.2500 -21896.7500 47 18411.2500 11619.2500 48 1807.2500 18411.2500 49 -8759.7500 1807.2500 50 -18762.7500 -8759.7500 51 -18033.7500 -18762.7500 52 -16805.7500 -18033.7500 53 -22664.7500 -16805.7500 54 -29644.7500 -22664.7500 55 -32028.7500 -29644.7500 56 -41383.7500 -32028.7500 57 -34445.7500 -41383.7500 58 -4741.7500 -34445.7500 59 70.2500 -4741.7500 60 -14210.7500 70.2500 61 -24110.7500 -14210.7500 62 -29583.7500 -24110.7500 > 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/7h6iv1229462128.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/8ieri1229462128.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/96hta1229462128.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/10sijb1229462128.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/111uhs1229462128.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/12rlcv1229462128.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/131g1p1229462128.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/14h6e31229462128.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/15l9291229462128.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/16o9gg1229462128.tab") + } > > system("convert tmp/1kksw1229462128.ps tmp/1kksw1229462128.png") > system("convert tmp/2utey1229462128.ps tmp/2utey1229462128.png") > system("convert tmp/3sqwn1229462128.ps tmp/3sqwn1229462128.png") > system("convert tmp/4u6at1229462128.ps tmp/4u6at1229462128.png") > system("convert tmp/5m1iq1229462128.ps tmp/5m1iq1229462128.png") > system("convert tmp/6pxlk1229462128.ps tmp/6pxlk1229462128.png") > system("convert tmp/7h6iv1229462128.ps tmp/7h6iv1229462128.png") > system("convert tmp/8ieri1229462128.ps tmp/8ieri1229462128.png") > system("convert tmp/96hta1229462128.ps tmp/96hta1229462128.png") > system("convert tmp/10sijb1229462128.ps tmp/10sijb1229462128.png") > > > proc.time() user system elapsed 2.552 1.611 3.378