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(97687
+ ,70863
+ ,28779
+ ,19459
+ ,35054
+ ,49638
+ ,119087
+ ,90582
+ ,34943
+ ,13292
+ ,33932
+ ,98512
+ ,70806
+ ,28802
+ ,19266
+ ,34984
+ ,49566
+ ,117267
+ ,89214
+ ,35155
+ ,13124
+ ,33287
+ ,98673
+ ,69484
+ ,28027
+ ,18661
+ ,32996
+ ,48268
+ ,116417
+ ,87633
+ ,33835
+ ,12934
+ ,32871
+ ,96028
+ ,70150
+ ,28551
+ ,18153
+ ,32864
+ ,49060
+ ,114582
+ ,86279
+ ,34146
+ ,12654
+ ,31738
+ ,98014
+ ,69210
+ ,28159
+ ,18151
+ ,31943
+ ,48473
+ ,114804
+ ,86370
+ ,33357
+ ,12649
+ ,31645
+ ,95580
+ ,68733
+ ,28354
+ ,18431
+ ,32032
+ ,49063
+ ,115956
+ ,87056
+ ,33275
+ ,12828
+ ,31634
+ ,97838
+ ,75930
+ ,32439
+ ,19867
+ ,37740
+ ,55813
+ ,121919
+ ,91972
+ ,38126
+ ,13997
+ ,33926
+ ,97760
+ ,76162
+ ,33368
+ ,20508
+ ,37430
+ ,55878
+ ,124049
+ ,93651
+ ,37798
+ ,14484
+ ,34721
+ ,99913
+ ,73891
+ ,31846
+ ,20761
+ ,35681
+ ,53075
+ ,124286
+ ,94551
+ ,36087
+ ,14733
+ ,35092
+ ,97588
+ ,67348
+ ,28765
+ ,20390
+ ,32042
+ ,47957
+ ,121491
+ ,91188
+ ,32683
+ ,14207
+ ,33966
+ ,93942
+ ,64297
+ ,27107
+ ,19781
+ ,30623
+ ,45030
+ ,118314
+ ,88686
+ ,30865
+ ,13854
+ ,33243
+ ,93656
+ ,63111
+ ,26368
+ ,19147
+ ,30335
+ ,44401
+ ,116786
+ ,86821
+ ,30381
+ ,13619
+ ,32649
+ ,93365
+ ,63263
+ ,26444
+ ,19359
+ ,30294
+ ,44364
+ ,118038
+ ,88490
+ ,30216
+ ,13679
+ ,33064
+ ,92881
+ ,60733
+ ,25326
+ ,19110
+ ,28507
+ ,42489
+ ,116710
+ ,88003
+ ,28631
+ ,13417
+ ,33047
+ ,93120
+ ,58521
+ ,24375
+ ,18179
+ ,26903
+ ,40994
+ ,112999
+ ,84371
+ ,27313
+ ,12957
+ ,31941
+ ,91063
+ ,56734
+ ,23899
+ ,18342
+ ,25504
+ ,40001
+ ,113754
+ ,85368
+ ,26470
+ ,12833
+ ,31951
+ ,90930
+ ,55327
+ ,23065
+ ,17765
+ ,24488
+ ,38675
+ ,110388
+ ,81981
+ ,25747
+ ,12147
+ ,30525
+ ,91946
+ ,55257
+ ,23279
+ ,16691
+ ,25011
+ ,38933
+ ,104055
+ ,76861
+ ,25573
+ ,11735
+ ,29321
+ ,94624
+ ,64301
+ ,28134
+ ,18529
+ ,31224
+ ,47441
+ ,112205
+ ,82785
+ ,31200
+ ,12766
+ ,32153
+ ,95484
+ ,64261
+ ,28438
+ ,19177
+ ,31192
+ ,47431
+ ,115302
+ ,85314
+ ,31066
+ ,13444
+ ,33482
+ ,95862
+ ,59119
+ ,25717
+ ,18764
+ ,27630
+ ,42799
+ ,113290
+ ,84691
+ ,27251
+ ,13584
+ ,32950
+ ,95530
+ ,56530
+ ,24125
+ ,18448
+ ,26423
+ ,40844
+ ,111036
+ ,82758
+ ,25554
+ ,13355
+ ,32467
+ ,94574
+ ,54445
+ ,23050
+ ,17574
+ ,25703
+ ,39053
+ ,107273
+ ,79645
+ ,24193
+ ,12830
+ ,31506
+ ,94677
+ ,55462
+ ,23489
+ ,17561
+ ,26834
+ ,40408
+ ,107007
+ ,79663
+ ,25104
+ ,12649
+ ,31404
+ ,93845
+ ,55333
+ ,23238
+ ,17784
+ ,26563
+ ,40033
+ ,108862
+ ,81661
+ ,24534
+ ,13072
+ ,31997
+ ,91533
+ ,54048
+ ,22625
+ ,17786
+ ,25515
+ ,38550
+ ,108383
+ ,81269
+ ,23444
+ ,12803
+ ,31605
+ ,91214
+ ,53213
+ ,22223
+ ,16748
+ ,24583
+ ,38694
+ ,103508
+ ,77079
+ ,23201
+ ,12217
+ ,29942
+ ,90922
+ ,52764
+ ,22036
+ ,16788
+ ,23834
+ ,38156
+ ,103459
+ ,77499
+ ,22822
+ ,12041
+ ,29922
+ ,89563
+ ,49933
+ ,20921
+ ,15966
+ ,22274
+ ,36027
+ ,99384
+ ,73724
+ ,21846
+ ,11233
+ ,28486
+ ,89945
+ ,51515
+ ,21982
+ ,16291
+ ,23943
+ ,37659
+ ,99649
+ ,73841
+ ,23015
+ ,11224
+ ,28516
+ ,91850
+ ,59302
+ ,25828
+ ,17939
+ ,29226
+ ,44630
+ ,107542
+ ,80755
+ ,27544
+ ,12593
+ ,31170
+ ,92505
+ ,59681
+ ,26099
+ ,18171
+ ,29528
+ ,44467
+ ,108831
+ ,81806
+ ,27294
+ ,13126
+ ,32082
+ ,92437
+ ,56195
+ ,24168
+ ,17691
+ ,27446
+ ,41585
+ ,107473
+ ,81450
+ ,24936
+ ,13053
+ ,31511
+ ,93876
+ ,55210
+ ,23333
+ ,17095
+ ,26148
+ ,40133
+ ,104079
+ ,78725
+ ,24538
+ ,12527
+ ,30510
+ ,93561
+ ,54698
+ ,22695
+ ,17007
+ ,26303
+ ,39012
+ ,103497
+ ,78109
+ ,24119
+ ,12522
+ ,30343
+ ,94119
+ ,57875
+ ,23884
+ ,16992
+ ,28112
+ ,41902
+ ,104741
+ ,79089
+ ,26264
+ ,12722
+ ,30441
+ ,95264
+ ,60611
+ ,24835
+ ,17118
+ ,29610
+ ,43440
+ ,105625
+ ,79831
+ ,27916
+ ,13060
+ ,30912
+ ,96089
+ ,61857
+ ,24930
+ ,17349
+ ,29902
+ ,44214
+ ,105908
+ ,80080
+ ,28323
+ ,13006
+ ,30980
+ ,97160
+ ,62885
+ ,25283
+ ,17399
+ ,30065
+ ,44529
+ ,106028
+ ,80377
+ ,28801
+ ,12870
+ ,30925
+ ,98644
+ ,62313
+ ,25056
+ ,17547
+ ,29027
+ ,44052
+ ,106619
+ ,81034
+ ,28458
+ ,12929
+ ,30856
+ ,96266
+ ,62056
+ ,24583
+ ,16962
+ ,28238
+ ,43318
+ ,103930
+ ,78207
+ ,27810
+ ,12365
+ ,29862
+ ,97938
+ ,64702
+ ,25967
+ ,17125
+ ,29823
+ ,45333
+ ,104216
+ ,79197
+ ,29484
+ ,12384
+ ,30045
+ ,99757
+ ,72334
+ ,30042
+ ,19119
+ ,35004
+ ,52043
+ ,112086
+ ,85448
+ ,34109
+ ,13801
+ ,32827
+ ,101550
+ ,73577
+ ,31011
+ ,19691
+ ,35596
+ ,52545
+ ,113824
+ ,86899
+ ,34170
+ ,14421
+ ,33310
+ ,102449
+ ,70290
+ ,29404
+ ,19274
+ ,33112
+ ,49331
+ ,111904
+ ,85899
+ ,31989
+ ,14097
+ ,32774
+ ,102416
+ ,68633
+ ,28233
+ ,18743
+ ,31710
+ ,47736
+ ,108435
+ ,82824
+ ,30591
+ ,13656
+ ,31501
+ ,102491
+ ,68311
+ ,27552
+ ,18577
+ ,31794
+ ,46786
+ ,106798
+ ,80785
+ ,29999
+ ,13375
+ ,31092
+ ,102495
+ ,73335
+ ,29009
+ ,18629
+ ,34412
+ ,50367
+ ,107841
+ ,81061
+ ,33253
+ ,13493
+ ,31198
+ ,104552
+ ,71257
+ ,28645
+ ,19245
+ ,33735
+ ,48695
+ ,111377
+ ,84209
+ ,31988
+ ,13885
+ ,32524
+ ,104798
+ ,70743
+ ,28472
+ ,18998
+ ,33143
+ ,48439
+ ,109589
+ ,82931
+ ,31791
+ ,13788
+ ,32069
+ ,104947
+ ,68932
+ ,27613
+ ,18662
+ ,31682
+ ,46993
+ ,107481
+ ,81327
+ ,30596
+ ,13529
+ ,31488
+ ,103950
+ ,68045
+ ,27078
+ ,17937
+ ,30483
+ ,46454
+ ,105055
+ ,78790
+ ,30136
+ ,13090
+ ,30513
+ ,102858
+ ,66338
+ ,26260
+ ,17421
+ ,29281
+ ,44895
+ ,102265
+ ,76645
+ ,28948
+ ,12529
+ ,29594
+ ,106952
+ ,67339
+ ,27078
+ ,17708
+ ,29589
+ ,45313
+ ,102323
+ ,76614
+ ,29244
+ ,12690
+ ,29836
+ ,110901
+ ,75744
+ ,31018
+ ,19608
+ ,35155
+ ,52826
+ ,110832
+ ,83558
+ ,34396
+ ,14137
+ ,32816
+ ,107706
+ ,76098
+ ,31546
+ ,20209
+ ,35198
+ ,52560
+ ,112899
+ ,85307
+ ,34125
+ ,14887
+ ,33843
+ ,111267
+ ,71483
+ ,29293
+ ,19983
+ ,32032
+ ,48224
+ ,110949
+ ,84348
+ ,30836
+ ,14661
+ ,33035
+ ,107643
+ ,69240
+ ,28528
+ ,19256
+ ,30642
+ ,46029
+ ,106594
+ ,81247
+ ,29116
+ ,13827
+ ,31546
+ ,105387
+ ,66421
+ ,27151
+ ,18582
+ ,30011
+ ,44262
+ ,104743
+ ,79685
+ ,27925
+ ,13530
+ ,30907
+ ,105718
+ ,67840
+ ,27241
+ ,18430
+ ,30464
+ ,45453
+ ,103932
+ ,79365
+ ,28836
+ ,13383
+ ,30512
+ ,106039
+ ,69663
+ ,27640
+ ,18154
+ ,30981
+ ,45671
+ ,104727
+ ,79577
+ ,29134
+ ,13569
+ ,30499
+ ,106203
+ ,68564
+ ,27106
+ ,18023
+ ,30010
+ ,44620
+ ,103163
+ ,78666
+ ,28180
+ ,13324
+ ,30111
+ ,105558
+ ,67149
+ ,26457
+ ,17821
+ ,28403
+ ,43467
+ ,102364
+ ,78790
+ ,27208
+ ,13166
+ ,29941
+ ,105230
+ ,65656
+ ,25897
+ ,17482
+ ,26988
+ ,42542
+ ,100650
+ ,77396
+ ,26744
+ ,12777
+ ,29215
+ ,104864
+ ,64412
+ ,25227
+ ,17243
+ ,25903
+ ,41161
+ ,99513
+ ,75712
+ ,25711
+ ,12390
+ ,28413
+ ,104374
+ ,63910
+ ,25405
+ ,17097
+ ,25893
+ ,41407
+ ,98565
+ ,75456
+ ,25895
+ ,12225
+ ,28427
+ ,107450
+ ,71415
+ ,29466
+ ,18885
+ ,31220
+ ,48444
+ ,106846
+ ,82648
+ ,30979
+ ,13706
+ ,31214
+ ,108173
+ ,71369
+ ,29824
+ ,19738
+ ,31486
+ ,47924
+ ,110051
+ ,84929
+ ,30848
+ ,14431
+ ,32529
+ ,108629
+ ,68474
+ ,28357
+ ,19359
+ ,29343
+ ,45206
+ ,106968
+ ,82731
+ ,28760
+ ,13860
+ ,31593
+ ,107847
+ ,66073
+ ,27117
+ ,18854
+ ,27972
+ ,42923
+ ,104773
+ ,80655
+ ,27483
+ ,13303
+ ,30612
+ ,107394
+ ,64685
+ ,26136
+ ,18670
+ ,27699
+ ,41532
+ ,103209
+ ,79635
+ ,26372
+ ,13075
+ ,30305
+ ,106278
+ ,66445
+ ,26481
+ ,18338
+ ,28746
+ ,42860
+ ,102176
+ ,78882
+ ,27455
+ ,13096
+ ,29978
+ ,107733
+ ,70281
+ ,27876
+ ,19102
+ ,30786
+ ,45173
+ ,105190
+ ,81507
+ ,29467
+ ,13652
+ ,30882
+ ,107573
+ ,70149
+ ,27531
+ ,19070
+ ,30055
+ ,45079
+ ,104718
+ ,81284
+ ,29106
+ ,13568
+ ,30552
+ ,107500
+ ,68677
+ ,26899
+ ,18232
+ ,28534
+ ,43751
+ ,101671
+ ,79593
+ ,28117
+ ,13034
+ ,29724
+ ,106382
+ ,67404
+ ,26335
+ ,17990
+ ,27189
+ ,43087
+ ,100434
+ ,78122
+ ,27380
+ ,12804
+ ,29225
+ ,104412
+ ,66627
+ ,26044
+ ,17740
+ ,26378
+ ,42257
+ ,98870
+ ,77192
+ ,26916
+ ,12520
+ ,28720
+ ,105871
+ ,66856
+ ,26429
+ ,17649
+ ,26523
+ ,42563
+ ,98374
+ ,77669
+ ,27051
+ ,12622
+ ,28848
+ ,108767
+ ,73889
+ ,29970
+ ,19729
+ ,30999
+ ,48299
+ ,107670
+ ,84926
+ ,31262
+ ,14285
+ ,31948
+ ,109728
+ ,76518
+ ,31450
+ ,20370
+ ,33356
+ ,50385
+ ,110188
+ ,86563
+ ,32616
+ ,14767
+ ,32773
+ ,109769
+ ,74592
+ ,29910
+ ,20060
+ ,31794
+ ,48600
+ ,106972
+ ,84766
+ ,31326
+ ,14377
+ ,31609
+ ,109609
+ ,73417
+ ,28905
+ ,19441
+ ,30973
+ ,46726
+ ,104495
+ ,82590
+ ,30485
+ ,13854
+ ,30982)
+ ,dim=c(11
+ ,82)
+ ,dimnames=list(c('Werkloosheid_BRUSSELS_HOOFDSTEDELIJK_GEWEST'
+ ,'Werkloosheid_ANTWERPEN'
+ ,'Werkloosheid_VLAAMS-BRABANT'
+ ,'Werkloosheid_WAALS-BRABANT'
+ ,'Werkloosheid_WEST-VLAANDEREN'
+ ,'Werkloosheid_OOST-VLAANDEREN'
+ ,'Werkloosheid_HENEGOUWEN'
+ ,'Werkloosheid_LUIK'
+ ,'Werkloosheid_LIMBURG'
+ ,'Werkloosheid_LUXEMBURG'
+ ,'Werkloosheid_NAMEN')
+ ,1:82))
> y <- array(NA,dim=c(11,82),dimnames=list(c('Werkloosheid_BRUSSELS_HOOFDSTEDELIJK_GEWEST','Werkloosheid_ANTWERPEN','Werkloosheid_VLAAMS-BRABANT','Werkloosheid_WAALS-BRABANT','Werkloosheid_WEST-VLAANDEREN','Werkloosheid_OOST-VLAANDEREN','Werkloosheid_HENEGOUWEN','Werkloosheid_LUIK','Werkloosheid_LIMBURG','Werkloosheid_LUXEMBURG','Werkloosheid_NAMEN'),1:82))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> library(lattice)
> library(lmtest)
Loading required package: zoo
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
Werkloosheid_BRUSSELS_HOOFDSTEDELIJK_GEWEST Werkloosheid_ANTWERPEN
1 97687 70863
2 98512 70806
3 98673 69484
4 96028 70150
5 98014 69210
6 95580 68733
7 97838 75930
8 97760 76162
9 99913 73891
10 97588 67348
11 93942 64297
12 93656 63111
13 93365 63263
14 92881 60733
15 93120 58521
16 91063 56734
17 90930 55327
18 91946 55257
19 94624 64301
20 95484 64261
21 95862 59119
22 95530 56530
23 94574 54445
24 94677 55462
25 93845 55333
26 91533 54048
27 91214 53213
28 90922 52764
29 89563 49933
30 89945 51515
31 91850 59302
32 92505 59681
33 92437 56195
34 93876 55210
35 93561 54698
36 94119 57875
37 95264 60611
38 96089 61857
39 97160 62885
40 98644 62313
41 96266 62056
42 97938 64702
43 99757 72334
44 101550 73577
45 102449 70290
46 102416 68633
47 102491 68311
48 102495 73335
49 104552 71257
50 104798 70743
51 104947 68932
52 103950 68045
53 102858 66338
54 106952 67339
55 110901 75744
56 107706 76098
57 111267 71483
58 107643 69240
59 105387 66421
60 105718 67840
61 106039 69663
62 106203 68564
63 105558 67149
64 105230 65656
65 104864 64412
66 104374 63910
67 107450 71415
68 108173 71369
69 108629 68474
70 107847 66073
71 107394 64685
72 106278 66445
73 107733 70281
74 107573 70149
75 107500 68677
76 106382 67404
77 104412 66627
78 105871 66856
79 108767 73889
80 109728 76518
81 109769 74592
82 109609 73417
Werkloosheid_VLAAMS-BRABANT Werkloosheid_WAALS-BRABANT
1 28779 19459
2 28802 19266
3 28027 18661
4 28551 18153
5 28159 18151
6 28354 18431
7 32439 19867
8 33368 20508
9 31846 20761
10 28765 20390
11 27107 19781
12 26368 19147
13 26444 19359
14 25326 19110
15 24375 18179
16 23899 18342
17 23065 17765
18 23279 16691
19 28134 18529
20 28438 19177
21 25717 18764
22 24125 18448
23 23050 17574
24 23489 17561
25 23238 17784
26 22625 17786
27 22223 16748
28 22036 16788
29 20921 15966
30 21982 16291
31 25828 17939
32 26099 18171
33 24168 17691
34 23333 17095
35 22695 17007
36 23884 16992
37 24835 17118
38 24930 17349
39 25283 17399
40 25056 17547
41 24583 16962
42 25967 17125
43 30042 19119
44 31011 19691
45 29404 19274
46 28233 18743
47 27552 18577
48 29009 18629
49 28645 19245
50 28472 18998
51 27613 18662
52 27078 17937
53 26260 17421
54 27078 17708
55 31018 19608
56 31546 20209
57 29293 19983
58 28528 19256
59 27151 18582
60 27241 18430
61 27640 18154
62 27106 18023
63 26457 17821
64 25897 17482
65 25227 17243
66 25405 17097
67 29466 18885
68 29824 19738
69 28357 19359
70 27117 18854
71 26136 18670
72 26481 18338
73 27876 19102
74 27531 19070
75 26899 18232
76 26335 17990
77 26044 17740
78 26429 17649
79 29970 19729
80 31450 20370
81 29910 20060
82 28905 19441
Werkloosheid_WEST-VLAANDEREN Werkloosheid_OOST-VLAANDEREN
1 35054 49638
2 34984 49566
3 32996 48268
4 32864 49060
5 31943 48473
6 32032 49063
7 37740 55813
8 37430 55878
9 35681 53075
10 32042 47957
11 30623 45030
12 30335 44401
13 30294 44364
14 28507 42489
15 26903 40994
16 25504 40001
17 24488 38675
18 25011 38933
19 31224 47441
20 31192 47431
21 27630 42799
22 26423 40844
23 25703 39053
24 26834 40408
25 26563 40033
26 25515 38550
27 24583 38694
28 23834 38156
29 22274 36027
30 23943 37659
31 29226 44630
32 29528 44467
33 27446 41585
34 26148 40133
35 26303 39012
36 28112 41902
37 29610 43440
38 29902 44214
39 30065 44529
40 29027 44052
41 28238 43318
42 29823 45333
43 35004 52043
44 35596 52545
45 33112 49331
46 31710 47736
47 31794 46786
48 34412 50367
49 33735 48695
50 33143 48439
51 31682 46993
52 30483 46454
53 29281 44895
54 29589 45313
55 35155 52826
56 35198 52560
57 32032 48224
58 30642 46029
59 30011 44262
60 30464 45453
61 30981 45671
62 30010 44620
63 28403 43467
64 26988 42542
65 25903 41161
66 25893 41407
67 31220 48444
68 31486 47924
69 29343 45206
70 27972 42923
71 27699 41532
72 28746 42860
73 30786 45173
74 30055 45079
75 28534 43751
76 27189 43087
77 26378 42257
78 26523 42563
79 30999 48299
80 33356 50385
81 31794 48600
82 30973 46726
Werkloosheid_HENEGOUWEN Werkloosheid_LUIK Werkloosheid_LIMBURG
1 119087 90582 34943
2 117267 89214 35155
3 116417 87633 33835
4 114582 86279 34146
5 114804 86370 33357
6 115956 87056 33275
7 121919 91972 38126
8 124049 93651 37798
9 124286 94551 36087
10 121491 91188 32683
11 118314 88686 30865
12 116786 86821 30381
13 118038 88490 30216
14 116710 88003 28631
15 112999 84371 27313
16 113754 85368 26470
17 110388 81981 25747
18 104055 76861 25573
19 112205 82785 31200
20 115302 85314 31066
21 113290 84691 27251
22 111036 82758 25554
23 107273 79645 24193
24 107007 79663 25104
25 108862 81661 24534
26 108383 81269 23444
27 103508 77079 23201
28 103459 77499 22822
29 99384 73724 21846
30 99649 73841 23015
31 107542 80755 27544
32 108831 81806 27294
33 107473 81450 24936
34 104079 78725 24538
35 103497 78109 24119
36 104741 79089 26264
37 105625 79831 27916
38 105908 80080 28323
39 106028 80377 28801
40 106619 81034 28458
41 103930 78207 27810
42 104216 79197 29484
43 112086 85448 34109
44 113824 86899 34170
45 111904 85899 31989
46 108435 82824 30591
47 106798 80785 29999
48 107841 81061 33253
49 111377 84209 31988
50 109589 82931 31791
51 107481 81327 30596
52 105055 78790 30136
53 102265 76645 28948
54 102323 76614 29244
55 110832 83558 34396
56 112899 85307 34125
57 110949 84348 30836
58 106594 81247 29116
59 104743 79685 27925
60 103932 79365 28836
61 104727 79577 29134
62 103163 78666 28180
63 102364 78790 27208
64 100650 77396 26744
65 99513 75712 25711
66 98565 75456 25895
67 106846 82648 30979
68 110051 84929 30848
69 106968 82731 28760
70 104773 80655 27483
71 103209 79635 26372
72 102176 78882 27455
73 105190 81507 29467
74 104718 81284 29106
75 101671 79593 28117
76 100434 78122 27380
77 98870 77192 26916
78 98374 77669 27051
79 107670 84926 31262
80 110188 86563 32616
81 106972 84766 31326
82 104495 82590 30485
Werkloosheid_LUXEMBURG Werkloosheid_NAMEN t
1 13292 33932 1
2 13124 33287 2
3 12934 32871 3
4 12654 31738 4
5 12649 31645 5
6 12828 31634 6
7 13997 33926 7
8 14484 34721 8
9 14733 35092 9
10 14207 33966 10
11 13854 33243 11
12 13619 32649 12
13 13679 33064 13
14 13417 33047 14
15 12957 31941 15
16 12833 31951 16
17 12147 30525 17
18 11735 29321 18
19 12766 32153 19
20 13444 33482 20
21 13584 32950 21
22 13355 32467 22
23 12830 31506 23
24 12649 31404 24
25 13072 31997 25
26 12803 31605 26
27 12217 29942 27
28 12041 29922 28
29 11233 28486 29
30 11224 28516 30
31 12593 31170 31
32 13126 32082 32
33 13053 31511 33
34 12527 30510 34
35 12522 30343 35
36 12722 30441 36
37 13060 30912 37
38 13006 30980 38
39 12870 30925 39
40 12929 30856 40
41 12365 29862 41
42 12384 30045 42
43 13801 32827 43
44 14421 33310 44
45 14097 32774 45
46 13656 31501 46
47 13375 31092 47
48 13493 31198 48
49 13885 32524 49
50 13788 32069 50
51 13529 31488 51
52 13090 30513 52
53 12529 29594 53
54 12690 29836 54
55 14137 32816 55
56 14887 33843 56
57 14661 33035 57
58 13827 31546 58
59 13530 30907 59
60 13383 30512 60
61 13569 30499 61
62 13324 30111 62
63 13166 29941 63
64 12777 29215 64
65 12390 28413 65
66 12225 28427 66
67 13706 31214 67
68 14431 32529 68
69 13860 31593 69
70 13303 30612 70
71 13075 30305 71
72 13096 29978 72
73 13652 30882 73
74 13568 30552 74
75 13034 29724 75
76 12804 29225 76
77 12520 28720 77
78 12622 28848 78
79 14285 31948 79
80 14767 32773 80
81 14377 31609 81
82 13854 30982 82
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Werkloosheid_ANTWERPEN
66762.2192 1.5839
`Werkloosheid_VLAAMS-BRABANT` `Werkloosheid_WAALS-BRABANT`
0.3819 0.3971
`Werkloosheid_WEST-VLAANDEREN` `Werkloosheid_OOST-VLAANDEREN`
-0.5779 -1.0398
Werkloosheid_HENEGOUWEN Werkloosheid_LUIK
-0.3012 -0.8173
Werkloosheid_LIMBURG Werkloosheid_LUXEMBURG
-0.3114 0.7342
Werkloosheid_NAMEN t
2.4451 -22.4883
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-2726.69 -809.70 -14.43 683.65 2792.63
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 66762.2192 12605.0318 5.296 1.3e-06 ***
Werkloosheid_ANTWERPEN 1.5839 0.1985 7.979 2.0e-11 ***
`Werkloosheid_VLAAMS-BRABANT` 0.3819 0.5266 0.725 0.470809
`Werkloosheid_WAALS-BRABANT` 0.3971 0.9075 0.438 0.663024
`Werkloosheid_WEST-VLAANDEREN` -0.5779 0.3126 -1.849 0.068694 .
`Werkloosheid_OOST-VLAANDEREN` -1.0398 0.3880 -2.680 0.009180 **
Werkloosheid_HENEGOUWEN -0.3012 0.3196 -0.942 0.349258
Werkloosheid_LUIK -0.8173 0.2096 -3.900 0.000218 ***
Werkloosheid_LIMBURG -0.3114 0.5016 -0.621 0.536706
Werkloosheid_LUXEMBURG 0.7342 1.0684 0.687 0.494199
Werkloosheid_NAMEN 2.4451 0.6145 3.979 0.000167 ***
t -22.4883 47.1239 -0.477 0.634695
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1260 on 70 degrees of freedom
Multiple R-squared: 0.9657, Adjusted R-squared: 0.9603
F-statistic: 179 on 11 and 70 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.65625232 0.687495357 0.343747679
[2,] 0.49187336 0.983746724 0.508126638
[3,] 0.34987766 0.699755312 0.650122344
[4,] 0.23067494 0.461349888 0.769325056
[5,] 0.28156841 0.563136829 0.718431585
[6,] 0.20906548 0.418130960 0.790934520
[7,] 0.13659021 0.273180416 0.863409792
[8,] 0.09677432 0.193548641 0.903225679
[9,] 0.07609223 0.152184461 0.923907770
[10,] 0.05564439 0.111288771 0.944355614
[11,] 0.04053986 0.081079730 0.959460135
[12,] 0.04009740 0.080194790 0.959902605
[13,] 0.09433468 0.188669352 0.905665324
[14,] 0.08713416 0.174268313 0.912865843
[15,] 0.07904110 0.158082202 0.920958899
[16,] 0.09936940 0.198738793 0.900630604
[17,] 0.07119509 0.142390177 0.928804911
[18,] 0.08814618 0.176292368 0.911853816
[19,] 0.10400592 0.208011837 0.895994081
[20,] 0.11694226 0.233884515 0.883057742
[21,] 0.13897928 0.277958551 0.861020724
[22,] 0.10518820 0.210376402 0.894811799
[23,] 0.09678787 0.193575733 0.903212133
[24,] 0.08431933 0.168638664 0.915680668
[25,] 0.06251864 0.125037271 0.937481365
[26,] 0.08176046 0.163520917 0.918239541
[27,] 0.09451879 0.189037589 0.905481206
[28,] 0.06809551 0.136191026 0.931904487
[29,] 0.09861579 0.197231580 0.901384210
[30,] 0.09061715 0.181234290 0.909382855
[31,] 0.09414196 0.188283916 0.905858042
[32,] 0.08058626 0.161172529 0.919413735
[33,] 0.08511652 0.170233034 0.914883483
[34,] 0.12211046 0.244220925 0.877889537
[35,] 0.24417432 0.488348641 0.755825680
[36,] 0.27201712 0.544034239 0.727982881
[37,] 0.30386705 0.607734107 0.696132946
[38,] 0.29318592 0.586371832 0.706814084
[39,] 0.60564738 0.788705244 0.394352622
[40,] 0.69999223 0.600015549 0.300007775
[41,] 0.91854701 0.162905982 0.081452991
[42,] 0.96961856 0.060762882 0.030381441
[43,] 0.99693729 0.006125419 0.003062710
[44,] 0.99347866 0.013042673 0.006521336
[45,] 0.99294763 0.014104736 0.007052368
[46,] 0.98778744 0.024425116 0.012212558
[47,] 0.97591010 0.048179808 0.024089904
[48,] 0.95478496 0.090430083 0.045215041
[49,] 0.94266423 0.114671549 0.057335775
[50,] 0.90228444 0.195431122 0.097715561
[51,] 0.82824409 0.343511820 0.171755910
[52,] 0.70540825 0.589183495 0.294591747
[53,] 0.76167764 0.476644717 0.238322358
> postscript(file="/var/fisher/rcomp/tmp/1b78h1353435015.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/284uc1353435015.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/3fxtb1353435016.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/4q2ww1353435016.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/5hvph1353435016.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 = 82
Frequency = 1
1 2 3 4 5 6
-74.620175 915.849952 428.242571 -1086.876970 1544.910671 1145.788920
7 8 9 10 11 12
1076.757579 -456.774400 1055.211359 1503.801532 -1817.016814 -998.922062
13 14 15 16 17 18
-1052.495880 -1021.103142 -459.442995 -541.218841 141.525670 -693.862054
19 20 21 22 23 24
-1096.880031 -1342.555858 424.995551 780.979728 262.588206 1277.954304
25 26 27 28 29 30
387.222959 -1429.560838 -698.891751 -805.383583 -533.403578 -34.558397
31 32 33 34 35 36
-317.715891 -1882.957306 336.331198 1113.826322 437.502677 1045.682149
37 38 39 40 41 42
-81.160500 -72.733306 321.708826 2399.798035 -832.709297 44.049929
43 44 45 46 47 48
-1501.914830 -1296.015464 307.012237 553.139010 -590.284944 -2654.339605
49 50 51 52 53 54
195.027832 372.752722 818.866672 246.855237 -221.993152 1869.737735
55 56 57 58 59 60
2792.627758 -2726.687516 2524.269724 -158.331044 239.925315 723.733478
61 62 63 64 65 66
-936.718450 -791.806126 -883.047128 5.701228 124.840435 341.891200
67 68 69 70 71 72
1742.246058 739.443769 1781.753160 2384.955681 2263.658752 563.381762
73 74 75 76 77 78
-225.627319 -98.109411 305.822479 -345.079465 -2115.661562 -811.144823
79 80 81 82
-1417.148562 -1739.217629 -379.509771 -1318.889909
> postscript(file="/var/fisher/rcomp/tmp/6u31h1353435016.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 = 82
Frequency = 1
lag(myerror, k = 1) myerror
0 -74.620175 NA
1 915.849952 -74.620175
2 428.242571 915.849952
3 -1086.876970 428.242571
4 1544.910671 -1086.876970
5 1145.788920 1544.910671
6 1076.757579 1145.788920
7 -456.774400 1076.757579
8 1055.211359 -456.774400
9 1503.801532 1055.211359
10 -1817.016814 1503.801532
11 -998.922062 -1817.016814
12 -1052.495880 -998.922062
13 -1021.103142 -1052.495880
14 -459.442995 -1021.103142
15 -541.218841 -459.442995
16 141.525670 -541.218841
17 -693.862054 141.525670
18 -1096.880031 -693.862054
19 -1342.555858 -1096.880031
20 424.995551 -1342.555858
21 780.979728 424.995551
22 262.588206 780.979728
23 1277.954304 262.588206
24 387.222959 1277.954304
25 -1429.560838 387.222959
26 -698.891751 -1429.560838
27 -805.383583 -698.891751
28 -533.403578 -805.383583
29 -34.558397 -533.403578
30 -317.715891 -34.558397
31 -1882.957306 -317.715891
32 336.331198 -1882.957306
33 1113.826322 336.331198
34 437.502677 1113.826322
35 1045.682149 437.502677
36 -81.160500 1045.682149
37 -72.733306 -81.160500
38 321.708826 -72.733306
39 2399.798035 321.708826
40 -832.709297 2399.798035
41 44.049929 -832.709297
42 -1501.914830 44.049929
43 -1296.015464 -1501.914830
44 307.012237 -1296.015464
45 553.139010 307.012237
46 -590.284944 553.139010
47 -2654.339605 -590.284944
48 195.027832 -2654.339605
49 372.752722 195.027832
50 818.866672 372.752722
51 246.855237 818.866672
52 -221.993152 246.855237
53 1869.737735 -221.993152
54 2792.627758 1869.737735
55 -2726.687516 2792.627758
56 2524.269724 -2726.687516
57 -158.331044 2524.269724
58 239.925315 -158.331044
59 723.733478 239.925315
60 -936.718450 723.733478
61 -791.806126 -936.718450
62 -883.047128 -791.806126
63 5.701228 -883.047128
64 124.840435 5.701228
65 341.891200 124.840435
66 1742.246058 341.891200
67 739.443769 1742.246058
68 1781.753160 739.443769
69 2384.955681 1781.753160
70 2263.658752 2384.955681
71 563.381762 2263.658752
72 -225.627319 563.381762
73 -98.109411 -225.627319
74 305.822479 -98.109411
75 -345.079465 305.822479
76 -2115.661562 -345.079465
77 -811.144823 -2115.661562
78 -1417.148562 -811.144823
79 -1739.217629 -1417.148562
80 -379.509771 -1739.217629
81 -1318.889909 -379.509771
82 NA -1318.889909
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 915.849952 -74.620175
[2,] 428.242571 915.849952
[3,] -1086.876970 428.242571
[4,] 1544.910671 -1086.876970
[5,] 1145.788920 1544.910671
[6,] 1076.757579 1145.788920
[7,] -456.774400 1076.757579
[8,] 1055.211359 -456.774400
[9,] 1503.801532 1055.211359
[10,] -1817.016814 1503.801532
[11,] -998.922062 -1817.016814
[12,] -1052.495880 -998.922062
[13,] -1021.103142 -1052.495880
[14,] -459.442995 -1021.103142
[15,] -541.218841 -459.442995
[16,] 141.525670 -541.218841
[17,] -693.862054 141.525670
[18,] -1096.880031 -693.862054
[19,] -1342.555858 -1096.880031
[20,] 424.995551 -1342.555858
[21,] 780.979728 424.995551
[22,] 262.588206 780.979728
[23,] 1277.954304 262.588206
[24,] 387.222959 1277.954304
[25,] -1429.560838 387.222959
[26,] -698.891751 -1429.560838
[27,] -805.383583 -698.891751
[28,] -533.403578 -805.383583
[29,] -34.558397 -533.403578
[30,] -317.715891 -34.558397
[31,] -1882.957306 -317.715891
[32,] 336.331198 -1882.957306
[33,] 1113.826322 336.331198
[34,] 437.502677 1113.826322
[35,] 1045.682149 437.502677
[36,] -81.160500 1045.682149
[37,] -72.733306 -81.160500
[38,] 321.708826 -72.733306
[39,] 2399.798035 321.708826
[40,] -832.709297 2399.798035
[41,] 44.049929 -832.709297
[42,] -1501.914830 44.049929
[43,] -1296.015464 -1501.914830
[44,] 307.012237 -1296.015464
[45,] 553.139010 307.012237
[46,] -590.284944 553.139010
[47,] -2654.339605 -590.284944
[48,] 195.027832 -2654.339605
[49,] 372.752722 195.027832
[50,] 818.866672 372.752722
[51,] 246.855237 818.866672
[52,] -221.993152 246.855237
[53,] 1869.737735 -221.993152
[54,] 2792.627758 1869.737735
[55,] -2726.687516 2792.627758
[56,] 2524.269724 -2726.687516
[57,] -158.331044 2524.269724
[58,] 239.925315 -158.331044
[59,] 723.733478 239.925315
[60,] -936.718450 723.733478
[61,] -791.806126 -936.718450
[62,] -883.047128 -791.806126
[63,] 5.701228 -883.047128
[64,] 124.840435 5.701228
[65,] 341.891200 124.840435
[66,] 1742.246058 341.891200
[67,] 739.443769 1742.246058
[68,] 1781.753160 739.443769
[69,] 2384.955681 1781.753160
[70,] 2263.658752 2384.955681
[71,] 563.381762 2263.658752
[72,] -225.627319 563.381762
[73,] -98.109411 -225.627319
[74,] 305.822479 -98.109411
[75,] -345.079465 305.822479
[76,] -2115.661562 -345.079465
[77,] -811.144823 -2115.661562
[78,] -1417.148562 -811.144823
[79,] -1739.217629 -1417.148562
[80,] -379.509771 -1739.217629
[81,] -1318.889909 -379.509771
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 915.849952 -74.620175
2 428.242571 915.849952
3 -1086.876970 428.242571
4 1544.910671 -1086.876970
5 1145.788920 1544.910671
6 1076.757579 1145.788920
7 -456.774400 1076.757579
8 1055.211359 -456.774400
9 1503.801532 1055.211359
10 -1817.016814 1503.801532
11 -998.922062 -1817.016814
12 -1052.495880 -998.922062
13 -1021.103142 -1052.495880
14 -459.442995 -1021.103142
15 -541.218841 -459.442995
16 141.525670 -541.218841
17 -693.862054 141.525670
18 -1096.880031 -693.862054
19 -1342.555858 -1096.880031
20 424.995551 -1342.555858
21 780.979728 424.995551
22 262.588206 780.979728
23 1277.954304 262.588206
24 387.222959 1277.954304
25 -1429.560838 387.222959
26 -698.891751 -1429.560838
27 -805.383583 -698.891751
28 -533.403578 -805.383583
29 -34.558397 -533.403578
30 -317.715891 -34.558397
31 -1882.957306 -317.715891
32 336.331198 -1882.957306
33 1113.826322 336.331198
34 437.502677 1113.826322
35 1045.682149 437.502677
36 -81.160500 1045.682149
37 -72.733306 -81.160500
38 321.708826 -72.733306
39 2399.798035 321.708826
40 -832.709297 2399.798035
41 44.049929 -832.709297
42 -1501.914830 44.049929
43 -1296.015464 -1501.914830
44 307.012237 -1296.015464
45 553.139010 307.012237
46 -590.284944 553.139010
47 -2654.339605 -590.284944
48 195.027832 -2654.339605
49 372.752722 195.027832
50 818.866672 372.752722
51 246.855237 818.866672
52 -221.993152 246.855237
53 1869.737735 -221.993152
54 2792.627758 1869.737735
55 -2726.687516 2792.627758
56 2524.269724 -2726.687516
57 -158.331044 2524.269724
58 239.925315 -158.331044
59 723.733478 239.925315
60 -936.718450 723.733478
61 -791.806126 -936.718450
62 -883.047128 -791.806126
63 5.701228 -883.047128
64 124.840435 5.701228
65 341.891200 124.840435
66 1742.246058 341.891200
67 739.443769 1742.246058
68 1781.753160 739.443769
69 2384.955681 1781.753160
70 2263.658752 2384.955681
71 563.381762 2263.658752
72 -225.627319 563.381762
73 -98.109411 -225.627319
74 305.822479 -98.109411
75 -345.079465 305.822479
76 -2115.661562 -345.079465
77 -811.144823 -2115.661562
78 -1417.148562 -811.144823
79 -1739.217629 -1417.148562
80 -379.509771 -1739.217629
81 -1318.889909 -379.509771
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/7vn621353435016.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/8o3291353435016.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/fisher/rcomp/tmp/9skr81353435016.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/fisher/rcomp/tmp/104mj21353435016.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/11jhx11353435016.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/120b211353435016.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/13kkqf1353435016.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/14gase1353435017.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/fisher/rcomp/tmp/150qw81353435017.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/fisher/rcomp/tmp/16ncvs1353435017.tab")
+ }
>
> try(system("convert tmp/1b78h1353435015.ps tmp/1b78h1353435015.png",intern=TRUE))
character(0)
> try(system("convert tmp/284uc1353435015.ps tmp/284uc1353435015.png",intern=TRUE))
character(0)
> try(system("convert tmp/3fxtb1353435016.ps tmp/3fxtb1353435016.png",intern=TRUE))
character(0)
> try(system("convert tmp/4q2ww1353435016.ps tmp/4q2ww1353435016.png",intern=TRUE))
character(0)
> try(system("convert tmp/5hvph1353435016.ps tmp/5hvph1353435016.png",intern=TRUE))
character(0)
> try(system("convert tmp/6u31h1353435016.ps tmp/6u31h1353435016.png",intern=TRUE))
character(0)
> try(system("convert tmp/7vn621353435016.ps tmp/7vn621353435016.png",intern=TRUE))
character(0)
> try(system("convert tmp/8o3291353435016.ps tmp/8o3291353435016.png",intern=TRUE))
character(0)
> try(system("convert tmp/9skr81353435016.ps tmp/9skr81353435016.png",intern=TRUE))
character(0)
> try(system("convert tmp/104mj21353435016.ps tmp/104mj21353435016.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.110 1.462 8.568