R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(812
+ ,58085
+ ,13
+ ,20
+ ,10345
+ ,10823
+ ,13
+ ,537
+ ,65968
+ ,26
+ ,28
+ ,17607
+ ,44480
+ ,27
+ ,186
+ ,7176
+ ,0
+ ,0
+ ,1423
+ ,1929
+ ,0
+ ,1405
+ ,78306
+ ,37
+ ,40
+ ,20050
+ ,30032
+ ,37
+ ,1859
+ ,123860
+ ,45
+ ,48
+ ,21212
+ ,27669
+ ,39
+ ,3347
+ ,226694
+ ,80
+ ,40
+ ,93979
+ ,114967
+ ,99
+ ,735
+ ,58032
+ ,21
+ ,35
+ ,15524
+ ,29951
+ ,21
+ ,609
+ ,72513
+ ,36
+ ,40
+ ,16182
+ ,38824
+ ,33
+ ,1100
+ ,65784
+ ,35
+ ,40
+ ,19238
+ ,26517
+ ,36
+ ,1743
+ ,164794
+ ,36
+ ,52
+ ,28909
+ ,63570
+ ,44
+ ,833
+ ,66288
+ ,35
+ ,24
+ ,22357
+ ,27131
+ ,33
+ ,1143
+ ,85319
+ ,46
+ ,44
+ ,25560
+ ,41061
+ ,47
+ ,888
+ ,45400
+ ,20
+ ,24
+ ,9954
+ ,18810
+ ,19
+ ,1460
+ ,78191
+ ,24
+ ,32
+ ,18490
+ ,27582
+ ,41
+ ,638
+ ,61175
+ ,18
+ ,28
+ ,17777
+ ,37026
+ ,22
+ ,854
+ ,72377
+ ,15
+ ,40
+ ,25268
+ ,24252
+ ,17
+ ,724
+ ,49850
+ ,48
+ ,40
+ ,37525
+ ,32579
+ ,46
+ ,323
+ ,15580
+ ,0
+ ,20
+ ,6023
+ ,0
+ ,0
+ ,1467
+ ,65240
+ ,37
+ ,67
+ ,25042
+ ,29666
+ ,31
+ ,412
+ ,13397
+ ,8
+ ,16
+ ,35713
+ ,7533
+ ,20
+ ,580
+ ,35385
+ ,10
+ ,44
+ ,7039
+ ,11892
+ ,10
+ ,1177
+ ,90047
+ ,51
+ ,36
+ ,40841
+ ,51557
+ ,55
+ ,595
+ ,47802
+ ,4
+ ,40
+ ,9214
+ ,5737
+ ,6
+ ,1103
+ ,61598
+ ,24
+ ,29
+ ,17446
+ ,11203
+ ,17
+ ,1037
+ ,73756
+ ,38
+ ,32
+ ,10295
+ ,28714
+ ,33
+ ,611
+ ,65152
+ ,19
+ ,28
+ ,13206
+ ,24268
+ ,33
+ ,1111
+ ,78226
+ ,20
+ ,41
+ ,26093
+ ,30749
+ ,32
+ ,542
+ ,66026
+ ,31
+ ,40
+ ,20744
+ ,46643
+ ,37
+ ,1341
+ ,170050
+ ,36
+ ,44
+ ,68013
+ ,64530
+ ,44
+ ,1169
+ ,91493
+ ,19
+ ,28
+ ,12840
+ ,35346
+ ,22
+ ,752
+ ,56374
+ ,20
+ ,56
+ ,12672
+ ,5766
+ ,15
+ ,889
+ ,85227
+ ,34
+ ,26
+ ,10872
+ ,29217
+ ,18
+ ,1009
+ ,50281
+ ,26
+ ,12
+ ,21325
+ ,15912
+ ,25
+ ,577
+ ,29008
+ ,0
+ ,32
+ ,24542
+ ,3728
+ ,7
+ ,1015
+ ,84775
+ ,29
+ ,36
+ ,16401
+ ,37494
+ ,35
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,562
+ ,55273
+ ,8
+ ,32
+ ,12821
+ ,13214
+ ,14
+ ,1115
+ ,62498
+ ,35
+ ,31
+ ,14662
+ ,19576
+ ,31
+ ,1015
+ ,35361
+ ,3
+ ,48
+ ,22190
+ ,13632
+ ,9
+ ,976
+ ,89502
+ ,41
+ ,72
+ ,37929
+ ,67378
+ ,59
+ ,940
+ ,73972
+ ,42
+ ,24
+ ,18009
+ ,29387
+ ,62
+ ,680
+ ,53655
+ ,10
+ ,56
+ ,11076
+ ,15936
+ ,12
+ ,404
+ ,40064
+ ,10
+ ,28
+ ,24981
+ ,18156
+ ,23
+ ,938
+ ,58480
+ ,26
+ ,36
+ ,30691
+ ,23750
+ ,31
+ ,580
+ ,48473
+ ,27
+ ,44
+ ,29164
+ ,15559
+ ,57
+ ,396
+ ,30737
+ ,0
+ ,32
+ ,13985
+ ,21713
+ ,23
+ ,256
+ ,27044
+ ,13
+ ,32
+ ,7588
+ ,12023
+ ,14
+ ,932
+ ,92011
+ ,30
+ ,32
+ ,20023
+ ,23588
+ ,31
+ ,734
+ ,56303
+ ,11
+ ,32
+ ,25524
+ ,28661
+ ,17
+ ,998
+ ,52792
+ ,24
+ ,36
+ ,14717
+ ,16874
+ ,24
+ ,425
+ ,33820
+ ,10
+ ,42
+ ,6832
+ ,11804
+ ,11
+ ,631
+ ,44121
+ ,14
+ ,28
+ ,9624
+ ,12949
+ ,16
+ ,903
+ ,103438
+ ,23
+ ,36
+ ,24300
+ ,38340
+ ,32
+ ,804
+ ,82720
+ ,27
+ ,32
+ ,21790
+ ,36573
+ ,36
+ ,915
+ ,89612
+ ,40
+ ,48
+ ,16493
+ ,40068
+ ,37
+ ,753
+ ,60722
+ ,22
+ ,20
+ ,9269
+ ,25561
+ ,25
+ ,674
+ ,64096
+ ,26
+ ,32
+ ,20105
+ ,31287
+ ,30
+ ,382
+ ,25090
+ ,8
+ ,32
+ ,11216
+ ,8383
+ ,10
+ ,550
+ ,57096
+ ,27
+ ,52
+ ,15569
+ ,29178
+ ,16
+ ,509
+ ,19608
+ ,0
+ ,40
+ ,21799
+ ,1237
+ ,3
+ ,423
+ ,28665
+ ,0
+ ,56
+ ,3772
+ ,10241
+ ,0
+ ,696
+ ,28400
+ ,16
+ ,24
+ ,6057
+ ,8219
+ ,17
+ ,460
+ ,27697
+ ,7
+ ,22
+ ,20828
+ ,9348
+ ,9
+ ,475
+ ,42406
+ ,18
+ ,36
+ ,9976
+ ,25242
+ ,22
+ ,373
+ ,47859
+ ,7
+ ,26
+ ,14055
+ ,24267
+ ,5
+ ,754
+ ,54987
+ ,24
+ ,44
+ ,17455
+ ,25902
+ ,23
+ ,936
+ ,58198
+ ,14
+ ,44
+ ,39553
+ ,51849
+ ,16
+ ,1501
+ ,61854
+ ,39
+ ,36
+ ,14818
+ ,29065
+ ,53
+ ,499
+ ,35185
+ ,16
+ ,36
+ ,17065
+ ,22417
+ ,23
+ ,80
+ ,12207
+ ,0
+ ,16
+ ,1536
+ ,1714
+ ,0
+ ,1517
+ ,108584
+ ,39
+ ,32
+ ,11938
+ ,29085
+ ,51
+ ,552
+ ,43273
+ ,17
+ ,10
+ ,24589
+ ,22118
+ ,25
+ ,517
+ ,39695
+ ,24
+ ,40
+ ,21332
+ ,14803
+ ,51
+ ,917
+ ,40699
+ ,27
+ ,25
+ ,13229
+ ,13243
+ ,46
+ ,691
+ ,38999
+ ,22
+ ,48
+ ,11331
+ ,13985
+ ,16
+ ,459
+ ,17667
+ ,0
+ ,36
+ ,853
+ ,657
+ ,0
+ ,683
+ ,59058
+ ,26
+ ,32
+ ,19821
+ ,26171
+ ,25
+ ,887
+ ,54106
+ ,19
+ ,24
+ ,34666
+ ,34867
+ ,34
+ ,410
+ ,23795
+ ,12
+ ,35
+ ,15051
+ ,12297
+ ,14
+ ,590
+ ,33465
+ ,23
+ ,17
+ ,27969
+ ,17487
+ ,32
+ ,439
+ ,36937
+ ,32
+ ,36
+ ,17897
+ ,13461
+ ,24
+ ,621
+ ,77075
+ ,19
+ ,40
+ ,6031
+ ,15192
+ ,16
+ ,537
+ ,32346
+ ,17
+ ,40
+ ,7153
+ ,16584
+ ,19
+ ,699
+ ,48592
+ ,25
+ ,36
+ ,13365
+ ,22892
+ ,27
+ ,477
+ ,26642
+ ,14
+ ,32
+ ,11197
+ ,7081
+ ,24
+ ,813
+ ,51086
+ ,11
+ ,40
+ ,25291
+ ,21623
+ ,12
+ ,1171
+ ,95985
+ ,20
+ ,60
+ ,28994
+ ,41992
+ ,43
+ ,400
+ ,24612
+ ,14
+ ,44
+ ,10461
+ ,11301
+ ,13
+ ,352
+ ,30113
+ ,14
+ ,28
+ ,16415
+ ,15230
+ ,19
+ ,639
+ ,53398
+ ,22
+ ,40
+ ,8495
+ ,14667
+ ,24
+ ,773
+ ,54198
+ ,25
+ ,28
+ ,18318
+ ,23795
+ ,27
+ ,1050
+ ,65255
+ ,35
+ ,36
+ ,25143
+ ,28055
+ ,26
+ ,489
+ ,59960
+ ,9
+ ,36
+ ,20471
+ ,29162
+ ,14
+ ,573
+ ,48096
+ ,16
+ ,20
+ ,14561
+ ,14962
+ ,26
+ ,334
+ ,17371
+ ,12
+ ,22
+ ,16902
+ ,8749
+ ,15
+ ,1229
+ ,115424
+ ,20
+ ,52
+ ,12994
+ ,37310
+ ,30
+ ,701
+ ,69334
+ ,33
+ ,48
+ ,29697
+ ,31551
+ ,33
+ ,222
+ ,19349
+ ,13
+ ,2
+ ,3895
+ ,9604
+ ,14
+ ,810
+ ,63594
+ ,11
+ ,44
+ ,9807
+ ,13937
+ ,11
+ ,739
+ ,49547
+ ,11
+ ,22
+ ,10711
+ ,16850
+ ,12
+ ,231
+ ,13066
+ ,8
+ ,3
+ ,2325
+ ,3439
+ ,8
+ ,425
+ ,25497
+ ,22
+ ,20
+ ,19000
+ ,16638
+ ,22
+ ,578
+ ,55049
+ ,13
+ ,32
+ ,22418
+ ,12847
+ ,12
+ ,305
+ ,24912
+ ,6
+ ,28
+ ,7872
+ ,13462
+ ,6
+ ,323
+ ,22431
+ ,12
+ ,24
+ ,5650
+ ,8086
+ ,10
+ ,463
+ ,24716
+ ,2
+ ,45
+ ,3979
+ ,2255
+ ,1
+ ,519
+ ,52452
+ ,33
+ ,40
+ ,14956
+ ,25918
+ ,31
+ ,294
+ ,17850
+ ,5
+ ,0
+ ,3738
+ ,3255
+ ,5
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,565
+ ,35269
+ ,34
+ ,28
+ ,10586
+ ,16138
+ ,35
+ ,462
+ ,27554
+ ,12
+ ,28
+ ,18122
+ ,5941
+ ,15
+ ,630
+ ,55167
+ ,34
+ ,32
+ ,17899
+ ,27123
+ ,36
+ ,498
+ ,36708
+ ,30
+ ,32
+ ,10913
+ ,19148
+ ,27
+ ,403
+ ,40920
+ ,21
+ ,13
+ ,18060
+ ,15214
+ ,36
+ ,38
+ ,3058
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,559
+ ,86153
+ ,28
+ ,40
+ ,15452
+ ,34998
+ ,29
+ ,592
+ ,37545
+ ,11
+ ,43
+ ,33996
+ ,18998
+ ,19
+ ,799
+ ,54332
+ ,9
+ ,32
+ ,8877
+ ,10651
+ ,16
+ ,406
+ ,33277
+ ,14
+ ,32
+ ,18708
+ ,13465
+ ,15
+ ,778
+ ,43410
+ ,7
+ ,3
+ ,2781
+ ,13
+ ,1
+ ,706
+ ,69693
+ ,41
+ ,28
+ ,20854
+ ,32505
+ ,36
+ ,367
+ ,31897
+ ,21
+ ,16
+ ,8179
+ ,15769
+ ,22
+ ,639
+ ,34563
+ ,28
+ ,37
+ ,7139
+ ,5936
+ ,16
+ ,481
+ ,39830
+ ,1
+ ,32
+ ,13798
+ ,4174
+ ,1
+ ,214
+ ,16145
+ ,10
+ ,4
+ ,5619
+ ,9876
+ ,10
+ ,538
+ ,38139
+ ,26
+ ,28
+ ,13050
+ ,17678
+ ,31
+ ,451
+ ,49667
+ ,7
+ ,36
+ ,11297
+ ,14633
+ ,22
+ ,629
+ ,48133
+ ,24
+ ,40
+ ,16170
+ ,13380
+ ,22
+ ,256
+ ,11796
+ ,1
+ ,8
+ ,0
+ ,0
+ ,0
+ ,80
+ ,7627
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,555
+ ,60315
+ ,11
+ ,21
+ ,20539
+ ,5652
+ ,10
+ ,41
+ ,6836
+ ,0
+ ,4
+ ,0
+ ,0
+ ,0
+ ,497
+ ,28834
+ ,17
+ ,12
+ ,10056
+ ,3636
+ ,9
+ ,42
+ ,5118
+ ,5
+ ,0
+ ,0
+ ,0
+ ,0
+ ,339
+ ,20825
+ ,4
+ ,6
+ ,2418
+ ,1695
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,375
+ ,32626
+ ,6
+ ,32
+ ,11806
+ ,8778
+ ,7
+ ,203
+ ,11747
+ ,0
+ ,36
+ ,15924
+ ,4148
+ ,2
+ ,81
+ ,7131
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,61
+ ,4194
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,313
+ ,21416
+ ,15
+ ,12
+ ,7084
+ ,10404
+ ,16
+ ,227
+ ,18648
+ ,0
+ ,24
+ ,14831
+ ,20794
+ ,25
+ ,462
+ ,38232
+ ,12
+ ,36
+ ,6585
+ ,11200
+ ,6)
+ ,dim=c(7
+ ,144)
+ ,dimnames=list(c('Pageviews'
+ ,'TimeRFC'
+ ,'BloggedComp'
+ ,'PeerReviews'
+ ,'CharComp'
+ ,'SecComp'
+ ,'HypComp')
+ ,1:144))
> y <- array(NA,dim=c(7,144),dimnames=list(c('Pageviews','TimeRFC','BloggedComp','PeerReviews','CharComp','SecComp','HypComp'),1:144))
> 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'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> 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
Pageviews TimeRFC BloggedComp PeerReviews CharComp SecComp HypComp
1 812 58085 13 20 10345 10823 13
2 537 65968 26 28 17607 44480 27
3 186 7176 0 0 1423 1929 0
4 1405 78306 37 40 20050 30032 37
5 1859 123860 45 48 21212 27669 39
6 3347 226694 80 40 93979 114967 99
7 735 58032 21 35 15524 29951 21
8 609 72513 36 40 16182 38824 33
9 1100 65784 35 40 19238 26517 36
10 1743 164794 36 52 28909 63570 44
11 833 66288 35 24 22357 27131 33
12 1143 85319 46 44 25560 41061 47
13 888 45400 20 24 9954 18810 19
14 1460 78191 24 32 18490 27582 41
15 638 61175 18 28 17777 37026 22
16 854 72377 15 40 25268 24252 17
17 724 49850 48 40 37525 32579 46
18 323 15580 0 20 6023 0 0
19 1467 65240 37 67 25042 29666 31
20 412 13397 8 16 35713 7533 20
21 580 35385 10 44 7039 11892 10
22 1177 90047 51 36 40841 51557 55
23 595 47802 4 40 9214 5737 6
24 1103 61598 24 29 17446 11203 17
25 1037 73756 38 32 10295 28714 33
26 611 65152 19 28 13206 24268 33
27 1111 78226 20 41 26093 30749 32
28 542 66026 31 40 20744 46643 37
29 1341 170050 36 44 68013 64530 44
30 1169 91493 19 28 12840 35346 22
31 752 56374 20 56 12672 5766 15
32 889 85227 34 26 10872 29217 18
33 1009 50281 26 12 21325 15912 25
34 577 29008 0 32 24542 3728 7
35 1015 84775 29 36 16401 37494 35
36 0 0 0 0 0 0 0
37 562 55273 8 32 12821 13214 14
38 1115 62498 35 31 14662 19576 31
39 1015 35361 3 48 22190 13632 9
40 976 89502 41 72 37929 67378 59
41 940 73972 42 24 18009 29387 62
42 680 53655 10 56 11076 15936 12
43 404 40064 10 28 24981 18156 23
44 938 58480 26 36 30691 23750 31
45 580 48473 27 44 29164 15559 57
46 396 30737 0 32 13985 21713 23
47 256 27044 13 32 7588 12023 14
48 932 92011 30 32 20023 23588 31
49 734 56303 11 32 25524 28661 17
50 998 52792 24 36 14717 16874 24
51 425 33820 10 42 6832 11804 11
52 631 44121 14 28 9624 12949 16
53 903 103438 23 36 24300 38340 32
54 804 82720 27 32 21790 36573 36
55 915 89612 40 48 16493 40068 37
56 753 60722 22 20 9269 25561 25
57 674 64096 26 32 20105 31287 30
58 382 25090 8 32 11216 8383 10
59 550 57096 27 52 15569 29178 16
60 509 19608 0 40 21799 1237 3
61 423 28665 0 56 3772 10241 0
62 696 28400 16 24 6057 8219 17
63 460 27697 7 22 20828 9348 9
64 475 42406 18 36 9976 25242 22
65 373 47859 7 26 14055 24267 5
66 754 54987 24 44 17455 25902 23
67 936 58198 14 44 39553 51849 16
68 1501 61854 39 36 14818 29065 53
69 499 35185 16 36 17065 22417 23
70 80 12207 0 16 1536 1714 0
71 1517 108584 39 32 11938 29085 51
72 552 43273 17 10 24589 22118 25
73 517 39695 24 40 21332 14803 51
74 917 40699 27 25 13229 13243 46
75 691 38999 22 48 11331 13985 16
76 459 17667 0 36 853 657 0
77 683 59058 26 32 19821 26171 25
78 887 54106 19 24 34666 34867 34
79 410 23795 12 35 15051 12297 14
80 590 33465 23 17 27969 17487 32
81 439 36937 32 36 17897 13461 24
82 621 77075 19 40 6031 15192 16
83 537 32346 17 40 7153 16584 19
84 699 48592 25 36 13365 22892 27
85 477 26642 14 32 11197 7081 24
86 813 51086 11 40 25291 21623 12
87 1171 95985 20 60 28994 41992 43
88 400 24612 14 44 10461 11301 13
89 352 30113 14 28 16415 15230 19
90 639 53398 22 40 8495 14667 24
91 773 54198 25 28 18318 23795 27
92 1050 65255 35 36 25143 28055 26
93 489 59960 9 36 20471 29162 14
94 573 48096 16 20 14561 14962 26
95 334 17371 12 22 16902 8749 15
96 1229 115424 20 52 12994 37310 30
97 701 69334 33 48 29697 31551 33
98 222 19349 13 2 3895 9604 14
99 810 63594 11 44 9807 13937 11
100 739 49547 11 22 10711 16850 12
101 231 13066 8 3 2325 3439 8
102 425 25497 22 20 19000 16638 22
103 578 55049 13 32 22418 12847 12
104 305 24912 6 28 7872 13462 6
105 323 22431 12 24 5650 8086 10
106 463 24716 2 45 3979 2255 1
107 519 52452 33 40 14956 25918 31
108 294 17850 5 0 3738 3255 5
109 0 0 0 0 0 0 0
110 565 35269 34 28 10586 16138 35
111 462 27554 12 28 18122 5941 15
112 630 55167 34 32 17899 27123 36
113 498 36708 30 32 10913 19148 27
114 403 40920 21 13 18060 15214 36
115 38 3058 0 0 0 0 0
116 0 0 0 0 0 0 0
117 559 86153 28 40 15452 34998 29
118 592 37545 11 43 33996 18998 19
119 799 54332 9 32 8877 10651 16
120 406 33277 14 32 18708 13465 15
121 778 43410 7 3 2781 13 1
122 706 69693 41 28 20854 32505 36
123 367 31897 21 16 8179 15769 22
124 639 34563 28 37 7139 5936 16
125 481 39830 1 32 13798 4174 1
126 214 16145 10 4 5619 9876 10
127 538 38139 26 28 13050 17678 31
128 451 49667 7 36 11297 14633 22
129 629 48133 24 40 16170 13380 22
130 256 11796 1 8 0 0 0
131 80 7627 0 0 0 0 0
132 555 60315 11 21 20539 5652 10
133 41 6836 0 4 0 0 0
134 497 28834 17 12 10056 3636 9
135 42 5118 5 0 0 0 0
136 339 20825 4 6 2418 1695 0
137 0 0 0 0 0 0 0
138 375 32626 6 32 11806 8778 7
139 203 11747 0 36 15924 4148 2
140 81 7131 0 0 0 0 0
141 61 4194 0 0 0 0 0
142 313 21416 15 12 7084 10404 16
143 227 18648 0 24 14831 20794 25
144 462 38232 12 36 6585 11200 6
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) TimeRFC BloggedComp PeerReviews CharComp SecComp
15.822887 0.010336 5.548295 1.377048 0.005623 -0.007881
HypComp
2.398734
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-672.29 -99.14 -13.32 86.51 629.14
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.822887 37.530041 0.422 0.67397
TimeRFC 0.010336 0.001028 10.054 < 2e-16 ***
BloggedComp 5.548295 2.596897 2.137 0.03442 *
PeerReviews 1.377048 1.259318 1.093 0.27610
CharComp 0.005623 0.002153 2.613 0.00999 **
SecComp -0.007881 0.002419 -3.258 0.00141 **
HypComp 2.398734 2.366407 1.014 0.31253
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 187.5 on 137 degrees of freedom
Multiple R-squared: 0.8141, Adjusted R-squared: 0.806
F-statistic: 100 on 6 and 137 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.5278396 9.443208e-01 4.721604e-01
[2,] 0.5957118 8.085765e-01 4.042882e-01
[3,] 0.4876178 9.752356e-01 5.123822e-01
[4,] 0.6712938 6.574123e-01 3.287062e-01
[5,] 0.6191841 7.616317e-01 3.808159e-01
[6,] 0.5162066 9.675869e-01 4.837934e-01
[7,] 0.6089012 7.821976e-01 3.910988e-01
[8,] 0.6818154 6.363692e-01 3.181846e-01
[9,] 0.6022821 7.954357e-01 3.977179e-01
[10,] 0.9728016 5.439680e-02 2.719840e-02
[11,] 0.9841928 3.161447e-02 1.580723e-02
[12,] 0.9756964 4.860716e-02 2.430358e-02
[13,] 0.9712575 5.748496e-02 2.874248e-02
[14,] 0.9679775 6.404493e-02 3.202247e-02
[15,] 0.9671588 6.568247e-02 3.284123e-02
[16,] 0.9556833 8.863339e-02 4.431669e-02
[17,] 0.9763666 4.726671e-02 2.363336e-02
[18,] 0.9694021 6.119575e-02 3.059788e-02
[19,] 0.9656685 6.866309e-02 3.433155e-02
[20,] 0.9998503 2.994920e-04 1.497460e-04
[21,] 0.9998766 2.468756e-04 1.234378e-04
[22,] 0.9998363 3.274558e-04 1.637279e-04
[23,] 0.9997286 5.427095e-04 2.713548e-04
[24,] 0.9997837 4.325907e-04 2.162954e-04
[25,] 0.9996942 6.115230e-04 3.057615e-04
[26,] 0.9995396 9.208751e-04 4.604376e-04
[27,] 0.9992578 1.484496e-03 7.422479e-04
[28,] 0.9990823 1.835452e-03 9.177261e-04
[29,] 0.9991168 1.766496e-03 8.832482e-04
[30,] 0.9999747 5.051717e-05 2.525858e-05
[31,] 0.9999687 6.263146e-05 3.131573e-05
[32,] 0.9999850 3.009181e-05 1.504590e-05
[33,] 0.9999737 5.261858e-05 2.630929e-05
[34,] 0.9999727 5.454920e-05 2.727460e-05
[35,] 0.9999602 7.952702e-05 3.976351e-05
[36,] 0.9999890 2.205908e-05 1.102954e-05
[37,] 0.9999828 3.435912e-05 1.717956e-05
[38,] 0.9999797 4.067517e-05 2.033759e-05
[39,] 0.9999848 3.046750e-05 1.523375e-05
[40,] 0.9999764 4.717588e-05 2.358794e-05
[41,] 0.9999856 2.886114e-05 1.443057e-05
[42,] 0.9999758 4.841020e-05 2.420510e-05
[43,] 0.9999607 7.854356e-05 3.927178e-05
[44,] 0.9999707 5.866697e-05 2.933349e-05
[45,] 0.9999662 6.764525e-05 3.382262e-05
[46,] 0.9999628 7.435614e-05 3.717807e-05
[47,] 0.9999405 1.189353e-04 5.946763e-05
[48,] 0.9999203 1.594335e-04 7.971676e-05
[49,] 0.9998694 2.611510e-04 1.305755e-04
[50,] 0.9998595 2.809810e-04 1.404905e-04
[51,] 0.9998181 3.638000e-04 1.819000e-04
[52,] 0.9997293 5.414021e-04 2.707011e-04
[53,] 0.9998202 3.595920e-04 1.797960e-04
[54,] 0.9997238 5.523116e-04 2.761558e-04
[55,] 0.9995852 8.295709e-04 4.147854e-04
[56,] 0.9994661 1.067860e-03 5.339298e-04
[57,] 0.9991887 1.622530e-03 8.112649e-04
[58,] 0.9997642 4.716368e-04 2.358184e-04
[59,] 0.9999996 7.779115e-07 3.889558e-07
[60,] 0.9999993 1.426059e-06 7.130296e-07
[61,] 0.9999989 2.108246e-06 1.054123e-06
[62,] 0.9999996 8.531617e-07 4.265808e-07
[63,] 0.9999992 1.566784e-06 7.833922e-07
[64,] 0.9999995 1.062521e-06 5.312603e-07
[65,] 0.9999999 2.964202e-07 1.482101e-07
[66,] 0.9999998 3.966519e-07 1.983259e-07
[67,] 0.9999998 3.279250e-07 1.639625e-07
[68,] 0.9999997 5.819590e-07 2.909795e-07
[69,] 0.9999999 2.441787e-07 1.220894e-07
[70,] 0.9999998 4.782289e-07 2.391145e-07
[71,] 0.9999996 7.101838e-07 3.550919e-07
[72,] 0.9999997 5.534621e-07 2.767310e-07
[73,] 0.9999999 1.067610e-07 5.338049e-08
[74,] 0.9999999 1.682367e-07 8.411834e-08
[75,] 0.9999999 2.435693e-07 1.217847e-07
[76,] 0.9999998 4.659695e-07 2.329847e-07
[77,] 0.9999999 2.469937e-07 1.234968e-07
[78,] 0.9999999 1.320055e-07 6.600275e-08
[79,] 0.9999999 2.781902e-07 1.390951e-07
[80,] 0.9999997 5.233805e-07 2.616903e-07
[81,] 0.9999995 9.529019e-07 4.764510e-07
[82,] 0.9999996 8.592034e-07 4.296017e-07
[83,] 1.0000000 4.677973e-08 2.338987e-08
[84,] 1.0000000 9.368463e-08 4.684231e-08
[85,] 0.9999999 2.015715e-07 1.007857e-07
[86,] 0.9999998 3.926717e-07 1.963358e-07
[87,] 0.9999998 4.359958e-07 2.179979e-07
[88,] 0.9999997 6.221345e-07 3.110672e-07
[89,] 0.9999993 1.335835e-06 6.679177e-07
[90,] 0.9999989 2.175357e-06 1.087678e-06
[91,] 0.9999999 1.847597e-07 9.237987e-08
[92,] 0.9999998 4.243007e-07 2.121503e-07
[93,] 0.9999997 6.659242e-07 3.329621e-07
[94,] 0.9999994 1.226155e-06 6.130773e-07
[95,] 0.9999989 2.282097e-06 1.141049e-06
[96,] 0.9999974 5.113949e-06 2.556974e-06
[97,] 0.9999949 1.015947e-05 5.079735e-06
[98,] 0.9999922 1.559322e-05 7.796608e-06
[99,] 0.9999868 2.636753e-05 1.318376e-05
[100,] 0.9999741 5.181370e-05 2.590685e-05
[101,] 0.9999468 1.064891e-04 5.324457e-05
[102,] 0.9998912 2.175761e-04 1.087880e-04
[103,] 0.9998044 3.912049e-04 1.956025e-04
[104,] 0.9996260 7.480121e-04 3.740061e-04
[105,] 0.9997130 5.739550e-04 2.869775e-04
[106,] 0.9994581 1.083780e-03 5.418900e-04
[107,] 0.9990373 1.925403e-03 9.627014e-04
[108,] 0.9995938 8.124308e-04 4.062154e-04
[109,] 0.9998432 3.135675e-04 1.567838e-04
[110,] 0.9998277 3.446828e-04 1.723414e-04
[111,] 0.9996267 7.465660e-04 3.732830e-04
[112,] 0.9999978 4.403781e-06 2.201890e-06
[113,] 0.9999954 9.151458e-06 4.575729e-06
[114,] 0.9999899 2.016015e-05 1.008008e-05
[115,] 0.9999736 5.281314e-05 2.640657e-05
[116,] 0.9999500 9.995925e-05 4.997963e-05
[117,] 0.9998555 2.889529e-04 1.444765e-04
[118,] 0.9995526 8.947956e-04 4.473978e-04
[119,] 0.9988553 2.289303e-03 1.144651e-03
[120,] 0.9977181 4.563812e-03 2.281906e-03
[121,] 0.9976882 4.623581e-03 2.311791e-03
[122,] 0.9927238 1.455237e-02 7.276185e-03
[123,] 0.9992004 1.599138e-03 7.995690e-04
[124,] 0.9956615 8.676954e-03 4.338477e-03
[125,] 0.9793124 4.137521e-02 2.068760e-02
> postscript(file="/var/wessaorg/rcomp/tmp/16ot91321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/21nk31321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/3tidq1321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/4yqi71321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/5eez81321889787.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 = 144
Frequency = 1
1 2 3 4 5 6
92.0631882 -156.7343562 103.2041525 354.5922684 252.3771201 629.1423076
7 8 9 10 11 12
53.0008528 -275.3459818 169.3831168 -14.6462527 -86.2982097 -3.3931010
13 14 15 16 17 18
305.5835012 473.7946663 -9.5128810 -39.9819166 -193.0970249 84.7269413
19 20 21 22 23 24
497.9010094 1.8433054 112.5041408 -57.3926257 -13.1863276 226.7945866
25 26 27 28 29 30
93.1554598 -184.3940799 138.0246131 -221.1817711 -672.2928544 217.0874733
31 32 33 34 35 36
-96.4003258 -106.2559344 258.1909735 91.8544036 31.7464739 -15.8228868
37 38 39 40 41 42
-115.1336332 213.7669470 511.9919647 -115.3856935 -124.8930792 11.5069845
43 44 45 46 47 48
-172.5408269 64.1032739 -325.3589472 55.7085598 -137.0512895 -246.4519826
49 50 51 52 53 54
72.6799241 246.4243165 -25.4937106 52.4471453 -270.4258935 -181.3698142
55 56 57 58 59 60
-180.8352085 49.2866279 -131.1095115 -2.6063659 -173.3753148 115.3877066
61 62 63 64 65 66
93.2701092 254.7386653 23.7165210 -38.5276856 -111.9332238 26.8702272
67 68 69 70 71 72
328.1722851 598.4775391 6.6797564 -79.1601695 158.1231902 -43.1300076
73 74 75 76 77 78
-222.9965232 215.9033756 92.0274439 211.3736489 -96.7633969 171.7390768
79 80 81 82 83 84
12.1395610 -18.9761196 -237.8609276 -304.5578308 82.3336574 33.1223362
85 86 87 88 89 90
-0.6743723 152.4259559 34.2042496 -9.4339667 -109.1716061 -95.6547993
91 92 93 94 95 96
39.4569263 133.2605976 -164.9712979 -82.6059833 -20.3279719 -13.4447384
97 98 99 100 101 102
-278.1778955 -48.4986819 43.5322316 163.4953760 26.4439875 -32.4660574
103 104 105 106 107 108
-176.6233234 7.2652837 -16.3392925 111.6392435 -231.3644811 58.5714741
109 110 111 112 113 114
-15.8228868 -58.8757637 -34.8346056 -162.0064729 -82.9921453 -238.2131174
115 116 117 118 119 120
-9.4311614 -15.8228868 -438.3984105 -19.1729870 123.2273480 -110.5932517
121 122 123 124 125 126
252.5757466 -243.6832445 -91.5582458 27.8771622 -43.2267140 -7.4468935
127 128 129 130 131 132
-63.2792367 -167.5851325 -110.8365973 101.6859464 -14.6575208 -269.1490063
133 134 135 136 137 138
-50.9897320 22.8123366 -54.4653265 77.2295994 -15.8228868 -69.4125160
139 140 141 142 143 144
-45.4726924 -8.5307372 1.8268503 -20.1568755 5.8824584 -28.3089717
> postscript(file="/var/wessaorg/rcomp/tmp/653iq1321889787.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 = 144
Frequency = 1
lag(myerror, k = 1) myerror
0 92.0631882 NA
1 -156.7343562 92.0631882
2 103.2041525 -156.7343562
3 354.5922684 103.2041525
4 252.3771201 354.5922684
5 629.1423076 252.3771201
6 53.0008528 629.1423076
7 -275.3459818 53.0008528
8 169.3831168 -275.3459818
9 -14.6462527 169.3831168
10 -86.2982097 -14.6462527
11 -3.3931010 -86.2982097
12 305.5835012 -3.3931010
13 473.7946663 305.5835012
14 -9.5128810 473.7946663
15 -39.9819166 -9.5128810
16 -193.0970249 -39.9819166
17 84.7269413 -193.0970249
18 497.9010094 84.7269413
19 1.8433054 497.9010094
20 112.5041408 1.8433054
21 -57.3926257 112.5041408
22 -13.1863276 -57.3926257
23 226.7945866 -13.1863276
24 93.1554598 226.7945866
25 -184.3940799 93.1554598
26 138.0246131 -184.3940799
27 -221.1817711 138.0246131
28 -672.2928544 -221.1817711
29 217.0874733 -672.2928544
30 -96.4003258 217.0874733
31 -106.2559344 -96.4003258
32 258.1909735 -106.2559344
33 91.8544036 258.1909735
34 31.7464739 91.8544036
35 -15.8228868 31.7464739
36 -115.1336332 -15.8228868
37 213.7669470 -115.1336332
38 511.9919647 213.7669470
39 -115.3856935 511.9919647
40 -124.8930792 -115.3856935
41 11.5069845 -124.8930792
42 -172.5408269 11.5069845
43 64.1032739 -172.5408269
44 -325.3589472 64.1032739
45 55.7085598 -325.3589472
46 -137.0512895 55.7085598
47 -246.4519826 -137.0512895
48 72.6799241 -246.4519826
49 246.4243165 72.6799241
50 -25.4937106 246.4243165
51 52.4471453 -25.4937106
52 -270.4258935 52.4471453
53 -181.3698142 -270.4258935
54 -180.8352085 -181.3698142
55 49.2866279 -180.8352085
56 -131.1095115 49.2866279
57 -2.6063659 -131.1095115
58 -173.3753148 -2.6063659
59 115.3877066 -173.3753148
60 93.2701092 115.3877066
61 254.7386653 93.2701092
62 23.7165210 254.7386653
63 -38.5276856 23.7165210
64 -111.9332238 -38.5276856
65 26.8702272 -111.9332238
66 328.1722851 26.8702272
67 598.4775391 328.1722851
68 6.6797564 598.4775391
69 -79.1601695 6.6797564
70 158.1231902 -79.1601695
71 -43.1300076 158.1231902
72 -222.9965232 -43.1300076
73 215.9033756 -222.9965232
74 92.0274439 215.9033756
75 211.3736489 92.0274439
76 -96.7633969 211.3736489
77 171.7390768 -96.7633969
78 12.1395610 171.7390768
79 -18.9761196 12.1395610
80 -237.8609276 -18.9761196
81 -304.5578308 -237.8609276
82 82.3336574 -304.5578308
83 33.1223362 82.3336574
84 -0.6743723 33.1223362
85 152.4259559 -0.6743723
86 34.2042496 152.4259559
87 -9.4339667 34.2042496
88 -109.1716061 -9.4339667
89 -95.6547993 -109.1716061
90 39.4569263 -95.6547993
91 133.2605976 39.4569263
92 -164.9712979 133.2605976
93 -82.6059833 -164.9712979
94 -20.3279719 -82.6059833
95 -13.4447384 -20.3279719
96 -278.1778955 -13.4447384
97 -48.4986819 -278.1778955
98 43.5322316 -48.4986819
99 163.4953760 43.5322316
100 26.4439875 163.4953760
101 -32.4660574 26.4439875
102 -176.6233234 -32.4660574
103 7.2652837 -176.6233234
104 -16.3392925 7.2652837
105 111.6392435 -16.3392925
106 -231.3644811 111.6392435
107 58.5714741 -231.3644811
108 -15.8228868 58.5714741
109 -58.8757637 -15.8228868
110 -34.8346056 -58.8757637
111 -162.0064729 -34.8346056
112 -82.9921453 -162.0064729
113 -238.2131174 -82.9921453
114 -9.4311614 -238.2131174
115 -15.8228868 -9.4311614
116 -438.3984105 -15.8228868
117 -19.1729870 -438.3984105
118 123.2273480 -19.1729870
119 -110.5932517 123.2273480
120 252.5757466 -110.5932517
121 -243.6832445 252.5757466
122 -91.5582458 -243.6832445
123 27.8771622 -91.5582458
124 -43.2267140 27.8771622
125 -7.4468935 -43.2267140
126 -63.2792367 -7.4468935
127 -167.5851325 -63.2792367
128 -110.8365973 -167.5851325
129 101.6859464 -110.8365973
130 -14.6575208 101.6859464
131 -269.1490063 -14.6575208
132 -50.9897320 -269.1490063
133 22.8123366 -50.9897320
134 -54.4653265 22.8123366
135 77.2295994 -54.4653265
136 -15.8228868 77.2295994
137 -69.4125160 -15.8228868
138 -45.4726924 -69.4125160
139 -8.5307372 -45.4726924
140 1.8268503 -8.5307372
141 -20.1568755 1.8268503
142 5.8824584 -20.1568755
143 -28.3089717 5.8824584
144 NA -28.3089717
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -156.7343562 92.0631882
[2,] 103.2041525 -156.7343562
[3,] 354.5922684 103.2041525
[4,] 252.3771201 354.5922684
[5,] 629.1423076 252.3771201
[6,] 53.0008528 629.1423076
[7,] -275.3459818 53.0008528
[8,] 169.3831168 -275.3459818
[9,] -14.6462527 169.3831168
[10,] -86.2982097 -14.6462527
[11,] -3.3931010 -86.2982097
[12,] 305.5835012 -3.3931010
[13,] 473.7946663 305.5835012
[14,] -9.5128810 473.7946663
[15,] -39.9819166 -9.5128810
[16,] -193.0970249 -39.9819166
[17,] 84.7269413 -193.0970249
[18,] 497.9010094 84.7269413
[19,] 1.8433054 497.9010094
[20,] 112.5041408 1.8433054
[21,] -57.3926257 112.5041408
[22,] -13.1863276 -57.3926257
[23,] 226.7945866 -13.1863276
[24,] 93.1554598 226.7945866
[25,] -184.3940799 93.1554598
[26,] 138.0246131 -184.3940799
[27,] -221.1817711 138.0246131
[28,] -672.2928544 -221.1817711
[29,] 217.0874733 -672.2928544
[30,] -96.4003258 217.0874733
[31,] -106.2559344 -96.4003258
[32,] 258.1909735 -106.2559344
[33,] 91.8544036 258.1909735
[34,] 31.7464739 91.8544036
[35,] -15.8228868 31.7464739
[36,] -115.1336332 -15.8228868
[37,] 213.7669470 -115.1336332
[38,] 511.9919647 213.7669470
[39,] -115.3856935 511.9919647
[40,] -124.8930792 -115.3856935
[41,] 11.5069845 -124.8930792
[42,] -172.5408269 11.5069845
[43,] 64.1032739 -172.5408269
[44,] -325.3589472 64.1032739
[45,] 55.7085598 -325.3589472
[46,] -137.0512895 55.7085598
[47,] -246.4519826 -137.0512895
[48,] 72.6799241 -246.4519826
[49,] 246.4243165 72.6799241
[50,] -25.4937106 246.4243165
[51,] 52.4471453 -25.4937106
[52,] -270.4258935 52.4471453
[53,] -181.3698142 -270.4258935
[54,] -180.8352085 -181.3698142
[55,] 49.2866279 -180.8352085
[56,] -131.1095115 49.2866279
[57,] -2.6063659 -131.1095115
[58,] -173.3753148 -2.6063659
[59,] 115.3877066 -173.3753148
[60,] 93.2701092 115.3877066
[61,] 254.7386653 93.2701092
[62,] 23.7165210 254.7386653
[63,] -38.5276856 23.7165210
[64,] -111.9332238 -38.5276856
[65,] 26.8702272 -111.9332238
[66,] 328.1722851 26.8702272
[67,] 598.4775391 328.1722851
[68,] 6.6797564 598.4775391
[69,] -79.1601695 6.6797564
[70,] 158.1231902 -79.1601695
[71,] -43.1300076 158.1231902
[72,] -222.9965232 -43.1300076
[73,] 215.9033756 -222.9965232
[74,] 92.0274439 215.9033756
[75,] 211.3736489 92.0274439
[76,] -96.7633969 211.3736489
[77,] 171.7390768 -96.7633969
[78,] 12.1395610 171.7390768
[79,] -18.9761196 12.1395610
[80,] -237.8609276 -18.9761196
[81,] -304.5578308 -237.8609276
[82,] 82.3336574 -304.5578308
[83,] 33.1223362 82.3336574
[84,] -0.6743723 33.1223362
[85,] 152.4259559 -0.6743723
[86,] 34.2042496 152.4259559
[87,] -9.4339667 34.2042496
[88,] -109.1716061 -9.4339667
[89,] -95.6547993 -109.1716061
[90,] 39.4569263 -95.6547993
[91,] 133.2605976 39.4569263
[92,] -164.9712979 133.2605976
[93,] -82.6059833 -164.9712979
[94,] -20.3279719 -82.6059833
[95,] -13.4447384 -20.3279719
[96,] -278.1778955 -13.4447384
[97,] -48.4986819 -278.1778955
[98,] 43.5322316 -48.4986819
[99,] 163.4953760 43.5322316
[100,] 26.4439875 163.4953760
[101,] -32.4660574 26.4439875
[102,] -176.6233234 -32.4660574
[103,] 7.2652837 -176.6233234
[104,] -16.3392925 7.2652837
[105,] 111.6392435 -16.3392925
[106,] -231.3644811 111.6392435
[107,] 58.5714741 -231.3644811
[108,] -15.8228868 58.5714741
[109,] -58.8757637 -15.8228868
[110,] -34.8346056 -58.8757637
[111,] -162.0064729 -34.8346056
[112,] -82.9921453 -162.0064729
[113,] -238.2131174 -82.9921453
[114,] -9.4311614 -238.2131174
[115,] -15.8228868 -9.4311614
[116,] -438.3984105 -15.8228868
[117,] -19.1729870 -438.3984105
[118,] 123.2273480 -19.1729870
[119,] -110.5932517 123.2273480
[120,] 252.5757466 -110.5932517
[121,] -243.6832445 252.5757466
[122,] -91.5582458 -243.6832445
[123,] 27.8771622 -91.5582458
[124,] -43.2267140 27.8771622
[125,] -7.4468935 -43.2267140
[126,] -63.2792367 -7.4468935
[127,] -167.5851325 -63.2792367
[128,] -110.8365973 -167.5851325
[129,] 101.6859464 -110.8365973
[130,] -14.6575208 101.6859464
[131,] -269.1490063 -14.6575208
[132,] -50.9897320 -269.1490063
[133,] 22.8123366 -50.9897320
[134,] -54.4653265 22.8123366
[135,] 77.2295994 -54.4653265
[136,] -15.8228868 77.2295994
[137,] -69.4125160 -15.8228868
[138,] -45.4726924 -69.4125160
[139,] -8.5307372 -45.4726924
[140,] 1.8268503 -8.5307372
[141,] -20.1568755 1.8268503
[142,] 5.8824584 -20.1568755
[143,] -28.3089717 5.8824584
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -156.7343562 92.0631882
2 103.2041525 -156.7343562
3 354.5922684 103.2041525
4 252.3771201 354.5922684
5 629.1423076 252.3771201
6 53.0008528 629.1423076
7 -275.3459818 53.0008528
8 169.3831168 -275.3459818
9 -14.6462527 169.3831168
10 -86.2982097 -14.6462527
11 -3.3931010 -86.2982097
12 305.5835012 -3.3931010
13 473.7946663 305.5835012
14 -9.5128810 473.7946663
15 -39.9819166 -9.5128810
16 -193.0970249 -39.9819166
17 84.7269413 -193.0970249
18 497.9010094 84.7269413
19 1.8433054 497.9010094
20 112.5041408 1.8433054
21 -57.3926257 112.5041408
22 -13.1863276 -57.3926257
23 226.7945866 -13.1863276
24 93.1554598 226.7945866
25 -184.3940799 93.1554598
26 138.0246131 -184.3940799
27 -221.1817711 138.0246131
28 -672.2928544 -221.1817711
29 217.0874733 -672.2928544
30 -96.4003258 217.0874733
31 -106.2559344 -96.4003258
32 258.1909735 -106.2559344
33 91.8544036 258.1909735
34 31.7464739 91.8544036
35 -15.8228868 31.7464739
36 -115.1336332 -15.8228868
37 213.7669470 -115.1336332
38 511.9919647 213.7669470
39 -115.3856935 511.9919647
40 -124.8930792 -115.3856935
41 11.5069845 -124.8930792
42 -172.5408269 11.5069845
43 64.1032739 -172.5408269
44 -325.3589472 64.1032739
45 55.7085598 -325.3589472
46 -137.0512895 55.7085598
47 -246.4519826 -137.0512895
48 72.6799241 -246.4519826
49 246.4243165 72.6799241
50 -25.4937106 246.4243165
51 52.4471453 -25.4937106
52 -270.4258935 52.4471453
53 -181.3698142 -270.4258935
54 -180.8352085 -181.3698142
55 49.2866279 -180.8352085
56 -131.1095115 49.2866279
57 -2.6063659 -131.1095115
58 -173.3753148 -2.6063659
59 115.3877066 -173.3753148
60 93.2701092 115.3877066
61 254.7386653 93.2701092
62 23.7165210 254.7386653
63 -38.5276856 23.7165210
64 -111.9332238 -38.5276856
65 26.8702272 -111.9332238
66 328.1722851 26.8702272
67 598.4775391 328.1722851
68 6.6797564 598.4775391
69 -79.1601695 6.6797564
70 158.1231902 -79.1601695
71 -43.1300076 158.1231902
72 -222.9965232 -43.1300076
73 215.9033756 -222.9965232
74 92.0274439 215.9033756
75 211.3736489 92.0274439
76 -96.7633969 211.3736489
77 171.7390768 -96.7633969
78 12.1395610 171.7390768
79 -18.9761196 12.1395610
80 -237.8609276 -18.9761196
81 -304.5578308 -237.8609276
82 82.3336574 -304.5578308
83 33.1223362 82.3336574
84 -0.6743723 33.1223362
85 152.4259559 -0.6743723
86 34.2042496 152.4259559
87 -9.4339667 34.2042496
88 -109.1716061 -9.4339667
89 -95.6547993 -109.1716061
90 39.4569263 -95.6547993
91 133.2605976 39.4569263
92 -164.9712979 133.2605976
93 -82.6059833 -164.9712979
94 -20.3279719 -82.6059833
95 -13.4447384 -20.3279719
96 -278.1778955 -13.4447384
97 -48.4986819 -278.1778955
98 43.5322316 -48.4986819
99 163.4953760 43.5322316
100 26.4439875 163.4953760
101 -32.4660574 26.4439875
102 -176.6233234 -32.4660574
103 7.2652837 -176.6233234
104 -16.3392925 7.2652837
105 111.6392435 -16.3392925
106 -231.3644811 111.6392435
107 58.5714741 -231.3644811
108 -15.8228868 58.5714741
109 -58.8757637 -15.8228868
110 -34.8346056 -58.8757637
111 -162.0064729 -34.8346056
112 -82.9921453 -162.0064729
113 -238.2131174 -82.9921453
114 -9.4311614 -238.2131174
115 -15.8228868 -9.4311614
116 -438.3984105 -15.8228868
117 -19.1729870 -438.3984105
118 123.2273480 -19.1729870
119 -110.5932517 123.2273480
120 252.5757466 -110.5932517
121 -243.6832445 252.5757466
122 -91.5582458 -243.6832445
123 27.8771622 -91.5582458
124 -43.2267140 27.8771622
125 -7.4468935 -43.2267140
126 -63.2792367 -7.4468935
127 -167.5851325 -63.2792367
128 -110.8365973 -167.5851325
129 101.6859464 -110.8365973
130 -14.6575208 101.6859464
131 -269.1490063 -14.6575208
132 -50.9897320 -269.1490063
133 22.8123366 -50.9897320
134 -54.4653265 22.8123366
135 77.2295994 -54.4653265
136 -15.8228868 77.2295994
137 -69.4125160 -15.8228868
138 -45.4726924 -69.4125160
139 -8.5307372 -45.4726924
140 1.8268503 -8.5307372
141 -20.1568755 1.8268503
142 5.8824584 -20.1568755
143 -28.3089717 5.8824584
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/7e25k1321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/8asrh1321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/9glri1321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/108bm21321889787.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/11uzts1321889787.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12pb041321889787.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13pzdv1321889787.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/143wli1321889787.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/15zq2a1321889787.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/16iurz1321889787.tab")
+ }
>
> try(system("convert tmp/16ot91321889787.ps tmp/16ot91321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/21nk31321889787.ps tmp/21nk31321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/3tidq1321889787.ps tmp/3tidq1321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/4yqi71321889787.ps tmp/4yqi71321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/5eez81321889787.ps tmp/5eez81321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/653iq1321889787.ps tmp/653iq1321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/7e25k1321889787.ps tmp/7e25k1321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/8asrh1321889787.ps tmp/8asrh1321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/9glri1321889787.ps tmp/9glri1321889787.png",intern=TRUE))
character(0)
> try(system("convert tmp/108bm21321889787.ps tmp/108bm21321889787.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.602 0.484 5.119