R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-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(1
+ ,186.59
+ ,26
+ ,21
+ ,21
+ ,23
+ ,17
+ ,23
+ ,4
+ ,1
+ ,244.665
+ ,20
+ ,16
+ ,15
+ ,24
+ ,17
+ ,20
+ ,4
+ ,1
+ ,248.18
+ ,19
+ ,19
+ ,18
+ ,22
+ ,18
+ ,20
+ ,6
+ ,2
+ ,253.568
+ ,19
+ ,18
+ ,11
+ ,20
+ ,21
+ ,21
+ ,8
+ ,1
+ ,171.242
+ ,20
+ ,16
+ ,8
+ ,24
+ ,20
+ ,24
+ ,8
+ ,1
+ ,413.971
+ ,25
+ ,23
+ ,19
+ ,27
+ ,28
+ ,22
+ ,4
+ ,2
+ ,216.89
+ ,25
+ ,17
+ ,4
+ ,28
+ ,19
+ ,23
+ ,4
+ ,1
+ ,227.901
+ ,22
+ ,12
+ ,20
+ ,27
+ ,22
+ ,20
+ ,8
+ ,1
+ ,259.823
+ ,26
+ ,19
+ ,16
+ ,24
+ ,16
+ ,25
+ ,5
+ ,1
+ ,148.438
+ ,22
+ ,16
+ ,14
+ ,23
+ ,18
+ ,23
+ ,4
+ ,2
+ ,241.013
+ ,17
+ ,19
+ ,10
+ ,24
+ ,25
+ ,27
+ ,4
+ ,2
+ ,206.248
+ ,22
+ ,20
+ ,13
+ ,27
+ ,17
+ ,27
+ ,4
+ ,1
+ ,108.908
+ ,19
+ ,13
+ ,14
+ ,27
+ ,14
+ ,22
+ ,4
+ ,1
+ ,267.952
+ ,24
+ ,20
+ ,8
+ ,28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,6
+ ,2
+ ,217.566
+ ,18
+ ,17
+ ,13
+ ,18
+ ,16
+ ,16
+ ,4
+ ,1
+ ,232.527
+ ,20
+ ,18
+ ,17
+ ,20
+ ,16
+ ,18
+ ,4)
+ ,dim=c(9
+ ,162)
+ ,dimnames=list(c('G'
+ ,'Month'
+ ,'I1'
+ ,'I2'
+ ,'I3'
+ ,'E1'
+ ,'E2'
+ ,'E3'
+ ,'A
')
+ ,1:162))
> y <- array(NA,dim=c(9,162),dimnames=list(c('G','Month','I1','I2','I3','E1','E2','E3','A
'),1:162))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> library(lattice)
> library(lmtest)
Loading required package: zoo
> 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
G Month I1 I2 I3 E1 E2 E3 A\r
1 1 186.590 26 21 21 23 17 23 4
2 1 244.665 20 16 15 24 17 20 4
3 1 248.180 19 19 18 22 18 20 6
4 2 253.568 19 18 11 20 21 21 8
5 1 171.242 20 16 8 24 20 24 8
6 1 413.971 25 23 19 27 28 22 4
7 2 216.890 25 17 4 28 19 23 4
8 1 227.901 22 12 20 27 22 20 8
9 1 259.823 26 19 16 24 16 25 5
10 1 148.438 22 16 14 23 18 23 4
11 2 241.013 17 19 10 24 25 27 4
12 2 206.248 22 20 13 27 17 27 4
13 1 108.908 19 13 14 27 14 22 4
14 1 267.952 24 20 8 28 11 24 4
15 1 314.219 26 27 23 27 27 25 4
16 2 235.115 21 17 11 23 20 22 8
17 1 203.027 13 8 9 24 22 28 4
18 2 365.415 26 25 24 28 22 28 4
19 2 350.933 20 26 5 27 21 27 4
20 1 263.304 22 13 15 25 23 25 8
21 2 738.751 14 19 5 19 17 16 4
22 1 959.073 21 15 19 24 24 28 7
23 1 483.828 7 5 6 20 14 21 4
24 2 213.016 23 16 13 28 17 24 4
25 1 177.341 17 14 11 26 23 27 5
26 1 352.622 25 24 17 23 24 14 4
27 1 352.622 25 24 17 23 24 14 4
28 1 217.307 19 9 5 20 8 27 4
29 2 236.184 20 19 9 11 22 20 4
30 1 215.701 23 19 15 24 23 21 4
31 2 228.383 22 25 17 25 25 22 4
32 1 485.625 22 19 17 23 21 21 4
33 1 252.502 21 18 20 18 24 12 15
34 2 342.515 15 15 12 20 15 20 10
35 2 196.931 20 12 7 20 22 24 4
36 2 365.315 22 21 16 24 21 19 8
37 1 316.664 18 12 7 23 25 28 4
38 2 313.523 20 15 14 25 16 23 4
39 2 188.124 28 28 24 28 28 27 4
40 1 184.083 22 25 15 26 23 22 4
41 1 362.962 18 19 15 26 21 27 7
42 1 170.161 23 20 10 23 21 26 4
43 1 167.484 20 24 14 22 26 22 6
44 2 211.752 25 26 18 24 22 21 5
45 2 276.469 26 25 12 21 21 19 4
46 1 182.097 15 12 9 20 18 24 16
47 2 266.904 17 12 9 22 12 19 5
48 2 235.328 23 15 8 20 25 26 12
49 1 329.450 21 17 18 25 17 22 6
50 2 258.118 13 14 10 20 24 28 9
51 1 952.515 18 16 17 22 15 21 9
52 1 247.141 19 11 14 23 13 23 4
53 1 498.726 22 20 16 25 26 28 5
54 1 313.308 16 11 10 23 16 10 4
55 2 420.188 24 22 19 23 24 24 4
56 1 231.156 18 20 10 22 21 21 5
57 1 227.844 20 19 14 24 20 21 4
58 1 204.385 24 17 10 25 14 24 4
59 2 216.563 14 21 4 21 25 24 4
60 2 207.190 22 23 19 12 25 25 5
61 1 232.417 24 18 9 17 20 25 4
62 1 203.109 18 17 12 20 22 23 6
63 1 221.070 21 27 16 23 20 21 4
64 2 254.623 23 25 11 23 26 16 4
65 1 108.981 17 19 18 20 18 17 18
66 2 229.417 22 22 11 28 22 25 4
67 2 476.376 24 24 24 24 24 24 6
68 2 221.910 21 20 17 24 17 23 4
69 1 158.946 22 19 18 24 24 25 4
70 1 295.746 16 11 9 24 20 23 5
71 1 187.976 21 22 19 28 19 28 4
72 2 283.760 23 22 18 25 20 26 4
73 2 705.401 22 16 12 21 15 22 5
74 1 178.690 24 20 23 25 23 19 10
75 1 232.635 24 24 22 25 26 26 5
76 1 245.185 16 16 14 18 22 18 8
77 1 186.030 16 16 14 17 20 18 8
78 2 181.142 21 22 16 26 24 25 5
79 2 228.478 26 24 23 28 26 27 4
80 2 491.849 15 16 7 21 21 12 4
81 2 506.461 25 27 10 27 25 15 4
82 1 182.828 18 11 12 22 13 21 5
83 0 263.654 23 21 12 21 20 23 4
84 1 253.718 20 20 12 25 22 22 4
85 2 480.937 17 20 17 22 23 21 8
86 2 209.894 25 27 21 23 28 24 4
87 1 655.920 24 20 16 26 22 27 5
88 1 223.408 17 12 11 19 20 22 14
89 1 103.138 19 8 14 25 6 28 8
90 1 255.664 20 21 13 21 21 26 8
91 1 184.661 15 18 9 13 20 10 4
92 2 372.945 27 24 19 24 18 19 4
93 1 758.600 22 16 13 25 23 22 6
94 1 256.445 23 18 19 26 20 21 4
95 1 204.868 16 20 13 25 24 24 7
96 1 197.384 19 20 13 25 22 25 7
97 2 245.311 25 19 13 22 21 21 4
98 1 301.707 19 17 14 21 18 20 6
99 2 501.478 19 16 12 23 21 21 4
100 2 278.731 26 26 22 25 23 24 7
101 1 205.920 21 15 11 24 23 23 4
102 2 177.140 20 22 5 21 15 18 4
103 1 139.753 24 17 18 21 21 24 8
104 1 366.460 22 23 19 25 24 24 4
105 2 435.522 20 21 14 22 23 19 4
106 1 239.906 18 19 15 20 21 20 10
107 2 178.722 18 14 12 20 21 18 8
108 1 340.040 24 17 19 23 20 20 6
109 1 236.948 24 12 15 28 11 27 4
110 1 221.152 22 24 17 23 22 23 4
111 1 263.303 23 18 8 28 27 26 4
112 1 222.814 22 20 10 24 25 23 5
113 1 317.990 20 16 12 18 18 17 4
114 1 149.593 18 20 12 20 20 21 6
115 1 221.983 25 22 20 28 24 25 4
116 2 201.551 18 12 12 21 10 23 5
117 1 266.901 16 16 12 21 27 27 7
118 1 185.218 20 17 14 25 21 24 8
119 2 347.536 19 22 6 19 21 20 5
120 1 395.593 15 12 10 18 18 27 8
121 1 238.217 19 14 18 21 15 21 10
122 1 254.697 19 23 18 22 24 24 8
123 1 157.584 16 15 7 24 22 21 5
124 1 807.302 17 17 18 15 14 15 12
125 1 252.391 28 28 9 28 28 25 4
126 2 189.194 23 20 17 26 18 25 5
127 1 267.834 25 23 22 23 26 22 4
128 1 173.150 20 13 11 26 17 24 6
129 2 267.633 17 18 15 20 19 21 4
130 2 283.284 23 23 17 22 22 22 4
131 1 209.475 16 19 15 20 18 23 7
132 2 135.135 23 23 22 23 24 22 7
133 2 285.012 11 12 9 22 15 20 10
134 2 178.495 18 16 13 24 18 23 4
135 2 256.852 24 23 20 23 26 25 5
136 1 301.828 23 13 14 22 11 23 8
137 1 158.403 21 22 14 26 26 22 11
138 2 355.963 16 18 12 23 21 25 7
139 2 364.117 24 23 20 27 23 26 4
140 1 233.203 23 20 20 23 23 22 8
141 1 257.634 18 10 8 21 15 24 6
142 1 208.570 20 17 17 26 22 24 7
143 1 212.503 9 18 9 23 26 25 5
144 2 251.059 24 15 18 21 16 20 4
145 1 276.803 25 23 22 27 20 26 8
146 1 198.339 20 17 10 19 18 21 4
147 2 301.018 21 17 13 23 22 26 8
148 2 369.761 25 22 15 25 16 21 6
149 2 162.768 22 20 18 23 19 22 4
150 2 199.968 21 20 18 22 20 16 9
151 1 406.676 21 19 12 22 19 26 5
152 1 364.156 22 18 12 25 23 28 6
153 1 202.391 27 22 20 25 24 18 4
154 2 319.491 24 20 12 28 25 25 4
155 2 185.546 24 22 16 28 21 23 4
156 2 243.559 21 18 16 20 21 21 5
157 1 220.928 18 16 18 25 23 20 6
158 1 193.714 16 16 16 19 27 25 16
159 1 372.943 22 16 13 25 23 22 6
160 1 163.822 20 16 17 22 18 21 6
161 2 217.566 18 17 13 18 16 16 4
162 1 232.527 20 18 17 20 16 18 4
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Month I1 I2 I3 E1
1.4018812 0.0002130 -0.0020792 0.0429579 -0.0155370 -0.0117692
E2 E3 `A\r`
-0.0135941 0.0014628 -0.0162112
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.5757 -0.3800 -0.1866 0.5206 0.8075
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.4018812 0.4139841 3.386 0.00090 ***
Month 0.0002130 0.0002737 0.778 0.43755
I1 -0.0020792 0.0155770 -0.133 0.89399
I2 0.0429579 0.0134172 3.202 0.00166 **
I3 -0.0155370 0.0105124 -1.478 0.14147
E1 -0.0117692 0.0150660 -0.781 0.43591
E2 -0.0135941 0.0115333 -1.179 0.24035
E3 0.0014628 0.0119017 0.123 0.90234
`A\r` -0.0162112 0.0166238 -0.975 0.33101
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.4844 on 153 degrees of freedom
Multiple R-squared: 0.1085, Adjusted R-squared: 0.06187
F-statistic: 2.327 on 8 and 153 DF, p-value: 0.02192
> 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.8133773 0.3732455 0.1866227
[2,] 0.7055615 0.5888769 0.2944385
[3,] 0.6658919 0.6682162 0.3341081
[4,] 0.5644806 0.8710388 0.4355194
[5,] 0.5704628 0.8590745 0.4295372
[6,] 0.5310352 0.9379297 0.4689648
[7,] 0.6828138 0.6343725 0.3171862
[8,] 0.6056739 0.7886521 0.3943261
[9,] 0.5522165 0.8955671 0.4477835
[10,] 0.4930934 0.9861867 0.5069066
[11,] 0.4363971 0.8727941 0.5636029
[12,] 0.3585218 0.7170435 0.6414782
[13,] 0.4897860 0.9795721 0.5102140
[14,] 0.4556035 0.9112071 0.5443965
[15,] 0.4190297 0.8380594 0.5809703
[16,] 0.3698953 0.7397907 0.6301047
[17,] 0.3148290 0.6296579 0.6851710
[18,] 0.3198274 0.6396547 0.6801726
[19,] 0.2771418 0.5542835 0.7228582
[20,] 0.2674822 0.5349643 0.7325178
[21,] 0.2263026 0.4526052 0.7736974
[22,] 0.1867085 0.3734169 0.8132915
[23,] 0.2000879 0.4001759 0.7999121
[24,] 0.2501049 0.5002098 0.7498951
[25,] 0.2736565 0.5473130 0.7263435
[26,] 0.2648583 0.5297166 0.7351417
[27,] 0.3693482 0.7386964 0.6306518
[28,] 0.3686757 0.7373514 0.6313243
[29,] 0.4231519 0.8463038 0.5768481
[30,] 0.4366272 0.8732544 0.5633728
[31,] 0.4694375 0.9388749 0.5305625
[32,] 0.5051583 0.9896834 0.4948417
[33,] 0.4950234 0.9900468 0.5049766
[34,] 0.4600177 0.9200354 0.5399823
[35,] 0.4431765 0.8863529 0.5568235
[36,] 0.4941827 0.9883655 0.5058173
[37,] 0.5405661 0.9188677 0.4594339
[38,] 0.5012323 0.9975354 0.4987677
[39,] 0.5492954 0.9014092 0.4507046
[40,] 0.5280802 0.9438395 0.4719198
[41,] 0.4806763 0.9613527 0.5193237
[42,] 0.4634784 0.9269567 0.5365216
[43,] 0.4238693 0.8477386 0.5761307
[44,] 0.4471630 0.8943260 0.5528370
[45,] 0.4678245 0.9356490 0.5321755
[46,] 0.4531295 0.9062590 0.5468705
[47,] 0.4445307 0.8890614 0.5554693
[48,] 0.4199392 0.8398785 0.5800608
[49,] 0.4198681 0.8397363 0.5801319
[50,] 0.4408894 0.8817789 0.5591106
[51,] 0.4251485 0.8502971 0.5748515
[52,] 0.4885324 0.9770649 0.5114676
[53,] 0.4662358 0.9324715 0.5337642
[54,] 0.4318683 0.8637367 0.5681317
[55,] 0.4261915 0.8523829 0.5738085
[56,] 0.4507144 0.9014287 0.5492856
[57,] 0.4717370 0.9434741 0.5282630
[58,] 0.4402338 0.8804676 0.5597662
[59,] 0.3998123 0.7996246 0.6001877
[60,] 0.3980089 0.7960178 0.6019911
[61,] 0.4054910 0.8109819 0.5945090
[62,] 0.4114592 0.8229185 0.5885408
[63,] 0.3756689 0.7513379 0.6243311
[64,] 0.3616289 0.7232579 0.6383711
[65,] 0.3306145 0.6612290 0.6693855
[66,] 0.3013221 0.6026442 0.6986779
[67,] 0.3171853 0.6343707 0.6828147
[68,] 0.3443279 0.6886558 0.6556721
[69,] 0.3457414 0.6914828 0.6542586
[70,] 0.3077353 0.6154705 0.6922647
[71,] 0.2751860 0.5503719 0.7248140
[72,] 0.6746617 0.6506767 0.3253383
[73,] 0.6731001 0.6537999 0.3268999
[74,] 0.6945559 0.6108881 0.3054441
[75,] 0.6917831 0.6164339 0.3082169
[76,] 0.6846282 0.6307435 0.3153718
[77,] 0.6480389 0.7039221 0.3519611
[78,] 0.6133586 0.7732828 0.3866414
[79,] 0.6079284 0.7841433 0.3920716
[80,] 0.6275727 0.7448545 0.3724273
[81,] 0.6126411 0.7747178 0.3873589
[82,] 0.5847593 0.8304813 0.4152407
[83,] 0.5635550 0.8728901 0.4364450
[84,] 0.5458779 0.9082443 0.4541221
[85,] 0.5283094 0.9433811 0.4716906
[86,] 0.5497566 0.9004868 0.4502434
[87,] 0.5373479 0.9253042 0.4626521
[88,] 0.5668328 0.8663345 0.4331672
[89,] 0.5731482 0.8537036 0.4268518
[90,] 0.5360858 0.9278284 0.4639142
[91,] 0.4936398 0.9872795 0.5063602
[92,] 0.4489257 0.8978514 0.5510743
[93,] 0.4464928 0.8929857 0.5535072
[94,] 0.4436478 0.8872957 0.5563522
[95,] 0.4172101 0.8344202 0.5827899
[96,] 0.5093028 0.9813944 0.4906972
[97,] 0.4702624 0.9405247 0.5297376
[98,] 0.4562555 0.9125111 0.5437445
[99,] 0.4904939 0.9809879 0.5095061
[100,] 0.4562068 0.9124137 0.5437932
[101,] 0.4307928 0.8615856 0.5692072
[102,] 0.4169726 0.8339452 0.5830274
[103,] 0.4327860 0.8655719 0.5672140
[104,] 0.4242204 0.8484408 0.5757796
[105,] 0.4352812 0.8705624 0.5647188
[106,] 0.3874419 0.7748839 0.6125581
[107,] 0.3496061 0.6992122 0.6503939
[108,] 0.3327154 0.6654308 0.6672846
[109,] 0.2895583 0.5791167 0.7104417
[110,] 0.2589598 0.5179196 0.7410402
[111,] 0.2578538 0.5157076 0.7421462
[112,] 0.2288073 0.4576145 0.7711927
[113,] 0.2340550 0.4681101 0.7659450
[114,] 0.2571927 0.5143853 0.7428073
[115,] 0.2571286 0.5142573 0.7428714
[116,] 0.2715243 0.5430486 0.7284757
[117,] 0.2257910 0.4515821 0.7742090
[118,] 0.2089205 0.4178410 0.7910795
[119,] 0.1809599 0.3619197 0.8190401
[120,] 0.1916183 0.3832365 0.8083817
[121,] 0.1943787 0.3887574 0.8056213
[122,] 0.2421210 0.4842420 0.7578790
[123,] 0.2825573 0.5651147 0.7174427
[124,] 0.2581303 0.5162606 0.7418697
[125,] 0.2208241 0.4416482 0.7791759
[126,] 0.1974684 0.3949368 0.8025316
[127,] 0.2241494 0.4482987 0.7758506
[128,] 0.2597276 0.5194551 0.7402724
[129,] 0.2223711 0.4447422 0.7776289
[130,] 0.1927360 0.3854721 0.8072640
[131,] 0.1540935 0.3081870 0.8459065
[132,] 0.1130752 0.2261503 0.8869248
[133,] 0.1862353 0.3724706 0.8137647
[134,] 0.1603305 0.3206609 0.8396695
[135,] 0.3315317 0.6630634 0.6684683
[136,] 0.4246131 0.8492263 0.5753869
[137,] 0.4315813 0.8631627 0.5684187
[138,] 0.4320666 0.8641331 0.5679334
[139,] 0.6285492 0.7429016 0.3714508
> postscript(file="/var/www/rcomp/tmp/135y31321803836.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/www/rcomp/tmp/2jbu91321803836.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/www/rcomp/tmp/3yger1321803836.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/www/rcomp/tmp/4tgqo1321803836.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/www/rcomp/tmp/5eehk1321803836.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 = 162
Frequency = 1
1 2 3 4 5 6
-0.43041866 -0.31754179 -0.38015445 0.60109997 -0.31088228 -0.39985543
7 8 9 10 11 12
0.55478328 0.10782847 -0.42632934 -0.31098286 0.56895329 0.51696372
13 14 15 16 17 18
-0.18576192 -0.63511622 -0.50419038 0.67239849 -0.01651578 0.52576551
19 20 21 22 23 24
0.15431315 -0.03761537 0.22747988 -0.23046865 -0.15214305 0.70559037
25 26 27 28 29 30
-0.17459346 -0.55056850 -0.55056850 -0.34812100 0.37713982 -0.35390507
31 32 33 34 35 36
0.45213502 -0.42137433 -0.11079356 0.67056428 0.75520598 0.58234413
37 38 39 40 41 42
-0.20422226 0.68899584 0.52184921 -0.58492014 -0.35946767 -0.51111745
43 44 45 46 47 48
-0.53199336 0.39961734 0.27545700 -0.08079775 0.67625685 0.80747318
49 50 51 52 53 54
-0.28860648 0.79070413 -0.41256514 -0.19143003 -0.38517947 -0.21411405
55 56 57 58 59 60
0.53531970 -0.52275257 -0.41904931 -0.45615077 0.35786712 0.43246304
61 62 63 64 65 66
-0.53466958 -0.35348798 -0.73988555 0.35423402 -0.17927245 0.47770320
67 68 69 70 71 72
0.55930998 0.54423933 -0.28953865 -0.16256861 -0.43642161 0.51300533
73 74 75 76 77 78
0.49263670 -0.15064027 -0.40001499 -0.27638074 -0.30273545 0.58345509
79 80 81 82 83 84
0.63819984 0.52587497 0.23823170 -0.20351409 -1.57566401 -0.46109896
85 86 87 88 89 90
0.60653426 0.45286248 -0.45565534 -0.06844420 -0.04596638 -0.49061174
91 92 93 94 95 96
-0.56834366 0.40322474 -0.33111884 -0.27472337 -0.37057511 -0.39139403
97 98 99 100 101 102
0.56214424 -0.37955974 0.62019914 0.50297252 -0.24922169 0.22415577
103 104 105 106 107 108
-0.20515776 -0.47681166 0.47095913 -0.34499318 0.80672360 -0.24891835
109 110 111 112 113 114
-0.18047644 -0.56915018 -0.33570828 -0.43766889 -0.43240747 -0.49522310
115 116 117 118 119 120
-0.34745364 0.69406185 -0.23817914 -0.23823216 0.27262328 -0.26836199
121 122 123 124 125 126
-0.15241174 -0.44523841 -0.30592556 -0.44969645 -0.72197274 0.60578612
127 128 129 130 131 132
-0.39637543 -0.18547028 0.56405997 0.45234350 -0.43647285 0.64918262
133 134 135 136 137 138
0.78029934 0.67052881 0.58463383 -0.25479253 -0.31393057 0.60182967
139 140 141 142 143 144
0.55040177 -0.27129370 -0.21139957 -0.18744396 -0.39322403 0.73008016
145 146 147 148 149 150
-0.37378048 -0.47503006 0.71076931 0.43759013 0.59133750 0.67299059
151 152 153 154 155 156
-0.51437909 -0.35731320 -0.36418938 0.60490702 0.55822487 0.63644238
157 158 159 160 161 162
-0.14427548 -0.03515062 -0.24895567 -0.24822897 0.53168269 -0.42754312
> postscript(file="/var/www/rcomp/tmp/6xm0p1321803836.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 = 162
Frequency = 1
lag(myerror, k = 1) myerror
0 -0.43041866 NA
1 -0.31754179 -0.43041866
2 -0.38015445 -0.31754179
3 0.60109997 -0.38015445
4 -0.31088228 0.60109997
5 -0.39985543 -0.31088228
6 0.55478328 -0.39985543
7 0.10782847 0.55478328
8 -0.42632934 0.10782847
9 -0.31098286 -0.42632934
10 0.56895329 -0.31098286
11 0.51696372 0.56895329
12 -0.18576192 0.51696372
13 -0.63511622 -0.18576192
14 -0.50419038 -0.63511622
15 0.67239849 -0.50419038
16 -0.01651578 0.67239849
17 0.52576551 -0.01651578
18 0.15431315 0.52576551
19 -0.03761537 0.15431315
20 0.22747988 -0.03761537
21 -0.23046865 0.22747988
22 -0.15214305 -0.23046865
23 0.70559037 -0.15214305
24 -0.17459346 0.70559037
25 -0.55056850 -0.17459346
26 -0.55056850 -0.55056850
27 -0.34812100 -0.55056850
28 0.37713982 -0.34812100
29 -0.35390507 0.37713982
30 0.45213502 -0.35390507
31 -0.42137433 0.45213502
32 -0.11079356 -0.42137433
33 0.67056428 -0.11079356
34 0.75520598 0.67056428
35 0.58234413 0.75520598
36 -0.20422226 0.58234413
37 0.68899584 -0.20422226
38 0.52184921 0.68899584
39 -0.58492014 0.52184921
40 -0.35946767 -0.58492014
41 -0.51111745 -0.35946767
42 -0.53199336 -0.51111745
43 0.39961734 -0.53199336
44 0.27545700 0.39961734
45 -0.08079775 0.27545700
46 0.67625685 -0.08079775
47 0.80747318 0.67625685
48 -0.28860648 0.80747318
49 0.79070413 -0.28860648
50 -0.41256514 0.79070413
51 -0.19143003 -0.41256514
52 -0.38517947 -0.19143003
53 -0.21411405 -0.38517947
54 0.53531970 -0.21411405
55 -0.52275257 0.53531970
56 -0.41904931 -0.52275257
57 -0.45615077 -0.41904931
58 0.35786712 -0.45615077
59 0.43246304 0.35786712
60 -0.53466958 0.43246304
61 -0.35348798 -0.53466958
62 -0.73988555 -0.35348798
63 0.35423402 -0.73988555
64 -0.17927245 0.35423402
65 0.47770320 -0.17927245
66 0.55930998 0.47770320
67 0.54423933 0.55930998
68 -0.28953865 0.54423933
69 -0.16256861 -0.28953865
70 -0.43642161 -0.16256861
71 0.51300533 -0.43642161
72 0.49263670 0.51300533
73 -0.15064027 0.49263670
74 -0.40001499 -0.15064027
75 -0.27638074 -0.40001499
76 -0.30273545 -0.27638074
77 0.58345509 -0.30273545
78 0.63819984 0.58345509
79 0.52587497 0.63819984
80 0.23823170 0.52587497
81 -0.20351409 0.23823170
82 -1.57566401 -0.20351409
83 -0.46109896 -1.57566401
84 0.60653426 -0.46109896
85 0.45286248 0.60653426
86 -0.45565534 0.45286248
87 -0.06844420 -0.45565534
88 -0.04596638 -0.06844420
89 -0.49061174 -0.04596638
90 -0.56834366 -0.49061174
91 0.40322474 -0.56834366
92 -0.33111884 0.40322474
93 -0.27472337 -0.33111884
94 -0.37057511 -0.27472337
95 -0.39139403 -0.37057511
96 0.56214424 -0.39139403
97 -0.37955974 0.56214424
98 0.62019914 -0.37955974
99 0.50297252 0.62019914
100 -0.24922169 0.50297252
101 0.22415577 -0.24922169
102 -0.20515776 0.22415577
103 -0.47681166 -0.20515776
104 0.47095913 -0.47681166
105 -0.34499318 0.47095913
106 0.80672360 -0.34499318
107 -0.24891835 0.80672360
108 -0.18047644 -0.24891835
109 -0.56915018 -0.18047644
110 -0.33570828 -0.56915018
111 -0.43766889 -0.33570828
112 -0.43240747 -0.43766889
113 -0.49522310 -0.43240747
114 -0.34745364 -0.49522310
115 0.69406185 -0.34745364
116 -0.23817914 0.69406185
117 -0.23823216 -0.23817914
118 0.27262328 -0.23823216
119 -0.26836199 0.27262328
120 -0.15241174 -0.26836199
121 -0.44523841 -0.15241174
122 -0.30592556 -0.44523841
123 -0.44969645 -0.30592556
124 -0.72197274 -0.44969645
125 0.60578612 -0.72197274
126 -0.39637543 0.60578612
127 -0.18547028 -0.39637543
128 0.56405997 -0.18547028
129 0.45234350 0.56405997
130 -0.43647285 0.45234350
131 0.64918262 -0.43647285
132 0.78029934 0.64918262
133 0.67052881 0.78029934
134 0.58463383 0.67052881
135 -0.25479253 0.58463383
136 -0.31393057 -0.25479253
137 0.60182967 -0.31393057
138 0.55040177 0.60182967
139 -0.27129370 0.55040177
140 -0.21139957 -0.27129370
141 -0.18744396 -0.21139957
142 -0.39322403 -0.18744396
143 0.73008016 -0.39322403
144 -0.37378048 0.73008016
145 -0.47503006 -0.37378048
146 0.71076931 -0.47503006
147 0.43759013 0.71076931
148 0.59133750 0.43759013
149 0.67299059 0.59133750
150 -0.51437909 0.67299059
151 -0.35731320 -0.51437909
152 -0.36418938 -0.35731320
153 0.60490702 -0.36418938
154 0.55822487 0.60490702
155 0.63644238 0.55822487
156 -0.14427548 0.63644238
157 -0.03515062 -0.14427548
158 -0.24895567 -0.03515062
159 -0.24822897 -0.24895567
160 0.53168269 -0.24822897
161 -0.42754312 0.53168269
162 NA -0.42754312
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.31754179 -0.43041866
[2,] -0.38015445 -0.31754179
[3,] 0.60109997 -0.38015445
[4,] -0.31088228 0.60109997
[5,] -0.39985543 -0.31088228
[6,] 0.55478328 -0.39985543
[7,] 0.10782847 0.55478328
[8,] -0.42632934 0.10782847
[9,] -0.31098286 -0.42632934
[10,] 0.56895329 -0.31098286
[11,] 0.51696372 0.56895329
[12,] -0.18576192 0.51696372
[13,] -0.63511622 -0.18576192
[14,] -0.50419038 -0.63511622
[15,] 0.67239849 -0.50419038
[16,] -0.01651578 0.67239849
[17,] 0.52576551 -0.01651578
[18,] 0.15431315 0.52576551
[19,] -0.03761537 0.15431315
[20,] 0.22747988 -0.03761537
[21,] -0.23046865 0.22747988
[22,] -0.15214305 -0.23046865
[23,] 0.70559037 -0.15214305
[24,] -0.17459346 0.70559037
[25,] -0.55056850 -0.17459346
[26,] -0.55056850 -0.55056850
[27,] -0.34812100 -0.55056850
[28,] 0.37713982 -0.34812100
[29,] -0.35390507 0.37713982
[30,] 0.45213502 -0.35390507
[31,] -0.42137433 0.45213502
[32,] -0.11079356 -0.42137433
[33,] 0.67056428 -0.11079356
[34,] 0.75520598 0.67056428
[35,] 0.58234413 0.75520598
[36,] -0.20422226 0.58234413
[37,] 0.68899584 -0.20422226
[38,] 0.52184921 0.68899584
[39,] -0.58492014 0.52184921
[40,] -0.35946767 -0.58492014
[41,] -0.51111745 -0.35946767
[42,] -0.53199336 -0.51111745
[43,] 0.39961734 -0.53199336
[44,] 0.27545700 0.39961734
[45,] -0.08079775 0.27545700
[46,] 0.67625685 -0.08079775
[47,] 0.80747318 0.67625685
[48,] -0.28860648 0.80747318
[49,] 0.79070413 -0.28860648
[50,] -0.41256514 0.79070413
[51,] -0.19143003 -0.41256514
[52,] -0.38517947 -0.19143003
[53,] -0.21411405 -0.38517947
[54,] 0.53531970 -0.21411405
[55,] -0.52275257 0.53531970
[56,] -0.41904931 -0.52275257
[57,] -0.45615077 -0.41904931
[58,] 0.35786712 -0.45615077
[59,] 0.43246304 0.35786712
[60,] -0.53466958 0.43246304
[61,] -0.35348798 -0.53466958
[62,] -0.73988555 -0.35348798
[63,] 0.35423402 -0.73988555
[64,] -0.17927245 0.35423402
[65,] 0.47770320 -0.17927245
[66,] 0.55930998 0.47770320
[67,] 0.54423933 0.55930998
[68,] -0.28953865 0.54423933
[69,] -0.16256861 -0.28953865
[70,] -0.43642161 -0.16256861
[71,] 0.51300533 -0.43642161
[72,] 0.49263670 0.51300533
[73,] -0.15064027 0.49263670
[74,] -0.40001499 -0.15064027
[75,] -0.27638074 -0.40001499
[76,] -0.30273545 -0.27638074
[77,] 0.58345509 -0.30273545
[78,] 0.63819984 0.58345509
[79,] 0.52587497 0.63819984
[80,] 0.23823170 0.52587497
[81,] -0.20351409 0.23823170
[82,] -1.57566401 -0.20351409
[83,] -0.46109896 -1.57566401
[84,] 0.60653426 -0.46109896
[85,] 0.45286248 0.60653426
[86,] -0.45565534 0.45286248
[87,] -0.06844420 -0.45565534
[88,] -0.04596638 -0.06844420
[89,] -0.49061174 -0.04596638
[90,] -0.56834366 -0.49061174
[91,] 0.40322474 -0.56834366
[92,] -0.33111884 0.40322474
[93,] -0.27472337 -0.33111884
[94,] -0.37057511 -0.27472337
[95,] -0.39139403 -0.37057511
[96,] 0.56214424 -0.39139403
[97,] -0.37955974 0.56214424
[98,] 0.62019914 -0.37955974
[99,] 0.50297252 0.62019914
[100,] -0.24922169 0.50297252
[101,] 0.22415577 -0.24922169
[102,] -0.20515776 0.22415577
[103,] -0.47681166 -0.20515776
[104,] 0.47095913 -0.47681166
[105,] -0.34499318 0.47095913
[106,] 0.80672360 -0.34499318
[107,] -0.24891835 0.80672360
[108,] -0.18047644 -0.24891835
[109,] -0.56915018 -0.18047644
[110,] -0.33570828 -0.56915018
[111,] -0.43766889 -0.33570828
[112,] -0.43240747 -0.43766889
[113,] -0.49522310 -0.43240747
[114,] -0.34745364 -0.49522310
[115,] 0.69406185 -0.34745364
[116,] -0.23817914 0.69406185
[117,] -0.23823216 -0.23817914
[118,] 0.27262328 -0.23823216
[119,] -0.26836199 0.27262328
[120,] -0.15241174 -0.26836199
[121,] -0.44523841 -0.15241174
[122,] -0.30592556 -0.44523841
[123,] -0.44969645 -0.30592556
[124,] -0.72197274 -0.44969645
[125,] 0.60578612 -0.72197274
[126,] -0.39637543 0.60578612
[127,] -0.18547028 -0.39637543
[128,] 0.56405997 -0.18547028
[129,] 0.45234350 0.56405997
[130,] -0.43647285 0.45234350
[131,] 0.64918262 -0.43647285
[132,] 0.78029934 0.64918262
[133,] 0.67052881 0.78029934
[134,] 0.58463383 0.67052881
[135,] -0.25479253 0.58463383
[136,] -0.31393057 -0.25479253
[137,] 0.60182967 -0.31393057
[138,] 0.55040177 0.60182967
[139,] -0.27129370 0.55040177
[140,] -0.21139957 -0.27129370
[141,] -0.18744396 -0.21139957
[142,] -0.39322403 -0.18744396
[143,] 0.73008016 -0.39322403
[144,] -0.37378048 0.73008016
[145,] -0.47503006 -0.37378048
[146,] 0.71076931 -0.47503006
[147,] 0.43759013 0.71076931
[148,] 0.59133750 0.43759013
[149,] 0.67299059 0.59133750
[150,] -0.51437909 0.67299059
[151,] -0.35731320 -0.51437909
[152,] -0.36418938 -0.35731320
[153,] 0.60490702 -0.36418938
[154,] 0.55822487 0.60490702
[155,] 0.63644238 0.55822487
[156,] -0.14427548 0.63644238
[157,] -0.03515062 -0.14427548
[158,] -0.24895567 -0.03515062
[159,] -0.24822897 -0.24895567
[160,] 0.53168269 -0.24822897
[161,] -0.42754312 0.53168269
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.31754179 -0.43041866
2 -0.38015445 -0.31754179
3 0.60109997 -0.38015445
4 -0.31088228 0.60109997
5 -0.39985543 -0.31088228
6 0.55478328 -0.39985543
7 0.10782847 0.55478328
8 -0.42632934 0.10782847
9 -0.31098286 -0.42632934
10 0.56895329 -0.31098286
11 0.51696372 0.56895329
12 -0.18576192 0.51696372
13 -0.63511622 -0.18576192
14 -0.50419038 -0.63511622
15 0.67239849 -0.50419038
16 -0.01651578 0.67239849
17 0.52576551 -0.01651578
18 0.15431315 0.52576551
19 -0.03761537 0.15431315
20 0.22747988 -0.03761537
21 -0.23046865 0.22747988
22 -0.15214305 -0.23046865
23 0.70559037 -0.15214305
24 -0.17459346 0.70559037
25 -0.55056850 -0.17459346
26 -0.55056850 -0.55056850
27 -0.34812100 -0.55056850
28 0.37713982 -0.34812100
29 -0.35390507 0.37713982
30 0.45213502 -0.35390507
31 -0.42137433 0.45213502
32 -0.11079356 -0.42137433
33 0.67056428 -0.11079356
34 0.75520598 0.67056428
35 0.58234413 0.75520598
36 -0.20422226 0.58234413
37 0.68899584 -0.20422226
38 0.52184921 0.68899584
39 -0.58492014 0.52184921
40 -0.35946767 -0.58492014
41 -0.51111745 -0.35946767
42 -0.53199336 -0.51111745
43 0.39961734 -0.53199336
44 0.27545700 0.39961734
45 -0.08079775 0.27545700
46 0.67625685 -0.08079775
47 0.80747318 0.67625685
48 -0.28860648 0.80747318
49 0.79070413 -0.28860648
50 -0.41256514 0.79070413
51 -0.19143003 -0.41256514
52 -0.38517947 -0.19143003
53 -0.21411405 -0.38517947
54 0.53531970 -0.21411405
55 -0.52275257 0.53531970
56 -0.41904931 -0.52275257
57 -0.45615077 -0.41904931
58 0.35786712 -0.45615077
59 0.43246304 0.35786712
60 -0.53466958 0.43246304
61 -0.35348798 -0.53466958
62 -0.73988555 -0.35348798
63 0.35423402 -0.73988555
64 -0.17927245 0.35423402
65 0.47770320 -0.17927245
66 0.55930998 0.47770320
67 0.54423933 0.55930998
68 -0.28953865 0.54423933
69 -0.16256861 -0.28953865
70 -0.43642161 -0.16256861
71 0.51300533 -0.43642161
72 0.49263670 0.51300533
73 -0.15064027 0.49263670
74 -0.40001499 -0.15064027
75 -0.27638074 -0.40001499
76 -0.30273545 -0.27638074
77 0.58345509 -0.30273545
78 0.63819984 0.58345509
79 0.52587497 0.63819984
80 0.23823170 0.52587497
81 -0.20351409 0.23823170
82 -1.57566401 -0.20351409
83 -0.46109896 -1.57566401
84 0.60653426 -0.46109896
85 0.45286248 0.60653426
86 -0.45565534 0.45286248
87 -0.06844420 -0.45565534
88 -0.04596638 -0.06844420
89 -0.49061174 -0.04596638
90 -0.56834366 -0.49061174
91 0.40322474 -0.56834366
92 -0.33111884 0.40322474
93 -0.27472337 -0.33111884
94 -0.37057511 -0.27472337
95 -0.39139403 -0.37057511
96 0.56214424 -0.39139403
97 -0.37955974 0.56214424
98 0.62019914 -0.37955974
99 0.50297252 0.62019914
100 -0.24922169 0.50297252
101 0.22415577 -0.24922169
102 -0.20515776 0.22415577
103 -0.47681166 -0.20515776
104 0.47095913 -0.47681166
105 -0.34499318 0.47095913
106 0.80672360 -0.34499318
107 -0.24891835 0.80672360
108 -0.18047644 -0.24891835
109 -0.56915018 -0.18047644
110 -0.33570828 -0.56915018
111 -0.43766889 -0.33570828
112 -0.43240747 -0.43766889
113 -0.49522310 -0.43240747
114 -0.34745364 -0.49522310
115 0.69406185 -0.34745364
116 -0.23817914 0.69406185
117 -0.23823216 -0.23817914
118 0.27262328 -0.23823216
119 -0.26836199 0.27262328
120 -0.15241174 -0.26836199
121 -0.44523841 -0.15241174
122 -0.30592556 -0.44523841
123 -0.44969645 -0.30592556
124 -0.72197274 -0.44969645
125 0.60578612 -0.72197274
126 -0.39637543 0.60578612
127 -0.18547028 -0.39637543
128 0.56405997 -0.18547028
129 0.45234350 0.56405997
130 -0.43647285 0.45234350
131 0.64918262 -0.43647285
132 0.78029934 0.64918262
133 0.67052881 0.78029934
134 0.58463383 0.67052881
135 -0.25479253 0.58463383
136 -0.31393057 -0.25479253
137 0.60182967 -0.31393057
138 0.55040177 0.60182967
139 -0.27129370 0.55040177
140 -0.21139957 -0.27129370
141 -0.18744396 -0.21139957
142 -0.39322403 -0.18744396
143 0.73008016 -0.39322403
144 -0.37378048 0.73008016
145 -0.47503006 -0.37378048
146 0.71076931 -0.47503006
147 0.43759013 0.71076931
148 0.59133750 0.43759013
149 0.67299059 0.59133750
150 -0.51437909 0.67299059
151 -0.35731320 -0.51437909
152 -0.36418938 -0.35731320
153 0.60490702 -0.36418938
154 0.55822487 0.60490702
155 0.63644238 0.55822487
156 -0.14427548 0.63644238
157 -0.03515062 -0.14427548
158 -0.24895567 -0.03515062
159 -0.24822897 -0.24895567
160 0.53168269 -0.24822897
161 -0.42754312 0.53168269
> 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/rcomp/tmp/7gkfw1321803836.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/www/rcomp/tmp/80b931321803836.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/www/rcomp/tmp/9h7711321803836.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/www/rcomp/tmp/10j1ah1321803836.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/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/rcomp/tmp/11hp8b1321803837.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/rcomp/tmp/125z0k1321803837.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/rcomp/tmp/13di4b1321803837.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/rcomp/tmp/14440k1321803837.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/rcomp/tmp/15pfhp1321803837.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/rcomp/tmp/16rqt91321803837.tab")
+ }
>
> try(system("convert tmp/135y31321803836.ps tmp/135y31321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/2jbu91321803836.ps tmp/2jbu91321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/3yger1321803836.ps tmp/3yger1321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/4tgqo1321803836.ps tmp/4tgqo1321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/5eehk1321803836.ps tmp/5eehk1321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/6xm0p1321803836.ps tmp/6xm0p1321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/7gkfw1321803836.ps tmp/7gkfw1321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/80b931321803836.ps tmp/80b931321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/9h7711321803836.ps tmp/9h7711321803836.png",intern=TRUE))
character(0)
> try(system("convert tmp/10j1ah1321803836.ps tmp/10j1ah1321803836.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.850 0.290 6.142