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(493
+ ,0.3
+ ,9
+ ,3
+ ,481
+ ,2.1
+ ,11
+ ,3.21
+ ,462
+ ,2.5
+ ,13
+ ,3.37
+ ,457
+ ,2.3
+ ,12
+ ,3.51
+ ,442
+ ,2.4
+ ,13
+ ,3.75
+ ,439
+ ,3
+ ,15
+ ,4.11
+ ,488
+ ,1.7
+ ,13
+ ,4.25
+ ,521
+ ,3.5
+ ,16
+ ,4.25
+ ,501
+ ,4
+ ,10
+ ,4.5
+ ,485
+ ,3.7
+ ,14
+ ,4.7
+ ,464
+ ,3.7
+ ,14
+ ,4.75
+ ,460
+ ,3
+ ,15
+ ,4.75
+ ,467
+ ,2.7
+ ,13
+ ,4.75
+ ,460
+ ,2.5
+ ,8
+ ,4.75
+ ,448
+ ,2.2
+ ,7
+ ,4.75
+ ,443
+ ,2.9
+ ,3
+ ,4.75
+ ,436
+ ,3.1
+ ,3
+ ,4.58
+ ,431
+ ,3
+ ,4
+ ,4.5
+ ,484
+ ,2.8
+ ,4
+ ,4.5
+ ,510
+ ,2.5
+ ,0
+ ,4.49
+ ,513
+ ,1.9
+ ,-4
+ ,4.03
+ ,503
+ ,1.9
+ ,-14
+ ,3.75
+ ,471
+ ,1.8
+ ,-18
+ ,3.39
+ ,471
+ ,2
+ ,-8
+ ,3.25
+ ,476
+ ,2.6
+ ,-1
+ ,3.25
+ ,475
+ ,2.5
+ ,1
+ ,3.25
+ ,470
+ ,2.5
+ ,2
+ ,3.25
+ ,461
+ ,1.6
+ ,0
+ ,3.25
+ ,455
+ ,1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 = '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
Werkl HICP Consvertr Rente M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 493 0.3 9 3.00 1 0 0 0 0 0 0 0 0 0 0 1
2 481 2.1 11 3.21 0 1 0 0 0 0 0 0 0 0 0 2
3 462 2.5 13 3.37 0 0 1 0 0 0 0 0 0 0 0 3
4 457 2.3 12 3.51 0 0 0 1 0 0 0 0 0 0 0 4
5 442 2.4 13 3.75 0 0 0 0 1 0 0 0 0 0 0 5
6 439 3.0 15 4.11 0 0 0 0 0 1 0 0 0 0 0 6
7 488 1.7 13 4.25 0 0 0 0 0 0 1 0 0 0 0 7
8 521 3.5 16 4.25 0 0 0 0 0 0 0 1 0 0 0 8
9 501 4.0 10 4.50 0 0 0 0 0 0 0 0 1 0 0 9
10 485 3.7 14 4.70 0 0 0 0 0 0 0 0 0 1 0 10
11 464 3.7 14 4.75 0 0 0 0 0 0 0 0 0 0 1 11
12 460 3.0 15 4.75 0 0 0 0 0 0 0 0 0 0 0 12
13 467 2.7 13 4.75 1 0 0 0 0 0 0 0 0 0 0 13
14 460 2.5 8 4.75 0 1 0 0 0 0 0 0 0 0 0 14
15 448 2.2 7 4.75 0 0 1 0 0 0 0 0 0 0 0 15
16 443 2.9 3 4.75 0 0 0 1 0 0 0 0 0 0 0 16
17 436 3.1 3 4.58 0 0 0 0 1 0 0 0 0 0 0 17
18 431 3.0 4 4.50 0 0 0 0 0 1 0 0 0 0 0 18
19 484 2.8 4 4.50 0 0 0 0 0 0 1 0 0 0 0 19
20 510 2.5 0 4.49 0 0 0 0 0 0 0 1 0 0 0 20
21 513 1.9 -4 4.03 0 0 0 0 0 0 0 0 1 0 0 21
22 503 1.9 -14 3.75 0 0 0 0 0 0 0 0 0 1 0 22
23 471 1.8 -18 3.39 0 0 0 0 0 0 0 0 0 0 1 23
24 471 2.0 -8 3.25 0 0 0 0 0 0 0 0 0 0 0 24
25 476 2.6 -1 3.25 1 0 0 0 0 0 0 0 0 0 0 25
26 475 2.5 1 3.25 0 1 0 0 0 0 0 0 0 0 0 26
27 470 2.5 2 3.25 0 0 1 0 0 0 0 0 0 0 0 27
28 461 1.6 0 3.25 0 0 0 1 0 0 0 0 0 0 0 28
29 455 1.4 1 3.25 0 0 0 0 1 0 0 0 0 0 0 29
30 456 0.8 0 3.25 0 0 0 0 0 1 0 0 0 0 0 30
31 517 1.1 -1 3.25 0 0 0 0 0 0 1 0 0 0 0 31
32 525 1.3 -3 3.25 0 0 0 0 0 0 0 1 0 0 0 32
33 523 1.2 -3 3.25 0 0 0 0 0 0 0 0 1 0 0 33
34 519 1.3 -3 3.25 0 0 0 0 0 0 0 0 0 1 0 34
35 509 1.1 -4 3.25 0 0 0 0 0 0 0 0 0 0 1 35
36 512 1.3 -8 2.85 0 0 0 0 0 0 0 0 0 0 0 36
37 519 1.2 -9 2.75 1 0 0 0 0 0 0 0 0 0 0 37
38 517 1.6 -13 2.75 0 1 0 0 0 0 0 0 0 0 0 38
39 510 1.7 -18 2.55 0 0 1 0 0 0 0 0 0 0 0 39
40 509 1.5 -11 2.50 0 0 0 1 0 0 0 0 0 0 0 40
41 501 0.9 -9 2.50 0 0 0 0 1 0 0 0 0 0 0 41
42 507 1.5 -10 2.10 0 0 0 0 0 1 0 0 0 0 0 42
43 569 1.4 -13 2.00 0 0 0 0 0 0 1 0 0 0 0 43
44 580 1.6 -11 2.00 0 0 0 0 0 0 0 1 0 0 0 44
45 578 1.7 -5 2.00 0 0 0 0 0 0 0 0 1 0 0 45
46 565 1.4 -15 2.00 0 0 0 0 0 0 0 0 0 1 0 46
47 547 1.8 -6 2.00 0 0 0 0 0 0 0 0 0 0 1 47
48 555 1.7 -6 2.00 0 0 0 0 0 0 0 0 0 0 0 48
49 562 1.4 -3 2.00 1 0 0 0 0 0 0 0 0 0 0 49
50 561 1.2 -1 2.00 0 1 0 0 0 0 0 0 0 0 0 50
51 555 1.0 -3 2.00 0 0 1 0 0 0 0 0 0 0 0 51
52 544 1.7 -4 2.00 0 0 0 1 0 0 0 0 0 0 0 52
53 537 2.4 -6 2.00 0 0 0 0 1 0 0 0 0 0 0 53
54 543 2.0 0 2.00 0 0 0 0 0 1 0 0 0 0 0 54
55 594 2.1 -4 2.00 0 0 0 0 0 0 1 0 0 0 0 55
56 611 2.0 -2 2.00 0 0 0 0 0 0 0 1 0 0 0 56
57 613 1.8 -2 2.00 0 0 0 0 0 0 0 0 1 0 0 57
58 611 2.7 -6 2.00 0 0 0 0 0 0 0 0 0 1 0 58
59 594 2.3 -7 2.00 0 0 0 0 0 0 0 0 0 0 1 59
60 595 1.9 -6 2.00 0 0 0 0 0 0 0 0 0 0 0 60
61 591 2.0 -6 2.00 1 0 0 0 0 0 0 0 0 0 0 61
62 589 2.3 -3 2.00 0 1 0 0 0 0 0 0 0 0 0 62
63 584 2.8 -2 2.00 0 0 1 0 0 0 0 0 0 0 0 63
64 573 2.4 -5 2.00 0 0 0 1 0 0 0 0 0 0 0 64
65 567 2.3 -11 2.00 0 0 0 0 1 0 0 0 0 0 0 65
66 569 2.7 -11 2.00 0 0 0 0 0 1 0 0 0 0 0 66
67 621 2.7 -11 2.00 0 0 0 0 0 0 1 0 0 0 0 67
68 629 2.9 -10 2.00 0 0 0 0 0 0 0 1 0 0 0 68
69 628 3.0 -14 2.00 0 0 0 0 0 0 0 0 1 0 0 69
70 612 2.2 -8 2.00 0 0 0 0 0 0 0 0 0 1 0 70
71 595 2.3 -9 2.00 0 0 0 0 0 0 0 0 0 0 1 71
72 597 2.8 -5 2.21 0 0 0 0 0 0 0 0 0 0 0 72
73 593 2.8 -1 2.25 1 0 0 0 0 0 0 0 0 0 0 73
74 590 2.8 -2 2.25 0 1 0 0 0 0 0 0 0 0 0 74
75 580 2.2 -5 2.45 0 0 1 0 0 0 0 0 0 0 0 75
76 574 2.6 -4 2.50 0 0 0 1 0 0 0 0 0 0 0 76
77 573 2.8 -6 2.50 0 0 0 0 1 0 0 0 0 0 0 77
78 573 2.5 -2 2.64 0 0 0 0 0 1 0 0 0 0 0 78
79 620 2.4 -2 2.75 0 0 0 0 0 0 1 0 0 0 0 79
80 626 2.3 -2 2.93 0 0 0 0 0 0 0 1 0 0 0 80
81 620 1.9 -2 3.00 0 0 0 0 0 0 0 0 1 0 0 81
82 588 1.7 2 3.17 0 0 0 0 0 0 0 0 0 1 0 82
83 566 2.0 1 3.25 0 0 0 0 0 0 0 0 0 0 1 83
84 557 2.1 -8 3.39 0 0 0 0 0 0 0 0 0 0 0 84
85 561 1.7 -1 3.50 1 0 0 0 0 0 0 0 0 0 0 85
86 549 1.8 1 3.50 0 1 0 0 0 0 0 0 0 0 0 86
87 532 1.8 -1 3.65 0 0 1 0 0 0 0 0 0 0 0 87
88 526 1.8 2 3.75 0 0 0 1 0 0 0 0 0 0 0 88
89 511 1.3 2 3.75 0 0 0 0 1 0 0 0 0 0 0 89
90 499 1.3 1 3.90 0 0 0 0 0 1 0 0 0 0 0 90
91 555 1.3 -1 4.00 0 0 0 0 0 0 1 0 0 0 0 91
92 565 1.2 -2 4.00 0 0 0 0 0 0 0 1 0 0 0 92
93 542 1.4 -2 4.00 0 0 0 0 0 0 0 0 1 0 0 93
94 527 2.2 -1 4.00 0 0 0 0 0 0 0 0 0 1 0 94
95 510 2.9 -8 4.00 0 0 0 0 0 0 0 0 0 0 1 95
96 514 3.1 -4 4.00 0 0 0 0 0 0 0 0 0 0 0 96
97 517 3.5 -6 4.00 1 0 0 0 0 0 0 0 0 0 0 97
98 508 3.6 -3 4.00 0 1 0 0 0 0 0 0 0 0 0 98
99 493 4.4 -3 4.00 0 0 1 0 0 0 0 0 0 0 0 99
100 490 4.1 -7 4.00 0 0 0 1 0 0 0 0 0 0 0 100
101 469 5.1 -9 4.00 0 0 0 0 1 0 0 0 0 0 0 101
102 478 5.8 -11 4.00 0 0 0 0 0 1 0 0 0 0 0 102
103 528 5.9 -13 4.18 0 0 0 0 0 0 1 0 0 0 0 103
104 534 5.4 -11 4.25 0 0 0 0 0 0 0 1 0 0 0 104
105 518 5.5 -9 4.25 0 0 0 0 0 0 0 0 1 0 0 105
106 506 4.8 -17 3.97 0 0 0 0 0 0 0 0 0 1 0 106
107 502 3.2 -22 3.42 0 0 0 0 0 0 0 0 0 0 1 107
108 516 2.7 -25 2.75 0 0 0 0 0 0 0 0 0 0 0 108
109 528 2.1 -20 2.31 1 0 0 0 0 0 0 0 0 0 0 109
110 533 1.9 -24 2.00 0 1 0 0 0 0 0 0 0 0 0 110
111 536 0.6 -24 1.66 0 0 1 0 0 0 0 0 0 0 0 111
112 537 0.7 -22 1.31 0 0 0 1 0 0 0 0 0 0 0 112
113 524 -0.2 -19 1.09 0 0 0 0 1 0 0 0 0 0 0 113
114 536 -1.0 -18 1.00 0 0 0 0 0 1 0 0 0 0 0 114
115 587 -1.7 -17 1.00 0 0 0 0 0 0 1 0 0 0 0 115
116 597 -0.7 -11 1.00 0 0 0 0 0 0 0 1 0 0 0 116
117 581 -1.0 -11 1.00 0 0 0 0 0 0 0 0 1 0 0 117
118 564 -0.9 -12 1.00 0 0 0 0 0 0 0 0 0 1 0 118
119 558 0.0 -10 1.00 0 0 0 0 0 0 0 0 0 0 1 119
120 575 0.3 -15 1.00 0 0 0 0 0 0 0 0 0 0 0 120
121 580 0.8 -15 1.00 1 0 0 0 0 0 0 0 0 0 0 121
122 575 0.8 -15 1.00 0 1 0 0 0 0 0 0 0 0 0 122
123 563 1.9 -13 1.00 0 0 1 0 0 0 0 0 0 0 0 123
124 552 2.1 -8 1.00 0 0 0 1 0 0 0 0 0 0 0 124
125 537 2.5 -13 1.00 0 0 0 0 1 0 0 0 0 0 0 125
126 545 2.7 -9 1.00 0 0 0 0 0 1 0 0 0 0 0 126
127 601 2.4 -7 1.00 0 0 0 0 0 0 1 0 0 0 0 127
128 604 2.4 -4 1.00 0 0 0 0 0 0 0 1 0 0 0 128
129 586 2.9 -4 1.00 0 0 0 0 0 0 0 0 1 0 0 129
130 564 3.1 -2 1.00 0 0 0 0 0 0 0 0 0 1 0 130
131 549 3.0 0 1.00 0 0 0 0 0 0 0 0 0 0 1 131
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) HICP Consvertr Rente M1 M2
595.8870 4.8900 0.5452 -29.9080 -0.2760 -6.1529
M3 M4 M5 M6 M7 M8
-15.9166 -22.7611 -33.4316 -32.0713 23.8142 35.1336
M9 M10 M11 t
25.8334 11.4828 -6.8251 0.2614
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-61.507 -21.748 -4.996 26.911 58.633
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 595.88701 14.90656 39.975 < 2e-16 ***
HICP 4.88997 2.50873 1.949 0.05371 .
Consvertr 0.54519 0.40183 1.357 0.17751
Rente -29.90798 3.31353 -9.026 4.81e-15 ***
M1 -0.27597 12.97905 -0.021 0.98307
M2 -6.15286 12.97804 -0.474 0.63633
M3 -15.91657 12.95942 -1.228 0.22188
M4 -22.76106 12.97183 -1.755 0.08198 .
M5 -33.43163 12.94877 -2.582 0.01108 *
M6 -32.07134 12.99144 -2.469 0.01503 *
M7 23.81416 12.95374 1.838 0.06858 .
M8 35.13359 12.99564 2.703 0.00790 **
M9 25.83342 12.97935 1.990 0.04892 *
M10 11.48282 12.94020 0.887 0.37673
M11 -6.82507 12.93569 -0.528 0.59878
t 0.26136 0.09359 2.793 0.00613 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 29.56 on 115 degrees of freedom
Multiple R-squared: 0.6882, Adjusted R-squared: 0.6475
F-statistic: 16.92 on 15 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,] 5.302870e-04 1.060574e-03 9.994697e-01
[2,] 3.057666e-04 6.115333e-04 9.996942e-01
[3,] 1.133858e-04 2.267716e-04 9.998866e-01
[4,] 1.801453e-05 3.602906e-05 9.999820e-01
[5,] 1.048614e-05 2.097228e-05 9.999895e-01
[6,] 2.092238e-06 4.184476e-06 9.999979e-01
[7,] 4.258830e-07 8.517660e-07 9.999996e-01
[8,] 8.251469e-08 1.650294e-07 9.999999e-01
[9,] 6.868846e-08 1.373769e-07 9.999999e-01
[10,] 1.549606e-08 3.099212e-08 1.000000e+00
[11,] 3.472989e-09 6.945979e-09 1.000000e+00
[12,] 8.183503e-10 1.636701e-09 1.000000e+00
[13,] 5.744695e-09 1.148939e-08 1.000000e+00
[14,] 6.456546e-09 1.291309e-08 1.000000e+00
[15,] 2.144919e-09 4.289838e-09 1.000000e+00
[16,] 9.063964e-10 1.812793e-09 1.000000e+00
[17,] 2.009288e-08 4.018576e-08 1.000000e+00
[18,] 9.053724e-07 1.810745e-06 9.999991e-01
[19,] 6.146123e-06 1.229225e-05 9.999939e-01
[20,] 3.144713e-05 6.289427e-05 9.999686e-01
[21,] 1.021976e-04 2.043952e-04 9.998978e-01
[22,] 2.144938e-04 4.289876e-04 9.997855e-01
[23,] 3.655503e-04 7.311007e-04 9.996344e-01
[24,] 6.096963e-04 1.219393e-03 9.993903e-01
[25,] 9.843799e-04 1.968760e-03 9.990156e-01
[26,] 8.986570e-04 1.797314e-03 9.991013e-01
[27,] 8.999808e-04 1.799962e-03 9.991000e-01
[28,] 7.101687e-04 1.420337e-03 9.992898e-01
[29,] 8.287144e-04 1.657429e-03 9.991713e-01
[30,] 1.807988e-03 3.615976e-03 9.981920e-01
[31,] 3.035911e-03 6.071822e-03 9.969641e-01
[32,] 5.409476e-03 1.081895e-02 9.945905e-01
[33,] 1.091877e-02 2.183753e-02 9.890812e-01
[34,] 1.869156e-02 3.738312e-02 9.813084e-01
[35,] 3.030048e-02 6.060097e-02 9.696995e-01
[36,] 6.702491e-02 1.340498e-01 9.329751e-01
[37,] 1.457950e-01 2.915900e-01 8.542050e-01
[38,] 2.517098e-01 5.034196e-01 7.482902e-01
[39,] 3.231142e-01 6.462283e-01 6.768858e-01
[40,] 3.180350e-01 6.360700e-01 6.819650e-01
[41,] 3.691335e-01 7.382670e-01 6.308665e-01
[42,] 4.894954e-01 9.789908e-01 5.105046e-01
[43,] 5.472386e-01 9.055229e-01 4.527614e-01
[44,] 6.059463e-01 7.881073e-01 3.940537e-01
[45,] 6.580058e-01 6.839883e-01 3.419942e-01
[46,] 7.239824e-01 5.520352e-01 2.760176e-01
[47,] 7.406719e-01 5.186562e-01 2.593281e-01
[48,] 7.669063e-01 4.661873e-01 2.330937e-01
[49,] 7.946739e-01 4.106523e-01 2.053261e-01
[50,] 8.343381e-01 3.313238e-01 1.656619e-01
[51,] 8.009396e-01 3.981209e-01 1.990604e-01
[52,] 7.789657e-01 4.420686e-01 2.210343e-01
[53,] 7.606081e-01 4.787839e-01 2.393919e-01
[54,] 7.757593e-01 4.484814e-01 2.242407e-01
[55,] 9.029490e-01 1.941019e-01 9.705096e-02
[56,] 9.648533e-01 7.029333e-02 3.514667e-02
[57,] 9.714926e-01 5.701480e-02 2.850740e-02
[58,] 9.792658e-01 4.146838e-02 2.073419e-02
[59,] 9.711500e-01 5.769992e-02 2.884996e-02
[60,] 9.621283e-01 7.574346e-02 3.787173e-02
[61,] 9.596350e-01 8.073003e-02 4.036501e-02
[62,] 9.475610e-01 1.048780e-01 5.243901e-02
[63,] 9.578058e-01 8.438847e-02 4.219423e-02
[64,] 9.675850e-01 6.482995e-02 3.241497e-02
[65,] 9.693224e-01 6.135526e-02 3.067763e-02
[66,] 9.653638e-01 6.927233e-02 3.463617e-02
[67,] 9.655050e-01 6.898993e-02 3.449496e-02
[68,] 9.631908e-01 7.361843e-02 3.680921e-02
[69,] 9.641939e-01 7.161222e-02 3.580611e-02
[70,] 9.694893e-01 6.102135e-02 3.051067e-02
[71,] 9.790177e-01 4.196465e-02 2.098232e-02
[72,] 9.751475e-01 4.970493e-02 2.485247e-02
[73,] 9.698542e-01 6.029167e-02 3.014583e-02
[74,] 9.764163e-01 4.716743e-02 2.358371e-02
[75,] 9.858408e-01 2.831833e-02 1.415917e-02
[76,] 9.972562e-01 5.487671e-03 2.743835e-03
[77,] 9.998680e-01 2.640700e-04 1.320350e-04
[78,] 9.999086e-01 1.827391e-04 9.136957e-05
[79,] 9.999385e-01 1.230485e-04 6.152426e-05
[80,] 9.999162e-01 1.676320e-04 8.381601e-05
[81,] 9.999086e-01 1.828766e-04 9.143830e-05
[82,] 9.998412e-01 3.176322e-04 1.588161e-04
[83,] 9.997777e-01 4.446848e-04 2.223424e-04
[84,] 9.995393e-01 9.214435e-04 4.607217e-04
[85,] 9.992418e-01 1.516316e-03 7.581582e-04
[86,] 9.983128e-01 3.374348e-03 1.687174e-03
[87,] 9.971817e-01 5.636540e-03 2.818270e-03
[88,] 9.988716e-01 2.256835e-03 1.128418e-03
[89,] 9.997889e-01 4.221420e-04 2.110710e-04
[90,] 9.994789e-01 1.042227e-03 5.211133e-04
[91,] 9.985496e-01 2.900827e-03 1.450414e-03
[92,] 9.948280e-01 1.034394e-02 5.171968e-03
[93,] 9.934316e-01 1.313673e-02 6.568365e-03
[94,] 9.737171e-01 5.256583e-02 2.628292e-02
> postscript(file="/var/www/html/rcomp/tmp/1lzap1293482144.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/2vq9a1293482144.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/3vq9a1293482144.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/4vq9a1293482144.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/5oh8c1293482144.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 = 131
Frequency = 1
1 2 3 4 5 6
-19.52211245 -29.51823943 -37.27696700 -29.98353812 -28.43059367 -26.30973340
7 8 9 10 11 12
-21.82213354 -10.84044033 -13.49849727 -10.14142064 -11.59948280 -19.80812138
13 14 15 16 17 18
-10.23614369 -7.91669644 -8.40216132 -8.06126922 -10.71440948 -19.78489384
19 20 21 22 23 24
-21.95375553 -4.18589395 -0.79001919 0.37683666 -21.67375738 -39.37716443
25 26 27 28 29 30
-41.11283753 -37.09868955 -33.14151872 -30.06703943 -25.22501868 -22.36750518
31 32 33 34 35 36
-18.43616813 -21.90458590 -14.37676987 -4.77653583 4.79318370 -10.05369541
37 38 39 40 41 42
-4.99569694 -1.15542035 -2.39772781 -1.14830359 3.10452097 -6.86912828
43 44 45 46 47 48
-1.88222784 -4.53138951 -1.25268422 6.75539936 -0.06072554 1.34183718
49 50 51 52 53 54
8.18788500 12.69103042 18.26175408 10.96708825 12.04368990 15.10690669
55 56 57 58 59 60
11.65179655 16.46962723 28.48644070 38.35543907 41.90315349 37.22752258
61 62 63 64 65 66
32.75313853 33.26611075 34.77829435 33.95297238 42.12229751 40.54465057
67 68 69 70 71 72
36.39779398 31.29381829 41.02438332 39.75447854 40.85720573 37.42571640
73 74 75 76 77 78
32.45590525 35.61661370 45.67010981 45.24746355 54.76905243 56.62076141
79 80 81 82 83 84
51.25278045 51.54442010 58.63278731 44.60362699 42.12099796 34.63935725
85 86 87 88 89 90
40.08353680 32.11968988 30.19861616 32.13698691 29.99118597 21.40091232
91 92 93 94 95 96
25.33522603 24.78861463 9.84943831 4.48150426 5.92136261 -0.32381091
97 98 99 100 101 102
1.82518466 -3.68384823 -13.09347099 -5.86260443 -20.25299512 -15.20726245
103 104 105 106 107 108
-15.36930751 -17.50192820 -26.04247902 -24.54301298 -16.39597622 -25.44021472
109 110 111 112 113 114
-26.37705924 -21.87427285 -13.18366362 -17.64769691 -24.05282235 -12.99940442
115 116 117 118 119 120
-15.26846485 -25.01034999 -30.50453907 -33.35911905 -26.80392936 -15.63142655
121 122 123 124 125 126
-13.06180038 -12.44627790 -21.41326495 -29.53405939 -33.35490748 -30.13530342
127 128 129 130 131
-29.90553962 -40.12189237 -51.52806102 -61.50719637 -59.06203221
> postscript(file="/var/www/html/rcomp/tmp/6oh8c1293482144.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 = 131
Frequency = 1
lag(myerror, k = 1) myerror
0 -19.52211245 NA
1 -29.51823943 -19.52211245
2 -37.27696700 -29.51823943
3 -29.98353812 -37.27696700
4 -28.43059367 -29.98353812
5 -26.30973340 -28.43059367
6 -21.82213354 -26.30973340
7 -10.84044033 -21.82213354
8 -13.49849727 -10.84044033
9 -10.14142064 -13.49849727
10 -11.59948280 -10.14142064
11 -19.80812138 -11.59948280
12 -10.23614369 -19.80812138
13 -7.91669644 -10.23614369
14 -8.40216132 -7.91669644
15 -8.06126922 -8.40216132
16 -10.71440948 -8.06126922
17 -19.78489384 -10.71440948
18 -21.95375553 -19.78489384
19 -4.18589395 -21.95375553
20 -0.79001919 -4.18589395
21 0.37683666 -0.79001919
22 -21.67375738 0.37683666
23 -39.37716443 -21.67375738
24 -41.11283753 -39.37716443
25 -37.09868955 -41.11283753
26 -33.14151872 -37.09868955
27 -30.06703943 -33.14151872
28 -25.22501868 -30.06703943
29 -22.36750518 -25.22501868
30 -18.43616813 -22.36750518
31 -21.90458590 -18.43616813
32 -14.37676987 -21.90458590
33 -4.77653583 -14.37676987
34 4.79318370 -4.77653583
35 -10.05369541 4.79318370
36 -4.99569694 -10.05369541
37 -1.15542035 -4.99569694
38 -2.39772781 -1.15542035
39 -1.14830359 -2.39772781
40 3.10452097 -1.14830359
41 -6.86912828 3.10452097
42 -1.88222784 -6.86912828
43 -4.53138951 -1.88222784
44 -1.25268422 -4.53138951
45 6.75539936 -1.25268422
46 -0.06072554 6.75539936
47 1.34183718 -0.06072554
48 8.18788500 1.34183718
49 12.69103042 8.18788500
50 18.26175408 12.69103042
51 10.96708825 18.26175408
52 12.04368990 10.96708825
53 15.10690669 12.04368990
54 11.65179655 15.10690669
55 16.46962723 11.65179655
56 28.48644070 16.46962723
57 38.35543907 28.48644070
58 41.90315349 38.35543907
59 37.22752258 41.90315349
60 32.75313853 37.22752258
61 33.26611075 32.75313853
62 34.77829435 33.26611075
63 33.95297238 34.77829435
64 42.12229751 33.95297238
65 40.54465057 42.12229751
66 36.39779398 40.54465057
67 31.29381829 36.39779398
68 41.02438332 31.29381829
69 39.75447854 41.02438332
70 40.85720573 39.75447854
71 37.42571640 40.85720573
72 32.45590525 37.42571640
73 35.61661370 32.45590525
74 45.67010981 35.61661370
75 45.24746355 45.67010981
76 54.76905243 45.24746355
77 56.62076141 54.76905243
78 51.25278045 56.62076141
79 51.54442010 51.25278045
80 58.63278731 51.54442010
81 44.60362699 58.63278731
82 42.12099796 44.60362699
83 34.63935725 42.12099796
84 40.08353680 34.63935725
85 32.11968988 40.08353680
86 30.19861616 32.11968988
87 32.13698691 30.19861616
88 29.99118597 32.13698691
89 21.40091232 29.99118597
90 25.33522603 21.40091232
91 24.78861463 25.33522603
92 9.84943831 24.78861463
93 4.48150426 9.84943831
94 5.92136261 4.48150426
95 -0.32381091 5.92136261
96 1.82518466 -0.32381091
97 -3.68384823 1.82518466
98 -13.09347099 -3.68384823
99 -5.86260443 -13.09347099
100 -20.25299512 -5.86260443
101 -15.20726245 -20.25299512
102 -15.36930751 -15.20726245
103 -17.50192820 -15.36930751
104 -26.04247902 -17.50192820
105 -24.54301298 -26.04247902
106 -16.39597622 -24.54301298
107 -25.44021472 -16.39597622
108 -26.37705924 -25.44021472
109 -21.87427285 -26.37705924
110 -13.18366362 -21.87427285
111 -17.64769691 -13.18366362
112 -24.05282235 -17.64769691
113 -12.99940442 -24.05282235
114 -15.26846485 -12.99940442
115 -25.01034999 -15.26846485
116 -30.50453907 -25.01034999
117 -33.35911905 -30.50453907
118 -26.80392936 -33.35911905
119 -15.63142655 -26.80392936
120 -13.06180038 -15.63142655
121 -12.44627790 -13.06180038
122 -21.41326495 -12.44627790
123 -29.53405939 -21.41326495
124 -33.35490748 -29.53405939
125 -30.13530342 -33.35490748
126 -29.90553962 -30.13530342
127 -40.12189237 -29.90553962
128 -51.52806102 -40.12189237
129 -61.50719637 -51.52806102
130 -59.06203221 -61.50719637
131 NA -59.06203221
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -29.51823943 -19.52211245
[2,] -37.27696700 -29.51823943
[3,] -29.98353812 -37.27696700
[4,] -28.43059367 -29.98353812
[5,] -26.30973340 -28.43059367
[6,] -21.82213354 -26.30973340
[7,] -10.84044033 -21.82213354
[8,] -13.49849727 -10.84044033
[9,] -10.14142064 -13.49849727
[10,] -11.59948280 -10.14142064
[11,] -19.80812138 -11.59948280
[12,] -10.23614369 -19.80812138
[13,] -7.91669644 -10.23614369
[14,] -8.40216132 -7.91669644
[15,] -8.06126922 -8.40216132
[16,] -10.71440948 -8.06126922
[17,] -19.78489384 -10.71440948
[18,] -21.95375553 -19.78489384
[19,] -4.18589395 -21.95375553
[20,] -0.79001919 -4.18589395
[21,] 0.37683666 -0.79001919
[22,] -21.67375738 0.37683666
[23,] -39.37716443 -21.67375738
[24,] -41.11283753 -39.37716443
[25,] -37.09868955 -41.11283753
[26,] -33.14151872 -37.09868955
[27,] -30.06703943 -33.14151872
[28,] -25.22501868 -30.06703943
[29,] -22.36750518 -25.22501868
[30,] -18.43616813 -22.36750518
[31,] -21.90458590 -18.43616813
[32,] -14.37676987 -21.90458590
[33,] -4.77653583 -14.37676987
[34,] 4.79318370 -4.77653583
[35,] -10.05369541 4.79318370
[36,] -4.99569694 -10.05369541
[37,] -1.15542035 -4.99569694
[38,] -2.39772781 -1.15542035
[39,] -1.14830359 -2.39772781
[40,] 3.10452097 -1.14830359
[41,] -6.86912828 3.10452097
[42,] -1.88222784 -6.86912828
[43,] -4.53138951 -1.88222784
[44,] -1.25268422 -4.53138951
[45,] 6.75539936 -1.25268422
[46,] -0.06072554 6.75539936
[47,] 1.34183718 -0.06072554
[48,] 8.18788500 1.34183718
[49,] 12.69103042 8.18788500
[50,] 18.26175408 12.69103042
[51,] 10.96708825 18.26175408
[52,] 12.04368990 10.96708825
[53,] 15.10690669 12.04368990
[54,] 11.65179655 15.10690669
[55,] 16.46962723 11.65179655
[56,] 28.48644070 16.46962723
[57,] 38.35543907 28.48644070
[58,] 41.90315349 38.35543907
[59,] 37.22752258 41.90315349
[60,] 32.75313853 37.22752258
[61,] 33.26611075 32.75313853
[62,] 34.77829435 33.26611075
[63,] 33.95297238 34.77829435
[64,] 42.12229751 33.95297238
[65,] 40.54465057 42.12229751
[66,] 36.39779398 40.54465057
[67,] 31.29381829 36.39779398
[68,] 41.02438332 31.29381829
[69,] 39.75447854 41.02438332
[70,] 40.85720573 39.75447854
[71,] 37.42571640 40.85720573
[72,] 32.45590525 37.42571640
[73,] 35.61661370 32.45590525
[74,] 45.67010981 35.61661370
[75,] 45.24746355 45.67010981
[76,] 54.76905243 45.24746355
[77,] 56.62076141 54.76905243
[78,] 51.25278045 56.62076141
[79,] 51.54442010 51.25278045
[80,] 58.63278731 51.54442010
[81,] 44.60362699 58.63278731
[82,] 42.12099796 44.60362699
[83,] 34.63935725 42.12099796
[84,] 40.08353680 34.63935725
[85,] 32.11968988 40.08353680
[86,] 30.19861616 32.11968988
[87,] 32.13698691 30.19861616
[88,] 29.99118597 32.13698691
[89,] 21.40091232 29.99118597
[90,] 25.33522603 21.40091232
[91,] 24.78861463 25.33522603
[92,] 9.84943831 24.78861463
[93,] 4.48150426 9.84943831
[94,] 5.92136261 4.48150426
[95,] -0.32381091 5.92136261
[96,] 1.82518466 -0.32381091
[97,] -3.68384823 1.82518466
[98,] -13.09347099 -3.68384823
[99,] -5.86260443 -13.09347099
[100,] -20.25299512 -5.86260443
[101,] -15.20726245 -20.25299512
[102,] -15.36930751 -15.20726245
[103,] -17.50192820 -15.36930751
[104,] -26.04247902 -17.50192820
[105,] -24.54301298 -26.04247902
[106,] -16.39597622 -24.54301298
[107,] -25.44021472 -16.39597622
[108,] -26.37705924 -25.44021472
[109,] -21.87427285 -26.37705924
[110,] -13.18366362 -21.87427285
[111,] -17.64769691 -13.18366362
[112,] -24.05282235 -17.64769691
[113,] -12.99940442 -24.05282235
[114,] -15.26846485 -12.99940442
[115,] -25.01034999 -15.26846485
[116,] -30.50453907 -25.01034999
[117,] -33.35911905 -30.50453907
[118,] -26.80392936 -33.35911905
[119,] -15.63142655 -26.80392936
[120,] -13.06180038 -15.63142655
[121,] -12.44627790 -13.06180038
[122,] -21.41326495 -12.44627790
[123,] -29.53405939 -21.41326495
[124,] -33.35490748 -29.53405939
[125,] -30.13530342 -33.35490748
[126,] -29.90553962 -30.13530342
[127,] -40.12189237 -29.90553962
[128,] -51.52806102 -40.12189237
[129,] -61.50719637 -51.52806102
[130,] -59.06203221 -61.50719637
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -29.51823943 -19.52211245
2 -37.27696700 -29.51823943
3 -29.98353812 -37.27696700
4 -28.43059367 -29.98353812
5 -26.30973340 -28.43059367
6 -21.82213354 -26.30973340
7 -10.84044033 -21.82213354
8 -13.49849727 -10.84044033
9 -10.14142064 -13.49849727
10 -11.59948280 -10.14142064
11 -19.80812138 -11.59948280
12 -10.23614369 -19.80812138
13 -7.91669644 -10.23614369
14 -8.40216132 -7.91669644
15 -8.06126922 -8.40216132
16 -10.71440948 -8.06126922
17 -19.78489384 -10.71440948
18 -21.95375553 -19.78489384
19 -4.18589395 -21.95375553
20 -0.79001919 -4.18589395
21 0.37683666 -0.79001919
22 -21.67375738 0.37683666
23 -39.37716443 -21.67375738
24 -41.11283753 -39.37716443
25 -37.09868955 -41.11283753
26 -33.14151872 -37.09868955
27 -30.06703943 -33.14151872
28 -25.22501868 -30.06703943
29 -22.36750518 -25.22501868
30 -18.43616813 -22.36750518
31 -21.90458590 -18.43616813
32 -14.37676987 -21.90458590
33 -4.77653583 -14.37676987
34 4.79318370 -4.77653583
35 -10.05369541 4.79318370
36 -4.99569694 -10.05369541
37 -1.15542035 -4.99569694
38 -2.39772781 -1.15542035
39 -1.14830359 -2.39772781
40 3.10452097 -1.14830359
41 -6.86912828 3.10452097
42 -1.88222784 -6.86912828
43 -4.53138951 -1.88222784
44 -1.25268422 -4.53138951
45 6.75539936 -1.25268422
46 -0.06072554 6.75539936
47 1.34183718 -0.06072554
48 8.18788500 1.34183718
49 12.69103042 8.18788500
50 18.26175408 12.69103042
51 10.96708825 18.26175408
52 12.04368990 10.96708825
53 15.10690669 12.04368990
54 11.65179655 15.10690669
55 16.46962723 11.65179655
56 28.48644070 16.46962723
57 38.35543907 28.48644070
58 41.90315349 38.35543907
59 37.22752258 41.90315349
60 32.75313853 37.22752258
61 33.26611075 32.75313853
62 34.77829435 33.26611075
63 33.95297238 34.77829435
64 42.12229751 33.95297238
65 40.54465057 42.12229751
66 36.39779398 40.54465057
67 31.29381829 36.39779398
68 41.02438332 31.29381829
69 39.75447854 41.02438332
70 40.85720573 39.75447854
71 37.42571640 40.85720573
72 32.45590525 37.42571640
73 35.61661370 32.45590525
74 45.67010981 35.61661370
75 45.24746355 45.67010981
76 54.76905243 45.24746355
77 56.62076141 54.76905243
78 51.25278045 56.62076141
79 51.54442010 51.25278045
80 58.63278731 51.54442010
81 44.60362699 58.63278731
82 42.12099796 44.60362699
83 34.63935725 42.12099796
84 40.08353680 34.63935725
85 32.11968988 40.08353680
86 30.19861616 32.11968988
87 32.13698691 30.19861616
88 29.99118597 32.13698691
89 21.40091232 29.99118597
90 25.33522603 21.40091232
91 24.78861463 25.33522603
92 9.84943831 24.78861463
93 4.48150426 9.84943831
94 5.92136261 4.48150426
95 -0.32381091 5.92136261
96 1.82518466 -0.32381091
97 -3.68384823 1.82518466
98 -13.09347099 -3.68384823
99 -5.86260443 -13.09347099
100 -20.25299512 -5.86260443
101 -15.20726245 -20.25299512
102 -15.36930751 -15.20726245
103 -17.50192820 -15.36930751
104 -26.04247902 -17.50192820
105 -24.54301298 -26.04247902
106 -16.39597622 -24.54301298
107 -25.44021472 -16.39597622
108 -26.37705924 -25.44021472
109 -21.87427285 -26.37705924
110 -13.18366362 -21.87427285
111 -17.64769691 -13.18366362
112 -24.05282235 -17.64769691
113 -12.99940442 -24.05282235
114 -15.26846485 -12.99940442
115 -25.01034999 -15.26846485
116 -30.50453907 -25.01034999
117 -33.35911905 -30.50453907
118 -26.80392936 -33.35911905
119 -15.63142655 -26.80392936
120 -13.06180038 -15.63142655
121 -12.44627790 -13.06180038
122 -21.41326495 -12.44627790
123 -29.53405939 -21.41326495
124 -33.35490748 -29.53405939
125 -30.13530342 -33.35490748
126 -29.90553962 -30.13530342
127 -40.12189237 -29.90553962
128 -51.52806102 -40.12189237
129 -61.50719637 -51.52806102
130 -59.06203221 -61.50719637
> 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/7g9py1293482144.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/8g9py1293482144.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/9r0p01293482144.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/10r0p01293482144.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/11v15o1293482144.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/12g14c1293482144.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/13n2jo1293482144.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/14gbi91293482144.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/15juhf1293482144.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/16f4eo1293482144.tab")
+ }
> try(system("convert tmp/1lzap1293482144.ps tmp/1lzap1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/2vq9a1293482144.ps tmp/2vq9a1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/3vq9a1293482144.ps tmp/3vq9a1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/4vq9a1293482144.ps tmp/4vq9a1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/5oh8c1293482144.ps tmp/5oh8c1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/6oh8c1293482144.ps tmp/6oh8c1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/7g9py1293482144.ps tmp/7g9py1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/8g9py1293482144.ps tmp/8g9py1293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/9r0p01293482144.ps tmp/9r0p01293482144.png",intern=TRUE))
character(0)
> try(system("convert tmp/10r0p01293482144.ps tmp/10r0p01293482144.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.569 1.723 8.399