R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(5.776
+ ,5.956
+ ,6.257
+ ,6.413
+ ,6.662
+ ,7.030
+ ,7.157
+ ,7.378
+ ,7.599
+ ,7.870
+ ,4.265
+ ,4.385
+ ,4.612
+ ,4.713
+ ,4.926
+ ,5.199
+ ,5.324
+ ,5.490
+ ,5.666
+ ,5.892
+ ,3.255
+ ,3.342
+ ,3.500
+ ,3.566
+ ,3.701
+ ,3.908
+ ,3.974
+ ,4.082
+ ,4.193
+ ,4.358
+ ,3.545
+ ,3.618
+ ,3.771
+ ,3.826
+ ,3.946
+ ,4.141
+ ,4.211
+ ,4.340
+ ,4.463
+ ,4.634
+ ,2.920
+ ,3.007
+ ,3.167
+ ,3.221
+ ,3.340
+ ,3.521
+ ,3.579
+ ,3.667
+ ,3.769
+ ,3.906
+ ,3.269
+ ,3.334
+ ,3.485
+ ,3.521
+ ,3.627
+ ,3.813
+ ,3.863
+ ,3.950
+ ,4.029
+ ,4.152
+ ,2.953
+ ,3.038
+ ,3.193
+ ,3.257
+ ,3.383
+ ,3.562
+ ,3.653
+ ,3.753
+ ,3.865
+ ,4.008
+ ,3.316
+ ,3.396
+ ,3.535
+ ,3.592
+ ,3.713
+ ,3.897
+ ,3.948
+ ,4.037
+ ,4.140
+ ,4.277
+ ,3.184
+ ,3.258
+ ,3.408
+ ,3.458
+ ,3.584
+ ,3.768
+ ,3.824
+ ,3.912
+ ,4.011
+ ,4.149
+ ,2.687
+ ,2.750
+ ,2.865
+ ,2.903
+ ,3.006
+ ,3.132
+ ,3.176
+ ,3.207
+ ,3.261
+ ,3.366
+ ,3.195
+ ,3.262
+ ,3.408
+ ,3.460
+ ,3.575
+ ,3.751
+ ,3.802
+ ,3.892
+ ,3.996
+ ,4.137
+ ,2.759
+ ,2.841
+ ,2.978
+ ,3.024
+ ,3.135
+ ,3.297
+ ,3.343
+ ,3.427
+ ,3.518
+ ,3.657
+ ,2.615
+ ,2.677
+ ,2.799
+ ,2.834
+ ,2.903
+ ,3.046
+ ,3.092
+ ,3.162
+ ,3.240
+ ,3.347
+ ,2.504
+ ,2.555
+ ,2.667
+ ,2.689
+ ,2.758
+ ,2.877
+ ,2.918
+ ,2.974
+ ,3.045
+ ,3.143
+ ,2.381
+ ,2.452
+ ,2.571
+ ,2.629
+ ,2.733
+ ,2.898
+ ,2.949
+ ,3.032
+ ,3.108
+ ,3.215
+ ,2.788
+ ,2.855
+ ,2.984
+ ,3.036
+ ,3.155
+ ,3.321
+ ,3.380
+ ,3.469
+ ,3.563
+ ,3.697
+ ,2.562
+ ,2.633
+ ,2.765
+ ,2.814
+ ,2.922
+ ,3.080
+ ,3.118
+ ,3.191
+ ,3.293
+ ,3.410
+ ,2.338
+ ,2.391
+ ,2.489
+ ,2.524
+ ,2.607
+ ,2.738
+ ,2.776
+ ,2.836
+ ,2.907
+ ,3.000
+ ,2.477
+ ,2.534
+ ,2.648
+ ,2.686
+ ,2.790
+ ,2.943
+ ,3.001
+ ,3.076
+ ,3.200
+ ,3.337
+ ,2.529
+ ,2.598
+ ,2.725
+ ,2.782
+ ,2.891
+ ,3.046
+ ,3.102
+ ,3.178
+ ,3.250
+ ,3.357
+ ,2.375
+ ,2.438
+ ,2.563
+ ,2.612
+ ,2.721
+ ,2.865
+ ,2.912
+ ,2.984
+ ,3.068
+ ,3.178
+ ,2.097
+ ,2.142
+ ,2.235
+ ,2.266
+ ,2.346
+ ,2.469
+ ,2.521
+ ,2.595
+ ,2.664
+ ,2.763
+ ,2.224
+ ,2.277
+ ,2.375
+ ,2.422
+ ,2.519
+ ,2.650
+ ,2.694
+ ,2.764
+ ,2.851
+ ,2.956
+ ,2.156
+ ,2.205
+ ,2.303
+ ,2.335
+ ,2.413
+ ,2.522
+ ,2.560
+ ,2.619
+ ,2.673
+ ,2.759
+ ,1.718
+ ,1.758
+ ,1.817
+ ,1.834
+ ,1.900
+ ,2.003
+ ,2.042
+ ,2.094
+ ,2.155
+ ,2.240
+ ,2.188
+ ,2.242
+ ,2.349
+ ,2.388
+ ,2.463
+ ,2.576
+ ,2.615
+ ,2.649
+ ,2.705
+ ,2.783
+ ,1.875
+ ,1.929
+ ,2.022
+ ,2.059
+ ,2.124
+ ,2.220
+ ,2.252
+ ,2.303
+ ,2.360
+ ,2.438
+ ,1.831
+ ,1.872
+ ,1.950
+ ,1.976
+ ,2.037
+ ,2.140
+ ,2.170
+ ,2.208
+ ,2.263
+ ,2.336
+ ,2.443
+ ,2.501
+ ,2.607
+ ,2.633
+ ,2.721
+ ,2.859
+ ,2.901
+ ,2.957
+ ,3.025
+ ,3.124
+ ,1.453
+ ,1.493
+ ,1.572
+ ,1.600
+ ,1.671
+ ,1.759
+ ,1.790
+ ,1.848
+ ,1.899
+ ,1.975
+ ,1.975
+ ,2.026
+ ,2.131
+ ,2.169
+ ,2.252
+ ,2.372
+ ,2.415
+ ,2.468
+ ,2.527
+ ,2.607
+ ,1.709
+ ,1.758
+ ,1.846
+ ,1.880
+ ,1.956
+ ,2.069
+ ,2.105
+ ,2.133
+ ,2.172
+ ,2.236
+ ,2.118
+ ,2.159
+ ,2.246
+ ,2.270
+ ,2.349
+ ,2.459
+ ,2.487
+ ,2.537
+ ,2.588
+ ,2.669
+ ,1.928
+ ,1.972
+ ,2.063
+ ,2.097
+ ,2.166
+ ,2.268
+ ,2.292
+ ,2.341
+ ,2.402
+ ,2.487
+ ,1.942
+ ,1.982
+ ,2.074
+ ,2.105
+ ,2.171
+ ,2.263
+ ,2.288
+ ,2.334
+ ,2.375
+ ,2.449
+ ,1.901
+ ,1.940
+ ,2.018
+ ,2.037
+ ,2.103
+ ,2.204
+ ,2.237
+ ,2.285
+ ,2.341
+ ,2.420
+ ,1.951
+ ,1.988
+ ,2.081
+ ,2.115
+ ,2.189
+ ,2.289
+ ,2.310
+ ,2.366
+ ,2.455
+ ,2.551
+ ,2.011
+ ,2.049
+ ,2.144
+ ,2.177
+ ,2.256
+ ,2.363
+ ,2.395
+ ,2.450
+ ,2.509
+ ,2.590
+ ,2.040
+ ,2.083
+ ,2.180
+ ,2.213
+ ,2.294
+ ,2.398
+ ,2.419
+ ,2.484
+ ,2.563
+ ,2.667
+ ,2.036
+ ,2.079
+ ,2.175
+ ,2.209
+ ,2.284
+ ,2.392
+ ,2.408
+ ,2.458
+ ,2.537
+ ,2.629
+ ,1.995
+ ,2.039
+ ,2.130
+ ,2.158
+ ,2.231
+ ,2.337
+ ,2.370
+ ,2.425
+ ,2.490
+ ,2.582
+ ,1.673
+ ,1.708
+ ,1.784
+ ,1.807
+ ,1.861
+ ,1.954
+ ,1.990
+ ,2.049
+ ,2.105
+ ,2.191
+ ,1.609
+ ,1.644
+ ,1.717
+ ,1.753
+ ,1.818
+ ,1.926
+ ,1.970
+ ,2.037
+ ,2.096
+ ,2.180
+ ,2.005
+ ,2.048
+ ,2.135
+ ,2.158
+ ,2.226
+ ,2.342
+ ,2.386
+ ,2.455
+ ,2.548
+ ,2.657
+ ,1.677
+ ,1.722
+ ,1.808
+ ,1.848
+ ,1.928
+ ,2.034
+ ,2.067
+ ,2.118
+ ,2.180
+ ,2.267
+ ,1.732
+ ,1.763
+ ,1.836
+ ,1.866
+ ,1.921
+ ,2.007
+ ,2.036
+ ,2.093
+ ,2.156
+ ,2.243
+ ,1.690
+ ,1.741
+ ,1.828
+ ,1.868
+ ,1.929
+ ,2.025
+ ,2.054
+ ,2.097
+ ,2.128
+ ,2.193
+ ,1.582
+ ,1.624
+ ,1.701
+ ,1.731
+ ,1.806
+ ,1.904
+ ,1.939
+ ,1.988
+ ,2.041
+ ,2.126
+ ,2.107
+ ,2.149
+ ,2.228
+ ,2.257
+ ,2.327
+ ,2.435
+ ,2.458
+ ,2.510
+ ,2.561
+ ,2.641
+ ,2.098
+ ,2.139
+ ,2.233
+ ,2.263
+ ,2.327
+ ,2.419
+ ,2.437
+ ,2.474
+ ,2.509
+ ,2.590
+ ,1.842
+ ,1.878
+ ,1.955
+ ,1.979
+ ,2.032
+ ,2.115
+ ,2.146
+ ,2.202
+ ,2.263
+ ,2.356
+ ,2.003
+ ,2.042
+ ,2.135
+ ,2.162
+ ,2.235
+ ,2.330
+ ,2.354
+ ,2.407
+ ,2.464
+ ,2.551
+ ,2.695
+ ,2.748
+ ,2.847
+ ,2.872
+ ,2.958
+ ,3.078
+ ,3.116
+ ,3.166
+ ,3.238
+ ,3.334
+ ,2.090
+ ,2.131
+ ,2.225
+ ,2.254
+ ,2.333
+ ,2.434
+ ,2.468
+ ,2.522
+ ,2.573
+ ,2.647
+ ,2.069
+ ,2.119
+ ,2.208
+ ,2.240
+ ,2.298
+ ,2.403
+ ,2.423
+ ,2.486
+ ,2.553
+ ,2.649
+ ,2.271
+ ,2.322
+ ,2.428
+ ,2.453
+ ,2.541
+ ,2.666
+ ,2.704
+ ,2.753
+ ,2.817
+ ,2.903
+ ,2.062
+ ,2.105
+ ,2.204
+ ,2.236
+ ,2.307
+ ,2.416
+ ,2.446
+ ,2.500
+ ,2.574
+ ,2.668
+ ,1.704
+ ,1.740
+ ,1.813
+ ,1.841
+ ,1.907
+ ,1.999
+ ,2.030
+ ,2.081
+ ,2.142
+ ,2.223
+ ,2.073
+ ,2.118
+ ,2.203
+ ,2.235
+ ,2.314
+ ,2.424
+ ,2.464
+ ,2.525
+ ,2.592
+ ,2.685
+ ,1.791
+ ,1.831
+ ,1.913
+ ,1.942
+ ,2.000
+ ,2.102
+ ,2.134
+ ,2.165
+ ,2.245
+ ,2.334
+ ,1.888
+ ,1.933
+ ,2.024
+ ,2.057
+ ,2.133
+ ,2.227
+ ,2.250
+ ,2.299
+ ,2.346
+ ,2.409
+ ,1.942
+ ,1.982
+ ,2.064
+ ,2.090
+ ,2.167
+ ,2.279
+ ,2.313
+ ,2.361
+ ,2.433
+ ,2.532
+ ,2.167
+ ,2.216
+ ,2.313
+ ,2.351
+ ,2.420
+ ,2.536
+ ,2.572
+ ,2.613
+ ,2.672
+ ,2.757
+ ,2.202
+ ,2.242
+ ,2.341
+ ,2.375
+ ,2.442
+ ,2.551
+ ,2.585
+ ,2.643
+ ,2.705
+ ,2.785
+ ,1.878
+ ,1.908
+ ,1.993
+ ,2.023
+ ,2.085
+ ,2.181
+ ,2.205
+ ,2.248
+ ,2.316
+ ,2.412
+ ,1.992
+ ,2.034
+ ,2.121
+ ,2.149
+ ,2.222
+ ,2.319
+ ,2.342
+ ,2.389
+ ,2.454
+ ,2.549
+ ,2.628
+ ,2.680
+ ,2.790
+ ,2.831
+ ,2.912
+ ,3.041
+ ,3.079
+ ,3.135
+ ,3.199
+ ,3.303
+ ,1.783
+ ,1.817
+ ,1.887
+ ,1.916
+ ,1.975
+ ,2.065
+ ,2.090
+ ,2.159
+ ,2.230
+ ,2.328
+ ,1.579
+ ,1.609
+ ,1.673
+ ,1.697
+ ,1.746
+ ,1.823
+ ,1.851
+ ,1.897
+ ,1.965
+ ,2.047
+ ,1.671
+ ,1.703
+ ,1.775
+ ,1.795
+ ,1.845
+ ,1.927
+ ,1.958
+ ,2.022
+ ,2.090
+ ,2.175
+ ,1.774
+ ,1.808
+ ,1.878
+ ,1.907
+ ,1.966
+ ,2.055
+ ,2.080
+ ,2.106
+ ,2.162
+ ,2.249
+ ,1.687
+ ,1.719
+ ,1.785
+ ,1.813
+ ,1.862
+ ,1.950
+ ,1.977
+ ,2.028
+ ,2.078
+ ,2.149
+ ,1.838
+ ,1.874
+ ,1.947
+ ,1.970
+ ,2.034
+ ,2.127
+ ,2.145
+ ,2.212
+ ,2.274
+ ,2.373
+ ,1.761
+ ,1.799
+ ,1.870
+ ,1.897
+ ,1.965
+ ,2.057
+ ,2.105
+ ,2.169
+ ,2.247
+ ,2.332
+ ,1.899
+ ,1.933
+ ,2.008
+ ,2.035
+ ,2.104
+ ,2.204
+ ,2.216
+ ,2.252
+ ,2.306
+ ,2.370)
+ ,dim=c(10
+ ,75)
+ ,dimnames=list(c('1999'
+ ,'2000'
+ ,'2001'
+ ,'2002'
+ ,'2003'
+ ,'2004'
+ ,'2005'
+ ,'2006'
+ ,'2007'
+ ,'2008')
+ ,1:75))
> y <- array(NA,dim=c(10,75),dimnames=list(c('1999','2000','2001','2002','2003','2004','2005','2006','2007','2008'),1:75))
> 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'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
> 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
1999 2000 2001 2002 2003 2004 2005 2006 2007 2008
1 5.776 5.956 6.257 6.413 6.662 7.030 7.157 7.378 7.599 7.870
2 4.265 4.385 4.612 4.713 4.926 5.199 5.324 5.490 5.666 5.892
3 3.255 3.342 3.500 3.566 3.701 3.908 3.974 4.082 4.193 4.358
4 3.545 3.618 3.771 3.826 3.946 4.141 4.211 4.340 4.463 4.634
5 2.920 3.007 3.167 3.221 3.340 3.521 3.579 3.667 3.769 3.906
6 3.269 3.334 3.485 3.521 3.627 3.813 3.863 3.950 4.029 4.152
7 2.953 3.038 3.193 3.257 3.383 3.562 3.653 3.753 3.865 4.008
8 3.316 3.396 3.535 3.592 3.713 3.897 3.948 4.037 4.140 4.277
9 3.184 3.258 3.408 3.458 3.584 3.768 3.824 3.912 4.011 4.149
10 2.687 2.750 2.865 2.903 3.006 3.132 3.176 3.207 3.261 3.366
11 3.195 3.262 3.408 3.460 3.575 3.751 3.802 3.892 3.996 4.137
12 2.759 2.841 2.978 3.024 3.135 3.297 3.343 3.427 3.518 3.657
13 2.615 2.677 2.799 2.834 2.903 3.046 3.092 3.162 3.240 3.347
14 2.504 2.555 2.667 2.689 2.758 2.877 2.918 2.974 3.045 3.143
15 2.381 2.452 2.571 2.629 2.733 2.898 2.949 3.032 3.108 3.215
16 2.788 2.855 2.984 3.036 3.155 3.321 3.380 3.469 3.563 3.697
17 2.562 2.633 2.765 2.814 2.922 3.080 3.118 3.191 3.293 3.410
18 2.338 2.391 2.489 2.524 2.607 2.738 2.776 2.836 2.907 3.000
19 2.477 2.534 2.648 2.686 2.790 2.943 3.001 3.076 3.200 3.337
20 2.529 2.598 2.725 2.782 2.891 3.046 3.102 3.178 3.250 3.357
21 2.375 2.438 2.563 2.612 2.721 2.865 2.912 2.984 3.068 3.178
22 2.097 2.142 2.235 2.266 2.346 2.469 2.521 2.595 2.664 2.763
23 2.224 2.277 2.375 2.422 2.519 2.650 2.694 2.764 2.851 2.956
24 2.156 2.205 2.303 2.335 2.413 2.522 2.560 2.619 2.673 2.759
25 1.718 1.758 1.817 1.834 1.900 2.003 2.042 2.094 2.155 2.240
26 2.188 2.242 2.349 2.388 2.463 2.576 2.615 2.649 2.705 2.783
27 1.875 1.929 2.022 2.059 2.124 2.220 2.252 2.303 2.360 2.438
28 1.831 1.872 1.950 1.976 2.037 2.140 2.170 2.208 2.263 2.336
29 2.443 2.501 2.607 2.633 2.721 2.859 2.901 2.957 3.025 3.124
30 1.453 1.493 1.572 1.600 1.671 1.759 1.790 1.848 1.899 1.975
31 1.975 2.026 2.131 2.169 2.252 2.372 2.415 2.468 2.527 2.607
32 1.709 1.758 1.846 1.880 1.956 2.069 2.105 2.133 2.172 2.236
33 2.118 2.159 2.246 2.270 2.349 2.459 2.487 2.537 2.588 2.669
34 1.928 1.972 2.063 2.097 2.166 2.268 2.292 2.341 2.402 2.487
35 1.942 1.982 2.074 2.105 2.171 2.263 2.288 2.334 2.375 2.449
36 1.901 1.940 2.018 2.037 2.103 2.204 2.237 2.285 2.341 2.420
37 1.951 1.988 2.081 2.115 2.189 2.289 2.310 2.366 2.455 2.551
38 2.011 2.049 2.144 2.177 2.256 2.363 2.395 2.450 2.509 2.590
39 2.040 2.083 2.180 2.213 2.294 2.398 2.419 2.484 2.563 2.667
40 2.036 2.079 2.175 2.209 2.284 2.392 2.408 2.458 2.537 2.629
41 1.995 2.039 2.130 2.158 2.231 2.337 2.370 2.425 2.490 2.582
42 1.673 1.708 1.784 1.807 1.861 1.954 1.990 2.049 2.105 2.191
43 1.609 1.644 1.717 1.753 1.818 1.926 1.970 2.037 2.096 2.180
44 2.005 2.048 2.135 2.158 2.226 2.342 2.386 2.455 2.548 2.657
45 1.677 1.722 1.808 1.848 1.928 2.034 2.067 2.118 2.180 2.267
46 1.732 1.763 1.836 1.866 1.921 2.007 2.036 2.093 2.156 2.243
47 1.690 1.741 1.828 1.868 1.929 2.025 2.054 2.097 2.128 2.193
48 1.582 1.624 1.701 1.731 1.806 1.904 1.939 1.988 2.041 2.126
49 2.107 2.149 2.228 2.257 2.327 2.435 2.458 2.510 2.561 2.641
50 2.098 2.139 2.233 2.263 2.327 2.419 2.437 2.474 2.509 2.590
51 1.842 1.878 1.955 1.979 2.032 2.115 2.146 2.202 2.263 2.356
52 2.003 2.042 2.135 2.162 2.235 2.330 2.354 2.407 2.464 2.551
53 2.695 2.748 2.847 2.872 2.958 3.078 3.116 3.166 3.238 3.334
54 2.090 2.131 2.225 2.254 2.333 2.434 2.468 2.522 2.573 2.647
55 2.069 2.119 2.208 2.240 2.298 2.403 2.423 2.486 2.553 2.649
56 2.271 2.322 2.428 2.453 2.541 2.666 2.704 2.753 2.817 2.903
57 2.062 2.105 2.204 2.236 2.307 2.416 2.446 2.500 2.574 2.668
58 1.704 1.740 1.813 1.841 1.907 1.999 2.030 2.081 2.142 2.223
59 2.073 2.118 2.203 2.235 2.314 2.424 2.464 2.525 2.592 2.685
60 1.791 1.831 1.913 1.942 2.000 2.102 2.134 2.165 2.245 2.334
61 1.888 1.933 2.024 2.057 2.133 2.227 2.250 2.299 2.346 2.409
62 1.942 1.982 2.064 2.090 2.167 2.279 2.313 2.361 2.433 2.532
63 2.167 2.216 2.313 2.351 2.420 2.536 2.572 2.613 2.672 2.757
64 2.202 2.242 2.341 2.375 2.442 2.551 2.585 2.643 2.705 2.785
65 1.878 1.908 1.993 2.023 2.085 2.181 2.205 2.248 2.316 2.412
66 1.992 2.034 2.121 2.149 2.222 2.319 2.342 2.389 2.454 2.549
67 2.628 2.680 2.790 2.831 2.912 3.041 3.079 3.135 3.199 3.303
68 1.783 1.817 1.887 1.916 1.975 2.065 2.090 2.159 2.230 2.328
69 1.579 1.609 1.673 1.697 1.746 1.823 1.851 1.897 1.965 2.047
70 1.671 1.703 1.775 1.795 1.845 1.927 1.958 2.022 2.090 2.175
71 1.774 1.808 1.878 1.907 1.966 2.055 2.080 2.106 2.162 2.249
72 1.687 1.719 1.785 1.813 1.862 1.950 1.977 2.028 2.078 2.149
73 1.838 1.874 1.947 1.970 2.034 2.127 2.145 2.212 2.274 2.373
74 1.761 1.799 1.870 1.897 1.965 2.057 2.105 2.169 2.247 2.332
75 1.899 1.933 2.008 2.035 2.104 2.204 2.216 2.252 2.306 2.370
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `2000` `2001` `2002` `2003` `2004`
0.004558 1.234814 0.082019 -0.309704 0.202492 -0.140345
`2005` `2006` `2007` `2008`
-0.138042 -0.003981 0.101507 -0.028026
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.012958 -0.002304 0.000039 0.002444 0.010223
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.004558 0.002293 1.988 0.0510 .
`2000` 1.234814 0.083059 14.867 <2e-16 ***
`2001` 0.082019 0.140270 0.585 0.5608
`2002` -0.309704 0.127794 -2.423 0.0182 *
`2003` 0.202492 0.120150 1.685 0.0967 .
`2004` -0.140345 0.114452 -1.226 0.2245
`2005` -0.138042 0.099367 -1.389 0.1695
`2006` -0.003981 0.092215 -0.043 0.9657
`2007` 0.101507 0.136044 0.746 0.4583
`2008` -0.028026 0.082711 -0.339 0.7358
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.00455 on 65 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 1.798e+05 on 9 and 65 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.9413398 0.11732046 0.05866023
[2,] 0.9192006 0.16159886 0.08079943
[3,] 0.9681411 0.06371781 0.03185890
[4,] 0.9484414 0.10311729 0.05155865
[5,] 0.9349765 0.13004704 0.06502352
[6,] 0.9115251 0.17694986 0.08847493
[7,] 0.8715931 0.25681374 0.12840687
[8,] 0.8650382 0.26992368 0.13496184
[9,] 0.8581374 0.28372515 0.14186257
[10,] 0.8285638 0.34287243 0.17143621
[11,] 0.7764305 0.44713895 0.22356947
[12,] 0.7130966 0.57380684 0.28690342
[13,] 0.9324445 0.13511106 0.06755553
[14,] 0.9262502 0.14749967 0.07374983
[15,] 0.9690455 0.06190909 0.03095455
[16,] 0.9548099 0.09038019 0.04519009
[17,] 0.9717003 0.05659931 0.02829965
[18,] 0.9601245 0.07975108 0.03987554
[19,] 0.9475877 0.10482460 0.05241230
[20,] 0.9325733 0.13485333 0.06742667
[21,] 0.9094299 0.18114017 0.09057008
[22,] 0.9061527 0.18769469 0.09384735
[23,] 0.8947996 0.21040083 0.10520042
[24,] 0.8625195 0.27496105 0.13748053
[25,] 0.8778580 0.24428399 0.12214200
[26,] 0.9231497 0.15370067 0.07685034
[27,] 0.8912948 0.21741050 0.10870525
[28,] 0.8566483 0.28670331 0.14335166
[29,] 0.8094171 0.38116588 0.19058294
[30,] 0.7639827 0.47203469 0.23601735
[31,] 0.8692427 0.26151458 0.13075729
[32,] 0.8257072 0.34858569 0.17429285
[33,] 0.7767489 0.44650215 0.22325108
[34,] 0.7676120 0.46477607 0.23238803
[35,] 0.8504050 0.29919008 0.14959504
[36,] 0.8385278 0.32294449 0.16147225
[37,] 0.7823399 0.43532024 0.21766012
[38,] 0.7341862 0.53162755 0.26581377
[39,] 0.6712074 0.65758519 0.32879260
[40,] 0.5879559 0.82408817 0.41204408
[41,] 0.5911666 0.81766684 0.40883342
[42,] 0.5080354 0.98392927 0.49196464
[43,] 0.8645016 0.27099682 0.13549841
[44,] 0.7984541 0.40309181 0.20154590
[45,] 0.7182561 0.56348770 0.28174385
[46,] 0.6235486 0.75290289 0.37645144
[47,] 0.5014018 0.99719648 0.49859824
[48,] 0.6669839 0.66603214 0.33301607
[49,] 0.5241967 0.95160651 0.47580326
[50,] 0.3752444 0.75048877 0.62475562
> postscript(file="/var/wessaorg/rcomp/tmp/1m57b1322081365.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/2vu1n1322081365.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/3mtz91322081365.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/4escq1322081365.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/5ernm1322081365.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 = 75
Frequency = 1
1 2 3 4 5
-5.991221e-03 6.109593e-03 1.427475e-03 6.076087e-03 -6.467091e-03
6 7 8 9 10
9.276720e-03 -2.010948e-03 -3.703063e-03 3.526457e-03 -3.828947e-03
11 12 13 14 15
7.712917e-03 -1.295822e-02 -3.032355e-03 -2.513900e-03 -8.937464e-04
16 17 18 19 20
3.125174e-03 -4.091248e-03 -1.589032e-03 1.396614e-03 1.621962e-03
21 22 23 24 25
1.307997e-03 2.770209e-03 1.254204e-03 -1.905965e-03 -7.766226e-03
26 27 28 29 30
-3.624656e-04 -9.392071e-03 -1.128714e-03 -5.206995e-03 -2.997305e-03
31 32 33 34 35
2.314350e-03 3.898553e-05 1.259739e-03 -6.823621e-05 2.540500e-03
36 37 38 39 40
-2.171758e-03 4.561120e-03 7.770117e-03 3.255171e-04 1.571101e-03
41 42 43 44 45
-1.050678e-03 6.840868e-04 7.057599e-03 -2.317206e-03 1.207652e-03
46 47 48 49 50
3.871258e-03 -4.839470e-03 -1.809931e-03 -1.010146e-03 2.347395e-03
51 52 53 54 55
-2.291101e-03 1.771240e-03 -6.350731e-03 2.556420e-03 -8.099829e-03
56 57 58 59 60
-9.654724e-04 2.910440e-03 1.124820e-04 -1.430896e-03 7.928983e-04
61 62 63 64 65
-2.638473e-03 1.767967e-03 1.871610e-03 6.902160e-03 1.022264e-02
66 67 68 69 70
-1.908679e-03 4.574684e-03 -7.132592e-04 -7.490819e-04 -2.120210e-03
71 72 73 74 75
2.866821e-03 1.798890e-03 -2.942231e-03 -3.577566e-03 3.591381e-03
> postscript(file="/var/wessaorg/rcomp/tmp/6g1jw1322081365.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 = 75
Frequency = 1
lag(myerror, k = 1) myerror
0 -5.991221e-03 NA
1 6.109593e-03 -5.991221e-03
2 1.427475e-03 6.109593e-03
3 6.076087e-03 1.427475e-03
4 -6.467091e-03 6.076087e-03
5 9.276720e-03 -6.467091e-03
6 -2.010948e-03 9.276720e-03
7 -3.703063e-03 -2.010948e-03
8 3.526457e-03 -3.703063e-03
9 -3.828947e-03 3.526457e-03
10 7.712917e-03 -3.828947e-03
11 -1.295822e-02 7.712917e-03
12 -3.032355e-03 -1.295822e-02
13 -2.513900e-03 -3.032355e-03
14 -8.937464e-04 -2.513900e-03
15 3.125174e-03 -8.937464e-04
16 -4.091248e-03 3.125174e-03
17 -1.589032e-03 -4.091248e-03
18 1.396614e-03 -1.589032e-03
19 1.621962e-03 1.396614e-03
20 1.307997e-03 1.621962e-03
21 2.770209e-03 1.307997e-03
22 1.254204e-03 2.770209e-03
23 -1.905965e-03 1.254204e-03
24 -7.766226e-03 -1.905965e-03
25 -3.624656e-04 -7.766226e-03
26 -9.392071e-03 -3.624656e-04
27 -1.128714e-03 -9.392071e-03
28 -5.206995e-03 -1.128714e-03
29 -2.997305e-03 -5.206995e-03
30 2.314350e-03 -2.997305e-03
31 3.898553e-05 2.314350e-03
32 1.259739e-03 3.898553e-05
33 -6.823621e-05 1.259739e-03
34 2.540500e-03 -6.823621e-05
35 -2.171758e-03 2.540500e-03
36 4.561120e-03 -2.171758e-03
37 7.770117e-03 4.561120e-03
38 3.255171e-04 7.770117e-03
39 1.571101e-03 3.255171e-04
40 -1.050678e-03 1.571101e-03
41 6.840868e-04 -1.050678e-03
42 7.057599e-03 6.840868e-04
43 -2.317206e-03 7.057599e-03
44 1.207652e-03 -2.317206e-03
45 3.871258e-03 1.207652e-03
46 -4.839470e-03 3.871258e-03
47 -1.809931e-03 -4.839470e-03
48 -1.010146e-03 -1.809931e-03
49 2.347395e-03 -1.010146e-03
50 -2.291101e-03 2.347395e-03
51 1.771240e-03 -2.291101e-03
52 -6.350731e-03 1.771240e-03
53 2.556420e-03 -6.350731e-03
54 -8.099829e-03 2.556420e-03
55 -9.654724e-04 -8.099829e-03
56 2.910440e-03 -9.654724e-04
57 1.124820e-04 2.910440e-03
58 -1.430896e-03 1.124820e-04
59 7.928983e-04 -1.430896e-03
60 -2.638473e-03 7.928983e-04
61 1.767967e-03 -2.638473e-03
62 1.871610e-03 1.767967e-03
63 6.902160e-03 1.871610e-03
64 1.022264e-02 6.902160e-03
65 -1.908679e-03 1.022264e-02
66 4.574684e-03 -1.908679e-03
67 -7.132592e-04 4.574684e-03
68 -7.490819e-04 -7.132592e-04
69 -2.120210e-03 -7.490819e-04
70 2.866821e-03 -2.120210e-03
71 1.798890e-03 2.866821e-03
72 -2.942231e-03 1.798890e-03
73 -3.577566e-03 -2.942231e-03
74 3.591381e-03 -3.577566e-03
75 NA 3.591381e-03
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 6.109593e-03 -5.991221e-03
[2,] 1.427475e-03 6.109593e-03
[3,] 6.076087e-03 1.427475e-03
[4,] -6.467091e-03 6.076087e-03
[5,] 9.276720e-03 -6.467091e-03
[6,] -2.010948e-03 9.276720e-03
[7,] -3.703063e-03 -2.010948e-03
[8,] 3.526457e-03 -3.703063e-03
[9,] -3.828947e-03 3.526457e-03
[10,] 7.712917e-03 -3.828947e-03
[11,] -1.295822e-02 7.712917e-03
[12,] -3.032355e-03 -1.295822e-02
[13,] -2.513900e-03 -3.032355e-03
[14,] -8.937464e-04 -2.513900e-03
[15,] 3.125174e-03 -8.937464e-04
[16,] -4.091248e-03 3.125174e-03
[17,] -1.589032e-03 -4.091248e-03
[18,] 1.396614e-03 -1.589032e-03
[19,] 1.621962e-03 1.396614e-03
[20,] 1.307997e-03 1.621962e-03
[21,] 2.770209e-03 1.307997e-03
[22,] 1.254204e-03 2.770209e-03
[23,] -1.905965e-03 1.254204e-03
[24,] -7.766226e-03 -1.905965e-03
[25,] -3.624656e-04 -7.766226e-03
[26,] -9.392071e-03 -3.624656e-04
[27,] -1.128714e-03 -9.392071e-03
[28,] -5.206995e-03 -1.128714e-03
[29,] -2.997305e-03 -5.206995e-03
[30,] 2.314350e-03 -2.997305e-03
[31,] 3.898553e-05 2.314350e-03
[32,] 1.259739e-03 3.898553e-05
[33,] -6.823621e-05 1.259739e-03
[34,] 2.540500e-03 -6.823621e-05
[35,] -2.171758e-03 2.540500e-03
[36,] 4.561120e-03 -2.171758e-03
[37,] 7.770117e-03 4.561120e-03
[38,] 3.255171e-04 7.770117e-03
[39,] 1.571101e-03 3.255171e-04
[40,] -1.050678e-03 1.571101e-03
[41,] 6.840868e-04 -1.050678e-03
[42,] 7.057599e-03 6.840868e-04
[43,] -2.317206e-03 7.057599e-03
[44,] 1.207652e-03 -2.317206e-03
[45,] 3.871258e-03 1.207652e-03
[46,] -4.839470e-03 3.871258e-03
[47,] -1.809931e-03 -4.839470e-03
[48,] -1.010146e-03 -1.809931e-03
[49,] 2.347395e-03 -1.010146e-03
[50,] -2.291101e-03 2.347395e-03
[51,] 1.771240e-03 -2.291101e-03
[52,] -6.350731e-03 1.771240e-03
[53,] 2.556420e-03 -6.350731e-03
[54,] -8.099829e-03 2.556420e-03
[55,] -9.654724e-04 -8.099829e-03
[56,] 2.910440e-03 -9.654724e-04
[57,] 1.124820e-04 2.910440e-03
[58,] -1.430896e-03 1.124820e-04
[59,] 7.928983e-04 -1.430896e-03
[60,] -2.638473e-03 7.928983e-04
[61,] 1.767967e-03 -2.638473e-03
[62,] 1.871610e-03 1.767967e-03
[63,] 6.902160e-03 1.871610e-03
[64,] 1.022264e-02 6.902160e-03
[65,] -1.908679e-03 1.022264e-02
[66,] 4.574684e-03 -1.908679e-03
[67,] -7.132592e-04 4.574684e-03
[68,] -7.490819e-04 -7.132592e-04
[69,] -2.120210e-03 -7.490819e-04
[70,] 2.866821e-03 -2.120210e-03
[71,] 1.798890e-03 2.866821e-03
[72,] -2.942231e-03 1.798890e-03
[73,] -3.577566e-03 -2.942231e-03
[74,] 3.591381e-03 -3.577566e-03
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 6.109593e-03 -5.991221e-03
2 1.427475e-03 6.109593e-03
3 6.076087e-03 1.427475e-03
4 -6.467091e-03 6.076087e-03
5 9.276720e-03 -6.467091e-03
6 -2.010948e-03 9.276720e-03
7 -3.703063e-03 -2.010948e-03
8 3.526457e-03 -3.703063e-03
9 -3.828947e-03 3.526457e-03
10 7.712917e-03 -3.828947e-03
11 -1.295822e-02 7.712917e-03
12 -3.032355e-03 -1.295822e-02
13 -2.513900e-03 -3.032355e-03
14 -8.937464e-04 -2.513900e-03
15 3.125174e-03 -8.937464e-04
16 -4.091248e-03 3.125174e-03
17 -1.589032e-03 -4.091248e-03
18 1.396614e-03 -1.589032e-03
19 1.621962e-03 1.396614e-03
20 1.307997e-03 1.621962e-03
21 2.770209e-03 1.307997e-03
22 1.254204e-03 2.770209e-03
23 -1.905965e-03 1.254204e-03
24 -7.766226e-03 -1.905965e-03
25 -3.624656e-04 -7.766226e-03
26 -9.392071e-03 -3.624656e-04
27 -1.128714e-03 -9.392071e-03
28 -5.206995e-03 -1.128714e-03
29 -2.997305e-03 -5.206995e-03
30 2.314350e-03 -2.997305e-03
31 3.898553e-05 2.314350e-03
32 1.259739e-03 3.898553e-05
33 -6.823621e-05 1.259739e-03
34 2.540500e-03 -6.823621e-05
35 -2.171758e-03 2.540500e-03
36 4.561120e-03 -2.171758e-03
37 7.770117e-03 4.561120e-03
38 3.255171e-04 7.770117e-03
39 1.571101e-03 3.255171e-04
40 -1.050678e-03 1.571101e-03
41 6.840868e-04 -1.050678e-03
42 7.057599e-03 6.840868e-04
43 -2.317206e-03 7.057599e-03
44 1.207652e-03 -2.317206e-03
45 3.871258e-03 1.207652e-03
46 -4.839470e-03 3.871258e-03
47 -1.809931e-03 -4.839470e-03
48 -1.010146e-03 -1.809931e-03
49 2.347395e-03 -1.010146e-03
50 -2.291101e-03 2.347395e-03
51 1.771240e-03 -2.291101e-03
52 -6.350731e-03 1.771240e-03
53 2.556420e-03 -6.350731e-03
54 -8.099829e-03 2.556420e-03
55 -9.654724e-04 -8.099829e-03
56 2.910440e-03 -9.654724e-04
57 1.124820e-04 2.910440e-03
58 -1.430896e-03 1.124820e-04
59 7.928983e-04 -1.430896e-03
60 -2.638473e-03 7.928983e-04
61 1.767967e-03 -2.638473e-03
62 1.871610e-03 1.767967e-03
63 6.902160e-03 1.871610e-03
64 1.022264e-02 6.902160e-03
65 -1.908679e-03 1.022264e-02
66 4.574684e-03 -1.908679e-03
67 -7.132592e-04 4.574684e-03
68 -7.490819e-04 -7.132592e-04
69 -2.120210e-03 -7.490819e-04
70 2.866821e-03 -2.120210e-03
71 1.798890e-03 2.866821e-03
72 -2.942231e-03 1.798890e-03
73 -3.577566e-03 -2.942231e-03
74 3.591381e-03 -3.577566e-03
> 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/7ul2s1322081365.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/8cb4z1322081365.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/9hbad1322081365.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/106c1s1322081365.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/11501k1322081366.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/12sda71322081366.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/135xtl1322081366.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/14zcit1322081366.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/15xkma1322081366.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/16wq9e1322081366.tab")
+ }
>
> try(system("convert tmp/1m57b1322081365.ps tmp/1m57b1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/2vu1n1322081365.ps tmp/2vu1n1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/3mtz91322081365.ps tmp/3mtz91322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/4escq1322081365.ps tmp/4escq1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/5ernm1322081365.ps tmp/5ernm1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/6g1jw1322081365.ps tmp/6g1jw1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ul2s1322081365.ps tmp/7ul2s1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/8cb4z1322081365.ps tmp/8cb4z1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/9hbad1322081365.ps tmp/9hbad1322081365.png",intern=TRUE))
character(0)
> try(system("convert tmp/106c1s1322081365.ps tmp/106c1s1322081365.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.632 0.630 4.485