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(100,.309,2.99,83,.333,3.45,83,.317,2.99,83,.305,3.26,82,.314,3.26,71,.310,3.42,82,.317,3.39,86,.317,2.94,64,.311,3.77,66,.314,3.87,63,.312,3.84,67,.319,3.85,41,.309,3.55,65,.305,3.88,68,.298,3.68,90,.320,3.60,98,.323,3.11,108,.338,3.11,92,.338,3.84,100,.324,2.91,87,.310,3.29,91,.322,3.42,77,.317,3.56,72,.309,3.66,59,.305,4.05,55,.310,4.13,69,.327,3.88,71,.323,4.22,88,.329,3.95,88,.328,3.77,97,.361,4.27,94,.346,4.16,82,.323,4.07,75,.322,3.89,66,.314,4.48,71,.317,4.09,83,.322,3.76,97,.334,4.14,88,.342,4.26,89,.340,4.07,70,.335,4.45),dim=c(3,41),dimnames=list(c('WINS','OBP','ERA'),1:41))
> y <- array(NA,dim=c(3,41),dimnames=list(c('WINS','OBP','ERA'),1:41))
> 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
WINS OBP ERA
1 100 0.309 2.99
2 83 0.333 3.45
3 83 0.317 2.99
4 83 0.305 3.26
5 82 0.314 3.26
6 71 0.310 3.42
7 82 0.317 3.39
8 86 0.317 2.94
9 64 0.311 3.77
10 66 0.314 3.87
11 63 0.312 3.84
12 67 0.319 3.85
13 41 0.309 3.55
14 65 0.305 3.88
15 68 0.298 3.68
16 90 0.320 3.60
17 98 0.323 3.11
18 108 0.338 3.11
19 92 0.338 3.84
20 100 0.324 2.91
21 87 0.310 3.29
22 91 0.322 3.42
23 77 0.317 3.56
24 72 0.309 3.66
25 59 0.305 4.05
26 55 0.310 4.13
27 69 0.327 3.88
28 71 0.323 4.22
29 88 0.329 3.95
30 88 0.328 3.77
31 97 0.361 4.27
32 94 0.346 4.16
33 82 0.323 4.07
34 75 0.322 3.89
35 66 0.314 4.48
36 71 0.317 4.09
37 83 0.322 3.76
38 97 0.334 4.14
39 88 0.342 4.26
40 89 0.340 4.07
41 70 0.335 4.45
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) OBP ERA
-116.78 846.03 -20.31
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-31.5523 -5.0382 0.8016 4.6682 16.0759
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -116.784 32.987 -3.540 0.00107 **
OBP 846.035 108.653 7.787 2.18e-09 ***
ERA -20.307 3.312 -6.131 3.76e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 8.454 on 38 degrees of freedom
Multiple R-squared: 0.6634, Adjusted R-squared: 0.6457
F-statistic: 37.45 on 2 and 38 DF, p-value: 1.035e-09
> 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.62546900 0.749061991 0.374530995
[2,] 0.47440302 0.948806050 0.525596975
[3,] 0.40396295 0.807925909 0.596037046
[4,] 0.30215973 0.604319458 0.697840271
[5,] 0.20265475 0.405309501 0.797345249
[6,] 0.13416008 0.268320158 0.865839921
[7,] 0.08848578 0.176971569 0.911514215
[8,] 0.99559868 0.008802647 0.004401323
[9,] 0.99320546 0.013589075 0.006794538
[10,] 0.98891910 0.022161805 0.011080902
[11,] 0.99499138 0.010017242 0.005008621
[12,] 0.99234240 0.015315198 0.007657599
[13,] 0.98804426 0.023911480 0.011955740
[14,] 0.98261551 0.034768976 0.017384488
[15,] 0.96938027 0.061239454 0.030619727
[16,] 0.96270679 0.074586427 0.037293214
[17,] 0.94781586 0.104368289 0.052184145
[18,] 0.91851192 0.162976159 0.081488079
[19,] 0.87523158 0.249536840 0.124768420
[20,] 0.82112459 0.357750822 0.178875411
[21,] 0.83586166 0.328276678 0.164138339
[22,] 0.94820921 0.103581586 0.051790793
[23,] 0.92816300 0.143674002 0.071837001
[24,] 0.90425152 0.191496952 0.095748476
[25,] 0.84769599 0.304608017 0.152304008
[26,] 0.77881654 0.442366920 0.221183460
[27,] 0.67694961 0.646100774 0.323050387
[28,] 0.59894240 0.802115206 0.401057603
[29,] 0.52067897 0.958642050 0.479321025
[30,] 0.45167494 0.903349876 0.548325062
> postscript(file="/var/www/html/rcomp/tmp/1pmle1259930420.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/237nd1259930420.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/3klzr1259930420.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/4gd5v1259930420.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/5efd01259930420.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 = 41
Frequency = 1
1 2 3 4 5 6
16.07592526 -11.88785146 -7.69235359 7.94286068 -0.67145303 -5.03824931
7 8 9 10 11 12
-0.56969286 -5.70768618 -5.77695603 -4.28439542 -6.20152526 -7.92070274
13 14 15 16 17 18
-31.55234972 2.53298481 7.39389844 9.15659945 4.66823549 1.97771264
19 20 21 22 23 24
0.80156847 1.76087027 8.32188595 4.80933241 -2.11756205 1.68138198
25 26 27 28 29 30
-0.01488438 -6.62052652 -12.07978204 0.20861901 6.64961388 3.84045141
31 32 33 34 35 36
-4.92537296 2.53141819 8.16262124 -1.64654124 8.10266219 2.64496341
37 38 39 40 41
3.71359403 15.27770344 1.94622280 0.78002867 -6.27326935
> postscript(file="/var/www/html/rcomp/tmp/6prr51259930420.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 = 41
Frequency = 1
lag(myerror, k = 1) myerror
0 16.07592526 NA
1 -11.88785146 16.07592526
2 -7.69235359 -11.88785146
3 7.94286068 -7.69235359
4 -0.67145303 7.94286068
5 -5.03824931 -0.67145303
6 -0.56969286 -5.03824931
7 -5.70768618 -0.56969286
8 -5.77695603 -5.70768618
9 -4.28439542 -5.77695603
10 -6.20152526 -4.28439542
11 -7.92070274 -6.20152526
12 -31.55234972 -7.92070274
13 2.53298481 -31.55234972
14 7.39389844 2.53298481
15 9.15659945 7.39389844
16 4.66823549 9.15659945
17 1.97771264 4.66823549
18 0.80156847 1.97771264
19 1.76087027 0.80156847
20 8.32188595 1.76087027
21 4.80933241 8.32188595
22 -2.11756205 4.80933241
23 1.68138198 -2.11756205
24 -0.01488438 1.68138198
25 -6.62052652 -0.01488438
26 -12.07978204 -6.62052652
27 0.20861901 -12.07978204
28 6.64961388 0.20861901
29 3.84045141 6.64961388
30 -4.92537296 3.84045141
31 2.53141819 -4.92537296
32 8.16262124 2.53141819
33 -1.64654124 8.16262124
34 8.10266219 -1.64654124
35 2.64496341 8.10266219
36 3.71359403 2.64496341
37 15.27770344 3.71359403
38 1.94622280 15.27770344
39 0.78002867 1.94622280
40 -6.27326935 0.78002867
41 NA -6.27326935
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -11.88785146 16.07592526
[2,] -7.69235359 -11.88785146
[3,] 7.94286068 -7.69235359
[4,] -0.67145303 7.94286068
[5,] -5.03824931 -0.67145303
[6,] -0.56969286 -5.03824931
[7,] -5.70768618 -0.56969286
[8,] -5.77695603 -5.70768618
[9,] -4.28439542 -5.77695603
[10,] -6.20152526 -4.28439542
[11,] -7.92070274 -6.20152526
[12,] -31.55234972 -7.92070274
[13,] 2.53298481 -31.55234972
[14,] 7.39389844 2.53298481
[15,] 9.15659945 7.39389844
[16,] 4.66823549 9.15659945
[17,] 1.97771264 4.66823549
[18,] 0.80156847 1.97771264
[19,] 1.76087027 0.80156847
[20,] 8.32188595 1.76087027
[21,] 4.80933241 8.32188595
[22,] -2.11756205 4.80933241
[23,] 1.68138198 -2.11756205
[24,] -0.01488438 1.68138198
[25,] -6.62052652 -0.01488438
[26,] -12.07978204 -6.62052652
[27,] 0.20861901 -12.07978204
[28,] 6.64961388 0.20861901
[29,] 3.84045141 6.64961388
[30,] -4.92537296 3.84045141
[31,] 2.53141819 -4.92537296
[32,] 8.16262124 2.53141819
[33,] -1.64654124 8.16262124
[34,] 8.10266219 -1.64654124
[35,] 2.64496341 8.10266219
[36,] 3.71359403 2.64496341
[37,] 15.27770344 3.71359403
[38,] 1.94622280 15.27770344
[39,] 0.78002867 1.94622280
[40,] -6.27326935 0.78002867
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -11.88785146 16.07592526
2 -7.69235359 -11.88785146
3 7.94286068 -7.69235359
4 -0.67145303 7.94286068
5 -5.03824931 -0.67145303
6 -0.56969286 -5.03824931
7 -5.70768618 -0.56969286
8 -5.77695603 -5.70768618
9 -4.28439542 -5.77695603
10 -6.20152526 -4.28439542
11 -7.92070274 -6.20152526
12 -31.55234972 -7.92070274
13 2.53298481 -31.55234972
14 7.39389844 2.53298481
15 9.15659945 7.39389844
16 4.66823549 9.15659945
17 1.97771264 4.66823549
18 0.80156847 1.97771264
19 1.76087027 0.80156847
20 8.32188595 1.76087027
21 4.80933241 8.32188595
22 -2.11756205 4.80933241
23 1.68138198 -2.11756205
24 -0.01488438 1.68138198
25 -6.62052652 -0.01488438
26 -12.07978204 -6.62052652
27 0.20861901 -12.07978204
28 6.64961388 0.20861901
29 3.84045141 6.64961388
30 -4.92537296 3.84045141
31 2.53141819 -4.92537296
32 8.16262124 2.53141819
33 -1.64654124 8.16262124
34 8.10266219 -1.64654124
35 2.64496341 8.10266219
36 3.71359403 2.64496341
37 15.27770344 3.71359403
38 1.94622280 15.27770344
39 0.78002867 1.94622280
40 -6.27326935 0.78002867
> 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/7vfxb1259930420.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/8kp7f1259930420.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/9hfwh1259930420.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/10j6c71259930420.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/112b5c1259930420.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/12l6dn1259930420.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/13nntx1259930420.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/14xu0v1259930420.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/15qoim1259930420.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/16qy341259930420.tab")
+ }
>
> system("convert tmp/1pmle1259930420.ps tmp/1pmle1259930420.png")
> system("convert tmp/237nd1259930420.ps tmp/237nd1259930420.png")
> system("convert tmp/3klzr1259930420.ps tmp/3klzr1259930420.png")
> system("convert tmp/4gd5v1259930420.ps tmp/4gd5v1259930420.png")
> system("convert tmp/5efd01259930420.ps tmp/5efd01259930420.png")
> system("convert tmp/6prr51259930420.ps tmp/6prr51259930420.png")
> system("convert tmp/7vfxb1259930420.ps tmp/7vfxb1259930420.png")
> system("convert tmp/8kp7f1259930420.ps tmp/8kp7f1259930420.png")
> system("convert tmp/9hfwh1259930420.ps tmp/9hfwh1259930420.png")
> system("convert tmp/10j6c71259930420.ps tmp/10j6c71259930420.png")
>
>
> proc.time()
user system elapsed
2.288 1.557 3.467