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(175
+ ,65
+ ,93
+ ,17
+ ,3198
+ ,472
+ ,906
+ ,18
+ ,72
+ ,49
+ ,1681
+ ,324
+ ,228
+ ,65
+ ,31
+ ,357
+ ,160
+ ,175
+ ,21
+ ,1993
+ ,643
+ ,173
+ ,6
+ ,254
+ ,829
+ ,88
+ ,337
+ ,300
+ ,19
+ ,18
+ ,107
+ ,62
+ ,29
+ ,16
+ ,5442
+ ,1932
+ ,1547
+ ,106
+ ,25
+ ,323
+ ,1508
+ ,1125
+ ,150
+ ,91
+ ,883
+ ,310
+ ,68
+ ,223
+ ,20
+ ,2245
+ ,815
+ ,176
+ ,5
+ ,165
+ ,64
+ ,1020
+ ,2121
+ ,1584
+ ,137
+ ,400
+ ,116
+ ,58
+ ,20
+ ,37
+ ,1239
+ ,478
+ ,374
+ ,4
+ ,97
+ ,56
+ ,229
+ ,7910
+ ,118
+ ,7426
+ ,365
+ ,376
+ ,70
+ ,280
+ ,25
+ ,6388
+ ,1083
+ ,1629
+ ,1255
+ ,907
+ ,1298
+ ,215
+ ,3551
+ ,1899
+ ,369
+ ,1283
+ ,230
+ ,115
+ ,90
+ ,25
+ ,1679
+ ,185
+ ,1040
+ ,9
+ ,20
+ ,16
+ ,409
+ ,1842
+ ,745
+ ,87
+ ,1011
+ ,54
+ ,33
+ ,7
+ ,14
+ ,830
+ ,224
+ ,130
+ ,7
+ ,6
+ ,54
+ ,408
+ ,175
+ ,100
+ ,50
+ ,25
+ ,194
+ ,44
+ ,135
+ ,15
+ ,2505
+ ,1148
+ ,346
+ ,2
+ ,804
+ ,53
+ ,152
+ ,2846
+ ,1844
+ ,97
+ ,905
+ ,171
+ ,73
+ ,78
+ ,21
+ ,4387
+ ,501
+ ,2614
+ ,1
+ ,381
+ ,296
+ ,593
+ ,5934
+ ,160
+ ,52
+ ,5722
+ ,311
+ ,46
+ ,248
+ ,17
+ ,2162
+ ,882
+ ,1051
+ ,3
+ ,13
+ ,42
+ ,170
+ ,2214
+ ,925
+ ,232
+ ,1056
+ ,290
+ ,81
+ ,186
+ ,22
+ ,11993
+ ,4115
+ ,7092
+ ,7
+ ,152
+ ,239
+ ,389
+ ,11672
+ ,1864
+ ,427
+ ,9381
+ ,4435
+ ,2053
+ ,687
+ ,1695
+ ,18864
+ ,11544
+ ,1324
+ ,433
+ ,23
+ ,293
+ ,5246
+ ,1012
+ ,183
+ ,63
+ ,765
+ ,440
+ ,101
+ ,307
+ ,32
+ ,1979
+ ,1533
+ ,290
+ ,19
+ ,10
+ ,76
+ ,51
+ ,222
+ ,72
+ ,100
+ ,50
+ ,1430
+ ,341
+ ,1048
+ ,41
+ ,19220
+ ,16061
+ ,422
+ ,204
+ ,41
+ ,759
+ ,1733
+ ,1494
+ ,1107
+ ,204
+ ,183
+ ,820
+ ,314
+ ,477
+ ,29
+ ,4410
+ ,3057
+ ,565
+ ,33
+ ,37
+ ,55
+ ,664
+ ,1022
+ ,845
+ ,111
+ ,65
+ ,223
+ ,141
+ ,43
+ ,39
+ ,6942
+ ,4858
+ ,760
+ ,11
+ ,182
+ ,220
+ ,911
+ ,881
+ ,587
+ ,54
+ ,240
+ ,426
+ ,270
+ ,122
+ ,34
+ ,7762
+ ,3417
+ ,3497
+ ,118
+ ,111
+ ,242
+ ,376
+ ,11267
+ ,9242
+ ,611
+ ,1414
+ ,1693
+ ,320
+ ,566
+ ,807
+ ,17814
+ ,4783
+ ,9768
+ ,11
+ ,82
+ ,114
+ ,3057
+ ,1248
+ ,246
+ ,701
+ ,301
+ ,2068
+ ,44
+ ,2010
+ ,13
+ ,2523
+ ,1631
+ ,458
+ ,32
+ ,47
+ ,219
+ ,136
+ ,924
+ ,256
+ ,571
+ ,97
+ ,832
+ ,589
+ ,222
+ ,20
+ ,12586
+ ,4622
+ ,6225
+ ,49
+ ,254
+ ,237
+ ,1199
+ ,8451
+ ,4807
+ ,131
+ ,3512
+ ,416
+ ,149
+ ,236
+ ,30
+ ,2244
+ ,1292
+ ,449
+ ,151
+ ,106
+ ,58
+ ,188
+ ,2274
+ ,1993
+ ,164
+ ,117
+ ,372
+ ,79
+ ,262
+ ,31
+ ,7931
+ ,3167
+ ,2963
+ ,56
+ ,94
+ ,1467
+ ,185
+ ,1504
+ ,228
+ ,62
+ ,1214
+ ,5266
+ ,751
+ ,3929
+ ,586
+ ,15720
+ ,4019
+ ,6676
+ ,122
+ ,152
+ ,578
+ ,4173
+ ,8090
+ ,7235
+ ,294
+ ,561
+ ,633
+ ,155
+ ,456
+ ,22
+ ,3029
+ ,1432
+ ,354
+ ,677
+ ,14
+ ,25
+ ,527
+ ,2221
+ ,2089
+ ,21
+ ,111
+ ,191
+ ,107
+ ,35
+ ,48
+ ,8217
+ ,2339
+ ,358
+ ,54
+ ,55
+ ,88
+ ,5323
+ ,305
+ ,144
+ ,7
+ ,154
+ ,337
+ ,172
+ ,138
+ ,26
+ ,14346
+ ,8323
+ ,1902
+ ,37
+ ,489
+ ,484
+ ,3110
+ ,971
+ ,465
+ ,296
+ ,210
+ ,280
+ ,106
+ ,122
+ ,52
+ ,7944
+ ,6085
+ ,761
+ ,77
+ ,408
+ ,48
+ ,565
+ ,850
+ ,326
+ ,45
+ ,479
+ ,619
+ ,149
+ ,270
+ ,200
+ ,6745
+ ,2291
+ ,3466
+ ,209
+ ,119
+ ,491
+ ,170
+ ,1986
+ ,1314
+ ,208
+ ,464
+ ,2423
+ ,2125
+ ,243
+ ,55
+ ,10650
+ ,3023
+ ,3415
+ ,43
+ ,1195
+ ,202
+ ,2774
+ ,3128
+ ,1238
+ ,1247
+ ,643
+ ,538
+ ,297
+ ,189
+ ,52
+ ,17682
+ ,6288
+ ,2152
+ ,3709
+ ,1979
+ ,1270
+ ,2284
+ ,3571
+ ,2417
+ ,148
+ ,1006
+ ,294
+ ,93
+ ,180
+ ,20
+ ,6789
+ ,6005
+ ,307
+ ,9
+ ,127
+ ,160
+ ,182
+ ,2842
+ ,2435
+ ,249
+ ,159
+ ,430
+ ,293
+ ,116
+ ,21
+ ,10109
+ ,5006
+ ,2237
+ ,49
+ ,1162
+ ,296
+ ,1360
+ ,1352
+ ,951
+ ,211
+ ,191
+ ,737
+ ,325
+ ,321
+ ,92
+ ,11981
+ ,6187
+ ,1628
+ ,168
+ ,523
+ ,335
+ ,3139
+ ,5806
+ ,4695
+ ,763
+ ,348
+ ,541
+ ,169
+ ,346
+ ,26
+ ,24259
+ ,2127
+ ,19327
+ ,1578
+ ,89
+ ,233
+ ,906
+ ,4049
+ ,1991
+ ,308
+ ,1749
+ ,1214
+ ,209
+ ,878
+ ,126
+ ,68744
+ ,17503
+ ,31561
+ ,830
+ ,725
+ ,571
+ ,17553
+ ,19550
+ ,11173
+ ,561
+ ,7816
+ ,929
+ ,130
+ ,760
+ ,39
+ ,85056
+ ,3661
+ ,76825
+ ,11
+ ,62
+ ,60
+ ,4436
+ ,58941
+ ,22003
+ ,92
+ ,36845
+ ,1288
+ ,67
+ ,1201
+ ,20
+ ,3134
+ ,2026
+ ,101
+ ,120
+ ,440
+ ,412
+ ,35
+ ,1621
+ ,1312
+ ,210
+ ,99
+ ,321
+ ,152
+ ,148
+ ,21
+ ,6751
+ ,3231
+ ,1096
+ ,24
+ ,62
+ ,186
+ ,2151
+ ,1067
+ ,302
+ ,83
+ ,683
+ ,1912
+ ,388
+ ,1498
+ ,25
+ ,7098
+ ,3226
+ ,906
+ ,86
+ ,60
+ ,195
+ ,2625
+ ,393
+ ,86
+ ,33
+ ,274
+ ,146
+ ,62
+ ,59
+ ,25
+ ,6142
+ ,1805
+ ,3666
+ ,343
+ ,74
+ ,185
+ ,69
+ ,7059
+ ,6891
+ ,38
+ ,130
+ ,357
+ ,97
+ ,225
+ ,35
+ ,3974
+ ,1290
+ ,447
+ ,179
+ ,323
+ ,422
+ ,1313
+ ,7278
+ ,1673
+ ,5195
+ ,410
+ ,473
+ ,158
+ ,280
+ ,35
+ ,14614
+ ,6500
+ ,5219
+ ,35
+ ,236
+ ,427
+ ,2198
+ ,1433
+ ,592
+ ,160
+ ,682
+ ,153
+ ,55
+ ,87
+ ,11
+ ,13438
+ ,2539
+ ,643
+ ,4
+ ,9
+ ,9159
+ ,1084
+ ,2410
+ ,2285
+ ,35
+ ,90
+ ,681
+ ,521
+ ,142
+ ,19
+ ,9746
+ ,6710
+ ,529
+ ,881
+ ,105
+ ,863
+ ,658
+ ,902
+ ,420
+ ,177
+ ,305
+ ,337
+ ,109
+ ,208
+ ,20
+ ,23024
+ ,10028
+ ,2608
+ ,76
+ ,1095
+ ,4707
+ ,4509
+ ,3679
+ ,3542
+ ,39
+ ,98
+ ,433
+ ,70
+ ,332
+ ,31
+ ,12102
+ ,5223
+ ,1402
+ ,147
+ ,40
+ ,507
+ ,4782
+ ,607
+ ,211
+ ,17
+ ,380
+ ,751
+ ,116
+ ,610
+ ,26
+ ,41056
+ ,20553
+ ,3504
+ ,2593
+ ,142
+ ,958
+ ,13306
+ ,4527
+ ,1552
+ ,278
+ ,2697
+ ,655
+ ,126
+ ,475
+ ,55
+ ,2495
+ ,746
+ ,188
+ ,5
+ ,608
+ ,13
+ ,935
+ ,2352
+ ,1653
+ ,13
+ ,686
+ ,233
+ ,150
+ ,36
+ ,46
+ ,7056
+ ,3947
+ ,1383
+ ,36
+ ,19
+ ,70
+ ,1601
+ ,524
+ ,111
+ ,339
+ ,74
+ ,118
+ ,73
+ ,20
+ ,25
+ ,7708
+ ,2218
+ ,649
+ ,58
+ ,1833
+ ,474
+ ,2475
+ ,5784
+ ,5569
+ ,63
+ ,153
+ ,146
+ ,83
+ ,42
+ ,21
+ ,8229
+ ,4053
+ ,470
+ ,44
+ ,217
+ ,179
+ ,3266
+ ,11475
+ ,969
+ ,10056
+ ,450
+ ,365
+ ,197
+ ,153
+ ,16
+ ,4714
+ ,1548
+ ,896
+ ,8
+ ,207
+ ,247
+ ,1807
+ ,2940
+ ,499
+ ,1367
+ ,1074
+ ,653
+ ,112
+ ,519
+ ,22
+ ,14317
+ ,6280
+ ,986
+ ,369
+ ,4304
+ ,1989
+ ,389
+ ,36980
+ ,473
+ ,35687
+ ,820
+ ,434
+ ,168
+ ,168
+ ,97
+ ,5267
+ ,1674
+ ,1315
+ ,777
+ ,14
+ ,321
+ ,1165
+ ,1576
+ ,489
+ ,86
+ ,1002
+ ,231
+ ,62
+ ,156
+ ,12
+ ,4087
+ ,3700
+ ,126
+ ,11
+ ,74
+ ,158
+ ,18
+ ,607
+ ,353
+ ,21
+ ,232
+ ,123
+ ,50
+ ,57
+ ,16
+ ,3823
+ ,843
+ ,932
+ ,13
+ ,161
+ ,340
+ ,1532
+ ,1190
+ ,432
+ ,296
+ ,463
+ ,259
+ ,113
+ ,104
+ ,42
+ ,2137
+ ,1449
+ ,310
+ ,45
+ ,60
+ ,154
+ ,118
+ ,1731
+ ,681
+ ,247
+ ,804
+ ,98
+ ,46
+ ,28
+ ,23
+ ,4241
+ ,2098
+ ,548
+ ,73
+ ,174
+ ,963
+ ,384
+ ,617
+ ,120
+ ,306
+ ,191
+ ,2107
+ ,222
+ ,1839
+ ,46
+ ,13654
+ ,4027
+ ,4649
+ ,1876
+ ,584
+ ,1770
+ ,748
+ ,6107
+ ,3067
+ ,1179
+ ,1860
+ ,715
+ ,61
+ ,622
+ ,31
+ ,1913
+ ,1343
+ ,70
+ ,10
+ ,307
+ ,112
+ ,70
+ ,3524
+ ,2863
+ ,66
+ ,595
+ ,136
+ ,73
+ ,31
+ ,32
+ ,2380
+ ,1763
+ ,314
+ ,17
+ ,22
+ ,102
+ ,162
+ ,1432
+ ,94
+ ,52
+ ,1286
+ ,180
+ ,111
+ ,45
+ ,25
+ ,5223
+ ,731
+ ,4038
+ ,24
+ ,188
+ ,99
+ ,142
+ ,1150
+ ,560
+ ,184
+ ,406
+ ,172
+ ,63
+ ,79
+ ,31
+ ,2337
+ ,1923
+ ,127
+ ,125
+ ,24
+ ,129
+ ,10
+ ,879
+ ,585
+ ,84
+ ,210
+ ,170
+ ,58
+ ,79
+ ,33
+ ,10031
+ ,2334
+ ,276
+ ,89
+ ,467
+ ,4178
+ ,2687
+ ,7430
+ ,117
+ ,7171
+ ,143
+ ,380
+ ,131
+ ,205
+ ,45
+ ,4588
+ ,2647
+ ,624
+ ,51
+ ,49
+ ,315
+ ,900
+ ,3404
+ ,169
+ ,478
+ ,2756
+ ,813
+ ,110
+ ,674
+ ,29
+ ,9479
+ ,3400
+ ,4929
+ ,782
+ ,123
+ ,182
+ ,62
+ ,4945
+ ,642
+ ,115
+ ,4188
+ ,708
+ ,399
+ ,295
+ ,14
+ ,18171
+ ,2434
+ ,14635
+ ,7
+ ,237
+ ,852
+ ,6
+ ,602
+ ,420
+ ,81
+ ,101
+ ,193
+ ,79
+ ,93
+ ,22
+ ,14015
+ ,2237
+ ,9832
+ ,14
+ ,755
+ ,1122
+ ,55
+ ,3590
+ ,2114
+ ,437
+ ,1039
+ ,248
+ ,76
+ ,149
+ ,23
+ ,4919
+ ,1700
+ ,1148
+ ,244
+ ,539
+ ,177
+ ,1112
+ ,5262
+ ,4200
+ ,145
+ ,917
+ ,725
+ ,184
+ ,524
+ ,17
+ ,4573
+ ,513
+ ,2482
+ ,22
+ ,107
+ ,114
+ ,1334
+ ,3349
+ ,2550
+ ,106
+ ,694
+ ,13007
+ ,326
+ ,12645
+ ,36
+ ,82257
+ ,22476
+ ,47568
+ ,6098
+ ,186
+ ,974
+ ,4954
+ ,44336
+ ,38503
+ ,1757
+ ,4075
+ ,976
+ ,129
+ ,824
+ ,22
+ ,2375
+ ,385
+ ,728
+ ,5
+ ,284
+ ,92
+ ,880
+ ,947
+ ,385
+ ,13
+ ,548
+ ,185
+ ,63
+ ,98
+ ,24
+ ,3772
+ ,1961
+ ,512
+ ,431
+ ,99
+ ,61
+ ,707
+ ,1311
+ ,263
+ ,117
+ ,932
+ ,234
+ ,92
+ ,68
+ ,75
+ ,3954
+ ,1135
+ ,574
+ ,24
+ ,123
+ ,779
+ ,1318
+ ,1006
+ ,588
+ ,331
+ ,87
+ ,185
+ ,72
+ ,89
+ ,24
+ ,4861
+ ,698
+ ,834
+ ,18
+ ,2869
+ ,254
+ ,189
+ ,6224
+ ,5858
+ ,79
+ ,287
+ ,217
+ ,64
+ ,130
+ ,23
+ ,2652
+ ,308
+ ,918
+ ,19
+ ,483
+ ,161
+ ,764
+ ,6890
+ ,786
+ ,5853
+ ,251
+ ,802
+ ,358
+ ,404
+ ,40
+ ,13527
+ ,2432
+ ,7258
+ ,115
+ ,912
+ ,306
+ ,2504
+ ,3014
+ ,1114
+ ,391
+ ,1510
+ ,705
+ ,76
+ ,571
+ ,57
+ ,28039
+ ,810
+ ,23428
+ ,3
+ ,730
+ ,282
+ ,2786
+ ,3288
+ ,1782
+ ,82
+ ,1423
+ ,304
+ ,117
+ ,156
+ ,30
+ ,2874
+ ,456
+ ,418
+ ,311
+ ,1126
+ ,350
+ ,212
+ ,1787
+ ,551
+ ,1076
+ ,160
+ ,395
+ ,230
+ ,129
+ ,37
+ ,11152
+ ,765
+ ,9300
+ ,156
+ ,36
+ ,605
+ ,290
+ ,12518
+ ,993
+ ,2264
+ ,9261
+ ,439
+ ,161
+ ,254
+ ,24
+ ,2727
+ ,1018
+ ,363
+ ,40
+ ,30
+ ,71
+ ,1204
+ ,5500
+ ,4486
+ ,709
+ ,305
+ ,321
+ ,73
+ ,228
+ ,20
+ ,3056
+ ,1682
+ ,290
+ ,6
+ ,199
+ ,225
+ ,655
+ ,27519
+ ,27188
+ ,215
+ ,116
+ ,1015
+ ,231
+ ,736
+ ,48
+ ,47201
+ ,4177
+ ,33868
+ ,639
+ ,998
+ ,4298
+ ,3221
+ ,14607
+ ,4179
+ ,2663
+ ,7766
+ ,340
+ ,57
+ ,256
+ ,27
+ ,2370
+ ,1137
+ ,205
+ ,22
+ ,145
+ ,302
+ ,560
+ ,815
+ ,594
+ ,52
+ ,169
+ ,372
+ ,133
+ ,49
+ ,190
+ ,2439
+ ,1870
+ ,218
+ ,6
+ ,24
+ ,88
+ ,233
+ ,851
+ ,427
+ ,95
+ ,330
+ ,1772
+ ,80
+ ,1666
+ ,26
+ ,10484
+ ,6845
+ ,1048
+ ,1750
+ ,30
+ ,220
+ ,591
+ ,1152
+ ,869
+ ,123
+ ,160
+ ,163
+ ,101
+ ,38
+ ,24
+ ,3107
+ ,636
+ ,1742
+ ,7
+ ,335
+ ,58
+ ,329
+ ,3179
+ ,949
+ ,88
+ ,2141
+ ,197
+ ,118
+ ,44
+ ,35
+ ,14931
+ ,1375
+ ,377
+ ,51
+ ,11986
+ ,379
+ ,762
+ ,25090
+ ,2163
+ ,22199
+ ,728
+ ,610
+ ,79
+ ,508
+ ,23
+ ,8929
+ ,1418
+ ,401
+ ,23
+ ,857
+ ,2859
+ ,3371
+ ,3373
+ ,1551
+ ,703
+ ,1119
+ ,313
+ ,86
+ ,198
+ ,29
+ ,3814
+ ,1479
+ ,959
+ ,15
+ ,173
+ ,311
+ ,878
+ ,10931
+ ,8889
+ ,652
+ ,1390)
+ ,dim=c(15
+ ,91)
+ ,dimnames=list(c('O-Totaal'
+ ,'O-InbrengInContanten'
+ ,'O-InbrengInNatura'
+ ,'O-TeStortenBedrag'
+ ,'KH-Totaal'
+ ,'KH-InbrengInContanten'
+ ,'KH-InbrengInNatura'
+ ,'KH-TeStortenBedrag'
+ ,'KH-ConversieVanEigenMiddelen'
+ ,'KH-Schuldconversie'
+ ,'KH-Uitgiftepremies'
+ ,'KV-Totaal'
+ ,'KV-TerugbetalingAanDeAandeelhouders'
+ ,'KV-AanzuiveringVanVerliezen'
+ ,'KV-Andere')
+ ,1:91))
> y <- array(NA,dim=c(15,91),dimnames=list(c('O-Totaal','O-InbrengInContanten','O-InbrengInNatura','O-TeStortenBedrag','KH-Totaal','KH-InbrengInContanten','KH-InbrengInNatura','KH-TeStortenBedrag','KH-ConversieVanEigenMiddelen','KH-Schuldconversie','KH-Uitgiftepremies','KV-Totaal','KV-TerugbetalingAanDeAandeelhouders','KV-AanzuiveringVanVerliezen','KV-Andere'),1:91))
> 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'
> 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
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
O-Totaal O-InbrengInContanten O-InbrengInNatura O-TeStortenBedrag KH-Totaal
1 175 65 93 17 3198
2 357 160 175 21 1993
3 107 62 29 16 5442
4 310 68 223 20 2245
5 116 58 20 37 1239
6 376 70 280 25 6388
7 230 115 90 25 1679
8 54 33 7 14 830
9 194 44 135 15 2505
10 171 73 78 21 4387
11 311 46 248 17 2162
12 290 81 186 22 11993
13 4435 2053 687 1695 18864
14 440 101 307 32 1979
15 1430 341 1048 41 19220
16 820 314 477 29 4410
17 223 141 43 39 6942
18 426 270 122 34 7762
19 1693 320 566 807 17814
20 2068 44 2010 13 2523
21 832 589 222 20 12586
22 416 149 236 30 2244
23 372 79 262 31 7931
24 5266 751 3929 586 15720
25 633 155 456 22 3029
26 191 107 35 48 8217
27 337 172 138 26 14346
28 280 106 122 52 7944
29 619 149 270 200 6745
30 2423 2125 243 55 10650
31 538 297 189 52 17682
32 294 93 180 20 6789
33 430 293 116 21 10109
34 737 325 321 92 11981
35 541 169 346 26 24259
36 1214 209 878 126 68744
37 929 130 760 39 85056
38 1288 67 1201 20 3134
39 321 152 148 21 6751
40 1912 388 1498 25 7098
41 146 62 59 25 6142
42 357 97 225 35 3974
43 473 158 280 35 14614
44 153 55 87 11 13438
45 681 521 142 19 9746
46 337 109 208 20 23024
47 433 70 332 31 12102
48 751 116 610 26 41056
49 655 126 475 55 2495
50 233 150 36 46 7056
51 118 73 20 25 7708
52 146 83 42 21 8229
53 365 197 153 16 4714
54 653 112 519 22 14317
55 434 168 168 97 5267
56 231 62 156 12 4087
57 123 50 57 16 3823
58 259 113 104 42 2137
59 98 46 28 23 4241
60 2107 222 1839 46 13654
61 715 61 622 31 1913
62 136 73 31 32 2380
63 180 111 45 25 5223
64 172 63 79 31 2337
65 170 58 79 33 10031
66 380 131 205 45 4588
67 813 110 674 29 9479
68 708 399 295 14 18171
69 193 79 93 22 14015
70 248 76 149 23 4919
71 725 184 524 17 4573
72 13007 326 12645 36 82257
73 976 129 824 22 2375
74 185 63 98 24 3772
75 234 92 68 75 3954
76 185 72 89 24 4861
77 217 64 130 23 2652
78 802 358 404 40 13527
79 705 76 571 57 28039
80 304 117 156 30 2874
81 395 230 129 37 11152
82 439 161 254 24 2727
83 321 73 228 20 3056
84 1015 231 736 48 47201
85 340 57 256 27 2370
86 372 133 49 190 2439
87 1772 80 1666 26 10484
88 163 101 38 24 3107
89 197 118 44 35 14931
90 610 79 508 23 8929
91 313 86 198 29 3814
KH-InbrengInContanten KH-InbrengInNatura KH-TeStortenBedrag
1 472 906 18
2 643 173 6
3 1932 1547 106
4 815 176 5
5 478 374 4
6 1083 1629 1255
7 185 1040 9
8 224 130 7
9 1148 346 2
10 501 2614 1
11 882 1051 3
12 4115 7092 7
13 11544 1324 433
14 1533 290 19
15 16061 422 204
16 3057 565 33
17 4858 760 11
18 3417 3497 118
19 4783 9768 11
20 1631 458 32
21 4622 6225 49
22 1292 449 151
23 3167 2963 56
24 4019 6676 122
25 1432 354 677
26 2339 358 54
27 8323 1902 37
28 6085 761 77
29 2291 3466 209
30 3023 3415 43
31 6288 2152 3709
32 6005 307 9
33 5006 2237 49
34 6187 1628 168
35 2127 19327 1578
36 17503 31561 830
37 3661 76825 11
38 2026 101 120
39 3231 1096 24
40 3226 906 86
41 1805 3666 343
42 1290 447 179
43 6500 5219 35
44 2539 643 4
45 6710 529 881
46 10028 2608 76
47 5223 1402 147
48 20553 3504 2593
49 746 188 5
50 3947 1383 36
51 2218 649 58
52 4053 470 44
53 1548 896 8
54 6280 986 369
55 1674 1315 777
56 3700 126 11
57 843 932 13
58 1449 310 45
59 2098 548 73
60 4027 4649 1876
61 1343 70 10
62 1763 314 17
63 731 4038 24
64 1923 127 125
65 2334 276 89
66 2647 624 51
67 3400 4929 782
68 2434 14635 7
69 2237 9832 14
70 1700 1148 244
71 513 2482 22
72 22476 47568 6098
73 385 728 5
74 1961 512 431
75 1135 574 24
76 698 834 18
77 308 918 19
78 2432 7258 115
79 810 23428 3
80 456 418 311
81 765 9300 156
82 1018 363 40
83 1682 290 6
84 4177 33868 639
85 1137 205 22
86 1870 218 6
87 6845 1048 1750
88 636 1742 7
89 1375 377 51
90 1418 401 23
91 1479 959 15
KH-ConversieVanEigenMiddelen KH-Schuldconversie KH-Uitgiftepremies KV-Totaal
1 72 49 1681 324
2 254 829 88 337
3 25 323 1508 1125
4 165 64 1020 2121
5 97 56 229 7910
6 907 1298 215 3551
7 20 16 409 1842
8 6 54 408 175
9 804 53 152 2846
10 381 296 593 5934
11 13 42 170 2214
12 152 239 389 11672
13 23 293 5246 1012
14 10 76 51 222
15 41 759 1733 1494
16 37 55 664 1022
17 182 220 911 881
18 111 242 376 11267
19 82 114 3057 1248
20 47 219 136 924
21 254 237 1199 8451
22 106 58 188 2274
23 94 1467 185 1504
24 152 578 4173 8090
25 14 25 527 2221
26 55 88 5323 305
27 489 484 3110 971
28 408 48 565 850
29 119 491 170 1986
30 1195 202 2774 3128
31 1979 1270 2284 3571
32 127 160 182 2842
33 1162 296 1360 1352
34 523 335 3139 5806
35 89 233 906 4049
36 725 571 17553 19550
37 62 60 4436 58941
38 440 412 35 1621
39 62 186 2151 1067
40 60 195 2625 393
41 74 185 69 7059
42 323 422 1313 7278
43 236 427 2198 1433
44 9 9159 1084 2410
45 105 863 658 902
46 1095 4707 4509 3679
47 40 507 4782 607
48 142 958 13306 4527
49 608 13 935 2352
50 19 70 1601 524
51 1833 474 2475 5784
52 217 179 3266 11475
53 207 247 1807 2940
54 4304 1989 389 36980
55 14 321 1165 1576
56 74 158 18 607
57 161 340 1532 1190
58 60 154 118 1731
59 174 963 384 617
60 584 1770 748 6107
61 307 112 70 3524
62 22 102 162 1432
63 188 99 142 1150
64 24 129 10 879
65 467 4178 2687 7430
66 49 315 900 3404
67 123 182 62 4945
68 237 852 6 602
69 755 1122 55 3590
70 539 177 1112 5262
71 107 114 1334 3349
72 186 974 4954 44336
73 284 92 880 947
74 99 61 707 1311
75 123 779 1318 1006
76 2869 254 189 6224
77 483 161 764 6890
78 912 306 2504 3014
79 730 282 2786 3288
80 1126 350 212 1787
81 36 605 290 12518
82 30 71 1204 5500
83 199 225 655 27519
84 998 4298 3221 14607
85 145 302 560 815
86 24 88 233 851
87 30 220 591 1152
88 335 58 329 3179
89 11986 379 762 25090
90 857 2859 3371 3373
91 173 311 878 10931
KV-TerugbetalingAanDeAandeelhouders KV-AanzuiveringVanVerliezen KV-Andere
1 228 65 31
2 300 19 18
3 150 91 883
4 1584 137 400
5 118 7426 365
6 1899 369 1283
7 745 87 1011
8 100 50 25
9 1844 97 905
10 160 52 5722
11 925 232 1056
12 1864 427 9381
13 183 63 765
14 72 100 50
15 1107 204 183
16 845 111 65
17 587 54 240
18 9242 611 1414
19 246 701 301
20 256 571 97
21 4807 131 3512
22 1993 164 117
23 228 62 1214
24 7235 294 561
25 2089 21 111
26 144 7 154
27 465 296 210
28 326 45 479
29 1314 208 464
30 1238 1247 643
31 2417 148 1006
32 2435 249 159
33 951 211 191
34 4695 763 348
35 1991 308 1749
36 11173 561 7816
37 22003 92 36845
38 1312 210 99
39 302 83 683
40 86 33 274
41 6891 38 130
42 1673 5195 410
43 592 160 682
44 2285 35 90
45 420 177 305
46 3542 39 98
47 211 17 380
48 1552 278 2697
49 1653 13 686
50 111 339 74
51 5569 63 153
52 969 10056 450
53 499 1367 1074
54 473 35687 820
55 489 86 1002
56 353 21 232
57 432 296 463
58 681 247 804
59 120 306 191
60 3067 1179 1860
61 2863 66 595
62 94 52 1286
63 560 184 406
64 585 84 210
65 117 7171 143
66 169 478 2756
67 642 115 4188
68 420 81 101
69 2114 437 1039
70 4200 145 917
71 2550 106 694
72 38503 1757 4075
73 385 13 548
74 263 117 932
75 588 331 87
76 5858 79 287
77 786 5853 251
78 1114 391 1510
79 1782 82 1423
80 551 1076 160
81 993 2264 9261
82 4486 709 305
83 27188 215 116
84 4179 2663 7766
85 594 52 169
86 427 95 330
87 869 123 160
88 949 88 2141
89 2163 22199 728
90 1551 703 1119
91 8889 652 1390
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `O-InbrengInContanten`
0.13722 0.99990
`O-InbrengInNatura` `O-TeStortenBedrag`
1.00005 0.99988
`KH-Totaal` `KH-InbrengInContanten`
-0.01068 0.01067
`KH-InbrengInNatura` `KH-TeStortenBedrag`
0.01069 0.01054
`KH-ConversieVanEigenMiddelen` `KH-Schuldconversie`
0.01068 0.01065
`KH-Uitgiftepremies` `KV-Totaal`
0.01070 0.09247
`KV-TerugbetalingAanDeAandeelhouders` `KV-AanzuiveringVanVerliezen`
-0.09248 -0.09247
`KV-Andere`
-0.09251
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.17305 -0.15641 -0.06028 0.09114 1.10874
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.372e-01 1.060e-01 1.294 0.199
`O-InbrengInContanten` 9.999e-01 2.928e-04 3415.414 <2e-16
`O-InbrengInNatura` 1.000e+00 9.629e-05 10386.387 <2e-16
`O-TeStortenBedrag` 9.999e-01 4.498e-04 2222.814 <2e-16
`KH-Totaal` -1.068e-02 9.146e-02 -0.117 0.907
`KH-InbrengInContanten` 1.067e-02 9.145e-02 0.117 0.907
`KH-InbrengInNatura` 1.069e-02 9.146e-02 0.117 0.907
`KH-TeStortenBedrag` 1.054e-02 9.146e-02 0.115 0.909
`KH-ConversieVanEigenMiddelen` 1.068e-02 9.146e-02 0.117 0.907
`KH-Schuldconversie` 1.065e-02 9.146e-02 0.116 0.908
`KH-Uitgiftepremies` 1.070e-02 9.146e-02 0.117 0.907
`KV-Totaal` 9.247e-02 1.233e-01 0.750 0.456
`KV-TerugbetalingAanDeAandeelhouders` -9.248e-02 1.233e-01 -0.750 0.456
`KV-AanzuiveringVanVerliezen` -9.247e-02 1.233e-01 -0.750 0.456
`KV-Andere` -9.251e-02 1.233e-01 -0.750 0.455
(Intercept)
`O-InbrengInContanten` ***
`O-InbrengInNatura` ***
`O-TeStortenBedrag` ***
`KH-Totaal`
`KH-InbrengInContanten`
`KH-InbrengInNatura`
`KH-TeStortenBedrag`
`KH-ConversieVanEigenMiddelen`
`KH-Schuldconversie`
`KH-Uitgiftepremies`
`KV-Totaal`
`KV-TerugbetalingAanDeAandeelhouders`
`KV-AanzuiveringVanVerliezen`
`KV-Andere`
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.6392 on 76 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 3.661e+07 on 14 and 76 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.1010588 0.2021176 0.89894118
[2,] 0.4732877 0.9465755 0.52671226
[3,] 0.6116410 0.7767179 0.38835896
[4,] 0.5102308 0.9795384 0.48976922
[5,] 0.5731971 0.8536058 0.42680291
[6,] 0.5911343 0.8177315 0.40886573
[7,] 0.4885063 0.9770127 0.51149367
[8,] 0.4573722 0.9147444 0.54262778
[9,] 0.7268335 0.5463331 0.27316653
[10,] 0.7236028 0.5527944 0.27639722
[11,] 0.6455090 0.7089820 0.35449101
[12,] 0.5646206 0.8707588 0.43537941
[13,] 0.6431625 0.7136751 0.35683753
[14,] 0.6667727 0.6664547 0.33322734
[15,] 0.7170669 0.5658662 0.28293309
[16,] 0.6527169 0.6945662 0.34728309
[17,] 0.7665967 0.4668065 0.23340326
[18,] 0.7070110 0.5859779 0.29298896
[19,] 0.6610639 0.6778722 0.33893610
[20,] 0.6347759 0.7304482 0.36522408
[21,] 0.5658732 0.8682536 0.43412682
[22,] 0.4935693 0.9871385 0.50643074
[23,] 0.5496217 0.9007566 0.45037829
[24,] 0.4782063 0.9564125 0.52179374
[25,] 0.4567761 0.9135522 0.54322391
[26,] 0.3994449 0.7988897 0.60055514
[27,] 0.3468138 0.6936277 0.65318616
[28,] 0.4050863 0.8101725 0.59491374
[29,] 0.3393616 0.6787232 0.66063839
[30,] 0.2793611 0.5587222 0.72063892
[31,] 0.3377413 0.6754827 0.66225867
[32,] 0.4486982 0.8973964 0.55130179
[33,] 0.5146781 0.9706438 0.48532190
[34,] 0.4412825 0.8825649 0.55871753
[35,] 0.3881720 0.7763440 0.61182799
[36,] 0.4758417 0.9516834 0.52415832
[37,] 0.4213221 0.8426443 0.57867787
[38,] 0.4984817 0.9969635 0.50151827
[39,] 0.6187588 0.7624824 0.38124121
[40,] 0.5566733 0.8866534 0.44332669
[41,] 0.4769897 0.9539794 0.52301032
[42,] 0.5929669 0.8140662 0.40703310
[43,] 0.5430199 0.9139602 0.45698010
[44,] 0.7666393 0.4667215 0.23336074
[45,] 0.7878703 0.4242595 0.21212974
[46,] 0.8941015 0.2117969 0.10589846
[47,] 0.9002586 0.1994827 0.09974137
[48,] 0.8739612 0.2520777 0.12603884
[49,] 0.8340985 0.3318030 0.16590149
[50,] 0.8152912 0.3694176 0.18470880
[51,] 0.7334316 0.5331369 0.26656843
[52,] 0.7361165 0.5277670 0.26388348
[53,] 0.6221276 0.7557449 0.37787243
[54,] 0.4961316 0.9922632 0.50386840
[55,] 0.5610496 0.8779007 0.43895035
[56,] 0.4090641 0.8181283 0.59093586
> postscript(file="/var/wessaorg/rcomp/tmp/1abih1353056845.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/2sgct1353056845.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/3bixa1353056845.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/4bu4t1353056845.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/5tckd1353056845.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 = 91
Frequency = 1
1 2 3 4 5 6
-0.173238281 0.894409324 -0.201126238 -1.132524256 0.815571785 1.107014071
7 8 9 10 11 12
-0.015493408 -0.127163205 -0.098846382 -0.967612394 -0.194074264 1.108743367
13 14 15 16 17 18
0.179058148 -0.129884678 -0.048438167 -0.222723799 -0.105353251 0.006174623
19 20 21 22 23 24
-0.199903227 0.774717429 0.901953435 0.906888744 -0.088652671 -0.255632848
25 26 27 28 29 30
-0.038452023 0.786587991 0.864923417 -0.088524255 -0.093378688 -0.011201962
31 32 33 34 35 36
0.427215171 1.001074703 -0.041820305 -1.077121983 -0.207170206 0.636688140
37 38 39 40 41 42
0.072667146 -0.146665163 -0.034744662 0.796812831 -0.060377008 -0.089561782
43 44 45 46 47 48
-0.090023439 0.109615233 -0.919606800 -0.043422547 -0.086713136 -0.891647453
49 50 51 52 53 54
-1.129840776 0.860650570 -0.017362544 -0.126287120 -1.106714731 0.051741207
55 56 57 58 59 60
1.104579397 0.803193643 -0.031113785 0.020452356 0.917379596 0.030904803
61 62 63 64 65 66
0.899208390 -0.077067715 -1.144940505 -1.101318964 0.054156363 -1.104652317
67 68 69 70 71 72
0.059583201 -0.266376814 -1.173048315 -0.076517862 -0.052564049 -0.180434353
73 74 75 76 77 78
0.746995715 0.052176015 -1.110456926 -0.108835052 -0.140452125 -0.086749869
79 80 81 82 83 84
0.450559691 0.928583582 -0.882366528 -0.091837752 0.069004377 -0.060282912
85 86 87 88 89 90
-0.141137113 0.008993860 0.052077033 -0.166158605 -0.100397306 -0.100694551
91
-0.041648287
> postscript(file="/var/wessaorg/rcomp/tmp/6u54f1353056845.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 = 91
Frequency = 1
lag(myerror, k = 1) myerror
0 -0.173238281 NA
1 0.894409324 -0.173238281
2 -0.201126238 0.894409324
3 -1.132524256 -0.201126238
4 0.815571785 -1.132524256
5 1.107014071 0.815571785
6 -0.015493408 1.107014071
7 -0.127163205 -0.015493408
8 -0.098846382 -0.127163205
9 -0.967612394 -0.098846382
10 -0.194074264 -0.967612394
11 1.108743367 -0.194074264
12 0.179058148 1.108743367
13 -0.129884678 0.179058148
14 -0.048438167 -0.129884678
15 -0.222723799 -0.048438167
16 -0.105353251 -0.222723799
17 0.006174623 -0.105353251
18 -0.199903227 0.006174623
19 0.774717429 -0.199903227
20 0.901953435 0.774717429
21 0.906888744 0.901953435
22 -0.088652671 0.906888744
23 -0.255632848 -0.088652671
24 -0.038452023 -0.255632848
25 0.786587991 -0.038452023
26 0.864923417 0.786587991
27 -0.088524255 0.864923417
28 -0.093378688 -0.088524255
29 -0.011201962 -0.093378688
30 0.427215171 -0.011201962
31 1.001074703 0.427215171
32 -0.041820305 1.001074703
33 -1.077121983 -0.041820305
34 -0.207170206 -1.077121983
35 0.636688140 -0.207170206
36 0.072667146 0.636688140
37 -0.146665163 0.072667146
38 -0.034744662 -0.146665163
39 0.796812831 -0.034744662
40 -0.060377008 0.796812831
41 -0.089561782 -0.060377008
42 -0.090023439 -0.089561782
43 0.109615233 -0.090023439
44 -0.919606800 0.109615233
45 -0.043422547 -0.919606800
46 -0.086713136 -0.043422547
47 -0.891647453 -0.086713136
48 -1.129840776 -0.891647453
49 0.860650570 -1.129840776
50 -0.017362544 0.860650570
51 -0.126287120 -0.017362544
52 -1.106714731 -0.126287120
53 0.051741207 -1.106714731
54 1.104579397 0.051741207
55 0.803193643 1.104579397
56 -0.031113785 0.803193643
57 0.020452356 -0.031113785
58 0.917379596 0.020452356
59 0.030904803 0.917379596
60 0.899208390 0.030904803
61 -0.077067715 0.899208390
62 -1.144940505 -0.077067715
63 -1.101318964 -1.144940505
64 0.054156363 -1.101318964
65 -1.104652317 0.054156363
66 0.059583201 -1.104652317
67 -0.266376814 0.059583201
68 -1.173048315 -0.266376814
69 -0.076517862 -1.173048315
70 -0.052564049 -0.076517862
71 -0.180434353 -0.052564049
72 0.746995715 -0.180434353
73 0.052176015 0.746995715
74 -1.110456926 0.052176015
75 -0.108835052 -1.110456926
76 -0.140452125 -0.108835052
77 -0.086749869 -0.140452125
78 0.450559691 -0.086749869
79 0.928583582 0.450559691
80 -0.882366528 0.928583582
81 -0.091837752 -0.882366528
82 0.069004377 -0.091837752
83 -0.060282912 0.069004377
84 -0.141137113 -0.060282912
85 0.008993860 -0.141137113
86 0.052077033 0.008993860
87 -0.166158605 0.052077033
88 -0.100397306 -0.166158605
89 -0.100694551 -0.100397306
90 -0.041648287 -0.100694551
91 NA -0.041648287
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.894409324 -0.173238281
[2,] -0.201126238 0.894409324
[3,] -1.132524256 -0.201126238
[4,] 0.815571785 -1.132524256
[5,] 1.107014071 0.815571785
[6,] -0.015493408 1.107014071
[7,] -0.127163205 -0.015493408
[8,] -0.098846382 -0.127163205
[9,] -0.967612394 -0.098846382
[10,] -0.194074264 -0.967612394
[11,] 1.108743367 -0.194074264
[12,] 0.179058148 1.108743367
[13,] -0.129884678 0.179058148
[14,] -0.048438167 -0.129884678
[15,] -0.222723799 -0.048438167
[16,] -0.105353251 -0.222723799
[17,] 0.006174623 -0.105353251
[18,] -0.199903227 0.006174623
[19,] 0.774717429 -0.199903227
[20,] 0.901953435 0.774717429
[21,] 0.906888744 0.901953435
[22,] -0.088652671 0.906888744
[23,] -0.255632848 -0.088652671
[24,] -0.038452023 -0.255632848
[25,] 0.786587991 -0.038452023
[26,] 0.864923417 0.786587991
[27,] -0.088524255 0.864923417
[28,] -0.093378688 -0.088524255
[29,] -0.011201962 -0.093378688
[30,] 0.427215171 -0.011201962
[31,] 1.001074703 0.427215171
[32,] -0.041820305 1.001074703
[33,] -1.077121983 -0.041820305
[34,] -0.207170206 -1.077121983
[35,] 0.636688140 -0.207170206
[36,] 0.072667146 0.636688140
[37,] -0.146665163 0.072667146
[38,] -0.034744662 -0.146665163
[39,] 0.796812831 -0.034744662
[40,] -0.060377008 0.796812831
[41,] -0.089561782 -0.060377008
[42,] -0.090023439 -0.089561782
[43,] 0.109615233 -0.090023439
[44,] -0.919606800 0.109615233
[45,] -0.043422547 -0.919606800
[46,] -0.086713136 -0.043422547
[47,] -0.891647453 -0.086713136
[48,] -1.129840776 -0.891647453
[49,] 0.860650570 -1.129840776
[50,] -0.017362544 0.860650570
[51,] -0.126287120 -0.017362544
[52,] -1.106714731 -0.126287120
[53,] 0.051741207 -1.106714731
[54,] 1.104579397 0.051741207
[55,] 0.803193643 1.104579397
[56,] -0.031113785 0.803193643
[57,] 0.020452356 -0.031113785
[58,] 0.917379596 0.020452356
[59,] 0.030904803 0.917379596
[60,] 0.899208390 0.030904803
[61,] -0.077067715 0.899208390
[62,] -1.144940505 -0.077067715
[63,] -1.101318964 -1.144940505
[64,] 0.054156363 -1.101318964
[65,] -1.104652317 0.054156363
[66,] 0.059583201 -1.104652317
[67,] -0.266376814 0.059583201
[68,] -1.173048315 -0.266376814
[69,] -0.076517862 -1.173048315
[70,] -0.052564049 -0.076517862
[71,] -0.180434353 -0.052564049
[72,] 0.746995715 -0.180434353
[73,] 0.052176015 0.746995715
[74,] -1.110456926 0.052176015
[75,] -0.108835052 -1.110456926
[76,] -0.140452125 -0.108835052
[77,] -0.086749869 -0.140452125
[78,] 0.450559691 -0.086749869
[79,] 0.928583582 0.450559691
[80,] -0.882366528 0.928583582
[81,] -0.091837752 -0.882366528
[82,] 0.069004377 -0.091837752
[83,] -0.060282912 0.069004377
[84,] -0.141137113 -0.060282912
[85,] 0.008993860 -0.141137113
[86,] 0.052077033 0.008993860
[87,] -0.166158605 0.052077033
[88,] -0.100397306 -0.166158605
[89,] -0.100694551 -0.100397306
[90,] -0.041648287 -0.100694551
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.894409324 -0.173238281
2 -0.201126238 0.894409324
3 -1.132524256 -0.201126238
4 0.815571785 -1.132524256
5 1.107014071 0.815571785
6 -0.015493408 1.107014071
7 -0.127163205 -0.015493408
8 -0.098846382 -0.127163205
9 -0.967612394 -0.098846382
10 -0.194074264 -0.967612394
11 1.108743367 -0.194074264
12 0.179058148 1.108743367
13 -0.129884678 0.179058148
14 -0.048438167 -0.129884678
15 -0.222723799 -0.048438167
16 -0.105353251 -0.222723799
17 0.006174623 -0.105353251
18 -0.199903227 0.006174623
19 0.774717429 -0.199903227
20 0.901953435 0.774717429
21 0.906888744 0.901953435
22 -0.088652671 0.906888744
23 -0.255632848 -0.088652671
24 -0.038452023 -0.255632848
25 0.786587991 -0.038452023
26 0.864923417 0.786587991
27 -0.088524255 0.864923417
28 -0.093378688 -0.088524255
29 -0.011201962 -0.093378688
30 0.427215171 -0.011201962
31 1.001074703 0.427215171
32 -0.041820305 1.001074703
33 -1.077121983 -0.041820305
34 -0.207170206 -1.077121983
35 0.636688140 -0.207170206
36 0.072667146 0.636688140
37 -0.146665163 0.072667146
38 -0.034744662 -0.146665163
39 0.796812831 -0.034744662
40 -0.060377008 0.796812831
41 -0.089561782 -0.060377008
42 -0.090023439 -0.089561782
43 0.109615233 -0.090023439
44 -0.919606800 0.109615233
45 -0.043422547 -0.919606800
46 -0.086713136 -0.043422547
47 -0.891647453 -0.086713136
48 -1.129840776 -0.891647453
49 0.860650570 -1.129840776
50 -0.017362544 0.860650570
51 -0.126287120 -0.017362544
52 -1.106714731 -0.126287120
53 0.051741207 -1.106714731
54 1.104579397 0.051741207
55 0.803193643 1.104579397
56 -0.031113785 0.803193643
57 0.020452356 -0.031113785
58 0.917379596 0.020452356
59 0.030904803 0.917379596
60 0.899208390 0.030904803
61 -0.077067715 0.899208390
62 -1.144940505 -0.077067715
63 -1.101318964 -1.144940505
64 0.054156363 -1.101318964
65 -1.104652317 0.054156363
66 0.059583201 -1.104652317
67 -0.266376814 0.059583201
68 -1.173048315 -0.266376814
69 -0.076517862 -1.173048315
70 -0.052564049 -0.076517862
71 -0.180434353 -0.052564049
72 0.746995715 -0.180434353
73 0.052176015 0.746995715
74 -1.110456926 0.052176015
75 -0.108835052 -1.110456926
76 -0.140452125 -0.108835052
77 -0.086749869 -0.140452125
78 0.450559691 -0.086749869
79 0.928583582 0.450559691
80 -0.882366528 0.928583582
81 -0.091837752 -0.882366528
82 0.069004377 -0.091837752
83 -0.060282912 0.069004377
84 -0.141137113 -0.060282912
85 0.008993860 -0.141137113
86 0.052077033 0.008993860
87 -0.166158605 0.052077033
88 -0.100397306 -0.166158605
89 -0.100694551 -0.100397306
90 -0.041648287 -0.100694551
> 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/71d0g1353056845.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/8f6j91353056845.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/9j0k81353056845.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/10rzoi1353056845.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/111grz1353056845.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/12ugpt1353056845.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/135j891353056845.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/14g95w1353056845.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/15a7xi1353056845.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/16eymn1353056845.tab")
+ }
>
> try(system("convert tmp/1abih1353056845.ps tmp/1abih1353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/2sgct1353056845.ps tmp/2sgct1353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/3bixa1353056845.ps tmp/3bixa1353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/4bu4t1353056845.ps tmp/4bu4t1353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/5tckd1353056845.ps tmp/5tckd1353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/6u54f1353056845.ps tmp/6u54f1353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/71d0g1353056845.ps tmp/71d0g1353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/8f6j91353056845.ps tmp/8f6j91353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/9j0k81353056845.ps tmp/9j0k81353056845.png",intern=TRUE))
character(0)
> try(system("convert tmp/10rzoi1353056845.ps tmp/10rzoi1353056845.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.054 1.169 8.249