R version 2.12.1 (2010-12-16)
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(84
+ ,65
+ ,95556
+ ,47
+ ,1168
+ ,170588
+ ,72
+ ,54
+ ,54565
+ ,48
+ ,669
+ ,86621
+ ,41
+ ,58
+ ,63016
+ ,40
+ ,1098
+ ,118522
+ ,85
+ ,99
+ ,79774
+ ,75
+ ,1939
+ ,152510
+ ,30
+ ,41
+ ,31258
+ ,32
+ ,679
+ ,86206
+ ,53
+ ,0
+ ,52491
+ ,18
+ ,321
+ ,37257
+ ,74
+ ,111
+ ,91256
+ ,80
+ ,2667
+ ,306055
+ ,22
+ ,1
+ ,22807
+ ,16
+ ,345
+ ,32750
+ ,68
+ ,37
+ ,77411
+ ,38
+ ,1367
+ ,116502
+ ,47
+ ,60
+ ,48821
+ ,25
+ ,1159
+ ,130539
+ ,102
+ ,64
+ ,52295
+ ,65
+ ,1385
+ ,161876
+ ,123
+ ,71
+ ,63262
+ ,74
+ ,1155
+ ,128274
+ ,69
+ ,38
+ ,50466
+ ,45
+ ,1154
+ ,104367
+ ,108
+ ,76
+ ,62932
+ ,42
+ ,1703
+ ,193024
+ ,59
+ ,62
+ ,38439
+ ,56
+ ,1190
+ ,141574
+ ,122
+ ,126
+ ,70817
+ ,124
+ ,3103
+ ,254150
+ ,91
+ ,85
+ ,105965
+ ,42
+ ,1357
+ ,181110
+ ,45
+ ,74
+ ,73795
+ ,102
+ ,1892
+ ,198432
+ ,53
+ ,78
+ ,82043
+ ,36
+ ,883
+ ,113853
+ ,112
+ ,100
+ ,74349
+ ,51
+ ,1627
+ ,159940
+ ,82
+ ,79
+ ,82204
+ ,49
+ ,1412
+ ,166822
+ ,92
+ ,76
+ ,55709
+ ,57
+ ,1901
+ ,286675
+ ,51
+ ,42
+ ,37137
+ ,21
+ ,825
+ ,95297
+ ,120
+ ,81
+ ,70780
+ ,32
+ ,904
+ ,108278
+ ,99
+ ,103
+ ,55027
+ ,77
+ ,2115
+ ,146342
+ ,86
+ ,70
+ ,56699
+ ,90
+ ,1858
+ ,145142
+ ,59
+ ,75
+ ,65911
+ ,82
+ ,1781
+ ,161740
+ ,98
+ ,93
+ ,56316
+ ,56
+ ,1304
+ ,162716
+ ,71
+ ,42
+ ,26982
+ ,34
+ ,1035
+ ,106888
+ ,100
+ ,95
+ ,54628
+ ,39
+ ,1557
+ ,188150
+ ,113
+ ,87
+ ,96750
+ ,53
+ ,1527
+ ,189401
+ ,92
+ ,44
+ ,53009
+ ,48
+ ,1220
+ ,129484
+ ,107
+ ,88
+ ,64664
+ ,64
+ ,1368
+ ,204030
+ ,75
+ ,29
+ ,36990
+ ,27
+ ,564
+ ,68538
+ ,100
+ ,89
+ ,85224
+ ,56
+ ,1990
+ ,243625
+ ,69
+ ,71
+ ,37048
+ ,37
+ ,1557
+ ,167255
+ ,106
+ ,70
+ ,59635
+ ,83
+ ,2057
+ ,264528
+ ,51
+ ,50
+ ,42051
+ ,50
+ ,1111
+ ,122024
+ ,18
+ ,30
+ ,26998
+ ,26
+ ,686
+ ,80964
+ ,91
+ ,87
+ ,63717
+ ,109
+ ,2012
+ ,209795
+ ,75
+ ,78
+ ,55071
+ ,56
+ ,2232
+ ,224205
+ ,63
+ ,48
+ ,40001
+ ,42
+ ,1033
+ ,115971
+ ,72
+ ,57
+ ,54506
+ ,49
+ ,1166
+ ,138191
+ ,59
+ ,31
+ ,35838
+ ,31
+ ,1020
+ ,81106
+ ,29
+ ,30
+ ,50838
+ ,49
+ ,1735
+ ,93125
+ ,85
+ ,70
+ ,86997
+ ,97
+ ,3644
+ ,307743
+ ,66
+ ,20
+ ,33032
+ ,42
+ ,918
+ ,78800
+ ,106
+ ,84
+ ,61704
+ ,55
+ ,1579
+ ,158835
+ ,113
+ ,81
+ ,117986
+ ,71
+ ,2805
+ ,223590
+ ,101
+ ,79
+ ,56733
+ ,39
+ ,1496
+ ,131108
+ ,65
+ ,72
+ ,55064
+ ,54
+ ,1108
+ ,128734
+ ,7
+ ,8
+ ,5950
+ ,24
+ ,496
+ ,24188
+ ,111
+ ,67
+ ,84607
+ ,213
+ ,1753
+ ,257677
+ ,61
+ ,21
+ ,32551
+ ,17
+ ,744
+ ,65029
+ ,41
+ ,30
+ ,31701
+ ,58
+ ,1101
+ ,98066
+ ,70
+ ,70
+ ,71170
+ ,27
+ ,1612
+ ,173587
+ ,136
+ ,87
+ ,101773
+ ,59
+ ,1806
+ ,180042
+ ,87
+ ,87
+ ,101653
+ ,114
+ ,2460
+ ,197266
+ ,90
+ ,116
+ ,81493
+ ,76
+ ,1653
+ ,212060
+ ,76
+ ,54
+ ,55901
+ ,51
+ ,1234
+ ,141582
+ ,101
+ ,96
+ ,109104
+ ,87
+ ,2368
+ ,245107
+ ,57
+ ,94
+ ,114425
+ ,78
+ ,2204
+ ,206879
+ ,61
+ ,51
+ ,36311
+ ,62
+ ,1633
+ ,145696
+ ,92
+ ,51
+ ,70027
+ ,61
+ ,1664
+ ,173535
+ ,80
+ ,38
+ ,73713
+ ,39
+ ,958
+ ,142064
+ ,35
+ ,65
+ ,40671
+ ,37
+ ,1118
+ ,117926
+ ,72
+ ,64
+ ,89041
+ ,87
+ ,1258
+ ,113461
+ ,88
+ ,66
+ ,57231
+ ,102
+ ,1964
+ ,145285
+ ,80
+ ,98
+ ,68608
+ ,50
+ ,1483
+ ,150999
+ ,62
+ ,100
+ ,59155
+ ,37
+ ,1034
+ ,91838
+ ,81
+ ,56
+ ,55827
+ ,33
+ ,1348
+ ,118807
+ ,63
+ ,22
+ ,22618
+ ,28
+ ,837
+ ,69471
+ ,91
+ ,51
+ ,58425
+ ,44
+ ,1310
+ ,126630
+ ,65
+ ,61
+ ,65724
+ ,38
+ ,1144
+ ,145908
+ ,79
+ ,94
+ ,56979
+ ,34
+ ,987
+ ,98393
+ ,85
+ ,98
+ ,72369
+ ,45
+ ,1334
+ ,190926
+ ,75
+ ,76
+ ,79194
+ ,58
+ ,1452
+ ,198797
+ ,70
+ ,57
+ ,202316
+ ,59
+ ,957
+ ,106193
+ ,78
+ ,75
+ ,44970
+ ,36
+ ,911
+ ,89318
+ ,75
+ ,48
+ ,49319
+ ,43
+ ,1114
+ ,120362
+ ,55
+ ,48
+ ,36252
+ ,30
+ ,1209
+ ,98791
+ ,80
+ ,109
+ ,75741
+ ,68
+ ,2541
+ ,283982
+ ,83
+ ,27
+ ,38417
+ ,53
+ ,1176
+ ,132798
+ ,38
+ ,85
+ ,64102
+ ,59
+ ,1253
+ ,135251
+ ,27
+ ,49
+ ,56622
+ ,25
+ ,870
+ ,80953
+ ,62
+ ,24
+ ,15430
+ ,39
+ ,1473
+ ,109237
+ ,82
+ ,46
+ ,72571
+ ,36
+ ,811
+ ,96634
+ ,88
+ ,44
+ ,67271
+ ,115
+ ,2435
+ ,226191
+ ,59
+ ,49
+ ,43460
+ ,55
+ ,1410
+ ,172071
+ ,92
+ ,108
+ ,99501
+ ,71
+ ,1982
+ ,117815
+ ,40
+ ,42
+ ,28340
+ ,52
+ ,1214
+ ,133561
+ ,91
+ ,110
+ ,76013
+ ,49
+ ,1356
+ ,152193
+ ,63
+ ,28
+ ,37361
+ ,43
+ ,1197
+ ,112004
+ ,88
+ ,79
+ ,48204
+ ,52
+ ,1971
+ ,169613
+ ,85
+ ,49
+ ,76168
+ ,51
+ ,1432
+ ,187483
+ ,76
+ ,64
+ ,85168
+ ,27
+ ,1030
+ ,130533
+ ,67
+ ,75
+ ,125410
+ ,29
+ ,1145
+ ,142339
+ ,69
+ ,122
+ ,123328
+ ,56
+ ,1509
+ ,199232
+ ,150
+ ,95
+ ,83038
+ ,94
+ ,2230
+ ,201744
+ ,77
+ ,106
+ ,120087
+ ,74
+ ,2236
+ ,247024
+ ,103
+ ,73
+ ,91939
+ ,66
+ ,1324
+ ,158054
+ ,81
+ ,108
+ ,103646
+ ,42
+ ,1599
+ ,182581
+ ,37
+ ,30
+ ,29467
+ ,112
+ ,999
+ ,106351
+ ,64
+ ,13
+ ,43750
+ ,14
+ ,602
+ ,43287
+ ,22
+ ,69
+ ,34497
+ ,45
+ ,1379
+ ,127493
+ ,35
+ ,75
+ ,66477
+ ,92
+ ,1172
+ ,127930
+ ,61
+ ,82
+ ,71181
+ ,29
+ ,1337
+ ,149006
+ ,80
+ ,108
+ ,74482
+ ,66
+ ,1709
+ ,187714
+ ,54
+ ,28
+ ,174949
+ ,32
+ ,668
+ ,74112
+ ,76
+ ,83
+ ,46765
+ ,66
+ ,1128
+ ,94006
+ ,87
+ ,51
+ ,90257
+ ,43
+ ,1209
+ ,176625
+ ,75
+ ,90
+ ,51370
+ ,56
+ ,1324
+ ,141933
+ ,0
+ ,12
+ ,1168
+ ,10
+ ,391
+ ,22938
+ ,61
+ ,87
+ ,51360
+ ,53
+ ,1264
+ ,125927
+ ,30
+ ,23
+ ,25162
+ ,25
+ ,530
+ ,61857
+ ,66
+ ,57
+ ,21067
+ ,34
+ ,983
+ ,91290
+ ,56
+ ,93
+ ,58233
+ ,66
+ ,1926
+ ,255100
+ ,0
+ ,4
+ ,855
+ ,16
+ ,387
+ ,21054
+ ,40
+ ,56
+ ,85903
+ ,38
+ ,1481
+ ,174150
+ ,9
+ ,18
+ ,14116
+ ,19
+ ,449
+ ,31414
+ ,82
+ ,86
+ ,57637
+ ,77
+ ,2135
+ ,189461
+ ,110
+ ,40
+ ,94137
+ ,35
+ ,1128
+ ,137544
+ ,71
+ ,16
+ ,62147
+ ,46
+ ,800
+ ,77166
+ ,50
+ ,18
+ ,62832
+ ,30
+ ,964
+ ,74567
+ ,21
+ ,16
+ ,8773
+ ,34
+ ,568
+ ,38214
+ ,78
+ ,42
+ ,63785
+ ,25
+ ,901
+ ,90961
+ ,118
+ ,78
+ ,65196
+ ,50
+ ,1568
+ ,194652
+ ,102
+ ,31
+ ,73087
+ ,38
+ ,859
+ ,135261
+ ,109
+ ,104
+ ,72631
+ ,51
+ ,2229
+ ,244272
+ ,104
+ ,121
+ ,86281
+ ,66
+ ,1566
+ ,201748
+ ,124
+ ,111
+ ,162365
+ ,73
+ ,2153
+ ,256402
+ ,76
+ ,57
+ ,56530
+ ,23
+ ,828
+ ,139144
+ ,57
+ ,28
+ ,35606
+ ,29
+ ,809
+ ,76470
+ ,91
+ ,56
+ ,70111
+ ,196
+ ,1848
+ ,193518
+ ,101
+ ,82
+ ,92046
+ ,115
+ ,2914
+ ,280334
+ ,66
+ ,2
+ ,63989
+ ,16
+ ,589
+ ,50999
+ ,98
+ ,91
+ ,104911
+ ,88
+ ,2613
+ ,254825
+ ,63
+ ,41
+ ,43448
+ ,51
+ ,1298
+ ,103239
+ ,85
+ ,84
+ ,60029
+ ,33
+ ,1109
+ ,168059
+ ,74
+ ,55
+ ,38650
+ ,53
+ ,1437
+ ,129762
+ ,19
+ ,3
+ ,47261
+ ,74
+ ,682
+ ,78256
+ ,57
+ ,68
+ ,73586
+ ,82
+ ,2799
+ ,249232
+ ,74
+ ,93
+ ,83042
+ ,54
+ ,1281
+ ,152366
+ ,78
+ ,41
+ ,37238
+ ,63
+ ,2035
+ ,173260
+ ,91
+ ,94
+ ,63958
+ ,70
+ ,1752
+ ,197197
+ ,112
+ ,105
+ ,78956
+ ,41
+ ,1133
+ ,68388
+ ,79
+ ,70
+ ,99518
+ ,49
+ ,1667
+ ,139409
+ ,100
+ ,114
+ ,111436
+ ,68
+ ,1558
+ ,185366
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,4
+ ,6023
+ ,10
+ ,207
+ ,14688
+ ,0
+ ,0
+ ,0
+ ,1
+ ,5
+ ,98
+ ,0
+ ,0
+ ,0
+ ,2
+ ,8
+ ,455
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,48
+ ,42
+ ,42564
+ ,58
+ ,1300
+ ,137885
+ ,55
+ ,97
+ ,38885
+ ,72
+ ,1718
+ ,185288
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,4
+ ,4
+ ,203
+ ,0
+ ,7
+ ,1644
+ ,5
+ ,151
+ ,7199
+ ,13
+ ,12
+ ,6179
+ ,20
+ ,474
+ ,46660
+ ,4
+ ,0
+ ,3926
+ ,5
+ ,141
+ ,17547
+ ,31
+ ,37
+ ,23238
+ ,27
+ ,705
+ ,73567
+ ,0
+ ,0
+ ,0
+ ,2
+ ,29
+ ,969
+ ,29
+ ,39
+ ,49288
+ ,33
+ ,1020
+ ,105477)
+ ,dim=c(6
+ ,164)
+ ,dimnames=list(c('Feedback_messages'
+ ,'Blogged_Computations'
+ ,'Aantal_karakters'
+ ,'Logins'
+ ,'Pageviews'
+ ,'Time_Rfc')
+ ,1:164))
> y <- array(NA,dim=c(6,164),dimnames=list(c('Feedback_messages','Blogged_Computations','Aantal_karakters','Logins','Pageviews','Time_Rfc'),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 = '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_messages Blogged_Computations Aantal_karakters Logins Pageviews
1 84 65 95556 47 1168
2 72 54 54565 48 669
3 41 58 63016 40 1098
4 85 99 79774 75 1939
5 30 41 31258 32 679
6 53 0 52491 18 321
7 74 111 91256 80 2667
8 22 1 22807 16 345
9 68 37 77411 38 1367
10 47 60 48821 25 1159
11 102 64 52295 65 1385
12 123 71 63262 74 1155
13 69 38 50466 45 1154
14 108 76 62932 42 1703
15 59 62 38439 56 1190
16 122 126 70817 124 3103
17 91 85 105965 42 1357
18 45 74 73795 102 1892
19 53 78 82043 36 883
20 112 100 74349 51 1627
21 82 79 82204 49 1412
22 92 76 55709 57 1901
23 51 42 37137 21 825
24 120 81 70780 32 904
25 99 103 55027 77 2115
26 86 70 56699 90 1858
27 59 75 65911 82 1781
28 98 93 56316 56 1304
29 71 42 26982 34 1035
30 100 95 54628 39 1557
31 113 87 96750 53 1527
32 92 44 53009 48 1220
33 107 88 64664 64 1368
34 75 29 36990 27 564
35 100 89 85224 56 1990
36 69 71 37048 37 1557
37 106 70 59635 83 2057
38 51 50 42051 50 1111
39 18 30 26998 26 686
40 91 87 63717 109 2012
41 75 78 55071 56 2232
42 63 48 40001 42 1033
43 72 57 54506 49 1166
44 59 31 35838 31 1020
45 29 30 50838 49 1735
46 85 70 86997 97 3644
47 66 20 33032 42 918
48 106 84 61704 55 1579
49 113 81 117986 71 2805
50 101 79 56733 39 1496
51 65 72 55064 54 1108
52 7 8 5950 24 496
53 111 67 84607 213 1753
54 61 21 32551 17 744
55 41 30 31701 58 1101
56 70 70 71170 27 1612
57 136 87 101773 59 1806
58 87 87 101653 114 2460
59 90 116 81493 76 1653
60 76 54 55901 51 1234
61 101 96 109104 87 2368
62 57 94 114425 78 2204
63 61 51 36311 62 1633
64 92 51 70027 61 1664
65 80 38 73713 39 958
66 35 65 40671 37 1118
67 72 64 89041 87 1258
68 88 66 57231 102 1964
69 80 98 68608 50 1483
70 62 100 59155 37 1034
71 81 56 55827 33 1348
72 63 22 22618 28 837
73 91 51 58425 44 1310
74 65 61 65724 38 1144
75 79 94 56979 34 987
76 85 98 72369 45 1334
77 75 76 79194 58 1452
78 70 57 202316 59 957
79 78 75 44970 36 911
80 75 48 49319 43 1114
81 55 48 36252 30 1209
82 80 109 75741 68 2541
83 83 27 38417 53 1176
84 38 85 64102 59 1253
85 27 49 56622 25 870
86 62 24 15430 39 1473
87 82 46 72571 36 811
88 88 44 67271 115 2435
89 59 49 43460 55 1410
90 92 108 99501 71 1982
91 40 42 28340 52 1214
92 91 110 76013 49 1356
93 63 28 37361 43 1197
94 88 79 48204 52 1971
95 85 49 76168 51 1432
96 76 64 85168 27 1030
97 67 75 125410 29 1145
98 69 122 123328 56 1509
99 150 95 83038 94 2230
100 77 106 120087 74 2236
101 103 73 91939 66 1324
102 81 108 103646 42 1599
103 37 30 29467 112 999
104 64 13 43750 14 602
105 22 69 34497 45 1379
106 35 75 66477 92 1172
107 61 82 71181 29 1337
108 80 108 74482 66 1709
109 54 28 174949 32 668
110 76 83 46765 66 1128
111 87 51 90257 43 1209
112 75 90 51370 56 1324
113 0 12 1168 10 391
114 61 87 51360 53 1264
115 30 23 25162 25 530
116 66 57 21067 34 983
117 56 93 58233 66 1926
118 0 4 855 16 387
119 40 56 85903 38 1481
120 9 18 14116 19 449
121 82 86 57637 77 2135
122 110 40 94137 35 1128
123 71 16 62147 46 800
124 50 18 62832 30 964
125 21 16 8773 34 568
126 78 42 63785 25 901
127 118 78 65196 50 1568
128 102 31 73087 38 859
129 109 104 72631 51 2229
130 104 121 86281 66 1566
131 124 111 162365 73 2153
132 76 57 56530 23 828
133 57 28 35606 29 809
134 91 56 70111 196 1848
135 101 82 92046 115 2914
136 66 2 63989 16 589
137 98 91 104911 88 2613
138 63 41 43448 51 1298
139 85 84 60029 33 1109
140 74 55 38650 53 1437
141 19 3 47261 74 682
142 57 68 73586 82 2799
143 74 93 83042 54 1281
144 78 41 37238 63 2035
145 91 94 63958 70 1752
146 112 105 78956 41 1133
147 79 70 99518 49 1667
148 100 114 111436 68 1558
149 0 0 0 0 0
150 0 4 6023 10 207
151 0 0 0 1 5
152 0 0 0 2 8
153 0 0 0 0 0
154 0 0 0 0 0
155 48 42 42564 58 1300
156 55 97 38885 72 1718
157 0 0 0 0 0
158 0 0 0 4 4
159 0 7 1644 5 151
160 13 12 6179 20 474
161 4 0 3926 5 141
162 31 37 23238 27 705
163 0 0 0 2 29
164 29 39 49288 33 1020
Time_Rfc t
1 170588 1
2 86621 2
3 118522 3
4 152510 4
5 86206 5
6 37257 6
7 306055 7
8 32750 8
9 116502 9
10 130539 10
11 161876 11
12 128274 12
13 104367 13
14 193024 14
15 141574 15
16 254150 16
17 181110 17
18 198432 18
19 113853 19
20 159940 20
21 166822 21
22 286675 22
23 95297 23
24 108278 24
25 146342 25
26 145142 26
27 161740 27
28 162716 28
29 106888 29
30 188150 30
31 189401 31
32 129484 32
33 204030 33
34 68538 34
35 243625 35
36 167255 36
37 264528 37
38 122024 38
39 80964 39
40 209795 40
41 224205 41
42 115971 42
43 138191 43
44 81106 44
45 93125 45
46 307743 46
47 78800 47
48 158835 48
49 223590 49
50 131108 50
51 128734 51
52 24188 52
53 257677 53
54 65029 54
55 98066 55
56 173587 56
57 180042 57
58 197266 58
59 212060 59
60 141582 60
61 245107 61
62 206879 62
63 145696 63
64 173535 64
65 142064 65
66 117926 66
67 113461 67
68 145285 68
69 150999 69
70 91838 70
71 118807 71
72 69471 72
73 126630 73
74 145908 74
75 98393 75
76 190926 76
77 198797 77
78 106193 78
79 89318 79
80 120362 80
81 98791 81
82 283982 82
83 132798 83
84 135251 84
85 80953 85
86 109237 86
87 96634 87
88 226191 88
89 172071 89
90 117815 90
91 133561 91
92 152193 92
93 112004 93
94 169613 94
95 187483 95
96 130533 96
97 142339 97
98 199232 98
99 201744 99
100 247024 100
101 158054 101
102 182581 102
103 106351 103
104 43287 104
105 127493 105
106 127930 106
107 149006 107
108 187714 108
109 74112 109
110 94006 110
111 176625 111
112 141933 112
113 22938 113
114 125927 114
115 61857 115
116 91290 116
117 255100 117
118 21054 118
119 174150 119
120 31414 120
121 189461 121
122 137544 122
123 77166 123
124 74567 124
125 38214 125
126 90961 126
127 194652 127
128 135261 128
129 244272 129
130 201748 130
131 256402 131
132 139144 132
133 76470 133
134 193518 134
135 280334 135
136 50999 136
137 254825 137
138 103239 138
139 168059 139
140 129762 140
141 78256 141
142 249232 142
143 152366 143
144 173260 144
145 197197 145
146 68388 146
147 139409 147
148 185366 148
149 0 149
150 14688 150
151 98 151
152 455 152
153 0 153
154 0 154
155 137885 155
156 185288 156
157 0 157
158 203 158
159 7199 159
160 46660 160
161 17547 161
162 73567 162
163 969 163
164 105477 164
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Blogged_Computations Aantal_karakters
25.2205104 0.2667423 0.0002456
Logins Pageviews Time_Rfc
0.0674961 0.0020252 0.0001028
t
-0.0951478
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-47.491 -12.113 -1.957 14.036 56.859
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.522e+01 5.453e+00 4.625 7.8e-06 ***
Blogged_Computations 2.667e-01 8.242e-02 3.236 0.001477 **
Aantal_karakters 2.456e-04 6.534e-05 3.760 0.000240 ***
Logins 6.750e-02 7.698e-02 0.877 0.381936
Pageviews 2.025e-03 6.247e-03 0.324 0.746249
Time_Rfc 1.028e-04 6.296e-05 1.633 0.104495
t -9.515e-02 3.551e-02 -2.679 0.008168 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 20.68 on 157 degrees of freedom
Multiple R-squared: 0.6129, Adjusted R-squared: 0.5981
F-statistic: 41.42 on 6 and 157 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.004481890 8.963779e-03 9.955181e-01
[2,] 0.001232333 2.464665e-03 9.987677e-01
[3,] 0.027380391 5.476078e-02 9.726196e-01
[4,] 0.014608175 2.921635e-02 9.853918e-01
[5,] 0.087904214 1.758084e-01 9.120958e-01
[6,] 0.273285820 5.465716e-01 7.267142e-01
[7,] 0.193993828 3.879877e-01 8.060062e-01
[8,] 0.439622786 8.792456e-01 5.603772e-01
[9,] 0.934484596 1.310308e-01 6.551540e-02
[10,] 0.961497590 7.700482e-02 3.850241e-02
[11,] 0.957269211 8.546158e-02 4.273079e-02
[12,] 0.937904292 1.241914e-01 6.209571e-02
[13,] 0.923885109 1.522298e-01 7.611489e-02
[14,] 0.899887792 2.002244e-01 1.001122e-01
[15,] 0.929308891 1.413822e-01 7.069111e-02
[16,] 0.904891233 1.902175e-01 9.510877e-02
[17,] 0.873789238 2.524215e-01 1.262108e-01
[18,] 0.898028262 2.039435e-01 1.019717e-01
[19,] 0.867636844 2.647263e-01 1.323632e-01
[20,] 0.836370696 3.272586e-01 1.636293e-01
[21,] 0.796971223 4.060576e-01 2.030288e-01
[22,] 0.765916795 4.681664e-01 2.340832e-01
[23,] 0.755278246 4.894435e-01 2.447218e-01
[24,] 0.712713290 5.745734e-01 2.872867e-01
[25,] 0.679116511 6.417670e-01 3.208835e-01
[26,] 0.626762835 7.464743e-01 3.732372e-01
[27,] 0.600915941 7.981681e-01 3.990841e-01
[28,] 0.564553430 8.708931e-01 4.354466e-01
[29,] 0.605295905 7.894082e-01 3.947041e-01
[30,] 0.740644980 5.187100e-01 2.593550e-01
[31,] 0.702520229 5.949595e-01 2.974798e-01
[32,] 0.666868772 6.662625e-01 3.331312e-01
[33,] 0.620001300 7.599974e-01 3.799987e-01
[34,] 0.571465919 8.570682e-01 4.285341e-01
[35,] 0.520447907 9.591042e-01 4.795521e-01
[36,] 0.535896341 9.282073e-01 4.641037e-01
[37,] 0.529092395 9.418152e-01 4.709076e-01
[38,] 0.506579373 9.868413e-01 4.934206e-01
[39,] 0.485107991 9.702160e-01 5.148920e-01
[40,] 0.451258568 9.025171e-01 5.487414e-01
[41,] 0.432460152 8.649203e-01 5.675398e-01
[42,] 0.446402825 8.928056e-01 5.535972e-01
[43,] 0.481033160 9.620663e-01 5.189668e-01
[44,] 0.436758091 8.735162e-01 5.632419e-01
[45,] 0.407721350 8.154427e-01 5.922787e-01
[46,] 0.382663183 7.653264e-01 6.173368e-01
[47,] 0.365548851 7.310977e-01 6.344511e-01
[48,] 0.430932850 8.618657e-01 5.690672e-01
[49,] 0.431286069 8.625721e-01 5.687139e-01
[50,] 0.464484051 9.289681e-01 5.355159e-01
[51,] 0.419014766 8.380295e-01 5.809852e-01
[52,] 0.387277411 7.745548e-01 6.127226e-01
[53,] 0.626430497 7.471390e-01 3.735695e-01
[54,] 0.584271289 8.314574e-01 4.157287e-01
[55,] 0.563940371 8.721193e-01 4.360596e-01
[56,] 0.529505113 9.409898e-01 4.704949e-01
[57,] 0.608409909 7.831802e-01 3.915901e-01
[58,] 0.572973332 8.540533e-01 4.270267e-01
[59,] 0.538066359 9.238673e-01 4.619336e-01
[60,] 0.501733240 9.965335e-01 4.982668e-01
[61,] 0.490658751 9.813175e-01 5.093412e-01
[62,] 0.464303007 9.286060e-01 5.356970e-01
[63,] 0.457226307 9.144526e-01 5.427737e-01
[64,] 0.466948614 9.338972e-01 5.330514e-01
[65,] 0.431437452 8.628749e-01 5.685625e-01
[66,] 0.392816357 7.856327e-01 6.071836e-01
[67,] 0.355619064 7.112381e-01 6.443809e-01
[68,] 0.326841941 6.536839e-01 6.731581e-01
[69,] 0.363932273 7.278645e-01 6.360677e-01
[70,] 0.341852093 6.837042e-01 6.581479e-01
[71,] 0.317520964 6.350419e-01 6.824790e-01
[72,] 0.278651901 5.573038e-01 7.213481e-01
[73,] 0.294583379 5.891668e-01 7.054166e-01
[74,] 0.327327283 6.546546e-01 6.726727e-01
[75,] 0.440284857 8.805697e-01 5.597151e-01
[76,] 0.492947102 9.858942e-01 5.070529e-01
[77,] 0.468625490 9.372510e-01 5.313745e-01
[78,] 0.467040997 9.340820e-01 5.329590e-01
[79,] 0.424652510 8.493050e-01 5.753475e-01
[80,] 0.385622922 7.712458e-01 6.143771e-01
[81,] 0.346334850 6.926697e-01 6.536652e-01
[82,] 0.330017385 6.600348e-01 6.699826e-01
[83,] 0.291175815 5.823516e-01 7.088242e-01
[84,] 0.263447412 5.268948e-01 7.365526e-01
[85,] 0.238437523 4.768750e-01 7.615625e-01
[86,] 0.215412500 4.308250e-01 7.845875e-01
[87,] 0.184814717 3.696294e-01 8.151853e-01
[88,] 0.178604596 3.572092e-01 8.213954e-01
[89,] 0.252501742 5.050035e-01 7.474983e-01
[90,] 0.534055472 9.318891e-01 4.659445e-01
[91,] 0.607606884 7.847862e-01 3.923931e-01
[92,] 0.607639934 7.847201e-01 3.923601e-01
[93,] 0.593148224 8.137036e-01 4.068518e-01
[94,] 0.573970302 8.520594e-01 4.260297e-01
[95,] 0.615031917 7.699362e-01 3.849681e-01
[96,] 0.727395575 5.452089e-01 2.726044e-01
[97,] 0.832259661 3.354807e-01 1.677403e-01
[98,] 0.825114069 3.497719e-01 1.748859e-01
[99,] 0.813962458 3.720751e-01 1.860375e-01
[100,] 0.930051919 1.398962e-01 6.994808e-02
[101,] 0.912630470 1.747391e-01 8.736953e-02
[102,] 0.894624320 2.107514e-01 1.053757e-01
[103,] 0.869771232 2.604575e-01 1.302288e-01
[104,] 0.880872696 2.382546e-01 1.191273e-01
[105,] 0.876159888 2.476802e-01 1.238401e-01
[106,] 0.858171189 2.836576e-01 1.418288e-01
[107,] 0.841692884 3.166142e-01 1.583071e-01
[108,] 0.899173031 2.016539e-01 1.008270e-01
[109,] 0.914938546 1.701229e-01 8.506145e-02
[110,] 0.989140605 2.171879e-02 1.085939e-02
[111,] 0.996792919 6.414163e-03 3.207081e-03
[112,] 0.996795920 6.408161e-03 3.204080e-03
[113,] 0.998001857 3.996285e-03 1.998143e-03
[114,] 0.997261244 5.477512e-03 2.738756e-03
[115,] 0.997161393 5.677213e-03 2.838607e-03
[116,] 0.999131849 1.736303e-03 8.681514e-04
[117,] 0.998776183 2.447634e-03 1.223817e-03
[118,] 0.999315354 1.369293e-03 6.846464e-04
[119,] 0.999933418 1.331644e-04 6.658219e-05
[120,] 0.999878866 2.422687e-04 1.211344e-04
[121,] 0.999848041 3.039181e-04 1.519591e-04
[122,] 0.999740145 5.197101e-04 2.598550e-04
[123,] 0.999580926 8.381480e-04 4.190740e-04
[124,] 0.999228278 1.543443e-03 7.717217e-04
[125,] 0.999097316 1.805369e-03 9.026845e-04
[126,] 0.998394344 3.211312e-03 1.605656e-03
[127,] 0.999505445 9.891109e-04 4.945555e-04
[128,] 0.999039816 1.920368e-03 9.601841e-04
[129,] 0.998235015 3.529971e-03 1.764985e-03
[130,] 0.998524520 2.950960e-03 1.475480e-03
[131,] 0.998367292 3.265415e-03 1.632708e-03
[132,] 0.998797109 2.405781e-03 1.202891e-03
[133,] 0.999916979 1.660414e-04 8.302072e-05
[134,] 0.999810616 3.787685e-04 1.893842e-04
[135,] 0.999915819 1.683615e-04 8.418073e-05
[136,] 0.999998966 2.067588e-06 1.033794e-06
[137,] 0.999998800 2.400833e-06 1.200417e-06
[138,] 0.999999745 5.106240e-07 2.553120e-07
[139,] 0.999998840 2.319662e-06 1.159831e-06
[140,] 0.999993660 1.267940e-05 6.339701e-06
[141,] 0.999973802 5.239576e-05 2.619788e-05
[142,] 0.999842481 3.150370e-04 1.575185e-04
[143,] 0.999107442 1.785117e-03 8.925583e-04
[144,] 0.995430751 9.138498e-03 4.569249e-03
[145,] 0.979609010 4.078198e-02 2.039099e-02
> postscript(file="/var/www/rcomp/tmp/1ottz1321998980.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/2v0vg1321998980.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/3rdhy1321998980.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/4sb781321998980.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/543sz1321998980.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 7
-5.012368 5.661917 -31.994448 -10.512110 -25.757433 9.760876 -44.846006
8 9 10 11 12 13 14
-13.474144 -2.560107 -22.721571 24.073914 43.920886 6.379099 22.251584
15 16 17 18 19 20 21
-11.518732 6.513495 -5.508807 -47.491290 -27.295357 20.564002 -5.805928
22 23 24 25 26 27 28
-2.254752 -5.243527 42.947461 10.640668 5.893993 -25.617987 13.653311
29 30 31 32 33 34 35
15.327443 13.744931 17.614233 26.043324 17.495012 26.181579 0.577640
36 37 38 39 40 41 42
-3.680729 14.014656 -12.441763 -29.612067 -2.273836 -12.003933 2.296131
43 44 45 46 47 48 49
2.401258 8.396955 -28.824424 -21.452194 19.007032 24.543005 8.392746
50 51 52 53 54 55 56
26.386777 -7.223498 -21.979534 7.748569 17.980076 -11.003565 -8.980288
57 58 59 60 61 62 63
41.846418 -13.836532 -10.846562 7.854988 -6.691935 -46.500508 -3.220664
64 65 66 67 68 69 70
16.734937 13.542558 -28.155178 -5.874323 11.787163 -3.551678 -11.798782
71 72 73 74 75 76 77
16.711891 22.478480 26.127925 -5.478136 7.435675 -2.275216 -9.913899
78 79 80 81 82 83 84
-29.539018 15.786231 14.939865 1.147628 -24.030807 29.425815 -38.072546
85 86 87 88 89 90 91
-28.884309 17.923884 20.953298 6.942841 -5.756996 1.174054 -14.426697
92 93 94 95 96 97 98
4.818764 13.140238 13.870214 11.420302 4.592654 -18.713210 -37.052320
99 100 101 102 103 104 105
56.858560 -31.398808 21.947244 -13.628001 -14.177716 27.845832 -39.046919
106 107 108 109 110 111 112
-38.205925 -13.382226 -9.263586 -22.425437 11.214618 13.056225 2.757125
113 114 115 116 117 118 119
-21.781719 -8.280301 -5.714800 17.766103 -31.782166 -19.298335 -33.405686
120 121 122 123 124 125 126
-18.493078 2.194728 43.805894 25.290316 4.698727 -6.123938 25.032690
127 128 129 130 131 132 133
41.479718 44.525252 17.400724 9.310421 6.103187 16.713661 16.761262
134 135 136 137 138 139 140
9.501852 1.656204 29.951612 -1.659794 12.615637 14.101325 18.106782
141 142 143 144 145 146 147
-19.635715 -27.750897 -4.724082 20.210513 10.244397 41.175205 3.632252
148 149 150 151 152 153 154
4.276588 -11.043490 -16.099084 -10.940891 -10.956019 -10.662898 -10.567751
155 156 157 158 159 160 161
-4.854964 -18.191953 -10.282307 -10.486115 -13.746466 -8.822629 -9.293170
162 163 164
-5.197947 -10.004767 -18.263752
> postscript(file="/var/www/rcomp/tmp/65koy1321998980.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 -5.012368 NA
1 5.661917 -5.012368
2 -31.994448 5.661917
3 -10.512110 -31.994448
4 -25.757433 -10.512110
5 9.760876 -25.757433
6 -44.846006 9.760876
7 -13.474144 -44.846006
8 -2.560107 -13.474144
9 -22.721571 -2.560107
10 24.073914 -22.721571
11 43.920886 24.073914
12 6.379099 43.920886
13 22.251584 6.379099
14 -11.518732 22.251584
15 6.513495 -11.518732
16 -5.508807 6.513495
17 -47.491290 -5.508807
18 -27.295357 -47.491290
19 20.564002 -27.295357
20 -5.805928 20.564002
21 -2.254752 -5.805928
22 -5.243527 -2.254752
23 42.947461 -5.243527
24 10.640668 42.947461
25 5.893993 10.640668
26 -25.617987 5.893993
27 13.653311 -25.617987
28 15.327443 13.653311
29 13.744931 15.327443
30 17.614233 13.744931
31 26.043324 17.614233
32 17.495012 26.043324
33 26.181579 17.495012
34 0.577640 26.181579
35 -3.680729 0.577640
36 14.014656 -3.680729
37 -12.441763 14.014656
38 -29.612067 -12.441763
39 -2.273836 -29.612067
40 -12.003933 -2.273836
41 2.296131 -12.003933
42 2.401258 2.296131
43 8.396955 2.401258
44 -28.824424 8.396955
45 -21.452194 -28.824424
46 19.007032 -21.452194
47 24.543005 19.007032
48 8.392746 24.543005
49 26.386777 8.392746
50 -7.223498 26.386777
51 -21.979534 -7.223498
52 7.748569 -21.979534
53 17.980076 7.748569
54 -11.003565 17.980076
55 -8.980288 -11.003565
56 41.846418 -8.980288
57 -13.836532 41.846418
58 -10.846562 -13.836532
59 7.854988 -10.846562
60 -6.691935 7.854988
61 -46.500508 -6.691935
62 -3.220664 -46.500508
63 16.734937 -3.220664
64 13.542558 16.734937
65 -28.155178 13.542558
66 -5.874323 -28.155178
67 11.787163 -5.874323
68 -3.551678 11.787163
69 -11.798782 -3.551678
70 16.711891 -11.798782
71 22.478480 16.711891
72 26.127925 22.478480
73 -5.478136 26.127925
74 7.435675 -5.478136
75 -2.275216 7.435675
76 -9.913899 -2.275216
77 -29.539018 -9.913899
78 15.786231 -29.539018
79 14.939865 15.786231
80 1.147628 14.939865
81 -24.030807 1.147628
82 29.425815 -24.030807
83 -38.072546 29.425815
84 -28.884309 -38.072546
85 17.923884 -28.884309
86 20.953298 17.923884
87 6.942841 20.953298
88 -5.756996 6.942841
89 1.174054 -5.756996
90 -14.426697 1.174054
91 4.818764 -14.426697
92 13.140238 4.818764
93 13.870214 13.140238
94 11.420302 13.870214
95 4.592654 11.420302
96 -18.713210 4.592654
97 -37.052320 -18.713210
98 56.858560 -37.052320
99 -31.398808 56.858560
100 21.947244 -31.398808
101 -13.628001 21.947244
102 -14.177716 -13.628001
103 27.845832 -14.177716
104 -39.046919 27.845832
105 -38.205925 -39.046919
106 -13.382226 -38.205925
107 -9.263586 -13.382226
108 -22.425437 -9.263586
109 11.214618 -22.425437
110 13.056225 11.214618
111 2.757125 13.056225
112 -21.781719 2.757125
113 -8.280301 -21.781719
114 -5.714800 -8.280301
115 17.766103 -5.714800
116 -31.782166 17.766103
117 -19.298335 -31.782166
118 -33.405686 -19.298335
119 -18.493078 -33.405686
120 2.194728 -18.493078
121 43.805894 2.194728
122 25.290316 43.805894
123 4.698727 25.290316
124 -6.123938 4.698727
125 25.032690 -6.123938
126 41.479718 25.032690
127 44.525252 41.479718
128 17.400724 44.525252
129 9.310421 17.400724
130 6.103187 9.310421
131 16.713661 6.103187
132 16.761262 16.713661
133 9.501852 16.761262
134 1.656204 9.501852
135 29.951612 1.656204
136 -1.659794 29.951612
137 12.615637 -1.659794
138 14.101325 12.615637
139 18.106782 14.101325
140 -19.635715 18.106782
141 -27.750897 -19.635715
142 -4.724082 -27.750897
143 20.210513 -4.724082
144 10.244397 20.210513
145 41.175205 10.244397
146 3.632252 41.175205
147 4.276588 3.632252
148 -11.043490 4.276588
149 -16.099084 -11.043490
150 -10.940891 -16.099084
151 -10.956019 -10.940891
152 -10.662898 -10.956019
153 -10.567751 -10.662898
154 -4.854964 -10.567751
155 -18.191953 -4.854964
156 -10.282307 -18.191953
157 -10.486115 -10.282307
158 -13.746466 -10.486115
159 -8.822629 -13.746466
160 -9.293170 -8.822629
161 -5.197947 -9.293170
162 -10.004767 -5.197947
163 -18.263752 -10.004767
164 NA -18.263752
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 5.661917 -5.012368
[2,] -31.994448 5.661917
[3,] -10.512110 -31.994448
[4,] -25.757433 -10.512110
[5,] 9.760876 -25.757433
[6,] -44.846006 9.760876
[7,] -13.474144 -44.846006
[8,] -2.560107 -13.474144
[9,] -22.721571 -2.560107
[10,] 24.073914 -22.721571
[11,] 43.920886 24.073914
[12,] 6.379099 43.920886
[13,] 22.251584 6.379099
[14,] -11.518732 22.251584
[15,] 6.513495 -11.518732
[16,] -5.508807 6.513495
[17,] -47.491290 -5.508807
[18,] -27.295357 -47.491290
[19,] 20.564002 -27.295357
[20,] -5.805928 20.564002
[21,] -2.254752 -5.805928
[22,] -5.243527 -2.254752
[23,] 42.947461 -5.243527
[24,] 10.640668 42.947461
[25,] 5.893993 10.640668
[26,] -25.617987 5.893993
[27,] 13.653311 -25.617987
[28,] 15.327443 13.653311
[29,] 13.744931 15.327443
[30,] 17.614233 13.744931
[31,] 26.043324 17.614233
[32,] 17.495012 26.043324
[33,] 26.181579 17.495012
[34,] 0.577640 26.181579
[35,] -3.680729 0.577640
[36,] 14.014656 -3.680729
[37,] -12.441763 14.014656
[38,] -29.612067 -12.441763
[39,] -2.273836 -29.612067
[40,] -12.003933 -2.273836
[41,] 2.296131 -12.003933
[42,] 2.401258 2.296131
[43,] 8.396955 2.401258
[44,] -28.824424 8.396955
[45,] -21.452194 -28.824424
[46,] 19.007032 -21.452194
[47,] 24.543005 19.007032
[48,] 8.392746 24.543005
[49,] 26.386777 8.392746
[50,] -7.223498 26.386777
[51,] -21.979534 -7.223498
[52,] 7.748569 -21.979534
[53,] 17.980076 7.748569
[54,] -11.003565 17.980076
[55,] -8.980288 -11.003565
[56,] 41.846418 -8.980288
[57,] -13.836532 41.846418
[58,] -10.846562 -13.836532
[59,] 7.854988 -10.846562
[60,] -6.691935 7.854988
[61,] -46.500508 -6.691935
[62,] -3.220664 -46.500508
[63,] 16.734937 -3.220664
[64,] 13.542558 16.734937
[65,] -28.155178 13.542558
[66,] -5.874323 -28.155178
[67,] 11.787163 -5.874323
[68,] -3.551678 11.787163
[69,] -11.798782 -3.551678
[70,] 16.711891 -11.798782
[71,] 22.478480 16.711891
[72,] 26.127925 22.478480
[73,] -5.478136 26.127925
[74,] 7.435675 -5.478136
[75,] -2.275216 7.435675
[76,] -9.913899 -2.275216
[77,] -29.539018 -9.913899
[78,] 15.786231 -29.539018
[79,] 14.939865 15.786231
[80,] 1.147628 14.939865
[81,] -24.030807 1.147628
[82,] 29.425815 -24.030807
[83,] -38.072546 29.425815
[84,] -28.884309 -38.072546
[85,] 17.923884 -28.884309
[86,] 20.953298 17.923884
[87,] 6.942841 20.953298
[88,] -5.756996 6.942841
[89,] 1.174054 -5.756996
[90,] -14.426697 1.174054
[91,] 4.818764 -14.426697
[92,] 13.140238 4.818764
[93,] 13.870214 13.140238
[94,] 11.420302 13.870214
[95,] 4.592654 11.420302
[96,] -18.713210 4.592654
[97,] -37.052320 -18.713210
[98,] 56.858560 -37.052320
[99,] -31.398808 56.858560
[100,] 21.947244 -31.398808
[101,] -13.628001 21.947244
[102,] -14.177716 -13.628001
[103,] 27.845832 -14.177716
[104,] -39.046919 27.845832
[105,] -38.205925 -39.046919
[106,] -13.382226 -38.205925
[107,] -9.263586 -13.382226
[108,] -22.425437 -9.263586
[109,] 11.214618 -22.425437
[110,] 13.056225 11.214618
[111,] 2.757125 13.056225
[112,] -21.781719 2.757125
[113,] -8.280301 -21.781719
[114,] -5.714800 -8.280301
[115,] 17.766103 -5.714800
[116,] -31.782166 17.766103
[117,] -19.298335 -31.782166
[118,] -33.405686 -19.298335
[119,] -18.493078 -33.405686
[120,] 2.194728 -18.493078
[121,] 43.805894 2.194728
[122,] 25.290316 43.805894
[123,] 4.698727 25.290316
[124,] -6.123938 4.698727
[125,] 25.032690 -6.123938
[126,] 41.479718 25.032690
[127,] 44.525252 41.479718
[128,] 17.400724 44.525252
[129,] 9.310421 17.400724
[130,] 6.103187 9.310421
[131,] 16.713661 6.103187
[132,] 16.761262 16.713661
[133,] 9.501852 16.761262
[134,] 1.656204 9.501852
[135,] 29.951612 1.656204
[136,] -1.659794 29.951612
[137,] 12.615637 -1.659794
[138,] 14.101325 12.615637
[139,] 18.106782 14.101325
[140,] -19.635715 18.106782
[141,] -27.750897 -19.635715
[142,] -4.724082 -27.750897
[143,] 20.210513 -4.724082
[144,] 10.244397 20.210513
[145,] 41.175205 10.244397
[146,] 3.632252 41.175205
[147,] 4.276588 3.632252
[148,] -11.043490 4.276588
[149,] -16.099084 -11.043490
[150,] -10.940891 -16.099084
[151,] -10.956019 -10.940891
[152,] -10.662898 -10.956019
[153,] -10.567751 -10.662898
[154,] -4.854964 -10.567751
[155,] -18.191953 -4.854964
[156,] -10.282307 -18.191953
[157,] -10.486115 -10.282307
[158,] -13.746466 -10.486115
[159,] -8.822629 -13.746466
[160,] -9.293170 -8.822629
[161,] -5.197947 -9.293170
[162,] -10.004767 -5.197947
[163,] -18.263752 -10.004767
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 5.661917 -5.012368
2 -31.994448 5.661917
3 -10.512110 -31.994448
4 -25.757433 -10.512110
5 9.760876 -25.757433
6 -44.846006 9.760876
7 -13.474144 -44.846006
8 -2.560107 -13.474144
9 -22.721571 -2.560107
10 24.073914 -22.721571
11 43.920886 24.073914
12 6.379099 43.920886
13 22.251584 6.379099
14 -11.518732 22.251584
15 6.513495 -11.518732
16 -5.508807 6.513495
17 -47.491290 -5.508807
18 -27.295357 -47.491290
19 20.564002 -27.295357
20 -5.805928 20.564002
21 -2.254752 -5.805928
22 -5.243527 -2.254752
23 42.947461 -5.243527
24 10.640668 42.947461
25 5.893993 10.640668
26 -25.617987 5.893993
27 13.653311 -25.617987
28 15.327443 13.653311
29 13.744931 15.327443
30 17.614233 13.744931
31 26.043324 17.614233
32 17.495012 26.043324
33 26.181579 17.495012
34 0.577640 26.181579
35 -3.680729 0.577640
36 14.014656 -3.680729
37 -12.441763 14.014656
38 -29.612067 -12.441763
39 -2.273836 -29.612067
40 -12.003933 -2.273836
41 2.296131 -12.003933
42 2.401258 2.296131
43 8.396955 2.401258
44 -28.824424 8.396955
45 -21.452194 -28.824424
46 19.007032 -21.452194
47 24.543005 19.007032
48 8.392746 24.543005
49 26.386777 8.392746
50 -7.223498 26.386777
51 -21.979534 -7.223498
52 7.748569 -21.979534
53 17.980076 7.748569
54 -11.003565 17.980076
55 -8.980288 -11.003565
56 41.846418 -8.980288
57 -13.836532 41.846418
58 -10.846562 -13.836532
59 7.854988 -10.846562
60 -6.691935 7.854988
61 -46.500508 -6.691935
62 -3.220664 -46.500508
63 16.734937 -3.220664
64 13.542558 16.734937
65 -28.155178 13.542558
66 -5.874323 -28.155178
67 11.787163 -5.874323
68 -3.551678 11.787163
69 -11.798782 -3.551678
70 16.711891 -11.798782
71 22.478480 16.711891
72 26.127925 22.478480
73 -5.478136 26.127925
74 7.435675 -5.478136
75 -2.275216 7.435675
76 -9.913899 -2.275216
77 -29.539018 -9.913899
78 15.786231 -29.539018
79 14.939865 15.786231
80 1.147628 14.939865
81 -24.030807 1.147628
82 29.425815 -24.030807
83 -38.072546 29.425815
84 -28.884309 -38.072546
85 17.923884 -28.884309
86 20.953298 17.923884
87 6.942841 20.953298
88 -5.756996 6.942841
89 1.174054 -5.756996
90 -14.426697 1.174054
91 4.818764 -14.426697
92 13.140238 4.818764
93 13.870214 13.140238
94 11.420302 13.870214
95 4.592654 11.420302
96 -18.713210 4.592654
97 -37.052320 -18.713210
98 56.858560 -37.052320
99 -31.398808 56.858560
100 21.947244 -31.398808
101 -13.628001 21.947244
102 -14.177716 -13.628001
103 27.845832 -14.177716
104 -39.046919 27.845832
105 -38.205925 -39.046919
106 -13.382226 -38.205925
107 -9.263586 -13.382226
108 -22.425437 -9.263586
109 11.214618 -22.425437
110 13.056225 11.214618
111 2.757125 13.056225
112 -21.781719 2.757125
113 -8.280301 -21.781719
114 -5.714800 -8.280301
115 17.766103 -5.714800
116 -31.782166 17.766103
117 -19.298335 -31.782166
118 -33.405686 -19.298335
119 -18.493078 -33.405686
120 2.194728 -18.493078
121 43.805894 2.194728
122 25.290316 43.805894
123 4.698727 25.290316
124 -6.123938 4.698727
125 25.032690 -6.123938
126 41.479718 25.032690
127 44.525252 41.479718
128 17.400724 44.525252
129 9.310421 17.400724
130 6.103187 9.310421
131 16.713661 6.103187
132 16.761262 16.713661
133 9.501852 16.761262
134 1.656204 9.501852
135 29.951612 1.656204
136 -1.659794 29.951612
137 12.615637 -1.659794
138 14.101325 12.615637
139 18.106782 14.101325
140 -19.635715 18.106782
141 -27.750897 -19.635715
142 -4.724082 -27.750897
143 20.210513 -4.724082
144 10.244397 20.210513
145 41.175205 10.244397
146 3.632252 41.175205
147 4.276588 3.632252
148 -11.043490 4.276588
149 -16.099084 -11.043490
150 -10.940891 -16.099084
151 -10.956019 -10.940891
152 -10.662898 -10.956019
153 -10.567751 -10.662898
154 -4.854964 -10.567751
155 -18.191953 -4.854964
156 -10.282307 -18.191953
157 -10.486115 -10.282307
158 -13.746466 -10.486115
159 -8.822629 -13.746466
160 -9.293170 -8.822629
161 -5.197947 -9.293170
162 -10.004767 -5.197947
163 -18.263752 -10.004767
> 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/781dz1321998980.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/8vdhk1321998980.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/96aj21321998980.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/10bfi21321998980.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/11s01l1321998980.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/12b8uf1321998980.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/13cmfi1321998981.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/1463gf1321998981.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/154ue01321998981.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/168wke1321998981.tab")
+ }
>
> try(system("convert tmp/1ottz1321998980.ps tmp/1ottz1321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/2v0vg1321998980.ps tmp/2v0vg1321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/3rdhy1321998980.ps tmp/3rdhy1321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/4sb781321998980.ps tmp/4sb781321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/543sz1321998980.ps tmp/543sz1321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/65koy1321998980.ps tmp/65koy1321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/781dz1321998980.ps tmp/781dz1321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/8vdhk1321998980.ps tmp/8vdhk1321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/96aj21321998980.ps tmp/96aj21321998980.png",intern=TRUE))
character(0)
> try(system("convert tmp/10bfi21321998980.ps tmp/10bfi21321998980.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
6.196 0.620 6.887