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(102.1,100.35,102.86,100.35,102.99,100.36,103.73,100.39,105.02,100.34,104.43,100.34,104.63,100.35,104.93,100.43,105.87,100.47,105.66,100.67,106.76,100.75,106,100.78,107.22,100.79,107.33,100.67,107.11,100.64,108.86,100.64,107.72,100.76,107.88,100.79,108.38,100.79,107.72,100.9,108.41,100.98,109.9,101.11,111.45,101.18,112.18,101.22,113.34,101.23,113.46,101.09,114.06,101.26,115.54,101.28,116.39,101.43,115.94,101.53,116.97,101.54,115.94,101.54,115.91,101.79,116.43,102.18,116.26,102.37,116.35,102.46,117.9,102.46,117.7,102.03,117.53,102.26,117.86,102.33,117.65,102.44,116.51,102.5,115.93,102.52,115.31,102.66,115,102.72),dim=c(2,45),dimnames=list(c('vmtot','ktot'),1:45))
> y <- array(NA,dim=c(2,45),dimnames=list(c('vmtot','ktot'),1:45))
> 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
vmtot ktot
1 102.10 100.35
2 102.86 100.35
3 102.99 100.36
4 103.73 100.39
5 105.02 100.34
6 104.43 100.34
7 104.63 100.35
8 104.93 100.43
9 105.87 100.47
10 105.66 100.67
11 106.76 100.75
12 106.00 100.78
13 107.22 100.79
14 107.33 100.67
15 107.11 100.64
16 108.86 100.64
17 107.72 100.76
18 107.88 100.79
19 108.38 100.79
20 107.72 100.90
21 108.41 100.98
22 109.90 101.11
23 111.45 101.18
24 112.18 101.22
25 113.34 101.23
26 113.46 101.09
27 114.06 101.26
28 115.54 101.28
29 116.39 101.43
30 115.94 101.53
31 116.97 101.54
32 115.94 101.54
33 115.91 101.79
34 116.43 102.18
35 116.26 102.37
36 116.35 102.46
37 117.90 102.46
38 117.70 102.03
39 117.53 102.26
40 117.86 102.33
41 117.65 102.44
42 116.51 102.50
43 115.93 102.52
44 115.31 102.66
45 115.00 102.72
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) ktot
-496.183 5.995
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4.671 -1.313 -0.220 1.502 4.502
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -496.1828 44.1762 -11.23 2.26e-14 ***
ktot 5.9955 0.4362 13.75 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.267 on 43 degrees of freedom
Multiple R-squared: 0.8146, Adjusted R-squared: 0.8103
F-statistic: 189 on 1 and 43 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.199318731 0.398637462 0.800681269
[2,] 0.115594109 0.231188217 0.884405891
[3,] 0.071162481 0.142324962 0.928837519
[4,] 0.049946795 0.099893590 0.950053205
[5,] 0.026741408 0.053482815 0.973258592
[6,] 0.020663847 0.041327695 0.979336153
[7,] 0.010209754 0.020419508 0.989790246
[8,] 0.007312743 0.014625485 0.992687257
[9,] 0.004177250 0.008354500 0.995822750
[10,] 0.003850055 0.007700109 0.996149945
[11,] 0.003287228 0.006574455 0.996712772
[12,] 0.012519158 0.025038317 0.987480842
[13,] 0.008799162 0.017598324 0.991200838
[14,] 0.006753916 0.013507832 0.993246084
[15,] 0.005841429 0.011682858 0.994158571
[16,] 0.012222961 0.024445921 0.987777039
[17,] 0.035853115 0.071706229 0.964146885
[18,] 0.089202587 0.178405174 0.910797413
[19,] 0.162878563 0.325757126 0.837121437
[20,] 0.290001016 0.580002031 0.709998984
[21,] 0.434782251 0.869564501 0.565217749
[22,] 0.739200690 0.521598620 0.260799310
[23,] 0.863969653 0.272060695 0.136030347
[24,] 0.903462723 0.193074554 0.096537277
[25,] 0.876752864 0.246494271 0.123247136
[26,] 0.844564547 0.310870905 0.155435453
[27,] 0.782664020 0.434671960 0.217335980
[28,] 0.782243288 0.435513423 0.217756712
[29,] 0.950648084 0.098703832 0.049351916
[30,] 0.990023739 0.019952521 0.009976261
[31,] 0.994927626 0.010144749 0.005072374
[32,] 0.993093686 0.013812628 0.006906314
[33,] 0.995290479 0.009419042 0.004709521
[34,] 0.997671545 0.004656910 0.002328455
[35,] 0.996765230 0.006469540 0.003234770
[36,] 0.983666524 0.032666951 0.016333476
> postscript(file="/var/www/html/rcomp/tmp/1cu3e1258749233.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/2n1pi1258749233.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/3r0ob1258749233.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/427ao1258749233.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/5hc191258749233.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 = 45
Frequency = 1
1 2 3 4 5 6
-3.362002998 -2.602002998 -2.531957641 -1.971821571 -0.382048354 -0.972048354
7 8 9 10 11 12
-0.832002998 -1.011640145 -0.311458719 -1.720551586 -1.100188733 -2.040052664
13 14 15 16 17 18
-0.880007307 -0.050551586 -0.090687656 1.659312344 -0.200143377 -0.220007307
19 20 21 22 23 24
0.279992693 -1.039508384 -0.829145532 -0.118555896 1.011761601 1.501943027
25 26 27 28 29 30
2.601988384 3.561353391 3.142124454 4.502215167 4.452895516 3.403349082
31 32 33 34 35 36
4.373394439 3.343394439 1.814528354 -0.003702738 -1.312840963 -1.762432753
37 38 39 40 41 42
-0.212432753 2.165616912 0.616660114 0.526977611 -0.342523467 -1.842251327
43 44 45
-2.542160614 -4.001525621 -4.671253482
> postscript(file="/var/www/html/rcomp/tmp/6nxwz1258749233.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 = 45
Frequency = 1
lag(myerror, k = 1) myerror
0 -3.362002998 NA
1 -2.602002998 -3.362002998
2 -2.531957641 -2.602002998
3 -1.971821571 -2.531957641
4 -0.382048354 -1.971821571
5 -0.972048354 -0.382048354
6 -0.832002998 -0.972048354
7 -1.011640145 -0.832002998
8 -0.311458719 -1.011640145
9 -1.720551586 -0.311458719
10 -1.100188733 -1.720551586
11 -2.040052664 -1.100188733
12 -0.880007307 -2.040052664
13 -0.050551586 -0.880007307
14 -0.090687656 -0.050551586
15 1.659312344 -0.090687656
16 -0.200143377 1.659312344
17 -0.220007307 -0.200143377
18 0.279992693 -0.220007307
19 -1.039508384 0.279992693
20 -0.829145532 -1.039508384
21 -0.118555896 -0.829145532
22 1.011761601 -0.118555896
23 1.501943027 1.011761601
24 2.601988384 1.501943027
25 3.561353391 2.601988384
26 3.142124454 3.561353391
27 4.502215167 3.142124454
28 4.452895516 4.502215167
29 3.403349082 4.452895516
30 4.373394439 3.403349082
31 3.343394439 4.373394439
32 1.814528354 3.343394439
33 -0.003702738 1.814528354
34 -1.312840963 -0.003702738
35 -1.762432753 -1.312840963
36 -0.212432753 -1.762432753
37 2.165616912 -0.212432753
38 0.616660114 2.165616912
39 0.526977611 0.616660114
40 -0.342523467 0.526977611
41 -1.842251327 -0.342523467
42 -2.542160614 -1.842251327
43 -4.001525621 -2.542160614
44 -4.671253482 -4.001525621
45 NA -4.671253482
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -2.602002998 -3.362002998
[2,] -2.531957641 -2.602002998
[3,] -1.971821571 -2.531957641
[4,] -0.382048354 -1.971821571
[5,] -0.972048354 -0.382048354
[6,] -0.832002998 -0.972048354
[7,] -1.011640145 -0.832002998
[8,] -0.311458719 -1.011640145
[9,] -1.720551586 -0.311458719
[10,] -1.100188733 -1.720551586
[11,] -2.040052664 -1.100188733
[12,] -0.880007307 -2.040052664
[13,] -0.050551586 -0.880007307
[14,] -0.090687656 -0.050551586
[15,] 1.659312344 -0.090687656
[16,] -0.200143377 1.659312344
[17,] -0.220007307 -0.200143377
[18,] 0.279992693 -0.220007307
[19,] -1.039508384 0.279992693
[20,] -0.829145532 -1.039508384
[21,] -0.118555896 -0.829145532
[22,] 1.011761601 -0.118555896
[23,] 1.501943027 1.011761601
[24,] 2.601988384 1.501943027
[25,] 3.561353391 2.601988384
[26,] 3.142124454 3.561353391
[27,] 4.502215167 3.142124454
[28,] 4.452895516 4.502215167
[29,] 3.403349082 4.452895516
[30,] 4.373394439 3.403349082
[31,] 3.343394439 4.373394439
[32,] 1.814528354 3.343394439
[33,] -0.003702738 1.814528354
[34,] -1.312840963 -0.003702738
[35,] -1.762432753 -1.312840963
[36,] -0.212432753 -1.762432753
[37,] 2.165616912 -0.212432753
[38,] 0.616660114 2.165616912
[39,] 0.526977611 0.616660114
[40,] -0.342523467 0.526977611
[41,] -1.842251327 -0.342523467
[42,] -2.542160614 -1.842251327
[43,] -4.001525621 -2.542160614
[44,] -4.671253482 -4.001525621
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -2.602002998 -3.362002998
2 -2.531957641 -2.602002998
3 -1.971821571 -2.531957641
4 -0.382048354 -1.971821571
5 -0.972048354 -0.382048354
6 -0.832002998 -0.972048354
7 -1.011640145 -0.832002998
8 -0.311458719 -1.011640145
9 -1.720551586 -0.311458719
10 -1.100188733 -1.720551586
11 -2.040052664 -1.100188733
12 -0.880007307 -2.040052664
13 -0.050551586 -0.880007307
14 -0.090687656 -0.050551586
15 1.659312344 -0.090687656
16 -0.200143377 1.659312344
17 -0.220007307 -0.200143377
18 0.279992693 -0.220007307
19 -1.039508384 0.279992693
20 -0.829145532 -1.039508384
21 -0.118555896 -0.829145532
22 1.011761601 -0.118555896
23 1.501943027 1.011761601
24 2.601988384 1.501943027
25 3.561353391 2.601988384
26 3.142124454 3.561353391
27 4.502215167 3.142124454
28 4.452895516 4.502215167
29 3.403349082 4.452895516
30 4.373394439 3.403349082
31 3.343394439 4.373394439
32 1.814528354 3.343394439
33 -0.003702738 1.814528354
34 -1.312840963 -0.003702738
35 -1.762432753 -1.312840963
36 -0.212432753 -1.762432753
37 2.165616912 -0.212432753
38 0.616660114 2.165616912
39 0.526977611 0.616660114
40 -0.342523467 0.526977611
41 -1.842251327 -0.342523467
42 -2.542160614 -1.842251327
43 -4.001525621 -2.542160614
44 -4.671253482 -4.001525621
> 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/7kmdy1258749233.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/8i60v1258749233.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/9lhmg1258749233.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/105iom1258749233.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/11dnek1258749233.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/12ycxi1258749233.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/132h7s1258749233.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/14dmw21258749233.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/154se21258749233.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/167g1c1258749233.tab")
+ }
>
> system("convert tmp/1cu3e1258749233.ps tmp/1cu3e1258749233.png")
> system("convert tmp/2n1pi1258749233.ps tmp/2n1pi1258749233.png")
> system("convert tmp/3r0ob1258749233.ps tmp/3r0ob1258749233.png")
> system("convert tmp/427ao1258749233.ps tmp/427ao1258749233.png")
> system("convert tmp/5hc191258749233.ps tmp/5hc191258749233.png")
> system("convert tmp/6nxwz1258749233.ps tmp/6nxwz1258749233.png")
> system("convert tmp/7kmdy1258749233.ps tmp/7kmdy1258749233.png")
> system("convert tmp/8i60v1258749233.ps tmp/8i60v1258749233.png")
> system("convert tmp/9lhmg1258749233.ps tmp/9lhmg1258749233.png")
> system("convert tmp/105iom1258749233.ps tmp/105iom1258749233.png")
>
>
> proc.time()
user system elapsed
2.284 1.505 3.693