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(43880
+ ,25222
+ ,43110
+ ,21333
+ ,44496
+ ,19778
+ ,44164
+ ,25943
+ ,40399
+ ,21698
+ ,36763
+ ,20077
+ ,37903
+ ,25673
+ ,35532
+ ,19094
+ ,35533
+ ,19306
+ ,32110
+ ,15443
+ ,33374
+ ,15179
+ ,35462
+ ,18288
+ ,33508
+ ,18264
+ ,36080
+ ,16406
+ ,34560
+ ,15678
+ ,38737
+ ,19657
+ ,38144
+ ,18821
+ ,37594
+ ,19493
+ ,36424
+ ,21078
+ ,36843
+ ,19296
+ ,37246
+ ,19985
+ ,38661
+ ,16972
+ ,40454
+ ,16951
+ ,44928
+ ,23126
+ ,48441
+ ,24890
+ ,48140
+ ,21042
+ ,45998
+ ,20842
+ ,47369
+ ,23904
+ ,49554
+ ,22578
+ ,47510
+ ,25452
+ ,44873
+ ,21928
+ ,45344
+ ,25227
+ ,42413
+ ,26210
+ ,36912
+ ,17436
+ ,43452
+ ,21258
+ ,42142
+ ,25638
+ ,44382
+ ,23516
+ ,43636
+ ,23891
+ ,44167
+ ,24617
+ ,44423
+ ,26174
+ ,42868
+ ,23339
+ ,43908
+ ,23660
+ ,42013
+ ,26500
+ ,38846
+ ,22469
+ ,35087
+ ,23163
+ ,33026
+ ,16170
+ ,34646
+ ,18267
+ ,37135
+ ,20561
+ ,37985
+ ,20372
+ ,43121
+ ,19017
+ ,43722
+ ,18242
+ ,43630
+ ,20937
+ ,42234
+ ,22065
+ ,39351
+ ,16731
+ ,39327
+ ,21943
+ ,35704
+ ,19254
+ ,30466
+ ,16397
+ ,28155
+ ,13644
+ ,29257
+ ,14375
+ ,29998
+ ,14814
+ ,32529
+ ,16061
+ ,34787
+ ,14784
+ ,33855
+ ,12824
+ ,34556
+ ,18282
+ ,31348
+ ,14936
+ ,30805
+ ,15701
+ ,28353
+ ,16394
+ ,24514
+ ,13085
+ ,21106
+ ,11431
+ ,21346
+ ,9334
+ ,23335
+ ,10921
+ ,24379
+ ,11725
+ ,26290
+ ,13077
+ ,30084
+ ,11794
+ ,29429
+ ,11047
+ ,30632
+ ,16797
+ ,27349
+ ,11482
+ ,27264
+ ,12657
+ ,27474
+ ,15277
+ ,24482
+ ,12385
+ ,21453
+ ,11996
+ ,18788
+ ,8395
+ ,19282
+ ,8928
+ ,19713
+ ,9937
+ ,21917
+ ,11468
+ ,23812
+ ,9554
+ ,23785
+ ,9226
+ ,24696
+ ,11021
+ ,24562
+ ,10065
+ ,23580
+ ,9939
+ ,24939
+ ,11179
+ ,23899
+ ,11943
+ ,21454
+ ,10792
+ ,19761
+ ,8080
+ ,19815
+ ,8603
+ ,20780
+ ,11561
+ ,23462
+ ,10449
+ ,25005
+ ,8197
+ ,24725
+ ,7602
+ ,26198
+ ,9521
+ ,27543
+ ,10412
+ ,26471
+ ,10860
+ ,26558
+ ,11538
+ ,25317
+ ,11420
+ ,22896
+ ,10408
+ ,22248
+ ,5998
+ ,23406
+ ,8356
+ ,25073
+ ,10569
+ ,27691
+ ,9660
+ ,30599
+ ,9304
+ ,31948
+ ,9114
+ ,32946
+ ,10492
+ ,34012
+ ,12388
+ ,32936
+ ,10003
+ ,32974
+ ,14029
+ ,30951
+ ,12452
+ ,29812
+ ,12332
+ ,29010
+ ,8064
+ ,31068
+ ,10931
+ ,32447
+ ,12631
+ ,34844
+ ,13656
+ ,35676
+ ,11005
+ ,35387
+ ,8879
+ ,36488
+ ,11536
+ ,35652
+ ,13698
+ ,33488
+ ,10853
+ ,32914
+ ,15107
+ ,29781
+ ,13604
+ ,27951
+ ,12231)
+ ,dim=c(2
+ ,129)
+ ,dimnames=list(c('OPENVAC'
+ ,'OntvangenJobs')
+ ,1:129))
> y <- array(NA,dim=c(2,129),dimnames=list(c('OPENVAC','OntvangenJobs'),1:129))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'Linear Trend'
> par2 = 'Include Monthly 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
OPENVAC OntvangenJobs M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 43880 25222 1 0 0 0 0 0 0 0 0 0 0 1
2 43110 21333 0 1 0 0 0 0 0 0 0 0 0 2
3 44496 19778 0 0 1 0 0 0 0 0 0 0 0 3
4 44164 25943 0 0 0 1 0 0 0 0 0 0 0 4
5 40399 21698 0 0 0 0 1 0 0 0 0 0 0 5
6 36763 20077 0 0 0 0 0 1 0 0 0 0 0 6
7 37903 25673 0 0 0 0 0 0 1 0 0 0 0 7
8 35532 19094 0 0 0 0 0 0 0 1 0 0 0 8
9 35533 19306 0 0 0 0 0 0 0 0 1 0 0 9
10 32110 15443 0 0 0 0 0 0 0 0 0 1 0 10
11 33374 15179 0 0 0 0 0 0 0 0 0 0 1 11
12 35462 18288 0 0 0 0 0 0 0 0 0 0 0 12
13 33508 18264 1 0 0 0 0 0 0 0 0 0 0 13
14 36080 16406 0 1 0 0 0 0 0 0 0 0 0 14
15 34560 15678 0 0 1 0 0 0 0 0 0 0 0 15
16 38737 19657 0 0 0 1 0 0 0 0 0 0 0 16
17 38144 18821 0 0 0 0 1 0 0 0 0 0 0 17
18 37594 19493 0 0 0 0 0 1 0 0 0 0 0 18
19 36424 21078 0 0 0 0 0 0 1 0 0 0 0 19
20 36843 19296 0 0 0 0 0 0 0 1 0 0 0 20
21 37246 19985 0 0 0 0 0 0 0 0 1 0 0 21
22 38661 16972 0 0 0 0 0 0 0 0 0 1 0 22
23 40454 16951 0 0 0 0 0 0 0 0 0 0 1 23
24 44928 23126 0 0 0 0 0 0 0 0 0 0 0 24
25 48441 24890 1 0 0 0 0 0 0 0 0 0 0 25
26 48140 21042 0 1 0 0 0 0 0 0 0 0 0 26
27 45998 20842 0 0 1 0 0 0 0 0 0 0 0 27
28 47369 23904 0 0 0 1 0 0 0 0 0 0 0 28
29 49554 22578 0 0 0 0 1 0 0 0 0 0 0 29
30 47510 25452 0 0 0 0 0 1 0 0 0 0 0 30
31 44873 21928 0 0 0 0 0 0 1 0 0 0 0 31
32 45344 25227 0 0 0 0 0 0 0 1 0 0 0 32
33 42413 26210 0 0 0 0 0 0 0 0 1 0 0 33
34 36912 17436 0 0 0 0 0 0 0 0 0 1 0 34
35 43452 21258 0 0 0 0 0 0 0 0 0 0 1 35
36 42142 25638 0 0 0 0 0 0 0 0 0 0 0 36
37 44382 23516 1 0 0 0 0 0 0 0 0 0 0 37
38 43636 23891 0 1 0 0 0 0 0 0 0 0 0 38
39 44167 24617 0 0 1 0 0 0 0 0 0 0 0 39
40 44423 26174 0 0 0 1 0 0 0 0 0 0 0 40
41 42868 23339 0 0 0 0 1 0 0 0 0 0 0 41
42 43908 23660 0 0 0 0 0 1 0 0 0 0 0 42
43 42013 26500 0 0 0 0 0 0 1 0 0 0 0 43
44 38846 22469 0 0 0 0 0 0 0 1 0 0 0 44
45 35087 23163 0 0 0 0 0 0 0 0 1 0 0 45
46 33026 16170 0 0 0 0 0 0 0 0 0 1 0 46
47 34646 18267 0 0 0 0 0 0 0 0 0 0 1 47
48 37135 20561 0 0 0 0 0 0 0 0 0 0 0 48
49 37985 20372 1 0 0 0 0 0 0 0 0 0 0 49
50 43121 19017 0 1 0 0 0 0 0 0 0 0 0 50
51 43722 18242 0 0 1 0 0 0 0 0 0 0 0 51
52 43630 20937 0 0 0 1 0 0 0 0 0 0 0 52
53 42234 22065 0 0 0 0 1 0 0 0 0 0 0 53
54 39351 16731 0 0 0 0 0 1 0 0 0 0 0 54
55 39327 21943 0 0 0 0 0 0 1 0 0 0 0 55
56 35704 19254 0 0 0 0 0 0 0 1 0 0 0 56
57 30466 16397 0 0 0 0 0 0 0 0 1 0 0 57
58 28155 13644 0 0 0 0 0 0 0 0 0 1 0 58
59 29257 14375 0 0 0 0 0 0 0 0 0 0 1 59
60 29998 14814 0 0 0 0 0 0 0 0 0 0 0 60
61 32529 16061 1 0 0 0 0 0 0 0 0 0 0 61
62 34787 14784 0 1 0 0 0 0 0 0 0 0 0 62
63 33855 12824 0 0 1 0 0 0 0 0 0 0 0 63
64 34556 18282 0 0 0 1 0 0 0 0 0 0 0 64
65 31348 14936 0 0 0 0 1 0 0 0 0 0 0 65
66 30805 15701 0 0 0 0 0 1 0 0 0 0 0 66
67 28353 16394 0 0 0 0 0 0 1 0 0 0 0 67
68 24514 13085 0 0 0 0 0 0 0 1 0 0 0 68
69 21106 11431 0 0 0 0 0 0 0 0 1 0 0 69
70 21346 9334 0 0 0 0 0 0 0 0 0 1 0 70
71 23335 10921 0 0 0 0 0 0 0 0 0 0 1 71
72 24379 11725 0 0 0 0 0 0 0 0 0 0 0 72
73 26290 13077 1 0 0 0 0 0 0 0 0 0 0 73
74 30084 11794 0 1 0 0 0 0 0 0 0 0 0 74
75 29429 11047 0 0 1 0 0 0 0 0 0 0 0 75
76 30632 16797 0 0 0 1 0 0 0 0 0 0 0 76
77 27349 11482 0 0 0 0 1 0 0 0 0 0 0 77
78 27264 12657 0 0 0 0 0 1 0 0 0 0 0 78
79 27474 15277 0 0 0 0 0 0 1 0 0 0 0 79
80 24482 12385 0 0 0 0 0 0 0 1 0 0 0 80
81 21453 11996 0 0 0 0 0 0 0 0 1 0 0 81
82 18788 8395 0 0 0 0 0 0 0 0 0 1 0 82
83 19282 8928 0 0 0 0 0 0 0 0 0 0 1 83
84 19713 9937 0 0 0 0 0 0 0 0 0 0 0 84
85 21917 11468 1 0 0 0 0 0 0 0 0 0 0 85
86 23812 9554 0 1 0 0 0 0 0 0 0 0 0 86
87 23785 9226 0 0 1 0 0 0 0 0 0 0 0 87
88 24696 11021 0 0 0 1 0 0 0 0 0 0 0 88
89 24562 10065 0 0 0 0 1 0 0 0 0 0 0 89
90 23580 9939 0 0 0 0 0 1 0 0 0 0 0 90
91 24939 11179 0 0 0 0 0 0 1 0 0 0 0 91
92 23899 11943 0 0 0 0 0 0 0 1 0 0 0 92
93 21454 10792 0 0 0 0 0 0 0 0 1 0 0 93
94 19761 8080 0 0 0 0 0 0 0 0 0 1 0 94
95 19815 8603 0 0 0 0 0 0 0 0 0 0 1 95
96 20780 11561 0 0 0 0 0 0 0 0 0 0 0 96
97 23462 10449 1 0 0 0 0 0 0 0 0 0 0 97
98 25005 8197 0 1 0 0 0 0 0 0 0 0 0 98
99 24725 7602 0 0 1 0 0 0 0 0 0 0 0 99
100 26198 9521 0 0 0 1 0 0 0 0 0 0 0 100
101 27543 10412 0 0 0 0 1 0 0 0 0 0 0 101
102 26471 10860 0 0 0 0 0 1 0 0 0 0 0 102
103 26558 11538 0 0 0 0 0 0 1 0 0 0 0 103
104 25317 11420 0 0 0 0 0 0 0 1 0 0 0 104
105 22896 10408 0 0 0 0 0 0 0 0 1 0 0 105
106 22248 5998 0 0 0 0 0 0 0 0 0 1 0 106
107 23406 8356 0 0 0 0 0 0 0 0 0 0 1 107
108 25073 10569 0 0 0 0 0 0 0 0 0 0 0 108
109 27691 9660 1 0 0 0 0 0 0 0 0 0 0 109
110 30599 9304 0 1 0 0 0 0 0 0 0 0 0 110
111 31948 9114 0 0 1 0 0 0 0 0 0 0 0 111
112 32946 10492 0 0 0 1 0 0 0 0 0 0 0 112
113 34012 12388 0 0 0 0 1 0 0 0 0 0 0 113
114 32936 10003 0 0 0 0 0 1 0 0 0 0 0 114
115 32974 14029 0 0 0 0 0 0 1 0 0 0 0 115
116 30951 12452 0 0 0 0 0 0 0 1 0 0 0 116
117 29812 12332 0 0 0 0 0 0 0 0 1 0 0 117
118 29010 8064 0 0 0 0 0 0 0 0 0 1 0 118
119 31068 10931 0 0 0 0 0 0 0 0 0 0 1 119
120 32447 12631 0 0 0 0 0 0 0 0 0 0 0 120
121 34844 13656 1 0 0 0 0 0 0 0 0 0 0 121
122 35676 11005 0 1 0 0 0 0 0 0 0 0 0 122
123 35387 8879 0 0 1 0 0 0 0 0 0 0 0 123
124 36488 11536 0 0 0 1 0 0 0 0 0 0 0 124
125 35652 13698 0 0 0 0 1 0 0 0 0 0 0 125
126 33488 10853 0 0 0 0 0 1 0 0 0 0 0 126
127 32914 15107 0 0 0 0 0 0 1 0 0 0 0 127
128 29781 13604 0 0 0 0 0 0 0 1 0 0 0 128
129 27951 12231 0 0 0 0 0 0 0 0 1 0 0 129
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) OntvangenJobs M1 M2 M3
1845.125 1.621 1398.535 6074.895 7089.781
M4 M5 M6 M7 M8
2738.346 3642.420 3207.922 -1101.437 -196.286
M9 M10 M11 t
-1715.097 3278.453 2723.693 54.696
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6806.8 -2109.5 -304.9 2262.1 7148.5
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.845e+03 2.490e+03 0.741 0.46021
OntvangenJobs 1.621e+00 9.503e-02 17.059 < 2e-16 ***
M1 1.399e+03 1.371e+03 1.020 0.30977
M2 6.075e+03 1.375e+03 4.419 2.26e-05 ***
M3 7.090e+03 1.381e+03 5.133 1.17e-06 ***
M4 2.738e+03 1.377e+03 1.988 0.04918 *
M5 3.642e+03 1.370e+03 2.658 0.00898 **
M6 3.208e+03 1.369e+03 2.342 0.02088 *
M7 -1.101e+03 1.389e+03 -0.793 0.42959
M8 -1.963e+02 1.371e+03 -0.143 0.88643
M9 -1.715e+03 1.370e+03 -1.252 0.21314
M10 3.278e+03 1.457e+03 2.251 0.02629 *
M11 2.724e+03 1.424e+03 1.913 0.05822 .
t 5.470e+01 1.322e+01 4.138 6.69e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3134 on 115 degrees of freedom
Multiple R-squared: 0.8598, Adjusted R-squared: 0.8439
F-statistic: 54.24 on 13 and 115 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.32382988 0.647659760 0.676170120
[2,] 0.20039082 0.400781646 0.799609177
[3,] 0.22746288 0.454925755 0.772537123
[4,] 0.13827631 0.276552616 0.861723692
[5,] 0.08237690 0.164753810 0.917623095
[6,] 0.07222497 0.144449931 0.927775035
[7,] 0.06731717 0.134634342 0.932682829
[8,] 0.04489930 0.089798598 0.955100701
[9,] 0.02962060 0.059241195 0.970379402
[10,] 0.02245564 0.044911270 0.977544365
[11,] 0.02061676 0.041233514 0.979383243
[12,] 0.01296565 0.025931300 0.987034350
[13,] 0.02070215 0.041404292 0.979297854
[14,] 0.02079677 0.041593533 0.979203234
[15,] 0.16116087 0.322321748 0.838839126
[16,] 0.20946837 0.418936737 0.790531631
[17,] 0.42403402 0.848068048 0.575965976
[18,] 0.46791555 0.935831094 0.532084453
[19,] 0.53913699 0.921726018 0.460863009
[20,] 0.72538141 0.549237173 0.274618587
[21,] 0.70956409 0.580871819 0.290435909
[22,] 0.85795579 0.284088419 0.142044209
[23,] 0.95089415 0.098211692 0.049105846
[24,] 0.96787574 0.064248524 0.032124262
[25,] 0.96936535 0.061269296 0.030634648
[26,] 0.95957118 0.080857633 0.040428816
[27,] 0.96543410 0.069131795 0.034565897
[28,] 0.96028397 0.079432053 0.039716026
[29,] 0.98313940 0.033721199 0.016860599
[30,] 0.98021258 0.039574850 0.019787425
[31,] 0.98387708 0.032245835 0.016122917
[32,] 0.97812453 0.043750933 0.021875466
[33,] 0.97034533 0.059309336 0.029654668
[34,] 0.96629528 0.067409437 0.033704718
[35,] 0.96767202 0.064655955 0.032327977
[36,] 0.96680832 0.066383358 0.033191679
[37,] 0.95825426 0.083491484 0.041745742
[38,] 0.97969802 0.040603962 0.020301981
[39,] 0.97236720 0.055265594 0.027632797
[40,] 0.96860975 0.062780495 0.031390247
[41,] 0.96897061 0.062058775 0.031029387
[42,] 0.96949394 0.061012117 0.030506059
[43,] 0.97585471 0.048290571 0.024145285
[44,] 0.98216632 0.035667353 0.017833677
[45,] 0.98361208 0.032775848 0.016387924
[46,] 0.98402408 0.031951836 0.015975918
[47,] 0.98893001 0.022139973 0.011069986
[48,] 0.98614736 0.027705271 0.013852636
[49,] 0.98537416 0.029251677 0.014625839
[50,] 0.98252568 0.034948641 0.017474320
[51,] 0.97810059 0.043798812 0.021899406
[52,] 0.97915624 0.041687517 0.020843758
[53,] 0.97913170 0.041736603 0.020868302
[54,] 0.97685236 0.046295276 0.023147638
[55,] 0.98002400 0.039951998 0.019975999
[56,] 0.98770878 0.024582444 0.012291222
[57,] 0.98716686 0.025666280 0.012833140
[58,] 0.99153839 0.016923214 0.008461607
[59,] 0.99373485 0.012530295 0.006265148
[60,] 0.99168289 0.016634212 0.008317106
[61,] 0.99352970 0.012940594 0.006470297
[62,] 0.99248244 0.015035122 0.007517561
[63,] 0.99233794 0.015324124 0.007662062
[64,] 0.99636033 0.007279341 0.003639670
[65,] 0.99740039 0.005199223 0.002599612
[66,] 0.99650712 0.006985759 0.003492880
[67,] 0.99591962 0.008160756 0.004080378
[68,] 0.99461517 0.010769665 0.005384833
[69,] 0.99213858 0.015722840 0.007861420
[70,] 0.98842219 0.023155628 0.011577814
[71,] 0.98365714 0.032685722 0.016342861
[72,] 0.97670512 0.046589765 0.023294882
[73,] 0.96575186 0.068496284 0.034248142
[74,] 0.95083936 0.098321272 0.049160636
[75,] 0.95634161 0.087316777 0.043658389
[76,] 0.95339845 0.093203099 0.046601550
[77,] 0.95145521 0.097089577 0.048544789
[78,] 0.93278143 0.134437145 0.067218572
[79,] 0.91176952 0.176460951 0.088230476
[80,] 0.91536150 0.169276994 0.084638497
[81,] 0.89893745 0.202125108 0.101062554
[82,] 0.87498969 0.250020618 0.125010309
[83,] 0.88979164 0.220416723 0.110208361
[84,] 0.91079204 0.178415918 0.089207959
[85,] 0.87858596 0.242828071 0.121414036
[86,] 0.96290303 0.074193945 0.037096973
[87,] 0.94778082 0.104438361 0.052219181
[88,] 0.92134079 0.157318427 0.078659214
[89,] 0.89602175 0.207956504 0.103978252
[90,] 0.88015807 0.239683853 0.119841927
[91,] 0.85679242 0.286415168 0.143207584
[92,] 0.88462448 0.230751031 0.115375515
[93,] 0.83421889 0.331562227 0.165781113
[94,] 0.86176329 0.276473411 0.138236705
[95,] 0.92124459 0.157510813 0.078755406
[96,] 0.96861362 0.062772762 0.031386381
> postscript(file="/var/www/html/rcomp/tmp/19swq1290758457.ps",horizontal=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/29swq1290758457.ps",horizontal=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/31jdb1290758457.ps",horizontal=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/41jdb1290758457.ps",horizontal=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/51jdb1290758457.ps",horizontal=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 = 129
Frequency = 1
1 2 3 4 5 6
-304.89591 498.37550 3335.55194 -2693.58337 -535.92623 -1164.37549
7 8 9 10 11 12
-4841.20028 2492.94947 3614.39832 1405.33219 3597.35771 3314.45885
13 14 15 16 17 18
-53.86662 799.01871 -610.42686 1413.08922 1216.53063 -43.02413
19 20 21 22 23 24
472.24885 2820.14256 3570.34268 4821.37002 7148.47638 4281.38759
25 26 27 28 29 30
3481.59521 4687.40289 1800.03421 2504.06828 5879.83227 -443.31094
31 32 33 34 35 36
6886.99083 1050.24561 -2010.14783 1663.84367 2508.19144 -3233.08296
37 38 39 40 41 42
993.58911 -5091.36707 -6806.84335 -4778.10418 -2696.15082 -1796.71124
43 44 45 46 47 48
-4040.87673 -1633.20444 -5053.10965 -826.23761 -2105.55011 -666.27977
49 50 51 52 53 54
-963.12927 1638.35961 2426.10417 2262.06965 -1921.26357 4222.30712
55 56 57 58 59 60
3.97187 -219.82710 637.67487 -2258.77509 -1841.71074 856.63797
61 62 63 64 65 66
-87.06303 -490.01734 685.69103 -3164.35025 -1907.03191 -3310.34586
67 68 69 70 71 72
-2631.08155 -2065.81928 -1328.46033 -2737.32991 -2820.89850 -411.23906
73 74 75 76 77 78
-2145.15205 -1002.37996 -1516.02526 -5337.41797 -963.21966 -2573.17088
79 80 81 82 83 84
-2355.70174 -1619.42421 -2553.71439 -4429.49994 -4299.46443 -2835.12363
85 86 87 88 89 90
-4566.20751 -4299.54246 -4864.41463 -2566.48929 -2109.51990 -2507.46359
91 92 93 94 95 96
1096.07733 -2142.26429 -1257.30179 -3602.21547 -3895.96930 -5057.08712
97 98 99 100 101 102
-2025.69222 -1563.10669 -1948.15410 710.75899 -347.38146 -1765.81733
103 104 105 106 107 108
1476.76297 -532.79799 150.83626 1603.49352 -560.91735 187.65938
109 110 111 112 113 114
2825.97777 1580.02121 2167.44185 5228.35193 2262.03963 5432.08519
115 116 117 118 119 120
3198.33482 2771.90989 3291.55282 4360.01863 2270.48491 3562.66875
121 122 123 124 125 126
2844.84452 3243.23559 5331.04100 6421.60701 1122.09102 3949.82717
127 128 129
734.47364 -921.91021 937.92905
> postscript(file="/var/www/html/rcomp/tmp/6csue1290758457.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 129
Frequency = 1
lag(myerror, k = 1) myerror
0 -304.89591 NA
1 498.37550 -304.89591
2 3335.55194 498.37550
3 -2693.58337 3335.55194
4 -535.92623 -2693.58337
5 -1164.37549 -535.92623
6 -4841.20028 -1164.37549
7 2492.94947 -4841.20028
8 3614.39832 2492.94947
9 1405.33219 3614.39832
10 3597.35771 1405.33219
11 3314.45885 3597.35771
12 -53.86662 3314.45885
13 799.01871 -53.86662
14 -610.42686 799.01871
15 1413.08922 -610.42686
16 1216.53063 1413.08922
17 -43.02413 1216.53063
18 472.24885 -43.02413
19 2820.14256 472.24885
20 3570.34268 2820.14256
21 4821.37002 3570.34268
22 7148.47638 4821.37002
23 4281.38759 7148.47638
24 3481.59521 4281.38759
25 4687.40289 3481.59521
26 1800.03421 4687.40289
27 2504.06828 1800.03421
28 5879.83227 2504.06828
29 -443.31094 5879.83227
30 6886.99083 -443.31094
31 1050.24561 6886.99083
32 -2010.14783 1050.24561
33 1663.84367 -2010.14783
34 2508.19144 1663.84367
35 -3233.08296 2508.19144
36 993.58911 -3233.08296
37 -5091.36707 993.58911
38 -6806.84335 -5091.36707
39 -4778.10418 -6806.84335
40 -2696.15082 -4778.10418
41 -1796.71124 -2696.15082
42 -4040.87673 -1796.71124
43 -1633.20444 -4040.87673
44 -5053.10965 -1633.20444
45 -826.23761 -5053.10965
46 -2105.55011 -826.23761
47 -666.27977 -2105.55011
48 -963.12927 -666.27977
49 1638.35961 -963.12927
50 2426.10417 1638.35961
51 2262.06965 2426.10417
52 -1921.26357 2262.06965
53 4222.30712 -1921.26357
54 3.97187 4222.30712
55 -219.82710 3.97187
56 637.67487 -219.82710
57 -2258.77509 637.67487
58 -1841.71074 -2258.77509
59 856.63797 -1841.71074
60 -87.06303 856.63797
61 -490.01734 -87.06303
62 685.69103 -490.01734
63 -3164.35025 685.69103
64 -1907.03191 -3164.35025
65 -3310.34586 -1907.03191
66 -2631.08155 -3310.34586
67 -2065.81928 -2631.08155
68 -1328.46033 -2065.81928
69 -2737.32991 -1328.46033
70 -2820.89850 -2737.32991
71 -411.23906 -2820.89850
72 -2145.15205 -411.23906
73 -1002.37996 -2145.15205
74 -1516.02526 -1002.37996
75 -5337.41797 -1516.02526
76 -963.21966 -5337.41797
77 -2573.17088 -963.21966
78 -2355.70174 -2573.17088
79 -1619.42421 -2355.70174
80 -2553.71439 -1619.42421
81 -4429.49994 -2553.71439
82 -4299.46443 -4429.49994
83 -2835.12363 -4299.46443
84 -4566.20751 -2835.12363
85 -4299.54246 -4566.20751
86 -4864.41463 -4299.54246
87 -2566.48929 -4864.41463
88 -2109.51990 -2566.48929
89 -2507.46359 -2109.51990
90 1096.07733 -2507.46359
91 -2142.26429 1096.07733
92 -1257.30179 -2142.26429
93 -3602.21547 -1257.30179
94 -3895.96930 -3602.21547
95 -5057.08712 -3895.96930
96 -2025.69222 -5057.08712
97 -1563.10669 -2025.69222
98 -1948.15410 -1563.10669
99 710.75899 -1948.15410
100 -347.38146 710.75899
101 -1765.81733 -347.38146
102 1476.76297 -1765.81733
103 -532.79799 1476.76297
104 150.83626 -532.79799
105 1603.49352 150.83626
106 -560.91735 1603.49352
107 187.65938 -560.91735
108 2825.97777 187.65938
109 1580.02121 2825.97777
110 2167.44185 1580.02121
111 5228.35193 2167.44185
112 2262.03963 5228.35193
113 5432.08519 2262.03963
114 3198.33482 5432.08519
115 2771.90989 3198.33482
116 3291.55282 2771.90989
117 4360.01863 3291.55282
118 2270.48491 4360.01863
119 3562.66875 2270.48491
120 2844.84452 3562.66875
121 3243.23559 2844.84452
122 5331.04100 3243.23559
123 6421.60701 5331.04100
124 1122.09102 6421.60701
125 3949.82717 1122.09102
126 734.47364 3949.82717
127 -921.91021 734.47364
128 937.92905 -921.91021
129 NA 937.92905
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 498.37550 -304.89591
[2,] 3335.55194 498.37550
[3,] -2693.58337 3335.55194
[4,] -535.92623 -2693.58337
[5,] -1164.37549 -535.92623
[6,] -4841.20028 -1164.37549
[7,] 2492.94947 -4841.20028
[8,] 3614.39832 2492.94947
[9,] 1405.33219 3614.39832
[10,] 3597.35771 1405.33219
[11,] 3314.45885 3597.35771
[12,] -53.86662 3314.45885
[13,] 799.01871 -53.86662
[14,] -610.42686 799.01871
[15,] 1413.08922 -610.42686
[16,] 1216.53063 1413.08922
[17,] -43.02413 1216.53063
[18,] 472.24885 -43.02413
[19,] 2820.14256 472.24885
[20,] 3570.34268 2820.14256
[21,] 4821.37002 3570.34268
[22,] 7148.47638 4821.37002
[23,] 4281.38759 7148.47638
[24,] 3481.59521 4281.38759
[25,] 4687.40289 3481.59521
[26,] 1800.03421 4687.40289
[27,] 2504.06828 1800.03421
[28,] 5879.83227 2504.06828
[29,] -443.31094 5879.83227
[30,] 6886.99083 -443.31094
[31,] 1050.24561 6886.99083
[32,] -2010.14783 1050.24561
[33,] 1663.84367 -2010.14783
[34,] 2508.19144 1663.84367
[35,] -3233.08296 2508.19144
[36,] 993.58911 -3233.08296
[37,] -5091.36707 993.58911
[38,] -6806.84335 -5091.36707
[39,] -4778.10418 -6806.84335
[40,] -2696.15082 -4778.10418
[41,] -1796.71124 -2696.15082
[42,] -4040.87673 -1796.71124
[43,] -1633.20444 -4040.87673
[44,] -5053.10965 -1633.20444
[45,] -826.23761 -5053.10965
[46,] -2105.55011 -826.23761
[47,] -666.27977 -2105.55011
[48,] -963.12927 -666.27977
[49,] 1638.35961 -963.12927
[50,] 2426.10417 1638.35961
[51,] 2262.06965 2426.10417
[52,] -1921.26357 2262.06965
[53,] 4222.30712 -1921.26357
[54,] 3.97187 4222.30712
[55,] -219.82710 3.97187
[56,] 637.67487 -219.82710
[57,] -2258.77509 637.67487
[58,] -1841.71074 -2258.77509
[59,] 856.63797 -1841.71074
[60,] -87.06303 856.63797
[61,] -490.01734 -87.06303
[62,] 685.69103 -490.01734
[63,] -3164.35025 685.69103
[64,] -1907.03191 -3164.35025
[65,] -3310.34586 -1907.03191
[66,] -2631.08155 -3310.34586
[67,] -2065.81928 -2631.08155
[68,] -1328.46033 -2065.81928
[69,] -2737.32991 -1328.46033
[70,] -2820.89850 -2737.32991
[71,] -411.23906 -2820.89850
[72,] -2145.15205 -411.23906
[73,] -1002.37996 -2145.15205
[74,] -1516.02526 -1002.37996
[75,] -5337.41797 -1516.02526
[76,] -963.21966 -5337.41797
[77,] -2573.17088 -963.21966
[78,] -2355.70174 -2573.17088
[79,] -1619.42421 -2355.70174
[80,] -2553.71439 -1619.42421
[81,] -4429.49994 -2553.71439
[82,] -4299.46443 -4429.49994
[83,] -2835.12363 -4299.46443
[84,] -4566.20751 -2835.12363
[85,] -4299.54246 -4566.20751
[86,] -4864.41463 -4299.54246
[87,] -2566.48929 -4864.41463
[88,] -2109.51990 -2566.48929
[89,] -2507.46359 -2109.51990
[90,] 1096.07733 -2507.46359
[91,] -2142.26429 1096.07733
[92,] -1257.30179 -2142.26429
[93,] -3602.21547 -1257.30179
[94,] -3895.96930 -3602.21547
[95,] -5057.08712 -3895.96930
[96,] -2025.69222 -5057.08712
[97,] -1563.10669 -2025.69222
[98,] -1948.15410 -1563.10669
[99,] 710.75899 -1948.15410
[100,] -347.38146 710.75899
[101,] -1765.81733 -347.38146
[102,] 1476.76297 -1765.81733
[103,] -532.79799 1476.76297
[104,] 150.83626 -532.79799
[105,] 1603.49352 150.83626
[106,] -560.91735 1603.49352
[107,] 187.65938 -560.91735
[108,] 2825.97777 187.65938
[109,] 1580.02121 2825.97777
[110,] 2167.44185 1580.02121
[111,] 5228.35193 2167.44185
[112,] 2262.03963 5228.35193
[113,] 5432.08519 2262.03963
[114,] 3198.33482 5432.08519
[115,] 2771.90989 3198.33482
[116,] 3291.55282 2771.90989
[117,] 4360.01863 3291.55282
[118,] 2270.48491 4360.01863
[119,] 3562.66875 2270.48491
[120,] 2844.84452 3562.66875
[121,] 3243.23559 2844.84452
[122,] 5331.04100 3243.23559
[123,] 6421.60701 5331.04100
[124,] 1122.09102 6421.60701
[125,] 3949.82717 1122.09102
[126,] 734.47364 3949.82717
[127,] -921.91021 734.47364
[128,] 937.92905 -921.91021
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 498.37550 -304.89591
2 3335.55194 498.37550
3 -2693.58337 3335.55194
4 -535.92623 -2693.58337
5 -1164.37549 -535.92623
6 -4841.20028 -1164.37549
7 2492.94947 -4841.20028
8 3614.39832 2492.94947
9 1405.33219 3614.39832
10 3597.35771 1405.33219
11 3314.45885 3597.35771
12 -53.86662 3314.45885
13 799.01871 -53.86662
14 -610.42686 799.01871
15 1413.08922 -610.42686
16 1216.53063 1413.08922
17 -43.02413 1216.53063
18 472.24885 -43.02413
19 2820.14256 472.24885
20 3570.34268 2820.14256
21 4821.37002 3570.34268
22 7148.47638 4821.37002
23 4281.38759 7148.47638
24 3481.59521 4281.38759
25 4687.40289 3481.59521
26 1800.03421 4687.40289
27 2504.06828 1800.03421
28 5879.83227 2504.06828
29 -443.31094 5879.83227
30 6886.99083 -443.31094
31 1050.24561 6886.99083
32 -2010.14783 1050.24561
33 1663.84367 -2010.14783
34 2508.19144 1663.84367
35 -3233.08296 2508.19144
36 993.58911 -3233.08296
37 -5091.36707 993.58911
38 -6806.84335 -5091.36707
39 -4778.10418 -6806.84335
40 -2696.15082 -4778.10418
41 -1796.71124 -2696.15082
42 -4040.87673 -1796.71124
43 -1633.20444 -4040.87673
44 -5053.10965 -1633.20444
45 -826.23761 -5053.10965
46 -2105.55011 -826.23761
47 -666.27977 -2105.55011
48 -963.12927 -666.27977
49 1638.35961 -963.12927
50 2426.10417 1638.35961
51 2262.06965 2426.10417
52 -1921.26357 2262.06965
53 4222.30712 -1921.26357
54 3.97187 4222.30712
55 -219.82710 3.97187
56 637.67487 -219.82710
57 -2258.77509 637.67487
58 -1841.71074 -2258.77509
59 856.63797 -1841.71074
60 -87.06303 856.63797
61 -490.01734 -87.06303
62 685.69103 -490.01734
63 -3164.35025 685.69103
64 -1907.03191 -3164.35025
65 -3310.34586 -1907.03191
66 -2631.08155 -3310.34586
67 -2065.81928 -2631.08155
68 -1328.46033 -2065.81928
69 -2737.32991 -1328.46033
70 -2820.89850 -2737.32991
71 -411.23906 -2820.89850
72 -2145.15205 -411.23906
73 -1002.37996 -2145.15205
74 -1516.02526 -1002.37996
75 -5337.41797 -1516.02526
76 -963.21966 -5337.41797
77 -2573.17088 -963.21966
78 -2355.70174 -2573.17088
79 -1619.42421 -2355.70174
80 -2553.71439 -1619.42421
81 -4429.49994 -2553.71439
82 -4299.46443 -4429.49994
83 -2835.12363 -4299.46443
84 -4566.20751 -2835.12363
85 -4299.54246 -4566.20751
86 -4864.41463 -4299.54246
87 -2566.48929 -4864.41463
88 -2109.51990 -2566.48929
89 -2507.46359 -2109.51990
90 1096.07733 -2507.46359
91 -2142.26429 1096.07733
92 -1257.30179 -2142.26429
93 -3602.21547 -1257.30179
94 -3895.96930 -3602.21547
95 -5057.08712 -3895.96930
96 -2025.69222 -5057.08712
97 -1563.10669 -2025.69222
98 -1948.15410 -1563.10669
99 710.75899 -1948.15410
100 -347.38146 710.75899
101 -1765.81733 -347.38146
102 1476.76297 -1765.81733
103 -532.79799 1476.76297
104 150.83626 -532.79799
105 1603.49352 150.83626
106 -560.91735 1603.49352
107 187.65938 -560.91735
108 2825.97777 187.65938
109 1580.02121 2825.97777
110 2167.44185 1580.02121
111 5228.35193 2167.44185
112 2262.03963 5228.35193
113 5432.08519 2262.03963
114 3198.33482 5432.08519
115 2771.90989 3198.33482
116 3291.55282 2771.90989
117 4360.01863 3291.55282
118 2270.48491 4360.01863
119 3562.66875 2270.48491
120 2844.84452 3562.66875
121 3243.23559 2844.84452
122 5331.04100 3243.23559
123 6421.60701 5331.04100
124 1122.09102 6421.60701
125 3949.82717 1122.09102
126 734.47364 3949.82717
127 -921.91021 734.47364
128 937.92905 -921.91021
> 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/7nkch1290758457.ps",horizontal=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/8nkch1290758457.ps",horizontal=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/9nkch1290758457.ps",horizontal=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/10xbtk1290758457.ps",horizontal=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/111b9p1290758457.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/12mcqd1290758457.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/13imom1290758457.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/14m4ma1290758457.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/15pnky1290758457.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/16lf4z1290758458.tab")
+ }
>
> try(system("convert tmp/19swq1290758457.ps tmp/19swq1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/29swq1290758457.ps tmp/29swq1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/31jdb1290758457.ps tmp/31jdb1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/41jdb1290758457.ps tmp/41jdb1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/51jdb1290758457.ps tmp/51jdb1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/6csue1290758457.ps tmp/6csue1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/7nkch1290758457.ps tmp/7nkch1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/8nkch1290758457.ps tmp/8nkch1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/9nkch1290758457.ps tmp/9nkch1290758457.png",intern=TRUE))
character(0)
> try(system("convert tmp/10xbtk1290758457.ps tmp/10xbtk1290758457.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.491 1.663 25.186