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(2.0,3,42.0,1.8,4,624.0,0.7,4,180.0,3.9,1,35.0,1.0,4,392.0,3.6,1,63.0,1.4,1,230.0,1.5,4,112.0,0.7,5,281.0,2.1,1,42.0,0.0,2,28.0,4.1,2,42.0,1.2,2,120.0,0.5,5,148.0,3.4,2,16.0,1.5,1,310.0,3.4,3,28.0,0.8,4,68.0,0.8,5,336.0,1.4,4,21.5,2.0,1,50.0,1.9,1,267.0,1.3,3,19.0,2.0,3,30.0,5.6,1,12.0,3.1,1,120.0,1.8,2,140.0,0.9,4,170.0,1.8,2,17.0,1.9,4,115.0,0.9,5,31.0,2.6,3,21.0,2.4,1,52.0,1.2,2,164.0,0.9,2,225.0,0.5,3,225.0,0.6,5,151.0,2.3,2,60.0,0.5,3,200.0,2.6,2,46.0,0.6,4,210.0,6.6,1,14.0),dim=c(3,42),dimnames=list(c('PS','D','tg'),1:42))
> y <- array(NA,dim=c(3,42),dimnames=list(c('PS','D','tg'),1:42))
> 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
PS D tg
1 2.0 3 42.0
2 1.8 4 624.0
3 0.7 4 180.0
4 3.9 1 35.0
5 1.0 4 392.0
6 3.6 1 63.0
7 1.4 1 230.0
8 1.5 4 112.0
9 0.7 5 281.0
10 2.1 1 42.0
11 0.0 2 28.0
12 4.1 2 42.0
13 1.2 2 120.0
14 0.5 5 148.0
15 3.4 2 16.0
16 1.5 1 310.0
17 3.4 3 28.0
18 0.8 4 68.0
19 0.8 5 336.0
20 1.4 4 21.5
21 2.0 1 50.0
22 1.9 1 267.0
23 1.3 3 19.0
24 2.0 3 30.0
25 5.6 1 12.0
26 3.1 1 120.0
27 1.8 2 140.0
28 0.9 4 170.0
29 1.8 2 17.0
30 1.9 4 115.0
31 0.9 5 31.0
32 2.6 3 21.0
33 2.4 1 52.0
34 1.2 2 164.0
35 0.9 2 225.0
36 0.5 3 225.0
37 0.6 5 151.0
38 2.3 2 60.0
39 0.5 3 200.0
40 2.6 2 46.0
41 0.6 4 210.0
42 6.6 1 14.0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) D tg
3.591298 -0.493272 -0.002803
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-2.5263 -0.7501 -0.1480 0.5306 3.5412
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.591298 0.386516 9.291 1.97e-11 ***
D -0.493272 0.131738 -3.744 0.000583 ***
tg -0.002803 0.001430 -1.960 0.057228 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.114 on 39 degrees of freedom
Multiple R-squared: 0.3874, Adjusted R-squared: 0.356
F-statistic: 12.33 on 2 and 39 DF, p-value: 7.071e-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.02789614 0.05579228 0.9721039
[2,] 0.51883551 0.96232897 0.4811645
[3,] 0.36776558 0.73553115 0.6322344
[4,] 0.25177903 0.50355805 0.7482210
[5,] 0.21892152 0.43784305 0.7810785
[6,] 0.64117687 0.71764625 0.3588231
[7,] 0.79753205 0.40493589 0.2024679
[8,] 0.78174526 0.43650949 0.2182547
[9,] 0.69964186 0.60071629 0.3003581
[10,] 0.67986848 0.64026303 0.3201315
[11,] 0.62929701 0.74140598 0.3707030
[12,] 0.66569889 0.66860223 0.3343011
[13,] 0.60874584 0.78250833 0.3912542
[14,] 0.64872564 0.70254872 0.3512744
[15,] 0.56197413 0.87605174 0.4380259
[16,] 0.58469478 0.83061044 0.4153052
[17,] 0.49941844 0.99883689 0.5005816
[18,] 0.50532937 0.98934126 0.4946706
[19,] 0.43212578 0.86425156 0.5678742
[20,] 0.73180129 0.53639742 0.2681987
[21,] 0.65558218 0.68883564 0.3444178
[22,] 0.56371597 0.87256806 0.4362840
[23,] 0.47073196 0.94146393 0.5292680
[24,] 0.52564757 0.94870486 0.4743524
[25,] 0.46595716 0.93191432 0.5340428
[26,] 0.39538002 0.79076004 0.6046200
[27,] 0.31583532 0.63167064 0.6841647
[28,] 0.36867117 0.73734233 0.6313288
[29,] 0.29973609 0.59947218 0.7002639
[30,] 0.20401561 0.40803122 0.7959844
[31,] 0.11901182 0.23802364 0.8809882
> postscript(file="/var/www/html/rcomp/tmp/1xn9u1292177301.ps",horizontal=F,onefile=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/27xqx1292177301.ps",horizontal=F,onefile=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/37xqx1292177301.ps",horizontal=F,onefile=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/47xqx1292177301.ps",horizontal=F,onefile=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/57xqx1292177301.ps",horizontal=F,onefile=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 = 42
Frequency = 1
1 2 3 4 5 6
0.006223449 1.930568353 -0.413755454 0.900062120 0.480381138 0.678532991
7 8 9 10 11 12
-1.053444316 0.195672432 0.362571992 -0.880320162 -2.526283792 1.612951644
13 14 15 16 17 18
-1.068450931 -0.210164643 0.840085835 -0.729241828 1.366988014 -0.627638937
19 20 21 22 23 24
0.616711203 -0.157956632 -0.957899913 -0.449750665 -0.758234766 -0.027406924
25 26 27 28 29 30
2.535603905 0.338277263 -0.412400309 -0.241780765 -0.757111634 0.604080025
31 32 33 34 35 36
-0.138060781 0.547370296 -0.552294851 -0.945139563 -1.074185166 -0.980913360
37 38 39 40 41 42
-0.101757050 -0.136602797 -1.050976638 0.124161768 -0.429679521 3.541208967
> postscript(file="/var/www/html/rcomp/tmp/6i6pi1292177301.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 42
Frequency = 1
lag(myerror, k = 1) myerror
0 0.006223449 NA
1 1.930568353 0.006223449
2 -0.413755454 1.930568353
3 0.900062120 -0.413755454
4 0.480381138 0.900062120
5 0.678532991 0.480381138
6 -1.053444316 0.678532991
7 0.195672432 -1.053444316
8 0.362571992 0.195672432
9 -0.880320162 0.362571992
10 -2.526283792 -0.880320162
11 1.612951644 -2.526283792
12 -1.068450931 1.612951644
13 -0.210164643 -1.068450931
14 0.840085835 -0.210164643
15 -0.729241828 0.840085835
16 1.366988014 -0.729241828
17 -0.627638937 1.366988014
18 0.616711203 -0.627638937
19 -0.157956632 0.616711203
20 -0.957899913 -0.157956632
21 -0.449750665 -0.957899913
22 -0.758234766 -0.449750665
23 -0.027406924 -0.758234766
24 2.535603905 -0.027406924
25 0.338277263 2.535603905
26 -0.412400309 0.338277263
27 -0.241780765 -0.412400309
28 -0.757111634 -0.241780765
29 0.604080025 -0.757111634
30 -0.138060781 0.604080025
31 0.547370296 -0.138060781
32 -0.552294851 0.547370296
33 -0.945139563 -0.552294851
34 -1.074185166 -0.945139563
35 -0.980913360 -1.074185166
36 -0.101757050 -0.980913360
37 -0.136602797 -0.101757050
38 -1.050976638 -0.136602797
39 0.124161768 -1.050976638
40 -0.429679521 0.124161768
41 3.541208967 -0.429679521
42 NA 3.541208967
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 1.93056835 0.006223449
[2,] -0.41375545 1.930568353
[3,] 0.90006212 -0.413755454
[4,] 0.48038114 0.900062120
[5,] 0.67853299 0.480381138
[6,] -1.05344432 0.678532991
[7,] 0.19567243 -1.053444316
[8,] 0.36257199 0.195672432
[9,] -0.88032016 0.362571992
[10,] -2.52628379 -0.880320162
[11,] 1.61295164 -2.526283792
[12,] -1.06845093 1.612951644
[13,] -0.21016464 -1.068450931
[14,] 0.84008584 -0.210164643
[15,] -0.72924183 0.840085835
[16,] 1.36698801 -0.729241828
[17,] -0.62763894 1.366988014
[18,] 0.61671120 -0.627638937
[19,] -0.15795663 0.616711203
[20,] -0.95789991 -0.157956632
[21,] -0.44975067 -0.957899913
[22,] -0.75823477 -0.449750665
[23,] -0.02740692 -0.758234766
[24,] 2.53560391 -0.027406924
[25,] 0.33827726 2.535603905
[26,] -0.41240031 0.338277263
[27,] -0.24178076 -0.412400309
[28,] -0.75711163 -0.241780765
[29,] 0.60408002 -0.757111634
[30,] -0.13806078 0.604080025
[31,] 0.54737030 -0.138060781
[32,] -0.55229485 0.547370296
[33,] -0.94513956 -0.552294851
[34,] -1.07418517 -0.945139563
[35,] -0.98091336 -1.074185166
[36,] -0.10175705 -0.980913360
[37,] -0.13660280 -0.101757050
[38,] -1.05097664 -0.136602797
[39,] 0.12416177 -1.050976638
[40,] -0.42967952 0.124161768
[41,] 3.54120897 -0.429679521
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 1.93056835 0.006223449
2 -0.41375545 1.930568353
3 0.90006212 -0.413755454
4 0.48038114 0.900062120
5 0.67853299 0.480381138
6 -1.05344432 0.678532991
7 0.19567243 -1.053444316
8 0.36257199 0.195672432
9 -0.88032016 0.362571992
10 -2.52628379 -0.880320162
11 1.61295164 -2.526283792
12 -1.06845093 1.612951644
13 -0.21016464 -1.068450931
14 0.84008584 -0.210164643
15 -0.72924183 0.840085835
16 1.36698801 -0.729241828
17 -0.62763894 1.366988014
18 0.61671120 -0.627638937
19 -0.15795663 0.616711203
20 -0.95789991 -0.157956632
21 -0.44975067 -0.957899913
22 -0.75823477 -0.449750665
23 -0.02740692 -0.758234766
24 2.53560391 -0.027406924
25 0.33827726 2.535603905
26 -0.41240031 0.338277263
27 -0.24178076 -0.412400309
28 -0.75711163 -0.241780765
29 0.60408002 -0.757111634
30 -0.13806078 0.604080025
31 0.54737030 -0.138060781
32 -0.55229485 0.547370296
33 -0.94513956 -0.552294851
34 -1.07418517 -0.945139563
35 -0.98091336 -1.074185166
36 -0.10175705 -0.980913360
37 -0.13660280 -0.101757050
38 -1.05097664 -0.136602797
39 0.12416177 -1.050976638
40 -0.42967952 0.124161768
41 3.54120897 -0.429679521
> 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/7bfo31292177301.ps",horizontal=F,onefile=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/8bfo31292177301.ps",horizontal=F,onefile=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/93o661292177301.ps",horizontal=F,onefile=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/103o661292177301.ps",horizontal=F,onefile=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/11ppmc1292177301.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/12spli1292177301.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/13hqic1292177301.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/1490zw1292177301.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/15d0gl1292177301.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/16rsvb1292177301.tab")
+ }
>
> try(system("convert tmp/1xn9u1292177301.ps tmp/1xn9u1292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/27xqx1292177301.ps tmp/27xqx1292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/37xqx1292177301.ps tmp/37xqx1292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/47xqx1292177301.ps tmp/47xqx1292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/57xqx1292177301.ps tmp/57xqx1292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/6i6pi1292177301.ps tmp/6i6pi1292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/7bfo31292177301.ps tmp/7bfo31292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/8bfo31292177301.ps tmp/8bfo31292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/93o661292177301.ps tmp/93o661292177301.png",intern=TRUE))
character(0)
> try(system("convert tmp/103o661292177301.ps tmp/103o661292177301.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
2.336 1.614 6.059