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(39411
+ ,50149
+ ,82368
+ ,86371
+ ,111549
+ ,61484
+ ,70774
+ ,50982
+ ,40320
+ ,29520
+ ,58186
+ ,77795
+ ,90085
+ ,110697
+ ,61165
+ ,71212
+ ,51083
+ ,40329
+ ,31187
+ ,56275
+ ,62827
+ ,97462
+ ,108155
+ ,61172
+ ,71222
+ ,51161
+ ,40338
+ ,27463
+ ,52302
+ ,67197
+ ,98688
+ ,107545
+ ,59987
+ ,70806
+ ,50403
+ ,39814
+ ,28454
+ ,50332
+ ,66848
+ ,97734
+ ,107665
+ ,59999
+ ,70973
+ ,50853
+ ,39917
+ ,37250
+ ,47451
+ ,66421
+ ,94153
+ ,106314
+ ,59725
+ ,70852
+ ,50925
+ ,39851
+ ,69891
+ ,56251
+ ,60643
+ ,96705
+ ,111233
+ ,60989
+ ,72216
+ ,51460
+ ,40179
+ ,44435
+ ,91027
+ ,59071
+ ,93928
+ ,106930
+ ,66174
+ ,72229
+ ,51834
+ ,40181
+ ,52881
+ ,82777
+ ,58746
+ ,84753
+ ,108570
+ ,66616
+ ,73494
+ ,52045
+ ,40034
+ ,37948
+ ,73833
+ ,68515
+ ,76817
+ ,99293
+ ,68211
+ ,71846
+ ,51561
+ ,39601
+ ,28454
+ ,70024
+ ,68998
+ ,73779
+ ,96278
+ ,67105
+ ,70240
+ ,51626
+ ,39238
+ ,26285
+ ,54075
+ ,77614
+ ,75180
+ ,96179
+ ,66070
+ ,70588
+ ,51950
+ ,39333
+ ,36510
+ ,44376
+ ,73469
+ ,79710
+ ,98383
+ ,65933
+ ,70348
+ ,52599
+ ,39248
+ ,28179
+ ,49188
+ ,67145
+ ,80768
+ ,97265
+ ,64796
+ ,69876
+ ,52666
+ ,38971
+ ,29811
+ ,50930
+ ,51109
+ ,84924
+ ,92909
+ ,62341
+ ,68633
+ ,52416
+ ,38600
+ ,26553
+ ,47574
+ ,51130
+ ,88760
+ ,91516
+ ,61741
+ ,68081
+ ,52217
+ ,38347
+ ,26844
+ ,44963
+ ,49544
+ ,83140
+ ,89132
+ ,60415
+ ,66758
+ ,52339
+ ,37903
+ ,37692
+ ,42243
+ ,50730
+ ,74597
+ ,83006
+ ,57218
+ ,64609
+ ,51327
+ ,37240
+ ,74285
+ ,52678
+ ,49710
+ ,77269
+ ,87435
+ ,58594
+ ,65469
+ ,52572
+ ,37350
+ ,43479
+ ,92780
+ ,50059
+ ,75494
+ ,88227
+ ,54904
+ ,69288
+ ,53103
+ ,37257
+ ,51359
+ ,77386
+ ,49681
+ ,66254
+ ,85180
+ ,54053
+ ,67793
+ ,53106
+ ,36845
+ ,39988
+ ,67733
+ ,65773
+ ,61533
+ ,83531
+ ,49856
+ ,68855
+ ,53373
+ ,36428
+ ,28764
+ ,68127
+ ,66129
+ ,60383
+ ,80735
+ ,48894
+ ,66599
+ ,54023
+ ,36192
+ ,27567
+ ,56378
+ ,78039
+ ,65317
+ ,80067
+ ,49807
+ ,66295
+ ,54628
+ ,36160
+ ,39367
+ ,44420
+ ,71278
+ ,75500
+ ,79288
+ ,50475
+ ,65336
+ ,55135
+ ,36123
+ ,30110
+ ,51304
+ ,65862
+ ,77400
+ ,77580
+ ,50067
+ ,64382
+ ,55005
+ ,35851
+ ,28281
+ ,52963
+ ,51540
+ ,83048
+ ,75286
+ ,48500
+ ,62741
+ ,54838
+ ,35425
+ ,29968
+ ,45032
+ ,51513
+ ,88294
+ ,74919
+ ,47827
+ ,62331
+ ,55083
+ ,35276
+ ,24942
+ ,44353
+ ,49740
+ ,82431
+ ,72120
+ ,46114
+ ,60506
+ ,54321
+ ,34830
+ ,37122
+ ,43362
+ ,50980
+ ,77941
+ ,72916
+ ,45840
+ ,60182
+ ,54532
+ ,34705
+ ,66852
+ ,52722
+ ,51294
+ ,78948
+ ,80984
+ ,47138
+ ,60574
+ ,55167
+ ,34700
+ ,40973
+ ,86193
+ ,49719
+ ,77560
+ ,82160
+ ,46694
+ ,60386
+ ,55298
+ ,34607
+ ,55967
+ ,68245
+ ,50673
+ ,68186
+ ,80492
+ ,45419
+ ,59413
+ ,55248
+ ,34302
+ ,41569
+ ,69196
+ ,59191
+ ,64398
+ ,80240
+ ,44489
+ ,58195
+ ,54917
+ ,33979
+ ,30936
+ ,74491
+ ,61807
+ ,63494
+ ,80373
+ ,43776
+ ,58143
+ ,54943
+ ,33903
+ ,35059
+ ,60455
+ ,77687
+ ,69750
+ ,81710
+ ,43422
+ ,58594
+ ,55558
+ ,33906
+ ,43354
+ ,53798
+ ,77227
+ ,76441
+ ,85125
+ ,43096
+ ,59386
+ ,55887
+ ,33908
+ ,36918
+ ,62933
+ ,75594
+ ,79363
+ ,86198
+ ,42897
+ ,58887
+ ,56048
+ ,33800
+ ,40761
+ ,63956
+ ,64158
+ ,90780
+ ,85910
+ ,42681
+ ,57940
+ ,56485
+ ,33651
+ ,33552
+ ,62346
+ ,64551
+ ,97287
+ ,87804
+ ,42818
+ ,57676
+ ,56913
+ ,33588
+ ,29219
+ ,58923
+ ,65143
+ ,94922
+ ,86309
+ ,42214
+ ,56738
+ ,56688
+ ,33441
+ ,41201
+ ,52204
+ ,69958
+ ,94710
+ ,88113
+ ,42889
+ ,56552
+ ,57052
+ ,33535
+ ,70480
+ ,60898
+ ,68154
+ ,99073
+ ,91819
+ ,47416
+ ,57320
+ ,57741
+ ,33669
+ ,43943
+ ,96693
+ ,64628
+ ,100853
+ ,93407
+ ,48210
+ ,54838
+ ,60372
+ ,33650
+ ,59389
+ ,77922
+ ,61690
+ ,92333
+ ,94296
+ ,47881
+ ,53709
+ ,59892
+ ,33411
+ ,40877
+ ,77626
+ ,71412
+ ,86620
+ ,94697
+ ,47839
+ ,50993
+ ,61114
+ ,33300
+ ,32805
+ ,79173
+ ,73606
+ ,84634
+ ,94858
+ ,47972
+ ,50391
+ ,60891
+ ,33230
+ ,30211
+ ,65251
+ ,91586
+ ,92309
+ ,100812
+ ,49424
+ ,50777
+ ,61394
+ ,33329
+ ,43514
+ ,54488
+ ,85299
+ ,96796
+ ,102621
+ ,50974
+ ,51163
+ ,61766
+ ,33491
+ ,34397
+ ,62042
+ ,81752
+ ,96349
+ ,103623
+ ,51210
+ ,50467
+ ,61432
+ ,33489
+ ,38403
+ ,61147
+ ,63479
+ ,102177
+ ,103635
+ ,50787
+ ,49380
+ ,60918
+ ,33324
+ ,31352
+ ,58698
+ ,62470
+ ,103298
+ ,102282
+ ,51027
+ ,48509
+ ,60783
+ ,33112
+ ,28815
+ ,56236
+ ,60452
+ ,99765
+ ,99824
+ ,50307
+ ,48100
+ ,60447
+ ,33088
+ ,39825
+ ,49879
+ ,65593
+ ,95187
+ ,100879
+ ,51061
+ ,48507
+ ,60583
+ ,33172
+ ,68608
+ ,61076
+ ,64223
+ ,99110
+ ,108320
+ ,52409
+ ,52335
+ ,61451
+ ,33459
+ ,48668
+ ,92317
+ ,61466
+ ,96585
+ ,106920
+ ,51928
+ ,51952
+ ,61110
+ ,33432
+ ,59004
+ ,79439
+ ,58471
+ ,85981
+ ,104997
+ ,52302
+ ,51628
+ ,60920
+ ,33369
+ ,39263
+ ,79951
+ ,67261
+ ,79250
+ ,100786
+ ,52255
+ ,51480
+ ,60251
+ ,33171
+ ,31014
+ ,76304
+ ,71826
+ ,76175
+ ,98170
+ ,51683
+ ,50582
+ ,59828
+ ,33022
+ ,30275
+ ,59409
+ ,84695
+ ,81079
+ ,98420
+ ,53376
+ ,50793
+ ,60055
+ ,33072
+ ,42170
+ ,51241
+ ,80558
+ ,85030
+ ,98477
+ ,54110
+ ,50982
+ ,60184
+ ,32902
+ ,33765
+ ,59166
+ ,73755
+ ,87331
+ ,96166
+ ,54198
+ ,50986
+ ,59812
+ ,32791
+ ,34792
+ ,60574
+ ,57786
+ ,94717
+ ,94833
+ ,54486
+ ,50979
+ ,59315
+ ,32842
+ ,30210
+ ,55326
+ ,59266
+ ,96502
+ ,92590
+ ,53976
+ ,51039
+ ,58857
+ ,32811
+ ,33898
+ ,50832
+ ,58815
+ ,92301
+ ,90143
+ ,53123
+ ,50438
+ ,58330
+ ,32699
+ ,36051
+ ,50871
+ ,60945
+ ,86797
+ ,89674
+ ,52825
+ ,50647
+ ,58100
+ ,32744
+ ,66049
+ ,59889
+ ,58520
+ ,92556
+ ,95661
+ ,55079
+ ,52947
+ ,58614
+ ,32958
+ ,49577
+ ,85822
+ ,59747
+ ,89949
+ ,97152
+ ,54666
+ ,53212
+ ,58067
+ ,33110
+ ,59983
+ ,75463
+ ,56401
+ ,78975
+ ,94976
+ ,53757
+ ,53250
+ ,57454
+ ,33021
+ ,40278
+ ,80245
+ ,64773
+ ,73253
+ ,92623
+ ,52516
+ ,53768
+ ,56975
+ ,33181
+ ,33392
+ ,77079
+ ,68026
+ ,74037
+ ,90840
+ ,52057
+ ,53869
+ ,56148
+ ,33264
+ ,31009
+ ,61815
+ ,84288
+ ,76990
+ ,91044
+ ,51688
+ ,54773
+ ,55889
+ ,33239
+ ,46860
+ ,54153
+ ,84174
+ ,83195
+ ,94331
+ ,53106
+ ,56384
+ ,55975
+ ,33471
+ ,36298
+ ,63818
+ ,78618
+ ,87766
+ ,93923
+ ,52466
+ ,56926
+ ,55345
+ ,33525
+ ,33765
+ ,65730
+ ,61185
+ ,96059
+ ,91718
+ ,51795
+ ,57312
+ ,54606
+ ,33562
+ ,30808
+ ,56908
+ ,63612
+ ,98893
+ ,90124
+ ,51068
+ ,57378
+ ,54045
+ ,33516
+ ,31481
+ ,53264
+ ,62673
+ ,96403
+ ,89408
+ ,50413
+ ,56852
+ ,53579
+ ,33603
+ ,38165
+ ,51470
+ ,64549
+ ,93436
+ ,88884
+ ,50051
+ ,56897
+ ,53454
+ ,33549
+ ,63960
+ ,63334
+ ,61103
+ ,100409
+ ,94542
+ ,51953
+ ,57484
+ ,55154
+ ,33805
+ ,50949
+ ,91894
+ ,61047
+ ,98369
+ ,96969
+ ,53147
+ ,57615
+ ,55012
+ ,33712
+ ,58751
+ ,81410
+ ,61589
+ ,86173
+ ,97164
+ ,52773
+ ,57792
+ ,54362
+ ,33761
+ ,46894
+ ,81247
+ ,71233
+ ,80295
+ ,95079
+ ,51670
+ ,57262
+ ,53916
+ ,33881)
+ ,dim=c(9
+ ,82)
+ ,dimnames=list(c('-1m'
+ ,'1m-3m'
+ ,'3m-6m'
+ ,'6m-1j'
+ ,'1j-2j'
+ ,'2j-3j'
+ ,'3j-5j'
+ ,'5j-10j'
+ ,'10j+')
+ ,1:82))
> y <- array(NA,dim=c(9,82),dimnames=list(c('-1m','1m-3m','3m-6m','6m-1j','1j-2j','2j-3j','3j-5j','5j-10j','10j+'),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 = '3'
> 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
3m-6m -1m 1m-3m 6m-1j 1j-2j 2j-3j 3j-5j 5j-10j 10j+
1 82368 39411 50149 86371 111549 61484 70774 50982 40320
2 77795 29520 58186 90085 110697 61165 71212 51083 40329
3 62827 31187 56275 97462 108155 61172 71222 51161 40338
4 67197 27463 52302 98688 107545 59987 70806 50403 39814
5 66848 28454 50332 97734 107665 59999 70973 50853 39917
6 66421 37250 47451 94153 106314 59725 70852 50925 39851
7 60643 69891 56251 96705 111233 60989 72216 51460 40179
8 59071 44435 91027 93928 106930 66174 72229 51834 40181
9 58746 52881 82777 84753 108570 66616 73494 52045 40034
10 68515 37948 73833 76817 99293 68211 71846 51561 39601
11 68998 28454 70024 73779 96278 67105 70240 51626 39238
12 77614 26285 54075 75180 96179 66070 70588 51950 39333
13 73469 36510 44376 79710 98383 65933 70348 52599 39248
14 67145 28179 49188 80768 97265 64796 69876 52666 38971
15 51109 29811 50930 84924 92909 62341 68633 52416 38600
16 51130 26553 47574 88760 91516 61741 68081 52217 38347
17 49544 26844 44963 83140 89132 60415 66758 52339 37903
18 50730 37692 42243 74597 83006 57218 64609 51327 37240
19 49710 74285 52678 77269 87435 58594 65469 52572 37350
20 50059 43479 92780 75494 88227 54904 69288 53103 37257
21 49681 51359 77386 66254 85180 54053 67793 53106 36845
22 65773 39988 67733 61533 83531 49856 68855 53373 36428
23 66129 28764 68127 60383 80735 48894 66599 54023 36192
24 78039 27567 56378 65317 80067 49807 66295 54628 36160
25 71278 39367 44420 75500 79288 50475 65336 55135 36123
26 65862 30110 51304 77400 77580 50067 64382 55005 35851
27 51540 28281 52963 83048 75286 48500 62741 54838 35425
28 51513 29968 45032 88294 74919 47827 62331 55083 35276
29 49740 24942 44353 82431 72120 46114 60506 54321 34830
30 50980 37122 43362 77941 72916 45840 60182 54532 34705
31 51294 66852 52722 78948 80984 47138 60574 55167 34700
32 49719 40973 86193 77560 82160 46694 60386 55298 34607
33 50673 55967 68245 68186 80492 45419 59413 55248 34302
34 59191 41569 69196 64398 80240 44489 58195 54917 33979
35 61807 30936 74491 63494 80373 43776 58143 54943 33903
36 77687 35059 60455 69750 81710 43422 58594 55558 33906
37 77227 43354 53798 76441 85125 43096 59386 55887 33908
38 75594 36918 62933 79363 86198 42897 58887 56048 33800
39 64158 40761 63956 90780 85910 42681 57940 56485 33651
40 64551 33552 62346 97287 87804 42818 57676 56913 33588
41 65143 29219 58923 94922 86309 42214 56738 56688 33441
42 69958 41201 52204 94710 88113 42889 56552 57052 33535
43 68154 70480 60898 99073 91819 47416 57320 57741 33669
44 64628 43943 96693 100853 93407 48210 54838 60372 33650
45 61690 59389 77922 92333 94296 47881 53709 59892 33411
46 71412 40877 77626 86620 94697 47839 50993 61114 33300
47 73606 32805 79173 84634 94858 47972 50391 60891 33230
48 91586 30211 65251 92309 100812 49424 50777 61394 33329
49 85299 43514 54488 96796 102621 50974 51163 61766 33491
50 81752 34397 62042 96349 103623 51210 50467 61432 33489
51 63479 38403 61147 102177 103635 50787 49380 60918 33324
52 62470 31352 58698 103298 102282 51027 48509 60783 33112
53 60452 28815 56236 99765 99824 50307 48100 60447 33088
54 65593 39825 49879 95187 100879 51061 48507 60583 33172
55 64223 68608 61076 99110 108320 52409 52335 61451 33459
56 61466 48668 92317 96585 106920 51928 51952 61110 33432
57 58471 59004 79439 85981 104997 52302 51628 60920 33369
58 67261 39263 79951 79250 100786 52255 51480 60251 33171
59 71826 31014 76304 76175 98170 51683 50582 59828 33022
60 84695 30275 59409 81079 98420 53376 50793 60055 33072
61 80558 42170 51241 85030 98477 54110 50982 60184 32902
62 73755 33765 59166 87331 96166 54198 50986 59812 32791
63 57786 34792 60574 94717 94833 54486 50979 59315 32842
64 59266 30210 55326 96502 92590 53976 51039 58857 32811
65 58815 33898 50832 92301 90143 53123 50438 58330 32699
66 60945 36051 50871 86797 89674 52825 50647 58100 32744
67 58520 66049 59889 92556 95661 55079 52947 58614 32958
68 59747 49577 85822 89949 97152 54666 53212 58067 33110
69 56401 59983 75463 78975 94976 53757 53250 57454 33021
70 64773 40278 80245 73253 92623 52516 53768 56975 33181
71 68026 33392 77079 74037 90840 52057 53869 56148 33264
72 84288 31009 61815 76990 91044 51688 54773 55889 33239
73 84174 46860 54153 83195 94331 53106 56384 55975 33471
74 78618 36298 63818 87766 93923 52466 56926 55345 33525
75 61185 33765 65730 96059 91718 51795 57312 54606 33562
76 63612 30808 56908 98893 90124 51068 57378 54045 33516
77 62673 31481 53264 96403 89408 50413 56852 53579 33603
78 64549 38165 51470 93436 88884 50051 56897 53454 33549
79 61103 63960 63334 100409 94542 51953 57484 55154 33805
80 61047 50949 91894 98369 96969 53147 57615 55012 33712
81 61589 58751 81410 86173 97164 52773 57792 54362 33761
82 71233 46894 81247 80295 95079 51670 57262 53916 33881
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `-1m` `1m-3m` `6m-1j` `1j-2j` `2j-3j`
63118.5189 -0.3686 -0.3586 -0.5304 1.6188 -0.4142
`3j-5j` `5j-10j` `10j+`
3.2675 1.7586 -9.5782
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-13326 -3906 -1503 4923 14590
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.312e+04 4.424e+04 1.427 0.15792
`-1m` -3.686e-01 6.765e-02 -5.449 6.54e-07 ***
`1m-3m` -3.586e-01 6.747e-02 -5.314 1.12e-06 ***
`6m-1j` -5.304e-01 9.405e-02 -5.639 3.05e-07 ***
`1j-2j` 1.619e+00 1.741e-01 9.296 5.20e-14 ***
`2j-3j` -4.142e-01 2.263e-01 -1.830 0.07129 .
`3j-5j` 3.267e+00 6.553e-01 4.986 4.03e-06 ***
`5j-10j` 1.759e+00 6.044e-01 2.910 0.00479 **
`10j+` -9.578e+00 1.837e+00 -5.214 1.66e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 6538 on 73 degrees of freedom
Multiple R-squared: 0.6185, Adjusted R-squared: 0.5767
F-statistic: 14.79 on 8 and 73 DF, p-value: 1.254e-12
> 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.30382492 0.60764985 0.69617508
[2,] 0.19185641 0.38371281 0.80814359
[3,] 0.11230504 0.22461008 0.88769496
[4,] 0.07705198 0.15410397 0.92294802
[5,] 0.03851578 0.07703156 0.96148422
[6,] 0.01886207 0.03772415 0.98113793
[7,] 0.01233400 0.02466801 0.98766600
[8,] 0.03073307 0.06146615 0.96926693
[9,] 0.09579370 0.19158739 0.90420630
[10,] 0.08460445 0.16920890 0.91539555
[11,] 0.08161801 0.16323603 0.91838199
[12,] 0.06883723 0.13767447 0.93116277
[13,] 0.27555586 0.55111172 0.72444414
[14,] 0.38876664 0.77753327 0.61123336
[15,] 0.38027897 0.76055793 0.61972103
[16,] 0.31121169 0.62242338 0.68878831
[17,] 0.26338198 0.52676396 0.73661802
[18,] 0.21473146 0.42946293 0.78526854
[19,] 0.16821712 0.33643424 0.83178288
[20,] 0.12695483 0.25390967 0.87304517
[21,] 0.13536619 0.27073237 0.86463381
[22,] 0.21782938 0.43565876 0.78217062
[23,] 0.24347077 0.48694154 0.75652923
[24,] 0.39014650 0.78029299 0.60985350
[25,] 0.64183288 0.71633423 0.35816712
[26,] 0.77994035 0.44011930 0.22005965
[27,] 0.82079107 0.35841785 0.17920893
[28,] 0.80851963 0.38296074 0.19148037
[29,] 0.79003107 0.41993787 0.20996893
[30,] 0.74841403 0.50317195 0.25158597
[31,] 0.69656801 0.60686399 0.30343199
[32,] 0.67399739 0.65200522 0.32600261
[33,] 0.66407813 0.67184375 0.33592187
[34,] 0.72545078 0.54909845 0.27454922
[35,] 0.71256874 0.57486251 0.28743126
[36,] 0.66461157 0.67077686 0.33538843
[37,] 0.90268109 0.19463781 0.09731891
[38,] 0.92487962 0.15024076 0.07512038
[39,] 0.93870569 0.12258863 0.06129431
[40,] 0.96211555 0.07576889 0.03788445
[41,] 0.96690217 0.06619566 0.03309783
[42,] 0.96675384 0.06649232 0.03324616
[43,] 0.96173652 0.07652696 0.03826348
[44,] 0.96935681 0.06128637 0.03064319
[45,] 0.97782490 0.04435019 0.02217510
[46,] 0.98408467 0.03183067 0.01591533
[47,] 0.98644005 0.02711990 0.01355995
[48,] 0.97927457 0.04145086 0.02072543
[49,] 0.96905069 0.06189862 0.03094931
[50,] 0.95052537 0.09894927 0.04947463
[51,] 0.91951398 0.16097205 0.08048602
[52,] 0.93514938 0.12970123 0.06485062
[53,] 0.95001018 0.09997964 0.04998982
[54,] 0.91300861 0.17398277 0.08699139
[55,] 0.85740041 0.28519918 0.14259959
[56,] 0.78517301 0.42965397 0.21482699
[57,] 0.68761456 0.62477088 0.31238544
[58,] 0.59717465 0.80565070 0.40282535
[59,] 0.72241756 0.55516488 0.27758244
> postscript(file="/var/wessaorg/rcomp/tmp/1jhwm1356133199.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/21u5y1356133199.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/3x1mr1356133199.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/4xlc61356133199.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/5vwn21356133199.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
7745.5328 4102.3937 -2989.7159 -2596.9334 -4332.7045 -2739.3686
7 8 9 10 11 12
-1671.0703 6801.5831 -6618.2298 7996.4343 8081.4686 9856.8204
13 14 15 16 17 18
3610.1504 -3388.2897 -9011.7439 -7623.9063 -9853.9117 868.4860
19 20 21 22 23 24
7951.2842 -6731.4864 -9111.6084 -10179.0538 -6333.7370 4621.3343
25 26 27 28 29 30
6748.3290 4732.2920 -2033.8922 -1703.5248 -1829.4959 -747.8387
31 32 33 34 35 36
-552.0537 -2995.9705 -5403.8903 -2370.6411 -3369.5376 7478.1096
37 38 39 40 41 42
2427.2465 1740.4532 -581.5863 -3475.0176 -2739.5168 2198.1371
43 44 45 46 47 48
10056.9596 11586.7077 3761.9408 8519.4723 8722.4270 14590.4185
49 50 51 52 53 54
9077.7027 5959.5016 -5386.1063 -5935.5727 -6267.2270 -3934.8936
55 56 57 58 59 60
-11371.2877 -7956.5225 -13325.6786 -8638.4430 -3804.1661 5022.0804
61 62 63 64 65 66
2175.7055 -308.3494 -7814.2215 -5226.2689 -2731.5778 -1924.6394
67 68 69 70 71 72
-2130.7768 -92.5750 -5889.7434 -2124.4761 2486.1409 10741.8358
73 74 75 76 77 78
9088.0410 5777.8504 -3820.8794 -1534.6589 -593.5260 1783.4655
79 80 81 82
4971.8692 4774.9525 -1470.8846 7210.0739
> postscript(file="/var/wessaorg/rcomp/tmp/6ybjo1356133200.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 7745.5328 NA
1 4102.3937 7745.5328
2 -2989.7159 4102.3937
3 -2596.9334 -2989.7159
4 -4332.7045 -2596.9334
5 -2739.3686 -4332.7045
6 -1671.0703 -2739.3686
7 6801.5831 -1671.0703
8 -6618.2298 6801.5831
9 7996.4343 -6618.2298
10 8081.4686 7996.4343
11 9856.8204 8081.4686
12 3610.1504 9856.8204
13 -3388.2897 3610.1504
14 -9011.7439 -3388.2897
15 -7623.9063 -9011.7439
16 -9853.9117 -7623.9063
17 868.4860 -9853.9117
18 7951.2842 868.4860
19 -6731.4864 7951.2842
20 -9111.6084 -6731.4864
21 -10179.0538 -9111.6084
22 -6333.7370 -10179.0538
23 4621.3343 -6333.7370
24 6748.3290 4621.3343
25 4732.2920 6748.3290
26 -2033.8922 4732.2920
27 -1703.5248 -2033.8922
28 -1829.4959 -1703.5248
29 -747.8387 -1829.4959
30 -552.0537 -747.8387
31 -2995.9705 -552.0537
32 -5403.8903 -2995.9705
33 -2370.6411 -5403.8903
34 -3369.5376 -2370.6411
35 7478.1096 -3369.5376
36 2427.2465 7478.1096
37 1740.4532 2427.2465
38 -581.5863 1740.4532
39 -3475.0176 -581.5863
40 -2739.5168 -3475.0176
41 2198.1371 -2739.5168
42 10056.9596 2198.1371
43 11586.7077 10056.9596
44 3761.9408 11586.7077
45 8519.4723 3761.9408
46 8722.4270 8519.4723
47 14590.4185 8722.4270
48 9077.7027 14590.4185
49 5959.5016 9077.7027
50 -5386.1063 5959.5016
51 -5935.5727 -5386.1063
52 -6267.2270 -5935.5727
53 -3934.8936 -6267.2270
54 -11371.2877 -3934.8936
55 -7956.5225 -11371.2877
56 -13325.6786 -7956.5225
57 -8638.4430 -13325.6786
58 -3804.1661 -8638.4430
59 5022.0804 -3804.1661
60 2175.7055 5022.0804
61 -308.3494 2175.7055
62 -7814.2215 -308.3494
63 -5226.2689 -7814.2215
64 -2731.5778 -5226.2689
65 -1924.6394 -2731.5778
66 -2130.7768 -1924.6394
67 -92.5750 -2130.7768
68 -5889.7434 -92.5750
69 -2124.4761 -5889.7434
70 2486.1409 -2124.4761
71 10741.8358 2486.1409
72 9088.0410 10741.8358
73 5777.8504 9088.0410
74 -3820.8794 5777.8504
75 -1534.6589 -3820.8794
76 -593.5260 -1534.6589
77 1783.4655 -593.5260
78 4971.8692 1783.4655
79 4774.9525 4971.8692
80 -1470.8846 4774.9525
81 7210.0739 -1470.8846
82 NA 7210.0739
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 4102.3937 7745.5328
[2,] -2989.7159 4102.3937
[3,] -2596.9334 -2989.7159
[4,] -4332.7045 -2596.9334
[5,] -2739.3686 -4332.7045
[6,] -1671.0703 -2739.3686
[7,] 6801.5831 -1671.0703
[8,] -6618.2298 6801.5831
[9,] 7996.4343 -6618.2298
[10,] 8081.4686 7996.4343
[11,] 9856.8204 8081.4686
[12,] 3610.1504 9856.8204
[13,] -3388.2897 3610.1504
[14,] -9011.7439 -3388.2897
[15,] -7623.9063 -9011.7439
[16,] -9853.9117 -7623.9063
[17,] 868.4860 -9853.9117
[18,] 7951.2842 868.4860
[19,] -6731.4864 7951.2842
[20,] -9111.6084 -6731.4864
[21,] -10179.0538 -9111.6084
[22,] -6333.7370 -10179.0538
[23,] 4621.3343 -6333.7370
[24,] 6748.3290 4621.3343
[25,] 4732.2920 6748.3290
[26,] -2033.8922 4732.2920
[27,] -1703.5248 -2033.8922
[28,] -1829.4959 -1703.5248
[29,] -747.8387 -1829.4959
[30,] -552.0537 -747.8387
[31,] -2995.9705 -552.0537
[32,] -5403.8903 -2995.9705
[33,] -2370.6411 -5403.8903
[34,] -3369.5376 -2370.6411
[35,] 7478.1096 -3369.5376
[36,] 2427.2465 7478.1096
[37,] 1740.4532 2427.2465
[38,] -581.5863 1740.4532
[39,] -3475.0176 -581.5863
[40,] -2739.5168 -3475.0176
[41,] 2198.1371 -2739.5168
[42,] 10056.9596 2198.1371
[43,] 11586.7077 10056.9596
[44,] 3761.9408 11586.7077
[45,] 8519.4723 3761.9408
[46,] 8722.4270 8519.4723
[47,] 14590.4185 8722.4270
[48,] 9077.7027 14590.4185
[49,] 5959.5016 9077.7027
[50,] -5386.1063 5959.5016
[51,] -5935.5727 -5386.1063
[52,] -6267.2270 -5935.5727
[53,] -3934.8936 -6267.2270
[54,] -11371.2877 -3934.8936
[55,] -7956.5225 -11371.2877
[56,] -13325.6786 -7956.5225
[57,] -8638.4430 -13325.6786
[58,] -3804.1661 -8638.4430
[59,] 5022.0804 -3804.1661
[60,] 2175.7055 5022.0804
[61,] -308.3494 2175.7055
[62,] -7814.2215 -308.3494
[63,] -5226.2689 -7814.2215
[64,] -2731.5778 -5226.2689
[65,] -1924.6394 -2731.5778
[66,] -2130.7768 -1924.6394
[67,] -92.5750 -2130.7768
[68,] -5889.7434 -92.5750
[69,] -2124.4761 -5889.7434
[70,] 2486.1409 -2124.4761
[71,] 10741.8358 2486.1409
[72,] 9088.0410 10741.8358
[73,] 5777.8504 9088.0410
[74,] -3820.8794 5777.8504
[75,] -1534.6589 -3820.8794
[76,] -593.5260 -1534.6589
[77,] 1783.4655 -593.5260
[78,] 4971.8692 1783.4655
[79,] 4774.9525 4971.8692
[80,] -1470.8846 4774.9525
[81,] 7210.0739 -1470.8846
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 4102.3937 7745.5328
2 -2989.7159 4102.3937
3 -2596.9334 -2989.7159
4 -4332.7045 -2596.9334
5 -2739.3686 -4332.7045
6 -1671.0703 -2739.3686
7 6801.5831 -1671.0703
8 -6618.2298 6801.5831
9 7996.4343 -6618.2298
10 8081.4686 7996.4343
11 9856.8204 8081.4686
12 3610.1504 9856.8204
13 -3388.2897 3610.1504
14 -9011.7439 -3388.2897
15 -7623.9063 -9011.7439
16 -9853.9117 -7623.9063
17 868.4860 -9853.9117
18 7951.2842 868.4860
19 -6731.4864 7951.2842
20 -9111.6084 -6731.4864
21 -10179.0538 -9111.6084
22 -6333.7370 -10179.0538
23 4621.3343 -6333.7370
24 6748.3290 4621.3343
25 4732.2920 6748.3290
26 -2033.8922 4732.2920
27 -1703.5248 -2033.8922
28 -1829.4959 -1703.5248
29 -747.8387 -1829.4959
30 -552.0537 -747.8387
31 -2995.9705 -552.0537
32 -5403.8903 -2995.9705
33 -2370.6411 -5403.8903
34 -3369.5376 -2370.6411
35 7478.1096 -3369.5376
36 2427.2465 7478.1096
37 1740.4532 2427.2465
38 -581.5863 1740.4532
39 -3475.0176 -581.5863
40 -2739.5168 -3475.0176
41 2198.1371 -2739.5168
42 10056.9596 2198.1371
43 11586.7077 10056.9596
44 3761.9408 11586.7077
45 8519.4723 3761.9408
46 8722.4270 8519.4723
47 14590.4185 8722.4270
48 9077.7027 14590.4185
49 5959.5016 9077.7027
50 -5386.1063 5959.5016
51 -5935.5727 -5386.1063
52 -6267.2270 -5935.5727
53 -3934.8936 -6267.2270
54 -11371.2877 -3934.8936
55 -7956.5225 -11371.2877
56 -13325.6786 -7956.5225
57 -8638.4430 -13325.6786
58 -3804.1661 -8638.4430
59 5022.0804 -3804.1661
60 2175.7055 5022.0804
61 -308.3494 2175.7055
62 -7814.2215 -308.3494
63 -5226.2689 -7814.2215
64 -2731.5778 -5226.2689
65 -1924.6394 -2731.5778
66 -2130.7768 -1924.6394
67 -92.5750 -2130.7768
68 -5889.7434 -92.5750
69 -2124.4761 -5889.7434
70 2486.1409 -2124.4761
71 10741.8358 2486.1409
72 9088.0410 10741.8358
73 5777.8504 9088.0410
74 -3820.8794 5777.8504
75 -1534.6589 -3820.8794
76 -593.5260 -1534.6589
77 1783.4655 -593.5260
78 4971.8692 1783.4655
79 4774.9525 4971.8692
80 -1470.8846 4774.9525
81 7210.0739 -1470.8846
> 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/7zo111356133200.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/8abyi1356133200.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/9btly1356133200.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/10on2p1356133200.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/11nasn1356133200.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/12b3i71356133200.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/13qx6l1356133200.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/14honk1356133200.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/151jlf1356133200.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/16gdb71356133200.tab")
+ }
>
> try(system("convert tmp/1jhwm1356133199.ps tmp/1jhwm1356133199.png",intern=TRUE))
character(0)
> try(system("convert tmp/21u5y1356133199.ps tmp/21u5y1356133199.png",intern=TRUE))
character(0)
> try(system("convert tmp/3x1mr1356133199.ps tmp/3x1mr1356133199.png",intern=TRUE))
character(0)
> try(system("convert tmp/4xlc61356133199.ps tmp/4xlc61356133199.png",intern=TRUE))
character(0)
> try(system("convert tmp/5vwn21356133199.ps tmp/5vwn21356133199.png",intern=TRUE))
character(0)
> try(system("convert tmp/6ybjo1356133200.ps tmp/6ybjo1356133200.png",intern=TRUE))
character(0)
> try(system("convert tmp/7zo111356133200.ps tmp/7zo111356133200.png",intern=TRUE))
character(0)
> try(system("convert tmp/8abyi1356133200.ps tmp/8abyi1356133200.png",intern=TRUE))
character(0)
> try(system("convert tmp/9btly1356133200.ps tmp/9btly1356133200.png",intern=TRUE))
character(0)
> try(system("convert tmp/10on2p1356133200.ps tmp/10on2p1356133200.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
10.928 1.875 13.223