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(82.4
+ ,0
+ ,82.4
+ ,111.1
+ ,105.7
+ ,105.7
+ ,60
+ ,0
+ ,60
+ ,82.4
+ ,111.1
+ ,105.7
+ ,107.3
+ ,0
+ ,107.3
+ ,60
+ ,82.4
+ ,111.1
+ ,99.3
+ ,0
+ ,99.3
+ ,107.3
+ ,60
+ ,82.4
+ ,113.5
+ ,0
+ ,113.5
+ ,99.3
+ ,107.3
+ ,60
+ ,108.9
+ ,0
+ ,108.9
+ ,113.5
+ ,99.3
+ ,107.3
+ ,100.2
+ ,0
+ ,100.2
+ ,108.9
+ ,113.5
+ ,99.3
+ ,103.9
+ ,0
+ ,103.9
+ ,100.2
+ ,108.9
+ ,113.5
+ ,138.7
+ ,0
+ ,138.7
+ ,103.9
+ ,100.2
+ ,108.9
+ ,120.2
+ ,0
+ ,120.2
+ ,138.7
+ ,103.9
+ ,100.2
+ ,100.2
+ ,0
+ ,100.2
+ ,120.2
+ ,138.7
+ ,103.9
+ ,143.2
+ ,0
+ ,143.2
+ ,100.2
+ ,120.2
+ ,138.7
+ ,70.9
+ ,0
+ ,70.9
+ ,143.2
+ ,100.2
+ ,120.2
+ ,85.2
+ ,0
+ ,85.2
+ ,70.9
+ ,143.2
+ ,100.2
+ ,133
+ ,0
+ ,133
+ ,85.2
+ ,70.9
+ ,143.2
+ ,136.6
+ ,0
+ ,136.6
+ ,133
+ ,85.2
+ ,70.9
+ ,117.9
+ ,0
+ ,117.9
+ ,136.6
+ ,133
+ ,85.2
+ ,106.3
+ ,0
+ ,106.3
+ ,117.9
+ ,136.6
+ ,133
+ ,122.3
+ ,0
+ ,122.3
+ ,106.3
+ ,117.9
+ ,136.6
+ ,125.5
+ ,0
+ ,125.5
+ ,122.3
+ ,106.3
+ ,117.9
+ ,148.4
+ ,0
+ ,148.4
+ ,125.5
+ ,122.3
+ ,106.3
+ ,126.3
+ ,0
+ ,126.3
+ ,148.4
+ ,125.5
+ ,122.3
+ ,99.6
+ ,0
+ ,99.6
+ ,126.3
+ ,148.4
+ ,125.5
+ ,140.4
+ ,0
+ ,140.4
+ ,99.6
+ ,126.3
+ ,148.4
+ ,80.3
+ ,0
+ ,80.3
+ ,140.4
+ ,99.6
+ ,126.3
+ ,92.6
+ ,0
+ ,92.6
+ ,80.3
+ ,140.4
+ ,99.6
+ ,138.5
+ ,0
+ ,138.5
+ ,92.6
+ ,80.3
+ ,140.4
+ ,110.9
+ ,0
+ ,110.9
+ ,138.5
+ ,92.6
+ ,80.3
+ ,119.6
+ ,0
+ ,119.6
+ ,110.9
+ ,138.5
+ ,92.6
+ ,105
+ ,0
+ ,105
+ ,119.6
+ ,110.9
+ ,138.5
+ ,109
+ ,0
+ ,109
+ ,105
+ ,119.6
+ ,110.9
+ ,129.4
+ ,0
+ ,129.4
+ ,109
+ ,105
+ ,119.6
+ ,148.6
+ ,0
+ ,148.6
+ ,129.4
+ ,109
+ ,105
+ ,101.4
+ ,0
+ ,101.4
+ ,148.6
+ ,129.4
+ ,109
+ ,134.8
+ ,0
+ ,134.8
+ ,101.4
+ ,148.6
+ ,129.4
+ ,143.7
+ ,0
+ ,143.7
+ ,134.8
+ ,101.4
+ ,148.6
+ ,81.6
+ ,0
+ ,81.6
+ ,143.7
+ ,134.8
+ ,101.4
+ ,90.3
+ ,0
+ ,90.3
+ ,81.6
+ ,143.7
+ ,134.8
+ ,141.5
+ ,0
+ ,141.5
+ ,90.3
+ ,81.6
+ ,143.7
+ ,140.7
+ ,0
+ ,140.7
+ ,141.5
+ ,90.3
+ ,81.6
+ ,140.2
+ ,0
+ ,140.2
+ ,140.7
+ ,141.5
+ ,90.3
+ ,100.2
+ ,0
+ ,100.2
+ ,140.2
+ ,140.7
+ ,141.5
+ ,125.7
+ ,0
+ ,125.7
+ ,100.2
+ ,140.2
+ ,140.7
+ ,119.6
+ ,0
+ ,119.6
+ ,125.7
+ ,100.2
+ ,140.2
+ ,134.7
+ ,0
+ ,134.7
+ ,119.6
+ ,125.7
+ ,100.2
+ ,109
+ ,0
+ ,109
+ ,134.7
+ ,119.6
+ ,125.7
+ ,116.3
+ ,0
+ ,116.3
+ ,109
+ ,134.7
+ ,119.6
+ ,146.9
+ ,0
+ ,146.9
+ ,116.3
+ ,109
+ ,134.7
+ ,97.4
+ ,0
+ ,97.4
+ ,146.9
+ ,116.3
+ ,109
+ ,89.4
+ ,0
+ ,89.4
+ ,97.4
+ ,146.9
+ ,116.3
+ ,132.1
+ ,0
+ ,132.1
+ ,89.4
+ ,97.4
+ ,146.9
+ ,139.8
+ ,0
+ ,139.8
+ ,132.1
+ ,89.4
+ ,97.4
+ ,129
+ ,0
+ ,129
+ ,139.8
+ ,132.1
+ ,89.4
+ ,112.5
+ ,0
+ ,112.5
+ ,129
+ ,139.8
+ ,132.1
+ ,121.9
+ ,1
+ ,121.9
+ ,112.5
+ ,129
+ ,139.8
+ ,121.7
+ ,1
+ ,121.7
+ ,121.9
+ ,112.5
+ ,129
+ ,123.1
+ ,1
+ ,123.1
+ ,121.7
+ ,121.9
+ ,112.5
+ ,131.6
+ ,1
+ ,131.6
+ ,123.1
+ ,121.7
+ ,121.9
+ ,119.3
+ ,1
+ ,119.3
+ ,131.6
+ ,123.1
+ ,121.7
+ ,132.5
+ ,1
+ ,132.5
+ ,119.3
+ ,131.6
+ ,123.1
+ ,98.3
+ ,1
+ ,98.3
+ ,132.5
+ ,119.3
+ ,131.6
+ ,85.1
+ ,1
+ ,85.1
+ ,98.3
+ ,132.5
+ ,119.3
+ ,131.7
+ ,1
+ ,131.7
+ ,85.1
+ ,98.3
+ ,132.5
+ ,129.3
+ ,1
+ ,129.3
+ ,131.7
+ ,85.1
+ ,98.3
+ ,90.7
+ ,1
+ ,90.7
+ ,129.3
+ ,131.7
+ ,85.1
+ ,78.6
+ ,1
+ ,78.6
+ ,90.7
+ ,129.3
+ ,131.7
+ ,68.9
+ ,1
+ ,68.9
+ ,78.6
+ ,90.7
+ ,129.3
+ ,79.1
+ ,1
+ ,79.1
+ ,68.9
+ ,78.6
+ ,90.7
+ ,83.5
+ ,1
+ ,83.5
+ ,79.1
+ ,68.9
+ ,78.6
+ ,74.1
+ ,1
+ ,74.1
+ ,83.5
+ ,79.1
+ ,68.9
+ ,59.7
+ ,1
+ ,59.7
+ ,74.1
+ ,83.5
+ ,79.1
+ ,93.3
+ ,1
+ ,93.3
+ ,59.7
+ ,74.1
+ ,83.5
+ ,61.3
+ ,1
+ ,61.3
+ ,93.3
+ ,59.7
+ ,74.1
+ ,56.6
+ ,1
+ ,56.6
+ ,61.3
+ ,93.3
+ ,59.7)
+ ,dim=c(6
+ ,74)
+ ,dimnames=list(c('Y'
+ ,'X'
+ ,'Y1'
+ ,'Y2'
+ ,'Y3'
+ ,'Y4')
+ ,1:74))
> y <- array(NA,dim=c(6,74),dimnames=list(c('Y','X','Y1','Y2','Y3','Y4'),1:74))
> 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
Y X Y1 Y2 Y3 Y4 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 82.4 0 82.4 111.1 105.7 105.7 1 0 0 0 0 0 0 0 0 0 0 1
2 60.0 0 60.0 82.4 111.1 105.7 0 1 0 0 0 0 0 0 0 0 0 2
3 107.3 0 107.3 60.0 82.4 111.1 0 0 1 0 0 0 0 0 0 0 0 3
4 99.3 0 99.3 107.3 60.0 82.4 0 0 0 1 0 0 0 0 0 0 0 4
5 113.5 0 113.5 99.3 107.3 60.0 0 0 0 0 1 0 0 0 0 0 0 5
6 108.9 0 108.9 113.5 99.3 107.3 0 0 0 0 0 1 0 0 0 0 0 6
7 100.2 0 100.2 108.9 113.5 99.3 0 0 0 0 0 0 1 0 0 0 0 7
8 103.9 0 103.9 100.2 108.9 113.5 0 0 0 0 0 0 0 1 0 0 0 8
9 138.7 0 138.7 103.9 100.2 108.9 0 0 0 0 0 0 0 0 1 0 0 9
10 120.2 0 120.2 138.7 103.9 100.2 0 0 0 0 0 0 0 0 0 1 0 10
11 100.2 0 100.2 120.2 138.7 103.9 0 0 0 0 0 0 0 0 0 0 1 11
12 143.2 0 143.2 100.2 120.2 138.7 0 0 0 0 0 0 0 0 0 0 0 12
13 70.9 0 70.9 143.2 100.2 120.2 1 0 0 0 0 0 0 0 0 0 0 13
14 85.2 0 85.2 70.9 143.2 100.2 0 1 0 0 0 0 0 0 0 0 0 14
15 133.0 0 133.0 85.2 70.9 143.2 0 0 1 0 0 0 0 0 0 0 0 15
16 136.6 0 136.6 133.0 85.2 70.9 0 0 0 1 0 0 0 0 0 0 0 16
17 117.9 0 117.9 136.6 133.0 85.2 0 0 0 0 1 0 0 0 0 0 0 17
18 106.3 0 106.3 117.9 136.6 133.0 0 0 0 0 0 1 0 0 0 0 0 18
19 122.3 0 122.3 106.3 117.9 136.6 0 0 0 0 0 0 1 0 0 0 0 19
20 125.5 0 125.5 122.3 106.3 117.9 0 0 0 0 0 0 0 1 0 0 0 20
21 148.4 0 148.4 125.5 122.3 106.3 0 0 0 0 0 0 0 0 1 0 0 21
22 126.3 0 126.3 148.4 125.5 122.3 0 0 0 0 0 0 0 0 0 1 0 22
23 99.6 0 99.6 126.3 148.4 125.5 0 0 0 0 0 0 0 0 0 0 1 23
24 140.4 0 140.4 99.6 126.3 148.4 0 0 0 0 0 0 0 0 0 0 0 24
25 80.3 0 80.3 140.4 99.6 126.3 1 0 0 0 0 0 0 0 0 0 0 25
26 92.6 0 92.6 80.3 140.4 99.6 0 1 0 0 0 0 0 0 0 0 0 26
27 138.5 0 138.5 92.6 80.3 140.4 0 0 1 0 0 0 0 0 0 0 0 27
28 110.9 0 110.9 138.5 92.6 80.3 0 0 0 1 0 0 0 0 0 0 0 28
29 119.6 0 119.6 110.9 138.5 92.6 0 0 0 0 1 0 0 0 0 0 0 29
30 105.0 0 105.0 119.6 110.9 138.5 0 0 0 0 0 1 0 0 0 0 0 30
31 109.0 0 109.0 105.0 119.6 110.9 0 0 0 0 0 0 1 0 0 0 0 31
32 129.4 0 129.4 109.0 105.0 119.6 0 0 0 0 0 0 0 1 0 0 0 32
33 148.6 0 148.6 129.4 109.0 105.0 0 0 0 0 0 0 0 0 1 0 0 33
34 101.4 0 101.4 148.6 129.4 109.0 0 0 0 0 0 0 0 0 0 1 0 34
35 134.8 0 134.8 101.4 148.6 129.4 0 0 0 0 0 0 0 0 0 0 1 35
36 143.7 0 143.7 134.8 101.4 148.6 0 0 0 0 0 0 0 0 0 0 0 36
37 81.6 0 81.6 143.7 134.8 101.4 1 0 0 0 0 0 0 0 0 0 0 37
38 90.3 0 90.3 81.6 143.7 134.8 0 1 0 0 0 0 0 0 0 0 0 38
39 141.5 0 141.5 90.3 81.6 143.7 0 0 1 0 0 0 0 0 0 0 0 39
40 140.7 0 140.7 141.5 90.3 81.6 0 0 0 1 0 0 0 0 0 0 0 40
41 140.2 0 140.2 140.7 141.5 90.3 0 0 0 0 1 0 0 0 0 0 0 41
42 100.2 0 100.2 140.2 140.7 141.5 0 0 0 0 0 1 0 0 0 0 0 42
43 125.7 0 125.7 100.2 140.2 140.7 0 0 0 0 0 0 1 0 0 0 0 43
44 119.6 0 119.6 125.7 100.2 140.2 0 0 0 0 0 0 0 1 0 0 0 44
45 134.7 0 134.7 119.6 125.7 100.2 0 0 0 0 0 0 0 0 1 0 0 45
46 109.0 0 109.0 134.7 119.6 125.7 0 0 0 0 0 0 0 0 0 1 0 46
47 116.3 0 116.3 109.0 134.7 119.6 0 0 0 0 0 0 0 0 0 0 1 47
48 146.9 0 146.9 116.3 109.0 134.7 0 0 0 0 0 0 0 0 0 0 0 48
49 97.4 0 97.4 146.9 116.3 109.0 1 0 0 0 0 0 0 0 0 0 0 49
50 89.4 0 89.4 97.4 146.9 116.3 0 1 0 0 0 0 0 0 0 0 0 50
51 132.1 0 132.1 89.4 97.4 146.9 0 0 1 0 0 0 0 0 0 0 0 51
52 139.8 0 139.8 132.1 89.4 97.4 0 0 0 1 0 0 0 0 0 0 0 52
53 129.0 0 129.0 139.8 132.1 89.4 0 0 0 0 1 0 0 0 0 0 0 53
54 112.5 0 112.5 129.0 139.8 132.1 0 0 0 0 0 1 0 0 0 0 0 54
55 121.9 1 121.9 112.5 129.0 139.8 0 0 0 0 0 0 1 0 0 0 0 55
56 121.7 1 121.7 121.9 112.5 129.0 0 0 0 0 0 0 0 1 0 0 0 56
57 123.1 1 123.1 121.7 121.9 112.5 0 0 0 0 0 0 0 0 1 0 0 57
58 131.6 1 131.6 123.1 121.7 121.9 0 0 0 0 0 0 0 0 0 1 0 58
59 119.3 1 119.3 131.6 123.1 121.7 0 0 0 0 0 0 0 0 0 0 1 59
60 132.5 1 132.5 119.3 131.6 123.1 0 0 0 0 0 0 0 0 0 0 0 60
61 98.3 1 98.3 132.5 119.3 131.6 1 0 0 0 0 0 0 0 0 0 0 61
62 85.1 1 85.1 98.3 132.5 119.3 0 1 0 0 0 0 0 0 0 0 0 62
63 131.7 1 131.7 85.1 98.3 132.5 0 0 1 0 0 0 0 0 0 0 0 63
64 129.3 1 129.3 131.7 85.1 98.3 0 0 0 1 0 0 0 0 0 0 0 64
65 90.7 1 90.7 129.3 131.7 85.1 0 0 0 0 1 0 0 0 0 0 0 65
66 78.6 1 78.6 90.7 129.3 131.7 0 0 0 0 0 1 0 0 0 0 0 66
67 68.9 1 68.9 78.6 90.7 129.3 0 0 0 0 0 0 1 0 0 0 0 67
68 79.1 1 79.1 68.9 78.6 90.7 0 0 0 0 0 0 0 1 0 0 0 68
69 83.5 1 83.5 79.1 68.9 78.6 0 0 0 0 0 0 0 0 1 0 0 69
70 74.1 1 74.1 83.5 79.1 68.9 0 0 0 0 0 0 0 0 0 1 0 70
71 59.7 1 59.7 74.1 83.5 79.1 0 0 0 0 0 0 0 0 0 0 1 71
72 93.3 1 93.3 59.7 74.1 83.5 0 0 0 0 0 0 0 0 0 0 0 72
73 61.3 1 61.3 93.3 59.7 74.1 1 0 0 0 0 0 0 0 0 0 0 73
74 56.6 1 56.6 61.3 93.3 59.7 0 1 0 0 0 0 0 0 0 0 0 74
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) X Y1 Y2 Y3 Y4
2.844e-14 -7.440e-15 1.000e+00 -4.924e-17 6.071e-17 -3.775e-17
M1 M2 M3 M4 M5 M6
-1.846e-15 -6.363e-15 7.523e-15 4.628e-16 -1.876e-15 -1.934e-15
M7 M8 M9 M10 M11 t
-1.509e-15 4.677e-16 3.204e-16 -1.238e-15 -2.315e-15 -4.106e-17
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-8.330e-15 -1.608e-15 -2.347e-16 1.288e-15 3.064e-14
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.844e-14 6.401e-15 4.443e+00 4.23e-05 ***
X -7.440e-15 2.400e-15 -3.100e+00 0.00303 **
Y1 1.000e+00 5.559e-17 1.799e+16 < 2e-16 ***
Y2 -4.924e-17 5.474e-17 -8.990e-01 0.37225
Y3 6.071e-17 5.431e-17 1.118e+00 0.26848
Y4 -3.775e-17 5.488e-17 -6.880e-01 0.49438
M1 -1.846e-15 4.550e-15 -4.060e-01 0.68644
M2 -6.363e-15 4.462e-15 -1.426e+00 0.15943
M3 7.523e-15 3.452e-15 2.179e+00 0.03355 *
M4 4.628e-16 4.394e-15 1.050e-01 0.91649
M5 -1.876e-15 4.565e-15 -4.110e-01 0.68277
M6 -1.934e-15 3.814e-15 -5.070e-01 0.61412
M7 -1.509e-15 3.346e-15 -4.510e-01 0.65381
M8 4.677e-16 3.174e-15 1.470e-01 0.88338
M9 3.204e-16 3.394e-15 9.400e-02 0.92513
M10 -1.238e-15 3.850e-15 -3.220e-01 0.74901
M11 -2.315e-15 3.770e-15 -6.140e-01 0.54155
t -4.106e-17 4.503e-17 -9.120e-01 0.36576
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 5.134e-15 on 56 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 9.82e+31 on 17 and 56 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.182822e-01 2.365644e-01 8.817178e-01
[2,] 9.999904e-01 1.916920e-05 9.584601e-06
[3,] 8.450878e-01 3.098244e-01 1.549122e-01
[4,] 7.670527e-04 1.534105e-03 9.992329e-01
[5,] 4.546581e-05 9.093162e-05 9.999545e-01
[6,] 4.238012e-01 8.476025e-01 5.761988e-01
[7,] 9.986347e-01 2.730636e-03 1.365318e-03
[8,] 3.624389e-01 7.248777e-01 6.375611e-01
[9,] 1.812214e-01 3.624428e-01 8.187786e-01
[10,] 6.475969e-01 7.048062e-01 3.524031e-01
[11,] 9.999998e-01 4.740475e-07 2.370238e-07
[12,] 9.976834e-01 4.633280e-03 2.316640e-03
[13,] 7.041843e-05 1.408369e-04 9.999296e-01
[14,] 7.304703e-01 5.390595e-01 2.695297e-01
[15,] 1.000000e+00 6.241535e-08 3.120768e-08
[16,] 9.997178e-01 5.644725e-04 2.822363e-04
[17,] 9.999825e-01 3.498806e-05 1.749403e-05
[18,] 9.998885e-01 2.230373e-04 1.115187e-04
[19,] 1.000000e+00 5.171238e-13 2.585619e-13
[20,] 9.999938e-01 1.249158e-05 6.245789e-06
[21,] 1.941335e-01 3.882669e-01 8.058665e-01
[22,] 1.607270e-05 3.214541e-05 9.999839e-01
[23,] 2.088049e-01 4.176098e-01 7.911951e-01
[24,] 3.514783e-12 7.029566e-12 1.000000e+00
[25,] 1.070047e-16 2.140095e-16 1.000000e+00
[26,] 9.206046e-02 1.841209e-01 9.079395e-01
[27,] 2.311675e-01 4.623351e-01 7.688325e-01
[28,] 1.000000e+00 0.000000e+00 0.000000e+00
[29,] 9.886432e-01 2.271356e-02 1.135678e-02
[30,] 2.639078e-08 5.278157e-08 1.000000e+00
[31,] 7.844807e-02 1.568961e-01 9.215519e-01
[32,] 2.569830e-03 5.139661e-03 9.974302e-01
[33,] 9.780778e-01 4.384437e-02 2.192218e-02
> postscript(file="/var/www/html/rcomp/tmp/15cba1258741837.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/23jwg1258741837.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/3ad5g1258741837.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/4l9gi1258741837.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/5x2fu1258741837.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 = 74
Frequency = 1
1 2 3 4 5
-5.810159e-15 -5.649799e-15 3.063963e-14 -1.618985e-15 -3.043610e-15
6 7 8 9 10
-1.539083e-16 -2.204726e-15 -4.367452e-15 -5.386932e-16 -3.619284e-17
11 12 13 14 15
-2.033410e-15 -1.113639e-15 1.200370e-15 1.116980e-17 -7.948929e-15
16 17 18 19 20
-2.688762e-15 -1.165397e-15 -1.139599e-15 9.606399e-16 -7.198704e-16
21 22 23 24 25
5.072786e-15 1.220770e-15 -9.140998e-16 -1.896433e-16 2.612123e-16
26 27 28 29 30
-1.145551e-16 -1.575895e-15 -8.610192e-16 -4.985455e-16 1.420482e-15
31 32 33 34 35
-1.056163e-15 2.166259e-15 -6.227374e-16 -1.098373e-15 -2.027769e-15
36 37 38 39 40
3.007579e-15 -2.376194e-15 1.952582e-15 -5.201551e-15 1.681599e-15
41 42 43 44 45
1.324990e-15 1.140619e-15 -1.176836e-16 2.624826e-15 -3.052312e-15
46 47 48 49 50
1.310190e-15 -2.797714e-16 1.071989e-15 6.134225e-16 2.480142e-15
51 52 53 54 55
-7.583417e-15 2.512024e-15 4.169710e-15 9.598662e-16 1.761973e-15
56 57 58 59 60
9.166855e-16 -3.307384e-16 2.932338e-16 3.780076e-15 -1.754787e-15
61 62 63 64 65
3.087631e-15 4.222960e-15 -8.329841e-15 9.751435e-16 -7.871480e-16
66 67 68 69 70
-2.227460e-15 6.559597e-16 -6.204476e-16 -5.283052e-16 -1.689628e-15
71 72 73 74
1.474974e-15 -1.021498e-15 3.023718e-15 -2.902501e-15
> postscript(file="/var/www/html/rcomp/tmp/619c81258741837.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 = 74
Frequency = 1
lag(myerror, k = 1) myerror
0 -5.810159e-15 NA
1 -5.649799e-15 -5.810159e-15
2 3.063963e-14 -5.649799e-15
3 -1.618985e-15 3.063963e-14
4 -3.043610e-15 -1.618985e-15
5 -1.539083e-16 -3.043610e-15
6 -2.204726e-15 -1.539083e-16
7 -4.367452e-15 -2.204726e-15
8 -5.386932e-16 -4.367452e-15
9 -3.619284e-17 -5.386932e-16
10 -2.033410e-15 -3.619284e-17
11 -1.113639e-15 -2.033410e-15
12 1.200370e-15 -1.113639e-15
13 1.116980e-17 1.200370e-15
14 -7.948929e-15 1.116980e-17
15 -2.688762e-15 -7.948929e-15
16 -1.165397e-15 -2.688762e-15
17 -1.139599e-15 -1.165397e-15
18 9.606399e-16 -1.139599e-15
19 -7.198704e-16 9.606399e-16
20 5.072786e-15 -7.198704e-16
21 1.220770e-15 5.072786e-15
22 -9.140998e-16 1.220770e-15
23 -1.896433e-16 -9.140998e-16
24 2.612123e-16 -1.896433e-16
25 -1.145551e-16 2.612123e-16
26 -1.575895e-15 -1.145551e-16
27 -8.610192e-16 -1.575895e-15
28 -4.985455e-16 -8.610192e-16
29 1.420482e-15 -4.985455e-16
30 -1.056163e-15 1.420482e-15
31 2.166259e-15 -1.056163e-15
32 -6.227374e-16 2.166259e-15
33 -1.098373e-15 -6.227374e-16
34 -2.027769e-15 -1.098373e-15
35 3.007579e-15 -2.027769e-15
36 -2.376194e-15 3.007579e-15
37 1.952582e-15 -2.376194e-15
38 -5.201551e-15 1.952582e-15
39 1.681599e-15 -5.201551e-15
40 1.324990e-15 1.681599e-15
41 1.140619e-15 1.324990e-15
42 -1.176836e-16 1.140619e-15
43 2.624826e-15 -1.176836e-16
44 -3.052312e-15 2.624826e-15
45 1.310190e-15 -3.052312e-15
46 -2.797714e-16 1.310190e-15
47 1.071989e-15 -2.797714e-16
48 6.134225e-16 1.071989e-15
49 2.480142e-15 6.134225e-16
50 -7.583417e-15 2.480142e-15
51 2.512024e-15 -7.583417e-15
52 4.169710e-15 2.512024e-15
53 9.598662e-16 4.169710e-15
54 1.761973e-15 9.598662e-16
55 9.166855e-16 1.761973e-15
56 -3.307384e-16 9.166855e-16
57 2.932338e-16 -3.307384e-16
58 3.780076e-15 2.932338e-16
59 -1.754787e-15 3.780076e-15
60 3.087631e-15 -1.754787e-15
61 4.222960e-15 3.087631e-15
62 -8.329841e-15 4.222960e-15
63 9.751435e-16 -8.329841e-15
64 -7.871480e-16 9.751435e-16
65 -2.227460e-15 -7.871480e-16
66 6.559597e-16 -2.227460e-15
67 -6.204476e-16 6.559597e-16
68 -5.283052e-16 -6.204476e-16
69 -1.689628e-15 -5.283052e-16
70 1.474974e-15 -1.689628e-15
71 -1.021498e-15 1.474974e-15
72 3.023718e-15 -1.021498e-15
73 -2.902501e-15 3.023718e-15
74 NA -2.902501e-15
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -5.649799e-15 -5.810159e-15
[2,] 3.063963e-14 -5.649799e-15
[3,] -1.618985e-15 3.063963e-14
[4,] -3.043610e-15 -1.618985e-15
[5,] -1.539083e-16 -3.043610e-15
[6,] -2.204726e-15 -1.539083e-16
[7,] -4.367452e-15 -2.204726e-15
[8,] -5.386932e-16 -4.367452e-15
[9,] -3.619284e-17 -5.386932e-16
[10,] -2.033410e-15 -3.619284e-17
[11,] -1.113639e-15 -2.033410e-15
[12,] 1.200370e-15 -1.113639e-15
[13,] 1.116980e-17 1.200370e-15
[14,] -7.948929e-15 1.116980e-17
[15,] -2.688762e-15 -7.948929e-15
[16,] -1.165397e-15 -2.688762e-15
[17,] -1.139599e-15 -1.165397e-15
[18,] 9.606399e-16 -1.139599e-15
[19,] -7.198704e-16 9.606399e-16
[20,] 5.072786e-15 -7.198704e-16
[21,] 1.220770e-15 5.072786e-15
[22,] -9.140998e-16 1.220770e-15
[23,] -1.896433e-16 -9.140998e-16
[24,] 2.612123e-16 -1.896433e-16
[25,] -1.145551e-16 2.612123e-16
[26,] -1.575895e-15 -1.145551e-16
[27,] -8.610192e-16 -1.575895e-15
[28,] -4.985455e-16 -8.610192e-16
[29,] 1.420482e-15 -4.985455e-16
[30,] -1.056163e-15 1.420482e-15
[31,] 2.166259e-15 -1.056163e-15
[32,] -6.227374e-16 2.166259e-15
[33,] -1.098373e-15 -6.227374e-16
[34,] -2.027769e-15 -1.098373e-15
[35,] 3.007579e-15 -2.027769e-15
[36,] -2.376194e-15 3.007579e-15
[37,] 1.952582e-15 -2.376194e-15
[38,] -5.201551e-15 1.952582e-15
[39,] 1.681599e-15 -5.201551e-15
[40,] 1.324990e-15 1.681599e-15
[41,] 1.140619e-15 1.324990e-15
[42,] -1.176836e-16 1.140619e-15
[43,] 2.624826e-15 -1.176836e-16
[44,] -3.052312e-15 2.624826e-15
[45,] 1.310190e-15 -3.052312e-15
[46,] -2.797714e-16 1.310190e-15
[47,] 1.071989e-15 -2.797714e-16
[48,] 6.134225e-16 1.071989e-15
[49,] 2.480142e-15 6.134225e-16
[50,] -7.583417e-15 2.480142e-15
[51,] 2.512024e-15 -7.583417e-15
[52,] 4.169710e-15 2.512024e-15
[53,] 9.598662e-16 4.169710e-15
[54,] 1.761973e-15 9.598662e-16
[55,] 9.166855e-16 1.761973e-15
[56,] -3.307384e-16 9.166855e-16
[57,] 2.932338e-16 -3.307384e-16
[58,] 3.780076e-15 2.932338e-16
[59,] -1.754787e-15 3.780076e-15
[60,] 3.087631e-15 -1.754787e-15
[61,] 4.222960e-15 3.087631e-15
[62,] -8.329841e-15 4.222960e-15
[63,] 9.751435e-16 -8.329841e-15
[64,] -7.871480e-16 9.751435e-16
[65,] -2.227460e-15 -7.871480e-16
[66,] 6.559597e-16 -2.227460e-15
[67,] -6.204476e-16 6.559597e-16
[68,] -5.283052e-16 -6.204476e-16
[69,] -1.689628e-15 -5.283052e-16
[70,] 1.474974e-15 -1.689628e-15
[71,] -1.021498e-15 1.474974e-15
[72,] 3.023718e-15 -1.021498e-15
[73,] -2.902501e-15 3.023718e-15
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -5.649799e-15 -5.810159e-15
2 3.063963e-14 -5.649799e-15
3 -1.618985e-15 3.063963e-14
4 -3.043610e-15 -1.618985e-15
5 -1.539083e-16 -3.043610e-15
6 -2.204726e-15 -1.539083e-16
7 -4.367452e-15 -2.204726e-15
8 -5.386932e-16 -4.367452e-15
9 -3.619284e-17 -5.386932e-16
10 -2.033410e-15 -3.619284e-17
11 -1.113639e-15 -2.033410e-15
12 1.200370e-15 -1.113639e-15
13 1.116980e-17 1.200370e-15
14 -7.948929e-15 1.116980e-17
15 -2.688762e-15 -7.948929e-15
16 -1.165397e-15 -2.688762e-15
17 -1.139599e-15 -1.165397e-15
18 9.606399e-16 -1.139599e-15
19 -7.198704e-16 9.606399e-16
20 5.072786e-15 -7.198704e-16
21 1.220770e-15 5.072786e-15
22 -9.140998e-16 1.220770e-15
23 -1.896433e-16 -9.140998e-16
24 2.612123e-16 -1.896433e-16
25 -1.145551e-16 2.612123e-16
26 -1.575895e-15 -1.145551e-16
27 -8.610192e-16 -1.575895e-15
28 -4.985455e-16 -8.610192e-16
29 1.420482e-15 -4.985455e-16
30 -1.056163e-15 1.420482e-15
31 2.166259e-15 -1.056163e-15
32 -6.227374e-16 2.166259e-15
33 -1.098373e-15 -6.227374e-16
34 -2.027769e-15 -1.098373e-15
35 3.007579e-15 -2.027769e-15
36 -2.376194e-15 3.007579e-15
37 1.952582e-15 -2.376194e-15
38 -5.201551e-15 1.952582e-15
39 1.681599e-15 -5.201551e-15
40 1.324990e-15 1.681599e-15
41 1.140619e-15 1.324990e-15
42 -1.176836e-16 1.140619e-15
43 2.624826e-15 -1.176836e-16
44 -3.052312e-15 2.624826e-15
45 1.310190e-15 -3.052312e-15
46 -2.797714e-16 1.310190e-15
47 1.071989e-15 -2.797714e-16
48 6.134225e-16 1.071989e-15
49 2.480142e-15 6.134225e-16
50 -7.583417e-15 2.480142e-15
51 2.512024e-15 -7.583417e-15
52 4.169710e-15 2.512024e-15
53 9.598662e-16 4.169710e-15
54 1.761973e-15 9.598662e-16
55 9.166855e-16 1.761973e-15
56 -3.307384e-16 9.166855e-16
57 2.932338e-16 -3.307384e-16
58 3.780076e-15 2.932338e-16
59 -1.754787e-15 3.780076e-15
60 3.087631e-15 -1.754787e-15
61 4.222960e-15 3.087631e-15
62 -8.329841e-15 4.222960e-15
63 9.751435e-16 -8.329841e-15
64 -7.871480e-16 9.751435e-16
65 -2.227460e-15 -7.871480e-16
66 6.559597e-16 -2.227460e-15
67 -6.204476e-16 6.559597e-16
68 -5.283052e-16 -6.204476e-16
69 -1.689628e-15 -5.283052e-16
70 1.474974e-15 -1.689628e-15
71 -1.021498e-15 1.474974e-15
72 3.023718e-15 -1.021498e-15
73 -2.902501e-15 3.023718e-15
> 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/77pbn1258741837.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/8nz1f1258741837.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/96nok1258741837.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/105w0v1258741837.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/11chkj1258741837.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/12pw1j1258741837.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/13pvhc1258741837.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/14lr1z1258741837.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/1523pl1258741837.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/163t3m1258741837.tab")
+ }
>
> system("convert tmp/15cba1258741837.ps tmp/15cba1258741837.png")
> system("convert tmp/23jwg1258741837.ps tmp/23jwg1258741837.png")
> system("convert tmp/3ad5g1258741837.ps tmp/3ad5g1258741837.png")
> system("convert tmp/4l9gi1258741837.ps tmp/4l9gi1258741837.png")
> system("convert tmp/5x2fu1258741837.ps tmp/5x2fu1258741837.png")
> system("convert tmp/619c81258741837.ps tmp/619c81258741837.png")
> system("convert tmp/77pbn1258741837.ps tmp/77pbn1258741837.png")
> system("convert tmp/8nz1f1258741837.ps tmp/8nz1f1258741837.png")
> system("convert tmp/96nok1258741837.ps tmp/96nok1258741837.png")
> system("convert tmp/105w0v1258741837.ps tmp/105w0v1258741837.png")
>
>
> proc.time()
user system elapsed
2.584 1.574 2.949