R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
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(13.193
+ ,651
+ ,3.063
+ ,5.951
+ ,22.858
+ ,15.234
+ ,736
+ ,3.547
+ ,6.789
+ ,26.306
+ ,14.718
+ ,878
+ ,3.240
+ ,6.302
+ ,25.138
+ ,16.961
+ ,916
+ ,3.708
+ ,6.961
+ ,28.546
+ ,13.945
+ ,724
+ ,3.337
+ ,6.162
+ ,24.168
+ ,15.876
+ ,841
+ ,4.104
+ ,7.534
+ ,28.355
+ ,16.226
+ ,1.028
+ ,4.846
+ ,7.462
+ ,29.562
+ ,18.316
+ ,994
+ ,4.590
+ ,8.894
+ ,32.794
+ ,16.748
+ ,855
+ ,3.917
+ ,7.734
+ ,29.254
+ ,17.904
+ ,889
+ ,4.376
+ ,8.968
+ ,32.137
+ ,17.209
+ ,1.117
+ ,4.312
+ ,8.383
+ ,31.021
+ ,18.950
+ ,1.132
+ ,4.941
+ ,9.790
+ ,34.813
+ ,17.225
+ ,899
+ ,4.659
+ ,9.656
+ ,32.439
+ ,18.710
+ ,944
+ ,5.227
+ ,10.440
+ ,35.321
+ ,17.236
+ ,1.167
+ ,4.933
+ ,9.820
+ ,33.156
+ ,18.687
+ ,1.089
+ ,5.381
+ ,10.947
+ ,36.104
+ ,17.580
+ ,970
+ ,5.472
+ ,10.439
+ ,34.461
+ ,19.568
+ ,1.151
+ ,6.405
+ ,12.289
+ ,39.413
+ ,17.381
+ ,1.246
+ ,5.622
+ ,11.303
+ ,35.552
+ ,19.580
+ ,1.583
+ ,6.229
+ ,12.240
+ ,39.632
+ ,17.260
+ ,1.120
+ ,5.671
+ ,11.392
+ ,35.443
+ ,18.661
+ ,1.063
+ ,5.606
+ ,11.120
+ ,36.450
+ ,15.658
+ ,1.015
+ ,4.516
+ ,9.597
+ ,30.786
+ ,18.674
+ ,1.175
+ ,5.483
+ ,10.692
+ ,36.024
+ ,15.908
+ ,882
+ ,4.985
+ ,9.217
+ ,30.992
+ ,17.475
+ ,911
+ ,5.332
+ ,9.371
+ ,33.089
+ ,17.725
+ ,1.076
+ ,5.377
+ ,9.526
+ ,33.704
+ ,19.562
+ ,1.147
+ ,5.948
+ ,10.837
+ ,37.494
+ ,16.368
+ ,946
+ ,5.308
+ ,9.749
+ ,32.371
+ ,19.555
+ ,1.032
+ ,6.721
+ ,9.939
+ ,37.247
+ ,17.743
+ ,1.090
+ ,5.840
+ ,9.309
+ ,33.982
+ ,19.867
+ ,1.131
+ ,6.152
+ ,10.316
+ ,37.466
+ ,15.703
+ ,870
+ ,5.184
+ ,8.546
+ ,30.303
+ ,19.324
+ ,1.113
+ ,6.610
+ ,9.885
+ ,36.932
+ ,18.162
+ ,1.172
+ ,6.417
+ ,9.266
+ ,35.017
+ ,19.074
+ ,1.147
+ ,6.529
+ ,9.978
+ ,36.728
+ ,15.323
+ ,891
+ ,5.412
+ ,8.685
+ ,30.311
+ ,19.704
+ ,1.036
+ ,6.807
+ ,10.066
+ ,37.613
+ ,18.375
+ ,1.204
+ ,6.817
+ ,9.668
+ ,36.064
+ ,18.352
+ ,1.055
+ ,6.582
+ ,9.562
+ ,35.551
+ ,13.927
+ ,771
+ ,5.019
+ ,7.894
+ ,27.611
+ ,17.795
+ ,938
+ ,5.935
+ ,7.949
+ ,32.617
+ ,16.761
+ ,995
+ ,5.548
+ ,7.594
+ ,30.898
+ ,18.902
+ ,1.088
+ ,6.141
+ ,8.563
+ ,34.694
+ ,16.239
+ ,1.076
+ ,6.040
+ ,8.061
+ ,31.416
+ ,19.158
+ ,1.370
+ ,7.587
+ ,8.831
+ ,36.946
+ ,18.279
+ ,1.560
+ ,6.460
+ ,8.593
+ ,34.892
+ ,15.698
+ ,1.239
+ ,6.355
+ ,7.031
+ ,30.323
+ ,16.239
+ ,1.076
+ ,6.040
+ ,8.061
+ ,31.416
+ ,18.431
+ ,1.566
+ ,7.117
+ ,8.569
+ ,35.683
+ ,18.414
+ ,1.651
+ ,6.912
+ ,8.234
+ ,35.211
+ ,19.801
+ ,1.792
+ ,8.212
+ ,8.895
+ ,38.700
+ ,14.995
+ ,1.306
+ ,6.274
+ ,7.104
+ ,29.679
+ ,18.706
+ ,1.665
+ ,7.510
+ ,7.580
+ ,35.461
+ ,18.232
+ ,1.930
+ ,7.133
+ ,7.421
+ ,34.716
+ ,19.409
+ ,1.717
+ ,7.748
+ ,7.883
+ ,36.757
+ ,16.263
+ ,1.353
+ ,6.957
+ ,6.700
+ ,31.273
+ ,19.017
+ ,1.666
+ ,8.260
+ ,7.305
+ ,36.248
+ ,20.298
+ ,2.070
+ ,8.745
+ ,8.047
+ ,39.160
+ ,19.891
+ ,2.168
+ ,8.440
+ ,8.305
+ ,38.804
+ ,15.203
+ ,1.518
+ ,6.573
+ ,6.255
+ ,29.549
+ ,17.845
+ ,1.737
+ ,7.668
+ ,6.896
+ ,34.146
+ ,17.502
+ ,2.348
+ ,7.865
+ ,6.759
+ ,34.474
+ ,18.532
+ ,2.374
+ ,7.941
+ ,7.265
+ ,36.112
+ ,15.737
+ ,2.004
+ ,7.907
+ ,6.093
+ ,31.741
+ ,17.770
+ ,2.186
+ ,8.470
+ ,6.326
+ ,34.752
+ ,17.224
+ ,2.428
+ ,8.347
+ ,5.956
+ ,33.955
+ ,17.601
+ ,2.149
+ ,8.080
+ ,5.647
+ ,33.477
+ ,14.940
+ ,2.184
+ ,7.676
+ ,4.955
+ ,29.755
+ ,18.507
+ ,2.585
+ ,9.214
+ ,5.703
+ ,36.009
+ ,17.635
+ ,2.528
+ ,8.674
+ ,5.352
+ ,34.189
+ ,19.392
+ ,2.659
+ ,9.170
+ ,5.578
+ ,36.799
+ ,15.699
+ ,2.152
+ ,8.217
+ ,4.649
+ ,30.717
+ ,17.661
+ ,2.401
+ ,9.102
+ ,5.122
+ ,34.286
+ ,18.243
+ ,2.848
+ ,9.391
+ ,5.278
+ ,35.760
+ ,19.643
+ ,3.282
+ ,10.301
+ ,6.193
+ ,39.419
+ ,15.770
+ ,2.572
+ ,9.081
+ ,5.036
+ ,32.459
+ ,17.344
+ ,2.985
+ ,9.771
+ ,5.472
+ ,35.572
+ ,17.229
+ ,3.477
+ ,9.778
+ ,5.649
+ ,36.133
+ ,17.322
+ ,3.336
+ ,10.256
+ ,5.678
+ ,36.592
+ ,16.152
+ ,3.668
+ ,7.022
+ ,6.382
+ ,33.224
+ ,17.919
+ ,4.210
+ ,8.307
+ ,7.225
+ ,37.661
+ ,16.918
+ ,4.161
+ ,7.942
+ ,6.161
+ ,35.182
+ ,18.114
+ ,4.572
+ ,9.643
+ ,7.145
+ ,39.474
+ ,16.308
+ ,3.886
+ ,8.561
+ ,6.745
+ ,35.500
+ ,17.759
+ ,4.165
+ ,9.162
+ ,6.840
+ ,37.926
+ ,16.021
+ ,4.048
+ ,8.579
+ ,5.898
+ ,34.546
+ ,17.952
+ ,4.595
+ ,10.054
+ ,6.408
+ ,39.009
+ ,15.954
+ ,3.886
+ ,9.367
+ ,5.540
+ ,34.747
+ ,17.762
+ ,4.345
+ ,10.714
+ ,5.859
+ ,38.680
+ ,16.610
+ ,4.424
+ ,9.726
+ ,5.429
+ ,36.189
+ ,17.751
+ ,4.513
+ ,10.460
+ ,5.950
+ ,38.674
+ ,15.458
+ ,3.773
+ ,9.611
+ ,4.924
+ ,33.766
+ ,18.106
+ ,4.368
+ ,11.436
+ ,5.688
+ ,39.598
+ ,15.990
+ ,4.218
+ ,9.620
+ ,4.710
+ ,34.538
+ ,15.349
+ ,4.040
+ ,9.378
+ ,4.555
+ ,33.322
+ ,13.185
+ ,3.225
+ ,7.856
+ ,3.792
+ ,28.058
+ ,15.409
+ ,3.861
+ ,9.079
+ ,4.265
+ ,32.614
+ ,16.007
+ ,4.323
+ ,9.279
+ ,4.345
+ ,33.954
+ ,16.633
+ ,4.602
+ ,10.345
+ ,5.062
+ ,36.642
+ ,14.800
+ ,3.909
+ ,9.281
+ ,4.312
+ ,32.302
+ ,15.974
+ ,4.212
+ ,10.047
+ ,4.582
+ ,34.815
+ ,15.693
+ ,4.328
+ ,9.352
+ ,4.229
+ ,33.602)
+ ,dim=c(5
+ ,103)
+ ,dimnames=list(c('huis'
+ ,'villa'
+ ,'app'
+ ,'grond'
+ ,'totaal')
+ ,1:103))
> y <- array(NA,dim=c(5,103),dimnames=list(c('huis','villa','app','grond','totaal'),1:103))
> 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
Attaching package: 'zoo'
The following object(s) are masked from package:base :
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
huis villa app grond totaal
1 13.193 651.000 3.063 5.951 22.858
2 15.234 736.000 3.547 6.789 26.306
3 14.718 878.000 3.240 6.302 25.138
4 16.961 916.000 3.708 6.961 28.546
5 13.945 724.000 3.337 6.162 24.168
6 15.876 841.000 4.104 7.534 28.355
7 16.226 1.028 4.846 7.462 29.562
8 18.316 994.000 4.590 8.894 32.794
9 16.748 855.000 3.917 7.734 29.254
10 17.904 889.000 4.376 8.968 32.137
11 17.209 1.117 4.312 8.383 31.021
12 18.950 1.132 4.941 9.790 34.813
13 17.225 899.000 4.659 9.656 32.439
14 18.710 944.000 5.227 10.440 35.321
15 17.236 1.167 4.933 9.820 33.156
16 18.687 1.089 5.381 10.947 36.104
17 17.580 970.000 5.472 10.439 34.461
18 19.568 1.151 6.405 12.289 39.413
19 17.381 1.246 5.622 11.303 35.552
20 19.580 1.583 6.229 12.240 39.632
21 17.260 1.120 5.671 11.392 35.443
22 18.661 1.063 5.606 11.120 36.450
23 15.658 1.015 4.516 9.597 30.786
24 18.674 1.175 5.483 10.692 36.024
25 15.908 882.000 4.985 9.217 30.992
26 17.475 911.000 5.332 9.371 33.089
27 17.725 1.076 5.377 9.526 33.704
28 19.562 1.147 5.948 10.837 37.494
29 16.368 946.000 5.308 9.749 32.371
30 19.555 1.032 6.721 9.939 37.247
31 17.743 1.090 5.840 9.309 33.982
32 19.867 1.131 6.152 10.316 37.466
33 15.703 870.000 5.184 8.546 30.303
34 19.324 1.113 6.610 9.885 36.932
35 18.162 1.172 6.417 9.266 35.017
36 19.074 1.147 6.529 9.978 36.728
37 15.323 891.000 5.412 8.685 30.311
38 19.704 1.036 6.807 10.066 37.613
39 18.375 1.204 6.817 9.668 36.064
40 18.352 1.055 6.582 9.562 35.551
41 13.927 771.000 5.019 7.894 27.611
42 17.795 938.000 5.935 7.949 32.617
43 16.761 995.000 5.548 7.594 30.898
44 18.902 1.088 6.141 8.563 34.694
45 16.239 1.076 6.040 8.061 31.416
46 19.158 1.370 7.587 8.831 36.946
47 18.279 1.560 6.460 8.593 34.892
48 15.698 1.239 6.355 7.031 30.323
49 16.239 1.076 6.040 8.061 31.416
50 18.431 1.566 7.117 8.569 35.683
51 18.414 1.651 6.912 8.234 35.211
52 19.801 1.792 8.212 8.895 38.700
53 14.995 1.306 6.274 7.104 29.679
54 18.706 1.665 7.510 7.580 35.461
55 18.232 1.930 7.133 7.421 34.716
56 19.409 1.717 7.748 7.883 36.757
57 16.263 1.353 6.957 6.700 31.273
58 19.017 1.666 8.260 7.305 36.248
59 20.298 2.070 8.745 8.047 39.160
60 19.891 2.168 8.440 8.305 38.804
61 15.203 1.518 6.573 6.255 29.549
62 17.845 1.737 7.668 6.896 34.146
63 17.502 2.348 7.865 6.759 34.474
64 18.532 2.374 7.941 7.265 36.112
65 15.737 2.004 7.907 6.093 31.741
66 17.770 2.186 8.470 6.326 34.752
67 17.224 2.428 8.347 5.956 33.955
68 17.601 2.149 8.080 5.647 33.477
69 14.940 2.184 7.676 4.955 29.755
70 18.507 2.585 9.214 5.703 36.009
71 17.635 2.528 8.674 5.352 34.189
72 19.392 2.659 9.170 5.578 36.799
73 15.699 2.152 8.217 4.649 30.717
74 17.661 2.401 9.102 5.122 34.286
75 18.243 2.848 9.391 5.278 35.760
76 19.643 3.282 10.301 6.193 39.419
77 15.770 2.572 9.081 5.036 32.459
78 17.344 2.985 9.771 5.472 35.572
79 17.229 3.477 9.778 5.649 36.133
80 17.322 3.336 10.256 5.678 36.592
81 16.152 3.668 7.022 6.382 33.224
82 17.919 4.210 8.307 7.225 37.661
83 16.918 4.161 7.942 6.161 35.182
84 18.114 4.572 9.643 7.145 39.474
85 16.308 3.886 8.561 6.745 35.500
86 17.759 4.165 9.162 6.840 37.926
87 16.021 4.048 8.579 5.898 34.546
88 17.952 4.595 10.054 6.408 39.009
89 15.954 3.886 9.367 5.540 34.747
90 17.762 4.345 10.714 5.859 38.680
91 16.610 4.424 9.726 5.429 36.189
92 17.751 4.513 10.460 5.950 38.674
93 15.458 3.773 9.611 4.924 33.766
94 18.106 4.368 11.436 5.688 39.598
95 15.990 4.218 9.620 4.710 34.538
96 15.349 4.040 9.378 4.555 33.322
97 13.185 3.225 7.856 3.792 28.058
98 15.409 3.861 9.079 4.265 32.614
99 16.007 4.323 9.279 4.345 33.954
100 16.633 4.602 10.345 5.062 36.642
101 14.800 3.909 9.281 4.312 32.302
102 15.974 4.212 10.047 4.582 34.815
103 15.693 4.328 9.352 4.229 33.602
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) villa app grond totaal
1.3283087 -0.0001254 -1.1404059 -0.5865527 0.8383856
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1.27906 -0.34617 0.01673 0.41154 1.00362
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.3283087 0.6977286 1.904 0.0599 .
villa -0.0001254 0.0002085 -0.601 0.5490
app -1.1404059 0.1253620 -9.097 1.10e-14 ***
grond -0.5865527 0.0979190 -5.990 3.47e-08 ***
totaal 0.8383856 0.0571852 14.661 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.5596 on 98 degrees of freedom
Multiple R-squared: 0.8811, Adjusted R-squared: 0.8762
F-statistic: 181.5 on 4 and 98 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,] 2.650137e-03 5.300273e-03 9.973499e-01
[2,] 2.677487e-04 5.354974e-04 9.997323e-01
[3,] 2.479084e-05 4.958169e-05 9.999752e-01
[4,] 6.020888e-06 1.204178e-05 9.999940e-01
[5,] 6.315098e-07 1.263020e-06 9.999994e-01
[6,] 9.686990e-08 1.937398e-07 9.999999e-01
[7,] 8.720236e-09 1.744047e-08 1.000000e+00
[8,] 4.521528e-09 9.043055e-09 1.000000e+00
[9,] 7.127578e-10 1.425516e-09 1.000000e+00
[10,] 1.202438e-10 2.404875e-10 1.000000e+00
[11,] 1.610005e-11 3.220010e-11 1.000000e+00
[12,] 2.698498e-11 5.396996e-11 1.000000e+00
[13,] 1.344914e-09 2.689829e-09 1.000000e+00
[14,] 2.881418e-10 5.762836e-10 1.000000e+00
[15,] 1.384893e-10 2.769786e-10 1.000000e+00
[16,] 3.315503e-11 6.631005e-11 1.000000e+00
[17,] 6.727307e-12 1.345461e-11 1.000000e+00
[18,] 1.152775e-12 2.305551e-12 1.000000e+00
[19,] 1.958297e-13 3.916595e-13 1.000000e+00
[20,] 4.014023e-14 8.028046e-14 1.000000e+00
[21,] 1.053566e-14 2.107132e-14 1.000000e+00
[22,] 2.132894e-15 4.265789e-15 1.000000e+00
[23,] 7.453188e-16 1.490638e-15 1.000000e+00
[24,] 1.256431e-16 2.512862e-16 1.000000e+00
[25,] 2.123386e-17 4.246772e-17 1.000000e+00
[26,] 3.607741e-18 7.215482e-18 1.000000e+00
[27,] 5.062189e-19 1.012438e-18 1.000000e+00
[28,] 1.414115e-19 2.828231e-19 1.000000e+00
[29,] 2.017509e-20 4.035018e-20 1.000000e+00
[30,] 3.915235e-21 7.830470e-21 1.000000e+00
[31,] 1.169895e-21 2.339791e-21 1.000000e+00
[32,] 3.522160e-22 7.044320e-22 1.000000e+00
[33,] 5.478055e-23 1.095611e-22 1.000000e+00
[34,] 1.236948e-23 2.473897e-23 1.000000e+00
[35,] 2.170655e-24 4.341311e-24 1.000000e+00
[36,] 1.000000e+00 0.000000e+00 0.000000e+00
[37,] 1.000000e+00 0.000000e+00 0.000000e+00
[38,] 1.000000e+00 0.000000e+00 0.000000e+00
[39,] 1.000000e+00 0.000000e+00 0.000000e+00
[40,] 1.000000e+00 0.000000e+00 0.000000e+00
[41,] 1.000000e+00 0.000000e+00 0.000000e+00
[42,] 1.000000e+00 0.000000e+00 0.000000e+00
[43,] 1.000000e+00 0.000000e+00 0.000000e+00
[44,] 1.000000e+00 0.000000e+00 0.000000e+00
[45,] 1.000000e+00 0.000000e+00 0.000000e+00
[46,] 1.000000e+00 0.000000e+00 0.000000e+00
[47,] 1.000000e+00 0.000000e+00 0.000000e+00
[48,] 1.000000e+00 0.000000e+00 0.000000e+00
[49,] 1.000000e+00 0.000000e+00 0.000000e+00
[50,] 1.000000e+00 0.000000e+00 0.000000e+00
[51,] 1.000000e+00 0.000000e+00 0.000000e+00
[52,] 1.000000e+00 0.000000e+00 0.000000e+00
[53,] 1.000000e+00 0.000000e+00 0.000000e+00
[54,] 1.000000e+00 0.000000e+00 0.000000e+00
[55,] 1.000000e+00 0.000000e+00 0.000000e+00
[56,] 1.000000e+00 0.000000e+00 0.000000e+00
[57,] 1.000000e+00 0.000000e+00 0.000000e+00
[58,] 1.000000e+00 0.000000e+00 0.000000e+00
[59,] 1.000000e+00 0.000000e+00 0.000000e+00
[60,] 1.000000e+00 0.000000e+00 0.000000e+00
[61,] 1.000000e+00 0.000000e+00 0.000000e+00
[62,] 1.000000e+00 0.000000e+00 0.000000e+00
[63,] 1.000000e+00 0.000000e+00 0.000000e+00
[64,] 1.000000e+00 0.000000e+00 0.000000e+00
[65,] 1.000000e+00 0.000000e+00 0.000000e+00
[66,] 1.000000e+00 0.000000e+00 0.000000e+00
[67,] 1.000000e+00 3.920146e-314 1.960073e-314
[68,] 1.000000e+00 6.731579e-315 3.365789e-315
[69,] 1.000000e+00 3.717382e-302 1.858691e-302
[70,] 1.000000e+00 1.967246e-281 9.836232e-282
[71,] 1.000000e+00 1.333774e-271 6.668872e-272
[72,] 1.000000e+00 6.432601e-259 3.216300e-259
[73,] 1.000000e+00 1.036017e-242 5.180085e-243
[74,] 1.000000e+00 9.332794e-236 4.666397e-236
[75,] 1.000000e+00 5.251601e-224 2.625800e-224
[76,] 1.000000e+00 2.577046e-211 1.288523e-211
[77,] 1.000000e+00 1.401833e-191 7.009163e-192
[78,] 1.000000e+00 1.174975e-182 5.874874e-183
[79,] 1.000000e+00 3.159513e-165 1.579757e-165
[80,] 1.000000e+00 1.527984e-150 7.639921e-151
[81,] 1.000000e+00 5.271406e-135 2.635703e-135
[82,] 1.000000e+00 7.276051e-129 3.638025e-129
[83,] 1.000000e+00 1.374294e-112 6.871471e-113
[84,] 1.000000e+00 3.342690e-100 1.671345e-100
[85,] 1.000000e+00 2.077122e-86 1.038561e-86
[86,] 1.000000e+00 5.119260e-72 2.559630e-72
[87,] 1.000000e+00 8.265359e-55 4.132680e-55
[88,] 1.000000e+00 1.381406e-41 6.907031e-42
> postscript(file="/var/www/html/rcomp/tmp/1ksyh1292679608.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/www/html/rcomp/tmp/25ae51292679608.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/www/html/rcomp/tmp/35ae51292679608.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/www/html/rcomp/tmp/4ykdq1292679608.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/www/html/rcomp/tmp/5ykdq1292679608.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 = 103
Frequency = 1
1 2 3 4 5 6
-0.233856433 -0.029463836 -0.184178948 0.126616034 -0.134753880 -0.019961591
7 8 9 10 11 12
0.016727163 0.069579097 0.004139915 -0.005410074 -0.292227997 -0.187789498
13 14 15 16 17 18
-0.210065456 -0.028042185 -0.504106779 -0.352730684 -0.154957363 -0.291011645
19 20 21 22 23 24
-0.712271553 -0.692016440 -0.633820241 -0.310750439 -0.701502381 -0.331898593
25 26 27 28 29 30
-0.201777507 0.096814251 -0.140659815 -0.060990122 -0.209488821 0.493886100
31 32 33 34 35 36
0.044996706 0.194531502 0.002729340 0.368728836 0.229070267 0.251940297
37 38 39 40 41 42
-0.039801069 0.508604557 0.256241051 0.333144235 -0.099350070 0.669504739
43 44 45 46 47 48
0.434273940 0.512759724 0.188355877 0.686973627 0.105204604 0.318810368
49 50 51 52 53 54
0.188355877 0.329211700 0.277662021 0.609791173 0.106184591 0.658424596
55 56 57 58 59 60
0.285860236 0.724025399 0.579733687 1.003617622 0.831608264 0.526592652
61 62 63 64 65 66
0.266199408 0.678892805 0.205281166 0.245475273 0.388798909 0.676157863
67 68 69 70 71 72
0.441087137 0.733067335 0.325924615 0.842396771 0.674552316 0.941584454
73 74 75 76 77 78
0.715868060 0.972399566 0.739754708 0.646621149 0.538759506 0.545533835
79 80 81 82 83 84
0.072063860 0.342351199 -1.279063774 -1.272027413 -1.235015789 -1.120317172
85 86 87 88 89 90
-1.063198900 -0.904981038 -1.026641530 -0.856047509 -0.573523415 -0.339599559
91 92 93 94 95 96
-0.782109686 -0.581834969 -0.330138718 -0.042162175 -0.560575253 -0.549014529
97 98 99 100 101 102
-0.483092174 -0.406541582 -0.656915011 -0.648229679 -0.496029285 -0.396934274
103
-0.660593128
> postscript(file="/var/www/html/rcomp/tmp/6ykdq1292679608.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 = 103
Frequency = 1
lag(myerror, k = 1) myerror
0 -0.233856433 NA
1 -0.029463836 -0.233856433
2 -0.184178948 -0.029463836
3 0.126616034 -0.184178948
4 -0.134753880 0.126616034
5 -0.019961591 -0.134753880
6 0.016727163 -0.019961591
7 0.069579097 0.016727163
8 0.004139915 0.069579097
9 -0.005410074 0.004139915
10 -0.292227997 -0.005410074
11 -0.187789498 -0.292227997
12 -0.210065456 -0.187789498
13 -0.028042185 -0.210065456
14 -0.504106779 -0.028042185
15 -0.352730684 -0.504106779
16 -0.154957363 -0.352730684
17 -0.291011645 -0.154957363
18 -0.712271553 -0.291011645
19 -0.692016440 -0.712271553
20 -0.633820241 -0.692016440
21 -0.310750439 -0.633820241
22 -0.701502381 -0.310750439
23 -0.331898593 -0.701502381
24 -0.201777507 -0.331898593
25 0.096814251 -0.201777507
26 -0.140659815 0.096814251
27 -0.060990122 -0.140659815
28 -0.209488821 -0.060990122
29 0.493886100 -0.209488821
30 0.044996706 0.493886100
31 0.194531502 0.044996706
32 0.002729340 0.194531502
33 0.368728836 0.002729340
34 0.229070267 0.368728836
35 0.251940297 0.229070267
36 -0.039801069 0.251940297
37 0.508604557 -0.039801069
38 0.256241051 0.508604557
39 0.333144235 0.256241051
40 -0.099350070 0.333144235
41 0.669504739 -0.099350070
42 0.434273940 0.669504739
43 0.512759724 0.434273940
44 0.188355877 0.512759724
45 0.686973627 0.188355877
46 0.105204604 0.686973627
47 0.318810368 0.105204604
48 0.188355877 0.318810368
49 0.329211700 0.188355877
50 0.277662021 0.329211700
51 0.609791173 0.277662021
52 0.106184591 0.609791173
53 0.658424596 0.106184591
54 0.285860236 0.658424596
55 0.724025399 0.285860236
56 0.579733687 0.724025399
57 1.003617622 0.579733687
58 0.831608264 1.003617622
59 0.526592652 0.831608264
60 0.266199408 0.526592652
61 0.678892805 0.266199408
62 0.205281166 0.678892805
63 0.245475273 0.205281166
64 0.388798909 0.245475273
65 0.676157863 0.388798909
66 0.441087137 0.676157863
67 0.733067335 0.441087137
68 0.325924615 0.733067335
69 0.842396771 0.325924615
70 0.674552316 0.842396771
71 0.941584454 0.674552316
72 0.715868060 0.941584454
73 0.972399566 0.715868060
74 0.739754708 0.972399566
75 0.646621149 0.739754708
76 0.538759506 0.646621149
77 0.545533835 0.538759506
78 0.072063860 0.545533835
79 0.342351199 0.072063860
80 -1.279063774 0.342351199
81 -1.272027413 -1.279063774
82 -1.235015789 -1.272027413
83 -1.120317172 -1.235015789
84 -1.063198900 -1.120317172
85 -0.904981038 -1.063198900
86 -1.026641530 -0.904981038
87 -0.856047509 -1.026641530
88 -0.573523415 -0.856047509
89 -0.339599559 -0.573523415
90 -0.782109686 -0.339599559
91 -0.581834969 -0.782109686
92 -0.330138718 -0.581834969
93 -0.042162175 -0.330138718
94 -0.560575253 -0.042162175
95 -0.549014529 -0.560575253
96 -0.483092174 -0.549014529
97 -0.406541582 -0.483092174
98 -0.656915011 -0.406541582
99 -0.648229679 -0.656915011
100 -0.496029285 -0.648229679
101 -0.396934274 -0.496029285
102 -0.660593128 -0.396934274
103 NA -0.660593128
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.029463836 -0.233856433
[2,] -0.184178948 -0.029463836
[3,] 0.126616034 -0.184178948
[4,] -0.134753880 0.126616034
[5,] -0.019961591 -0.134753880
[6,] 0.016727163 -0.019961591
[7,] 0.069579097 0.016727163
[8,] 0.004139915 0.069579097
[9,] -0.005410074 0.004139915
[10,] -0.292227997 -0.005410074
[11,] -0.187789498 -0.292227997
[12,] -0.210065456 -0.187789498
[13,] -0.028042185 -0.210065456
[14,] -0.504106779 -0.028042185
[15,] -0.352730684 -0.504106779
[16,] -0.154957363 -0.352730684
[17,] -0.291011645 -0.154957363
[18,] -0.712271553 -0.291011645
[19,] -0.692016440 -0.712271553
[20,] -0.633820241 -0.692016440
[21,] -0.310750439 -0.633820241
[22,] -0.701502381 -0.310750439
[23,] -0.331898593 -0.701502381
[24,] -0.201777507 -0.331898593
[25,] 0.096814251 -0.201777507
[26,] -0.140659815 0.096814251
[27,] -0.060990122 -0.140659815
[28,] -0.209488821 -0.060990122
[29,] 0.493886100 -0.209488821
[30,] 0.044996706 0.493886100
[31,] 0.194531502 0.044996706
[32,] 0.002729340 0.194531502
[33,] 0.368728836 0.002729340
[34,] 0.229070267 0.368728836
[35,] 0.251940297 0.229070267
[36,] -0.039801069 0.251940297
[37,] 0.508604557 -0.039801069
[38,] 0.256241051 0.508604557
[39,] 0.333144235 0.256241051
[40,] -0.099350070 0.333144235
[41,] 0.669504739 -0.099350070
[42,] 0.434273940 0.669504739
[43,] 0.512759724 0.434273940
[44,] 0.188355877 0.512759724
[45,] 0.686973627 0.188355877
[46,] 0.105204604 0.686973627
[47,] 0.318810368 0.105204604
[48,] 0.188355877 0.318810368
[49,] 0.329211700 0.188355877
[50,] 0.277662021 0.329211700
[51,] 0.609791173 0.277662021
[52,] 0.106184591 0.609791173
[53,] 0.658424596 0.106184591
[54,] 0.285860236 0.658424596
[55,] 0.724025399 0.285860236
[56,] 0.579733687 0.724025399
[57,] 1.003617622 0.579733687
[58,] 0.831608264 1.003617622
[59,] 0.526592652 0.831608264
[60,] 0.266199408 0.526592652
[61,] 0.678892805 0.266199408
[62,] 0.205281166 0.678892805
[63,] 0.245475273 0.205281166
[64,] 0.388798909 0.245475273
[65,] 0.676157863 0.388798909
[66,] 0.441087137 0.676157863
[67,] 0.733067335 0.441087137
[68,] 0.325924615 0.733067335
[69,] 0.842396771 0.325924615
[70,] 0.674552316 0.842396771
[71,] 0.941584454 0.674552316
[72,] 0.715868060 0.941584454
[73,] 0.972399566 0.715868060
[74,] 0.739754708 0.972399566
[75,] 0.646621149 0.739754708
[76,] 0.538759506 0.646621149
[77,] 0.545533835 0.538759506
[78,] 0.072063860 0.545533835
[79,] 0.342351199 0.072063860
[80,] -1.279063774 0.342351199
[81,] -1.272027413 -1.279063774
[82,] -1.235015789 -1.272027413
[83,] -1.120317172 -1.235015789
[84,] -1.063198900 -1.120317172
[85,] -0.904981038 -1.063198900
[86,] -1.026641530 -0.904981038
[87,] -0.856047509 -1.026641530
[88,] -0.573523415 -0.856047509
[89,] -0.339599559 -0.573523415
[90,] -0.782109686 -0.339599559
[91,] -0.581834969 -0.782109686
[92,] -0.330138718 -0.581834969
[93,] -0.042162175 -0.330138718
[94,] -0.560575253 -0.042162175
[95,] -0.549014529 -0.560575253
[96,] -0.483092174 -0.549014529
[97,] -0.406541582 -0.483092174
[98,] -0.656915011 -0.406541582
[99,] -0.648229679 -0.656915011
[100,] -0.496029285 -0.648229679
[101,] -0.396934274 -0.496029285
[102,] -0.660593128 -0.396934274
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.029463836 -0.233856433
2 -0.184178948 -0.029463836
3 0.126616034 -0.184178948
4 -0.134753880 0.126616034
5 -0.019961591 -0.134753880
6 0.016727163 -0.019961591
7 0.069579097 0.016727163
8 0.004139915 0.069579097
9 -0.005410074 0.004139915
10 -0.292227997 -0.005410074
11 -0.187789498 -0.292227997
12 -0.210065456 -0.187789498
13 -0.028042185 -0.210065456
14 -0.504106779 -0.028042185
15 -0.352730684 -0.504106779
16 -0.154957363 -0.352730684
17 -0.291011645 -0.154957363
18 -0.712271553 -0.291011645
19 -0.692016440 -0.712271553
20 -0.633820241 -0.692016440
21 -0.310750439 -0.633820241
22 -0.701502381 -0.310750439
23 -0.331898593 -0.701502381
24 -0.201777507 -0.331898593
25 0.096814251 -0.201777507
26 -0.140659815 0.096814251
27 -0.060990122 -0.140659815
28 -0.209488821 -0.060990122
29 0.493886100 -0.209488821
30 0.044996706 0.493886100
31 0.194531502 0.044996706
32 0.002729340 0.194531502
33 0.368728836 0.002729340
34 0.229070267 0.368728836
35 0.251940297 0.229070267
36 -0.039801069 0.251940297
37 0.508604557 -0.039801069
38 0.256241051 0.508604557
39 0.333144235 0.256241051
40 -0.099350070 0.333144235
41 0.669504739 -0.099350070
42 0.434273940 0.669504739
43 0.512759724 0.434273940
44 0.188355877 0.512759724
45 0.686973627 0.188355877
46 0.105204604 0.686973627
47 0.318810368 0.105204604
48 0.188355877 0.318810368
49 0.329211700 0.188355877
50 0.277662021 0.329211700
51 0.609791173 0.277662021
52 0.106184591 0.609791173
53 0.658424596 0.106184591
54 0.285860236 0.658424596
55 0.724025399 0.285860236
56 0.579733687 0.724025399
57 1.003617622 0.579733687
58 0.831608264 1.003617622
59 0.526592652 0.831608264
60 0.266199408 0.526592652
61 0.678892805 0.266199408
62 0.205281166 0.678892805
63 0.245475273 0.205281166
64 0.388798909 0.245475273
65 0.676157863 0.388798909
66 0.441087137 0.676157863
67 0.733067335 0.441087137
68 0.325924615 0.733067335
69 0.842396771 0.325924615
70 0.674552316 0.842396771
71 0.941584454 0.674552316
72 0.715868060 0.941584454
73 0.972399566 0.715868060
74 0.739754708 0.972399566
75 0.646621149 0.739754708
76 0.538759506 0.646621149
77 0.545533835 0.538759506
78 0.072063860 0.545533835
79 0.342351199 0.072063860
80 -1.279063774 0.342351199
81 -1.272027413 -1.279063774
82 -1.235015789 -1.272027413
83 -1.120317172 -1.235015789
84 -1.063198900 -1.120317172
85 -0.904981038 -1.063198900
86 -1.026641530 -0.904981038
87 -0.856047509 -1.026641530
88 -0.573523415 -0.856047509
89 -0.339599559 -0.573523415
90 -0.782109686 -0.339599559
91 -0.581834969 -0.782109686
92 -0.330138718 -0.581834969
93 -0.042162175 -0.330138718
94 -0.560575253 -0.042162175
95 -0.549014529 -0.560575253
96 -0.483092174 -0.549014529
97 -0.406541582 -0.483092174
98 -0.656915011 -0.406541582
99 -0.648229679 -0.656915011
100 -0.496029285 -0.648229679
101 -0.396934274 -0.496029285
102 -0.660593128 -0.396934274
> 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/www/html/rcomp/tmp/7rbdt1292679608.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/www/html/rcomp/tmp/8rbdt1292679608.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/www/html/rcomp/tmp/9j2uw1292679608.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/www/html/rcomp/tmp/10j2uw1292679608.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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/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/www/html/rcomp/tmp/1153a21292679608.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/www/html/rcomp/tmp/12q3rq1292679608.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/www/html/rcomp/tmp/13kpv81292679608.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/www/html/rcomp/tmp/14qe5n1292679608.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/www/html/rcomp/tmp/15bwmb1292679608.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/www/html/rcomp/tmp/16xw2y1292679608.tab")
+ }
>
> try(system("convert tmp/1ksyh1292679608.ps tmp/1ksyh1292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/25ae51292679608.ps tmp/25ae51292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/35ae51292679608.ps tmp/35ae51292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/4ykdq1292679608.ps tmp/4ykdq1292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/5ykdq1292679608.ps tmp/5ykdq1292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/6ykdq1292679608.ps tmp/6ykdq1292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/7rbdt1292679608.ps tmp/7rbdt1292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/8rbdt1292679608.ps tmp/8rbdt1292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/9j2uw1292679608.ps tmp/9j2uw1292679608.png",intern=TRUE))
character(0)
> try(system("convert tmp/10j2uw1292679608.ps tmp/10j2uw1292679608.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.11 1.70 7.94