R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)
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(13
+ ,12
+ ,14
+ ,12
+ ,53
+ ,16
+ ,11
+ ,18
+ ,11
+ ,83
+ ,19
+ ,15
+ ,11
+ ,14
+ ,66
+ ,15
+ ,6
+ ,12
+ ,12
+ ,67
+ ,14
+ ,13
+ ,16
+ ,21
+ ,76
+ ,13
+ ,10
+ ,18
+ ,12
+ ,78
+ ,19
+ ,12
+ ,14
+ ,22
+ ,53
+ ,15
+ ,14
+ ,14
+ ,11
+ ,80
+ ,14
+ ,12
+ ,15
+ ,10
+ ,74
+ ,15
+ ,9
+ ,15
+ ,13
+ ,76
+ ,16
+ ,10
+ ,17
+ ,10
+ ,79
+ ,16
+ ,12
+ ,19
+ ,8
+ ,54
+ ,16
+ ,12
+ ,10
+ ,15
+ ,67
+ ,16
+ ,11
+ ,16
+ ,14
+ ,54
+ ,17
+ ,15
+ ,18
+ ,10
+ ,87
+ ,15
+ ,12
+ ,14
+ ,14
+ ,58
+ ,15
+ ,10
+ ,14
+ ,14
+ ,75
+ ,20
+ ,12
+ ,17
+ ,11
+ ,88
+ ,18
+ ,11
+ ,14
+ ,10
+ ,64
+ ,16
+ ,12
+ ,16
+ ,13
+ ,57
+ ,16
+ ,11
+ ,18
+ ,9.5
+ ,66
+ ,16
+ ,12
+ ,11
+ ,14
+ ,68
+ ,19
+ ,13
+ ,14
+ ,12
+ ,54
+ ,16
+ ,11
+ ,12
+ ,14
+ ,56
+ ,17
+ ,12
+ ,17
+ ,11
+ ,86
+ ,17
+ ,13
+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c(5
+ ,264)
+ ,dimnames=list(c('Learning'
+ ,'Software'
+ ,'Happiness'
+ ,'Depression'
+ ,'Sport1')
+ ,1:264))
> y <- array(NA,dim=c(5,264),dimnames=list(c('Learning','Software','Happiness','Depression','Sport1'),1:264))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '3'
> par3 <- 'No Linear Trend'
> par2 <- 'Do not include Seasonal Dummies'
> par1 <- '3'
> #'GNU S' R Code compiled by R2WASP v. 1.2.327 ()
> #Author: root
> #To cite this work: Wessa P., (2013), Multiple Regression (v1.0.29) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_multipleregression.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, 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
Happiness Learning Software Depression Sport1
1 14 13 12 12.0 53
2 18 16 11 11.0 83
3 11 19 15 14.0 66
4 12 15 6 12.0 67
5 16 14 13 21.0 76
6 18 13 10 12.0 78
7 14 19 12 22.0 53
8 14 15 14 11.0 80
9 15 14 12 10.0 74
10 15 15 9 13.0 76
11 17 16 10 10.0 79
12 19 16 12 8.0 54
13 10 16 12 15.0 67
14 16 16 11 14.0 54
15 18 17 15 10.0 87
16 14 15 12 14.0 58
17 14 15 10 14.0 75
18 17 20 12 11.0 88
19 14 18 11 10.0 64
20 16 16 12 13.0 57
21 18 16 11 9.5 66
22 11 16 12 14.0 68
23 14 19 13 12.0 54
24 12 16 11 14.0 56
25 17 17 12 11.0 86
26 9 17 13 9.0 80
27 16 16 10 11.0 76
28 14 15 14 15.0 69
29 15 16 12 14.0 78
30 11 14 10 13.0 67
31 16 15 12 9.0 80
32 13 12 8 15.0 54
33 17 14 10 10.0 71
34 15 16 12 11.0 84
35 14 14 12 13.0 74
36 16 10 7 8.0 71
37 9 10 9 20.0 63
38 15 14 12 12.0 71
39 17 16 10 10.0 76
40 13 16 10 10.0 69
41 15 16 10 9.0 74
42 16 14 12 14.0 75
43 16 20 15 8.0 54
44 12 14 10 14.0 52
45 15 14 10 11.0 69
46 11 11 12 13.0 68
47 15 14 13 9.0 65
48 15 15 11 11.0 75
49 17 16 11 15.0 74
50 13 14 12 11.0 75
51 16 16 14 10.0 72
52 14 14 10 14.0 67
53 11 12 12 18.0 63
54 12 16 13 14.0 62
55 12 9 5 11.0 63
56 15 14 6 14.5 76
57 16 16 12 13.0 74
58 15 16 12 9.0 67
59 12 15 11 10.0 73
60 12 16 10 15.0 70
61 8 12 7 20.0 53
62 13 16 12 12.0 77
63 11 16 14 12.0 80
64 14 14 11 14.0 52
65 15 16 12 13.0 54
66 10 17 13 11.0 80
67 11 18 14 17.0 66
68 12 18 11 12.0 73
69 15 12 12 13.0 63
70 15 16 12 14.0 69
71 14 10 8 13.0 67
72 16 14 11 15.0 54
73 15 18 14 13.0 81
74 15 18 14 10.0 69
75 13 16 12 11.0 84
76 12 17 9 19.0 80
77 17 16 13 13.0 70
78 13 16 11 17.0 69
79 15 13 12 13.0 77
80 13 16 12 9.0 54
81 15 16 12 11.0 79
82 15 16 12 9.0 71
83 16 15 12 12.0 73
84 15 15 11 12.0 72
85 14 16 10 13.0 77
86 15 14 9 13.0 75
87 14 16 12 12.0 69
88 13 16 12 15.0 54
89 7 15 12 22.0 70
90 17 12 9 13.0 73
91 13 17 15 15.0 54
92 15 16 12 13.0 77
93 14 15 12 15.0 82
94 13 13 12 12.5 80
95 16 16 10 11.0 80
96 12 16 13 16.0 69
97 14 16 9 11.0 78
98 17 16 12 11.0 81
99 15 14 10 10.0 76
100 17 16 14 10.0 76
101 12 16 11 16.0 73
102 16 20 15 12.0 85
103 11 15 11 11.0 66
104 15 16 11 16.0 79
105 9 13 12 19.0 68
106 16 17 12 11.0 76
107 15 16 12 16.0 71
108 10 16 11 15.0 54
109 10 12 7 24.0 46
110 15 16 12 14.0 85
111 11 16 14 15.0 74
112 13 17 11 11.0 88
113 14 13 11 15.0 38
114 18 12 10 12.0 76
115 16 18 13 10.0 86
116 14 14 13 14.0 54
117 14 14 8 13.0 67
118 14 13 11 9.0 69
119 14 16 12 15.0 90
120 12 13 11 15.0 54
121 14 16 13 14.0 76
122 15 13 12 11.0 89
123 15 16 14 8.0 76
124 15 15 13 11.0 73
125 13 16 15 11.0 79
126 17 15 10 8.0 90
127 17 17 11 10.0 74
128 19 15 9 11.0 81
129 15 12 11 13.0 72
130 13 16 10 11.0 71
131 9 10 11 20.0 66
132 15 16 8 10.0 77
133 15 12 11 15.0 65
134 15 14 12 12.0 74
135 16 15 12 14.0 85
136 11 13 9 23.0 54
137 14 15 11 14.0 63
138 11 11 10 16.0 54
139 15 12 8 11.0 64
140 13 11 9 12.0 69
141 15 16 8 10.0 54
142 16 15 9 14.0 84
143 14 17 15 12.0 86
144 15 16 11 12.0 77
145 16 10 8 11.0 89
146 16 18 13 12.0 76
147 11 13 12 13.0 60
148 12 16 12 11.0 75
149 9 13 9 19.0 73
150 16 10 7 12.0 85
151 13 15 13 17.0 79
152 16 16 9 9.0 71
153 12 16 6 12.0 72
154 9 14 8 19.0 69
155 13 10 8 18.0 78
156 13 17 15 15.0 54
157 14 13 6 14.0 69
158 19 15 9 11.0 81
159 13 16 11 9.0 84
160 12 12 8 18.0 84
161 13 13 8 16.0 69
162 10 13 10 24.0 66
163 14 12 8 14.0 81
164 16 17 14 20.0 82
165 10 15 10 18.0 72
166 11 10 8 23.0 54
167 14 14 11 12.0 78
168 12 11 12 14.0 74
169 9 13 12 16.0 82
170 9 16 12 18.0 73
171 11 12 5 20.0 55
172 16 16 12 12.0 72
173 9 12 10 12.0 78
174 13 9 7 17.0 59
175 16 12 12 13.0 72
176 13 15 11 9.0 78
177 9 12 8 16.0 68
178 12 12 9 18.0 69
179 16 14 10 10.0 67
180 11 12 9 14.0 74
181 14 16 12 11.0 54
182 13 11 6 9.0 67
183 15 19 15 11.0 70
184 14 15 12 10.0 80
185 16 8 12 11.0 89
186 13 16 12 19.0 76
187 14 17 11 14.0 74
188 15 12 7 12.0 87
189 13 11 7 14.0 54
190 11 11 5 21.0 61
191 11 14 12 13.0 38
192 14 16 12 10.0 75
193 15 12 3 15.0 69
194 11 16 11 16.0 62
195 15 13 10 14.0 72
196 12 15 12 12.0 70
197 14 16 9 19.0 79
198 14 16 12 15.0 87
199 8 14 9 19.0 62
200 13 16 12 13.0 77
201 9 16 12 17.0 69
202 15 14 10 12.0 69
203 17 11 9 11.0 75
204 13 12 12 14.0 54
205 15 15 8 11.0 72
206 15 15 11 13.0 74
207 14 16 11 12.0 85
208 16 16 12 15.0 52
209 13 11 10 14.0 70
210 16 15 10 12.0 84
211 9 12 12 17.0 64
212 16 12 12 11.0 84
213 11 15 11 18.0 87
214 10 15 8 13.0 79
215 11 16 12 17.0 67
216 15 14 10 13.0 65
217 17 17 11 11.0 85
218 14 14 10 12.0 83
219 8 13 8 22.0 61
220 15 15 12 14.0 82
221 11 13 12 12.0 76
222 16 14 10 12.0 58
223 10 15 12 17.0 72
224 15 12 9 9.0 72
225 9 13 9 21.0 38
226 16 8 6 10.0 78
227 19 14 10 11.0 54
228 12 14 9 12.0 63
229 8 11 9 23.0 66
230 11 12 9 13.0 70
231 14 13 6 12.0 71
232 9 10 10 16.0 67
233 15 16 6 9.0 58
234 13 18 14 17.0 72
235 16 13 10 9.0 72
236 11 11 10 14.0 70
237 12 4 6 17.0 76
238 13 13 12 13.0 50
239 10 16 12 11.0 72
240 11 10 7 12.0 72
241 12 12 8 10.0 88
242 8 12 11 19.0 53
243 12 10 3 16.0 58
244 12 13 6 16.0 66
245 15 15 10 14.0 82
246 11 12 8 20.0 69
247 13 14 9 15.0 68
248 14 10 9 23.0 44
249 10 12 8 20.0 56
250 12 12 9 16.0 53
251 15 11 7 14.0 70
252 13 10 7 17.0 78
253 13 12 6 11.0 71
254 13 16 9 13.0 72
255 12 12 10 17.0 68
256 12 14 11 15.0 67
257 9 16 12 21.0 75
258 9 14 8 18.0 62
259 15 13 11 15.0 67
260 10 4 3 8.0 83
261 14 15 11 12.0 64
262 15 11 12 12.0 68
263 7 11 7 22.0 62
264 14 14 9 12.0 72
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Learning Software Depression Sport1
15.356954 0.118945 -0.006095 -0.377726 0.023610
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.7891 -1.3735 0.2189 1.2750 5.1949
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.356954 1.415240 10.851 <2e-16 ***
Learning 0.118945 0.065559 1.814 0.0708 .
Software -0.006095 0.068405 -0.089 0.9291
Depression -0.377726 0.038613 -9.782 <2e-16 ***
Sport1 0.023610 0.012671 1.863 0.0636 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.011 on 259 degrees of freedom
Multiple R-squared: 0.3621, Adjusted R-squared: 0.3522
F-statistic: 36.75 on 4 and 259 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,] 0.8838786 0.232242889 0.116121445
[2,] 0.7930527 0.413894687 0.206947343
[3,] 0.6875459 0.624908157 0.312454079
[4,] 0.6754442 0.649111665 0.324555832
[5,] 0.9503914 0.099217289 0.049608644
[6,] 0.9865659 0.026868250 0.013434125
[7,] 0.9831989 0.033602189 0.016801095
[8,] 0.9815073 0.036985439 0.018492719
[9,] 0.9710950 0.057810052 0.028905026
[10,] 0.9589186 0.082162810 0.041081405
[11,] 0.9458808 0.108238482 0.054119241
[12,] 0.9281926 0.143614892 0.071807446
[13,] 0.9165229 0.166954274 0.083477137
[14,] 0.9210378 0.157924366 0.078962183
[15,] 0.9563402 0.087319693 0.043659846
[16,] 0.9391599 0.121680140 0.060840070
[17,] 0.9343744 0.131251169 0.065625585
[18,] 0.9166094 0.166781149 0.083390574
[19,] 0.9965643 0.006871311 0.003435655
[20,] 0.9949707 0.010058628 0.005029314
[21,] 0.9926377 0.014724632 0.007362316
[22,] 0.9894551 0.021089893 0.010544947
[23,] 0.9942090 0.011581941 0.005790971
[24,] 0.9915683 0.016863440 0.008431720
[25,] 0.9883452 0.023309648 0.011654824
[26,] 0.9867840 0.026432068 0.013216034
[27,] 0.9819586 0.036082881 0.018041441
[28,] 0.9762921 0.047415717 0.023707858
[29,] 0.9682824 0.063435224 0.031717612
[30,] 0.9772464 0.045507220 0.022753610
[31,] 0.9699951 0.060009823 0.030004911
[32,] 0.9651555 0.069689059 0.034844529
[33,] 0.9659053 0.068189319 0.034094660
[34,] 0.9566053 0.086789455 0.043394728
[35,] 0.9540423 0.091915385 0.045957692
[36,] 0.9419763 0.116047388 0.058023694
[37,] 0.9319603 0.136079421 0.068039710
[38,] 0.9153619 0.169276139 0.084638069
[39,] 0.9280701 0.143859705 0.071929852
[40,] 0.9106636 0.178672882 0.089336441
[41,] 0.8906584 0.218683103 0.109341552
[42,] 0.9123680 0.175263943 0.087631972
[43,] 0.9078241 0.184351755 0.092175877
[44,] 0.8911218 0.217756354 0.108878177
[45,] 0.8696015 0.260797054 0.130398527
[46,] 0.8513017 0.297396504 0.148698252
[47,] 0.8412910 0.317418078 0.158709039
[48,] 0.8306189 0.338762210 0.169381105
[49,] 0.8093365 0.381326991 0.190663495
[50,] 0.7955648 0.408870480 0.204435240
[51,] 0.7640432 0.471913509 0.235956755
[52,] 0.8051186 0.389762799 0.194881400
[53,] 0.8002648 0.399470420 0.199735210
[54,] 0.8232807 0.353438559 0.176719279
[55,] 0.8189697 0.362060623 0.181030311
[56,] 0.8802622 0.239475612 0.119737806
[57,] 0.8663151 0.267369713 0.133684856
[58,] 0.8546317 0.290736612 0.145368306
[59,] 0.9446556 0.110688731 0.055344366
[60,] 0.9428866 0.114226772 0.057113386
[61,] 0.9510231 0.097953741 0.048976871
[62,] 0.9473851 0.105229842 0.052614921
[63,] 0.9407471 0.118505749 0.059252874
[64,] 0.9295530 0.140893901 0.070446951
[65,] 0.9468540 0.106292059 0.053146030
[66,] 0.9360173 0.127965383 0.063982692
[67,] 0.9228515 0.154296913 0.077148456
[68,] 0.9220807 0.155838527 0.077919263
[69,] 0.9079521 0.184095765 0.092047883
[70,] 0.9238651 0.152269848 0.076134924
[71,] 0.9097244 0.180551260 0.090275630
[72,] 0.8979983 0.204003395 0.102001697
[73,] 0.8959140 0.208171989 0.104085994
[74,] 0.8775367 0.244926637 0.122463318
[75,] 0.8576307 0.284738565 0.142369282
[76,] 0.8499971 0.300005832 0.150002916
[77,] 0.8294207 0.341158648 0.170579324
[78,] 0.8045841 0.390831800 0.195415900
[79,] 0.7844687 0.431062509 0.215531254
[80,] 0.7566067 0.486786628 0.243393314
[81,] 0.7265047 0.546990682 0.273495341
[82,] 0.8024462 0.395107537 0.197553769
[83,] 0.8395534 0.320893217 0.160446608
[84,] 0.8158885 0.368223078 0.184111539
[85,] 0.7945296 0.410940827 0.205470414
[86,] 0.7689697 0.462060690 0.231030345
[87,] 0.7498878 0.500224462 0.250112231
[88,] 0.7272115 0.545577093 0.272788547
[89,] 0.7017174 0.596565146 0.298282573
[90,] 0.6763697 0.647260626 0.323630313
[91,] 0.6760514 0.647897257 0.323948628
[92,] 0.6425457 0.714908619 0.357454310
[93,] 0.6358350 0.728330081 0.364165041
[94,] 0.6095544 0.780891196 0.390445598
[95,] 0.5820795 0.835840933 0.417920466
[96,] 0.6503392 0.699321543 0.349660771
[97,] 0.6447339 0.710532125 0.355266062
[98,] 0.6614836 0.677032726 0.338516363
[99,] 0.6370164 0.725967110 0.362983555
[100,] 0.6399350 0.720129963 0.360064982
[101,] 0.6685711 0.662857875 0.331428938
[102,] 0.6446327 0.710734578 0.355367289
[103,] 0.6191863 0.761627478 0.380813739
[104,] 0.6291941 0.741611708 0.370805854
[105,] 0.6388040 0.722392070 0.361196035
[106,] 0.6349754 0.730049192 0.365024596
[107,] 0.7188369 0.562326217 0.281163109
[108,] 0.6890775 0.621844954 0.310922477
[109,] 0.6659749 0.668050105 0.334025052
[110,] 0.6336328 0.732734347 0.366367174
[111,] 0.6104277 0.779144652 0.389572326
[112,] 0.5768284 0.846343219 0.423171609
[113,] 0.5444781 0.911043858 0.455521929
[114,] 0.5100708 0.979858474 0.489929237
[115,] 0.4753535 0.950707027 0.524646487
[116,] 0.4461771 0.892354210 0.553822895
[117,] 0.4126720 0.825344048 0.587327976
[118,] 0.4057563 0.811512679 0.594243661
[119,] 0.3767295 0.753459051 0.623270474
[120,] 0.3691439 0.738287873 0.630856064
[121,] 0.4761618 0.952323622 0.523838189
[122,] 0.4579754 0.915950886 0.542024557
[123,] 0.4484444 0.896888700 0.551555650
[124,] 0.4399577 0.879915466 0.560042267
[125,] 0.4068974 0.813794785 0.593102607
[126,] 0.4183685 0.836737035 0.581631483
[127,] 0.3904397 0.780879482 0.609560259
[128,] 0.3978025 0.795604957 0.602197521
[129,] 0.3800062 0.760012493 0.619993753
[130,] 0.3516060 0.703211952 0.648394024
[131,] 0.3271994 0.654398868 0.672800566
[132,] 0.3012492 0.602498400 0.698750800
[133,] 0.2770525 0.554104962 0.722947519
[134,] 0.2490735 0.498147097 0.750926451
[135,] 0.2537723 0.507544558 0.746227721
[136,] 0.2288581 0.457716182 0.771141909
[137,] 0.2056073 0.411214596 0.794392702
[138,] 0.1938918 0.387783651 0.806108175
[139,] 0.1843040 0.368608094 0.815695953
[140,] 0.1916057 0.383211352 0.808394324
[141,] 0.2109169 0.421833708 0.789083146
[142,] 0.2282796 0.456559163 0.771720418
[143,] 0.2267362 0.453472365 0.773263818
[144,] 0.2032597 0.406519430 0.796740285
[145,] 0.1816502 0.363300456 0.818349772
[146,] 0.1928303 0.385660620 0.807169690
[147,] 0.2070980 0.414196091 0.792901954
[148,] 0.1945027 0.389005413 0.805497294
[149,] 0.1710329 0.342065890 0.828967055
[150,] 0.1523431 0.304686283 0.847656858
[151,] 0.2398391 0.479678131 0.760160935
[152,] 0.2581718 0.516343544 0.741828228
[153,] 0.2325967 0.465193400 0.767403300
[154,] 0.2086757 0.417351434 0.791324283
[155,] 0.1865485 0.373096980 0.813451510
[156,] 0.1678123 0.335624669 0.832187665
[157,] 0.2875048 0.575009574 0.712495213
[158,] 0.2828929 0.565785777 0.717107111
[159,] 0.2788742 0.557748367 0.721125816
[160,] 0.2501839 0.500367859 0.749816070
[161,] 0.2292769 0.458553891 0.770723055
[162,] 0.2894220 0.578843961 0.710578020
[163,] 0.3232360 0.646471956 0.676764022
[164,] 0.2936948 0.587389555 0.706305222
[165,] 0.2879256 0.575851107 0.712074447
[166,] 0.4608439 0.921687781 0.539156109
[167,] 0.4483944 0.896788884 0.551605558
[168,] 0.4737581 0.947516286 0.526241857
[169,] 0.4885934 0.977186856 0.511406572
[170,] 0.5457249 0.908550287 0.454275144
[171,] 0.5126128 0.974774448 0.487387224
[172,] 0.4901967 0.980393476 0.509803262
[173,] 0.4917811 0.983562162 0.508218919
[174,] 0.4541814 0.908362725 0.545818637
[175,] 0.4477518 0.895503561 0.552248219
[176,] 0.4099950 0.819989936 0.590005032
[177,] 0.3822532 0.764506449 0.617746775
[178,] 0.3870685 0.774136983 0.612931509
[179,] 0.3747109 0.749421830 0.625289085
[180,] 0.3403515 0.680703038 0.659648481
[181,] 0.3147678 0.629535566 0.685232217
[182,] 0.2812144 0.562428746 0.718785627
[183,] 0.2583728 0.516745515 0.741627242
[184,] 0.2693701 0.538740243 0.730629878
[185,] 0.2465940 0.493188062 0.753405969
[186,] 0.2680433 0.536086683 0.731956659
[187,] 0.2542868 0.508573573 0.745713214
[188,] 0.2525191 0.505038198 0.747480901
[189,] 0.2589447 0.517889490 0.741055255
[190,] 0.3058649 0.611729786 0.694135107
[191,] 0.2868901 0.573780275 0.713109863
[192,] 0.3233854 0.646770864 0.676614568
[193,] 0.2929856 0.585971282 0.707014359
[194,] 0.3450390 0.690077942 0.654961029
[195,] 0.3145774 0.629154744 0.685422628
[196,] 0.3602805 0.720560974 0.639719513
[197,] 0.3225495 0.645099003 0.677450498
[198,] 0.2885888 0.577177520 0.711411240
[199,] 0.2681061 0.536212213 0.731893893
[200,] 0.2352817 0.470563458 0.764718271
[201,] 0.2682914 0.536582736 0.731708632
[202,] 0.2344520 0.468904051 0.765547974
[203,] 0.2423508 0.484701638 0.757649181
[204,] 0.2731422 0.546284326 0.726857837
[205,] 0.2718248 0.543649664 0.728175168
[206,] 0.2416495 0.483298999 0.758350500
[207,] 0.3001891 0.600378127 0.699810936
[208,] 0.2718480 0.543696067 0.728151966
[209,] 0.2537731 0.507546113 0.746226943
[210,] 0.2878875 0.575775086 0.712112457
[211,] 0.2559232 0.511846404 0.744076798
[212,] 0.2408806 0.481761276 0.759119362
[213,] 0.2618544 0.523708850 0.738145575
[214,] 0.2772886 0.554577172 0.722711414
[215,] 0.2752490 0.550498047 0.724750977
[216,] 0.2612687 0.522537381 0.738731309
[217,] 0.2241655 0.448331085 0.775834457
[218,] 0.2208869 0.441773770 0.779113115
[219,] 0.2542999 0.508599845 0.745700077
[220,] 0.4675602 0.935120371 0.532439814
[221,] 0.4422722 0.884544345 0.557727828
[222,] 0.4168865 0.833772981 0.583113509
[223,] 0.4053499 0.810699750 0.594650125
[224,] 0.3660894 0.732178842 0.633910579
[225,] 0.4189144 0.837828820 0.581085590
[226,] 0.3773657 0.754731305 0.622634347
[227,] 0.3290958 0.658191678 0.670904161
[228,] 0.3325755 0.665150941 0.667424530
[229,] 0.3086732 0.617346440 0.691326780
[230,] 0.2678666 0.535733201 0.732133400
[231,] 0.2221071 0.444214194 0.777892903
[232,] 0.3918379 0.783675856 0.608162072
[233,] 0.3781581 0.756316267 0.621841866
[234,] 0.3520169 0.704033852 0.647983074
[235,] 0.5838132 0.832373670 0.416186835
[236,] 0.5462143 0.907571359 0.453785680
[237,] 0.4931767 0.986353347 0.506823327
[238,] 0.5503165 0.899366972 0.449683486
[239,] 0.4919901 0.983980108 0.508009946
[240,] 0.4219816 0.843963148 0.578018426
[241,] 0.6242854 0.751429180 0.375714590
[242,] 0.5378524 0.924295149 0.462147575
[243,] 0.4417488 0.883497586 0.558251207
[244,] 0.6505649 0.698870102 0.349435051
[245,] 0.9202969 0.159406130 0.079703065
[246,] 0.8911069 0.217786291 0.108893146
[247,] 0.8257913 0.348417389 0.174208695
[248,] 0.7347173 0.530565386 0.265282693
[249,] 0.6256410 0.748717994 0.374358997
> postscript(file="/var/fisher/rcomp/tmp/1rh1o1384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/28phi1384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/3n9x81384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/4ibl11384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/5b6xf1384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 264
Frequency = 1
1 2 3 4 5 6
0.45125987 3.00229393 -2.79560820 -2.15374355 5.19490279 3.84881122
7 8 9 10 11 12
3.51484788 -0.78964582 0.08104596 1.02977320 1.71291491 3.55991214
13 14 15 16 17 18
-3.10294264 2.82017162 2.43556101 0.85076977 0.43720404 1.41455751
19 20 21 22 23 24
-1.16472454 2.37770959 2.83708156 -2.50427871 -0.27992479 -1.22704911
25 26 27 28 29 30
1.81861277 -6.78908169 1.16147171 0.98097102 1.25961765 -2.63269391
31 32 33 34 35 36
0.44271322 0.65539238 2.13968751 -0.01522166 0.21422308 0.84173115
37 38 39 40 41 42
-1.42448790 0.90732847 1.78374600 -2.05098145 -0.54675898 2.56833843
43 44 45 46 47 48
0.10241708 -0.90081274 0.56463395 -2.28728020 -0.07809170 0.31012169
49 50 51 52 53 54
3.72569004 -1.56483870 0.90256654 0.74503180 -0.39954469 -1.35652176
55 56 57 58 59 60
-1.72945351 1.69702229 1.97633340 -0.36929689 -3.02038329 -1.18596328
61 62 63 64 65 66
-2.43846349 -1.47222340 -3.53086495 1.10528203 1.44854068 -5.03363028
67 68 69 70 71 72
-1.54958100 -2.62176641 1.71182678 1.47211092 0.83089592 3.43578701
73 74 75 76 77 78
0.58536070 -0.26449205 -2.01522166 -0.03620370 3.07686962 0.59919328
79 80 81 82 83 84
1.26233683 -2.06236215 0.10283016 -0.46373834 1.74116290 0.75867849
85 86 87 88 89 90
-0.10668724 1.17232840 -0.28334049 0.20399209 -3.41074894 3.45743882
91 92 93 94 95 96
0.10333156 0.90550230 0.66184674 -0.99735711 1.06703025 -0.76634289
97 98 99 100 101 102
-0.89184379 2.05560943 0.02163569 1.80812509 -0.87297389 0.88139862
103 104 105 106 107 108
-3.47738503 1.98536393 -2.25881564 1.05471641 2.18034161 -2.80210268
109 110 111 112 113 114
1.23771189 1.09434510 -2.25602565 -2.23470273 1.93249768 4.01497679
115 116 117 118 119 120
0.32803699 1.07025085 0.35511655 -1.06577785 0.35401898 -0.44526815
121 122 123 124 125 126
0.31293315 0.22356105 -0.94732633 0.36953196 -1.87888553 0.81669433
127 128 129 130 131 132
1.71811666 4.15626996 1.49323873 -1.72047647 -1.48312945 -0.25205391
133 134 135 136 137 138
2.41396269 0.83649737 2.21328994 1.56434797 0.72662318 -0.83574752
139 140 141 142 143 144
0.90838591 -0.70690059 0.29098447 2.21861599 -0.78537721 0.52168182
145 146 147 148 149 150
1.55601649 1.31959204 -2.33628698 -2.80272838 -2.39515178 2.02208889
151 152 153 154 155 156
0.49422402 0.51797734 -2.39074021 -2.42574994 1.45981045 0.10333156
157 158 159 160 161 162
0.79237683 4.15626996 -2.77676785 0.08025858 0.56001778 0.66484408
163 164 165 166 167 168
0.64018684 4.32477513 -1.98106204 1.91508773 -0.26403885 -1.05121668
169 170 171 172 173 174
-3.72253786 -3.11142770 0.50212624 1.64582842 -5.03224394 1.64353174
175 176 177 178 179 180
2.49933350 -2.51616082 -3.29742701 0.44050881 1.23412897 -2.18844584
181 182 183 184 185 186
-0.30691074 -1.81114130 -0.02322678 -1.17956107 1.81828527 1.19546691
187 188 189 190 191 192
0.22901949 0.73697847 0.39051675 0.85713461 -1.93580381 -1.18045409
193 194 195 196 197 198
2.27076306 -1.61325988 1.74592482 -2.18800601 2.10635151 0.42485008
199 200 201 202 203 204
-3.25438262 -1.09449770 -3.39471195 0.94235965 2.77371152 0.30204576
205 206 207 208 209 210
0.36266847 1.08918347 -0.66720109 3.25121282 0.03103524 1.46925935
211 212 213 214 215 216
-2.80088076 1.46055771 -1.32912273 -4.04715267 -1.34749122 1.41452682
217 218 219 220 221 222
1.83612836 -0.38818545 -1.98474506 1.28412103 -3.09177851 2.20207366
223 224 225 226 227 228
-2.34659820 -0.02985365 -0.81333762 1.66370494 4.91878941 -1.92207293
229 230 231 232 233 234
-1.48108671 -2.47173009 -0.01029532 -3.02373741 -0.19337224 0.30875681
235 236 237 238 239 240
0.85729628 -1.96896476 0.83078499 -0.10018333 -4.73189729 -2.67097638
241 242 243 244 245 246
-3.03598854 -2.79181011 0.14609246 -0.38134067 1.27193149 0.18986546
247 248 249 250 251 252
0.09305237 5.15728614 -0.50319981 0.06282323 2.01275092 1.07598997
253 254 255 256 257 258
-1.26907618 -0.99473019 0.09248824 -0.87114772 -2.02547131 -2.63820309
259 260 261 262 263 264
2.24779712 -4.75230324 -0.05243860 1.33499409 -2.77656050 -0.13456621
> postscript(file="/var/fisher/rcomp/tmp/6rwe01384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 264
Frequency = 1
lag(myerror, k = 1) myerror
0 0.45125987 NA
1 3.00229393 0.45125987
2 -2.79560820 3.00229393
3 -2.15374355 -2.79560820
4 5.19490279 -2.15374355
5 3.84881122 5.19490279
6 3.51484788 3.84881122
7 -0.78964582 3.51484788
8 0.08104596 -0.78964582
9 1.02977320 0.08104596
10 1.71291491 1.02977320
11 3.55991214 1.71291491
12 -3.10294264 3.55991214
13 2.82017162 -3.10294264
14 2.43556101 2.82017162
15 0.85076977 2.43556101
16 0.43720404 0.85076977
17 1.41455751 0.43720404
18 -1.16472454 1.41455751
19 2.37770959 -1.16472454
20 2.83708156 2.37770959
21 -2.50427871 2.83708156
22 -0.27992479 -2.50427871
23 -1.22704911 -0.27992479
24 1.81861277 -1.22704911
25 -6.78908169 1.81861277
26 1.16147171 -6.78908169
27 0.98097102 1.16147171
28 1.25961765 0.98097102
29 -2.63269391 1.25961765
30 0.44271322 -2.63269391
31 0.65539238 0.44271322
32 2.13968751 0.65539238
33 -0.01522166 2.13968751
34 0.21422308 -0.01522166
35 0.84173115 0.21422308
36 -1.42448790 0.84173115
37 0.90732847 -1.42448790
38 1.78374600 0.90732847
39 -2.05098145 1.78374600
40 -0.54675898 -2.05098145
41 2.56833843 -0.54675898
42 0.10241708 2.56833843
43 -0.90081274 0.10241708
44 0.56463395 -0.90081274
45 -2.28728020 0.56463395
46 -0.07809170 -2.28728020
47 0.31012169 -0.07809170
48 3.72569004 0.31012169
49 -1.56483870 3.72569004
50 0.90256654 -1.56483870
51 0.74503180 0.90256654
52 -0.39954469 0.74503180
53 -1.35652176 -0.39954469
54 -1.72945351 -1.35652176
55 1.69702229 -1.72945351
56 1.97633340 1.69702229
57 -0.36929689 1.97633340
58 -3.02038329 -0.36929689
59 -1.18596328 -3.02038329
60 -2.43846349 -1.18596328
61 -1.47222340 -2.43846349
62 -3.53086495 -1.47222340
63 1.10528203 -3.53086495
64 1.44854068 1.10528203
65 -5.03363028 1.44854068
66 -1.54958100 -5.03363028
67 -2.62176641 -1.54958100
68 1.71182678 -2.62176641
69 1.47211092 1.71182678
70 0.83089592 1.47211092
71 3.43578701 0.83089592
72 0.58536070 3.43578701
73 -0.26449205 0.58536070
74 -2.01522166 -0.26449205
75 -0.03620370 -2.01522166
76 3.07686962 -0.03620370
77 0.59919328 3.07686962
78 1.26233683 0.59919328
79 -2.06236215 1.26233683
80 0.10283016 -2.06236215
81 -0.46373834 0.10283016
82 1.74116290 -0.46373834
83 0.75867849 1.74116290
84 -0.10668724 0.75867849
85 1.17232840 -0.10668724
86 -0.28334049 1.17232840
87 0.20399209 -0.28334049
88 -3.41074894 0.20399209
89 3.45743882 -3.41074894
90 0.10333156 3.45743882
91 0.90550230 0.10333156
92 0.66184674 0.90550230
93 -0.99735711 0.66184674
94 1.06703025 -0.99735711
95 -0.76634289 1.06703025
96 -0.89184379 -0.76634289
97 2.05560943 -0.89184379
98 0.02163569 2.05560943
99 1.80812509 0.02163569
100 -0.87297389 1.80812509
101 0.88139862 -0.87297389
102 -3.47738503 0.88139862
103 1.98536393 -3.47738503
104 -2.25881564 1.98536393
105 1.05471641 -2.25881564
106 2.18034161 1.05471641
107 -2.80210268 2.18034161
108 1.23771189 -2.80210268
109 1.09434510 1.23771189
110 -2.25602565 1.09434510
111 -2.23470273 -2.25602565
112 1.93249768 -2.23470273
113 4.01497679 1.93249768
114 0.32803699 4.01497679
115 1.07025085 0.32803699
116 0.35511655 1.07025085
117 -1.06577785 0.35511655
118 0.35401898 -1.06577785
119 -0.44526815 0.35401898
120 0.31293315 -0.44526815
121 0.22356105 0.31293315
122 -0.94732633 0.22356105
123 0.36953196 -0.94732633
124 -1.87888553 0.36953196
125 0.81669433 -1.87888553
126 1.71811666 0.81669433
127 4.15626996 1.71811666
128 1.49323873 4.15626996
129 -1.72047647 1.49323873
130 -1.48312945 -1.72047647
131 -0.25205391 -1.48312945
132 2.41396269 -0.25205391
133 0.83649737 2.41396269
134 2.21328994 0.83649737
135 1.56434797 2.21328994
136 0.72662318 1.56434797
137 -0.83574752 0.72662318
138 0.90838591 -0.83574752
139 -0.70690059 0.90838591
140 0.29098447 -0.70690059
141 2.21861599 0.29098447
142 -0.78537721 2.21861599
143 0.52168182 -0.78537721
144 1.55601649 0.52168182
145 1.31959204 1.55601649
146 -2.33628698 1.31959204
147 -2.80272838 -2.33628698
148 -2.39515178 -2.80272838
149 2.02208889 -2.39515178
150 0.49422402 2.02208889
151 0.51797734 0.49422402
152 -2.39074021 0.51797734
153 -2.42574994 -2.39074021
154 1.45981045 -2.42574994
155 0.10333156 1.45981045
156 0.79237683 0.10333156
157 4.15626996 0.79237683
158 -2.77676785 4.15626996
159 0.08025858 -2.77676785
160 0.56001778 0.08025858
161 0.66484408 0.56001778
162 0.64018684 0.66484408
163 4.32477513 0.64018684
164 -1.98106204 4.32477513
165 1.91508773 -1.98106204
166 -0.26403885 1.91508773
167 -1.05121668 -0.26403885
168 -3.72253786 -1.05121668
169 -3.11142770 -3.72253786
170 0.50212624 -3.11142770
171 1.64582842 0.50212624
172 -5.03224394 1.64582842
173 1.64353174 -5.03224394
174 2.49933350 1.64353174
175 -2.51616082 2.49933350
176 -3.29742701 -2.51616082
177 0.44050881 -3.29742701
178 1.23412897 0.44050881
179 -2.18844584 1.23412897
180 -0.30691074 -2.18844584
181 -1.81114130 -0.30691074
182 -0.02322678 -1.81114130
183 -1.17956107 -0.02322678
184 1.81828527 -1.17956107
185 1.19546691 1.81828527
186 0.22901949 1.19546691
187 0.73697847 0.22901949
188 0.39051675 0.73697847
189 0.85713461 0.39051675
190 -1.93580381 0.85713461
191 -1.18045409 -1.93580381
192 2.27076306 -1.18045409
193 -1.61325988 2.27076306
194 1.74592482 -1.61325988
195 -2.18800601 1.74592482
196 2.10635151 -2.18800601
197 0.42485008 2.10635151
198 -3.25438262 0.42485008
199 -1.09449770 -3.25438262
200 -3.39471195 -1.09449770
201 0.94235965 -3.39471195
202 2.77371152 0.94235965
203 0.30204576 2.77371152
204 0.36266847 0.30204576
205 1.08918347 0.36266847
206 -0.66720109 1.08918347
207 3.25121282 -0.66720109
208 0.03103524 3.25121282
209 1.46925935 0.03103524
210 -2.80088076 1.46925935
211 1.46055771 -2.80088076
212 -1.32912273 1.46055771
213 -4.04715267 -1.32912273
214 -1.34749122 -4.04715267
215 1.41452682 -1.34749122
216 1.83612836 1.41452682
217 -0.38818545 1.83612836
218 -1.98474506 -0.38818545
219 1.28412103 -1.98474506
220 -3.09177851 1.28412103
221 2.20207366 -3.09177851
222 -2.34659820 2.20207366
223 -0.02985365 -2.34659820
224 -0.81333762 -0.02985365
225 1.66370494 -0.81333762
226 4.91878941 1.66370494
227 -1.92207293 4.91878941
228 -1.48108671 -1.92207293
229 -2.47173009 -1.48108671
230 -0.01029532 -2.47173009
231 -3.02373741 -0.01029532
232 -0.19337224 -3.02373741
233 0.30875681 -0.19337224
234 0.85729628 0.30875681
235 -1.96896476 0.85729628
236 0.83078499 -1.96896476
237 -0.10018333 0.83078499
238 -4.73189729 -0.10018333
239 -2.67097638 -4.73189729
240 -3.03598854 -2.67097638
241 -2.79181011 -3.03598854
242 0.14609246 -2.79181011
243 -0.38134067 0.14609246
244 1.27193149 -0.38134067
245 0.18986546 1.27193149
246 0.09305237 0.18986546
247 5.15728614 0.09305237
248 -0.50319981 5.15728614
249 0.06282323 -0.50319981
250 2.01275092 0.06282323
251 1.07598997 2.01275092
252 -1.26907618 1.07598997
253 -0.99473019 -1.26907618
254 0.09248824 -0.99473019
255 -0.87114772 0.09248824
256 -2.02547131 -0.87114772
257 -2.63820309 -2.02547131
258 2.24779712 -2.63820309
259 -4.75230324 2.24779712
260 -0.05243860 -4.75230324
261 1.33499409 -0.05243860
262 -2.77656050 1.33499409
263 -0.13456621 -2.77656050
264 NA -0.13456621
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.00229393 0.45125987
[2,] -2.79560820 3.00229393
[3,] -2.15374355 -2.79560820
[4,] 5.19490279 -2.15374355
[5,] 3.84881122 5.19490279
[6,] 3.51484788 3.84881122
[7,] -0.78964582 3.51484788
[8,] 0.08104596 -0.78964582
[9,] 1.02977320 0.08104596
[10,] 1.71291491 1.02977320
[11,] 3.55991214 1.71291491
[12,] -3.10294264 3.55991214
[13,] 2.82017162 -3.10294264
[14,] 2.43556101 2.82017162
[15,] 0.85076977 2.43556101
[16,] 0.43720404 0.85076977
[17,] 1.41455751 0.43720404
[18,] -1.16472454 1.41455751
[19,] 2.37770959 -1.16472454
[20,] 2.83708156 2.37770959
[21,] -2.50427871 2.83708156
[22,] -0.27992479 -2.50427871
[23,] -1.22704911 -0.27992479
[24,] 1.81861277 -1.22704911
[25,] -6.78908169 1.81861277
[26,] 1.16147171 -6.78908169
[27,] 0.98097102 1.16147171
[28,] 1.25961765 0.98097102
[29,] -2.63269391 1.25961765
[30,] 0.44271322 -2.63269391
[31,] 0.65539238 0.44271322
[32,] 2.13968751 0.65539238
[33,] -0.01522166 2.13968751
[34,] 0.21422308 -0.01522166
[35,] 0.84173115 0.21422308
[36,] -1.42448790 0.84173115
[37,] 0.90732847 -1.42448790
[38,] 1.78374600 0.90732847
[39,] -2.05098145 1.78374600
[40,] -0.54675898 -2.05098145
[41,] 2.56833843 -0.54675898
[42,] 0.10241708 2.56833843
[43,] -0.90081274 0.10241708
[44,] 0.56463395 -0.90081274
[45,] -2.28728020 0.56463395
[46,] -0.07809170 -2.28728020
[47,] 0.31012169 -0.07809170
[48,] 3.72569004 0.31012169
[49,] -1.56483870 3.72569004
[50,] 0.90256654 -1.56483870
[51,] 0.74503180 0.90256654
[52,] -0.39954469 0.74503180
[53,] -1.35652176 -0.39954469
[54,] -1.72945351 -1.35652176
[55,] 1.69702229 -1.72945351
[56,] 1.97633340 1.69702229
[57,] -0.36929689 1.97633340
[58,] -3.02038329 -0.36929689
[59,] -1.18596328 -3.02038329
[60,] -2.43846349 -1.18596328
[61,] -1.47222340 -2.43846349
[62,] -3.53086495 -1.47222340
[63,] 1.10528203 -3.53086495
[64,] 1.44854068 1.10528203
[65,] -5.03363028 1.44854068
[66,] -1.54958100 -5.03363028
[67,] -2.62176641 -1.54958100
[68,] 1.71182678 -2.62176641
[69,] 1.47211092 1.71182678
[70,] 0.83089592 1.47211092
[71,] 3.43578701 0.83089592
[72,] 0.58536070 3.43578701
[73,] -0.26449205 0.58536070
[74,] -2.01522166 -0.26449205
[75,] -0.03620370 -2.01522166
[76,] 3.07686962 -0.03620370
[77,] 0.59919328 3.07686962
[78,] 1.26233683 0.59919328
[79,] -2.06236215 1.26233683
[80,] 0.10283016 -2.06236215
[81,] -0.46373834 0.10283016
[82,] 1.74116290 -0.46373834
[83,] 0.75867849 1.74116290
[84,] -0.10668724 0.75867849
[85,] 1.17232840 -0.10668724
[86,] -0.28334049 1.17232840
[87,] 0.20399209 -0.28334049
[88,] -3.41074894 0.20399209
[89,] 3.45743882 -3.41074894
[90,] 0.10333156 3.45743882
[91,] 0.90550230 0.10333156
[92,] 0.66184674 0.90550230
[93,] -0.99735711 0.66184674
[94,] 1.06703025 -0.99735711
[95,] -0.76634289 1.06703025
[96,] -0.89184379 -0.76634289
[97,] 2.05560943 -0.89184379
[98,] 0.02163569 2.05560943
[99,] 1.80812509 0.02163569
[100,] -0.87297389 1.80812509
[101,] 0.88139862 -0.87297389
[102,] -3.47738503 0.88139862
[103,] 1.98536393 -3.47738503
[104,] -2.25881564 1.98536393
[105,] 1.05471641 -2.25881564
[106,] 2.18034161 1.05471641
[107,] -2.80210268 2.18034161
[108,] 1.23771189 -2.80210268
[109,] 1.09434510 1.23771189
[110,] -2.25602565 1.09434510
[111,] -2.23470273 -2.25602565
[112,] 1.93249768 -2.23470273
[113,] 4.01497679 1.93249768
[114,] 0.32803699 4.01497679
[115,] 1.07025085 0.32803699
[116,] 0.35511655 1.07025085
[117,] -1.06577785 0.35511655
[118,] 0.35401898 -1.06577785
[119,] -0.44526815 0.35401898
[120,] 0.31293315 -0.44526815
[121,] 0.22356105 0.31293315
[122,] -0.94732633 0.22356105
[123,] 0.36953196 -0.94732633
[124,] -1.87888553 0.36953196
[125,] 0.81669433 -1.87888553
[126,] 1.71811666 0.81669433
[127,] 4.15626996 1.71811666
[128,] 1.49323873 4.15626996
[129,] -1.72047647 1.49323873
[130,] -1.48312945 -1.72047647
[131,] -0.25205391 -1.48312945
[132,] 2.41396269 -0.25205391
[133,] 0.83649737 2.41396269
[134,] 2.21328994 0.83649737
[135,] 1.56434797 2.21328994
[136,] 0.72662318 1.56434797
[137,] -0.83574752 0.72662318
[138,] 0.90838591 -0.83574752
[139,] -0.70690059 0.90838591
[140,] 0.29098447 -0.70690059
[141,] 2.21861599 0.29098447
[142,] -0.78537721 2.21861599
[143,] 0.52168182 -0.78537721
[144,] 1.55601649 0.52168182
[145,] 1.31959204 1.55601649
[146,] -2.33628698 1.31959204
[147,] -2.80272838 -2.33628698
[148,] -2.39515178 -2.80272838
[149,] 2.02208889 -2.39515178
[150,] 0.49422402 2.02208889
[151,] 0.51797734 0.49422402
[152,] -2.39074021 0.51797734
[153,] -2.42574994 -2.39074021
[154,] 1.45981045 -2.42574994
[155,] 0.10333156 1.45981045
[156,] 0.79237683 0.10333156
[157,] 4.15626996 0.79237683
[158,] -2.77676785 4.15626996
[159,] 0.08025858 -2.77676785
[160,] 0.56001778 0.08025858
[161,] 0.66484408 0.56001778
[162,] 0.64018684 0.66484408
[163,] 4.32477513 0.64018684
[164,] -1.98106204 4.32477513
[165,] 1.91508773 -1.98106204
[166,] -0.26403885 1.91508773
[167,] -1.05121668 -0.26403885
[168,] -3.72253786 -1.05121668
[169,] -3.11142770 -3.72253786
[170,] 0.50212624 -3.11142770
[171,] 1.64582842 0.50212624
[172,] -5.03224394 1.64582842
[173,] 1.64353174 -5.03224394
[174,] 2.49933350 1.64353174
[175,] -2.51616082 2.49933350
[176,] -3.29742701 -2.51616082
[177,] 0.44050881 -3.29742701
[178,] 1.23412897 0.44050881
[179,] -2.18844584 1.23412897
[180,] -0.30691074 -2.18844584
[181,] -1.81114130 -0.30691074
[182,] -0.02322678 -1.81114130
[183,] -1.17956107 -0.02322678
[184,] 1.81828527 -1.17956107
[185,] 1.19546691 1.81828527
[186,] 0.22901949 1.19546691
[187,] 0.73697847 0.22901949
[188,] 0.39051675 0.73697847
[189,] 0.85713461 0.39051675
[190,] -1.93580381 0.85713461
[191,] -1.18045409 -1.93580381
[192,] 2.27076306 -1.18045409
[193,] -1.61325988 2.27076306
[194,] 1.74592482 -1.61325988
[195,] -2.18800601 1.74592482
[196,] 2.10635151 -2.18800601
[197,] 0.42485008 2.10635151
[198,] -3.25438262 0.42485008
[199,] -1.09449770 -3.25438262
[200,] -3.39471195 -1.09449770
[201,] 0.94235965 -3.39471195
[202,] 2.77371152 0.94235965
[203,] 0.30204576 2.77371152
[204,] 0.36266847 0.30204576
[205,] 1.08918347 0.36266847
[206,] -0.66720109 1.08918347
[207,] 3.25121282 -0.66720109
[208,] 0.03103524 3.25121282
[209,] 1.46925935 0.03103524
[210,] -2.80088076 1.46925935
[211,] 1.46055771 -2.80088076
[212,] -1.32912273 1.46055771
[213,] -4.04715267 -1.32912273
[214,] -1.34749122 -4.04715267
[215,] 1.41452682 -1.34749122
[216,] 1.83612836 1.41452682
[217,] -0.38818545 1.83612836
[218,] -1.98474506 -0.38818545
[219,] 1.28412103 -1.98474506
[220,] -3.09177851 1.28412103
[221,] 2.20207366 -3.09177851
[222,] -2.34659820 2.20207366
[223,] -0.02985365 -2.34659820
[224,] -0.81333762 -0.02985365
[225,] 1.66370494 -0.81333762
[226,] 4.91878941 1.66370494
[227,] -1.92207293 4.91878941
[228,] -1.48108671 -1.92207293
[229,] -2.47173009 -1.48108671
[230,] -0.01029532 -2.47173009
[231,] -3.02373741 -0.01029532
[232,] -0.19337224 -3.02373741
[233,] 0.30875681 -0.19337224
[234,] 0.85729628 0.30875681
[235,] -1.96896476 0.85729628
[236,] 0.83078499 -1.96896476
[237,] -0.10018333 0.83078499
[238,] -4.73189729 -0.10018333
[239,] -2.67097638 -4.73189729
[240,] -3.03598854 -2.67097638
[241,] -2.79181011 -3.03598854
[242,] 0.14609246 -2.79181011
[243,] -0.38134067 0.14609246
[244,] 1.27193149 -0.38134067
[245,] 0.18986546 1.27193149
[246,] 0.09305237 0.18986546
[247,] 5.15728614 0.09305237
[248,] -0.50319981 5.15728614
[249,] 0.06282323 -0.50319981
[250,] 2.01275092 0.06282323
[251,] 1.07598997 2.01275092
[252,] -1.26907618 1.07598997
[253,] -0.99473019 -1.26907618
[254,] 0.09248824 -0.99473019
[255,] -0.87114772 0.09248824
[256,] -2.02547131 -0.87114772
[257,] -2.63820309 -2.02547131
[258,] 2.24779712 -2.63820309
[259,] -4.75230324 2.24779712
[260,] -0.05243860 -4.75230324
[261,] 1.33499409 -0.05243860
[262,] -2.77656050 1.33499409
[263,] -0.13456621 -2.77656050
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.00229393 0.45125987
2 -2.79560820 3.00229393
3 -2.15374355 -2.79560820
4 5.19490279 -2.15374355
5 3.84881122 5.19490279
6 3.51484788 3.84881122
7 -0.78964582 3.51484788
8 0.08104596 -0.78964582
9 1.02977320 0.08104596
10 1.71291491 1.02977320
11 3.55991214 1.71291491
12 -3.10294264 3.55991214
13 2.82017162 -3.10294264
14 2.43556101 2.82017162
15 0.85076977 2.43556101
16 0.43720404 0.85076977
17 1.41455751 0.43720404
18 -1.16472454 1.41455751
19 2.37770959 -1.16472454
20 2.83708156 2.37770959
21 -2.50427871 2.83708156
22 -0.27992479 -2.50427871
23 -1.22704911 -0.27992479
24 1.81861277 -1.22704911
25 -6.78908169 1.81861277
26 1.16147171 -6.78908169
27 0.98097102 1.16147171
28 1.25961765 0.98097102
29 -2.63269391 1.25961765
30 0.44271322 -2.63269391
31 0.65539238 0.44271322
32 2.13968751 0.65539238
33 -0.01522166 2.13968751
34 0.21422308 -0.01522166
35 0.84173115 0.21422308
36 -1.42448790 0.84173115
37 0.90732847 -1.42448790
38 1.78374600 0.90732847
39 -2.05098145 1.78374600
40 -0.54675898 -2.05098145
41 2.56833843 -0.54675898
42 0.10241708 2.56833843
43 -0.90081274 0.10241708
44 0.56463395 -0.90081274
45 -2.28728020 0.56463395
46 -0.07809170 -2.28728020
47 0.31012169 -0.07809170
48 3.72569004 0.31012169
49 -1.56483870 3.72569004
50 0.90256654 -1.56483870
51 0.74503180 0.90256654
52 -0.39954469 0.74503180
53 -1.35652176 -0.39954469
54 -1.72945351 -1.35652176
55 1.69702229 -1.72945351
56 1.97633340 1.69702229
57 -0.36929689 1.97633340
58 -3.02038329 -0.36929689
59 -1.18596328 -3.02038329
60 -2.43846349 -1.18596328
61 -1.47222340 -2.43846349
62 -3.53086495 -1.47222340
63 1.10528203 -3.53086495
64 1.44854068 1.10528203
65 -5.03363028 1.44854068
66 -1.54958100 -5.03363028
67 -2.62176641 -1.54958100
68 1.71182678 -2.62176641
69 1.47211092 1.71182678
70 0.83089592 1.47211092
71 3.43578701 0.83089592
72 0.58536070 3.43578701
73 -0.26449205 0.58536070
74 -2.01522166 -0.26449205
75 -0.03620370 -2.01522166
76 3.07686962 -0.03620370
77 0.59919328 3.07686962
78 1.26233683 0.59919328
79 -2.06236215 1.26233683
80 0.10283016 -2.06236215
81 -0.46373834 0.10283016
82 1.74116290 -0.46373834
83 0.75867849 1.74116290
84 -0.10668724 0.75867849
85 1.17232840 -0.10668724
86 -0.28334049 1.17232840
87 0.20399209 -0.28334049
88 -3.41074894 0.20399209
89 3.45743882 -3.41074894
90 0.10333156 3.45743882
91 0.90550230 0.10333156
92 0.66184674 0.90550230
93 -0.99735711 0.66184674
94 1.06703025 -0.99735711
95 -0.76634289 1.06703025
96 -0.89184379 -0.76634289
97 2.05560943 -0.89184379
98 0.02163569 2.05560943
99 1.80812509 0.02163569
100 -0.87297389 1.80812509
101 0.88139862 -0.87297389
102 -3.47738503 0.88139862
103 1.98536393 -3.47738503
104 -2.25881564 1.98536393
105 1.05471641 -2.25881564
106 2.18034161 1.05471641
107 -2.80210268 2.18034161
108 1.23771189 -2.80210268
109 1.09434510 1.23771189
110 -2.25602565 1.09434510
111 -2.23470273 -2.25602565
112 1.93249768 -2.23470273
113 4.01497679 1.93249768
114 0.32803699 4.01497679
115 1.07025085 0.32803699
116 0.35511655 1.07025085
117 -1.06577785 0.35511655
118 0.35401898 -1.06577785
119 -0.44526815 0.35401898
120 0.31293315 -0.44526815
121 0.22356105 0.31293315
122 -0.94732633 0.22356105
123 0.36953196 -0.94732633
124 -1.87888553 0.36953196
125 0.81669433 -1.87888553
126 1.71811666 0.81669433
127 4.15626996 1.71811666
128 1.49323873 4.15626996
129 -1.72047647 1.49323873
130 -1.48312945 -1.72047647
131 -0.25205391 -1.48312945
132 2.41396269 -0.25205391
133 0.83649737 2.41396269
134 2.21328994 0.83649737
135 1.56434797 2.21328994
136 0.72662318 1.56434797
137 -0.83574752 0.72662318
138 0.90838591 -0.83574752
139 -0.70690059 0.90838591
140 0.29098447 -0.70690059
141 2.21861599 0.29098447
142 -0.78537721 2.21861599
143 0.52168182 -0.78537721
144 1.55601649 0.52168182
145 1.31959204 1.55601649
146 -2.33628698 1.31959204
147 -2.80272838 -2.33628698
148 -2.39515178 -2.80272838
149 2.02208889 -2.39515178
150 0.49422402 2.02208889
151 0.51797734 0.49422402
152 -2.39074021 0.51797734
153 -2.42574994 -2.39074021
154 1.45981045 -2.42574994
155 0.10333156 1.45981045
156 0.79237683 0.10333156
157 4.15626996 0.79237683
158 -2.77676785 4.15626996
159 0.08025858 -2.77676785
160 0.56001778 0.08025858
161 0.66484408 0.56001778
162 0.64018684 0.66484408
163 4.32477513 0.64018684
164 -1.98106204 4.32477513
165 1.91508773 -1.98106204
166 -0.26403885 1.91508773
167 -1.05121668 -0.26403885
168 -3.72253786 -1.05121668
169 -3.11142770 -3.72253786
170 0.50212624 -3.11142770
171 1.64582842 0.50212624
172 -5.03224394 1.64582842
173 1.64353174 -5.03224394
174 2.49933350 1.64353174
175 -2.51616082 2.49933350
176 -3.29742701 -2.51616082
177 0.44050881 -3.29742701
178 1.23412897 0.44050881
179 -2.18844584 1.23412897
180 -0.30691074 -2.18844584
181 -1.81114130 -0.30691074
182 -0.02322678 -1.81114130
183 -1.17956107 -0.02322678
184 1.81828527 -1.17956107
185 1.19546691 1.81828527
186 0.22901949 1.19546691
187 0.73697847 0.22901949
188 0.39051675 0.73697847
189 0.85713461 0.39051675
190 -1.93580381 0.85713461
191 -1.18045409 -1.93580381
192 2.27076306 -1.18045409
193 -1.61325988 2.27076306
194 1.74592482 -1.61325988
195 -2.18800601 1.74592482
196 2.10635151 -2.18800601
197 0.42485008 2.10635151
198 -3.25438262 0.42485008
199 -1.09449770 -3.25438262
200 -3.39471195 -1.09449770
201 0.94235965 -3.39471195
202 2.77371152 0.94235965
203 0.30204576 2.77371152
204 0.36266847 0.30204576
205 1.08918347 0.36266847
206 -0.66720109 1.08918347
207 3.25121282 -0.66720109
208 0.03103524 3.25121282
209 1.46925935 0.03103524
210 -2.80088076 1.46925935
211 1.46055771 -2.80088076
212 -1.32912273 1.46055771
213 -4.04715267 -1.32912273
214 -1.34749122 -4.04715267
215 1.41452682 -1.34749122
216 1.83612836 1.41452682
217 -0.38818545 1.83612836
218 -1.98474506 -0.38818545
219 1.28412103 -1.98474506
220 -3.09177851 1.28412103
221 2.20207366 -3.09177851
222 -2.34659820 2.20207366
223 -0.02985365 -2.34659820
224 -0.81333762 -0.02985365
225 1.66370494 -0.81333762
226 4.91878941 1.66370494
227 -1.92207293 4.91878941
228 -1.48108671 -1.92207293
229 -2.47173009 -1.48108671
230 -0.01029532 -2.47173009
231 -3.02373741 -0.01029532
232 -0.19337224 -3.02373741
233 0.30875681 -0.19337224
234 0.85729628 0.30875681
235 -1.96896476 0.85729628
236 0.83078499 -1.96896476
237 -0.10018333 0.83078499
238 -4.73189729 -0.10018333
239 -2.67097638 -4.73189729
240 -3.03598854 -2.67097638
241 -2.79181011 -3.03598854
242 0.14609246 -2.79181011
243 -0.38134067 0.14609246
244 1.27193149 -0.38134067
245 0.18986546 1.27193149
246 0.09305237 0.18986546
247 5.15728614 0.09305237
248 -0.50319981 5.15728614
249 0.06282323 -0.50319981
250 2.01275092 0.06282323
251 1.07598997 2.01275092
252 -1.26907618 1.07598997
253 -0.99473019 -1.26907618
254 0.09248824 -0.99473019
255 -0.87114772 0.09248824
256 -2.02547131 -0.87114772
257 -2.63820309 -2.02547131
258 2.24779712 -2.63820309
259 -4.75230324 2.24779712
260 -0.05243860 -4.75230324
261 1.33499409 -0.05243860
262 -2.77656050 1.33499409
263 -0.13456621 -2.77656050
> 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/fisher/rcomp/tmp/7ni2n1384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/8rsqc1384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/9xu701384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/fisher/rcomp/tmp/10euu11384952168.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/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, signif(mysum$coefficients[i,1],6), 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/fisher/rcomp/tmp/11hax21384952168.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,signif(mysum$coefficients[i,1],6))
+ a<-table.element(a, signif(mysum$coefficients[i,2],6))
+ a<-table.element(a, signif(mysum$coefficients[i,3],4))
+ a<-table.element(a, signif(mysum$coefficients[i,4],6))
+ a<-table.element(a, signif(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/12b2gy1384952168.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, signif(sqrt(mysum$r.squared),6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$adj.r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[1],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[2],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[3],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6))
> 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, signif(mysum$sigma,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, signif(sum(myerror*myerror),6))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/134gk61384952168.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,signif(x[i],6))
+ a<-table.element(a,signif(x[i]-mysum$resid[i],6))
+ a<-table.element(a,signif(mysum$resid[i],6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/14kci11384952168.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,signif(gqarr[mypoint-kp3+1,1],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6))
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/fisher/rcomp/tmp/1586xq1384952168.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,signif(numsignificant1,6))
+ a<-table.element(a,signif(numsignificant1/numgqtests,6))
+ 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,signif(numsignificant5,6))
+ a<-table.element(a,signif(numsignificant5/numgqtests,6))
+ 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,signif(numsignificant10,6))
+ a<-table.element(a,signif(numsignificant10/numgqtests,6))
+ 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/fisher/rcomp/tmp/16j7w01384952168.tab")
+ }
>
> try(system("convert tmp/1rh1o1384952168.ps tmp/1rh1o1384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/28phi1384952168.ps tmp/28phi1384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/3n9x81384952168.ps tmp/3n9x81384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/4ibl11384952168.ps tmp/4ibl11384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/5b6xf1384952168.ps tmp/5b6xf1384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/6rwe01384952168.ps tmp/6rwe01384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ni2n1384952168.ps tmp/7ni2n1384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/8rsqc1384952168.ps tmp/8rsqc1384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/9xu701384952168.ps tmp/9xu701384952168.png",intern=TRUE))
character(0)
> try(system("convert tmp/10euu11384952168.ps tmp/10euu11384952168.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
10.650 1.597 12.235