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(3.88
+ ,153.3
+ ,3.98
+ ,154.5
+ ,3.29
+ ,155.2
+ ,2.88
+ ,156.9
+ ,3.22
+ ,157
+ ,3.62
+ ,157.4
+ ,3.82
+ ,157.2
+ ,3.54
+ ,157.5
+ ,2.53
+ ,158
+ ,2.22
+ ,158.5
+ ,2.85
+ ,159
+ ,2.78
+ ,159.3
+ ,2.28
+ ,160
+ ,2.26
+ ,160.8
+ ,2.71
+ ,161.9
+ ,2.77
+ ,162.5
+ ,2.77
+ ,162.7
+ ,2.64
+ ,162.8
+ ,2.56
+ ,162.9
+ ,2.07
+ ,163
+ ,2.32
+ ,164
+ ,2.16
+ ,164.7
+ ,2.23
+ ,164.8
+ ,2.4
+ ,164.9
+ ,2.84
+ ,165
+ ,2.77
+ ,165.8
+ ,2.93
+ ,166.1
+ ,2.91
+ ,167.2
+ ,2.69
+ ,167.7
+ ,2.38
+ ,168.3
+ ,2.58
+ ,168.6
+ ,3.19
+ ,168.9
+ ,2.82
+ ,169.1
+ ,2.72
+ ,169.5
+ ,2.53
+ ,169.6
+ ,2.7
+ ,169.7
+ ,2.42
+ ,169.8
+ ,2.5
+ ,170.4
+ ,2.31
+ ,170.9
+ ,2.41
+ ,171.9
+ ,2.56
+ ,171.9
+ ,2.76
+ ,172
+ ,2.71
+ ,172
+ ,2.44
+ ,172.4
+ ,2.46
+ ,173
+ ,2.12
+ ,173.7
+ ,1.99
+ ,173.8
+ ,1.86
+ ,173.8
+ ,1.88
+ ,173.9
+ ,1.82
+ ,174.6
+ ,1.74
+ ,175
+ ,1.71
+ ,175.9
+ ,1.38
+ ,176
+ ,1.27
+ ,175.1
+ ,1.19
+ ,175.6
+ ,1.28
+ ,175.9
+ ,1.19
+ ,176.7
+ ,1.22
+ ,176.1
+ ,1.47
+ ,176.1
+ ,1.46
+ ,176.2
+ ,1.96
+ ,176.3
+ ,1.88
+ ,177.8
+ ,2.03
+ ,178.5
+ ,2.04
+ ,179.4
+ ,1.9
+ ,179.5
+ ,1.8
+ ,179.6
+ ,1.92
+ ,179.7
+ ,1.92
+ ,179.7
+ ,1.97
+ ,179.8
+ ,2.46
+ ,179.9
+ ,2.36
+ ,180.2
+ ,2.53
+ ,180.4
+ ,2.31
+ ,180.4
+ ,1.98
+ ,181.3
+ ,1.46
+ ,181.9
+ ,1.26
+ ,182.5
+ ,1.58
+ ,182.7
+ ,1.74
+ ,183.1
+ ,1.89
+ ,183.6
+ ,1.85
+ ,183.7
+ ,1.62
+ ,183.8
+ ,1.3
+ ,183.9
+ ,1.42
+ ,184.1
+ ,1.15
+ ,184.4
+ ,0.42
+ ,184.5
+ ,0.74
+ ,185.9
+ ,1.02
+ ,186.6
+ ,1.51
+ ,187.6
+ ,1.86
+ ,187.8
+ ,1.59
+ ,187.9
+ ,1.03
+ ,188
+ ,0.44
+ ,188.3
+ ,0.82
+ ,188.4
+ ,0.86
+ ,188.5
+ ,0.58
+ ,188.5
+ ,0.59
+ ,188.6
+ ,0.95
+ ,188.6
+ ,0.98
+ ,189.4
+ ,1.23
+ ,190
+ ,1.17
+ ,191.9
+ ,0.84
+ ,192.5
+ ,0.74
+ ,193
+ ,0.65
+ ,193.5
+ ,0.91
+ ,193.9
+ ,1.19
+ ,194.2
+ ,1.3
+ ,194.9
+ ,1.53
+ ,194.9
+ ,1.94
+ ,194.9
+ ,1.79
+ ,194.9
+ ,1.95
+ ,195.5
+ ,2.26
+ ,196
+ ,2.04
+ ,196.2
+ ,2.16
+ ,196.2
+ ,2.75
+ ,196.2
+ ,2.79
+ ,196.2
+ ,2.88
+ ,197
+ ,3.36
+ ,197.7
+ ,2.97
+ ,198
+ ,3.1
+ ,198.2
+ ,2.49
+ ,198.5
+ ,2.2
+ ,198.6
+ ,2.25
+ ,199.5
+ ,2.09
+ ,200
+ ,2.79
+ ,201.3
+ ,3.14
+ ,202.2
+ ,2.93
+ ,202.9
+ ,2.65
+ ,203.5
+ ,2.67
+ ,203.5
+ ,2.26
+ ,204
+ ,2.35
+ ,204.1
+ ,2.13
+ ,204.3
+ ,2.18
+ ,204.5
+ ,2.9
+ ,204.8
+ ,2.63
+ ,205.1
+ ,2.67
+ ,205.7
+ ,1.81
+ ,206.5
+ ,1.33
+ ,206.9
+ ,0.88
+ ,207.1
+ ,1.28
+ ,207.8
+ ,1.26
+ ,208
+ ,1.26
+ ,208.5
+ ,1.29
+ ,208.6
+ ,1.1
+ ,209
+ ,1.37
+ ,209.1
+ ,1.21
+ ,209.7
+ ,1.74
+ ,209.8
+ ,1.76
+ ,209.9
+ ,1.48
+ ,210
+ ,1.04
+ ,210.8
+ ,1.62
+ ,211.4
+ ,1.49
+ ,211.7
+ ,1.79
+ ,212
+ ,1.8
+ ,212.2
+ ,1.58
+ ,212.4
+ ,1.86
+ ,212.9
+ ,1.74
+ ,213.4
+ ,1.59
+ ,213.7
+ ,1.26
+ ,214
+ ,1.13
+ ,214.3
+ ,1.92
+ ,214.8
+ ,2.61
+ ,215
+ ,2.26
+ ,215.9
+ ,2.41
+ ,216.4
+ ,2.26
+ ,216.9
+ ,2.03
+ ,217.2
+ ,2.86
+ ,217.5
+ ,2.55
+ ,217.9
+ ,2.27
+ ,218.1
+ ,2.26
+ ,218.6
+ ,2.57
+ ,218.9
+ ,3.07
+ ,219.3
+ ,2.76
+ ,220.4
+ ,2.51
+ ,220.9
+ ,2.87
+ ,221
+ ,3.14
+ ,221.8
+ ,3.11
+ ,222
+ ,3.16
+ ,222.2
+ ,2.47
+ ,222.5
+ ,2.57
+ ,222.9
+ ,2.89
+ ,223.1
+ ,2.63
+ ,223.4
+ ,2.38
+ ,224
+ ,1.69
+ ,225.1
+ ,1.96
+ ,225.5
+ ,2.19
+ ,225.9
+ ,1.87
+ ,226.3
+ ,1.6
+ ,226.5
+ ,1.63
+ ,227
+ ,1.22
+ ,227.3
+ ,1.21
+ ,227.8
+ ,1.49
+ ,228.1
+ ,1.64
+ ,228.4
+ ,1.66
+ ,228.5
+ ,1.77
+ ,228.8
+ ,1.82
+ ,229
+ ,1.78
+ ,229.1
+ ,1.28
+ ,229.3
+ ,1.29
+ ,229.6
+ ,1.37
+ ,229.9
+ ,1.12
+ ,230
+ ,1.51
+ ,230.2
+ ,2.24
+ ,230.8
+ ,2.94
+ ,231
+ ,3.09
+ ,231.7
+ ,3.46
+ ,231.9
+ ,3.64
+ ,233
+ ,4.39
+ ,235.1
+ ,4.15
+ ,236
+ ,5.21
+ ,236.9
+ ,5.8
+ ,237.1
+ ,5.91
+ ,237.5
+ ,5.39
+ ,238.2
+ ,5.46
+ ,238.9
+ ,4.72
+ ,239.1
+ ,3.14
+ ,240
+ ,2.63
+ ,240.2
+ ,2.32
+ ,240.5
+ ,1.93
+ ,240.7
+ ,0.62
+ ,241.1
+ ,0.6
+ ,241.4
+ ,-0.37
+ ,242.2
+ ,-1.1
+ ,242.9
+ ,-1.68
+ ,243.2
+ ,-0.78
+ ,243.9)
+ ,dim=c(2
+ ,224)
+ ,dimnames=list(c('Y'
+ ,'X')
+ ,1:224))
> y <- array(NA,dim=c(2,224),dimnames=list(c('Y','X'),1:224))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par20 = ''
> par19 = ''
> par18 = ''
> par17 = ''
> par16 = ''
> par15 = ''
> par14 = ''
> par13 = ''
> par12 = ''
> par11 = ''
> par10 = ''
> par9 = ''
> par8 = ''
> par7 = ''
> par6 = ''
> par5 = ''
> par4 = ''
> par3 = 'Linear Trend'
> par2 = 'Include Monthly Dummies'
> par1 = '1'
> ylab = ''
> xlab = ''
> main = ''
> #'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 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 3.88 153.3 1 0 0 0 0 0 0 0 0 0 0 1
2 3.98 154.5 0 1 0 0 0 0 0 0 0 0 0 2
3 3.29 155.2 0 0 1 0 0 0 0 0 0 0 0 3
4 2.88 156.9 0 0 0 1 0 0 0 0 0 0 0 4
5 3.22 157.0 0 0 0 0 1 0 0 0 0 0 0 5
6 3.62 157.4 0 0 0 0 0 1 0 0 0 0 0 6
7 3.82 157.2 0 0 0 0 0 0 1 0 0 0 0 7
8 3.54 157.5 0 0 0 0 0 0 0 1 0 0 0 8
9 2.53 158.0 0 0 0 0 0 0 0 0 1 0 0 9
10 2.22 158.5 0 0 0 0 0 0 0 0 0 1 0 10
11 2.85 159.0 0 0 0 0 0 0 0 0 0 0 1 11
12 2.78 159.3 0 0 0 0 0 0 0 0 0 0 0 12
13 2.28 160.0 1 0 0 0 0 0 0 0 0 0 0 13
14 2.26 160.8 0 1 0 0 0 0 0 0 0 0 0 14
15 2.71 161.9 0 0 1 0 0 0 0 0 0 0 0 15
16 2.77 162.5 0 0 0 1 0 0 0 0 0 0 0 16
17 2.77 162.7 0 0 0 0 1 0 0 0 0 0 0 17
18 2.64 162.8 0 0 0 0 0 1 0 0 0 0 0 18
19 2.56 162.9 0 0 0 0 0 0 1 0 0 0 0 19
20 2.07 163.0 0 0 0 0 0 0 0 1 0 0 0 20
21 2.32 164.0 0 0 0 0 0 0 0 0 1 0 0 21
22 2.16 164.7 0 0 0 0 0 0 0 0 0 1 0 22
23 2.23 164.8 0 0 0 0 0 0 0 0 0 0 1 23
24 2.40 164.9 0 0 0 0 0 0 0 0 0 0 0 24
25 2.84 165.0 1 0 0 0 0 0 0 0 0 0 0 25
26 2.77 165.8 0 1 0 0 0 0 0 0 0 0 0 26
27 2.93 166.1 0 0 1 0 0 0 0 0 0 0 0 27
28 2.91 167.2 0 0 0 1 0 0 0 0 0 0 0 28
29 2.69 167.7 0 0 0 0 1 0 0 0 0 0 0 29
30 2.38 168.3 0 0 0 0 0 1 0 0 0 0 0 30
31 2.58 168.6 0 0 0 0 0 0 1 0 0 0 0 31
32 3.19 168.9 0 0 0 0 0 0 0 1 0 0 0 32
33 2.82 169.1 0 0 0 0 0 0 0 0 1 0 0 33
34 2.72 169.5 0 0 0 0 0 0 0 0 0 1 0 34
35 2.53 169.6 0 0 0 0 0 0 0 0 0 0 1 35
36 2.70 169.7 0 0 0 0 0 0 0 0 0 0 0 36
37 2.42 169.8 1 0 0 0 0 0 0 0 0 0 0 37
38 2.50 170.4 0 1 0 0 0 0 0 0 0 0 0 38
39 2.31 170.9 0 0 1 0 0 0 0 0 0 0 0 39
40 2.41 171.9 0 0 0 1 0 0 0 0 0 0 0 40
41 2.56 171.9 0 0 0 0 1 0 0 0 0 0 0 41
42 2.76 172.0 0 0 0 0 0 1 0 0 0 0 0 42
43 2.71 172.0 0 0 0 0 0 0 1 0 0 0 0 43
44 2.44 172.4 0 0 0 0 0 0 0 1 0 0 0 44
45 2.46 173.0 0 0 0 0 0 0 0 0 1 0 0 45
46 2.12 173.7 0 0 0 0 0 0 0 0 0 1 0 46
47 1.99 173.8 0 0 0 0 0 0 0 0 0 0 1 47
48 1.86 173.8 0 0 0 0 0 0 0 0 0 0 0 48
49 1.88 173.9 1 0 0 0 0 0 0 0 0 0 0 49
50 1.82 174.6 0 1 0 0 0 0 0 0 0 0 0 50
51 1.74 175.0 0 0 1 0 0 0 0 0 0 0 0 51
52 1.71 175.9 0 0 0 1 0 0 0 0 0 0 0 52
53 1.38 176.0 0 0 0 0 1 0 0 0 0 0 0 53
54 1.27 175.1 0 0 0 0 0 1 0 0 0 0 0 54
55 1.19 175.6 0 0 0 0 0 0 1 0 0 0 0 55
56 1.28 175.9 0 0 0 0 0 0 0 1 0 0 0 56
57 1.19 176.7 0 0 0 0 0 0 0 0 1 0 0 57
58 1.22 176.1 0 0 0 0 0 0 0 0 0 1 0 58
59 1.47 176.1 0 0 0 0 0 0 0 0 0 0 1 59
60 1.46 176.2 0 0 0 0 0 0 0 0 0 0 0 60
61 1.96 176.3 1 0 0 0 0 0 0 0 0 0 0 61
62 1.88 177.8 0 1 0 0 0 0 0 0 0 0 0 62
63 2.03 178.5 0 0 1 0 0 0 0 0 0 0 0 63
64 2.04 179.4 0 0 0 1 0 0 0 0 0 0 0 64
65 1.90 179.5 0 0 0 0 1 0 0 0 0 0 0 65
66 1.80 179.6 0 0 0 0 0 1 0 0 0 0 0 66
67 1.92 179.7 0 0 0 0 0 0 1 0 0 0 0 67
68 1.92 179.7 0 0 0 0 0 0 0 1 0 0 0 68
69 1.97 179.8 0 0 0 0 0 0 0 0 1 0 0 69
70 2.46 179.9 0 0 0 0 0 0 0 0 0 1 0 70
71 2.36 180.2 0 0 0 0 0 0 0 0 0 0 1 71
72 2.53 180.4 0 0 0 0 0 0 0 0 0 0 0 72
73 2.31 180.4 1 0 0 0 0 0 0 0 0 0 0 73
74 1.98 181.3 0 1 0 0 0 0 0 0 0 0 0 74
75 1.46 181.9 0 0 1 0 0 0 0 0 0 0 0 75
76 1.26 182.5 0 0 0 1 0 0 0 0 0 0 0 76
77 1.58 182.7 0 0 0 0 1 0 0 0 0 0 0 77
78 1.74 183.1 0 0 0 0 0 1 0 0 0 0 0 78
79 1.89 183.6 0 0 0 0 0 0 1 0 0 0 0 79
80 1.85 183.7 0 0 0 0 0 0 0 1 0 0 0 80
81 1.62 183.8 0 0 0 0 0 0 0 0 1 0 0 81
82 1.30 183.9 0 0 0 0 0 0 0 0 0 1 0 82
83 1.42 184.1 0 0 0 0 0 0 0 0 0 0 1 83
84 1.15 184.4 0 0 0 0 0 0 0 0 0 0 0 84
85 0.42 184.5 1 0 0 0 0 0 0 0 0 0 0 85
86 0.74 185.9 0 1 0 0 0 0 0 0 0 0 0 86
87 1.02 186.6 0 0 1 0 0 0 0 0 0 0 0 87
88 1.51 187.6 0 0 0 1 0 0 0 0 0 0 0 88
89 1.86 187.8 0 0 0 0 1 0 0 0 0 0 0 89
90 1.59 187.9 0 0 0 0 0 1 0 0 0 0 0 90
91 1.03 188.0 0 0 0 0 0 0 1 0 0 0 0 91
92 0.44 188.3 0 0 0 0 0 0 0 1 0 0 0 92
93 0.82 188.4 0 0 0 0 0 0 0 0 1 0 0 93
94 0.86 188.5 0 0 0 0 0 0 0 0 0 1 0 94
95 0.58 188.5 0 0 0 0 0 0 0 0 0 0 1 95
96 0.59 188.6 0 0 0 0 0 0 0 0 0 0 0 96
97 0.95 188.6 1 0 0 0 0 0 0 0 0 0 0 97
98 0.98 189.4 0 1 0 0 0 0 0 0 0 0 0 98
99 1.23 190.0 0 0 1 0 0 0 0 0 0 0 0 99
100 1.17 191.9 0 0 0 1 0 0 0 0 0 0 0 100
101 0.84 192.5 0 0 0 0 1 0 0 0 0 0 0 101
102 0.74 193.0 0 0 0 0 0 1 0 0 0 0 0 102
103 0.65 193.5 0 0 0 0 0 0 1 0 0 0 0 103
104 0.91 193.9 0 0 0 0 0 0 0 1 0 0 0 104
105 1.19 194.2 0 0 0 0 0 0 0 0 1 0 0 105
106 1.30 194.9 0 0 0 0 0 0 0 0 0 1 0 106
107 1.53 194.9 0 0 0 0 0 0 0 0 0 0 1 107
108 1.94 194.9 0 0 0 0 0 0 0 0 0 0 0 108
109 1.79 194.9 1 0 0 0 0 0 0 0 0 0 0 109
110 1.95 195.5 0 1 0 0 0 0 0 0 0 0 0 110
111 2.26 196.0 0 0 1 0 0 0 0 0 0 0 0 111
112 2.04 196.2 0 0 0 1 0 0 0 0 0 0 0 112
113 2.16 196.2 0 0 0 0 1 0 0 0 0 0 0 113
114 2.75 196.2 0 0 0 0 0 1 0 0 0 0 0 114
115 2.79 196.2 0 0 0 0 0 0 1 0 0 0 0 115
116 2.88 197.0 0 0 0 0 0 0 0 1 0 0 0 116
117 3.36 197.7 0 0 0 0 0 0 0 0 1 0 0 117
118 2.97 198.0 0 0 0 0 0 0 0 0 0 1 0 118
119 3.10 198.2 0 0 0 0 0 0 0 0 0 0 1 119
120 2.49 198.5 0 0 0 0 0 0 0 0 0 0 0 120
121 2.20 198.6 1 0 0 0 0 0 0 0 0 0 0 121
122 2.25 199.5 0 1 0 0 0 0 0 0 0 0 0 122
123 2.09 200.0 0 0 1 0 0 0 0 0 0 0 0 123
124 2.79 201.3 0 0 0 1 0 0 0 0 0 0 0 124
125 3.14 202.2 0 0 0 0 1 0 0 0 0 0 0 125
126 2.93 202.9 0 0 0 0 0 1 0 0 0 0 0 126
127 2.65 203.5 0 0 0 0 0 0 1 0 0 0 0 127
128 2.67 203.5 0 0 0 0 0 0 0 1 0 0 0 128
129 2.26 204.0 0 0 0 0 0 0 0 0 1 0 0 129
130 2.35 204.1 0 0 0 0 0 0 0 0 0 1 0 130
131 2.13 204.3 0 0 0 0 0 0 0 0 0 0 1 131
132 2.18 204.5 0 0 0 0 0 0 0 0 0 0 0 132
133 2.90 204.8 1 0 0 0 0 0 0 0 0 0 0 133
134 2.63 205.1 0 1 0 0 0 0 0 0 0 0 0 134
135 2.67 205.7 0 0 1 0 0 0 0 0 0 0 0 135
136 1.81 206.5 0 0 0 1 0 0 0 0 0 0 0 136
137 1.33 206.9 0 0 0 0 1 0 0 0 0 0 0 137
138 0.88 207.1 0 0 0 0 0 1 0 0 0 0 0 138
139 1.28 207.8 0 0 0 0 0 0 1 0 0 0 0 139
140 1.26 208.0 0 0 0 0 0 0 0 1 0 0 0 140
141 1.26 208.5 0 0 0 0 0 0 0 0 1 0 0 141
142 1.29 208.6 0 0 0 0 0 0 0 0 0 1 0 142
143 1.10 209.0 0 0 0 0 0 0 0 0 0 0 1 143
144 1.37 209.1 0 0 0 0 0 0 0 0 0 0 0 144
145 1.21 209.7 1 0 0 0 0 0 0 0 0 0 0 145
146 1.74 209.8 0 1 0 0 0 0 0 0 0 0 0 146
147 1.76 209.9 0 0 1 0 0 0 0 0 0 0 0 147
148 1.48 210.0 0 0 0 1 0 0 0 0 0 0 0 148
149 1.04 210.8 0 0 0 0 1 0 0 0 0 0 0 149
150 1.62 211.4 0 0 0 0 0 1 0 0 0 0 0 150
151 1.49 211.7 0 0 0 0 0 0 1 0 0 0 0 151
152 1.79 212.0 0 0 0 0 0 0 0 1 0 0 0 152
153 1.80 212.2 0 0 0 0 0 0 0 0 1 0 0 153
154 1.58 212.4 0 0 0 0 0 0 0 0 0 1 0 154
155 1.86 212.9 0 0 0 0 0 0 0 0 0 0 1 155
156 1.74 213.4 0 0 0 0 0 0 0 0 0 0 0 156
157 1.59 213.7 1 0 0 0 0 0 0 0 0 0 0 157
158 1.26 214.0 0 1 0 0 0 0 0 0 0 0 0 158
159 1.13 214.3 0 0 1 0 0 0 0 0 0 0 0 159
160 1.92 214.8 0 0 0 1 0 0 0 0 0 0 0 160
161 2.61 215.0 0 0 0 0 1 0 0 0 0 0 0 161
162 2.26 215.9 0 0 0 0 0 1 0 0 0 0 0 162
163 2.41 216.4 0 0 0 0 0 0 1 0 0 0 0 163
164 2.26 216.9 0 0 0 0 0 0 0 1 0 0 0 164
165 2.03 217.2 0 0 0 0 0 0 0 0 1 0 0 165
166 2.86 217.5 0 0 0 0 0 0 0 0 0 1 0 166
167 2.55 217.9 0 0 0 0 0 0 0 0 0 0 1 167
168 2.27 218.1 0 0 0 0 0 0 0 0 0 0 0 168
169 2.26 218.6 1 0 0 0 0 0 0 0 0 0 0 169
170 2.57 218.9 0 1 0 0 0 0 0 0 0 0 0 170
171 3.07 219.3 0 0 1 0 0 0 0 0 0 0 0 171
172 2.76 220.4 0 0 0 1 0 0 0 0 0 0 0 172
173 2.51 220.9 0 0 0 0 1 0 0 0 0 0 0 173
174 2.87 221.0 0 0 0 0 0 1 0 0 0 0 0 174
175 3.14 221.8 0 0 0 0 0 0 1 0 0 0 0 175
176 3.11 222.0 0 0 0 0 0 0 0 1 0 0 0 176
177 3.16 222.2 0 0 0 0 0 0 0 0 1 0 0 177
178 2.47 222.5 0 0 0 0 0 0 0 0 0 1 0 178
179 2.57 222.9 0 0 0 0 0 0 0 0 0 0 1 179
180 2.89 223.1 0 0 0 0 0 0 0 0 0 0 0 180
181 2.63 223.4 1 0 0 0 0 0 0 0 0 0 0 181
182 2.38 224.0 0 1 0 0 0 0 0 0 0 0 0 182
183 1.69 225.1 0 0 1 0 0 0 0 0 0 0 0 183
184 1.96 225.5 0 0 0 1 0 0 0 0 0 0 0 184
185 2.19 225.9 0 0 0 0 1 0 0 0 0 0 0 185
186 1.87 226.3 0 0 0 0 0 1 0 0 0 0 0 186
187 1.60 226.5 0 0 0 0 0 0 1 0 0 0 0 187
188 1.63 227.0 0 0 0 0 0 0 0 1 0 0 0 188
189 1.22 227.3 0 0 0 0 0 0 0 0 1 0 0 189
190 1.21 227.8 0 0 0 0 0 0 0 0 0 1 0 190
191 1.49 228.1 0 0 0 0 0 0 0 0 0 0 1 191
192 1.64 228.4 0 0 0 0 0 0 0 0 0 0 0 192
193 1.66 228.5 1 0 0 0 0 0 0 0 0 0 0 193
194 1.77 228.8 0 1 0 0 0 0 0 0 0 0 0 194
195 1.82 229.0 0 0 1 0 0 0 0 0 0 0 0 195
196 1.78 229.1 0 0 0 1 0 0 0 0 0 0 0 196
197 1.28 229.3 0 0 0 0 1 0 0 0 0 0 0 197
198 1.29 229.6 0 0 0 0 0 1 0 0 0 0 0 198
199 1.37 229.9 0 0 0 0 0 0 1 0 0 0 0 199
200 1.12 230.0 0 0 0 0 0 0 0 1 0 0 0 200
201 1.51 230.2 0 0 0 0 0 0 0 0 1 0 0 201
202 2.24 230.8 0 0 0 0 0 0 0 0 0 1 0 202
203 2.94 231.0 0 0 0 0 0 0 0 0 0 0 1 203
204 3.09 231.7 0 0 0 0 0 0 0 0 0 0 0 204
205 3.46 231.9 1 0 0 0 0 0 0 0 0 0 0 205
206 3.64 233.0 0 1 0 0 0 0 0 0 0 0 0 206
207 4.39 235.1 0 0 1 0 0 0 0 0 0 0 0 207
208 4.15 236.0 0 0 0 1 0 0 0 0 0 0 0 208
209 5.21 236.9 0 0 0 0 1 0 0 0 0 0 0 209
210 5.80 237.1 0 0 0 0 0 1 0 0 0 0 0 210
211 5.91 237.5 0 0 0 0 0 0 1 0 0 0 0 211
212 5.39 238.2 0 0 0 0 0 0 0 1 0 0 0 212
213 5.46 238.9 0 0 0 0 0 0 0 0 1 0 0 213
214 4.72 239.1 0 0 0 0 0 0 0 0 0 1 0 214
215 3.14 240.0 0 0 0 0 0 0 0 0 0 0 1 215
216 2.63 240.2 0 0 0 0 0 0 0 0 0 0 0 216
217 2.32 240.5 1 0 0 0 0 0 0 0 0 0 0 217
218 1.93 240.7 0 1 0 0 0 0 0 0 0 0 0 218
219 0.62 241.1 0 0 1 0 0 0 0 0 0 0 0 219
220 0.60 241.4 0 0 0 1 0 0 0 0 0 0 0 220
221 -0.37 242.2 0 0 0 0 1 0 0 0 0 0 0 221
222 -1.10 242.9 0 0 0 0 0 1 0 0 0 0 0 222
223 -1.68 243.2 0 0 0 0 0 0 1 0 0 0 0 223
224 -0.78 243.9 0 0 0 0 0 0 0 1 0 0 0 224
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) X M1 M2 M3 M4
-25.413363 0.179230 0.095281 0.042134 -0.042236 -0.132143
M5 M6 M7 M8 M9 M10
-0.132177 -0.124486 -0.132565 -0.139372 0.001237 -0.033630
M11 t
-0.023518 -0.069573
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4.20795 -0.54795 -0.07402 0.48121 3.56878
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -25.413363 7.882439 -3.224 0.001466 **
X 0.179230 0.051143 3.505 0.000559 ***
M1 0.095281 0.335873 0.284 0.776934
M2 0.042134 0.335719 0.126 0.900245
M3 -0.042236 0.336122 -0.126 0.900125
M4 -0.132143 0.337958 -0.391 0.696190
M5 -0.132177 0.337897 -0.391 0.696063
M6 -0.124486 0.337376 -0.369 0.712511
M7 -0.132565 0.337046 -0.393 0.694487
M8 -0.139372 0.336799 -0.414 0.679433
M9 0.001237 0.340701 0.004 0.997106
M10 -0.033630 0.340469 -0.099 0.921412
M11 -0.023518 0.340263 -0.069 0.944963
t -0.069573 0.019631 -3.544 0.000486 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.02 on 210 degrees of freedom
Multiple R-squared: 0.0592, Adjusted R-squared: 0.0009601
F-statistic: 1.016 on 13 and 210 DF, p-value: 0.4365
> 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.055692e-01 2.111383e-01 0.8944308
[2,] 5.831221e-02 1.166244e-01 0.9416878
[3,] 2.940251e-02 5.880503e-02 0.9705975
[4,] 1.848729e-02 3.697457e-02 0.9815127
[5,] 1.409198e-02 2.818395e-02 0.9859080
[6,] 1.234890e-02 2.469781e-02 0.9876511
[7,] 5.341217e-03 1.068243e-02 0.9946588
[8,] 2.455583e-03 4.911167e-03 0.9975444
[9,] 1.922523e-03 3.845046e-03 0.9980775
[10,] 8.969970e-04 1.793994e-03 0.9991030
[11,] 3.756377e-04 7.512754e-04 0.9996244
[12,] 1.570716e-04 3.141432e-04 0.9998429
[13,] 5.857998e-05 1.171600e-04 0.9999414
[14,] 2.272649e-05 4.545297e-05 0.9999773
[15,] 8.447641e-06 1.689528e-05 0.9999916
[16,] 3.526491e-05 7.052982e-05 0.9999647
[17,] 3.385669e-05 6.771338e-05 0.9999661
[18,] 2.798906e-05 5.597811e-05 0.9999720
[19,] 1.144841e-05 2.289682e-05 0.9999886
[20,] 4.647617e-06 9.295234e-06 0.9999954
[21,] 2.716661e-06 5.433322e-06 0.9999973
[22,] 1.666321e-06 3.332642e-06 0.9999983
[23,] 1.329583e-06 2.659166e-06 0.9999987
[24,] 6.654128e-07 1.330826e-06 0.9999993
[25,] 3.093281e-07 6.186563e-07 0.9999997
[26,] 1.305486e-07 2.610972e-07 0.9999999
[27,] 6.061317e-08 1.212263e-07 0.9999999
[28,] 3.099191e-08 6.198382e-08 1.0000000
[29,] 1.197379e-08 2.394758e-08 1.0000000
[30,] 4.419980e-09 8.839960e-09 1.0000000
[31,] 2.095207e-09 4.190414e-09 1.0000000
[32,] 1.500446e-09 3.000893e-09 1.0000000
[33,] 1.099586e-09 2.199172e-09 1.0000000
[34,] 8.957159e-10 1.791432e-09 1.0000000
[35,] 6.924670e-10 1.384934e-09 1.0000000
[36,] 4.425739e-10 8.851478e-10 1.0000000
[37,] 6.504145e-10 1.300829e-09 1.0000000
[38,] 1.027810e-09 2.055621e-09 1.0000000
[39,] 1.400153e-09 2.800305e-09 1.0000000
[40,] 9.253783e-10 1.850757e-09 1.0000000
[41,] 4.532949e-10 9.065898e-10 1.0000000
[42,] 1.830545e-10 3.661089e-10 1.0000000
[43,] 7.712569e-11 1.542514e-10 1.0000000
[44,] 3.068084e-11 6.136168e-11 1.0000000
[45,] 1.947884e-11 3.895768e-11 1.0000000
[46,] 9.158267e-12 1.831653e-11 1.0000000
[47,] 5.803640e-12 1.160728e-11 1.0000000
[48,] 3.976949e-12 7.953898e-12 1.0000000
[49,] 2.033884e-12 4.067767e-12 1.0000000
[50,] 8.746712e-13 1.749342e-12 1.0000000
[51,] 4.090471e-13 8.180942e-13 1.0000000
[52,] 2.045294e-13 4.090587e-13 1.0000000
[53,] 1.630085e-13 3.260169e-13 1.0000000
[54,] 9.068408e-13 1.813682e-12 1.0000000
[55,] 1.435751e-12 2.871503e-12 1.0000000
[56,] 2.860251e-12 5.720502e-12 1.0000000
[57,] 2.020286e-12 4.040571e-12 1.0000000
[58,] 8.984654e-13 1.796931e-12 1.0000000
[59,] 4.080046e-13 8.160093e-13 1.0000000
[60,] 2.230522e-13 4.461044e-13 1.0000000
[61,] 8.864185e-14 1.772837e-13 1.0000000
[62,] 3.580918e-14 7.161837e-14 1.0000000
[63,] 1.586885e-14 3.173770e-14 1.0000000
[64,] 6.917035e-15 1.383407e-14 1.0000000
[65,] 2.703611e-15 5.407221e-15 1.0000000
[66,] 1.047957e-15 2.095914e-15 1.0000000
[67,] 3.922442e-16 7.844883e-16 1.0000000
[68,] 1.896631e-16 3.793261e-16 1.0000000
[69,] 8.649320e-16 1.729864e-15 1.0000000
[70,] 8.205012e-16 1.641002e-15 1.0000000
[71,] 3.719572e-16 7.439144e-16 1.0000000
[72,] 1.567215e-16 3.134430e-16 1.0000000
[73,] 1.064976e-16 2.129953e-16 1.0000000
[74,] 4.535753e-17 9.071506e-17 1.0000000
[75,] 2.104320e-17 4.208641e-17 1.0000000
[76,] 3.213577e-17 6.427154e-17 1.0000000
[77,] 1.642073e-17 3.284147e-17 1.0000000
[78,] 7.494908e-18 1.498982e-17 1.0000000
[79,] 5.763923e-18 1.152785e-17 1.0000000
[80,] 4.324959e-18 8.649917e-18 1.0000000
[81,] 1.909525e-18 3.819049e-18 1.0000000
[82,] 8.277112e-19 1.655422e-18 1.0000000
[83,] 3.548712e-19 7.097424e-19 1.0000000
[84,] 1.478199e-19 2.956397e-19 1.0000000
[85,] 6.564851e-20 1.312970e-19 1.0000000
[86,] 3.179337e-20 6.358674e-20 1.0000000
[87,] 1.685331e-20 3.370662e-20 1.0000000
[88,] 7.498552e-21 1.499710e-20 1.0000000
[89,] 5.474027e-21 1.094805e-20 1.0000000
[90,] 5.765318e-21 1.153064e-20 1.0000000
[91,] 7.977519e-21 1.595504e-20 1.0000000
[92,] 3.323367e-20 6.646733e-20 1.0000000
[93,] 5.627772e-20 1.125554e-19 1.0000000
[94,] 1.297373e-19 2.594745e-19 1.0000000
[95,] 7.543692e-19 1.508738e-18 1.0000000
[96,] 1.674353e-18 3.348707e-18 1.0000000
[97,] 4.345835e-18 8.691670e-18 1.0000000
[98,] 8.612134e-17 1.722427e-16 1.0000000
[99,] 1.228200e-15 2.456400e-15 1.0000000
[100,] 1.913865e-14 3.827731e-14 1.0000000
[101,] 1.157773e-12 2.315547e-12 1.0000000
[102,] 1.034812e-11 2.069624e-11 1.0000000
[103,] 7.903320e-11 1.580664e-10 1.0000000
[104,] 1.154371e-10 2.308742e-10 1.0000000
[105,] 9.899125e-11 1.979825e-10 1.0000000
[106,] 8.529557e-11 1.705911e-10 1.0000000
[107,] 6.051317e-11 1.210263e-10 1.0000000
[108,] 1.120112e-10 2.240224e-10 1.0000000
[109,] 3.484464e-10 6.968928e-10 1.0000000
[110,] 5.798561e-10 1.159712e-09 1.0000000
[111,] 5.805974e-10 1.161195e-09 1.0000000
[112,] 6.153968e-10 1.230794e-09 1.0000000
[113,] 3.868027e-10 7.736054e-10 1.0000000
[114,] 2.738929e-10 5.477859e-10 1.0000000
[115,] 1.584580e-10 3.169160e-10 1.0000000
[116,] 9.325295e-11 1.865059e-10 1.0000000
[117,] 1.053208e-10 2.106416e-10 1.0000000
[118,] 8.790117e-11 1.758023e-10 1.0000000
[119,] 7.984932e-11 1.596986e-10 1.0000000
[120,] 4.135665e-11 8.271329e-11 1.0000000
[121,] 2.432375e-11 4.864751e-11 1.0000000
[122,] 2.118543e-11 4.237085e-11 1.0000000
[123,] 1.271118e-11 2.542237e-11 1.0000000
[124,] 7.357361e-12 1.471472e-11 1.0000000
[125,] 4.576538e-12 9.153076e-12 1.0000000
[126,] 2.685700e-12 5.371400e-12 1.0000000
[127,] 1.859124e-12 3.718247e-12 1.0000000
[128,] 1.028770e-12 2.057539e-12 1.0000000
[129,] 6.859556e-13 1.371911e-12 1.0000000
[130,] 3.297985e-13 6.595969e-13 1.0000000
[131,] 1.554373e-13 3.108746e-13 1.0000000
[132,] 7.567111e-14 1.513422e-13 1.0000000
[133,] 4.999463e-14 9.998926e-14 1.0000000
[134,] 2.353830e-14 4.707660e-14 1.0000000
[135,] 1.126425e-14 2.252850e-14 1.0000000
[136,] 5.223211e-15 1.044642e-14 1.0000000
[137,] 2.848270e-15 5.696540e-15 1.0000000
[138,] 1.672204e-15 3.344409e-15 1.0000000
[139,] 8.806134e-16 1.761227e-15 1.0000000
[140,] 4.539789e-16 9.079578e-16 1.0000000
[141,] 2.437197e-16 4.874395e-16 1.0000000
[142,] 1.716357e-16 3.432715e-16 1.0000000
[143,] 1.258492e-16 2.516985e-16 1.0000000
[144,] 6.329796e-17 1.265959e-16 1.0000000
[145,] 5.722676e-17 1.144535e-16 1.0000000
[146,] 3.066607e-17 6.133215e-17 1.0000000
[147,] 1.784986e-17 3.569972e-17 1.0000000
[148,] 8.938740e-18 1.787748e-17 1.0000000
[149,] 5.374969e-18 1.074994e-17 1.0000000
[150,] 5.737107e-18 1.147421e-17 1.0000000
[151,] 3.668820e-18 7.337639e-18 1.0000000
[152,] 1.927212e-18 3.854424e-18 1.0000000
[153,] 9.173480e-19 1.834696e-18 1.0000000
[154,] 5.079931e-19 1.015986e-18 1.0000000
[155,] 5.496668e-19 1.099334e-18 1.0000000
[156,] 3.368610e-19 6.737220e-19 1.0000000
[157,] 1.515625e-19 3.031250e-19 1.0000000
[158,] 1.036997e-19 2.073993e-19 1.0000000
[159,] 1.005738e-19 2.011475e-19 1.0000000
[160,] 9.885561e-20 1.977112e-19 1.0000000
[161,] 8.061983e-20 1.612397e-19 1.0000000
[162,] 3.364604e-20 6.729208e-20 1.0000000
[163,] 1.366695e-20 2.733389e-20 1.0000000
[164,] 7.212575e-21 1.442515e-20 1.0000000
[165,] 2.712146e-21 5.424293e-21 1.0000000
[166,] 9.078240e-22 1.815648e-21 1.0000000
[167,] 3.928260e-22 7.856520e-22 1.0000000
[168,] 1.288906e-22 2.577812e-22 1.0000000
[169,] 3.931734e-23 7.863468e-23 1.0000000
[170,] 1.273819e-23 2.547638e-23 1.0000000
[171,] 4.734289e-24 9.468578e-24 1.0000000
[172,] 1.740507e-24 3.481014e-24 1.0000000
[173,] 5.432348e-24 1.086470e-23 1.0000000
[174,] 4.370407e-23 8.740813e-23 1.0000000
[175,] 2.302101e-22 4.604203e-22 1.0000000
[176,] 2.189536e-21 4.379071e-21 1.0000000
[177,] 1.895723e-19 3.791445e-19 1.0000000
[178,] 1.885217e-16 3.770434e-16 1.0000000
[179,] 1.921972e-14 3.843944e-14 1.0000000
[180,] 1.010450e-12 2.020900e-12 1.0000000
[181,] 3.769726e-11 7.539453e-11 1.0000000
[182,] 2.558659e-09 5.117317e-09 1.0000000
[183,] 4.375816e-07 8.751632e-07 0.9999996
[184,] 6.916759e-05 1.383352e-04 0.9999308
[185,] 1.634947e-03 3.269894e-03 0.9983651
[186,] 3.873247e-02 7.746495e-02 0.9612675
[187,] 2.515256e-02 5.030512e-02 0.9748474
[188,] 1.658335e-02 3.316670e-02 0.9834166
[189,] 1.005633e-02 2.011265e-02 0.9899437
[190,] 1.153690e-02 2.307380e-02 0.9884631
[191,] 2.273869e-01 4.547738e-01 0.7726131
> postscript(file="/var/www/html/rcomp/tmp/1zqkz1258639400.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/2jpb61258639400.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/3bjn91258639400.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/4l8331258639400.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/5mpxv1258639400.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 = 224
Frequency = 1
1 2 3 4 5 6
1.791736338 1.799380572 1.137862435 0.582652825 0.974336753 1.364527151
7 8 9 10 11 12
1.678024595 1.420635904 0.249984804 -0.045190198 0.554656196 0.476942606
13 14 15 16 17 18
-0.174226009 -0.214889879 0.191900088 0.303843191 0.337604146 0.251563465
19 20 21 22 23 24
0.231291988 -0.200250755 -0.200516725 -0.381537675 -0.269999385 -0.071867027
25 26 27 28 29 30
0.324502202 0.233838332 0.494012090 0.436340323 0.196332356 -0.159323194
31 32 33 34 35 36
0.064559380 0.697170689 0.220288511 0.153036483 0.004574773 0.202707131
37 38 39 40 41 42
-0.120923640 -0.025741562 -0.151413752 -0.071162545 0.148444358 0.392403677
43 44 45 46 47 48
0.420055174 0.154743509 -0.003830566 -0.364851516 -0.453313226 -0.537257893
49 50 51 52 53 54
-0.560888665 -0.623629561 -0.621378776 -0.653204595 -0.931520666 -0.818331608
55 56 57 58 59 60
-0.910294981 -0.797683672 -1.102103694 -0.860125983 -0.550664719 -0.532532361
61 62 63 64 65 66
-0.076163132 -0.302287820 -0.123805957 -0.115631776 -0.203947847 -0.259988528
67 68 69 70 71 72
-0.080260005 -0.003879775 -0.042838979 0.533677914 0.439370256 0.619579641
73 74 75 76 77 78
0.373871843 0.005284999 -0.468310164 -0.616367061 -0.262606106 -0.112415709
79 80 81 82 83 84
0.025620918 0.044078175 -0.274881030 -0.508364136 -0.364748820 -0.642462410
85 86 87 88 89 90
-1.416093181 -1.224294895 -0.915813032 -0.445561825 -0.061800870 -0.287841551
91 92 93 94 95 96
-0.788113028 -1.355501719 -1.064460924 -0.937944030 -1.158482766 -1.120350408
97 98 99 100 101 102
-0.786058205 -0.776722075 -0.480317239 -0.721372797 -1.089303738 -1.217036315
103 104 105 106 107 108
-1.318999688 -1.054311353 -0.899116505 -0.810137455 -0.520676191 -0.064620859
109 110 111 112 113 114
-0.240328656 -0.065146578 0.309181232 0.212816231 0.402423133 1.054305426
115 116 117 118 119 120
1.171956923 1.194953362 1.478456314 1.139127260 1.292742576 0.675028987
121 122 123 124 125 126
0.341398215 0.352811371 0.257139182 0.883621467 1.141921604 0.868343080
127 128 129 130 131 132
0.558456733 0.654836964 0.084185863 0.260702757 0.064318073 0.124527458
133 134 135 136 137 138
0.765050738 0.564001738 0.650406574 -0.193496270 -0.675581263 -1.099544918
139 140 141 142 143 144
-0.747354239 -0.726819956 -0.887471057 -0.770954163 -0.973184795 -0.675052436
145 146 147 148 149 150
-0.968298078 -0.333501130 -0.177481424 -0.315923451 -0.829700340 -0.295355891
151 152 153 154 155 156
-0.401473316 -0.078862007 -0.175744185 -0.327150266 -0.077303871 -0.240863409
157 158 159 160 161 162
-0.470340128 -0.731389128 -0.761215370 0.098650707 0.822411662 0.372987189
163 164 165 166 167 168
0.511023816 0.347789177 -0.007015975 0.873654971 0.551424339 0.281633723
169 170 171 172 173 174
0.156311056 0.535262056 1.117512840 0.769841074 0.499833107 0.903792426
175 176 177 178 179 180
1.108060131 1.118594414 1.061712235 0.422383181 0.510152549 0.840361934
181 182 183 184 185 186
0.500885214 0.266067292 -0.467142741 -0.109353690 0.118561317 -0.211248286
187 188 189 190 191 192
-0.439442737 -0.422677376 -0.957482529 -0.952657531 -0.666965189 -0.524678778
193 194 195 196 197 198
-0.548309549 -0.369358550 -0.201261817 -0.099703845 -0.565942890 -0.547829519
199 200 201 202 203 204
-0.443946944 -0.635489687 -0.352371866 0.374530158 1.098145474 1.168739989
205 206 207 208 209 210
1.477186244 1.582753452 2.110313680 1.868487861 2.836787998 3.452824343
211 212 213 214 215 216
3.568783944 2.999703357 2.873206309 2.201800229 0.519954727 0.020164112
217 218 219 220 221 222
-0.369312607 -0.672438634 -1.900187849 -1.814475825 -2.858252713 -3.651831238
223 224
-4.207948663 -3.357029250
> postscript(file="/var/www/html/rcomp/tmp/6gtyu1258639400.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 = 224
Frequency = 1
lag(myerror, k = 1) myerror
0 1.791736338 NA
1 1.799380572 1.791736338
2 1.137862435 1.799380572
3 0.582652825 1.137862435
4 0.974336753 0.582652825
5 1.364527151 0.974336753
6 1.678024595 1.364527151
7 1.420635904 1.678024595
8 0.249984804 1.420635904
9 -0.045190198 0.249984804
10 0.554656196 -0.045190198
11 0.476942606 0.554656196
12 -0.174226009 0.476942606
13 -0.214889879 -0.174226009
14 0.191900088 -0.214889879
15 0.303843191 0.191900088
16 0.337604146 0.303843191
17 0.251563465 0.337604146
18 0.231291988 0.251563465
19 -0.200250755 0.231291988
20 -0.200516725 -0.200250755
21 -0.381537675 -0.200516725
22 -0.269999385 -0.381537675
23 -0.071867027 -0.269999385
24 0.324502202 -0.071867027
25 0.233838332 0.324502202
26 0.494012090 0.233838332
27 0.436340323 0.494012090
28 0.196332356 0.436340323
29 -0.159323194 0.196332356
30 0.064559380 -0.159323194
31 0.697170689 0.064559380
32 0.220288511 0.697170689
33 0.153036483 0.220288511
34 0.004574773 0.153036483
35 0.202707131 0.004574773
36 -0.120923640 0.202707131
37 -0.025741562 -0.120923640
38 -0.151413752 -0.025741562
39 -0.071162545 -0.151413752
40 0.148444358 -0.071162545
41 0.392403677 0.148444358
42 0.420055174 0.392403677
43 0.154743509 0.420055174
44 -0.003830566 0.154743509
45 -0.364851516 -0.003830566
46 -0.453313226 -0.364851516
47 -0.537257893 -0.453313226
48 -0.560888665 -0.537257893
49 -0.623629561 -0.560888665
50 -0.621378776 -0.623629561
51 -0.653204595 -0.621378776
52 -0.931520666 -0.653204595
53 -0.818331608 -0.931520666
54 -0.910294981 -0.818331608
55 -0.797683672 -0.910294981
56 -1.102103694 -0.797683672
57 -0.860125983 -1.102103694
58 -0.550664719 -0.860125983
59 -0.532532361 -0.550664719
60 -0.076163132 -0.532532361
61 -0.302287820 -0.076163132
62 -0.123805957 -0.302287820
63 -0.115631776 -0.123805957
64 -0.203947847 -0.115631776
65 -0.259988528 -0.203947847
66 -0.080260005 -0.259988528
67 -0.003879775 -0.080260005
68 -0.042838979 -0.003879775
69 0.533677914 -0.042838979
70 0.439370256 0.533677914
71 0.619579641 0.439370256
72 0.373871843 0.619579641
73 0.005284999 0.373871843
74 -0.468310164 0.005284999
75 -0.616367061 -0.468310164
76 -0.262606106 -0.616367061
77 -0.112415709 -0.262606106
78 0.025620918 -0.112415709
79 0.044078175 0.025620918
80 -0.274881030 0.044078175
81 -0.508364136 -0.274881030
82 -0.364748820 -0.508364136
83 -0.642462410 -0.364748820
84 -1.416093181 -0.642462410
85 -1.224294895 -1.416093181
86 -0.915813032 -1.224294895
87 -0.445561825 -0.915813032
88 -0.061800870 -0.445561825
89 -0.287841551 -0.061800870
90 -0.788113028 -0.287841551
91 -1.355501719 -0.788113028
92 -1.064460924 -1.355501719
93 -0.937944030 -1.064460924
94 -1.158482766 -0.937944030
95 -1.120350408 -1.158482766
96 -0.786058205 -1.120350408
97 -0.776722075 -0.786058205
98 -0.480317239 -0.776722075
99 -0.721372797 -0.480317239
100 -1.089303738 -0.721372797
101 -1.217036315 -1.089303738
102 -1.318999688 -1.217036315
103 -1.054311353 -1.318999688
104 -0.899116505 -1.054311353
105 -0.810137455 -0.899116505
106 -0.520676191 -0.810137455
107 -0.064620859 -0.520676191
108 -0.240328656 -0.064620859
109 -0.065146578 -0.240328656
110 0.309181232 -0.065146578
111 0.212816231 0.309181232
112 0.402423133 0.212816231
113 1.054305426 0.402423133
114 1.171956923 1.054305426
115 1.194953362 1.171956923
116 1.478456314 1.194953362
117 1.139127260 1.478456314
118 1.292742576 1.139127260
119 0.675028987 1.292742576
120 0.341398215 0.675028987
121 0.352811371 0.341398215
122 0.257139182 0.352811371
123 0.883621467 0.257139182
124 1.141921604 0.883621467
125 0.868343080 1.141921604
126 0.558456733 0.868343080
127 0.654836964 0.558456733
128 0.084185863 0.654836964
129 0.260702757 0.084185863
130 0.064318073 0.260702757
131 0.124527458 0.064318073
132 0.765050738 0.124527458
133 0.564001738 0.765050738
134 0.650406574 0.564001738
135 -0.193496270 0.650406574
136 -0.675581263 -0.193496270
137 -1.099544918 -0.675581263
138 -0.747354239 -1.099544918
139 -0.726819956 -0.747354239
140 -0.887471057 -0.726819956
141 -0.770954163 -0.887471057
142 -0.973184795 -0.770954163
143 -0.675052436 -0.973184795
144 -0.968298078 -0.675052436
145 -0.333501130 -0.968298078
146 -0.177481424 -0.333501130
147 -0.315923451 -0.177481424
148 -0.829700340 -0.315923451
149 -0.295355891 -0.829700340
150 -0.401473316 -0.295355891
151 -0.078862007 -0.401473316
152 -0.175744185 -0.078862007
153 -0.327150266 -0.175744185
154 -0.077303871 -0.327150266
155 -0.240863409 -0.077303871
156 -0.470340128 -0.240863409
157 -0.731389128 -0.470340128
158 -0.761215370 -0.731389128
159 0.098650707 -0.761215370
160 0.822411662 0.098650707
161 0.372987189 0.822411662
162 0.511023816 0.372987189
163 0.347789177 0.511023816
164 -0.007015975 0.347789177
165 0.873654971 -0.007015975
166 0.551424339 0.873654971
167 0.281633723 0.551424339
168 0.156311056 0.281633723
169 0.535262056 0.156311056
170 1.117512840 0.535262056
171 0.769841074 1.117512840
172 0.499833107 0.769841074
173 0.903792426 0.499833107
174 1.108060131 0.903792426
175 1.118594414 1.108060131
176 1.061712235 1.118594414
177 0.422383181 1.061712235
178 0.510152549 0.422383181
179 0.840361934 0.510152549
180 0.500885214 0.840361934
181 0.266067292 0.500885214
182 -0.467142741 0.266067292
183 -0.109353690 -0.467142741
184 0.118561317 -0.109353690
185 -0.211248286 0.118561317
186 -0.439442737 -0.211248286
187 -0.422677376 -0.439442737
188 -0.957482529 -0.422677376
189 -0.952657531 -0.957482529
190 -0.666965189 -0.952657531
191 -0.524678778 -0.666965189
192 -0.548309549 -0.524678778
193 -0.369358550 -0.548309549
194 -0.201261817 -0.369358550
195 -0.099703845 -0.201261817
196 -0.565942890 -0.099703845
197 -0.547829519 -0.565942890
198 -0.443946944 -0.547829519
199 -0.635489687 -0.443946944
200 -0.352371866 -0.635489687
201 0.374530158 -0.352371866
202 1.098145474 0.374530158
203 1.168739989 1.098145474
204 1.477186244 1.168739989
205 1.582753452 1.477186244
206 2.110313680 1.582753452
207 1.868487861 2.110313680
208 2.836787998 1.868487861
209 3.452824343 2.836787998
210 3.568783944 3.452824343
211 2.999703357 3.568783944
212 2.873206309 2.999703357
213 2.201800229 2.873206309
214 0.519954727 2.201800229
215 0.020164112 0.519954727
216 -0.369312607 0.020164112
217 -0.672438634 -0.369312607
218 -1.900187849 -0.672438634
219 -1.814475825 -1.900187849
220 -2.858252713 -1.814475825
221 -3.651831238 -2.858252713
222 -4.207948663 -3.651831238
223 -3.357029250 -4.207948663
224 NA -3.357029250
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 1.799380572 1.791736338
[2,] 1.137862435 1.799380572
[3,] 0.582652825 1.137862435
[4,] 0.974336753 0.582652825
[5,] 1.364527151 0.974336753
[6,] 1.678024595 1.364527151
[7,] 1.420635904 1.678024595
[8,] 0.249984804 1.420635904
[9,] -0.045190198 0.249984804
[10,] 0.554656196 -0.045190198
[11,] 0.476942606 0.554656196
[12,] -0.174226009 0.476942606
[13,] -0.214889879 -0.174226009
[14,] 0.191900088 -0.214889879
[15,] 0.303843191 0.191900088
[16,] 0.337604146 0.303843191
[17,] 0.251563465 0.337604146
[18,] 0.231291988 0.251563465
[19,] -0.200250755 0.231291988
[20,] -0.200516725 -0.200250755
[21,] -0.381537675 -0.200516725
[22,] -0.269999385 -0.381537675
[23,] -0.071867027 -0.269999385
[24,] 0.324502202 -0.071867027
[25,] 0.233838332 0.324502202
[26,] 0.494012090 0.233838332
[27,] 0.436340323 0.494012090
[28,] 0.196332356 0.436340323
[29,] -0.159323194 0.196332356
[30,] 0.064559380 -0.159323194
[31,] 0.697170689 0.064559380
[32,] 0.220288511 0.697170689
[33,] 0.153036483 0.220288511
[34,] 0.004574773 0.153036483
[35,] 0.202707131 0.004574773
[36,] -0.120923640 0.202707131
[37,] -0.025741562 -0.120923640
[38,] -0.151413752 -0.025741562
[39,] -0.071162545 -0.151413752
[40,] 0.148444358 -0.071162545
[41,] 0.392403677 0.148444358
[42,] 0.420055174 0.392403677
[43,] 0.154743509 0.420055174
[44,] -0.003830566 0.154743509
[45,] -0.364851516 -0.003830566
[46,] -0.453313226 -0.364851516
[47,] -0.537257893 -0.453313226
[48,] -0.560888665 -0.537257893
[49,] -0.623629561 -0.560888665
[50,] -0.621378776 -0.623629561
[51,] -0.653204595 -0.621378776
[52,] -0.931520666 -0.653204595
[53,] -0.818331608 -0.931520666
[54,] -0.910294981 -0.818331608
[55,] -0.797683672 -0.910294981
[56,] -1.102103694 -0.797683672
[57,] -0.860125983 -1.102103694
[58,] -0.550664719 -0.860125983
[59,] -0.532532361 -0.550664719
[60,] -0.076163132 -0.532532361
[61,] -0.302287820 -0.076163132
[62,] -0.123805957 -0.302287820
[63,] -0.115631776 -0.123805957
[64,] -0.203947847 -0.115631776
[65,] -0.259988528 -0.203947847
[66,] -0.080260005 -0.259988528
[67,] -0.003879775 -0.080260005
[68,] -0.042838979 -0.003879775
[69,] 0.533677914 -0.042838979
[70,] 0.439370256 0.533677914
[71,] 0.619579641 0.439370256
[72,] 0.373871843 0.619579641
[73,] 0.005284999 0.373871843
[74,] -0.468310164 0.005284999
[75,] -0.616367061 -0.468310164
[76,] -0.262606106 -0.616367061
[77,] -0.112415709 -0.262606106
[78,] 0.025620918 -0.112415709
[79,] 0.044078175 0.025620918
[80,] -0.274881030 0.044078175
[81,] -0.508364136 -0.274881030
[82,] -0.364748820 -0.508364136
[83,] -0.642462410 -0.364748820
[84,] -1.416093181 -0.642462410
[85,] -1.224294895 -1.416093181
[86,] -0.915813032 -1.224294895
[87,] -0.445561825 -0.915813032
[88,] -0.061800870 -0.445561825
[89,] -0.287841551 -0.061800870
[90,] -0.788113028 -0.287841551
[91,] -1.355501719 -0.788113028
[92,] -1.064460924 -1.355501719
[93,] -0.937944030 -1.064460924
[94,] -1.158482766 -0.937944030
[95,] -1.120350408 -1.158482766
[96,] -0.786058205 -1.120350408
[97,] -0.776722075 -0.786058205
[98,] -0.480317239 -0.776722075
[99,] -0.721372797 -0.480317239
[100,] -1.089303738 -0.721372797
[101,] -1.217036315 -1.089303738
[102,] -1.318999688 -1.217036315
[103,] -1.054311353 -1.318999688
[104,] -0.899116505 -1.054311353
[105,] -0.810137455 -0.899116505
[106,] -0.520676191 -0.810137455
[107,] -0.064620859 -0.520676191
[108,] -0.240328656 -0.064620859
[109,] -0.065146578 -0.240328656
[110,] 0.309181232 -0.065146578
[111,] 0.212816231 0.309181232
[112,] 0.402423133 0.212816231
[113,] 1.054305426 0.402423133
[114,] 1.171956923 1.054305426
[115,] 1.194953362 1.171956923
[116,] 1.478456314 1.194953362
[117,] 1.139127260 1.478456314
[118,] 1.292742576 1.139127260
[119,] 0.675028987 1.292742576
[120,] 0.341398215 0.675028987
[121,] 0.352811371 0.341398215
[122,] 0.257139182 0.352811371
[123,] 0.883621467 0.257139182
[124,] 1.141921604 0.883621467
[125,] 0.868343080 1.141921604
[126,] 0.558456733 0.868343080
[127,] 0.654836964 0.558456733
[128,] 0.084185863 0.654836964
[129,] 0.260702757 0.084185863
[130,] 0.064318073 0.260702757
[131,] 0.124527458 0.064318073
[132,] 0.765050738 0.124527458
[133,] 0.564001738 0.765050738
[134,] 0.650406574 0.564001738
[135,] -0.193496270 0.650406574
[136,] -0.675581263 -0.193496270
[137,] -1.099544918 -0.675581263
[138,] -0.747354239 -1.099544918
[139,] -0.726819956 -0.747354239
[140,] -0.887471057 -0.726819956
[141,] -0.770954163 -0.887471057
[142,] -0.973184795 -0.770954163
[143,] -0.675052436 -0.973184795
[144,] -0.968298078 -0.675052436
[145,] -0.333501130 -0.968298078
[146,] -0.177481424 -0.333501130
[147,] -0.315923451 -0.177481424
[148,] -0.829700340 -0.315923451
[149,] -0.295355891 -0.829700340
[150,] -0.401473316 -0.295355891
[151,] -0.078862007 -0.401473316
[152,] -0.175744185 -0.078862007
[153,] -0.327150266 -0.175744185
[154,] -0.077303871 -0.327150266
[155,] -0.240863409 -0.077303871
[156,] -0.470340128 -0.240863409
[157,] -0.731389128 -0.470340128
[158,] -0.761215370 -0.731389128
[159,] 0.098650707 -0.761215370
[160,] 0.822411662 0.098650707
[161,] 0.372987189 0.822411662
[162,] 0.511023816 0.372987189
[163,] 0.347789177 0.511023816
[164,] -0.007015975 0.347789177
[165,] 0.873654971 -0.007015975
[166,] 0.551424339 0.873654971
[167,] 0.281633723 0.551424339
[168,] 0.156311056 0.281633723
[169,] 0.535262056 0.156311056
[170,] 1.117512840 0.535262056
[171,] 0.769841074 1.117512840
[172,] 0.499833107 0.769841074
[173,] 0.903792426 0.499833107
[174,] 1.108060131 0.903792426
[175,] 1.118594414 1.108060131
[176,] 1.061712235 1.118594414
[177,] 0.422383181 1.061712235
[178,] 0.510152549 0.422383181
[179,] 0.840361934 0.510152549
[180,] 0.500885214 0.840361934
[181,] 0.266067292 0.500885214
[182,] -0.467142741 0.266067292
[183,] -0.109353690 -0.467142741
[184,] 0.118561317 -0.109353690
[185,] -0.211248286 0.118561317
[186,] -0.439442737 -0.211248286
[187,] -0.422677376 -0.439442737
[188,] -0.957482529 -0.422677376
[189,] -0.952657531 -0.957482529
[190,] -0.666965189 -0.952657531
[191,] -0.524678778 -0.666965189
[192,] -0.548309549 -0.524678778
[193,] -0.369358550 -0.548309549
[194,] -0.201261817 -0.369358550
[195,] -0.099703845 -0.201261817
[196,] -0.565942890 -0.099703845
[197,] -0.547829519 -0.565942890
[198,] -0.443946944 -0.547829519
[199,] -0.635489687 -0.443946944
[200,] -0.352371866 -0.635489687
[201,] 0.374530158 -0.352371866
[202,] 1.098145474 0.374530158
[203,] 1.168739989 1.098145474
[204,] 1.477186244 1.168739989
[205,] 1.582753452 1.477186244
[206,] 2.110313680 1.582753452
[207,] 1.868487861 2.110313680
[208,] 2.836787998 1.868487861
[209,] 3.452824343 2.836787998
[210,] 3.568783944 3.452824343
[211,] 2.999703357 3.568783944
[212,] 2.873206309 2.999703357
[213,] 2.201800229 2.873206309
[214,] 0.519954727 2.201800229
[215,] 0.020164112 0.519954727
[216,] -0.369312607 0.020164112
[217,] -0.672438634 -0.369312607
[218,] -1.900187849 -0.672438634
[219,] -1.814475825 -1.900187849
[220,] -2.858252713 -1.814475825
[221,] -3.651831238 -2.858252713
[222,] -4.207948663 -3.651831238
[223,] -3.357029250 -4.207948663
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 1.799380572 1.791736338
2 1.137862435 1.799380572
3 0.582652825 1.137862435
4 0.974336753 0.582652825
5 1.364527151 0.974336753
6 1.678024595 1.364527151
7 1.420635904 1.678024595
8 0.249984804 1.420635904
9 -0.045190198 0.249984804
10 0.554656196 -0.045190198
11 0.476942606 0.554656196
12 -0.174226009 0.476942606
13 -0.214889879 -0.174226009
14 0.191900088 -0.214889879
15 0.303843191 0.191900088
16 0.337604146 0.303843191
17 0.251563465 0.337604146
18 0.231291988 0.251563465
19 -0.200250755 0.231291988
20 -0.200516725 -0.200250755
21 -0.381537675 -0.200516725
22 -0.269999385 -0.381537675
23 -0.071867027 -0.269999385
24 0.324502202 -0.071867027
25 0.233838332 0.324502202
26 0.494012090 0.233838332
27 0.436340323 0.494012090
28 0.196332356 0.436340323
29 -0.159323194 0.196332356
30 0.064559380 -0.159323194
31 0.697170689 0.064559380
32 0.220288511 0.697170689
33 0.153036483 0.220288511
34 0.004574773 0.153036483
35 0.202707131 0.004574773
36 -0.120923640 0.202707131
37 -0.025741562 -0.120923640
38 -0.151413752 -0.025741562
39 -0.071162545 -0.151413752
40 0.148444358 -0.071162545
41 0.392403677 0.148444358
42 0.420055174 0.392403677
43 0.154743509 0.420055174
44 -0.003830566 0.154743509
45 -0.364851516 -0.003830566
46 -0.453313226 -0.364851516
47 -0.537257893 -0.453313226
48 -0.560888665 -0.537257893
49 -0.623629561 -0.560888665
50 -0.621378776 -0.623629561
51 -0.653204595 -0.621378776
52 -0.931520666 -0.653204595
53 -0.818331608 -0.931520666
54 -0.910294981 -0.818331608
55 -0.797683672 -0.910294981
56 -1.102103694 -0.797683672
57 -0.860125983 -1.102103694
58 -0.550664719 -0.860125983
59 -0.532532361 -0.550664719
60 -0.076163132 -0.532532361
61 -0.302287820 -0.076163132
62 -0.123805957 -0.302287820
63 -0.115631776 -0.123805957
64 -0.203947847 -0.115631776
65 -0.259988528 -0.203947847
66 -0.080260005 -0.259988528
67 -0.003879775 -0.080260005
68 -0.042838979 -0.003879775
69 0.533677914 -0.042838979
70 0.439370256 0.533677914
71 0.619579641 0.439370256
72 0.373871843 0.619579641
73 0.005284999 0.373871843
74 -0.468310164 0.005284999
75 -0.616367061 -0.468310164
76 -0.262606106 -0.616367061
77 -0.112415709 -0.262606106
78 0.025620918 -0.112415709
79 0.044078175 0.025620918
80 -0.274881030 0.044078175
81 -0.508364136 -0.274881030
82 -0.364748820 -0.508364136
83 -0.642462410 -0.364748820
84 -1.416093181 -0.642462410
85 -1.224294895 -1.416093181
86 -0.915813032 -1.224294895
87 -0.445561825 -0.915813032
88 -0.061800870 -0.445561825
89 -0.287841551 -0.061800870
90 -0.788113028 -0.287841551
91 -1.355501719 -0.788113028
92 -1.064460924 -1.355501719
93 -0.937944030 -1.064460924
94 -1.158482766 -0.937944030
95 -1.120350408 -1.158482766
96 -0.786058205 -1.120350408
97 -0.776722075 -0.786058205
98 -0.480317239 -0.776722075
99 -0.721372797 -0.480317239
100 -1.089303738 -0.721372797
101 -1.217036315 -1.089303738
102 -1.318999688 -1.217036315
103 -1.054311353 -1.318999688
104 -0.899116505 -1.054311353
105 -0.810137455 -0.899116505
106 -0.520676191 -0.810137455
107 -0.064620859 -0.520676191
108 -0.240328656 -0.064620859
109 -0.065146578 -0.240328656
110 0.309181232 -0.065146578
111 0.212816231 0.309181232
112 0.402423133 0.212816231
113 1.054305426 0.402423133
114 1.171956923 1.054305426
115 1.194953362 1.171956923
116 1.478456314 1.194953362
117 1.139127260 1.478456314
118 1.292742576 1.139127260
119 0.675028987 1.292742576
120 0.341398215 0.675028987
121 0.352811371 0.341398215
122 0.257139182 0.352811371
123 0.883621467 0.257139182
124 1.141921604 0.883621467
125 0.868343080 1.141921604
126 0.558456733 0.868343080
127 0.654836964 0.558456733
128 0.084185863 0.654836964
129 0.260702757 0.084185863
130 0.064318073 0.260702757
131 0.124527458 0.064318073
132 0.765050738 0.124527458
133 0.564001738 0.765050738
134 0.650406574 0.564001738
135 -0.193496270 0.650406574
136 -0.675581263 -0.193496270
137 -1.099544918 -0.675581263
138 -0.747354239 -1.099544918
139 -0.726819956 -0.747354239
140 -0.887471057 -0.726819956
141 -0.770954163 -0.887471057
142 -0.973184795 -0.770954163
143 -0.675052436 -0.973184795
144 -0.968298078 -0.675052436
145 -0.333501130 -0.968298078
146 -0.177481424 -0.333501130
147 -0.315923451 -0.177481424
148 -0.829700340 -0.315923451
149 -0.295355891 -0.829700340
150 -0.401473316 -0.295355891
151 -0.078862007 -0.401473316
152 -0.175744185 -0.078862007
153 -0.327150266 -0.175744185
154 -0.077303871 -0.327150266
155 -0.240863409 -0.077303871
156 -0.470340128 -0.240863409
157 -0.731389128 -0.470340128
158 -0.761215370 -0.731389128
159 0.098650707 -0.761215370
160 0.822411662 0.098650707
161 0.372987189 0.822411662
162 0.511023816 0.372987189
163 0.347789177 0.511023816
164 -0.007015975 0.347789177
165 0.873654971 -0.007015975
166 0.551424339 0.873654971
167 0.281633723 0.551424339
168 0.156311056 0.281633723
169 0.535262056 0.156311056
170 1.117512840 0.535262056
171 0.769841074 1.117512840
172 0.499833107 0.769841074
173 0.903792426 0.499833107
174 1.108060131 0.903792426
175 1.118594414 1.108060131
176 1.061712235 1.118594414
177 0.422383181 1.061712235
178 0.510152549 0.422383181
179 0.840361934 0.510152549
180 0.500885214 0.840361934
181 0.266067292 0.500885214
182 -0.467142741 0.266067292
183 -0.109353690 -0.467142741
184 0.118561317 -0.109353690
185 -0.211248286 0.118561317
186 -0.439442737 -0.211248286
187 -0.422677376 -0.439442737
188 -0.957482529 -0.422677376
189 -0.952657531 -0.957482529
190 -0.666965189 -0.952657531
191 -0.524678778 -0.666965189
192 -0.548309549 -0.524678778
193 -0.369358550 -0.548309549
194 -0.201261817 -0.369358550
195 -0.099703845 -0.201261817
196 -0.565942890 -0.099703845
197 -0.547829519 -0.565942890
198 -0.443946944 -0.547829519
199 -0.635489687 -0.443946944
200 -0.352371866 -0.635489687
201 0.374530158 -0.352371866
202 1.098145474 0.374530158
203 1.168739989 1.098145474
204 1.477186244 1.168739989
205 1.582753452 1.477186244
206 2.110313680 1.582753452
207 1.868487861 2.110313680
208 2.836787998 1.868487861
209 3.452824343 2.836787998
210 3.568783944 3.452824343
211 2.999703357 3.568783944
212 2.873206309 2.999703357
213 2.201800229 2.873206309
214 0.519954727 2.201800229
215 0.020164112 0.519954727
216 -0.369312607 0.020164112
217 -0.672438634 -0.369312607
218 -1.900187849 -0.672438634
219 -1.814475825 -1.900187849
220 -2.858252713 -1.814475825
221 -3.651831238 -2.858252713
222 -4.207948663 -3.651831238
223 -3.357029250 -4.207948663
> 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/7h0n31258639400.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/8jzu91258639400.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/9gj9a1258639400.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/10duqh1258639400.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/11qygi1258639400.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/126os81258639400.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/13cqdj1258639400.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/14vpsk1258639400.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/154wix1258639400.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/161z2r1258639400.tab")
+ }
>
> system("convert tmp/1zqkz1258639400.ps tmp/1zqkz1258639400.png")
> system("convert tmp/2jpb61258639400.ps tmp/2jpb61258639400.png")
> system("convert tmp/3bjn91258639400.ps tmp/3bjn91258639400.png")
> system("convert tmp/4l8331258639400.ps tmp/4l8331258639400.png")
> system("convert tmp/5mpxv1258639400.ps tmp/5mpxv1258639400.png")
> system("convert tmp/6gtyu1258639400.ps tmp/6gtyu1258639400.png")
> system("convert tmp/7h0n31258639400.ps tmp/7h0n31258639400.png")
> system("convert tmp/8jzu91258639400.ps tmp/8jzu91258639400.png")
> system("convert tmp/9gj9a1258639400.ps tmp/9gj9a1258639400.png")
> system("convert tmp/10duqh1258639400.ps tmp/10duqh1258639400.png")
>
>
> proc.time()
user system elapsed
5.501 1.825 6.024