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
+ ,28779
+ ,19459
+ ,35054
+ ,49638
+ ,34943
+ ,13292
+ ,33932
+ ,98512
+ ,28802
+ ,19266
+ ,34984
+ ,49566
+ ,35155
+ ,13124
+ ,33287
+ ,98673
+ ,28027
+ ,18661
+ ,32996
+ ,48268
+ ,33835
+ ,12934
+ ,32871
+ ,96028
+ ,28551
+ ,18153
+ ,32864
+ ,49060
+ ,34146
+ ,12654
+ ,31738
+ ,98014
+ ,28159
+ ,18151
+ ,31943
+ ,48473
+ ,33357
+ ,12649
+ ,31645
+ ,95580
+ ,28354
+ ,18431
+ ,32032
+ ,49063
+ ,33275
+ ,12828
+ ,31634
+ ,97838
+ ,32439
+ ,19867
+ ,37740
+ ,55813
+ ,38126
+ ,13997
+ ,33926
+ ,97760
+ ,33368
+ ,20508
+ ,37430
+ ,55878
+ ,37798
+ ,14484
+ ,34721
+ ,99913
+ ,31846
+ ,20761
+ ,35681
+ ,53075
+ ,36087
+ ,14733
+ ,35092
+ ,97588
+ ,28765
+ ,20390
+ ,32042
+ ,47957
+ ,32683
+ ,14207
+ ,33966
+ ,93942
+ ,27107
+ ,19781
+ ,30623
+ ,45030
+ ,30865
+ ,13854
+ ,33243
+ ,93656
+ ,26368
+ ,19147
+ ,30335
+ ,44401
+ ,30381
+ ,13619
+ ,32649
+ ,93365
+ ,26444
+ ,19359
+ ,30294
+ ,44364
+ ,30216
+ ,13679
+ ,33064
+ ,92881
+ ,25326
+ ,19110
+ ,28507
+ ,42489
+ ,28631
+ ,13417
+ ,33047
+ ,93120
+ ,24375
+ ,18179
+ ,26903
+ ,40994
+ ,27313
+ ,12957
+ ,31941
+ ,91063
+ ,23899
+ ,18342
+ ,25504
+ ,40001
+ ,26470
+ ,12833
+ ,31951
+ ,90930
+ ,23065
+ ,17765
+ ,24488
+ ,38675
+ ,25747
+ ,12147
+ ,30525
+ ,91946
+ ,23279
+ ,16691
+ ,25011
+ ,38933
+ ,25573
+ ,11735
+ ,29321
+ ,94624
+ ,28134
+ ,18529
+ ,31224
+ ,47441
+ ,31200
+ ,12766
+ ,32153
+ ,95484
+ ,28438
+ ,19177
+ ,31192
+ ,47431
+ ,31066
+ ,13444
+ ,33482
+ ,95862
+ ,25717
+ ,18764
+ ,27630
+ ,42799
+ ,27251
+ ,13584
+ ,32950
+ ,95530
+ ,24125
+ ,18448
+ ,26423
+ ,40844
+ ,25554
+ ,13355
+ ,32467
+ ,94574
+ ,23050
+ ,17574
+ ,25703
+ ,39053
+ ,24193
+ ,12830
+ ,31506
+ ,94677
+ ,23489
+ ,17561
+ ,26834
+ ,40408
+ ,25104
+ ,12649
+ ,31404
+ ,93845
+ ,23238
+ ,17784
+ ,26563
+ ,40033
+ ,24534
+ ,13072
+ ,31997
+ ,91533
+ ,22625
+ ,17786
+ ,25515
+ ,38550
+ ,23444
+ ,12803
+ ,31605
+ ,91214
+ ,22223
+ ,16748
+ ,24583
+ ,38694
+ ,23201
+ ,12217
+ ,29942
+ ,90922
+ ,22036
+ ,16788
+ ,23834
+ ,38156
+ ,22822
+ ,12041
+ ,29922
+ ,89563
+ ,20921
+ ,15966
+ ,22274
+ ,36027
+ ,21846
+ ,11233
+ ,28486
+ ,89945
+ ,21982
+ ,16291
+ ,23943
+ ,37659
+ ,23015
+ ,11224
+ ,28516
+ ,91850
+ ,25828
+ ,17939
+ ,29226
+ ,44630
+ ,27544
+ ,12593
+ ,31170
+ ,92505
+ ,26099
+ ,18171
+ ,29528
+ ,44467
+ ,27294
+ ,13126
+ ,32082
+ ,92437
+ ,24168
+ ,17691
+ ,27446
+ ,41585
+ ,24936
+ ,13053
+ ,31511
+ ,93876
+ ,23333
+ ,17095
+ ,26148
+ ,40133
+ ,24538
+ ,12527
+ ,30510
+ ,93561
+ ,22695
+ ,17007
+ ,26303
+ ,39012
+ ,24119
+ ,12522
+ ,30343
+ ,94119
+ ,23884
+ ,16992
+ ,28112
+ ,41902
+ ,26264
+ ,12722
+ ,30441
+ ,95264
+ ,24835
+ ,17118
+ ,29610
+ ,43440
+ ,27916
+ ,13060
+ ,30912
+ ,96089
+ ,24930
+ ,17349
+ ,29902
+ ,44214
+ ,28323
+ ,13006
+ ,30980
+ ,97160
+ ,25283
+ ,17399
+ ,30065
+ ,44529
+ ,28801
+ ,12870
+ ,30925
+ ,98644
+ ,25056
+ ,17547
+ ,29027
+ ,44052
+ ,28458
+ ,12929
+ ,30856
+ ,96266
+ ,24583
+ ,16962
+ ,28238
+ ,43318
+ ,27810
+ ,12365
+ ,29862
+ ,97938
+ ,25967
+ ,17125
+ ,29823
+ ,45333
+ ,29484
+ ,12384
+ ,30045
+ ,99757
+ ,30042
+ ,19119
+ ,35004
+ ,52043
+ ,34109
+ ,13801
+ ,32827
+ ,101550
+ ,31011
+ ,19691
+ ,35596
+ ,52545
+ ,34170
+ ,14421
+ ,33310
+ ,102449
+ ,29404
+ ,19274
+ ,33112
+ ,49331
+ ,31989
+ ,14097
+ ,32774
+ ,102416
+ ,28233
+ ,18743
+ ,31710
+ ,47736
+ ,30591
+ ,13656
+ ,31501
+ ,102491
+ ,27552
+ ,18577
+ ,31794
+ ,46786
+ ,29999
+ ,13375
+ ,31092
+ ,102495
+ ,29009
+ ,18629
+ ,34412
+ ,50367
+ ,33253
+ ,13493
+ ,31198
+ ,104552
+ ,28645
+ ,19245
+ ,33735
+ ,48695
+ ,31988
+ ,13885
+ ,32524
+ ,104798
+ ,28472
+ ,18998
+ ,33143
+ ,48439
+ ,31791
+ ,13788
+ ,32069
+ ,104947
+ ,27613
+ ,18662
+ ,31682
+ ,46993
+ ,30596
+ ,13529
+ ,31488
+ ,103950
+ ,27078
+ ,17937
+ ,30483
+ ,46454
+ ,30136
+ ,13090
+ ,30513
+ ,102858
+ ,26260
+ ,17421
+ ,29281
+ ,44895
+ ,28948
+ ,12529
+ ,29594
+ ,106952
+ ,27078
+ ,17708
+ ,29589
+ ,45313
+ ,29244
+ ,12690
+ ,29836
+ ,110901
+ ,31018
+ ,19608
+ ,35155
+ ,52826
+ ,34396
+ ,14137
+ ,32816
+ ,107706
+ ,31546
+ ,20209
+ ,35198
+ ,52560
+ ,34125
+ ,14887
+ ,33843
+ ,111267
+ ,29293
+ ,19983
+ ,32032
+ ,48224
+ ,30836
+ ,14661
+ ,33035
+ ,107643
+ ,28528
+ ,19256
+ ,30642
+ ,46029
+ ,29116
+ ,13827
+ ,31546
+ ,105387
+ ,27151
+ ,18582
+ ,30011
+ ,44262
+ ,27925
+ ,13530
+ ,30907
+ ,105718
+ ,27241
+ ,18430
+ ,30464
+ ,45453
+ ,28836
+ ,13383
+ ,30512
+ ,106039
+ ,27640
+ ,18154
+ ,30981
+ ,45671
+ ,29134
+ ,13569
+ ,30499
+ ,106203
+ ,27106
+ ,18023
+ ,30010
+ ,44620
+ ,28180
+ ,13324
+ ,30111
+ ,105558
+ ,26457
+ ,17821
+ ,28403
+ ,43467
+ ,27208
+ ,13166
+ ,29941
+ ,105230
+ ,25897
+ ,17482
+ ,26988
+ ,42542
+ ,26744
+ ,12777
+ ,29215
+ ,104864
+ ,25227
+ ,17243
+ ,25903
+ ,41161
+ ,25711
+ ,12390
+ ,28413
+ ,104374
+ ,25405
+ ,17097
+ ,25893
+ ,41407
+ ,25895
+ ,12225
+ ,28427
+ ,107450
+ ,29466
+ ,18885
+ ,31220
+ ,48444
+ ,30979
+ ,13706
+ ,31214
+ ,108173
+ ,29824
+ ,19738
+ ,31486
+ ,47924
+ ,30848
+ ,14431
+ ,32529
+ ,108629
+ ,28357
+ ,19359
+ ,29343
+ ,45206
+ ,28760
+ ,13860
+ ,31593
+ ,107847
+ ,27117
+ ,18854
+ ,27972
+ ,42923
+ ,27483
+ ,13303
+ ,30612
+ ,107394
+ ,26136
+ ,18670
+ ,27699
+ ,41532
+ ,26372
+ ,13075
+ ,30305
+ ,106278
+ ,26481
+ ,18338
+ ,28746
+ ,42860
+ ,27455
+ ,13096
+ ,29978
+ ,107733
+ ,27876
+ ,19102
+ ,30786
+ ,45173
+ ,29467
+ ,13652
+ ,30882
+ ,107573
+ ,27531
+ ,19070
+ ,30055
+ ,45079
+ ,29106
+ ,13568
+ ,30552
+ ,107500
+ ,26899
+ ,18232
+ ,28534
+ ,43751
+ ,28117
+ ,13034
+ ,29724
+ ,106382
+ ,26335
+ ,17990
+ ,27189
+ ,43087
+ ,27380
+ ,12804
+ ,29225
+ ,104412
+ ,26044
+ ,17740
+ ,26378
+ ,42257
+ ,26916
+ ,12520
+ ,28720
+ ,105871
+ ,26429
+ ,17649
+ ,26523
+ ,42563
+ ,27051
+ ,12622
+ ,28848
+ ,108767
+ ,29970
+ ,19729
+ ,30999
+ ,48299
+ ,31262
+ ,14285
+ ,31948
+ ,109728
+ ,31450
+ ,20370
+ ,33356
+ ,50385
+ ,32616
+ ,14767
+ ,32773
+ ,109769
+ ,29910
+ ,20060
+ ,31794
+ ,48600
+ ,31326
+ ,14377
+ ,31609
+ ,109609
+ ,28905
+ ,19441
+ ,30973
+ ,46726
+ ,30485
+ ,13854
+ ,30982)
+ ,dim=c(8
+ ,82)
+ ,dimnames=list(c('Werkloosheid_BRUSSELS_HOOFDSTEDELIJK_GEWEST'
+ ,'Werkloosheid_VLAAMS-BRABANT'
+ ,'Werkloosheid_WAALS-BRABANT'
+ ,'Werkloosheid_WEST-VLAANDEREN'
+ ,'WerkloosheidOOST-VLAANDEREN'
+ ,'Werkloosheid_LIMBURG'
+ ,'Werkloosheid_LUXEMBURG'
+ ,'Werkloosheid_NAMEN')
+ ,1:82))
> y <- array(NA,dim=c(8,82),dimnames=list(c('Werkloosheid_BRUSSELS_HOOFDSTEDELIJK_GEWEST','Werkloosheid_VLAAMS-BRABANT','Werkloosheid_WAALS-BRABANT','Werkloosheid_WEST-VLAANDEREN','WerkloosheidOOST-VLAANDEREN','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 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date, as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Werkloosheid_BRUSSELS_HOOFDSTEDELIJK_GEWEST Werkloosheid_VLAAMS-BRABANT
1 97687 28779
2 98512 28802
3 98673 28027
4 96028 28551
5 98014 28159
6 95580 28354
7 97838 32439
8 97760 33368
9 99913 31846
10 97588 28765
11 93942 27107
12 93656 26368
13 93365 26444
14 92881 25326
15 93120 24375
16 91063 23899
17 90930 23065
18 91946 23279
19 94624 28134
20 95484 28438
21 95862 25717
22 95530 24125
23 94574 23050
24 94677 23489
25 93845 23238
26 91533 22625
27 91214 22223
28 90922 22036
29 89563 20921
30 89945 21982
31 91850 25828
32 92505 26099
33 92437 24168
34 93876 23333
35 93561 22695
36 94119 23884
37 95264 24835
38 96089 24930
39 97160 25283
40 98644 25056
41 96266 24583
42 97938 25967
43 99757 30042
44 101550 31011
45 102449 29404
46 102416 28233
47 102491 27552
48 102495 29009
49 104552 28645
50 104798 28472
51 104947 27613
52 103950 27078
53 102858 26260
54 106952 27078
55 110901 31018
56 107706 31546
57 111267 29293
58 107643 28528
59 105387 27151
60 105718 27241
61 106039 27640
62 106203 27106
63 105558 26457
64 105230 25897
65 104864 25227
66 104374 25405
67 107450 29466
68 108173 29824
69 108629 28357
70 107847 27117
71 107394 26136
72 106278 26481
73 107733 27876
74 107573 27531
75 107500 26899
76 106382 26335
77 104412 26044
78 105871 26429
79 108767 29970
80 109728 31450
81 109769 29910
82 109609 28905
Werkloosheid_WAALS-BRABANT Werkloosheid_WEST-VLAANDEREN
1 19459 35054
2 19266 34984
3 18661 32996
4 18153 32864
5 18151 31943
6 18431 32032
7 19867 37740
8 20508 37430
9 20761 35681
10 20390 32042
11 19781 30623
12 19147 30335
13 19359 30294
14 19110 28507
15 18179 26903
16 18342 25504
17 17765 24488
18 16691 25011
19 18529 31224
20 19177 31192
21 18764 27630
22 18448 26423
23 17574 25703
24 17561 26834
25 17784 26563
26 17786 25515
27 16748 24583
28 16788 23834
29 15966 22274
30 16291 23943
31 17939 29226
32 18171 29528
33 17691 27446
34 17095 26148
35 17007 26303
36 16992 28112
37 17118 29610
38 17349 29902
39 17399 30065
40 17547 29027
41 16962 28238
42 17125 29823
43 19119 35004
44 19691 35596
45 19274 33112
46 18743 31710
47 18577 31794
48 18629 34412
49 19245 33735
50 18998 33143
51 18662 31682
52 17937 30483
53 17421 29281
54 17708 29589
55 19608 35155
56 20209 35198
57 19983 32032
58 19256 30642
59 18582 30011
60 18430 30464
61 18154 30981
62 18023 30010
63 17821 28403
64 17482 26988
65 17243 25903
66 17097 25893
67 18885 31220
68 19738 31486
69 19359 29343
70 18854 27972
71 18670 27699
72 18338 28746
73 19102 30786
74 19070 30055
75 18232 28534
76 17990 27189
77 17740 26378
78 17649 26523
79 19729 30999
80 20370 33356
81 20060 31794
82 19441 30973
WerkloosheidOOST-VLAANDEREN Werkloosheid_LIMBURG Werkloosheid_LUXEMBURG
1 49638 34943 13292
2 49566 35155 13124
3 48268 33835 12934
4 49060 34146 12654
5 48473 33357 12649
6 49063 33275 12828
7 55813 38126 13997
8 55878 37798 14484
9 53075 36087 14733
10 47957 32683 14207
11 45030 30865 13854
12 44401 30381 13619
13 44364 30216 13679
14 42489 28631 13417
15 40994 27313 12957
16 40001 26470 12833
17 38675 25747 12147
18 38933 25573 11735
19 47441 31200 12766
20 47431 31066 13444
21 42799 27251 13584
22 40844 25554 13355
23 39053 24193 12830
24 40408 25104 12649
25 40033 24534 13072
26 38550 23444 12803
27 38694 23201 12217
28 38156 22822 12041
29 36027 21846 11233
30 37659 23015 11224
31 44630 27544 12593
32 44467 27294 13126
33 41585 24936 13053
34 40133 24538 12527
35 39012 24119 12522
36 41902 26264 12722
37 43440 27916 13060
38 44214 28323 13006
39 44529 28801 12870
40 44052 28458 12929
41 43318 27810 12365
42 45333 29484 12384
43 52043 34109 13801
44 52545 34170 14421
45 49331 31989 14097
46 47736 30591 13656
47 46786 29999 13375
48 50367 33253 13493
49 48695 31988 13885
50 48439 31791 13788
51 46993 30596 13529
52 46454 30136 13090
53 44895 28948 12529
54 45313 29244 12690
55 52826 34396 14137
56 52560 34125 14887
57 48224 30836 14661
58 46029 29116 13827
59 44262 27925 13530
60 45453 28836 13383
61 45671 29134 13569
62 44620 28180 13324
63 43467 27208 13166
64 42542 26744 12777
65 41161 25711 12390
66 41407 25895 12225
67 48444 30979 13706
68 47924 30848 14431
69 45206 28760 13860
70 42923 27483 13303
71 41532 26372 13075
72 42860 27455 13096
73 45173 29467 13652
74 45079 29106 13568
75 43751 28117 13034
76 43087 27380 12804
77 42257 26916 12520
78 42563 27051 12622
79 48299 31262 14285
80 50385 32616 14767
81 48600 31326 14377
82 46726 30485 13854
Werkloosheid_NAMEN
1 33932
2 33287
3 32871
4 31738
5 31645
6 31634
7 33926
8 34721
9 35092
10 33966
11 33243
12 32649
13 33064
14 33047
15 31941
16 31951
17 30525
18 29321
19 32153
20 33482
21 32950
22 32467
23 31506
24 31404
25 31997
26 31605
27 29942
28 29922
29 28486
30 28516
31 31170
32 32082
33 31511
34 30510
35 30343
36 30441
37 30912
38 30980
39 30925
40 30856
41 29862
42 30045
43 32827
44 33310
45 32774
46 31501
47 31092
48 31198
49 32524
50 32069
51 31488
52 30513
53 29594
54 29836
55 32816
56 33843
57 33035
58 31546
59 30907
60 30512
61 30499
62 30111
63 29941
64 29215
65 28413
66 28427
67 31214
68 32529
69 31593
70 30612
71 30305
72 29978
73 30882
74 30552
75 29724
76 29225
77 28720
78 28848
79 31948
80 32773
81 31609
82 30982
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `Werkloosheid_VLAAMS-BRABANT`
1.148e+05 2.661e+00
`Werkloosheid_WAALS-BRABANT` `Werkloosheid_WEST-VLAANDEREN`
3.411e-01 1.000e+00
`WerkloosheidOOST-VLAANDEREN` Werkloosheid_LIMBURG
-1.558e+00 -3.241e-03
Werkloosheid_LUXEMBURG Werkloosheid_NAMEN
5.735e+00 -4.070e+00
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4858.0 -1206.8 -136.9 1463.6 6591.1
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.148e+05 7.455e+03 15.399 < 2e-16 ***
`Werkloosheid_VLAAMS-BRABANT` 2.661e+00 8.639e-01 3.080 0.0029 **
`Werkloosheid_WAALS-BRABANT` 3.411e-01 1.372e+00 0.249 0.8044
`Werkloosheid_WEST-VLAANDEREN` 1.000e+00 4.717e-01 2.121 0.0373 *
`WerkloosheidOOST-VLAANDEREN` -1.558e+00 6.492e-01 -2.399 0.0189 *
Werkloosheid_LIMBURG -3.241e-03 4.457e-01 -0.007 0.9942
Werkloosheid_LUXEMBURG 5.735e+00 1.268e+00 4.524 2.27e-05 ***
Werkloosheid_NAMEN -4.070e+00 5.271e-01 -7.722 4.34e-11 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2242 on 74 degrees of freedom
Multiple R-squared: 0.8851, Adjusted R-squared: 0.8742
F-statistic: 81.44 on 7 and 74 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.17303738 3.460748e-01 8.269626e-01
[2,] 0.12582005 2.516401e-01 8.741800e-01
[3,] 0.06453780 1.290756e-01 9.354622e-01
[4,] 0.03181290 6.362579e-02 9.681871e-01
[5,] 0.03184552 6.369104e-02 9.681545e-01
[6,] 0.04702316 9.404631e-02 9.529768e-01
[7,] 0.03902441 7.804882e-02 9.609756e-01
[8,] 0.15215992 3.043198e-01 8.478401e-01
[9,] 0.11256564 2.251313e-01 8.874344e-01
[10,] 0.08254907 1.650981e-01 9.174509e-01
[11,] 0.23049683 4.609937e-01 7.695032e-01
[12,] 0.27557091 5.511418e-01 7.244291e-01
[13,] 0.22197502 4.439500e-01 7.780250e-01
[14,] 0.18234315 3.646863e-01 8.176568e-01
[15,] 0.16769216 3.353843e-01 8.323078e-01
[16,] 0.14725686 2.945137e-01 8.527431e-01
[17,] 0.11498085 2.299617e-01 8.850192e-01
[18,] 0.08273865 1.654773e-01 9.172613e-01
[19,] 0.05764336 1.152867e-01 9.423566e-01
[20,] 0.04754875 9.509750e-02 9.524513e-01
[21,] 0.04666346 9.332692e-02 9.533365e-01
[22,] 0.06052342 1.210468e-01 9.394766e-01
[23,] 0.05156745 1.031349e-01 9.484325e-01
[24,] 0.04649636 9.299271e-02 9.535036e-01
[25,] 0.04328454 8.656908e-02 9.567155e-01
[26,] 0.03854040 7.708080e-02 9.614596e-01
[27,] 0.03272184 6.544369e-02 9.672782e-01
[28,] 0.02529620 5.059240e-02 9.747038e-01
[29,] 0.02486341 4.972682e-02 9.751366e-01
[30,] 0.05279063 1.055813e-01 9.472094e-01
[31,] 0.06291872 1.258374e-01 9.370813e-01
[32,] 0.09052453 1.810491e-01 9.094755e-01
[33,] 0.12799120 2.559824e-01 8.720088e-01
[34,] 0.39046015 7.809203e-01 6.095398e-01
[35,] 0.76733235 4.653353e-01 2.326677e-01
[36,] 0.93980098 1.203980e-01 6.019902e-02
[37,] 0.98418733 3.162534e-02 1.581267e-02
[38,] 0.99215340 1.569319e-02 7.846597e-03
[39,] 0.99668347 6.633069e-03 3.316534e-03
[40,] 0.99812257 3.754863e-03 1.877431e-03
[41,] 0.99895742 2.085154e-03 1.042577e-03
[42,] 0.99937017 1.259654e-03 6.298269e-04
[43,] 0.99992790 1.442028e-04 7.210140e-05
[44,] 0.99995342 9.315533e-05 4.657766e-05
[45,] 0.99999950 1.006824e-06 5.034121e-07
[46,] 0.99999949 1.023349e-06 5.116743e-07
[47,] 0.99999997 5.651709e-08 2.825855e-08
[48,] 0.99999988 2.400060e-07 1.200030e-07
[49,] 0.99999989 2.170564e-07 1.085282e-07
[50,] 0.99999968 6.429410e-07 3.214705e-07
[51,] 0.99999872 2.566846e-06 1.283423e-06
[52,] 0.99999467 1.066189e-05 5.330946e-06
[53,] 0.99997850 4.299353e-05 2.149676e-05
[54,] 0.99992728 1.454443e-04 7.272214e-05
[55,] 0.99974417 5.116695e-04 2.558348e-04
[56,] 0.99910359 1.792811e-03 8.964056e-04
[57,] 0.99745914 5.081725e-03 2.540862e-03
[58,] 0.99333165 1.333671e-02 6.668354e-03
[59,] 0.98176809 3.646381e-02 1.823191e-02
[60,] 0.94925704 1.014859e-01 5.074296e-02
[61,] 0.96995040 6.009920e-02 3.004960e-02
> postscript(file="/var/wessaorg/rcomp/tmp/18vhu1353436144.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/2af9x1353436144.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/3hq5u1353436144.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/4vnjz1353436144.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/5zb1t1353436144.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
3910.787346 3037.286177 4826.175858 -678.750998 2005.720593 -1284.251596
7 8 9 10 11 12
-2942.430308 -4857.984069 -1281.062611 -1189.754457 -4279.817857 -4146.196453
13 14 15 16 17 18
-3383.940782 -512.649935 -17.153653 -261.172869 -899.192512 -2745.783372
19 20 21 22 23 24
-945.263355 421.635335 1549.216102 3065.602086 2293.931885 2838.087162
25 26 27 28 29 30
2270.808135 271.470174 -875.661474 154.294399 -926.854833 -2429.187924
31 32 33 34 35 36
-2781.930138 -2828.811322 -1913.865625 -71.647047 -1212.461960 -1862.614577
37 38 39 40 41 42
-2410.222610 -415.575144 584.241173 2296.982468 209.926978 337.728034
43 44 45 46 47 48
-886.894776 -3267.335906 -801.576205 -1275.845988 -950.966340 -2117.746574
49 50 51 52 53 54
1915.341584 1603.240216 2478.697547 2060.397641 1568.272857 3793.251064
55 56 57 58 59 60
6591.057960 1206.670019 5250.298275 598.501860 -785.849027 -2.227835
61 62 63 64 65 66
-1945.079840 -1158.318414 15.347729 542.432947 -72.937008 410.183721
67 68 69 70 71 72
568.179923 165.438760 2022.921488 1725.765320 2106.836384 -240.675109
73 74 75 76 77 78
-699.145777 -207.828869 829.057535 891.396002 -1128.651878 -395.068217
79 80 81 82
-80.709603 -1787.426841 -1265.542935 -193.118113
> postscript(file="/var/wessaorg/rcomp/tmp/6xyvp1353436144.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 3910.787346 NA
1 3037.286177 3910.787346
2 4826.175858 3037.286177
3 -678.750998 4826.175858
4 2005.720593 -678.750998
5 -1284.251596 2005.720593
6 -2942.430308 -1284.251596
7 -4857.984069 -2942.430308
8 -1281.062611 -4857.984069
9 -1189.754457 -1281.062611
10 -4279.817857 -1189.754457
11 -4146.196453 -4279.817857
12 -3383.940782 -4146.196453
13 -512.649935 -3383.940782
14 -17.153653 -512.649935
15 -261.172869 -17.153653
16 -899.192512 -261.172869
17 -2745.783372 -899.192512
18 -945.263355 -2745.783372
19 421.635335 -945.263355
20 1549.216102 421.635335
21 3065.602086 1549.216102
22 2293.931885 3065.602086
23 2838.087162 2293.931885
24 2270.808135 2838.087162
25 271.470174 2270.808135
26 -875.661474 271.470174
27 154.294399 -875.661474
28 -926.854833 154.294399
29 -2429.187924 -926.854833
30 -2781.930138 -2429.187924
31 -2828.811322 -2781.930138
32 -1913.865625 -2828.811322
33 -71.647047 -1913.865625
34 -1212.461960 -71.647047
35 -1862.614577 -1212.461960
36 -2410.222610 -1862.614577
37 -415.575144 -2410.222610
38 584.241173 -415.575144
39 2296.982468 584.241173
40 209.926978 2296.982468
41 337.728034 209.926978
42 -886.894776 337.728034
43 -3267.335906 -886.894776
44 -801.576205 -3267.335906
45 -1275.845988 -801.576205
46 -950.966340 -1275.845988
47 -2117.746574 -950.966340
48 1915.341584 -2117.746574
49 1603.240216 1915.341584
50 2478.697547 1603.240216
51 2060.397641 2478.697547
52 1568.272857 2060.397641
53 3793.251064 1568.272857
54 6591.057960 3793.251064
55 1206.670019 6591.057960
56 5250.298275 1206.670019
57 598.501860 5250.298275
58 -785.849027 598.501860
59 -2.227835 -785.849027
60 -1945.079840 -2.227835
61 -1158.318414 -1945.079840
62 15.347729 -1158.318414
63 542.432947 15.347729
64 -72.937008 542.432947
65 410.183721 -72.937008
66 568.179923 410.183721
67 165.438760 568.179923
68 2022.921488 165.438760
69 1725.765320 2022.921488
70 2106.836384 1725.765320
71 -240.675109 2106.836384
72 -699.145777 -240.675109
73 -207.828869 -699.145777
74 829.057535 -207.828869
75 891.396002 829.057535
76 -1128.651878 891.396002
77 -395.068217 -1128.651878
78 -80.709603 -395.068217
79 -1787.426841 -80.709603
80 -1265.542935 -1787.426841
81 -193.118113 -1265.542935
82 NA -193.118113
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3037.286177 3910.787346
[2,] 4826.175858 3037.286177
[3,] -678.750998 4826.175858
[4,] 2005.720593 -678.750998
[5,] -1284.251596 2005.720593
[6,] -2942.430308 -1284.251596
[7,] -4857.984069 -2942.430308
[8,] -1281.062611 -4857.984069
[9,] -1189.754457 -1281.062611
[10,] -4279.817857 -1189.754457
[11,] -4146.196453 -4279.817857
[12,] -3383.940782 -4146.196453
[13,] -512.649935 -3383.940782
[14,] -17.153653 -512.649935
[15,] -261.172869 -17.153653
[16,] -899.192512 -261.172869
[17,] -2745.783372 -899.192512
[18,] -945.263355 -2745.783372
[19,] 421.635335 -945.263355
[20,] 1549.216102 421.635335
[21,] 3065.602086 1549.216102
[22,] 2293.931885 3065.602086
[23,] 2838.087162 2293.931885
[24,] 2270.808135 2838.087162
[25,] 271.470174 2270.808135
[26,] -875.661474 271.470174
[27,] 154.294399 -875.661474
[28,] -926.854833 154.294399
[29,] -2429.187924 -926.854833
[30,] -2781.930138 -2429.187924
[31,] -2828.811322 -2781.930138
[32,] -1913.865625 -2828.811322
[33,] -71.647047 -1913.865625
[34,] -1212.461960 -71.647047
[35,] -1862.614577 -1212.461960
[36,] -2410.222610 -1862.614577
[37,] -415.575144 -2410.222610
[38,] 584.241173 -415.575144
[39,] 2296.982468 584.241173
[40,] 209.926978 2296.982468
[41,] 337.728034 209.926978
[42,] -886.894776 337.728034
[43,] -3267.335906 -886.894776
[44,] -801.576205 -3267.335906
[45,] -1275.845988 -801.576205
[46,] -950.966340 -1275.845988
[47,] -2117.746574 -950.966340
[48,] 1915.341584 -2117.746574
[49,] 1603.240216 1915.341584
[50,] 2478.697547 1603.240216
[51,] 2060.397641 2478.697547
[52,] 1568.272857 2060.397641
[53,] 3793.251064 1568.272857
[54,] 6591.057960 3793.251064
[55,] 1206.670019 6591.057960
[56,] 5250.298275 1206.670019
[57,] 598.501860 5250.298275
[58,] -785.849027 598.501860
[59,] -2.227835 -785.849027
[60,] -1945.079840 -2.227835
[61,] -1158.318414 -1945.079840
[62,] 15.347729 -1158.318414
[63,] 542.432947 15.347729
[64,] -72.937008 542.432947
[65,] 410.183721 -72.937008
[66,] 568.179923 410.183721
[67,] 165.438760 568.179923
[68,] 2022.921488 165.438760
[69,] 1725.765320 2022.921488
[70,] 2106.836384 1725.765320
[71,] -240.675109 2106.836384
[72,] -699.145777 -240.675109
[73,] -207.828869 -699.145777
[74,] 829.057535 -207.828869
[75,] 891.396002 829.057535
[76,] -1128.651878 891.396002
[77,] -395.068217 -1128.651878
[78,] -80.709603 -395.068217
[79,] -1787.426841 -80.709603
[80,] -1265.542935 -1787.426841
[81,] -193.118113 -1265.542935
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3037.286177 3910.787346
2 4826.175858 3037.286177
3 -678.750998 4826.175858
4 2005.720593 -678.750998
5 -1284.251596 2005.720593
6 -2942.430308 -1284.251596
7 -4857.984069 -2942.430308
8 -1281.062611 -4857.984069
9 -1189.754457 -1281.062611
10 -4279.817857 -1189.754457
11 -4146.196453 -4279.817857
12 -3383.940782 -4146.196453
13 -512.649935 -3383.940782
14 -17.153653 -512.649935
15 -261.172869 -17.153653
16 -899.192512 -261.172869
17 -2745.783372 -899.192512
18 -945.263355 -2745.783372
19 421.635335 -945.263355
20 1549.216102 421.635335
21 3065.602086 1549.216102
22 2293.931885 3065.602086
23 2838.087162 2293.931885
24 2270.808135 2838.087162
25 271.470174 2270.808135
26 -875.661474 271.470174
27 154.294399 -875.661474
28 -926.854833 154.294399
29 -2429.187924 -926.854833
30 -2781.930138 -2429.187924
31 -2828.811322 -2781.930138
32 -1913.865625 -2828.811322
33 -71.647047 -1913.865625
34 -1212.461960 -71.647047
35 -1862.614577 -1212.461960
36 -2410.222610 -1862.614577
37 -415.575144 -2410.222610
38 584.241173 -415.575144
39 2296.982468 584.241173
40 209.926978 2296.982468
41 337.728034 209.926978
42 -886.894776 337.728034
43 -3267.335906 -886.894776
44 -801.576205 -3267.335906
45 -1275.845988 -801.576205
46 -950.966340 -1275.845988
47 -2117.746574 -950.966340
48 1915.341584 -2117.746574
49 1603.240216 1915.341584
50 2478.697547 1603.240216
51 2060.397641 2478.697547
52 1568.272857 2060.397641
53 3793.251064 1568.272857
54 6591.057960 3793.251064
55 1206.670019 6591.057960
56 5250.298275 1206.670019
57 598.501860 5250.298275
58 -785.849027 598.501860
59 -2.227835 -785.849027
60 -1945.079840 -2.227835
61 -1158.318414 -1945.079840
62 15.347729 -1158.318414
63 542.432947 15.347729
64 -72.937008 542.432947
65 410.183721 -72.937008
66 568.179923 410.183721
67 165.438760 568.179923
68 2022.921488 165.438760
69 1725.765320 2022.921488
70 2106.836384 1725.765320
71 -240.675109 2106.836384
72 -699.145777 -240.675109
73 -207.828869 -699.145777
74 829.057535 -207.828869
75 891.396002 829.057535
76 -1128.651878 891.396002
77 -395.068217 -1128.651878
78 -80.709603 -395.068217
79 -1787.426841 -80.709603
80 -1265.542935 -1787.426841
81 -193.118113 -1265.542935
> 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/7efam1353436144.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/8t5gw1353436144.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/96xie1353436144.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/1001j71353436144.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/1190ji1353436144.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/121sx61353436144.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/13e1tu1353436144.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/145ys21353436144.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/15wauk1353436144.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/16egpc1353436144.tab")
+ }
>
> try(system("convert tmp/18vhu1353436144.ps tmp/18vhu1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/2af9x1353436144.ps tmp/2af9x1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/3hq5u1353436144.ps tmp/3hq5u1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/4vnjz1353436144.ps tmp/4vnjz1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/5zb1t1353436144.ps tmp/5zb1t1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/6xyvp1353436144.ps tmp/6xyvp1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/7efam1353436144.ps tmp/7efam1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/8t5gw1353436144.ps tmp/8t5gw1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/96xie1353436144.ps tmp/96xie1353436144.png",intern=TRUE))
character(0)
> try(system("convert tmp/1001j71353436144.ps tmp/1001j71353436144.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.192 0.997 8.321