R version 2.13.0 (2011-04-13)
Copyright (C) 2011 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(68
+ ,95556
+ ,65
+ ,114468
+ ,72
+ ,54565
+ ,54
+ ,88594
+ ,37
+ ,63016
+ ,58
+ ,74151
+ ,70
+ ,79774
+ ,77
+ ,77921
+ ,30
+ ,31258
+ ,41
+ ,53212
+ ,53
+ ,52491
+ ,0
+ ,34956
+ ,74
+ ,91256
+ ,111
+ ,149703
+ ,22
+ ,22807
+ ,1
+ ,6853
+ ,68
+ ,77411
+ ,36
+ ,58907
+ ,47
+ ,48821
+ ,60
+ ,67067
+ ,87
+ ,52295
+ ,63
+ ,110563
+ ,123
+ ,63262
+ ,71
+ ,58126
+ ,69
+ ,50466
+ ,38
+ ,57113
+ ,89
+ ,62932
+ ,76
+ ,77993
+ ,45
+ ,38439
+ ,61
+ ,68091
+ ,122
+ ,70817
+ ,125
+ ,124676
+ ,75
+ ,105965
+ ,84
+ ,109522
+ ,45
+ ,73795
+ ,69
+ ,75865
+ ,53
+ ,82043
+ ,77
+ ,79746
+ ,96
+ ,74349
+ ,100
+ ,77844
+ ,82
+ ,82204
+ ,78
+ ,98681
+ ,76
+ ,55709
+ ,76
+ ,105531
+ ,51
+ ,37137
+ ,40
+ ,51428
+ ,104
+ ,70780
+ ,81
+ ,65703
+ ,83
+ ,55027
+ ,102
+ ,72562
+ ,78
+ ,56699
+ ,70
+ ,81728
+ ,59
+ ,65911
+ ,75
+ ,95580
+ ,83
+ ,56316
+ ,93
+ ,98278
+ ,71
+ ,26982
+ ,42
+ ,46629
+ ,81
+ ,54628
+ ,95
+ ,115189
+ ,93
+ ,96750
+ ,87
+ ,124865
+ ,72
+ ,53009
+ ,44
+ ,59392
+ ,107
+ ,64664
+ ,84
+ ,127818
+ ,75
+ ,36990
+ ,28
+ ,17821
+ ,92
+ ,85224
+ ,87
+ ,154076
+ ,69
+ ,37048
+ ,71
+ ,64881
+ ,102
+ ,59635
+ ,68
+ ,136506
+ ,51
+ ,42051
+ ,50
+ ,66524
+ ,18
+ ,26998
+ ,30
+ ,45988
+ ,87
+ ,63717
+ ,86
+ ,107445
+ ,59
+ ,55071
+ ,78
+ ,102772
+ ,63
+ ,40001
+ ,46
+ ,46657
+ ,68
+ ,54506
+ ,52
+ ,97563
+ ,47
+ ,35838
+ ,31
+ ,36663
+ ,29
+ ,50838
+ ,30
+ ,55369
+ ,69
+ ,86997
+ ,70
+ ,77921
+ ,66
+ ,33032
+ ,20
+ ,56968
+ ,106
+ ,61704
+ ,84
+ ,77519
+ ,73
+ ,117986
+ ,81
+ ,129805
+ ,87
+ ,56733
+ ,79
+ ,72761
+ ,65
+ ,55064
+ ,70
+ ,81278
+ ,7
+ ,5950
+ ,8
+ ,15049
+ ,111
+ ,84607
+ ,67
+ ,113935
+ ,61
+ ,32551
+ ,21
+ ,25109
+ ,41
+ ,31701
+ ,30
+ ,45824
+ ,70
+ ,71170
+ ,70
+ ,89644
+ ,112
+ ,101773
+ ,87
+ ,109011
+ ,71
+ ,101653
+ ,87
+ ,134245
+ ,90
+ ,81493
+ ,112
+ ,136692
+ ,69
+ ,55901
+ ,54
+ ,50741
+ ,85
+ ,109104
+ ,96
+ ,149510
+ ,47
+ ,114425
+ ,93
+ ,147888
+ ,50
+ ,36311
+ ,49
+ ,54987
+ ,76
+ ,70027
+ ,49
+ ,74467
+ ,60
+ ,73713
+ ,38
+ ,100033
+ ,35
+ ,40671
+ ,64
+ ,85505
+ ,72
+ ,89041
+ ,64
+ ,62426
+ ,88
+ ,57231
+ ,66
+ ,82932
+ ,66
+ ,78792
+ ,98
+ ,79169
+ ,58
+ ,59155
+ ,99
+ ,65469
+ ,81
+ ,55827
+ ,56
+ ,63572
+ ,63
+ ,22618
+ ,22
+ ,23824
+ ,91
+ ,58425
+ ,51
+ ,73831
+ ,65
+ ,65724
+ ,56
+ ,63551
+ ,75
+ ,56979
+ ,94
+ ,56756
+ ,85
+ ,72369
+ ,98
+ ,81399
+ ,75
+ ,79194
+ ,76
+ ,117881
+ ,70
+ ,202316
+ ,57
+ ,70711
+ ,78
+ ,44970
+ ,75
+ ,50495
+ ,61
+ ,49319
+ ,48
+ ,53845
+ ,55
+ ,36252
+ ,48
+ ,51390
+ ,80
+ ,75741
+ ,109
+ ,104953
+ ,83
+ ,38417
+ ,27
+ ,65983
+ ,38
+ ,64102
+ ,83
+ ,76839
+ ,27
+ ,56622
+ ,49
+ ,55792
+ ,62
+ ,15430
+ ,24
+ ,25155
+ ,82
+ ,72571
+ ,43
+ ,55291
+ ,79
+ ,67271
+ ,44
+ ,84279
+ ,59
+ ,43460
+ ,49
+ ,99692
+ ,89
+ ,99501
+ ,108
+ ,59633
+ ,36
+ ,28340
+ ,42
+ ,63249
+ ,91
+ ,76013
+ ,108
+ ,82928
+ ,63
+ ,37361
+ ,27
+ ,50000
+ ,80
+ ,48204
+ ,79
+ ,69455
+ ,71
+ ,76168
+ ,49
+ ,84068
+ ,76
+ ,85168
+ ,64
+ ,76195
+ ,67
+ ,125410
+ ,75
+ ,114634
+ ,66
+ ,123328
+ ,115
+ ,139357
+ ,123
+ ,83038
+ ,92
+ ,110044
+ ,65
+ ,120087
+ ,106
+ ,155118
+ ,103
+ ,91939
+ ,73
+ ,83061
+ ,77
+ ,103646
+ ,105
+ ,127122
+ ,37
+ ,29467
+ ,30
+ ,45653
+ ,64
+ ,43750
+ ,13
+ ,19630
+ ,22
+ ,34497
+ ,69
+ ,67229
+ ,35
+ ,66477
+ ,72
+ ,86060
+ ,61
+ ,71181
+ ,80
+ ,88003
+ ,80
+ ,74482
+ ,106
+ ,95815
+ ,54
+ ,174949
+ ,28
+ ,85499
+ ,60
+ ,46765
+ ,70
+ ,27220
+ ,87
+ ,90257
+ ,51
+ ,109882
+ ,75
+ ,51370
+ ,90
+ ,72579
+ ,0
+ ,1168
+ ,12
+ ,5841
+ ,54
+ ,51360
+ ,84
+ ,68369
+ ,30
+ ,25162
+ ,23
+ ,24610
+ ,66
+ ,21067
+ ,57
+ ,30995
+ ,56
+ ,58233
+ ,84
+ ,150662
+ ,0
+ ,855
+ ,4
+ ,6622
+ ,32
+ ,85903
+ ,56
+ ,93694
+ ,9
+ ,14116
+ ,18
+ ,13155
+ ,78
+ ,57637
+ ,86
+ ,111908
+ ,90
+ ,94137
+ ,39
+ ,57550
+ ,56
+ ,62147
+ ,16
+ ,16356
+ ,35
+ ,62832
+ ,18
+ ,40174
+ ,21
+ ,8773
+ ,16
+ ,13983
+ ,78
+ ,63785
+ ,42
+ ,52316
+ ,118
+ ,65196
+ ,77
+ ,99585
+ ,83
+ ,73087
+ ,30
+ ,86271
+ ,89
+ ,72631
+ ,104
+ ,131012
+ ,83
+ ,86281
+ ,121
+ ,130274
+ ,124
+ ,162365
+ ,109
+ ,159051
+ ,76
+ ,56530
+ ,57
+ ,76506
+ ,57
+ ,35606
+ ,28
+ ,49145
+ ,91
+ ,70111
+ ,56
+ ,66398
+ ,89
+ ,92046
+ ,81
+ ,127546
+ ,66
+ ,63989
+ ,2
+ ,6802
+ ,82
+ ,104911
+ ,88
+ ,99509
+ ,63
+ ,43448
+ ,41
+ ,43106
+ ,75
+ ,60029
+ ,83
+ ,108303
+ ,59
+ ,38650
+ ,55
+ ,64167
+ ,19
+ ,47261
+ ,3
+ ,8579
+ ,57
+ ,73586
+ ,54
+ ,97811
+ ,74
+ ,83042
+ ,89
+ ,84365
+ ,78
+ ,37238
+ ,41
+ ,10901
+ ,73
+ ,63958
+ ,94
+ ,91346
+ ,112
+ ,78956
+ ,101
+ ,33660
+ ,79
+ ,99518
+ ,70
+ ,93634
+ ,100
+ ,111436
+ ,111
+ ,109348
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,6023
+ ,4
+ ,7953
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,48
+ ,42564
+ ,42
+ ,63538
+ ,55
+ ,38885
+ ,97
+ ,108281
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,1644
+ ,7
+ ,4245
+ ,13
+ ,6179
+ ,12
+ ,21509
+ ,4
+ ,3926
+ ,0
+ ,7670
+ ,31
+ ,23238
+ ,37
+ ,10641
+ ,0
+ ,0
+ ,0
+ ,0
+ ,29
+ ,49288
+ ,39
+ ,41243)
+ ,dim=c(4
+ ,164)
+ ,dimnames=list(c('Feedback_(+120_c)'
+ ,'aantal_karakters_compendium'
+ ,'aantal_blogs'
+ ,'tijd_compendium_seconden')
+ ,1:164))
> y <- array(NA,dim=c(4,164),dimnames=list(c('Feedback_(+120_c)','aantal_karakters_compendium','aantal_blogs','tijd_compendium_seconden'),1:164))
> 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
Feedback_(+120_c) aantal_karakters_compendium aantal_blogs
1 68 95556 65
2 72 54565 54
3 37 63016 58
4 70 79774 77
5 30 31258 41
6 53 52491 0
7 74 91256 111
8 22 22807 1
9 68 77411 36
10 47 48821 60
11 87 52295 63
12 123 63262 71
13 69 50466 38
14 89 62932 76
15 45 38439 61
16 122 70817 125
17 75 105965 84
18 45 73795 69
19 53 82043 77
20 96 74349 100
21 82 82204 78
22 76 55709 76
23 51 37137 40
24 104 70780 81
25 83 55027 102
26 78 56699 70
27 59 65911 75
28 83 56316 93
29 71 26982 42
30 81 54628 95
31 93 96750 87
32 72 53009 44
33 107 64664 84
34 75 36990 28
35 92 85224 87
36 69 37048 71
37 102 59635 68
38 51 42051 50
39 18 26998 30
40 87 63717 86
41 59 55071 78
42 63 40001 46
43 68 54506 52
44 47 35838 31
45 29 50838 30
46 69 86997 70
47 66 33032 20
48 106 61704 84
49 73 117986 81
50 87 56733 79
51 65 55064 70
52 7 5950 8
53 111 84607 67
54 61 32551 21
55 41 31701 30
56 70 71170 70
57 112 101773 87
58 71 101653 87
59 90 81493 112
60 69 55901 54
61 85 109104 96
62 47 114425 93
63 50 36311 49
64 76 70027 49
65 60 73713 38
66 35 40671 64
67 72 89041 64
68 88 57231 66
69 66 78792 98
70 58 59155 99
71 81 55827 56
72 63 22618 22
73 91 58425 51
74 65 65724 56
75 75 56979 94
76 85 72369 98
77 75 79194 76
78 70 202316 57
79 78 44970 75
80 61 49319 48
81 55 36252 48
82 80 75741 109
83 83 38417 27
84 38 64102 83
85 27 56622 49
86 62 15430 24
87 82 72571 43
88 79 67271 44
89 59 43460 49
90 89 99501 108
91 36 28340 42
92 91 76013 108
93 63 37361 27
94 80 48204 79
95 71 76168 49
96 76 85168 64
97 67 125410 75
98 66 123328 115
99 123 83038 92
100 65 120087 106
101 103 91939 73
102 77 103646 105
103 37 29467 30
104 64 43750 13
105 22 34497 69
106 35 66477 72
107 61 71181 80
108 80 74482 106
109 54 174949 28
110 60 46765 70
111 87 90257 51
112 75 51370 90
113 0 1168 12
114 54 51360 84
115 30 25162 23
116 66 21067 57
117 56 58233 84
118 0 855 4
119 32 85903 56
120 9 14116 18
121 78 57637 86
122 90 94137 39
123 56 62147 16
124 35 62832 18
125 21 8773 16
126 78 63785 42
127 118 65196 77
128 83 73087 30
129 89 72631 104
130 83 86281 121
131 124 162365 109
132 76 56530 57
133 57 35606 28
134 91 70111 56
135 89 92046 81
136 66 63989 2
137 82 104911 88
138 63 43448 41
139 75 60029 83
140 59 38650 55
141 19 47261 3
142 57 73586 54
143 74 83042 89
144 78 37238 41
145 73 63958 94
146 112 78956 101
147 79 99518 70
148 100 111436 111
149 0 0 0
150 0 6023 4
151 0 0 0
152 0 0 0
153 0 0 0
154 0 0 0
155 48 42564 42
156 55 38885 97
157 0 0 0
158 0 0 0
159 0 1644 7
160 13 6179 12
161 4 3926 0
162 31 23238 37
163 0 0 0
164 29 49288 39
tijd_compendium_seconden
1 114468
2 88594
3 74151
4 77921
5 53212
6 34956
7 149703
8 6853
9 58907
10 67067
11 110563
12 58126
13 57113
14 77993
15 68091
16 124676
17 109522
18 75865
19 79746
20 77844
21 98681
22 105531
23 51428
24 65703
25 72562
26 81728
27 95580
28 98278
29 46629
30 115189
31 124865
32 59392
33 127818
34 17821
35 154076
36 64881
37 136506
38 66524
39 45988
40 107445
41 102772
42 46657
43 97563
44 36663
45 55369
46 77921
47 56968
48 77519
49 129805
50 72761
51 81278
52 15049
53 113935
54 25109
55 45824
56 89644
57 109011
58 134245
59 136692
60 50741
61 149510
62 147888
63 54987
64 74467
65 100033
66 85505
67 62426
68 82932
69 79169
70 65469
71 63572
72 23824
73 73831
74 63551
75 56756
76 81399
77 117881
78 70711
79 50495
80 53845
81 51390
82 104953
83 65983
84 76839
85 55792
86 25155
87 55291
88 84279
89 99692
90 59633
91 63249
92 82928
93 50000
94 69455
95 84068
96 76195
97 114634
98 139357
99 110044
100 155118
101 83061
102 127122
103 45653
104 19630
105 67229
106 86060
107 88003
108 95815
109 85499
110 27220
111 109882
112 72579
113 5841
114 68369
115 24610
116 30995
117 150662
118 6622
119 93694
120 13155
121 111908
122 57550
123 16356
124 40174
125 13983
126 52316
127 99585
128 86271
129 131012
130 130274
131 159051
132 76506
133 49145
134 66398
135 127546
136 6802
137 99509
138 43106
139 108303
140 64167
141 8579
142 97811
143 84365
144 10901
145 91346
146 33660
147 93634
148 109348
149 0
150 7953
151 0
152 0
153 0
154 0
155 63538
156 108281
157 0
158 0
159 4245
160 21509
161 7670
162 10641
163 0
164 41243
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) aantal_karakters_compendium
1.985e+01 2.516e-04
aantal_blogs tijd_compendium_seconden
4.294e-01 4.126e-05
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-47.67 -17.20 -0.06 14.33 54.35
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.985e+01 3.499e+00 5.674 6.39e-08 ***
aantal_karakters_compendium 2.516e-04 6.876e-05 3.659 0.000343 ***
aantal_blogs 4.294e-01 8.372e-02 5.128 8.35e-07 ***
tijd_compendium_seconden 4.126e-05 7.587e-05 0.544 0.587285
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 20.1 on 160 degrees of freedom
Multiple R-squared: 0.5444, Adjusted R-squared: 0.5359
F-statistic: 63.74 on 3 and 160 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.4508312 9.016623e-01 5.491688e-01
[2,] 0.3004233 6.008466e-01 6.995767e-01
[3,] 0.1967619 3.935237e-01 8.032381e-01
[4,] 0.1139440 2.278880e-01 8.860560e-01
[5,] 0.1879247 3.758494e-01 8.120753e-01
[6,] 0.9048897 1.902205e-01 9.511027e-02
[7,] 0.8777390 2.445219e-01 1.222610e-01
[8,] 0.8463700 3.072599e-01 1.536300e-01
[9,] 0.8145412 3.709175e-01 1.854588e-01
[10,] 0.8253027 3.493946e-01 1.746973e-01
[11,] 0.7993032 4.013937e-01 2.006968e-01
[12,] 0.8457074 3.085853e-01 1.542926e-01
[13,] 0.8563289 2.873423e-01 1.436711e-01
[14,] 0.8174056 3.651888e-01 1.825944e-01
[15,] 0.7696051 4.607897e-01 2.303949e-01
[16,] 0.7147174 5.705651e-01 2.852826e-01
[17,] 0.6535288 6.929424e-01 3.464712e-01
[18,] 0.6712550 6.574900e-01 3.287450e-01
[19,] 0.6201024 7.597951e-01 3.798976e-01
[20,] 0.5652566 8.694868e-01 4.347434e-01
[21,] 0.5312232 9.375537e-01 4.687768e-01
[22,] 0.4681125 9.362250e-01 5.318875e-01
[23,] 0.4536264 9.072528e-01 5.463736e-01
[24,] 0.3927222 7.854445e-01 6.072778e-01
[25,] 0.3545311 7.090622e-01 6.454689e-01
[26,] 0.3271745 6.543490e-01 6.728255e-01
[27,] 0.3932165 7.864330e-01 6.067835e-01
[28,] 0.4271139 8.542277e-01 5.728861e-01
[29,] 0.3857043 7.714086e-01 6.142957e-01
[30,] 0.3362258 6.724517e-01 6.637742e-01
[31,] 0.3943344 7.886687e-01 6.056656e-01
[32,] 0.3597832 7.195664e-01 6.402168e-01
[33,] 0.4353019 8.706038e-01 5.646981e-01
[34,] 0.3881262 7.762525e-01 6.118738e-01
[35,] 0.3747370 7.494740e-01 6.252630e-01
[36,] 0.3318250 6.636500e-01 6.681750e-01
[37,] 0.2885891 5.771782e-01 7.114109e-01
[38,] 0.2462325 4.924651e-01 7.537675e-01
[39,] 0.2532755 5.065510e-01 7.467245e-01
[40,] 0.2166772 4.333544e-01 7.833228e-01
[41,] 0.2315032 4.630063e-01 7.684968e-01
[42,] 0.2737764 5.475529e-01 7.262236e-01
[43,] 0.2477120 4.954239e-01 7.522880e-01
[44,] 0.2236962 4.473924e-01 7.763038e-01
[45,] 0.1928582 3.857164e-01 8.071418e-01
[46,] 0.2170521 4.341042e-01 7.829479e-01
[47,] 0.3142337 6.284674e-01 6.857663e-01
[48,] 0.3161212 6.322425e-01 6.838788e-01
[49,] 0.2783974 5.567949e-01 7.216026e-01
[50,] 0.2410411 4.820822e-01 7.589589e-01
[51,] 0.2602773 5.205546e-01 7.397227e-01
[52,] 0.2535831 5.071661e-01 7.464169e-01
[53,] 0.2226191 4.452382e-01 7.773809e-01
[54,] 0.1935402 3.870804e-01 8.064598e-01
[55,] 0.1682134 3.364267e-01 8.317866e-01
[56,] 0.3167197 6.334394e-01 6.832803e-01
[57,] 0.2830100 5.660201e-01 7.169900e-01
[58,] 0.2644615 5.289230e-01 7.355385e-01
[59,] 0.2283096 4.566192e-01 7.716904e-01
[60,] 0.2724223 5.448446e-01 7.275777e-01
[61,] 0.2353700 4.707401e-01 7.646300e-01
[62,] 0.2379655 4.759310e-01 7.620345e-01
[63,] 0.2426881 4.853762e-01 7.573119e-01
[64,] 0.2613907 5.227814e-01 7.386093e-01
[65,] 0.2584912 5.169824e-01 7.415088e-01
[66,] 0.2741644 5.483288e-01 7.258356e-01
[67,] 0.3283381 6.566762e-01 6.716619e-01
[68,] 0.2890098 5.780196e-01 7.109902e-01
[69,] 0.2531886 5.063772e-01 7.468114e-01
[70,] 0.2185583 4.371166e-01 7.814417e-01
[71,] 0.1868194 3.736389e-01 8.131806e-01
[72,] 0.2101167 4.202333e-01 7.898833e-01
[73,] 0.1897652 3.795304e-01 8.102348e-01
[74,] 0.1631023 3.262046e-01 8.368977e-01
[75,] 0.1395909 2.791818e-01 8.604091e-01
[76,] 0.1206515 2.413029e-01 8.793485e-01
[77,] 0.1966036 3.932071e-01 8.033964e-01
[78,] 0.2857064 5.714128e-01 7.142936e-01
[79,] 0.3505664 7.011328e-01 6.494336e-01
[80,] 0.3842221 7.684442e-01 6.157779e-01
[81,] 0.3991754 7.983508e-01 6.008246e-01
[82,] 0.4065481 8.130963e-01 5.934519e-01
[83,] 0.3790476 7.580952e-01 6.209524e-01
[84,] 0.3499479 6.998957e-01 6.500521e-01
[85,] 0.3338242 6.676485e-01 6.661758e-01
[86,] 0.2942939 5.885878e-01 7.057061e-01
[87,] 0.3068513 6.137026e-01 6.931487e-01
[88,] 0.2832715 5.665429e-01 7.167285e-01
[89,] 0.2556257 5.112514e-01 7.443743e-01
[90,] 0.2218646 4.437292e-01 7.781354e-01
[91,] 0.2239470 4.478940e-01 7.760530e-01
[92,] 0.3392411 6.784823e-01 6.607589e-01
[93,] 0.4980710 9.961420e-01 5.019290e-01
[94,] 0.5983990 8.032019e-01 4.016010e-01
[95,] 0.6296013 7.407974e-01 3.703987e-01
[96,] 0.6288074 7.423853e-01 3.711926e-01
[97,] 0.5980311 8.039378e-01 4.019689e-01
[98,] 0.6469282 7.061435e-01 3.530718e-01
[99,] 0.7678968 4.642064e-01 2.321032e-01
[100,] 0.8509709 2.980583e-01 1.490291e-01
[101,] 0.8409603 3.180793e-01 1.590397e-01
[102,] 0.8210559 3.578883e-01 1.789441e-01
[103,] 0.9352902 1.294197e-01 6.470984e-02
[104,] 0.9200073 1.599854e-01 7.999268e-02
[105,] 0.9171302 1.657395e-01 8.286977e-02
[106,] 0.8965225 2.069549e-01 1.034775e-01
[107,] 0.9093891 1.812218e-01 9.061090e-02
[108,] 0.9078490 1.843021e-01 9.215104e-02
[109,] 0.8895560 2.208881e-01 1.104440e-01
[110,] 0.8942982 2.114035e-01 1.057018e-01
[111,] 0.8803568 2.392864e-01 1.196432e-01
[112,] 0.8792650 2.414700e-01 1.207350e-01
[113,] 0.9612301 7.753986e-02 3.876993e-02
[114,] 0.9612795 7.744105e-02 3.872052e-02
[115,] 0.9509928 9.801444e-02 4.900722e-02
[116,] 0.9485492 1.029016e-01 5.145079e-02
[117,] 0.9341957 1.316087e-01 6.580433e-02
[118,] 0.9286081 1.427838e-01 7.139189e-02
[119,] 0.9115175 1.769651e-01 8.848253e-02
[120,] 0.9116411 1.767179e-01 8.835893e-02
[121,] 0.9884991 2.300182e-02 1.150091e-02
[122,] 0.9953354 9.329190e-03 4.664595e-03
[123,] 0.9937641 1.247181e-02 6.235907e-03
[124,] 0.9929926 1.401475e-02 7.007373e-03
[125,] 0.9916492 1.670158e-02 8.350788e-03
[126,] 0.9928495 1.430102e-02 7.150510e-03
[127,] 0.9962077 7.584646e-03 3.792323e-03
[128,] 0.9985155 2.969018e-03 1.484509e-03
[129,] 0.9983388 3.322343e-03 1.661171e-03
[130,] 0.9996539 6.922081e-04 3.461040e-04
[131,] 0.9994977 1.004588e-03 5.022942e-04
[132,] 0.9997667 4.666970e-04 2.333485e-04
[133,] 0.9997380 5.240869e-04 2.620434e-04
[134,] 0.9998311 3.378556e-04 1.689278e-04
[135,] 0.9997536 4.927483e-04 2.463742e-04
[136,] 0.9996660 6.679376e-04 3.339688e-04
[137,] 0.9995248 9.503857e-04 4.751929e-04
[138,] 0.9999975 5.067635e-06 2.533817e-06
[139,] 0.9999919 1.627041e-05 8.135204e-06
[140,] 0.9999997 5.817215e-07 2.908607e-07
[141,] 0.9999988 2.478739e-06 1.239370e-06
[142,] 0.9999954 9.119973e-06 4.559986e-06
[143,] 0.9999833 3.336602e-05 1.668301e-05
[144,] 0.9999610 7.807492e-05 3.903746e-05
[145,] 0.9998582 2.835572e-04 1.417786e-04
[146,] 0.9995022 9.956161e-04 4.978081e-04
[147,] 0.9983230 3.353948e-03 1.676974e-03
[148,] 0.9946254 1.074929e-02 5.374643e-03
[149,] 0.9988471 2.305770e-03 1.152885e-03
[150,] 0.9974174 5.165236e-03 2.582618e-03
[151,] 0.9857460 2.850792e-02 1.425396e-02
> postscript(file="/var/wessaorg/rcomp/tmp/13anz1321605399.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/wessaorg/rcomp/tmp/27j811321605399.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/wessaorg/rcomp/tmp/3k48e1321605399.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/wessaorg/rcomp/tmp/4lrlz1321605399.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/wessaorg/rcomp/tmp/5diho1321605399.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 = 164
Frequency = 1
1 2 3 4 5 6
-8.52479555 11.57916036 -26.66862960 -6.19854279 -17.51506637 18.50033325
7 8 9 10 11 12
-22.64795291 -4.30102373 10.78482860 -13.66364614 22.37943947 54.34885991
13 14 15 16 17 18
17.77940263 17.46526444 -13.52318618 25.51590185 -12.09767367 -26.17442356
19 20 21 22 23 24
-23.84472130 11.29397666 3.90409651 5.14627127 2.50877664 28.85097720
25 26 27 28 29 30
2.51454584 10.45559371 -13.58055233 4.99348975 24.40302172 1.86165353
31 32 33 34 35 36
6.29959113 17.46931654 29.53861967 33.08493808 6.99419019 6.66551010
37 38 39 40 41 42
32.31538116 -3.64419759 -23.42208116 9.75877435 -12.43811234 11.40882717
43 44 45 46 47 48
8.08266837 3.30919524 -18.80724779 -6.01022208 26.90044701 31.35880218
49 50 51 52 53 54
-16.67093281 15.95268354 -2.11447631 -18.40364005 36.39319286 22.90666915
55 56 57 58 59 60
-1.59857725 -1.51190651 24.68998977 -17.32103213 -4.08411502 9.80492900
61 62 63 64 65 66
-9.68990979 -47.67361428 -2.29461159 14.41873649 1.15953609 -26.09141240
67 68 69 70 71 72
-0.30889085 21.98955516 -19.01979809 -21.94325661 20.43536469 27.02943655
73 74 75 76 77 78
31.50526809 1.94617061 -1.88939779 1.50419774 -2.27208609 -28.14484804
79 80 81 82 83 84
12.54846328 5.90910233 3.29802606 -10.03918269 39.16800495 -36.78709748
85 86 87 88 89 90
-30.43802486 26.92425373 23.14615559 19.85413724 3.06208539 -4.71775809
91 92 93 94 95 96
-11.62442761 2.23055836 20.09318772 11.23497200 7.47751654 4.09740532
97 98 99 100 101 102
-21.33656520 -40.00777949 38.21418123 -36.97833236 25.24617626 -19.25726470
103 104 105 106 107 108
-5.02945254 26.75008724 -38.93080300 -36.04202078 -14.74069054 -8.05724788
109 110 111 112 113 114
-25.41775517 -2.79590959 18.00886783 0.58641002 -25.53804839 -17.66112284
115 116 117 118 119 120
-7.07243251 15.09572435 -20.78595335 -22.05654190 -37.37458599 -22.67376243
121 122 123 124 125 126
2.10433346 27.34448318 12.96842227 -10.04545376 -8.50489654 21.90881956
127 128 129 130 131 132
44.57533867 28.31987065 0.81489452 -15.88829744 9.93422484 14.29543189
133 134 135 136 137 138
14.14064786 26.72493847 5.94871829 28.91041905 -6.13682137 12.83495704
139 140 141 142 143 144
-0.06061872 3.16187689 -14.38355369 -8.58679083 -8.43913144 30.72623089
145 146 147 148 149 150
-7.07256078 27.52862884 0.19117049 -0.06004946 -19.85069571 -23.41171800
151 152 153 154 155 156
-19.85069571 -19.85069571 -19.85069571 -19.85069571 -3.21507545 -20.75115223
157 158 159 160 161 162
-19.85069571 -19.85069571 -23.44509016 -14.44530169 -17.15494960 -11.02318454
163 164
-19.85069571 -21.69875514
> postscript(file="/var/wessaorg/rcomp/tmp/615gc1321605399.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 = 164
Frequency = 1
lag(myerror, k = 1) myerror
0 -8.52479555 NA
1 11.57916036 -8.52479555
2 -26.66862960 11.57916036
3 -6.19854279 -26.66862960
4 -17.51506637 -6.19854279
5 18.50033325 -17.51506637
6 -22.64795291 18.50033325
7 -4.30102373 -22.64795291
8 10.78482860 -4.30102373
9 -13.66364614 10.78482860
10 22.37943947 -13.66364614
11 54.34885991 22.37943947
12 17.77940263 54.34885991
13 17.46526444 17.77940263
14 -13.52318618 17.46526444
15 25.51590185 -13.52318618
16 -12.09767367 25.51590185
17 -26.17442356 -12.09767367
18 -23.84472130 -26.17442356
19 11.29397666 -23.84472130
20 3.90409651 11.29397666
21 5.14627127 3.90409651
22 2.50877664 5.14627127
23 28.85097720 2.50877664
24 2.51454584 28.85097720
25 10.45559371 2.51454584
26 -13.58055233 10.45559371
27 4.99348975 -13.58055233
28 24.40302172 4.99348975
29 1.86165353 24.40302172
30 6.29959113 1.86165353
31 17.46931654 6.29959113
32 29.53861967 17.46931654
33 33.08493808 29.53861967
34 6.99419019 33.08493808
35 6.66551010 6.99419019
36 32.31538116 6.66551010
37 -3.64419759 32.31538116
38 -23.42208116 -3.64419759
39 9.75877435 -23.42208116
40 -12.43811234 9.75877435
41 11.40882717 -12.43811234
42 8.08266837 11.40882717
43 3.30919524 8.08266837
44 -18.80724779 3.30919524
45 -6.01022208 -18.80724779
46 26.90044701 -6.01022208
47 31.35880218 26.90044701
48 -16.67093281 31.35880218
49 15.95268354 -16.67093281
50 -2.11447631 15.95268354
51 -18.40364005 -2.11447631
52 36.39319286 -18.40364005
53 22.90666915 36.39319286
54 -1.59857725 22.90666915
55 -1.51190651 -1.59857725
56 24.68998977 -1.51190651
57 -17.32103213 24.68998977
58 -4.08411502 -17.32103213
59 9.80492900 -4.08411502
60 -9.68990979 9.80492900
61 -47.67361428 -9.68990979
62 -2.29461159 -47.67361428
63 14.41873649 -2.29461159
64 1.15953609 14.41873649
65 -26.09141240 1.15953609
66 -0.30889085 -26.09141240
67 21.98955516 -0.30889085
68 -19.01979809 21.98955516
69 -21.94325661 -19.01979809
70 20.43536469 -21.94325661
71 27.02943655 20.43536469
72 31.50526809 27.02943655
73 1.94617061 31.50526809
74 -1.88939779 1.94617061
75 1.50419774 -1.88939779
76 -2.27208609 1.50419774
77 -28.14484804 -2.27208609
78 12.54846328 -28.14484804
79 5.90910233 12.54846328
80 3.29802606 5.90910233
81 -10.03918269 3.29802606
82 39.16800495 -10.03918269
83 -36.78709748 39.16800495
84 -30.43802486 -36.78709748
85 26.92425373 -30.43802486
86 23.14615559 26.92425373
87 19.85413724 23.14615559
88 3.06208539 19.85413724
89 -4.71775809 3.06208539
90 -11.62442761 -4.71775809
91 2.23055836 -11.62442761
92 20.09318772 2.23055836
93 11.23497200 20.09318772
94 7.47751654 11.23497200
95 4.09740532 7.47751654
96 -21.33656520 4.09740532
97 -40.00777949 -21.33656520
98 38.21418123 -40.00777949
99 -36.97833236 38.21418123
100 25.24617626 -36.97833236
101 -19.25726470 25.24617626
102 -5.02945254 -19.25726470
103 26.75008724 -5.02945254
104 -38.93080300 26.75008724
105 -36.04202078 -38.93080300
106 -14.74069054 -36.04202078
107 -8.05724788 -14.74069054
108 -25.41775517 -8.05724788
109 -2.79590959 -25.41775517
110 18.00886783 -2.79590959
111 0.58641002 18.00886783
112 -25.53804839 0.58641002
113 -17.66112284 -25.53804839
114 -7.07243251 -17.66112284
115 15.09572435 -7.07243251
116 -20.78595335 15.09572435
117 -22.05654190 -20.78595335
118 -37.37458599 -22.05654190
119 -22.67376243 -37.37458599
120 2.10433346 -22.67376243
121 27.34448318 2.10433346
122 12.96842227 27.34448318
123 -10.04545376 12.96842227
124 -8.50489654 -10.04545376
125 21.90881956 -8.50489654
126 44.57533867 21.90881956
127 28.31987065 44.57533867
128 0.81489452 28.31987065
129 -15.88829744 0.81489452
130 9.93422484 -15.88829744
131 14.29543189 9.93422484
132 14.14064786 14.29543189
133 26.72493847 14.14064786
134 5.94871829 26.72493847
135 28.91041905 5.94871829
136 -6.13682137 28.91041905
137 12.83495704 -6.13682137
138 -0.06061872 12.83495704
139 3.16187689 -0.06061872
140 -14.38355369 3.16187689
141 -8.58679083 -14.38355369
142 -8.43913144 -8.58679083
143 30.72623089 -8.43913144
144 -7.07256078 30.72623089
145 27.52862884 -7.07256078
146 0.19117049 27.52862884
147 -0.06004946 0.19117049
148 -19.85069571 -0.06004946
149 -23.41171800 -19.85069571
150 -19.85069571 -23.41171800
151 -19.85069571 -19.85069571
152 -19.85069571 -19.85069571
153 -19.85069571 -19.85069571
154 -3.21507545 -19.85069571
155 -20.75115223 -3.21507545
156 -19.85069571 -20.75115223
157 -19.85069571 -19.85069571
158 -23.44509016 -19.85069571
159 -14.44530169 -23.44509016
160 -17.15494960 -14.44530169
161 -11.02318454 -17.15494960
162 -19.85069571 -11.02318454
163 -21.69875514 -19.85069571
164 NA -21.69875514
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 11.57916036 -8.52479555
[2,] -26.66862960 11.57916036
[3,] -6.19854279 -26.66862960
[4,] -17.51506637 -6.19854279
[5,] 18.50033325 -17.51506637
[6,] -22.64795291 18.50033325
[7,] -4.30102373 -22.64795291
[8,] 10.78482860 -4.30102373
[9,] -13.66364614 10.78482860
[10,] 22.37943947 -13.66364614
[11,] 54.34885991 22.37943947
[12,] 17.77940263 54.34885991
[13,] 17.46526444 17.77940263
[14,] -13.52318618 17.46526444
[15,] 25.51590185 -13.52318618
[16,] -12.09767367 25.51590185
[17,] -26.17442356 -12.09767367
[18,] -23.84472130 -26.17442356
[19,] 11.29397666 -23.84472130
[20,] 3.90409651 11.29397666
[21,] 5.14627127 3.90409651
[22,] 2.50877664 5.14627127
[23,] 28.85097720 2.50877664
[24,] 2.51454584 28.85097720
[25,] 10.45559371 2.51454584
[26,] -13.58055233 10.45559371
[27,] 4.99348975 -13.58055233
[28,] 24.40302172 4.99348975
[29,] 1.86165353 24.40302172
[30,] 6.29959113 1.86165353
[31,] 17.46931654 6.29959113
[32,] 29.53861967 17.46931654
[33,] 33.08493808 29.53861967
[34,] 6.99419019 33.08493808
[35,] 6.66551010 6.99419019
[36,] 32.31538116 6.66551010
[37,] -3.64419759 32.31538116
[38,] -23.42208116 -3.64419759
[39,] 9.75877435 -23.42208116
[40,] -12.43811234 9.75877435
[41,] 11.40882717 -12.43811234
[42,] 8.08266837 11.40882717
[43,] 3.30919524 8.08266837
[44,] -18.80724779 3.30919524
[45,] -6.01022208 -18.80724779
[46,] 26.90044701 -6.01022208
[47,] 31.35880218 26.90044701
[48,] -16.67093281 31.35880218
[49,] 15.95268354 -16.67093281
[50,] -2.11447631 15.95268354
[51,] -18.40364005 -2.11447631
[52,] 36.39319286 -18.40364005
[53,] 22.90666915 36.39319286
[54,] -1.59857725 22.90666915
[55,] -1.51190651 -1.59857725
[56,] 24.68998977 -1.51190651
[57,] -17.32103213 24.68998977
[58,] -4.08411502 -17.32103213
[59,] 9.80492900 -4.08411502
[60,] -9.68990979 9.80492900
[61,] -47.67361428 -9.68990979
[62,] -2.29461159 -47.67361428
[63,] 14.41873649 -2.29461159
[64,] 1.15953609 14.41873649
[65,] -26.09141240 1.15953609
[66,] -0.30889085 -26.09141240
[67,] 21.98955516 -0.30889085
[68,] -19.01979809 21.98955516
[69,] -21.94325661 -19.01979809
[70,] 20.43536469 -21.94325661
[71,] 27.02943655 20.43536469
[72,] 31.50526809 27.02943655
[73,] 1.94617061 31.50526809
[74,] -1.88939779 1.94617061
[75,] 1.50419774 -1.88939779
[76,] -2.27208609 1.50419774
[77,] -28.14484804 -2.27208609
[78,] 12.54846328 -28.14484804
[79,] 5.90910233 12.54846328
[80,] 3.29802606 5.90910233
[81,] -10.03918269 3.29802606
[82,] 39.16800495 -10.03918269
[83,] -36.78709748 39.16800495
[84,] -30.43802486 -36.78709748
[85,] 26.92425373 -30.43802486
[86,] 23.14615559 26.92425373
[87,] 19.85413724 23.14615559
[88,] 3.06208539 19.85413724
[89,] -4.71775809 3.06208539
[90,] -11.62442761 -4.71775809
[91,] 2.23055836 -11.62442761
[92,] 20.09318772 2.23055836
[93,] 11.23497200 20.09318772
[94,] 7.47751654 11.23497200
[95,] 4.09740532 7.47751654
[96,] -21.33656520 4.09740532
[97,] -40.00777949 -21.33656520
[98,] 38.21418123 -40.00777949
[99,] -36.97833236 38.21418123
[100,] 25.24617626 -36.97833236
[101,] -19.25726470 25.24617626
[102,] -5.02945254 -19.25726470
[103,] 26.75008724 -5.02945254
[104,] -38.93080300 26.75008724
[105,] -36.04202078 -38.93080300
[106,] -14.74069054 -36.04202078
[107,] -8.05724788 -14.74069054
[108,] -25.41775517 -8.05724788
[109,] -2.79590959 -25.41775517
[110,] 18.00886783 -2.79590959
[111,] 0.58641002 18.00886783
[112,] -25.53804839 0.58641002
[113,] -17.66112284 -25.53804839
[114,] -7.07243251 -17.66112284
[115,] 15.09572435 -7.07243251
[116,] -20.78595335 15.09572435
[117,] -22.05654190 -20.78595335
[118,] -37.37458599 -22.05654190
[119,] -22.67376243 -37.37458599
[120,] 2.10433346 -22.67376243
[121,] 27.34448318 2.10433346
[122,] 12.96842227 27.34448318
[123,] -10.04545376 12.96842227
[124,] -8.50489654 -10.04545376
[125,] 21.90881956 -8.50489654
[126,] 44.57533867 21.90881956
[127,] 28.31987065 44.57533867
[128,] 0.81489452 28.31987065
[129,] -15.88829744 0.81489452
[130,] 9.93422484 -15.88829744
[131,] 14.29543189 9.93422484
[132,] 14.14064786 14.29543189
[133,] 26.72493847 14.14064786
[134,] 5.94871829 26.72493847
[135,] 28.91041905 5.94871829
[136,] -6.13682137 28.91041905
[137,] 12.83495704 -6.13682137
[138,] -0.06061872 12.83495704
[139,] 3.16187689 -0.06061872
[140,] -14.38355369 3.16187689
[141,] -8.58679083 -14.38355369
[142,] -8.43913144 -8.58679083
[143,] 30.72623089 -8.43913144
[144,] -7.07256078 30.72623089
[145,] 27.52862884 -7.07256078
[146,] 0.19117049 27.52862884
[147,] -0.06004946 0.19117049
[148,] -19.85069571 -0.06004946
[149,] -23.41171800 -19.85069571
[150,] -19.85069571 -23.41171800
[151,] -19.85069571 -19.85069571
[152,] -19.85069571 -19.85069571
[153,] -19.85069571 -19.85069571
[154,] -3.21507545 -19.85069571
[155,] -20.75115223 -3.21507545
[156,] -19.85069571 -20.75115223
[157,] -19.85069571 -19.85069571
[158,] -23.44509016 -19.85069571
[159,] -14.44530169 -23.44509016
[160,] -17.15494960 -14.44530169
[161,] -11.02318454 -17.15494960
[162,] -19.85069571 -11.02318454
[163,] -21.69875514 -19.85069571
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 11.57916036 -8.52479555
2 -26.66862960 11.57916036
3 -6.19854279 -26.66862960
4 -17.51506637 -6.19854279
5 18.50033325 -17.51506637
6 -22.64795291 18.50033325
7 -4.30102373 -22.64795291
8 10.78482860 -4.30102373
9 -13.66364614 10.78482860
10 22.37943947 -13.66364614
11 54.34885991 22.37943947
12 17.77940263 54.34885991
13 17.46526444 17.77940263
14 -13.52318618 17.46526444
15 25.51590185 -13.52318618
16 -12.09767367 25.51590185
17 -26.17442356 -12.09767367
18 -23.84472130 -26.17442356
19 11.29397666 -23.84472130
20 3.90409651 11.29397666
21 5.14627127 3.90409651
22 2.50877664 5.14627127
23 28.85097720 2.50877664
24 2.51454584 28.85097720
25 10.45559371 2.51454584
26 -13.58055233 10.45559371
27 4.99348975 -13.58055233
28 24.40302172 4.99348975
29 1.86165353 24.40302172
30 6.29959113 1.86165353
31 17.46931654 6.29959113
32 29.53861967 17.46931654
33 33.08493808 29.53861967
34 6.99419019 33.08493808
35 6.66551010 6.99419019
36 32.31538116 6.66551010
37 -3.64419759 32.31538116
38 -23.42208116 -3.64419759
39 9.75877435 -23.42208116
40 -12.43811234 9.75877435
41 11.40882717 -12.43811234
42 8.08266837 11.40882717
43 3.30919524 8.08266837
44 -18.80724779 3.30919524
45 -6.01022208 -18.80724779
46 26.90044701 -6.01022208
47 31.35880218 26.90044701
48 -16.67093281 31.35880218
49 15.95268354 -16.67093281
50 -2.11447631 15.95268354
51 -18.40364005 -2.11447631
52 36.39319286 -18.40364005
53 22.90666915 36.39319286
54 -1.59857725 22.90666915
55 -1.51190651 -1.59857725
56 24.68998977 -1.51190651
57 -17.32103213 24.68998977
58 -4.08411502 -17.32103213
59 9.80492900 -4.08411502
60 -9.68990979 9.80492900
61 -47.67361428 -9.68990979
62 -2.29461159 -47.67361428
63 14.41873649 -2.29461159
64 1.15953609 14.41873649
65 -26.09141240 1.15953609
66 -0.30889085 -26.09141240
67 21.98955516 -0.30889085
68 -19.01979809 21.98955516
69 -21.94325661 -19.01979809
70 20.43536469 -21.94325661
71 27.02943655 20.43536469
72 31.50526809 27.02943655
73 1.94617061 31.50526809
74 -1.88939779 1.94617061
75 1.50419774 -1.88939779
76 -2.27208609 1.50419774
77 -28.14484804 -2.27208609
78 12.54846328 -28.14484804
79 5.90910233 12.54846328
80 3.29802606 5.90910233
81 -10.03918269 3.29802606
82 39.16800495 -10.03918269
83 -36.78709748 39.16800495
84 -30.43802486 -36.78709748
85 26.92425373 -30.43802486
86 23.14615559 26.92425373
87 19.85413724 23.14615559
88 3.06208539 19.85413724
89 -4.71775809 3.06208539
90 -11.62442761 -4.71775809
91 2.23055836 -11.62442761
92 20.09318772 2.23055836
93 11.23497200 20.09318772
94 7.47751654 11.23497200
95 4.09740532 7.47751654
96 -21.33656520 4.09740532
97 -40.00777949 -21.33656520
98 38.21418123 -40.00777949
99 -36.97833236 38.21418123
100 25.24617626 -36.97833236
101 -19.25726470 25.24617626
102 -5.02945254 -19.25726470
103 26.75008724 -5.02945254
104 -38.93080300 26.75008724
105 -36.04202078 -38.93080300
106 -14.74069054 -36.04202078
107 -8.05724788 -14.74069054
108 -25.41775517 -8.05724788
109 -2.79590959 -25.41775517
110 18.00886783 -2.79590959
111 0.58641002 18.00886783
112 -25.53804839 0.58641002
113 -17.66112284 -25.53804839
114 -7.07243251 -17.66112284
115 15.09572435 -7.07243251
116 -20.78595335 15.09572435
117 -22.05654190 -20.78595335
118 -37.37458599 -22.05654190
119 -22.67376243 -37.37458599
120 2.10433346 -22.67376243
121 27.34448318 2.10433346
122 12.96842227 27.34448318
123 -10.04545376 12.96842227
124 -8.50489654 -10.04545376
125 21.90881956 -8.50489654
126 44.57533867 21.90881956
127 28.31987065 44.57533867
128 0.81489452 28.31987065
129 -15.88829744 0.81489452
130 9.93422484 -15.88829744
131 14.29543189 9.93422484
132 14.14064786 14.29543189
133 26.72493847 14.14064786
134 5.94871829 26.72493847
135 28.91041905 5.94871829
136 -6.13682137 28.91041905
137 12.83495704 -6.13682137
138 -0.06061872 12.83495704
139 3.16187689 -0.06061872
140 -14.38355369 3.16187689
141 -8.58679083 -14.38355369
142 -8.43913144 -8.58679083
143 30.72623089 -8.43913144
144 -7.07256078 30.72623089
145 27.52862884 -7.07256078
146 0.19117049 27.52862884
147 -0.06004946 0.19117049
148 -19.85069571 -0.06004946
149 -23.41171800 -19.85069571
150 -19.85069571 -23.41171800
151 -19.85069571 -19.85069571
152 -19.85069571 -19.85069571
153 -19.85069571 -19.85069571
154 -3.21507545 -19.85069571
155 -20.75115223 -3.21507545
156 -19.85069571 -20.75115223
157 -19.85069571 -19.85069571
158 -23.44509016 -19.85069571
159 -14.44530169 -23.44509016
160 -17.15494960 -14.44530169
161 -11.02318454 -17.15494960
162 -19.85069571 -11.02318454
163 -21.69875514 -19.85069571
> 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/wessaorg/rcomp/tmp/7gvox1321605399.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/wessaorg/rcomp/tmp/8frgj1321605399.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/wessaorg/rcomp/tmp/923ia1321605399.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/wessaorg/rcomp/tmp/10nrb71321605399.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11vjmh1321605399.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/wessaorg/rcomp/tmp/12b7gp1321605399.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/wessaorg/rcomp/tmp/13qyds1321605399.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/wessaorg/rcomp/tmp/143u4k1321605399.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/wessaorg/rcomp/tmp/15pth51321605399.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/wessaorg/rcomp/tmp/16lyon1321605399.tab")
+ }
>
> try(system("convert tmp/13anz1321605399.ps tmp/13anz1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/27j811321605399.ps tmp/27j811321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/3k48e1321605399.ps tmp/3k48e1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/4lrlz1321605399.ps tmp/4lrlz1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/5diho1321605399.ps tmp/5diho1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/615gc1321605399.ps tmp/615gc1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/7gvox1321605399.ps tmp/7gvox1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/8frgj1321605399.ps tmp/8frgj1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/923ia1321605399.ps tmp/923ia1321605399.png",intern=TRUE))
character(0)
> try(system("convert tmp/10nrb71321605399.ps tmp/10nrb71321605399.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.665 0.510 5.252