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(32.68
+ ,10967.87
+ ,0
+ ,31.54
+ ,10433.56
+ ,0
+ ,32.43
+ ,10665.78
+ ,0
+ ,26.54
+ ,10666.71
+ ,0
+ ,25.85
+ ,10682.74
+ ,0
+ ,27.6
+ ,10777.22
+ ,0
+ ,25.71
+ ,10052.6
+ ,0
+ ,25.38
+ ,10213.97
+ ,0
+ ,28.57
+ ,10546.82
+ ,0
+ ,27.64
+ ,10767.2
+ ,0
+ ,25.36
+ ,10444.5
+ ,0
+ ,25.9
+ ,10314.68
+ ,0
+ ,26.29
+ ,9042.56
+ ,0
+ ,21.74
+ ,9220.75
+ ,0
+ ,19.2
+ ,9721.84
+ ,0
+ ,19.32
+ ,9978.53
+ ,0
+ ,19.82
+ ,9923.81
+ ,0
+ ,20.36
+ ,9892.56
+ ,0
+ ,24.31
+ ,10500.98
+ ,0
+ ,25.97
+ ,10179.35
+ ,0
+ ,25.61
+ ,10080.48
+ ,0
+ ,24.67
+ ,9492.44
+ ,0
+ ,25.59
+ ,8616.49
+ ,0
+ ,26.09
+ ,8685.4
+ ,0
+ ,28.37
+ ,8160.67
+ ,0
+ ,27.34
+ ,8048.1
+ ,0
+ ,24.46
+ ,8641.21
+ ,0
+ ,27.46
+ ,8526.63
+ ,0
+ ,30.23
+ ,8474.21
+ ,0
+ ,32.33
+ ,7916.13
+ ,0
+ ,29.87
+ ,7977.64
+ ,0
+ ,24.87
+ ,8334.59
+ ,0
+ ,25.48
+ ,8623.36
+ ,0
+ ,27.28
+ ,9098.03
+ ,0
+ ,28.24
+ ,9154.34
+ ,0
+ ,29.58
+ ,9284.73
+ ,0
+ ,26.95
+ ,9492.49
+ ,0
+ ,29.08
+ ,9682.35
+ ,0
+ ,28.76
+ ,9762.12
+ ,0
+ ,29.59
+ ,10124.63
+ ,0
+ ,30.7
+ ,10540.05
+ ,0
+ ,30.52
+ ,10601.61
+ ,0
+ ,32.67
+ ,10323.73
+ ,0
+ ,33.19
+ ,10418.4
+ ,0
+ ,37.13
+ ,10092.96
+ ,0
+ ,35.54
+ ,10364.91
+ ,0
+ ,37.75
+ ,10152.09
+ ,0
+ ,41.84
+ ,10032.8
+ ,0
+ ,42.94
+ ,10204.59
+ ,0
+ ,49.14
+ ,10001.6
+ ,0
+ ,44.61
+ ,10411.75
+ ,0
+ ,40.22
+ ,10673.38
+ ,0
+ ,44.23
+ ,10539.51
+ ,0
+ ,45.85
+ ,10723.78
+ ,0
+ ,53.38
+ ,10682.06
+ ,0
+ ,53.26
+ ,10283.19
+ ,0
+ ,51.8
+ ,10377.18
+ ,0
+ ,55.3
+ ,10486.64
+ ,0
+ ,57.81
+ ,10545.38
+ ,0
+ ,63.96
+ ,10554.27
+ ,0
+ ,63.77
+ ,10532.54
+ ,0
+ ,59.15
+ ,10324.31
+ ,0
+ ,56.12
+ ,10695.25
+ ,0
+ ,57.42
+ ,10827.81
+ ,0
+ ,63.52
+ ,10872.48
+ ,0
+ ,61.71
+ ,10971.19
+ ,0
+ ,63.01
+ ,11145.65
+ ,0
+ ,68.18
+ ,11234.68
+ ,0
+ ,72.03
+ ,11333.88
+ ,0
+ ,69.75
+ ,10997.97
+ ,0
+ ,74.41
+ ,11036.89
+ ,0
+ ,74.33
+ ,11257.35
+ ,0
+ ,64.24
+ ,11533.59
+ ,0
+ ,60.03
+ ,11963.12
+ ,0
+ ,59.44
+ ,12185.15
+ ,0
+ ,62.5
+ ,12377.62
+ ,0
+ ,55.04
+ ,12512.89
+ ,0
+ ,58.34
+ ,12631.48
+ ,0
+ ,61.92
+ ,12268.53
+ ,0
+ ,67.65
+ ,12754.8
+ ,0
+ ,67.68
+ ,13407.75
+ ,0
+ ,70.3
+ ,13480.21
+ ,0
+ ,75.26
+ ,13673.28
+ ,1
+ ,71.44
+ ,13239.71
+ ,1
+ ,76.36
+ ,13557.69
+ ,1
+ ,81.71
+ ,13901.28
+ ,1
+ ,92.6
+ ,13200.58
+ ,1
+ ,90.6
+ ,13406.97
+ ,1
+ ,92.23
+ ,12538.12
+ ,1
+ ,94.09
+ ,12419.57
+ ,1
+ ,102.79
+ ,12193.88
+ ,1
+ ,109.65
+ ,12656.63
+ ,1
+ ,124.05
+ ,12812.48
+ ,1
+ ,132.69
+ ,12056.67
+ ,1
+ ,135.81
+ ,11322.38
+ ,1
+ ,116.07
+ ,11530.75
+ ,1
+ ,101.42
+ ,11114.08
+ ,1
+ ,75.73
+ ,9181.73
+ ,1
+ ,55.48
+ ,8614.55
+ ,1)
+ ,dim=c(3
+ ,99)
+ ,dimnames=list(c('Olieprijs'
+ ,'DowJones'
+ ,'Dummy(kredietcrisis)')
+ ,1:99))
> y <- array(NA,dim=c(3,99),dimnames=list(c('Olieprijs','DowJones','Dummy(kredietcrisis)'),1:99))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'Linear Trend'
> par2 = 'Include Monthly 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
Olieprijs DowJones Dummy(kredietcrisis) M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 32.68 10967.87 0 1 0 0 0 0 0 0 0 0 0 0
2 31.54 10433.56 0 0 1 0 0 0 0 0 0 0 0 0
3 32.43 10665.78 0 0 0 1 0 0 0 0 0 0 0 0
4 26.54 10666.71 0 0 0 0 1 0 0 0 0 0 0 0
5 25.85 10682.74 0 0 0 0 0 1 0 0 0 0 0 0
6 27.60 10777.22 0 0 0 0 0 0 1 0 0 0 0 0
7 25.71 10052.60 0 0 0 0 0 0 0 1 0 0 0 0
8 25.38 10213.97 0 0 0 0 0 0 0 0 1 0 0 0
9 28.57 10546.82 0 0 0 0 0 0 0 0 0 1 0 0
10 27.64 10767.20 0 0 0 0 0 0 0 0 0 0 1 0
11 25.36 10444.50 0 0 0 0 0 0 0 0 0 0 0 1
12 25.90 10314.68 0 0 0 0 0 0 0 0 0 0 0 0
13 26.29 9042.56 0 1 0 0 0 0 0 0 0 0 0 0
14 21.74 9220.75 0 0 1 0 0 0 0 0 0 0 0 0
15 19.20 9721.84 0 0 0 1 0 0 0 0 0 0 0 0
16 19.32 9978.53 0 0 0 0 1 0 0 0 0 0 0 0
17 19.82 9923.81 0 0 0 0 0 1 0 0 0 0 0 0
18 20.36 9892.56 0 0 0 0 0 0 1 0 0 0 0 0
19 24.31 10500.98 0 0 0 0 0 0 0 1 0 0 0 0
20 25.97 10179.35 0 0 0 0 0 0 0 0 1 0 0 0
21 25.61 10080.48 0 0 0 0 0 0 0 0 0 1 0 0
22 24.67 9492.44 0 0 0 0 0 0 0 0 0 0 1 0
23 25.59 8616.49 0 0 0 0 0 0 0 0 0 0 0 1
24 26.09 8685.40 0 0 0 0 0 0 0 0 0 0 0 0
25 28.37 8160.67 0 1 0 0 0 0 0 0 0 0 0 0
26 27.34 8048.10 0 0 1 0 0 0 0 0 0 0 0 0
27 24.46 8641.21 0 0 0 1 0 0 0 0 0 0 0 0
28 27.46 8526.63 0 0 0 0 1 0 0 0 0 0 0 0
29 30.23 8474.21 0 0 0 0 0 1 0 0 0 0 0 0
30 32.33 7916.13 0 0 0 0 0 0 1 0 0 0 0 0
31 29.87 7977.64 0 0 0 0 0 0 0 1 0 0 0 0
32 24.87 8334.59 0 0 0 0 0 0 0 0 1 0 0 0
33 25.48 8623.36 0 0 0 0 0 0 0 0 0 1 0 0
34 27.28 9098.03 0 0 0 0 0 0 0 0 0 0 1 0
35 28.24 9154.34 0 0 0 0 0 0 0 0 0 0 0 1
36 29.58 9284.73 0 0 0 0 0 0 0 0 0 0 0 0
37 26.95 9492.49 0 1 0 0 0 0 0 0 0 0 0 0
38 29.08 9682.35 0 0 1 0 0 0 0 0 0 0 0 0
39 28.76 9762.12 0 0 0 1 0 0 0 0 0 0 0 0
40 29.59 10124.63 0 0 0 0 1 0 0 0 0 0 0 0
41 30.70 10540.05 0 0 0 0 0 1 0 0 0 0 0 0
42 30.52 10601.61 0 0 0 0 0 0 1 0 0 0 0 0
43 32.67 10323.73 0 0 0 0 0 0 0 1 0 0 0 0
44 33.19 10418.40 0 0 0 0 0 0 0 0 1 0 0 0
45 37.13 10092.96 0 0 0 0 0 0 0 0 0 1 0 0
46 35.54 10364.91 0 0 0 0 0 0 0 0 0 0 1 0
47 37.75 10152.09 0 0 0 0 0 0 0 0 0 0 0 1
48 41.84 10032.80 0 0 0 0 0 0 0 0 0 0 0 0
49 42.94 10204.59 0 1 0 0 0 0 0 0 0 0 0 0
50 49.14 10001.60 0 0 1 0 0 0 0 0 0 0 0 0
51 44.61 10411.75 0 0 0 1 0 0 0 0 0 0 0 0
52 40.22 10673.38 0 0 0 0 1 0 0 0 0 0 0 0
53 44.23 10539.51 0 0 0 0 0 1 0 0 0 0 0 0
54 45.85 10723.78 0 0 0 0 0 0 1 0 0 0 0 0
55 53.38 10682.06 0 0 0 0 0 0 0 1 0 0 0 0
56 53.26 10283.19 0 0 0 0 0 0 0 0 1 0 0 0
57 51.80 10377.18 0 0 0 0 0 0 0 0 0 1 0 0
58 55.30 10486.64 0 0 0 0 0 0 0 0 0 0 1 0
59 57.81 10545.38 0 0 0 0 0 0 0 0 0 0 0 1
60 63.96 10554.27 0 0 0 0 0 0 0 0 0 0 0 0
61 63.77 10532.54 0 1 0 0 0 0 0 0 0 0 0 0
62 59.15 10324.31 0 0 1 0 0 0 0 0 0 0 0 0
63 56.12 10695.25 0 0 0 1 0 0 0 0 0 0 0 0
64 57.42 10827.81 0 0 0 0 1 0 0 0 0 0 0 0
65 63.52 10872.48 0 0 0 0 0 1 0 0 0 0 0 0
66 61.71 10971.19 0 0 0 0 0 0 1 0 0 0 0 0
67 63.01 11145.65 0 0 0 0 0 0 0 1 0 0 0 0
68 68.18 11234.68 0 0 0 0 0 0 0 0 1 0 0 0
69 72.03 11333.88 0 0 0 0 0 0 0 0 0 1 0 0
70 69.75 10997.97 0 0 0 0 0 0 0 0 0 0 1 0
71 74.41 11036.89 0 0 0 0 0 0 0 0 0 0 0 1
72 74.33 11257.35 0 0 0 0 0 0 0 0 0 0 0 0
73 64.24 11533.59 0 1 0 0 0 0 0 0 0 0 0 0
74 60.03 11963.12 0 0 1 0 0 0 0 0 0 0 0 0
75 59.44 12185.15 0 0 0 1 0 0 0 0 0 0 0 0
76 62.50 12377.62 0 0 0 0 1 0 0 0 0 0 0 0
77 55.04 12512.89 0 0 0 0 0 1 0 0 0 0 0 0
78 58.34 12631.48 0 0 0 0 0 0 1 0 0 0 0 0
79 61.92 12268.53 0 0 0 0 0 0 0 1 0 0 0 0
80 67.65 12754.80 0 0 0 0 0 0 0 0 1 0 0 0
81 67.68 13407.75 0 0 0 0 0 0 0 0 0 1 0 0
82 70.30 13480.21 0 0 0 0 0 0 0 0 0 0 1 0
83 75.26 13673.28 1 0 0 0 0 0 0 0 0 0 0 1
84 71.44 13239.71 1 0 0 0 0 0 0 0 0 0 0 0
85 76.36 13557.69 1 1 0 0 0 0 0 0 0 0 0 0
86 81.71 13901.28 1 0 1 0 0 0 0 0 0 0 0 0
87 92.60 13200.58 1 0 0 1 0 0 0 0 0 0 0 0
88 90.60 13406.97 1 0 0 0 1 0 0 0 0 0 0 0
89 92.23 12538.12 1 0 0 0 0 1 0 0 0 0 0 0
90 94.09 12419.57 1 0 0 0 0 0 1 0 0 0 0 0
91 102.79 12193.88 1 0 0 0 0 0 0 1 0 0 0 0
92 109.65 12656.63 1 0 0 0 0 0 0 0 1 0 0 0
93 124.05 12812.48 1 0 0 0 0 0 0 0 0 1 0 0
94 132.69 12056.67 1 0 0 0 0 0 0 0 0 0 1 0
95 135.81 11322.38 1 0 0 0 0 0 0 0 0 0 0 1
96 116.07 11530.75 1 0 0 0 0 0 0 0 0 0 0 0
97 101.42 11114.08 1 1 0 0 0 0 0 0 0 0 0 0
98 75.73 9181.73 1 0 1 0 0 0 0 0 0 0 0 0
99 55.48 8614.55 1 0 0 1 0 0 0 0 0 0 0 0
t
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
50 50
51 51
52 52
53 53
54 54
55 55
56 56
57 57
58 58
59 59
60 60
61 61
62 62
63 63
64 64
65 65
66 66
67 67
68 68
69 69
70 70
71 71
72 72
73 73
74 74
75 75
76 76
77 77
78 78
79 79
80 80
81 81
82 82
83 83
84 84
85 85
86 86
87 87
88 88
89 89
90 90
91 91
92 92
93 93
94 94
95 95
96 96
97 97
98 98
99 99
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) DowJones `Dummy(kredietcrisis)`
-11.45403 0.00305 21.81492
M1 M2 M3
-1.03364 -4.02079 -7.44361
M4 M5 M6
-5.44688 -4.81219 -4.15899
M7 M8 M9
-1.55249 -0.64758 1.36864
M10 M11 t
2.37192 1.91168 0.55159
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-28.3170 -6.2743 -0.2689 6.2647 36.6057
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -11.454026 10.479944 -1.093 0.27754
DowJones 0.003050 0.001051 2.901 0.00475 **
`Dummy(kredietcrisis)` 21.814920 3.952547 5.519 3.71e-07 ***
M1 -1.033640 5.316734 -0.194 0.84632
M2 -4.020791 5.318398 -0.756 0.45175
M3 -7.443615 5.314612 -1.401 0.16502
M4 -5.446881 5.505062 -0.989 0.32529
M5 -4.812189 5.496302 -0.876 0.38378
M6 -4.158990 5.492622 -0.757 0.45105
M7 -1.552493 5.485305 -0.283 0.77785
M8 -0.647575 5.491312 -0.118 0.90641
M9 1.368635 5.502356 0.249 0.80417
M10 2.371917 5.496506 0.432 0.66719
M11 1.911681 5.467013 0.350 0.72746
t 0.551587 0.058264 9.467 6.82e-15 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 10.93 on 84 degrees of freedom
Multiple R-squared: 0.8635, Adjusted R-squared: 0.8408
F-statistic: 37.96 on 14 and 84 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,] 1.528241e-02 3.056481e-02 0.9847176
[2,] 6.146415e-03 1.229283e-02 0.9938536
[3,] 2.875303e-03 5.750606e-03 0.9971247
[4,] 7.338861e-04 1.467772e-03 0.9992661
[5,] 3.393310e-04 6.786621e-04 0.9996607
[6,] 4.356374e-04 8.712748e-04 0.9995644
[7,] 2.433711e-04 4.867421e-04 0.9997566
[8,] 1.511191e-04 3.022382e-04 0.9998489
[9,] 1.086021e-04 2.172042e-04 0.9998914
[10,] 4.344605e-05 8.689210e-05 0.9999566
[11,] 5.623740e-05 1.124748e-04 0.9999438
[12,] 1.025251e-04 2.050502e-04 0.9998975
[13,] 1.122700e-04 2.245399e-04 0.9998877
[14,] 5.189692e-05 1.037938e-04 0.9999481
[15,] 1.852943e-05 3.705885e-05 0.9999815
[16,] 6.636308e-06 1.327262e-05 0.9999934
[17,] 2.844762e-06 5.689524e-06 0.9999972
[18,] 1.674650e-06 3.349301e-06 0.9999983
[19,] 8.565713e-07 1.713143e-06 0.9999991
[20,] 2.813970e-07 5.627939e-07 0.9999997
[21,] 1.113071e-07 2.226141e-07 0.9999999
[22,] 4.535237e-08 9.070474e-08 1.0000000
[23,] 1.992355e-08 3.984710e-08 1.0000000
[24,] 7.577319e-09 1.515464e-08 1.0000000
[25,] 2.287237e-09 4.574473e-09 1.0000000
[26,] 8.605437e-10 1.721087e-09 1.0000000
[27,] 4.381293e-10 8.762587e-10 1.0000000
[28,] 4.584199e-10 9.168399e-10 1.0000000
[29,] 3.599420e-10 7.198839e-10 1.0000000
[30,] 3.806813e-10 7.613626e-10 1.0000000
[31,] 6.513570e-10 1.302714e-09 1.0000000
[32,] 4.582148e-10 9.164297e-10 1.0000000
[33,] 2.954588e-09 5.909176e-09 1.0000000
[34,] 3.288794e-09 6.577588e-09 1.0000000
[35,] 1.439073e-09 2.878147e-09 1.0000000
[36,] 9.526527e-10 1.905305e-09 1.0000000
[37,] 5.323484e-10 1.064697e-09 1.0000000
[38,] 1.279850e-09 2.559701e-09 1.0000000
[39,] 4.084116e-09 8.168232e-09 1.0000000
[40,] 6.294338e-09 1.258868e-08 1.0000000
[41,] 2.206697e-08 4.413394e-08 1.0000000
[42,] 4.726511e-08 9.453022e-08 1.0000000
[43,] 1.301782e-07 2.603564e-07 0.9999999
[44,] 1.495389e-07 2.990779e-07 0.9999999
[45,] 1.036927e-07 2.073855e-07 0.9999999
[46,] 7.373186e-08 1.474637e-07 0.9999999
[47,] 4.088034e-08 8.176069e-08 1.0000000
[48,] 4.690830e-08 9.381661e-08 1.0000000
[49,] 2.813872e-08 5.627744e-08 1.0000000
[50,] 1.255184e-08 2.510367e-08 1.0000000
[51,] 8.627264e-09 1.725453e-08 1.0000000
[52,] 6.989530e-09 1.397906e-08 1.0000000
[53,] 5.200941e-09 1.040188e-08 1.0000000
[54,] 4.262422e-09 8.524843e-09 1.0000000
[55,] 4.875527e-09 9.751055e-09 1.0000000
[56,] 7.928601e-09 1.585720e-08 1.0000000
[57,] 1.161545e-07 2.323090e-07 0.9999999
[58,] 5.532355e-06 1.106471e-05 0.9999945
[59,] 8.083218e-05 1.616644e-04 0.9999192
[60,] 1.500857e-04 3.001714e-04 0.9998499
[61,] 2.371974e-04 4.743948e-04 0.9997628
[62,] 4.654230e-04 9.308459e-04 0.9995346
[63,] 4.563980e-03 9.127960e-03 0.9954360
[64,] 6.943132e-03 1.388626e-02 0.9930569
> postscript(file="/var/www/html/freestat/rcomp/tmp/12zfm1229554134.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/freestat/rcomp/tmp/2ybah1229554134.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/freestat/rcomp/tmp/3vvd91229554134.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/freestat/rcomp/tmp/4plah1229554134.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/freestat/rcomp/tmp/5spw71229554134.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 = 99
Frequency = 1
1 2 3 4 5 6
11.1663228 14.0914227 17.1444357 8.7032781 6.7781110 7.0351798
7 8 9 10 11 12
4.1970383 1.9183874 1.5254655 -1.6315175 -3.0186995 -0.7226818
13 14 15 16 17 18
4.0290763 1.3711971 0.1742117 -3.0369614 -3.5563555 -4.1258360
19 20 21 22 23 24
-5.1894763 -4.0050762 -6.6313405 -7.3328082 -3.8326911 -2.1827592
25 26 27 28 29 30
2.1796125 3.9284919 2.1108643 2.9119886 4.6555799 7.2528230
31 32 33 34 35 36
1.4471461 -6.0979837 -8.9364706 -10.1389860 -9.4420709 -7.1396404
37 38 39 40 41 42
-9.9212131 -5.9346833 -3.6267291 -6.4506315 -7.7938563 -9.3663883
43 44 45 46 47 48
-9.5269952 -10.7522248 -8.3874971 -12.3617580 -9.5940515 -3.7801482
49 50 51 52 53 54
-2.7220197 6.5326220 3.6229850 -4.1132541 -0.8812570 -1.0280293
55 56 57 58 59 60
3.4711242 3.1110905 -1.2033573 0.4079429 2.6474470 10.1304277
61 62 63 64 65 66
10.4887524 8.9393751 7.6493205 5.9967185 10.7742052 7.4583734
67 68 69 70 71 72
5.0682221 8.5101934 9.4898561 6.6794437 11.1293947 11.7371302
73 74 75 76 77 78
1.2867075 -1.7977071 -0.1936167 -0.2689320 -9.3277567 -7.5942185
79 80 81 82 83 84
-6.0653793 -3.2749087 -7.8040700 -6.9599273 -24.4950223 -25.6326293
85 86 87 88 89 90
-21.2003505 -14.4626657 1.4355622 -3.7422063 -0.6486707 0.3680959
91 92 93 94 95 96
6.5983202 10.5905220 21.9474139 31.3376104 36.6056935 17.5903010
97 98 99
4.6931118 -12.6680527 -28.3170335
> postscript(file="/var/www/html/freestat/rcomp/tmp/644281229554134.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 = 99
Frequency = 1
lag(myerror, k = 1) myerror
0 11.1663228 NA
1 14.0914227 11.1663228
2 17.1444357 14.0914227
3 8.7032781 17.1444357
4 6.7781110 8.7032781
5 7.0351798 6.7781110
6 4.1970383 7.0351798
7 1.9183874 4.1970383
8 1.5254655 1.9183874
9 -1.6315175 1.5254655
10 -3.0186995 -1.6315175
11 -0.7226818 -3.0186995
12 4.0290763 -0.7226818
13 1.3711971 4.0290763
14 0.1742117 1.3711971
15 -3.0369614 0.1742117
16 -3.5563555 -3.0369614
17 -4.1258360 -3.5563555
18 -5.1894763 -4.1258360
19 -4.0050762 -5.1894763
20 -6.6313405 -4.0050762
21 -7.3328082 -6.6313405
22 -3.8326911 -7.3328082
23 -2.1827592 -3.8326911
24 2.1796125 -2.1827592
25 3.9284919 2.1796125
26 2.1108643 3.9284919
27 2.9119886 2.1108643
28 4.6555799 2.9119886
29 7.2528230 4.6555799
30 1.4471461 7.2528230
31 -6.0979837 1.4471461
32 -8.9364706 -6.0979837
33 -10.1389860 -8.9364706
34 -9.4420709 -10.1389860
35 -7.1396404 -9.4420709
36 -9.9212131 -7.1396404
37 -5.9346833 -9.9212131
38 -3.6267291 -5.9346833
39 -6.4506315 -3.6267291
40 -7.7938563 -6.4506315
41 -9.3663883 -7.7938563
42 -9.5269952 -9.3663883
43 -10.7522248 -9.5269952
44 -8.3874971 -10.7522248
45 -12.3617580 -8.3874971
46 -9.5940515 -12.3617580
47 -3.7801482 -9.5940515
48 -2.7220197 -3.7801482
49 6.5326220 -2.7220197
50 3.6229850 6.5326220
51 -4.1132541 3.6229850
52 -0.8812570 -4.1132541
53 -1.0280293 -0.8812570
54 3.4711242 -1.0280293
55 3.1110905 3.4711242
56 -1.2033573 3.1110905
57 0.4079429 -1.2033573
58 2.6474470 0.4079429
59 10.1304277 2.6474470
60 10.4887524 10.1304277
61 8.9393751 10.4887524
62 7.6493205 8.9393751
63 5.9967185 7.6493205
64 10.7742052 5.9967185
65 7.4583734 10.7742052
66 5.0682221 7.4583734
67 8.5101934 5.0682221
68 9.4898561 8.5101934
69 6.6794437 9.4898561
70 11.1293947 6.6794437
71 11.7371302 11.1293947
72 1.2867075 11.7371302
73 -1.7977071 1.2867075
74 -0.1936167 -1.7977071
75 -0.2689320 -0.1936167
76 -9.3277567 -0.2689320
77 -7.5942185 -9.3277567
78 -6.0653793 -7.5942185
79 -3.2749087 -6.0653793
80 -7.8040700 -3.2749087
81 -6.9599273 -7.8040700
82 -24.4950223 -6.9599273
83 -25.6326293 -24.4950223
84 -21.2003505 -25.6326293
85 -14.4626657 -21.2003505
86 1.4355622 -14.4626657
87 -3.7422063 1.4355622
88 -0.6486707 -3.7422063
89 0.3680959 -0.6486707
90 6.5983202 0.3680959
91 10.5905220 6.5983202
92 21.9474139 10.5905220
93 31.3376104 21.9474139
94 36.6056935 31.3376104
95 17.5903010 36.6056935
96 4.6931118 17.5903010
97 -12.6680527 4.6931118
98 -28.3170335 -12.6680527
99 NA -28.3170335
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 14.0914227 11.1663228
[2,] 17.1444357 14.0914227
[3,] 8.7032781 17.1444357
[4,] 6.7781110 8.7032781
[5,] 7.0351798 6.7781110
[6,] 4.1970383 7.0351798
[7,] 1.9183874 4.1970383
[8,] 1.5254655 1.9183874
[9,] -1.6315175 1.5254655
[10,] -3.0186995 -1.6315175
[11,] -0.7226818 -3.0186995
[12,] 4.0290763 -0.7226818
[13,] 1.3711971 4.0290763
[14,] 0.1742117 1.3711971
[15,] -3.0369614 0.1742117
[16,] -3.5563555 -3.0369614
[17,] -4.1258360 -3.5563555
[18,] -5.1894763 -4.1258360
[19,] -4.0050762 -5.1894763
[20,] -6.6313405 -4.0050762
[21,] -7.3328082 -6.6313405
[22,] -3.8326911 -7.3328082
[23,] -2.1827592 -3.8326911
[24,] 2.1796125 -2.1827592
[25,] 3.9284919 2.1796125
[26,] 2.1108643 3.9284919
[27,] 2.9119886 2.1108643
[28,] 4.6555799 2.9119886
[29,] 7.2528230 4.6555799
[30,] 1.4471461 7.2528230
[31,] -6.0979837 1.4471461
[32,] -8.9364706 -6.0979837
[33,] -10.1389860 -8.9364706
[34,] -9.4420709 -10.1389860
[35,] -7.1396404 -9.4420709
[36,] -9.9212131 -7.1396404
[37,] -5.9346833 -9.9212131
[38,] -3.6267291 -5.9346833
[39,] -6.4506315 -3.6267291
[40,] -7.7938563 -6.4506315
[41,] -9.3663883 -7.7938563
[42,] -9.5269952 -9.3663883
[43,] -10.7522248 -9.5269952
[44,] -8.3874971 -10.7522248
[45,] -12.3617580 -8.3874971
[46,] -9.5940515 -12.3617580
[47,] -3.7801482 -9.5940515
[48,] -2.7220197 -3.7801482
[49,] 6.5326220 -2.7220197
[50,] 3.6229850 6.5326220
[51,] -4.1132541 3.6229850
[52,] -0.8812570 -4.1132541
[53,] -1.0280293 -0.8812570
[54,] 3.4711242 -1.0280293
[55,] 3.1110905 3.4711242
[56,] -1.2033573 3.1110905
[57,] 0.4079429 -1.2033573
[58,] 2.6474470 0.4079429
[59,] 10.1304277 2.6474470
[60,] 10.4887524 10.1304277
[61,] 8.9393751 10.4887524
[62,] 7.6493205 8.9393751
[63,] 5.9967185 7.6493205
[64,] 10.7742052 5.9967185
[65,] 7.4583734 10.7742052
[66,] 5.0682221 7.4583734
[67,] 8.5101934 5.0682221
[68,] 9.4898561 8.5101934
[69,] 6.6794437 9.4898561
[70,] 11.1293947 6.6794437
[71,] 11.7371302 11.1293947
[72,] 1.2867075 11.7371302
[73,] -1.7977071 1.2867075
[74,] -0.1936167 -1.7977071
[75,] -0.2689320 -0.1936167
[76,] -9.3277567 -0.2689320
[77,] -7.5942185 -9.3277567
[78,] -6.0653793 -7.5942185
[79,] -3.2749087 -6.0653793
[80,] -7.8040700 -3.2749087
[81,] -6.9599273 -7.8040700
[82,] -24.4950223 -6.9599273
[83,] -25.6326293 -24.4950223
[84,] -21.2003505 -25.6326293
[85,] -14.4626657 -21.2003505
[86,] 1.4355622 -14.4626657
[87,] -3.7422063 1.4355622
[88,] -0.6486707 -3.7422063
[89,] 0.3680959 -0.6486707
[90,] 6.5983202 0.3680959
[91,] 10.5905220 6.5983202
[92,] 21.9474139 10.5905220
[93,] 31.3376104 21.9474139
[94,] 36.6056935 31.3376104
[95,] 17.5903010 36.6056935
[96,] 4.6931118 17.5903010
[97,] -12.6680527 4.6931118
[98,] -28.3170335 -12.6680527
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 14.0914227 11.1663228
2 17.1444357 14.0914227
3 8.7032781 17.1444357
4 6.7781110 8.7032781
5 7.0351798 6.7781110
6 4.1970383 7.0351798
7 1.9183874 4.1970383
8 1.5254655 1.9183874
9 -1.6315175 1.5254655
10 -3.0186995 -1.6315175
11 -0.7226818 -3.0186995
12 4.0290763 -0.7226818
13 1.3711971 4.0290763
14 0.1742117 1.3711971
15 -3.0369614 0.1742117
16 -3.5563555 -3.0369614
17 -4.1258360 -3.5563555
18 -5.1894763 -4.1258360
19 -4.0050762 -5.1894763
20 -6.6313405 -4.0050762
21 -7.3328082 -6.6313405
22 -3.8326911 -7.3328082
23 -2.1827592 -3.8326911
24 2.1796125 -2.1827592
25 3.9284919 2.1796125
26 2.1108643 3.9284919
27 2.9119886 2.1108643
28 4.6555799 2.9119886
29 7.2528230 4.6555799
30 1.4471461 7.2528230
31 -6.0979837 1.4471461
32 -8.9364706 -6.0979837
33 -10.1389860 -8.9364706
34 -9.4420709 -10.1389860
35 -7.1396404 -9.4420709
36 -9.9212131 -7.1396404
37 -5.9346833 -9.9212131
38 -3.6267291 -5.9346833
39 -6.4506315 -3.6267291
40 -7.7938563 -6.4506315
41 -9.3663883 -7.7938563
42 -9.5269952 -9.3663883
43 -10.7522248 -9.5269952
44 -8.3874971 -10.7522248
45 -12.3617580 -8.3874971
46 -9.5940515 -12.3617580
47 -3.7801482 -9.5940515
48 -2.7220197 -3.7801482
49 6.5326220 -2.7220197
50 3.6229850 6.5326220
51 -4.1132541 3.6229850
52 -0.8812570 -4.1132541
53 -1.0280293 -0.8812570
54 3.4711242 -1.0280293
55 3.1110905 3.4711242
56 -1.2033573 3.1110905
57 0.4079429 -1.2033573
58 2.6474470 0.4079429
59 10.1304277 2.6474470
60 10.4887524 10.1304277
61 8.9393751 10.4887524
62 7.6493205 8.9393751
63 5.9967185 7.6493205
64 10.7742052 5.9967185
65 7.4583734 10.7742052
66 5.0682221 7.4583734
67 8.5101934 5.0682221
68 9.4898561 8.5101934
69 6.6794437 9.4898561
70 11.1293947 6.6794437
71 11.7371302 11.1293947
72 1.2867075 11.7371302
73 -1.7977071 1.2867075
74 -0.1936167 -1.7977071
75 -0.2689320 -0.1936167
76 -9.3277567 -0.2689320
77 -7.5942185 -9.3277567
78 -6.0653793 -7.5942185
79 -3.2749087 -6.0653793
80 -7.8040700 -3.2749087
81 -6.9599273 -7.8040700
82 -24.4950223 -6.9599273
83 -25.6326293 -24.4950223
84 -21.2003505 -25.6326293
85 -14.4626657 -21.2003505
86 1.4355622 -14.4626657
87 -3.7422063 1.4355622
88 -0.6486707 -3.7422063
89 0.3680959 -0.6486707
90 6.5983202 0.3680959
91 10.5905220 6.5983202
92 21.9474139 10.5905220
93 31.3376104 21.9474139
94 36.6056935 31.3376104
95 17.5903010 36.6056935
96 4.6931118 17.5903010
97 -12.6680527 4.6931118
98 -28.3170335 -12.6680527
> 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/freestat/rcomp/tmp/73hqv1229554134.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/freestat/rcomp/tmp/80w911229554134.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/freestat/rcomp/tmp/9ddbt1229554134.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/freestat/rcomp/tmp/102v4i1229554134.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/1111to1229554135.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/freestat/rcomp/tmp/12gogn1229554135.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/freestat/rcomp/tmp/13xilv1229554135.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/freestat/rcomp/tmp/14tnla1229554135.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/freestat/rcomp/tmp/15o4ad1229554135.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/freestat/rcomp/tmp/16m8v71229554135.tab")
+ }
>
> system("convert tmp/12zfm1229554134.ps tmp/12zfm1229554134.png")
> system("convert tmp/2ybah1229554134.ps tmp/2ybah1229554134.png")
> system("convert tmp/3vvd91229554134.ps tmp/3vvd91229554134.png")
> system("convert tmp/4plah1229554134.ps tmp/4plah1229554134.png")
> system("convert tmp/5spw71229554134.ps tmp/5spw71229554134.png")
> system("convert tmp/644281229554134.ps tmp/644281229554134.png")
> system("convert tmp/73hqv1229554134.ps tmp/73hqv1229554134.png")
> system("convert tmp/80w911229554134.ps tmp/80w911229554134.png")
> system("convert tmp/9ddbt1229554134.ps tmp/9ddbt1229554134.png")
> system("convert tmp/102v4i1229554134.ps tmp/102v4i1229554134.png")
>
>
> proc.time()
user system elapsed
4.423 2.608 5.471