R version 2.12.1 (2010-12-16)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(1418
+ ,56
+ ,396
+ ,81
+ ,30
+ ,115
+ ,94
+ ,24188
+ ,146283
+ ,144
+ ,145
+ ,2
+ ,2172
+ ,89
+ ,967
+ ,125
+ ,30
+ ,116
+ ,103
+ ,32287
+ ,96933
+ ,135
+ ,132
+ ,4
+ ,1583
+ ,44
+ ,656
+ ,66
+ ,26
+ ,100
+ ,93
+ ,27101
+ ,95757
+ ,84
+ ,84
+ ,0
+ ,1764
+ ,84
+ ,655
+ ,74
+ ,38
+ ,140
+ ,123
+ ,19716
+ ,143983
+ ,130
+ ,127
+ ,0
+ ,1495
+ ,88
+ ,465
+ ,49
+ ,44
+ ,166
+ ,148
+ ,17753
+ ,75851
+ ,82
+ ,78
+ ,-4
+ ,1373
+ ,55
+ ,525
+ ,52
+ ,30
+ ,99
+ ,90
+ ,9028
+ ,59238
+ ,60
+ ,60
+ ,4
+ ,2187
+ ,60
+ ,885
+ ,88
+ ,40
+ ,139
+ ,124
+ ,18653
+ ,93163
+ ,131
+ ,131
+ ,4
+ ,4041
+ ,154
+ ,1436
+ ,108
+ ,47
+ ,181
+ ,168
+ ,29498
+ ,151511
+ ,140
+ ,133
+ ,0
+ ,1706
+ ,53
+ ,612
+ ,43
+ ,30
+ ,116
+ ,115
+ ,27563
+ ,136368
+ ,151
+ ,150
+ ,-1
+ ,2152
+ ,119
+ ,865
+ ,75
+ ,31
+ ,116
+ ,71
+ ,18293
+ ,112642
+ ,91
+ ,91
+ ,0
+ ,2242
+ ,75
+ ,963
+ ,86
+ ,30
+ ,108
+ ,108
+ ,16116
+ ,127766
+ ,119
+ ,118
+ ,1
+ ,2515
+ ,92
+ ,966
+ ,135
+ ,34
+ ,129
+ ,120
+ ,26569
+ ,85646
+ ,123
+ ,119
+ ,0
+ ,2147
+ ,100
+ ,801
+ ,63
+ ,31
+ ,118
+ ,114
+ ,24785
+ ,98579
+ ,90
+ ,89
+ ,3
+ ,1638
+ ,73
+ ,513
+ ,52
+ ,33
+ ,125
+ ,120
+ ,23825
+ ,131741
+ ,113
+ ,108
+ ,-1
+ ,2452
+ ,77
+ ,992
+ ,59
+ ,33
+ ,127
+ ,124
+ ,34461
+ ,171975
+ ,175
+ ,162
+ ,4
+ ,2662
+ ,99
+ ,937
+ ,64
+ ,36
+ ,136
+ ,126
+ ,24919
+ ,159676
+ ,96
+ ,92
+ ,3
+ ,865
+ ,30
+ ,260
+ ,32
+ ,14
+ ,46
+ ,37
+ ,12558
+ ,58391
+ ,41
+ ,41
+ ,1
+ ,1793
+ ,76
+ ,503
+ ,129
+ ,17
+ ,54
+ ,38
+ ,7784
+ ,31580
+ ,47
+ ,47
+ ,0
+ ,2527
+ ,146
+ ,927
+ ,37
+ ,32
+ ,124
+ ,120
+ ,28522
+ ,136815
+ ,126
+ ,120
+ ,-2
+ ,2747
+ ,67
+ ,1269
+ ,31
+ ,30
+ ,115
+ ,93
+ ,22265
+ ,120642
+ ,105
+ ,105
+ ,-3
+ ,1324
+ ,56
+ ,537
+ ,65
+ ,35
+ ,128
+ ,95
+ ,14459
+ ,69107
+ ,80
+ ,79
+ ,-4
+ ,1383
+ ,58
+ ,532
+ ,74
+ ,28
+ ,97
+ ,90
+ ,22240
+ ,108016
+ ,73
+ ,70
+ ,2
+ ,4308
+ ,119
+ ,1635
+ ,715
+ ,34
+ ,125
+ ,110
+ ,11912
+ ,79336
+ ,68
+ ,67
+ ,2
+ ,1831
+ ,66
+ ,557
+ ,66
+ ,39
+ ,149
+ ,138
+ ,18220
+ ,93176
+ ,127
+ ,127
+ ,-4
+ ,3373
+ ,89
+ ,1178
+ ,106
+ ,39
+ ,149
+ ,133
+ ,19199
+ ,161632
+ ,154
+ ,152
+ ,3
+ ,2352
+ ,41
+ ,866
+ ,112
+ ,29
+ ,108
+ ,96
+ ,25239
+ ,102996
+ ,112
+ ,109
+ ,2
+ ,2144
+ ,68
+ ,574
+ ,66
+ ,44
+ ,166
+ ,164
+ ,29801
+ ,160604
+ ,137
+ ,133
+ ,2
+ ,4691
+ ,168
+ ,1276
+ ,190
+ ,21
+ ,80
+ ,78
+ ,18450
+ ,158051
+ ,135
+ ,123
+ ,0
+ ,2694
+ ,132
+ ,825
+ ,165
+ ,28
+ ,107
+ ,102
+ ,34861
+ ,162647
+ ,230
+ ,230
+ ,5
+ ,1769
+ ,71
+ ,663
+ ,61
+ ,28
+ ,107
+ ,99
+ ,16688
+ ,60622
+ ,71
+ ,68
+ ,-2
+ ,3148
+ ,112
+ ,1069
+ ,53
+ ,38
+ ,146
+ ,129
+ ,24683
+ ,179566
+ ,147
+ ,147
+ ,0
+ ,1954
+ ,70
+ ,711
+ ,38
+ ,32
+ ,123
+ ,114
+ ,21436
+ ,96144
+ ,105
+ ,101
+ ,-2
+ ,1226
+ ,57
+ ,503
+ ,50
+ ,29
+ ,111
+ ,99
+ ,30546
+ ,129847
+ ,107
+ ,108
+ ,-3
+ ,1496
+ ,103
+ ,464
+ ,42
+ ,27
+ ,105
+ ,104
+ ,15977
+ ,71180
+ ,116
+ ,114
+ ,2
+ ,1943
+ ,52
+ ,657
+ ,53
+ ,40
+ ,155
+ ,138
+ ,14251
+ ,86767
+ ,89
+ ,88
+ ,2
+ ,1762
+ ,62
+ ,577
+ ,50
+ ,40
+ ,155
+ ,151
+ ,16851
+ ,93487
+ ,84
+ ,83
+ ,2
+ ,1403
+ ,45
+ ,619
+ ,77
+ ,28
+ ,104
+ ,72
+ ,21113
+ ,82981
+ ,113
+ ,113
+ ,0
+ ,1425
+ ,46
+ ,479
+ ,57
+ ,34
+ ,132
+ ,120
+ ,17401
+ ,73815
+ ,120
+ ,118
+ ,4
+ ,1857
+ ,63
+ ,817
+ ,73
+ ,33
+ ,127
+ ,115
+ ,23958
+ ,94552
+ ,110
+ ,110
+ ,4
+ ,1420
+ ,53
+ ,537
+ ,63
+ ,33
+ ,122
+ ,98
+ ,14587
+ ,67808
+ ,78
+ ,76
+ ,2
+ ,1644
+ ,78
+ ,465
+ ,47
+ ,35
+ ,87
+ ,71
+ ,20537
+ ,106175
+ ,145
+ ,141
+ ,2
+ ,1054
+ ,46
+ ,299
+ ,57
+ ,29
+ ,109
+ ,107
+ ,30495
+ ,76669
+ ,91
+ ,91
+ ,-4
+ ,937
+ ,41
+ ,248
+ ,36
+ ,20
+ ,78
+ ,73
+ ,7117
+ ,57283
+ ,48
+ ,48
+ ,3
+ ,2547
+ ,91
+ ,905
+ ,63
+ ,37
+ ,141
+ ,129
+ ,33473
+ ,72413
+ ,150
+ ,144
+ ,3
+ ,1626
+ ,63
+ ,512
+ ,63
+ ,33
+ ,124
+ ,118
+ ,21115
+ ,96971
+ ,181
+ ,168
+ ,2
+ ,1964
+ ,63
+ ,786
+ ,110
+ ,29
+ ,112
+ ,104
+ ,32902
+ ,120336
+ ,121
+ ,117
+ ,-1
+ ,1381
+ ,32
+ ,489
+ ,56
+ ,28
+ ,108
+ ,107
+ ,25131
+ ,93913
+ ,99
+ ,100
+ ,-3
+ ,1290
+ ,34
+ ,351
+ ,71
+ ,21
+ ,78
+ ,36
+ ,6943
+ ,32036
+ ,40
+ ,37
+ ,0
+ ,1982
+ ,93
+ ,669
+ ,56
+ ,41
+ ,158
+ ,139
+ ,31808
+ ,102255
+ ,87
+ ,87
+ ,1
+ ,1590
+ ,55
+ ,506
+ ,79
+ ,20
+ ,78
+ ,56
+ ,17014
+ ,63506
+ ,66
+ ,64
+ ,-3
+ ,1281
+ ,72
+ ,407
+ ,67
+ ,30
+ ,119
+ ,93
+ ,6440
+ ,68370
+ ,58
+ ,58
+ ,3
+ ,1272
+ ,42
+ ,316
+ ,76
+ ,22
+ ,88
+ ,87
+ ,18647
+ ,50517
+ ,77
+ ,76
+ ,0
+ ,1944
+ ,71
+ ,603
+ ,65
+ ,42
+ ,155
+ ,110
+ ,20556
+ ,103950
+ ,130
+ ,129
+ ,0
+ ,1605
+ ,65
+ ,577
+ ,45
+ ,32
+ ,123
+ ,83
+ ,22392
+ ,84396
+ ,101
+ ,101
+ ,0
+ ,1386
+ ,41
+ ,411
+ ,97
+ ,36
+ ,136
+ ,98
+ ,8388
+ ,55515
+ ,120
+ ,89
+ ,3
+ ,2395
+ ,86
+ ,975
+ ,53
+ ,31
+ ,117
+ ,82
+ ,22120
+ ,209056
+ ,195
+ ,193
+ ,-3
+ ,2699
+ ,95
+ ,964
+ ,144
+ ,33
+ ,124
+ ,115
+ ,20923
+ ,142775
+ ,106
+ ,101
+ ,0
+ ,1606
+ ,49
+ ,537
+ ,60
+ ,40
+ ,151
+ ,140
+ ,20237
+ ,68847
+ ,83
+ ,82
+ ,-4
+ ,1204
+ ,64
+ ,369
+ ,89
+ ,38
+ ,145
+ ,120
+ ,3769
+ ,20112
+ ,37
+ ,36
+ ,2
+ ,1138
+ ,38
+ ,417
+ ,42
+ ,24
+ ,87
+ ,66
+ ,12252
+ ,61023
+ ,77
+ ,75
+ ,-1
+ ,1111
+ ,52
+ ,389
+ ,52
+ ,43
+ ,165
+ ,139
+ ,21721
+ ,112494
+ ,144
+ ,131
+ ,3
+ ,2186
+ ,247
+ ,719
+ ,128
+ ,31
+ ,120
+ ,119
+ ,17939
+ ,78876
+ ,95
+ ,90
+ ,2
+ ,3604
+ ,139
+ ,1277
+ ,142
+ ,40
+ ,150
+ ,141
+ ,23436
+ ,170745
+ ,169
+ ,166
+ ,5
+ ,3261
+ ,110
+ ,1402
+ ,128
+ ,37
+ ,136
+ ,133
+ ,34538
+ ,122037
+ ,134
+ ,133
+ ,2
+ ,1641
+ ,67
+ ,564
+ ,50
+ ,31
+ ,116
+ ,98
+ ,25515
+ ,112283
+ ,197
+ ,196
+ ,-2
+ ,2312
+ ,83
+ ,747
+ ,50
+ ,39
+ ,150
+ ,117
+ ,29402
+ ,120691
+ ,140
+ ,136
+ ,0
+ ,2201
+ ,70
+ ,861
+ ,46
+ ,32
+ ,118
+ ,105
+ ,28732
+ ,122422
+ ,125
+ ,123
+ ,3
+ ,961
+ ,32
+ ,319
+ ,57
+ ,18
+ ,71
+ ,55
+ ,5250
+ ,25899
+ ,21
+ ,21
+ ,-2
+ ,1900
+ ,83
+ ,612
+ ,52
+ ,39
+ ,144
+ ,132
+ ,28608
+ ,139296
+ ,167
+ ,163
+ ,0
+ ,1645
+ ,70
+ ,564
+ ,48
+ ,30
+ ,110
+ ,73
+ ,14817
+ ,89455
+ ,96
+ ,96
+ ,6
+ ,2429
+ ,103
+ ,824
+ ,91
+ ,37
+ ,147
+ ,86
+ ,16714
+ ,147866
+ ,151
+ ,151
+ ,-3
+ ,872
+ ,34
+ ,239
+ ,70
+ ,32
+ ,111
+ ,48
+ ,1669
+ ,14336
+ ,23
+ ,23
+ ,3
+ ,1018
+ ,40
+ ,459
+ ,37
+ ,17
+ ,68
+ ,48
+ ,7768
+ ,30059
+ ,21
+ ,14
+ ,0
+ ,1403
+ ,46
+ ,454
+ ,72
+ ,12
+ ,48
+ ,43
+ ,7936
+ ,41907
+ ,90
+ ,87
+ ,-2
+ ,616
+ ,18
+ ,225
+ ,24
+ ,13
+ ,51
+ ,46
+ ,7294
+ ,35885
+ ,60
+ ,56
+ ,1
+ ,1232
+ ,60
+ ,389
+ ,90
+ ,17
+ ,68
+ ,65
+ ,13275
+ ,55764
+ ,26
+ ,25
+ ,0
+ ,1255
+ ,39
+ ,339
+ ,45
+ ,17
+ ,64
+ ,52
+ ,5401
+ ,35619
+ ,41
+ ,41
+ ,2
+ ,995
+ ,31
+ ,333
+ ,26
+ ,20
+ ,76
+ ,68
+ ,8702
+ ,40557
+ ,35
+ ,33
+ ,2
+ ,2048
+ ,54
+ ,636
+ ,132
+ ,17
+ ,66
+ ,47
+ ,8030
+ ,44197
+ ,68
+ ,68
+ ,-3
+ ,301
+ ,14
+ ,93
+ ,35
+ ,17
+ ,68
+ ,41
+ ,1278
+ ,4103
+ ,6
+ ,6
+ ,-2
+ ,628
+ ,23
+ ,170
+ ,48
+ ,17
+ ,66
+ ,47
+ ,1574
+ ,4694
+ ,0
+ ,0
+ ,1
+ ,1597
+ ,77
+ ,530
+ ,124
+ ,22
+ ,83
+ ,71
+ ,9653
+ ,62991
+ ,41
+ ,39
+ ,-4
+ ,717
+ ,19
+ ,201
+ ,35
+ ,15
+ ,55
+ ,30
+ ,7067
+ ,24261
+ ,38
+ ,37
+ ,0
+ ,652
+ ,49
+ ,227
+ ,49
+ ,12
+ ,41
+ ,24
+ ,1514
+ ,21425
+ ,47
+ ,47
+ ,1
+ ,733
+ ,20
+ ,261
+ ,45
+ ,17
+ ,66
+ ,63
+ ,5432
+ ,27184
+ ,34
+ ,34
+ ,0)
+ ,dim=c(12
+ ,85)
+ ,dimnames=list(c('pageviews'
+ ,'logins'
+ ,'comp_views'
+ ,'comp_views_pr'
+ ,'comp_reviewed'
+ ,'Feedback_p1'
+ ,'feedback_p120'
+ ,'revisions'
+ ,'seconds'
+ ,'hyperlinks'
+ ,'blogs'
+ ,'testscores')
+ ,1:85))
> y <- array(NA,dim=c(12,85),dimnames=list(c('pageviews','logins','comp_views','comp_views_pr','comp_reviewed','Feedback_p1','feedback_p120','revisions','seconds','hyperlinks','blogs','testscores'),1:85))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '12'
> 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
testscores pageviews logins comp_views comp_views_pr comp_reviewed
1 2 1418 56 396 81 30
2 4 2172 89 967 125 30
3 0 1583 44 656 66 26
4 0 1764 84 655 74 38
5 -4 1495 88 465 49 44
6 4 1373 55 525 52 30
7 4 2187 60 885 88 40
8 0 4041 154 1436 108 47
9 -1 1706 53 612 43 30
10 0 2152 119 865 75 31
11 1 2242 75 963 86 30
12 0 2515 92 966 135 34
13 3 2147 100 801 63 31
14 -1 1638 73 513 52 33
15 4 2452 77 992 59 33
16 3 2662 99 937 64 36
17 1 865 30 260 32 14
18 0 1793 76 503 129 17
19 -2 2527 146 927 37 32
20 -3 2747 67 1269 31 30
21 -4 1324 56 537 65 35
22 2 1383 58 532 74 28
23 2 4308 119 1635 715 34
24 -4 1831 66 557 66 39
25 3 3373 89 1178 106 39
26 2 2352 41 866 112 29
27 2 2144 68 574 66 44
28 0 4691 168 1276 190 21
29 5 2694 132 825 165 28
30 -2 1769 71 663 61 28
31 0 3148 112 1069 53 38
32 -2 1954 70 711 38 32
33 -3 1226 57 503 50 29
34 2 1496 103 464 42 27
35 2 1943 52 657 53 40
36 2 1762 62 577 50 40
37 0 1403 45 619 77 28
38 4 1425 46 479 57 34
39 4 1857 63 817 73 33
40 2 1420 53 537 63 33
41 2 1644 78 465 47 35
42 -4 1054 46 299 57 29
43 3 937 41 248 36 20
44 3 2547 91 905 63 37
45 2 1626 63 512 63 33
46 -1 1964 63 786 110 29
47 -3 1381 32 489 56 28
48 0 1290 34 351 71 21
49 1 1982 93 669 56 41
50 -3 1590 55 506 79 20
51 3 1281 72 407 67 30
52 0 1272 42 316 76 22
53 0 1944 71 603 65 42
54 0 1605 65 577 45 32
55 3 1386 41 411 97 36
56 -3 2395 86 975 53 31
57 0 2699 95 964 144 33
58 -4 1606 49 537 60 40
59 2 1204 64 369 89 38
60 -1 1138 38 417 42 24
61 3 1111 52 389 52 43
62 2 2186 247 719 128 31
63 5 3604 139 1277 142 40
64 2 3261 110 1402 128 37
65 -2 1641 67 564 50 31
66 0 2312 83 747 50 39
67 3 2201 70 861 46 32
68 -2 961 32 319 57 18
69 0 1900 83 612 52 39
70 6 1645 70 564 48 30
71 -3 2429 103 824 91 37
72 3 872 34 239 70 32
73 0 1018 40 459 37 17
74 -2 1403 46 454 72 12
75 1 616 18 225 24 13
76 0 1232 60 389 90 17
77 2 1255 39 339 45 17
78 2 995 31 333 26 20
79 -3 2048 54 636 132 17
80 -2 301 14 93 35 17
81 1 628 23 170 48 17
82 -4 1597 77 530 124 22
83 0 717 19 201 35 15
84 1 652 49 227 49 12
85 0 733 20 261 45 17
Feedback_p1 feedback_p120 revisions seconds hyperlinks blogs t
1 115 94 24188 146283 144 145 1
2 116 103 32287 96933 135 132 2
3 100 93 27101 95757 84 84 3
4 140 123 19716 143983 130 127 4
5 166 148 17753 75851 82 78 5
6 99 90 9028 59238 60 60 6
7 139 124 18653 93163 131 131 7
8 181 168 29498 151511 140 133 8
9 116 115 27563 136368 151 150 9
10 116 71 18293 112642 91 91 10
11 108 108 16116 127766 119 118 11
12 129 120 26569 85646 123 119 12
13 118 114 24785 98579 90 89 13
14 125 120 23825 131741 113 108 14
15 127 124 34461 171975 175 162 15
16 136 126 24919 159676 96 92 16
17 46 37 12558 58391 41 41 17
18 54 38 7784 31580 47 47 18
19 124 120 28522 136815 126 120 19
20 115 93 22265 120642 105 105 20
21 128 95 14459 69107 80 79 21
22 97 90 22240 108016 73 70 22
23 125 110 11912 79336 68 67 23
24 149 138 18220 93176 127 127 24
25 149 133 19199 161632 154 152 25
26 108 96 25239 102996 112 109 26
27 166 164 29801 160604 137 133 27
28 80 78 18450 158051 135 123 28
29 107 102 34861 162647 230 230 29
30 107 99 16688 60622 71 68 30
31 146 129 24683 179566 147 147 31
32 123 114 21436 96144 105 101 32
33 111 99 30546 129847 107 108 33
34 105 104 15977 71180 116 114 34
35 155 138 14251 86767 89 88 35
36 155 151 16851 93487 84 83 36
37 104 72 21113 82981 113 113 37
38 132 120 17401 73815 120 118 38
39 127 115 23958 94552 110 110 39
40 122 98 14587 67808 78 76 40
41 87 71 20537 106175 145 141 41
42 109 107 30495 76669 91 91 42
43 78 73 7117 57283 48 48 43
44 141 129 33473 72413 150 144 44
45 124 118 21115 96971 181 168 45
46 112 104 32902 120336 121 117 46
47 108 107 25131 93913 99 100 47
48 78 36 6943 32036 40 37 48
49 158 139 31808 102255 87 87 49
50 78 56 17014 63506 66 64 50
51 119 93 6440 68370 58 58 51
52 88 87 18647 50517 77 76 52
53 155 110 20556 103950 130 129 53
54 123 83 22392 84396 101 101 54
55 136 98 8388 55515 120 89 55
56 117 82 22120 209056 195 193 56
57 124 115 20923 142775 106 101 57
58 151 140 20237 68847 83 82 58
59 145 120 3769 20112 37 36 59
60 87 66 12252 61023 77 75 60
61 165 139 21721 112494 144 131 61
62 120 119 17939 78876 95 90 62
63 150 141 23436 170745 169 166 63
64 136 133 34538 122037 134 133 64
65 116 98 25515 112283 197 196 65
66 150 117 29402 120691 140 136 66
67 118 105 28732 122422 125 123 67
68 71 55 5250 25899 21 21 68
69 144 132 28608 139296 167 163 69
70 110 73 14817 89455 96 96 70
71 147 86 16714 147866 151 151 71
72 111 48 1669 14336 23 23 72
73 68 48 7768 30059 21 14 73
74 48 43 7936 41907 90 87 74
75 51 46 7294 35885 60 56 75
76 68 65 13275 55764 26 25 76
77 64 52 5401 35619 41 41 77
78 76 68 8702 40557 35 33 78
79 66 47 8030 44197 68 68 79
80 68 41 1278 4103 6 6 80
81 66 47 1574 4694 0 0 81
82 83 71 9653 62991 41 39 82
83 55 30 7067 24261 38 37 83
84 41 24 1514 21425 47 47 84
85 66 63 5432 27184 34 34 85
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) pageviews logins comp_views comp_views_pr
-4.992e-01 -6.989e-04 3.966e-03 2.248e-03 1.338e-03
comp_reviewed Feedback_p1 feedback_p120 revisions seconds
2.827e-01 -8.931e-02 2.626e-02 -6.293e-05 -7.276e-06
hyperlinks blogs t
7.820e-02 -6.573e-02 -1.027e-03
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.0275 -1.4329 0.1254 1.5802 5.9229
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -4.992e-01 1.473e+00 -0.339 0.736
pageviews -6.989e-04 1.359e-03 -0.514 0.609
logins 3.966e-03 1.150e-02 0.345 0.731
comp_views 2.248e-03 3.119e-03 0.721 0.473
comp_views_pr 1.338e-03 4.867e-03 0.275 0.784
comp_reviewed 2.827e-01 1.760e-01 1.607 0.112
Feedback_p1 -8.931e-02 5.231e-02 -1.707 0.092 .
feedback_p120 2.626e-02 2.450e-02 1.072 0.287
revisions -6.294e-05 5.914e-05 -1.064 0.291
seconds -7.276e-06 1.398e-05 -0.520 0.604
hyperlinks 7.820e-02 6.604e-02 1.184 0.240
blogs -6.573e-02 6.855e-02 -0.959 0.341
t -1.027e-03 1.373e-02 -0.075 0.941
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.5 on 72 degrees of freedom
Multiple R-squared: 0.1163, Adjusted R-squared: -0.03101
F-statistic: 0.7895 on 12 and 72 DF, p-value: 0.6595
> 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.4104710 0.82094199 0.58952900
[2,] 0.2591182 0.51823637 0.74088182
[3,] 0.1712565 0.34251298 0.82874351
[4,] 0.2842779 0.56855576 0.71572212
[5,] 0.1958271 0.39165418 0.80417291
[6,] 0.1498205 0.29964099 0.85017951
[7,] 0.1848937 0.36978737 0.81510631
[8,] 0.1212848 0.24256962 0.87871519
[9,] 0.1778364 0.35567279 0.82216361
[10,] 0.3346574 0.66931472 0.66534264
[11,] 0.2634991 0.52699811 0.73650095
[12,] 0.2030079 0.40601583 0.79699208
[13,] 0.2046242 0.40924834 0.79537583
[14,] 0.2711821 0.54236426 0.72881787
[15,] 0.3361104 0.67222080 0.66388960
[16,] 0.2730262 0.54605232 0.72697384
[17,] 0.3020825 0.60416498 0.69791751
[18,] 0.3653476 0.73069522 0.63465239
[19,] 0.5977904 0.80441929 0.40220964
[20,] 0.7766487 0.44670260 0.22335130
[21,] 0.8006698 0.39866047 0.19933023
[22,] 0.7484114 0.50317715 0.25158857
[23,] 0.8082212 0.38355763 0.19177881
[24,] 0.8429082 0.31418356 0.15709178
[25,] 0.8110573 0.37788531 0.18894266
[26,] 0.8511163 0.29776740 0.14888370
[27,] 0.8737593 0.25248133 0.12624066
[28,] 0.8657799 0.26844024 0.13422012
[29,] 0.8454504 0.30909926 0.15454963
[30,] 0.8067161 0.38656771 0.19328385
[31,] 0.8014292 0.39714153 0.19857077
[32,] 0.7918368 0.41632636 0.20816318
[33,] 0.7385515 0.52289698 0.26144849
[34,] 0.7075676 0.58486478 0.29243239
[35,] 0.6770789 0.64584214 0.32292107
[36,] 0.7280016 0.54399671 0.27199835
[37,] 0.7710994 0.45780128 0.22890064
[38,] 0.7094730 0.58105394 0.29052697
[39,] 0.6875160 0.62496806 0.31248403
[40,] 0.6559654 0.68806916 0.34403458
[41,] 0.7333065 0.53338700 0.26669350
[42,] 0.6596979 0.68060424 0.34030212
[43,] 0.8488113 0.30237747 0.15118874
[44,] 0.7947120 0.41057605 0.20528803
[45,] 0.8579452 0.28410959 0.14205479
[46,] 0.9380503 0.12389945 0.06194972
[47,] 0.8991996 0.20160088 0.10080044
[48,] 0.9160337 0.16793257 0.08396628
[49,] 0.8711340 0.25773204 0.12886602
[50,] 0.8099762 0.38004751 0.19002376
[51,] 0.7088795 0.58224109 0.29112054
[52,] 0.6558070 0.68838604 0.34419302
[53,] 0.9566915 0.08661703 0.04330851
[54,] 0.8826906 0.23461880 0.11730940
> postscript(file="/var/www/rcomp/tmp/145vm1323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/293vy1323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/3dgvs1323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/4gfjq1323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/51n7p1323949037.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 = 85
Frequency = 1
1 2 3 4 5 6
2.44780471 3.35556193 0.36420517 -1.16811221 -5.02752877 2.24489211
7 8 9 10 11 12
1.75712662 -1.43286236 -1.30607050 0.06408498 -0.77770223 -1.19178258
13 14 15 16 17 18
2.60141697 -1.45085766 2.75383321 2.72120667 1.25745084 -0.68167448
19 20 21 22 23 24
-2.72633061 -3.40347651 -4.67877301 1.42513464 -0.49420037 -4.90044315
25 26 27 28 29 30
1.86050912 1.58023922 1.52902163 -0.98395600 4.28361814 -2.63805327
31 32 33 34 35 36
-0.25167521 -2.60814662 -2.32032124 1.03044109 1.40218827 1.35440691
37 38 39 40 41 42
-0.15045457 3.22828702 3.46986205 1.33102302 -1.72293529 -3.58350116
43 44 45 46 47 48
3.09092710 1.95811973 -0.23443871 -0.99752879 -2.77278991 0.48898883
49 50 51 52 53 54
1.51748409 -2.37988526 3.04041502 0.33298894 -0.36835727 0.58368062
55 56 57 58 59 60
0.10069982 -3.49147144 -0.86233198 -4.62604531 1.11079018 -1.41314696
61 62 63 64 65 66
1.65247455 0.34116780 3.26865914 0.60291422 -2.96514574 0.12541054
67 68 69 70 71 72
2.57473274 -1.61481434 -1.03974801 5.92288861 -2.45849653 2.94529157
73 74 75 76 77 78
0.03777315 -2.49368899 0.77795667 0.61671653 2.11036747 1.99079627
79 80 81 82 83 84
-2.97579835 -1.29403035 1.47096008 -4.21153533 0.47665468 0.57485285
85
-0.07791443
> postscript(file="/var/www/rcomp/tmp/6cgbl1323949037.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 = 85
Frequency = 1
lag(myerror, k = 1) myerror
0 2.44780471 NA
1 3.35556193 2.44780471
2 0.36420517 3.35556193
3 -1.16811221 0.36420517
4 -5.02752877 -1.16811221
5 2.24489211 -5.02752877
6 1.75712662 2.24489211
7 -1.43286236 1.75712662
8 -1.30607050 -1.43286236
9 0.06408498 -1.30607050
10 -0.77770223 0.06408498
11 -1.19178258 -0.77770223
12 2.60141697 -1.19178258
13 -1.45085766 2.60141697
14 2.75383321 -1.45085766
15 2.72120667 2.75383321
16 1.25745084 2.72120667
17 -0.68167448 1.25745084
18 -2.72633061 -0.68167448
19 -3.40347651 -2.72633061
20 -4.67877301 -3.40347651
21 1.42513464 -4.67877301
22 -0.49420037 1.42513464
23 -4.90044315 -0.49420037
24 1.86050912 -4.90044315
25 1.58023922 1.86050912
26 1.52902163 1.58023922
27 -0.98395600 1.52902163
28 4.28361814 -0.98395600
29 -2.63805327 4.28361814
30 -0.25167521 -2.63805327
31 -2.60814662 -0.25167521
32 -2.32032124 -2.60814662
33 1.03044109 -2.32032124
34 1.40218827 1.03044109
35 1.35440691 1.40218827
36 -0.15045457 1.35440691
37 3.22828702 -0.15045457
38 3.46986205 3.22828702
39 1.33102302 3.46986205
40 -1.72293529 1.33102302
41 -3.58350116 -1.72293529
42 3.09092710 -3.58350116
43 1.95811973 3.09092710
44 -0.23443871 1.95811973
45 -0.99752879 -0.23443871
46 -2.77278991 -0.99752879
47 0.48898883 -2.77278991
48 1.51748409 0.48898883
49 -2.37988526 1.51748409
50 3.04041502 -2.37988526
51 0.33298894 3.04041502
52 -0.36835727 0.33298894
53 0.58368062 -0.36835727
54 0.10069982 0.58368062
55 -3.49147144 0.10069982
56 -0.86233198 -3.49147144
57 -4.62604531 -0.86233198
58 1.11079018 -4.62604531
59 -1.41314696 1.11079018
60 1.65247455 -1.41314696
61 0.34116780 1.65247455
62 3.26865914 0.34116780
63 0.60291422 3.26865914
64 -2.96514574 0.60291422
65 0.12541054 -2.96514574
66 2.57473274 0.12541054
67 -1.61481434 2.57473274
68 -1.03974801 -1.61481434
69 5.92288861 -1.03974801
70 -2.45849653 5.92288861
71 2.94529157 -2.45849653
72 0.03777315 2.94529157
73 -2.49368899 0.03777315
74 0.77795667 -2.49368899
75 0.61671653 0.77795667
76 2.11036747 0.61671653
77 1.99079627 2.11036747
78 -2.97579835 1.99079627
79 -1.29403035 -2.97579835
80 1.47096008 -1.29403035
81 -4.21153533 1.47096008
82 0.47665468 -4.21153533
83 0.57485285 0.47665468
84 -0.07791443 0.57485285
85 NA -0.07791443
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.35556193 2.44780471
[2,] 0.36420517 3.35556193
[3,] -1.16811221 0.36420517
[4,] -5.02752877 -1.16811221
[5,] 2.24489211 -5.02752877
[6,] 1.75712662 2.24489211
[7,] -1.43286236 1.75712662
[8,] -1.30607050 -1.43286236
[9,] 0.06408498 -1.30607050
[10,] -0.77770223 0.06408498
[11,] -1.19178258 -0.77770223
[12,] 2.60141697 -1.19178258
[13,] -1.45085766 2.60141697
[14,] 2.75383321 -1.45085766
[15,] 2.72120667 2.75383321
[16,] 1.25745084 2.72120667
[17,] -0.68167448 1.25745084
[18,] -2.72633061 -0.68167448
[19,] -3.40347651 -2.72633061
[20,] -4.67877301 -3.40347651
[21,] 1.42513464 -4.67877301
[22,] -0.49420037 1.42513464
[23,] -4.90044315 -0.49420037
[24,] 1.86050912 -4.90044315
[25,] 1.58023922 1.86050912
[26,] 1.52902163 1.58023922
[27,] -0.98395600 1.52902163
[28,] 4.28361814 -0.98395600
[29,] -2.63805327 4.28361814
[30,] -0.25167521 -2.63805327
[31,] -2.60814662 -0.25167521
[32,] -2.32032124 -2.60814662
[33,] 1.03044109 -2.32032124
[34,] 1.40218827 1.03044109
[35,] 1.35440691 1.40218827
[36,] -0.15045457 1.35440691
[37,] 3.22828702 -0.15045457
[38,] 3.46986205 3.22828702
[39,] 1.33102302 3.46986205
[40,] -1.72293529 1.33102302
[41,] -3.58350116 -1.72293529
[42,] 3.09092710 -3.58350116
[43,] 1.95811973 3.09092710
[44,] -0.23443871 1.95811973
[45,] -0.99752879 -0.23443871
[46,] -2.77278991 -0.99752879
[47,] 0.48898883 -2.77278991
[48,] 1.51748409 0.48898883
[49,] -2.37988526 1.51748409
[50,] 3.04041502 -2.37988526
[51,] 0.33298894 3.04041502
[52,] -0.36835727 0.33298894
[53,] 0.58368062 -0.36835727
[54,] 0.10069982 0.58368062
[55,] -3.49147144 0.10069982
[56,] -0.86233198 -3.49147144
[57,] -4.62604531 -0.86233198
[58,] 1.11079018 -4.62604531
[59,] -1.41314696 1.11079018
[60,] 1.65247455 -1.41314696
[61,] 0.34116780 1.65247455
[62,] 3.26865914 0.34116780
[63,] 0.60291422 3.26865914
[64,] -2.96514574 0.60291422
[65,] 0.12541054 -2.96514574
[66,] 2.57473274 0.12541054
[67,] -1.61481434 2.57473274
[68,] -1.03974801 -1.61481434
[69,] 5.92288861 -1.03974801
[70,] -2.45849653 5.92288861
[71,] 2.94529157 -2.45849653
[72,] 0.03777315 2.94529157
[73,] -2.49368899 0.03777315
[74,] 0.77795667 -2.49368899
[75,] 0.61671653 0.77795667
[76,] 2.11036747 0.61671653
[77,] 1.99079627 2.11036747
[78,] -2.97579835 1.99079627
[79,] -1.29403035 -2.97579835
[80,] 1.47096008 -1.29403035
[81,] -4.21153533 1.47096008
[82,] 0.47665468 -4.21153533
[83,] 0.57485285 0.47665468
[84,] -0.07791443 0.57485285
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.35556193 2.44780471
2 0.36420517 3.35556193
3 -1.16811221 0.36420517
4 -5.02752877 -1.16811221
5 2.24489211 -5.02752877
6 1.75712662 2.24489211
7 -1.43286236 1.75712662
8 -1.30607050 -1.43286236
9 0.06408498 -1.30607050
10 -0.77770223 0.06408498
11 -1.19178258 -0.77770223
12 2.60141697 -1.19178258
13 -1.45085766 2.60141697
14 2.75383321 -1.45085766
15 2.72120667 2.75383321
16 1.25745084 2.72120667
17 -0.68167448 1.25745084
18 -2.72633061 -0.68167448
19 -3.40347651 -2.72633061
20 -4.67877301 -3.40347651
21 1.42513464 -4.67877301
22 -0.49420037 1.42513464
23 -4.90044315 -0.49420037
24 1.86050912 -4.90044315
25 1.58023922 1.86050912
26 1.52902163 1.58023922
27 -0.98395600 1.52902163
28 4.28361814 -0.98395600
29 -2.63805327 4.28361814
30 -0.25167521 -2.63805327
31 -2.60814662 -0.25167521
32 -2.32032124 -2.60814662
33 1.03044109 -2.32032124
34 1.40218827 1.03044109
35 1.35440691 1.40218827
36 -0.15045457 1.35440691
37 3.22828702 -0.15045457
38 3.46986205 3.22828702
39 1.33102302 3.46986205
40 -1.72293529 1.33102302
41 -3.58350116 -1.72293529
42 3.09092710 -3.58350116
43 1.95811973 3.09092710
44 -0.23443871 1.95811973
45 -0.99752879 -0.23443871
46 -2.77278991 -0.99752879
47 0.48898883 -2.77278991
48 1.51748409 0.48898883
49 -2.37988526 1.51748409
50 3.04041502 -2.37988526
51 0.33298894 3.04041502
52 -0.36835727 0.33298894
53 0.58368062 -0.36835727
54 0.10069982 0.58368062
55 -3.49147144 0.10069982
56 -0.86233198 -3.49147144
57 -4.62604531 -0.86233198
58 1.11079018 -4.62604531
59 -1.41314696 1.11079018
60 1.65247455 -1.41314696
61 0.34116780 1.65247455
62 3.26865914 0.34116780
63 0.60291422 3.26865914
64 -2.96514574 0.60291422
65 0.12541054 -2.96514574
66 2.57473274 0.12541054
67 -1.61481434 2.57473274
68 -1.03974801 -1.61481434
69 5.92288861 -1.03974801
70 -2.45849653 5.92288861
71 2.94529157 -2.45849653
72 0.03777315 2.94529157
73 -2.49368899 0.03777315
74 0.77795667 -2.49368899
75 0.61671653 0.77795667
76 2.11036747 0.61671653
77 1.99079627 2.11036747
78 -2.97579835 1.99079627
79 -1.29403035 -2.97579835
80 1.47096008 -1.29403035
81 -4.21153533 1.47096008
82 0.47665468 -4.21153533
83 0.57485285 0.47665468
84 -0.07791443 0.57485285
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/7i3qb1323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/87mmb1323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/9siy21323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/rcomp/tmp/10mt0z1323949037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/119vrq1323949037.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/12bbhc1323949037.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/13yo1b1323949037.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/144cxm1323949037.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/15gnyn1323949037.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/16akz21323949037.tab")
+ }
>
> try(system("convert tmp/145vm1323949037.ps tmp/145vm1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/293vy1323949037.ps tmp/293vy1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/3dgvs1323949037.ps tmp/3dgvs1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/4gfjq1323949037.ps tmp/4gfjq1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/51n7p1323949037.ps tmp/51n7p1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/6cgbl1323949037.ps tmp/6cgbl1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/7i3qb1323949037.ps tmp/7i3qb1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/87mmb1323949037.ps tmp/87mmb1323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/9siy21323949037.ps tmp/9siy21323949037.png",intern=TRUE))
character(0)
> try(system("convert tmp/10mt0z1323949037.ps tmp/10mt0z1323949037.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.436 0.652 5.188