R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(210907
+ ,56
+ ,145
+ ,30
+ ,112285
+ ,24188
+ ,120982
+ ,56
+ ,101
+ ,28
+ ,84786
+ ,18273
+ ,176508
+ ,54
+ ,98
+ ,38
+ ,83123
+ ,14130
+ ,179321
+ ,89
+ ,132
+ ,30
+ ,101193
+ ,32287
+ ,123185
+ ,40
+ ,60
+ ,22
+ ,38361
+ ,8654
+ ,52746
+ ,25
+ ,38
+ ,26
+ ,68504
+ ,9245
+ ,385534
+ ,92
+ ,144
+ ,25
+ ,119182
+ ,33251
+ ,33170
+ ,18
+ ,5
+ ,18
+ ,22807
+ ,1271
+ ,149061
+ ,44
+ ,84
+ ,26
+ ,116174
+ ,27101
+ ,165446
+ ,33
+ ,79
+ ,25
+ ,57635
+ ,16373
+ ,237213
+ ,84
+ ,127
+ ,38
+ ,66198
+ ,19716
+ ,173326
+ ,88
+ ,78
+ ,44
+ ,71701
+ ,17753
+ ,133131
+ ,55
+ ,60
+ ,30
+ ,57793
+ ,9028
+ ,258873
+ ,60
+ ,131
+ ,40
+ ,80444
+ ,18653
+ ,180083
+ ,66
+ ,84
+ ,34
+ ,53855
+ ,8828
+ ,324799
+ ,154
+ ,133
+ ,47
+ ,97668
+ ,29498
+ ,230964
+ ,53
+ ,150
+ ,30
+ ,133824
+ ,27563
+ ,236785
+ ,119
+ ,91
+ ,31
+ ,101481
+ ,18293
+ ,135473
+ ,41
+ ,132
+ ,23
+ ,99645
+ ,22530
+ ,202925
+ ,61
+ ,136
+ ,36
+ ,114789
+ ,15977
+ ,215147
+ ,58
+ ,124
+ ,36
+ ,99052
+ ,35082
+ ,344297
+ ,75
+ ,118
+ ,30
+ ,67654
+ ,16116
+ ,153935
+ ,33
+ ,70
+ ,25
+ ,65553
+ ,15849
+ ,132943
+ ,40
+ ,107
+ ,39
+ ,97500
+ ,16026
+ ,174724
+ ,92
+ ,119
+ ,34
+ ,69112
+ ,26569
+ ,174415
+ ,100
+ ,89
+ ,31
+ ,82753
+ ,24785
+ ,225548
+ ,112
+ ,112
+ ,31
+ ,85323
+ ,17569
+ ,223632
+ ,73
+ ,108
+ ,33
+ ,72654
+ ,23825
+ ,124817
+ ,40
+ ,52
+ ,25
+ ,30727
+ ,7869
+ ,221698
+ ,45
+ ,112
+ ,33
+ ,77873
+ ,14975
+ ,210767
+ ,60
+ ,116
+ ,35
+ ,117478
+ ,37791
+ ,170266
+ ,62
+ ,123
+ ,42
+ ,74007
+ ,9605
+ ,260561
+ ,75
+ ,125
+ ,43
+ ,90183
+ ,27295
+ ,84853
+ ,31
+ ,27
+ ,30
+ ,61542
+ ,2746
+ ,294424
+ ,77
+ ,162
+ ,33
+ ,101494
+ ,34461
+ ,215641
+ ,46
+ ,64
+ ,32
+ ,55813
+ ,4787
+ ,325107
+ ,99
+ ,92
+ ,36
+ ,79215
+ ,24919
+ ,167542
+ ,66
+ ,83
+ ,28
+ ,55461
+ ,16329
+ ,106408
+ ,30
+ ,41
+ ,14
+ ,31081
+ ,12558
+ ,265769
+ ,146
+ ,120
+ ,32
+ ,83122
+ ,28522
+ ,269651
+ ,67
+ ,105
+ ,30
+ ,70106
+ ,22265
+ ,149112
+ ,56
+ ,79
+ ,35
+ ,60578
+ ,14459
+ ,152871
+ ,58
+ ,70
+ ,28
+ ,79892
+ ,22240
+ ,111665
+ ,34
+ ,55
+ ,28
+ ,49810
+ ,11802
+ ,116408
+ ,61
+ ,39
+ ,39
+ ,71570
+ ,7623
+ ,362301
+ ,119
+ ,67
+ ,34
+ ,100708
+ ,11912
+ ,78800
+ ,42
+ ,21
+ ,26
+ ,33032
+ ,7935
+ ,183167
+ ,66
+ ,127
+ ,39
+ ,82875
+ ,18220
+ ,277965
+ ,89
+ ,152
+ ,39
+ ,139077
+ ,19199
+ ,150629
+ ,44
+ ,113
+ ,33
+ ,71595
+ ,19918
+ ,168809
+ ,66
+ ,99
+ ,28
+ ,72260
+ ,21884
+ ,24188
+ ,24
+ ,7
+ ,4
+ ,5950
+ ,2694
+ ,329267
+ ,259
+ ,141
+ ,39
+ ,115762
+ ,15808
+ ,65029
+ ,17
+ ,21
+ ,18
+ ,32551
+ ,3597
+ ,101097
+ ,64
+ ,35
+ ,14
+ ,31701
+ ,5296
+ ,218946
+ ,41
+ ,109
+ ,29
+ ,80670
+ ,25239
+ ,244052
+ ,68
+ ,133
+ ,44
+ ,143558
+ ,29801
+ ,233328
+ ,132
+ ,230
+ ,28
+ ,120733
+ ,34861
+ ,256462
+ ,105
+ ,166
+ ,35
+ ,105195
+ ,35940
+ ,206161
+ ,71
+ ,68
+ ,28
+ ,73107
+ ,16688
+ ,311473
+ ,112
+ ,147
+ ,38
+ ,132068
+ ,24683
+ ,235800
+ ,94
+ ,179
+ ,23
+ ,149193
+ ,46230
+ ,177939
+ ,82
+ ,61
+ ,36
+ ,46821
+ ,10387
+ ,207176
+ ,70
+ ,101
+ ,32
+ ,87011
+ ,21436
+ ,196553
+ ,57
+ ,108
+ ,29
+ ,95260
+ ,30546
+ ,174184
+ ,53
+ ,90
+ ,25
+ ,55183
+ ,19746
+ ,143246
+ ,103
+ ,114
+ ,27
+ ,106671
+ ,15977
+ ,187559
+ ,121
+ ,103
+ ,36
+ ,73511
+ ,22583
+ ,187681
+ ,62
+ ,142
+ ,28
+ ,92945
+ ,17274
+ ,119016
+ ,52
+ ,79
+ ,23
+ ,78664
+ ,16469
+ ,182192
+ ,52
+ ,88
+ ,40
+ ,70054
+ ,14251
+ ,73566
+ ,32
+ ,25
+ ,23
+ ,22618
+ ,3007
+ ,194979
+ ,62
+ ,83
+ ,40
+ ,74011
+ ,16851
+ ,167488
+ ,45
+ ,113
+ ,28
+ ,83737
+ ,21113
+ ,143756
+ ,46
+ ,118
+ ,34
+ ,69094
+ ,17401
+ ,275541
+ ,63
+ ,110
+ ,33
+ ,93133
+ ,23958
+ ,243199
+ ,75
+ ,129
+ ,28
+ ,95536
+ ,23567
+ ,182999
+ ,88
+ ,51
+ ,34
+ ,225920
+ ,13065
+ ,135649
+ ,46
+ ,93
+ ,30
+ ,62133
+ ,15358
+ ,152299
+ ,53
+ ,76
+ ,33
+ ,61370
+ ,14587
+ ,120221
+ ,37
+ ,49
+ ,22
+ ,43836
+ ,12770
+ ,346485
+ ,90
+ ,118
+ ,38
+ ,106117
+ ,24021
+ ,145790
+ ,63
+ ,38
+ ,26
+ ,38692
+ ,9648
+ ,193339
+ ,78
+ ,141
+ ,35
+ ,84651
+ ,20537
+ ,80953
+ ,25
+ ,58
+ ,8
+ ,56622
+ ,7905
+ ,122774
+ ,45
+ ,27
+ ,24
+ ,15986
+ ,4527
+ ,130585
+ ,46
+ ,91
+ ,29
+ ,95364
+ ,30495
+ ,286468
+ ,144
+ ,63
+ ,29
+ ,89691
+ ,17719
+ ,241066
+ ,82
+ ,56
+ ,45
+ ,67267
+ ,27056
+ ,148446
+ ,91
+ ,144
+ ,37
+ ,126846
+ ,33473
+ ,204713
+ ,71
+ ,73
+ ,33
+ ,41140
+ ,9758
+ ,182079
+ ,63
+ ,168
+ ,33
+ ,102860
+ ,21115
+ ,140344
+ ,53
+ ,64
+ ,25
+ ,51715
+ ,7236
+ ,220516
+ ,62
+ ,97
+ ,32
+ ,55801
+ ,13790
+ ,243060
+ ,63
+ ,117
+ ,29
+ ,111813
+ ,32902
+ ,162765
+ ,32
+ ,100
+ ,28
+ ,120293
+ ,25131
+ ,182613
+ ,39
+ ,149
+ ,28
+ ,138599
+ ,30910
+ ,232138
+ ,62
+ ,187
+ ,31
+ ,161647
+ ,35947
+ ,265318
+ ,117
+ ,127
+ ,52
+ ,115929
+ ,29848
+ ,310839
+ ,92
+ ,245
+ ,24
+ ,162901
+ ,42705
+ ,225060
+ ,93
+ ,87
+ ,41
+ ,109825
+ ,31808
+ ,232317
+ ,54
+ ,177
+ ,33
+ ,129838
+ ,26675
+ ,144966
+ ,144
+ ,49
+ ,32
+ ,37510
+ ,8435
+ ,43287
+ ,14
+ ,49
+ ,19
+ ,43750
+ ,7409
+ ,155754
+ ,61
+ ,73
+ ,20
+ ,40652
+ ,14993
+ ,164709
+ ,109
+ ,177
+ ,31
+ ,87771
+ ,36867
+ ,201940
+ ,38
+ ,94
+ ,31
+ ,85872
+ ,33835
+ ,235454
+ ,73
+ ,117
+ ,32
+ ,89275
+ ,24164
+ ,99466
+ ,50
+ ,55
+ ,23
+ ,192565
+ ,22609
+ ,100750
+ ,72
+ ,58
+ ,30
+ ,140867
+ ,6440
+ ,224549
+ ,50
+ ,95
+ ,31
+ ,120662
+ ,21916
+ ,243511
+ ,71
+ ,129
+ ,42
+ ,101338
+ ,20556
+ ,22938
+ ,10
+ ,11
+ ,1
+ ,1168
+ ,238
+ ,152474
+ ,65
+ ,101
+ ,32
+ ,65567
+ ,22392
+ ,61857
+ ,25
+ ,28
+ ,11
+ ,25162
+ ,3913
+ ,132487
+ ,41
+ ,89
+ ,36
+ ,40735
+ ,8388
+ ,317394
+ ,86
+ ,193
+ ,31
+ ,91413
+ ,22120
+ ,21054
+ ,16
+ ,4
+ ,0
+ ,855
+ ,338
+ ,209641
+ ,42
+ ,84
+ ,24
+ ,97068
+ ,11727
+ ,31414
+ ,19
+ ,39
+ ,8
+ ,14116
+ ,3988
+ ,244749
+ ,95
+ ,101
+ ,33
+ ,76643
+ ,20923
+ ,184510
+ ,49
+ ,82
+ ,40
+ ,110681
+ ,20237
+ ,128423
+ ,64
+ ,36
+ ,38
+ ,92696
+ ,3769
+ ,97839
+ ,38
+ ,75
+ ,24
+ ,94785
+ ,12252
+ ,38214
+ ,34
+ ,16
+ ,8
+ ,8773
+ ,1888
+ ,151101
+ ,32
+ ,55
+ ,35
+ ,83209
+ ,14497
+ ,272458
+ ,65
+ ,131
+ ,43
+ ,93815
+ ,28864
+ ,172494
+ ,52
+ ,131
+ ,43
+ ,86687
+ ,21721
+ ,328107
+ ,65
+ ,144
+ ,41
+ ,105547
+ ,33644
+ ,250579
+ ,83
+ ,139
+ ,38
+ ,103487
+ ,15923
+ ,351067
+ ,95
+ ,211
+ ,45
+ ,213688
+ ,42935
+ ,158015
+ ,29
+ ,78
+ ,31
+ ,71220
+ ,18864
+ ,85439
+ ,33
+ ,39
+ ,28
+ ,56926
+ ,7785
+ ,229242
+ ,247
+ ,90
+ ,31
+ ,91721
+ ,17939
+ ,351619
+ ,139
+ ,166
+ ,40
+ ,115168
+ ,23436
+ ,84207
+ ,29
+ ,12
+ ,30
+ ,111194
+ ,325
+ ,324598
+ ,110
+ ,133
+ ,37
+ ,135777
+ ,34538
+ ,131069
+ ,67
+ ,69
+ ,30
+ ,51513
+ ,12198
+ ,204271
+ ,42
+ ,119
+ ,35
+ ,74163
+ ,26924
+ ,165543
+ ,65
+ ,119
+ ,32
+ ,51633
+ ,12716
+ ,141722
+ ,94
+ ,65
+ ,27
+ ,75345
+ ,8172
+ ,299775
+ ,95
+ ,101
+ ,31
+ ,98952
+ ,14300
+ ,195838
+ ,67
+ ,196
+ ,31
+ ,102372
+ ,25515
+ ,173260
+ ,63
+ ,15
+ ,21
+ ,37238
+ ,2805
+ ,254488
+ ,83
+ ,136
+ ,39
+ ,103772
+ ,29402
+ ,104389
+ ,45
+ ,89
+ ,41
+ ,123969
+ ,16440
+ ,199476
+ ,70
+ ,123
+ ,32
+ ,135400
+ ,28732
+ ,224330
+ ,83
+ ,163
+ ,39
+ ,130115
+ ,28608
+ ,14688
+ ,10
+ ,5
+ ,0
+ ,6023
+ ,2065
+ ,181633
+ ,70
+ ,96
+ ,30
+ ,64466
+ ,14817
+ ,271856
+ ,103
+ ,151
+ ,37
+ ,54990
+ ,16714
+ ,7199
+ ,5
+ ,6
+ ,0
+ ,1644
+ ,556
+ ,46660
+ ,20
+ ,13
+ ,5
+ ,6179
+ ,2089
+ ,17547
+ ,5
+ ,3
+ ,1
+ ,3926
+ ,2658
+ ,95227
+ ,34
+ ,23
+ ,32
+ ,34777
+ ,1669
+ ,152601
+ ,48
+ ,57
+ ,24
+ ,73224
+ ,16267)
+ ,dim=c(6
+ ,156)
+ ,dimnames=list(c('time_in_rfc'
+ ,'logins'
+ ,'totblogs'
+ ,'compendiums_reviewed'
+ ,'totsize'
+ ,'totrevisions')
+ ,1:156))
> y <- array(NA,dim=c(6,156),dimnames=list(c('time_in_rfc','logins','totblogs','compendiums_reviewed','totsize','totrevisions'),1:156))
> 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
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
time_in_rfc logins totblogs compendiums_reviewed totsize totrevisions
1 210907 56 145 30 112285 24188
2 120982 56 101 28 84786 18273
3 176508 54 98 38 83123 14130
4 179321 89 132 30 101193 32287
5 123185 40 60 22 38361 8654
6 52746 25 38 26 68504 9245
7 385534 92 144 25 119182 33251
8 33170 18 5 18 22807 1271
9 149061 44 84 26 116174 27101
10 165446 33 79 25 57635 16373
11 237213 84 127 38 66198 19716
12 173326 88 78 44 71701 17753
13 133131 55 60 30 57793 9028
14 258873 60 131 40 80444 18653
15 180083 66 84 34 53855 8828
16 324799 154 133 47 97668 29498
17 230964 53 150 30 133824 27563
18 236785 119 91 31 101481 18293
19 135473 41 132 23 99645 22530
20 202925 61 136 36 114789 15977
21 215147 58 124 36 99052 35082
22 344297 75 118 30 67654 16116
23 153935 33 70 25 65553 15849
24 132943 40 107 39 97500 16026
25 174724 92 119 34 69112 26569
26 174415 100 89 31 82753 24785
27 225548 112 112 31 85323 17569
28 223632 73 108 33 72654 23825
29 124817 40 52 25 30727 7869
30 221698 45 112 33 77873 14975
31 210767 60 116 35 117478 37791
32 170266 62 123 42 74007 9605
33 260561 75 125 43 90183 27295
34 84853 31 27 30 61542 2746
35 294424 77 162 33 101494 34461
36 215641 46 64 32 55813 4787
37 325107 99 92 36 79215 24919
38 167542 66 83 28 55461 16329
39 106408 30 41 14 31081 12558
40 265769 146 120 32 83122 28522
41 269651 67 105 30 70106 22265
42 149112 56 79 35 60578 14459
43 152871 58 70 28 79892 22240
44 111665 34 55 28 49810 11802
45 116408 61 39 39 71570 7623
46 362301 119 67 34 100708 11912
47 78800 42 21 26 33032 7935
48 183167 66 127 39 82875 18220
49 277965 89 152 39 139077 19199
50 150629 44 113 33 71595 19918
51 168809 66 99 28 72260 21884
52 24188 24 7 4 5950 2694
53 329267 259 141 39 115762 15808
54 65029 17 21 18 32551 3597
55 101097 64 35 14 31701 5296
56 218946 41 109 29 80670 25239
57 244052 68 133 44 143558 29801
58 233328 132 230 28 120733 34861
59 256462 105 166 35 105195 35940
60 206161 71 68 28 73107 16688
61 311473 112 147 38 132068 24683
62 235800 94 179 23 149193 46230
63 177939 82 61 36 46821 10387
64 207176 70 101 32 87011 21436
65 196553 57 108 29 95260 30546
66 174184 53 90 25 55183 19746
67 143246 103 114 27 106671 15977
68 187559 121 103 36 73511 22583
69 187681 62 142 28 92945 17274
70 119016 52 79 23 78664 16469
71 182192 52 88 40 70054 14251
72 73566 32 25 23 22618 3007
73 194979 62 83 40 74011 16851
74 167488 45 113 28 83737 21113
75 143756 46 118 34 69094 17401
76 275541 63 110 33 93133 23958
77 243199 75 129 28 95536 23567
78 182999 88 51 34 225920 13065
79 135649 46 93 30 62133 15358
80 152299 53 76 33 61370 14587
81 120221 37 49 22 43836 12770
82 346485 90 118 38 106117 24021
83 145790 63 38 26 38692 9648
84 193339 78 141 35 84651 20537
85 80953 25 58 8 56622 7905
86 122774 45 27 24 15986 4527
87 130585 46 91 29 95364 30495
88 286468 144 63 29 89691 17719
89 241066 82 56 45 67267 27056
90 148446 91 144 37 126846 33473
91 204713 71 73 33 41140 9758
92 182079 63 168 33 102860 21115
93 140344 53 64 25 51715 7236
94 220516 62 97 32 55801 13790
95 243060 63 117 29 111813 32902
96 162765 32 100 28 120293 25131
97 182613 39 149 28 138599 30910
98 232138 62 187 31 161647 35947
99 265318 117 127 52 115929 29848
100 310839 92 245 24 162901 42705
101 225060 93 87 41 109825 31808
102 232317 54 177 33 129838 26675
103 144966 144 49 32 37510 8435
104 43287 14 49 19 43750 7409
105 155754 61 73 20 40652 14993
106 164709 109 177 31 87771 36867
107 201940 38 94 31 85872 33835
108 235454 73 117 32 89275 24164
109 99466 50 55 23 192565 22609
110 100750 72 58 30 140867 6440
111 224549 50 95 31 120662 21916
112 243511 71 129 42 101338 20556
113 22938 10 11 1 1168 238
114 152474 65 101 32 65567 22392
115 61857 25 28 11 25162 3913
116 132487 41 89 36 40735 8388
117 317394 86 193 31 91413 22120
118 21054 16 4 0 855 338
119 209641 42 84 24 97068 11727
120 31414 19 39 8 14116 3988
121 244749 95 101 33 76643 20923
122 184510 49 82 40 110681 20237
123 128423 64 36 38 92696 3769
124 97839 38 75 24 94785 12252
125 38214 34 16 8 8773 1888
126 151101 32 55 35 83209 14497
127 272458 65 131 43 93815 28864
128 172494 52 131 43 86687 21721
129 328107 65 144 41 105547 33644
130 250579 83 139 38 103487 15923
131 351067 95 211 45 213688 42935
132 158015 29 78 31 71220 18864
133 85439 33 39 28 56926 7785
134 229242 247 90 31 91721 17939
135 351619 139 166 40 115168 23436
136 84207 29 12 30 111194 325
137 324598 110 133 37 135777 34538
138 131069 67 69 30 51513 12198
139 204271 42 119 35 74163 26924
140 165543 65 119 32 51633 12716
141 141722 94 65 27 75345 8172
142 299775 95 101 31 98952 14300
143 195838 67 196 31 102372 25515
144 173260 63 15 21 37238 2805
145 254488 83 136 39 103772 29402
146 104389 45 89 41 123969 16440
147 199476 70 123 32 135400 28732
148 224330 83 163 39 130115 28608
149 14688 10 5 0 6023 2065
150 181633 70 96 30 64466 14817
151 271856 103 151 37 54990 16714
152 7199 5 6 0 1644 556
153 46660 20 13 5 6179 2089
154 17547 5 3 1 3926 2658
155 95227 34 23 32 34777 1669
156 152601 48 57 24 73224 16267
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) logins totblogs
1726.94775 726.03136 478.95159
compendiums_reviewed totsize totrevisions
2068.75184 -0.01014 1.44332
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-117382 -27663 -1465 17413 155577
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.727e+03 1.179e+04 0.146 0.883774
logins 7.260e+02 1.158e+02 6.271 3.64e-09 ***
totblogs 4.790e+02 1.370e+02 3.496 0.000622 ***
compendiums_reviewed 2.069e+03 4.890e+02 4.231 4.04e-05 ***
totsize -1.014e-02 1.381e-01 -0.073 0.941555
totrevisions 1.443e+00 6.536e-01 2.208 0.028752 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 44590 on 150 degrees of freedom
Multiple R-squared: 0.7076, Adjusted R-squared: 0.6979
F-statistic: 72.61 on 5 and 150 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.8687227 2.625546e-01 1.312773e-01
[2,] 0.9653751 6.924983e-02 3.462491e-02
[3,] 0.9426075 1.147851e-01 5.739254e-02
[4,] 0.9107124 1.785752e-01 8.928761e-02
[5,] 0.8587822 2.824355e-01 1.412178e-01
[6,] 0.8711447 2.577106e-01 1.288553e-01
[7,] 0.8135192 3.729615e-01 1.864808e-01
[8,] 0.7445082 5.109837e-01 2.554918e-01
[9,] 0.6718173 6.563654e-01 3.281827e-01
[10,] 0.5932710 8.134581e-01 4.067290e-01
[11,] 0.6853163 6.293674e-01 3.146837e-01
[12,] 0.6118824 7.762353e-01 3.881176e-01
[13,] 0.5355987 9.288025e-01 4.644013e-01
[14,] 0.8515253 2.969494e-01 1.484747e-01
[15,] 0.8267330 3.465340e-01 1.732670e-01
[16,] 0.7899849 4.200301e-01 2.100151e-01
[17,] 0.8765084 2.469831e-01 1.234916e-01
[18,] 0.8677312 2.645375e-01 1.322688e-01
[19,] 0.8508771 2.982457e-01 1.491229e-01
[20,] 0.8147317 3.705365e-01 1.852683e-01
[21,] 0.7696747 4.606505e-01 2.303253e-01
[22,] 0.7544952 4.910096e-01 2.455048e-01
[23,] 0.7204449 5.591102e-01 2.795551e-01
[24,] 0.7049697 5.900606e-01 2.950303e-01
[25,] 0.6815230 6.369541e-01 3.184770e-01
[26,] 0.6485799 7.028403e-01 3.514201e-01
[27,] 0.6073472 7.853055e-01 3.926528e-01
[28,] 0.7350225 5.299551e-01 2.649775e-01
[29,] 0.8819665 2.360670e-01 1.180335e-01
[30,] 0.8560218 2.879564e-01 1.439782e-01
[31,] 0.8236816 3.526368e-01 1.763184e-01
[32,] 0.8091919 3.816163e-01 1.908081e-01
[33,] 0.8466664 3.066673e-01 1.533336e-01
[34,] 0.8191587 3.616827e-01 1.808413e-01
[35,] 0.7826645 4.346711e-01 2.173355e-01
[36,] 0.7438769 5.122463e-01 2.561231e-01
[37,] 0.7134084 5.731831e-01 2.865916e-01
[38,] 0.9641440 7.171195e-02 3.585598e-02
[39,] 0.9555722 8.885555e-02 4.442777e-02
[40,] 0.9509101 9.817970e-02 4.908985e-02
[41,] 0.9407964 1.184073e-01 5.920363e-02
[42,] 0.9316754 1.366492e-01 6.832459e-02
[43,] 0.9185995 1.628009e-01 8.140045e-02
[44,] 0.9063453 1.873095e-01 9.365473e-02
[45,] 0.9524044 9.519130e-02 4.759565e-02
[46,] 0.9388788 1.222424e-01 6.112118e-02
[47,] 0.9234509 1.530982e-01 7.654908e-02
[48,] 0.9171019 1.657962e-01 8.289808e-02
[49,] 0.8968383 2.063234e-01 1.031617e-01
[50,] 0.9536198 9.276040e-02 4.638020e-02
[51,] 0.9444710 1.110580e-01 5.552900e-02
[52,] 0.9396491 1.207018e-01 6.035090e-02
[53,] 0.9373904 1.252191e-01 6.260957e-02
[54,] 0.9321862 1.356277e-01 6.781383e-02
[55,] 0.9150359 1.699282e-01 8.496411e-02
[56,] 0.8957528 2.084944e-01 1.042472e-01
[57,] 0.8724476 2.551049e-01 1.275524e-01
[58,] 0.8477977 3.044047e-01 1.522023e-01
[59,] 0.8806766 2.386469e-01 1.193234e-01
[60,] 0.8931926 2.136147e-01 1.068074e-01
[61,] 0.8706838 2.586325e-01 1.293162e-01
[62,] 0.8558360 2.883281e-01 1.441640e-01
[63,] 0.8271988 3.456024e-01 1.728012e-01
[64,] 0.7986242 4.027515e-01 2.013758e-01
[65,] 0.7637089 4.725822e-01 2.362911e-01
[66,] 0.7269990 5.460020e-01 2.730010e-01
[67,] 0.7201638 5.596725e-01 2.798362e-01
[68,] 0.7791488 4.417025e-01 2.208512e-01
[69,] 0.7638389 4.723222e-01 2.361611e-01
[70,] 0.7315626 5.368748e-01 2.684374e-01
[71,] 0.7063631 5.872737e-01 2.936369e-01
[72,] 0.6679499 6.641001e-01 3.320501e-01
[73,] 0.6242710 7.514581e-01 3.757290e-01
[74,] 0.8182457 3.635086e-01 1.817543e-01
[75,] 0.7882303 4.235393e-01 2.117697e-01
[76,] 0.7716811 4.566378e-01 2.283189e-01
[77,] 0.7349040 5.301921e-01 2.650960e-01
[78,] 0.7022743 5.954513e-01 2.977257e-01
[79,] 0.7148520 5.702961e-01 2.851480e-01
[80,] 0.7724530 4.550940e-01 2.275470e-01
[81,] 0.7459253 5.081495e-01 2.540747e-01
[82,] 0.8990489 2.019022e-01 1.009511e-01
[83,] 0.8919884 2.160231e-01 1.080116e-01
[84,] 0.8929038 2.141924e-01 1.070962e-01
[85,] 0.8697723 2.604554e-01 1.302277e-01
[86,] 0.8680386 2.639229e-01 1.319614e-01
[87,] 0.8567298 2.865405e-01 1.432702e-01
[88,] 0.8272006 3.455989e-01 1.727994e-01
[89,] 0.8041991 3.916019e-01 1.958009e-01
[90,] 0.7806523 4.386954e-01 2.193477e-01
[91,] 0.7559087 4.881825e-01 2.440913e-01
[92,] 0.7198255 5.603490e-01 2.801745e-01
[93,] 0.6790508 6.418984e-01 3.209492e-01
[94,] 0.6357588 7.284824e-01 3.642412e-01
[95,] 0.6552095 6.895809e-01 3.447905e-01
[96,] 0.6520161 6.959678e-01 3.479839e-01
[97,] 0.6072391 7.855219e-01 3.927609e-01
[98,] 0.8890269 2.219462e-01 1.109731e-01
[99,] 0.8640122 2.719756e-01 1.359878e-01
[100,] 0.8386670 3.226660e-01 1.613330e-01
[101,] 0.8431512 3.136975e-01 1.568488e-01
[102,] 0.8478011 3.043978e-01 1.521989e-01
[103,] 0.8407890 3.184221e-01 1.592110e-01
[104,] 0.8084825 3.830349e-01 1.915175e-01
[105,] 0.7688473 4.623054e-01 2.311527e-01
[106,] 0.7747433 4.505133e-01 2.252567e-01
[107,] 0.7304752 5.390495e-01 2.695248e-01
[108,] 0.6951834 6.096332e-01 3.048166e-01
[109,] 0.7343346 5.313307e-01 2.656654e-01
[110,] 0.6851869 6.296263e-01 3.148131e-01
[111,] 0.7777150 4.445700e-01 2.222850e-01
[112,] 0.7451931 5.096138e-01 2.548069e-01
[113,] 0.7087961 5.824077e-01 2.912039e-01
[114,] 0.6557321 6.885358e-01 3.442679e-01
[115,] 0.6009194 7.981612e-01 3.990806e-01
[116,] 0.5699118 8.601764e-01 4.300882e-01
[117,] 0.5149782 9.700436e-01 4.850218e-01
[118,] 0.4525120 9.050240e-01 5.474880e-01
[119,] 0.4052530 8.105060e-01 5.947470e-01
[120,] 0.4244233 8.488466e-01 5.755767e-01
[121,] 0.5000316 9.999368e-01 4.999684e-01
[122,] 0.4535986 9.071972e-01 5.464014e-01
[123,] 0.4067149 8.134298e-01 5.932851e-01
[124,] 0.3405095 6.810189e-01 6.594905e-01
[125,] 0.2980692 5.961384e-01 7.019308e-01
[126,] 0.9239086 1.521827e-01 7.609136e-02
[127,] 0.8970379 2.059242e-01 1.029621e-01
[128,] 0.8969798 2.060403e-01 1.030202e-01
[129,] 0.8571559 2.856882e-01 1.428441e-01
[130,] 0.8932356 2.135288e-01 1.067644e-01
[131,] 0.8650178 2.699644e-01 1.349822e-01
[132,] 0.8079570 3.840860e-01 1.920430e-01
[133,] 0.9984381 3.123840e-03 1.561920e-03
[134,] 0.9998443 3.114196e-04 1.557098e-04
[135,] 0.9999961 7.754088e-06 3.877044e-06
[136,] 0.9999762 4.764301e-05 2.382151e-05
[137,] 0.9999668 6.646585e-05 3.323292e-05
[138,] 0.9996784 6.432825e-04 3.216412e-04
[139,] 0.9974521 5.095843e-03 2.547922e-03
> postscript(file="/var/fisher/rcomp/tmp/1gpuq1353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/20m9i1353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/3gah91353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/49q081353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/5z98b1353273571.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 = 156
Frequency = 1
1 2 3 4 5 6
3239.4378 -53215.8228 -9525.6316 -57881.1117 6065.6980 -51768.2484
7 8 9 10 11 12
149541.1897 -22860.9904 -16568.0738 27157.0726 7274.8500 -45571.1294
13 14 15 16 17 18
-11771.5434 41984.9935 7672.9971 8746.7791 18426.9938 15570.8853
19 20 21 22 23 24
-38331.6130 -4598.2129 -12184.8141 146964.4104 20793.2239 -51896.2493
25 26 27 28 29 30
-58777.2721 -41606.5234 239.2370 15258.9167 6378.6478 44564.2504
31 32 33 34 35 36
-15839.6108 -35386.1156 17075.6014 -17714.4661 42224.7462 77320.4514
37 38 39 40 41 42
97801.6139 -2786.5631 16490.5833 -5956.1448 75502.9499 -23770.8192
43 44 45 46 47 48
-13706.6440 -15543.3287 -39243.9558 155577.4245 -28383.5533 -33443.0302
49 50 51 52 53 54
31839.3504 -33455.6373 -17030.0605 -10419.3264 -30357.6496 -1197.5301
55 56 57 58 59 60
-144.1310 39642.4118 -3327.2607 -81410.1673 -24216.5766 39047.3370
61 62 63 64 65 66
45125.9253 -32699.1478 -1530.5762 9996.0863 -1399.8677 11212.8116
67 68 69 70 71 72
-65697.1464 -57673.7986 -8985.4207 -28855.3405 -2044.7195 -15059.7323
73 74 75 76 77 78
2164.2296 -8580.5494 -42636.7457 73486.0266 34264.0323 6051.1495
79 80 81 82 83 84
-27616.8412 -13008.0800 4663.0912 110692.5388 12802.6053 -33739.8741
85 86 87 88 89 90
5910.8100 19422.1161 -51164.6820 65360.1599 21521.1183 -111888.5028
91 92 93 94 95 96
34538.8443 -43553.1869 7846.2612 41779.2579 33207.7790 -3067.3281
97 98 99 100 101 102
-19925.4689 -18541.8749 -31661.1010 15339.0459 -15470.8079 1157.2593
103 104 105 106 107 108
-62772.1579 -41629.1906 12173.2279 -117381.7976 15507.2869 24518.3600
109 110 111 112 113 114
-43165.4211 -50959.4898 46480.6102 12922.2876 6281.8540 -42673.0119
115 116 117 118 119 120
419.8074 -27802.4606 65660.1994 5315.5733 71597.2840 -24949.4732
121 122 123 124 125 126
27984.8379 -2902.6369 -20124.6851 -33770.9168 -15047.2739 7312.4077
127 128 129 130 131 132
31131.4728 -49156.7974 77911.5231 21472.0736 26412.5431 7239.0943
133 134 135 136 137 138
-27510.1170 -84013.2120 54059.9401 -5726.3840 54290.7998 -31495.4738
139 140 141 142 143 144
4541.3852 -24400.9148 -26270.8111 96933.6356 -48326.9889 71494.1138
145 146 147 148 149 150
5297.6197 -79925.9138 -18280.6048 -36378.9587 386.6088 310.0419
151 152 153 154 155 156
22916.3493 -1817.6270 10889.8655 4887.7671 -10457.2084 16338.3553
> postscript(file="/var/fisher/rcomp/tmp/6y26i1353273571.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 = 156
Frequency = 1
lag(myerror, k = 1) myerror
0 3239.4378 NA
1 -53215.8228 3239.4378
2 -9525.6316 -53215.8228
3 -57881.1117 -9525.6316
4 6065.6980 -57881.1117
5 -51768.2484 6065.6980
6 149541.1897 -51768.2484
7 -22860.9904 149541.1897
8 -16568.0738 -22860.9904
9 27157.0726 -16568.0738
10 7274.8500 27157.0726
11 -45571.1294 7274.8500
12 -11771.5434 -45571.1294
13 41984.9935 -11771.5434
14 7672.9971 41984.9935
15 8746.7791 7672.9971
16 18426.9938 8746.7791
17 15570.8853 18426.9938
18 -38331.6130 15570.8853
19 -4598.2129 -38331.6130
20 -12184.8141 -4598.2129
21 146964.4104 -12184.8141
22 20793.2239 146964.4104
23 -51896.2493 20793.2239
24 -58777.2721 -51896.2493
25 -41606.5234 -58777.2721
26 239.2370 -41606.5234
27 15258.9167 239.2370
28 6378.6478 15258.9167
29 44564.2504 6378.6478
30 -15839.6108 44564.2504
31 -35386.1156 -15839.6108
32 17075.6014 -35386.1156
33 -17714.4661 17075.6014
34 42224.7462 -17714.4661
35 77320.4514 42224.7462
36 97801.6139 77320.4514
37 -2786.5631 97801.6139
38 16490.5833 -2786.5631
39 -5956.1448 16490.5833
40 75502.9499 -5956.1448
41 -23770.8192 75502.9499
42 -13706.6440 -23770.8192
43 -15543.3287 -13706.6440
44 -39243.9558 -15543.3287
45 155577.4245 -39243.9558
46 -28383.5533 155577.4245
47 -33443.0302 -28383.5533
48 31839.3504 -33443.0302
49 -33455.6373 31839.3504
50 -17030.0605 -33455.6373
51 -10419.3264 -17030.0605
52 -30357.6496 -10419.3264
53 -1197.5301 -30357.6496
54 -144.1310 -1197.5301
55 39642.4118 -144.1310
56 -3327.2607 39642.4118
57 -81410.1673 -3327.2607
58 -24216.5766 -81410.1673
59 39047.3370 -24216.5766
60 45125.9253 39047.3370
61 -32699.1478 45125.9253
62 -1530.5762 -32699.1478
63 9996.0863 -1530.5762
64 -1399.8677 9996.0863
65 11212.8116 -1399.8677
66 -65697.1464 11212.8116
67 -57673.7986 -65697.1464
68 -8985.4207 -57673.7986
69 -28855.3405 -8985.4207
70 -2044.7195 -28855.3405
71 -15059.7323 -2044.7195
72 2164.2296 -15059.7323
73 -8580.5494 2164.2296
74 -42636.7457 -8580.5494
75 73486.0266 -42636.7457
76 34264.0323 73486.0266
77 6051.1495 34264.0323
78 -27616.8412 6051.1495
79 -13008.0800 -27616.8412
80 4663.0912 -13008.0800
81 110692.5388 4663.0912
82 12802.6053 110692.5388
83 -33739.8741 12802.6053
84 5910.8100 -33739.8741
85 19422.1161 5910.8100
86 -51164.6820 19422.1161
87 65360.1599 -51164.6820
88 21521.1183 65360.1599
89 -111888.5028 21521.1183
90 34538.8443 -111888.5028
91 -43553.1869 34538.8443
92 7846.2612 -43553.1869
93 41779.2579 7846.2612
94 33207.7790 41779.2579
95 -3067.3281 33207.7790
96 -19925.4689 -3067.3281
97 -18541.8749 -19925.4689
98 -31661.1010 -18541.8749
99 15339.0459 -31661.1010
100 -15470.8079 15339.0459
101 1157.2593 -15470.8079
102 -62772.1579 1157.2593
103 -41629.1906 -62772.1579
104 12173.2279 -41629.1906
105 -117381.7976 12173.2279
106 15507.2869 -117381.7976
107 24518.3600 15507.2869
108 -43165.4211 24518.3600
109 -50959.4898 -43165.4211
110 46480.6102 -50959.4898
111 12922.2876 46480.6102
112 6281.8540 12922.2876
113 -42673.0119 6281.8540
114 419.8074 -42673.0119
115 -27802.4606 419.8074
116 65660.1994 -27802.4606
117 5315.5733 65660.1994
118 71597.2840 5315.5733
119 -24949.4732 71597.2840
120 27984.8379 -24949.4732
121 -2902.6369 27984.8379
122 -20124.6851 -2902.6369
123 -33770.9168 -20124.6851
124 -15047.2739 -33770.9168
125 7312.4077 -15047.2739
126 31131.4728 7312.4077
127 -49156.7974 31131.4728
128 77911.5231 -49156.7974
129 21472.0736 77911.5231
130 26412.5431 21472.0736
131 7239.0943 26412.5431
132 -27510.1170 7239.0943
133 -84013.2120 -27510.1170
134 54059.9401 -84013.2120
135 -5726.3840 54059.9401
136 54290.7998 -5726.3840
137 -31495.4738 54290.7998
138 4541.3852 -31495.4738
139 -24400.9148 4541.3852
140 -26270.8111 -24400.9148
141 96933.6356 -26270.8111
142 -48326.9889 96933.6356
143 71494.1138 -48326.9889
144 5297.6197 71494.1138
145 -79925.9138 5297.6197
146 -18280.6048 -79925.9138
147 -36378.9587 -18280.6048
148 386.6088 -36378.9587
149 310.0419 386.6088
150 22916.3493 310.0419
151 -1817.6270 22916.3493
152 10889.8655 -1817.6270
153 4887.7671 10889.8655
154 -10457.2084 4887.7671
155 16338.3553 -10457.2084
156 NA 16338.3553
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -53215.8228 3239.4378
[2,] -9525.6316 -53215.8228
[3,] -57881.1117 -9525.6316
[4,] 6065.6980 -57881.1117
[5,] -51768.2484 6065.6980
[6,] 149541.1897 -51768.2484
[7,] -22860.9904 149541.1897
[8,] -16568.0738 -22860.9904
[9,] 27157.0726 -16568.0738
[10,] 7274.8500 27157.0726
[11,] -45571.1294 7274.8500
[12,] -11771.5434 -45571.1294
[13,] 41984.9935 -11771.5434
[14,] 7672.9971 41984.9935
[15,] 8746.7791 7672.9971
[16,] 18426.9938 8746.7791
[17,] 15570.8853 18426.9938
[18,] -38331.6130 15570.8853
[19,] -4598.2129 -38331.6130
[20,] -12184.8141 -4598.2129
[21,] 146964.4104 -12184.8141
[22,] 20793.2239 146964.4104
[23,] -51896.2493 20793.2239
[24,] -58777.2721 -51896.2493
[25,] -41606.5234 -58777.2721
[26,] 239.2370 -41606.5234
[27,] 15258.9167 239.2370
[28,] 6378.6478 15258.9167
[29,] 44564.2504 6378.6478
[30,] -15839.6108 44564.2504
[31,] -35386.1156 -15839.6108
[32,] 17075.6014 -35386.1156
[33,] -17714.4661 17075.6014
[34,] 42224.7462 -17714.4661
[35,] 77320.4514 42224.7462
[36,] 97801.6139 77320.4514
[37,] -2786.5631 97801.6139
[38,] 16490.5833 -2786.5631
[39,] -5956.1448 16490.5833
[40,] 75502.9499 -5956.1448
[41,] -23770.8192 75502.9499
[42,] -13706.6440 -23770.8192
[43,] -15543.3287 -13706.6440
[44,] -39243.9558 -15543.3287
[45,] 155577.4245 -39243.9558
[46,] -28383.5533 155577.4245
[47,] -33443.0302 -28383.5533
[48,] 31839.3504 -33443.0302
[49,] -33455.6373 31839.3504
[50,] -17030.0605 -33455.6373
[51,] -10419.3264 -17030.0605
[52,] -30357.6496 -10419.3264
[53,] -1197.5301 -30357.6496
[54,] -144.1310 -1197.5301
[55,] 39642.4118 -144.1310
[56,] -3327.2607 39642.4118
[57,] -81410.1673 -3327.2607
[58,] -24216.5766 -81410.1673
[59,] 39047.3370 -24216.5766
[60,] 45125.9253 39047.3370
[61,] -32699.1478 45125.9253
[62,] -1530.5762 -32699.1478
[63,] 9996.0863 -1530.5762
[64,] -1399.8677 9996.0863
[65,] 11212.8116 -1399.8677
[66,] -65697.1464 11212.8116
[67,] -57673.7986 -65697.1464
[68,] -8985.4207 -57673.7986
[69,] -28855.3405 -8985.4207
[70,] -2044.7195 -28855.3405
[71,] -15059.7323 -2044.7195
[72,] 2164.2296 -15059.7323
[73,] -8580.5494 2164.2296
[74,] -42636.7457 -8580.5494
[75,] 73486.0266 -42636.7457
[76,] 34264.0323 73486.0266
[77,] 6051.1495 34264.0323
[78,] -27616.8412 6051.1495
[79,] -13008.0800 -27616.8412
[80,] 4663.0912 -13008.0800
[81,] 110692.5388 4663.0912
[82,] 12802.6053 110692.5388
[83,] -33739.8741 12802.6053
[84,] 5910.8100 -33739.8741
[85,] 19422.1161 5910.8100
[86,] -51164.6820 19422.1161
[87,] 65360.1599 -51164.6820
[88,] 21521.1183 65360.1599
[89,] -111888.5028 21521.1183
[90,] 34538.8443 -111888.5028
[91,] -43553.1869 34538.8443
[92,] 7846.2612 -43553.1869
[93,] 41779.2579 7846.2612
[94,] 33207.7790 41779.2579
[95,] -3067.3281 33207.7790
[96,] -19925.4689 -3067.3281
[97,] -18541.8749 -19925.4689
[98,] -31661.1010 -18541.8749
[99,] 15339.0459 -31661.1010
[100,] -15470.8079 15339.0459
[101,] 1157.2593 -15470.8079
[102,] -62772.1579 1157.2593
[103,] -41629.1906 -62772.1579
[104,] 12173.2279 -41629.1906
[105,] -117381.7976 12173.2279
[106,] 15507.2869 -117381.7976
[107,] 24518.3600 15507.2869
[108,] -43165.4211 24518.3600
[109,] -50959.4898 -43165.4211
[110,] 46480.6102 -50959.4898
[111,] 12922.2876 46480.6102
[112,] 6281.8540 12922.2876
[113,] -42673.0119 6281.8540
[114,] 419.8074 -42673.0119
[115,] -27802.4606 419.8074
[116,] 65660.1994 -27802.4606
[117,] 5315.5733 65660.1994
[118,] 71597.2840 5315.5733
[119,] -24949.4732 71597.2840
[120,] 27984.8379 -24949.4732
[121,] -2902.6369 27984.8379
[122,] -20124.6851 -2902.6369
[123,] -33770.9168 -20124.6851
[124,] -15047.2739 -33770.9168
[125,] 7312.4077 -15047.2739
[126,] 31131.4728 7312.4077
[127,] -49156.7974 31131.4728
[128,] 77911.5231 -49156.7974
[129,] 21472.0736 77911.5231
[130,] 26412.5431 21472.0736
[131,] 7239.0943 26412.5431
[132,] -27510.1170 7239.0943
[133,] -84013.2120 -27510.1170
[134,] 54059.9401 -84013.2120
[135,] -5726.3840 54059.9401
[136,] 54290.7998 -5726.3840
[137,] -31495.4738 54290.7998
[138,] 4541.3852 -31495.4738
[139,] -24400.9148 4541.3852
[140,] -26270.8111 -24400.9148
[141,] 96933.6356 -26270.8111
[142,] -48326.9889 96933.6356
[143,] 71494.1138 -48326.9889
[144,] 5297.6197 71494.1138
[145,] -79925.9138 5297.6197
[146,] -18280.6048 -79925.9138
[147,] -36378.9587 -18280.6048
[148,] 386.6088 -36378.9587
[149,] 310.0419 386.6088
[150,] 22916.3493 310.0419
[151,] -1817.6270 22916.3493
[152,] 10889.8655 -1817.6270
[153,] 4887.7671 10889.8655
[154,] -10457.2084 4887.7671
[155,] 16338.3553 -10457.2084
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -53215.8228 3239.4378
2 -9525.6316 -53215.8228
3 -57881.1117 -9525.6316
4 6065.6980 -57881.1117
5 -51768.2484 6065.6980
6 149541.1897 -51768.2484
7 -22860.9904 149541.1897
8 -16568.0738 -22860.9904
9 27157.0726 -16568.0738
10 7274.8500 27157.0726
11 -45571.1294 7274.8500
12 -11771.5434 -45571.1294
13 41984.9935 -11771.5434
14 7672.9971 41984.9935
15 8746.7791 7672.9971
16 18426.9938 8746.7791
17 15570.8853 18426.9938
18 -38331.6130 15570.8853
19 -4598.2129 -38331.6130
20 -12184.8141 -4598.2129
21 146964.4104 -12184.8141
22 20793.2239 146964.4104
23 -51896.2493 20793.2239
24 -58777.2721 -51896.2493
25 -41606.5234 -58777.2721
26 239.2370 -41606.5234
27 15258.9167 239.2370
28 6378.6478 15258.9167
29 44564.2504 6378.6478
30 -15839.6108 44564.2504
31 -35386.1156 -15839.6108
32 17075.6014 -35386.1156
33 -17714.4661 17075.6014
34 42224.7462 -17714.4661
35 77320.4514 42224.7462
36 97801.6139 77320.4514
37 -2786.5631 97801.6139
38 16490.5833 -2786.5631
39 -5956.1448 16490.5833
40 75502.9499 -5956.1448
41 -23770.8192 75502.9499
42 -13706.6440 -23770.8192
43 -15543.3287 -13706.6440
44 -39243.9558 -15543.3287
45 155577.4245 -39243.9558
46 -28383.5533 155577.4245
47 -33443.0302 -28383.5533
48 31839.3504 -33443.0302
49 -33455.6373 31839.3504
50 -17030.0605 -33455.6373
51 -10419.3264 -17030.0605
52 -30357.6496 -10419.3264
53 -1197.5301 -30357.6496
54 -144.1310 -1197.5301
55 39642.4118 -144.1310
56 -3327.2607 39642.4118
57 -81410.1673 -3327.2607
58 -24216.5766 -81410.1673
59 39047.3370 -24216.5766
60 45125.9253 39047.3370
61 -32699.1478 45125.9253
62 -1530.5762 -32699.1478
63 9996.0863 -1530.5762
64 -1399.8677 9996.0863
65 11212.8116 -1399.8677
66 -65697.1464 11212.8116
67 -57673.7986 -65697.1464
68 -8985.4207 -57673.7986
69 -28855.3405 -8985.4207
70 -2044.7195 -28855.3405
71 -15059.7323 -2044.7195
72 2164.2296 -15059.7323
73 -8580.5494 2164.2296
74 -42636.7457 -8580.5494
75 73486.0266 -42636.7457
76 34264.0323 73486.0266
77 6051.1495 34264.0323
78 -27616.8412 6051.1495
79 -13008.0800 -27616.8412
80 4663.0912 -13008.0800
81 110692.5388 4663.0912
82 12802.6053 110692.5388
83 -33739.8741 12802.6053
84 5910.8100 -33739.8741
85 19422.1161 5910.8100
86 -51164.6820 19422.1161
87 65360.1599 -51164.6820
88 21521.1183 65360.1599
89 -111888.5028 21521.1183
90 34538.8443 -111888.5028
91 -43553.1869 34538.8443
92 7846.2612 -43553.1869
93 41779.2579 7846.2612
94 33207.7790 41779.2579
95 -3067.3281 33207.7790
96 -19925.4689 -3067.3281
97 -18541.8749 -19925.4689
98 -31661.1010 -18541.8749
99 15339.0459 -31661.1010
100 -15470.8079 15339.0459
101 1157.2593 -15470.8079
102 -62772.1579 1157.2593
103 -41629.1906 -62772.1579
104 12173.2279 -41629.1906
105 -117381.7976 12173.2279
106 15507.2869 -117381.7976
107 24518.3600 15507.2869
108 -43165.4211 24518.3600
109 -50959.4898 -43165.4211
110 46480.6102 -50959.4898
111 12922.2876 46480.6102
112 6281.8540 12922.2876
113 -42673.0119 6281.8540
114 419.8074 -42673.0119
115 -27802.4606 419.8074
116 65660.1994 -27802.4606
117 5315.5733 65660.1994
118 71597.2840 5315.5733
119 -24949.4732 71597.2840
120 27984.8379 -24949.4732
121 -2902.6369 27984.8379
122 -20124.6851 -2902.6369
123 -33770.9168 -20124.6851
124 -15047.2739 -33770.9168
125 7312.4077 -15047.2739
126 31131.4728 7312.4077
127 -49156.7974 31131.4728
128 77911.5231 -49156.7974
129 21472.0736 77911.5231
130 26412.5431 21472.0736
131 7239.0943 26412.5431
132 -27510.1170 7239.0943
133 -84013.2120 -27510.1170
134 54059.9401 -84013.2120
135 -5726.3840 54059.9401
136 54290.7998 -5726.3840
137 -31495.4738 54290.7998
138 4541.3852 -31495.4738
139 -24400.9148 4541.3852
140 -26270.8111 -24400.9148
141 96933.6356 -26270.8111
142 -48326.9889 96933.6356
143 71494.1138 -48326.9889
144 5297.6197 71494.1138
145 -79925.9138 5297.6197
146 -18280.6048 -79925.9138
147 -36378.9587 -18280.6048
148 386.6088 -36378.9587
149 310.0419 386.6088
150 22916.3493 310.0419
151 -1817.6270 22916.3493
152 10889.8655 -1817.6270
153 4887.7671 10889.8655
154 -10457.2084 4887.7671
155 16338.3553 -10457.2084
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/7edym1353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/80e481353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/9q81x1353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/fisher/rcomp/tmp/100iah1353273571.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, 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/fisher/rcomp/tmp/11rwed1353273571.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/fisher/rcomp/tmp/1225o01353273571.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/fisher/rcomp/tmp/13ahot1353273571.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/fisher/rcomp/tmp/14muiq1353273571.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/fisher/rcomp/tmp/15c8gb1353273571.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/fisher/rcomp/tmp/164qmj1353273571.tab")
+ }
>
> try(system("convert tmp/1gpuq1353273571.ps tmp/1gpuq1353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/20m9i1353273571.ps tmp/20m9i1353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/3gah91353273571.ps tmp/3gah91353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/49q081353273571.ps tmp/49q081353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/5z98b1353273571.ps tmp/5z98b1353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/6y26i1353273571.ps tmp/6y26i1353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/7edym1353273571.ps tmp/7edym1353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/80e481353273571.ps tmp/80e481353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/9q81x1353273571.ps tmp/9q81x1353273571.png",intern=TRUE))
character(0)
> try(system("convert tmp/100iah1353273571.ps tmp/100iah1353273571.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.714 1.259 8.984