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(423.4
+ ,0
+ ,404.1
+ ,0
+ ,500
+ ,0
+ ,472.6
+ ,0
+ ,496.1
+ ,0
+ ,562
+ ,0
+ ,434.8
+ ,0
+ ,538.2
+ ,0
+ ,577.6
+ ,0
+ ,518.1
+ ,0
+ ,625.2
+ ,0
+ ,561.2
+ ,0
+ ,523.3
+ ,0
+ ,536.1
+ ,0
+ ,607.3
+ ,0
+ ,637.3
+ ,0
+ ,606.9
+ ,0
+ ,652.9
+ ,0
+ ,617.2
+ ,0
+ ,670.4
+ ,0
+ ,729.9
+ ,0
+ ,677.2
+ ,0
+ ,710
+ ,0
+ ,844.3
+ ,0
+ ,748.2
+ ,0
+ ,653.9
+ ,0
+ ,742.6
+ ,0
+ ,854.2
+ ,0
+ ,808.4
+ ,0
+ ,1819
+ ,1
+ ,1936.5
+ ,1
+ ,1966.1
+ ,1
+ ,2083.1
+ ,1
+ ,1620.1
+ ,1
+ ,1527.6
+ ,1
+ ,1795
+ ,1
+ ,1685.1
+ ,1
+ ,1851.8
+ ,1
+ ,2164.4
+ ,1
+ ,1981.8
+ ,1
+ ,1726.5
+ ,1
+ ,2144.6
+ ,1
+ ,1758.2
+ ,1
+ ,1672.9
+ ,1
+ ,1837.3
+ ,1
+ ,1596.1
+ ,1
+ ,1446
+ ,1
+ ,1898.4
+ ,1
+ ,1964.1
+ ,1
+ ,1755.9
+ ,1
+ ,2255.3
+ ,1
+ ,1881.2
+ ,1
+ ,2117.9
+ ,1
+ ,1656.5
+ ,1
+ ,1544.1
+ ,1
+ ,2098.9
+ ,1
+ ,2133.3
+ ,1
+ ,1963.5
+ ,1
+ ,1801.2
+ ,1
+ ,2365.4
+ ,1
+ ,1936.5
+ ,1
+ ,1667.6
+ ,1
+ ,1983.5
+ ,1
+ ,2058.6
+ ,1
+ ,2448.3
+ ,1
+ ,1858.1
+ ,1
+ ,1625.4
+ ,1
+ ,2130.6
+ ,1
+ ,2515.7
+ ,1
+ ,2230.2
+ ,1
+ ,2086.9
+ ,1
+ ,2235
+ ,1
+ ,2100.2
+ ,1
+ ,2288.6
+ ,1
+ ,2490
+ ,1
+ ,2573.7
+ ,1
+ ,2543.8
+ ,1
+ ,2004.7
+ ,1
+ ,2390
+ ,1
+ ,2338.4
+ ,1
+ ,2724.5
+ ,1
+ ,2292.5
+ ,1
+ ,2386
+ ,1
+ ,2477.9
+ ,1
+ ,2337
+ ,1
+ ,2605.1
+ ,1
+ ,2560.8
+ ,1
+ ,2839.3
+ ,1
+ ,2407.2
+ ,1
+ ,2085.2
+ ,1
+ ,2735.6
+ ,1
+ ,2798.7
+ ,1
+ ,3053.2
+ ,1
+ ,2405
+ ,1
+ ,2471.9
+ ,1
+ ,2727.3
+ ,1
+ ,2790.7
+ ,1
+ ,2385.4
+ ,1
+ ,3206.6
+ ,1
+ ,2705.6
+ ,1
+ ,3518.4
+ ,1
+ ,1954.9
+ ,1
+ ,2584.3
+ ,1
+ ,2535.8
+ ,1
+ ,2685.9
+ ,1
+ ,2866
+ ,1
+ ,2236.6
+ ,1
+ ,2934.9
+ ,1
+ ,2668.6
+ ,1
+ ,2371.2
+ ,1
+ ,3165.9
+ ,1
+ ,2887.2
+ ,1
+ ,3112.2
+ ,1
+ ,2671.2
+ ,1
+ ,2432.6
+ ,1
+ ,2812.3
+ ,1
+ ,3095.7
+ ,1
+ ,2862.9
+ ,1
+ ,2607.3
+ ,1
+ ,2862.5
+ ,1)
+ ,dim=c(2
+ ,120)
+ ,dimnames=list(c('Y(Export_farma_prod)'
+ ,'X(sprong)')
+ ,1:120))
> y <- array(NA,dim=c(2,120),dimnames=list(c('Y(Export_farma_prod)','X(sprong)'),1:120))
> 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
Y(Export_farma_prod) X(sprong) M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 423.4 0 1 0 0 0 0 0 0 0 0 0 0 1
2 404.1 0 0 1 0 0 0 0 0 0 0 0 0 2
3 500.0 0 0 0 1 0 0 0 0 0 0 0 0 3
4 472.6 0 0 0 0 1 0 0 0 0 0 0 0 4
5 496.1 0 0 0 0 0 1 0 0 0 0 0 0 5
6 562.0 0 0 0 0 0 0 1 0 0 0 0 0 6
7 434.8 0 0 0 0 0 0 0 1 0 0 0 0 7
8 538.2 0 0 0 0 0 0 0 0 1 0 0 0 8
9 577.6 0 0 0 0 0 0 0 0 0 1 0 0 9
10 518.1 0 0 0 0 0 0 0 0 0 0 1 0 10
11 625.2 0 0 0 0 0 0 0 0 0 0 0 1 11
12 561.2 0 0 0 0 0 0 0 0 0 0 0 0 12
13 523.3 0 1 0 0 0 0 0 0 0 0 0 0 13
14 536.1 0 0 1 0 0 0 0 0 0 0 0 0 14
15 607.3 0 0 0 1 0 0 0 0 0 0 0 0 15
16 637.3 0 0 0 0 1 0 0 0 0 0 0 0 16
17 606.9 0 0 0 0 0 1 0 0 0 0 0 0 17
18 652.9 0 0 0 0 0 0 1 0 0 0 0 0 18
19 617.2 0 0 0 0 0 0 0 1 0 0 0 0 19
20 670.4 0 0 0 0 0 0 0 0 1 0 0 0 20
21 729.9 0 0 0 0 0 0 0 0 0 1 0 0 21
22 677.2 0 0 0 0 0 0 0 0 0 0 1 0 22
23 710.0 0 0 0 0 0 0 0 0 0 0 0 1 23
24 844.3 0 0 0 0 0 0 0 0 0 0 0 0 24
25 748.2 0 1 0 0 0 0 0 0 0 0 0 0 25
26 653.9 0 0 1 0 0 0 0 0 0 0 0 0 26
27 742.6 0 0 0 1 0 0 0 0 0 0 0 0 27
28 854.2 0 0 0 0 1 0 0 0 0 0 0 0 28
29 808.4 0 0 0 0 0 1 0 0 0 0 0 0 29
30 1819.0 1 0 0 0 0 0 1 0 0 0 0 0 30
31 1936.5 1 0 0 0 0 0 0 1 0 0 0 0 31
32 1966.1 1 0 0 0 0 0 0 0 1 0 0 0 32
33 2083.1 1 0 0 0 0 0 0 0 0 1 0 0 33
34 1620.1 1 0 0 0 0 0 0 0 0 0 1 0 34
35 1527.6 1 0 0 0 0 0 0 0 0 0 0 1 35
36 1795.0 1 0 0 0 0 0 0 0 0 0 0 0 36
37 1685.1 1 1 0 0 0 0 0 0 0 0 0 0 37
38 1851.8 1 0 1 0 0 0 0 0 0 0 0 0 38
39 2164.4 1 0 0 1 0 0 0 0 0 0 0 0 39
40 1981.8 1 0 0 0 1 0 0 0 0 0 0 0 40
41 1726.5 1 0 0 0 0 1 0 0 0 0 0 0 41
42 2144.6 1 0 0 0 0 0 1 0 0 0 0 0 42
43 1758.2 1 0 0 0 0 0 0 1 0 0 0 0 43
44 1672.9 1 0 0 0 0 0 0 0 1 0 0 0 44
45 1837.3 1 0 0 0 0 0 0 0 0 1 0 0 45
46 1596.1 1 0 0 0 0 0 0 0 0 0 1 0 46
47 1446.0 1 0 0 0 0 0 0 0 0 0 0 1 47
48 1898.4 1 0 0 0 0 0 0 0 0 0 0 0 48
49 1964.1 1 1 0 0 0 0 0 0 0 0 0 0 49
50 1755.9 1 0 1 0 0 0 0 0 0 0 0 0 50
51 2255.3 1 0 0 1 0 0 0 0 0 0 0 0 51
52 1881.2 1 0 0 0 1 0 0 0 0 0 0 0 52
53 2117.9 1 0 0 0 0 1 0 0 0 0 0 0 53
54 1656.5 1 0 0 0 0 0 1 0 0 0 0 0 54
55 1544.1 1 0 0 0 0 0 0 1 0 0 0 0 55
56 2098.9 1 0 0 0 0 0 0 0 1 0 0 0 56
57 2133.3 1 0 0 0 0 0 0 0 0 1 0 0 57
58 1963.5 1 0 0 0 0 0 0 0 0 0 1 0 58
59 1801.2 1 0 0 0 0 0 0 0 0 0 0 1 59
60 2365.4 1 0 0 0 0 0 0 0 0 0 0 0 60
61 1936.5 1 1 0 0 0 0 0 0 0 0 0 0 61
62 1667.6 1 0 1 0 0 0 0 0 0 0 0 0 62
63 1983.5 1 0 0 1 0 0 0 0 0 0 0 0 63
64 2058.6 1 0 0 0 1 0 0 0 0 0 0 0 64
65 2448.3 1 0 0 0 0 1 0 0 0 0 0 0 65
66 1858.1 1 0 0 0 0 0 1 0 0 0 0 0 66
67 1625.4 1 0 0 0 0 0 0 1 0 0 0 0 67
68 2130.6 1 0 0 0 0 0 0 0 1 0 0 0 68
69 2515.7 1 0 0 0 0 0 0 0 0 1 0 0 69
70 2230.2 1 0 0 0 0 0 0 0 0 0 1 0 70
71 2086.9 1 0 0 0 0 0 0 0 0 0 0 1 71
72 2235.0 1 0 0 0 0 0 0 0 0 0 0 0 72
73 2100.2 1 1 0 0 0 0 0 0 0 0 0 0 73
74 2288.6 1 0 1 0 0 0 0 0 0 0 0 0 74
75 2490.0 1 0 0 1 0 0 0 0 0 0 0 0 75
76 2573.7 1 0 0 0 1 0 0 0 0 0 0 0 76
77 2543.8 1 0 0 0 0 1 0 0 0 0 0 0 77
78 2004.7 1 0 0 0 0 0 1 0 0 0 0 0 78
79 2390.0 1 0 0 0 0 0 0 1 0 0 0 0 79
80 2338.4 1 0 0 0 0 0 0 0 1 0 0 0 80
81 2724.5 1 0 0 0 0 0 0 0 0 1 0 0 81
82 2292.5 1 0 0 0 0 0 0 0 0 0 1 0 82
83 2386.0 1 0 0 0 0 0 0 0 0 0 0 1 83
84 2477.9 1 0 0 0 0 0 0 0 0 0 0 0 84
85 2337.0 1 1 0 0 0 0 0 0 0 0 0 0 85
86 2605.1 1 0 1 0 0 0 0 0 0 0 0 0 86
87 2560.8 1 0 0 1 0 0 0 0 0 0 0 0 87
88 2839.3 1 0 0 0 1 0 0 0 0 0 0 0 88
89 2407.2 1 0 0 0 0 1 0 0 0 0 0 0 89
90 2085.2 1 0 0 0 0 0 1 0 0 0 0 0 90
91 2735.6 1 0 0 0 0 0 0 1 0 0 0 0 91
92 2798.7 1 0 0 0 0 0 0 0 1 0 0 0 92
93 3053.2 1 0 0 0 0 0 0 0 0 1 0 0 93
94 2405.0 1 0 0 0 0 0 0 0 0 0 1 0 94
95 2471.9 1 0 0 0 0 0 0 0 0 0 0 1 95
96 2727.3 1 0 0 0 0 0 0 0 0 0 0 0 96
97 2790.7 1 1 0 0 0 0 0 0 0 0 0 0 97
98 2385.4 1 0 1 0 0 0 0 0 0 0 0 0 98
99 3206.6 1 0 0 1 0 0 0 0 0 0 0 0 99
100 2705.6 1 0 0 0 1 0 0 0 0 0 0 0 100
101 3518.4 1 0 0 0 0 1 0 0 0 0 0 0 101
102 1954.9 1 0 0 0 0 0 1 0 0 0 0 0 102
103 2584.3 1 0 0 0 0 0 0 1 0 0 0 0 103
104 2535.8 1 0 0 0 0 0 0 0 1 0 0 0 104
105 2685.9 1 0 0 0 0 0 0 0 0 1 0 0 105
106 2866.0 1 0 0 0 0 0 0 0 0 0 1 0 106
107 2236.6 1 0 0 0 0 0 0 0 0 0 0 1 107
108 2934.9 1 0 0 0 0 0 0 0 0 0 0 0 108
109 2668.6 1 1 0 0 0 0 0 0 0 0 0 0 109
110 2371.2 1 0 1 0 0 0 0 0 0 0 0 0 110
111 3165.9 1 0 0 1 0 0 0 0 0 0 0 0 111
112 2887.2 1 0 0 0 1 0 0 0 0 0 0 0 112
113 3112.2 1 0 0 0 0 1 0 0 0 0 0 0 113
114 2671.2 1 0 0 0 0 0 1 0 0 0 0 0 114
115 2432.6 1 0 0 0 0 0 0 1 0 0 0 0 115
116 2812.3 1 0 0 0 0 0 0 0 1 0 0 0 116
117 3095.7 1 0 0 0 0 0 0 0 0 1 0 0 117
118 2862.9 1 0 0 0 0 0 0 0 0 0 1 0 118
119 2607.3 1 0 0 0 0 0 0 0 0 0 0 1 119
120 2862.5 1 0 0 0 0 0 0 0 0 0 0 0 120
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `X(sprong)` M1 M2 M3 M4
472.12 874.56 -115.29 -194.64 107.42 15.32
M5 M6 M7 M8 M9 M10
91.12 -247.61 -196.26 -59.51 114.27 -139.81
M11 t
-266.71 13.61
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-532.64 -124.99 -13.30 116.14 705.74
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 472.1189 75.2432 6.275 7.8e-09 ***
`X(sprong)` 874.5650 65.5034 13.351 < 2e-16 ***
M1 -115.2870 91.9405 -1.254 0.21263
M2 -194.6394 91.9086 -2.118 0.03653 *
M3 107.4182 91.8837 1.169 0.24500
M4 15.3158 91.8659 0.167 0.86791
M5 91.1234 91.8553 0.992 0.32344
M6 -247.6055 91.8741 -2.695 0.00819 **
M7 -196.2579 91.8350 -2.137 0.03489 *
M8 -59.5104 91.8030 -0.648 0.51823
M9 114.2672 91.7781 1.245 0.21586
M10 -139.8052 91.7603 -1.524 0.13059
M11 -266.7076 91.7496 -2.907 0.00445 **
t 13.6124 0.8082 16.844 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 205.2 on 106 degrees of freedom
Multiple R-squared: 0.9448, Adjusted R-squared: 0.9381
F-statistic: 139.7 on 13 and 106 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,] 1.360495e-03 2.720991e-03 0.9986395
[2,] 1.918393e-04 3.836787e-04 0.9998082
[3,] 8.957298e-05 1.791460e-04 0.9999104
[4,] 9.756414e-06 1.951283e-05 0.9999902
[5,] 1.280201e-06 2.560402e-06 0.9999987
[6,] 1.797215e-07 3.594431e-07 0.9999998
[7,] 5.037835e-08 1.007567e-07 0.9999999
[8,] 1.240568e-06 2.481136e-06 0.9999988
[9,] 4.121531e-07 8.243062e-07 0.9999996
[10,] 9.964094e-08 1.992819e-07 0.9999999
[11,] 2.015890e-08 4.031779e-08 1.0000000
[12,] 1.275420e-08 2.550839e-08 1.0000000
[13,] 2.681669e-09 5.363338e-09 1.0000000
[14,] 6.341517e-10 1.268303e-09 1.0000000
[15,] 5.361969e-09 1.072394e-08 1.0000000
[16,] 1.767657e-09 3.535313e-09 1.0000000
[17,] 1.218598e-09 2.437195e-09 1.0000000
[18,] 5.904431e-07 1.180886e-06 0.9999994
[19,] 7.822384e-05 1.564477e-04 0.9999218
[20,] 4.785839e-05 9.571679e-05 0.9999521
[21,] 3.756720e-05 7.513440e-05 0.9999624
[22,] 2.238215e-05 4.476430e-05 0.9999776
[23,] 7.724987e-05 1.544997e-04 0.9999228
[24,] 3.785495e-05 7.570989e-05 0.9999621
[25,] 5.938328e-05 1.187666e-04 0.9999406
[26,] 2.661594e-04 5.323189e-04 0.9997338
[27,] 3.374656e-04 6.749312e-04 0.9996625
[28,] 1.169519e-03 2.339037e-03 0.9988305
[29,] 1.498082e-03 2.996163e-03 0.9985019
[30,] 2.266561e-03 4.533121e-03 0.9977334
[31,] 8.497090e-03 1.699418e-02 0.9915029
[32,] 5.606677e-03 1.121335e-02 0.9943933
[33,] 4.103227e-03 8.206454e-03 0.9958968
[34,] 3.008371e-03 6.016743e-03 0.9969916
[35,] 3.357232e-03 6.714464e-03 0.9966428
[36,] 2.757879e-03 5.515759e-03 0.9972421
[37,] 2.539168e-03 5.078335e-03 0.9974608
[38,] 7.190928e-03 1.438186e-02 0.9928091
[39,] 1.652074e-02 3.304147e-02 0.9834793
[40,] 1.362307e-02 2.724614e-02 0.9863769
[41,] 1.036038e-02 2.072076e-02 0.9896396
[42,] 7.587279e-03 1.517456e-02 0.9924127
[43,] 4.989712e-03 9.979425e-03 0.9950103
[44,] 8.435804e-03 1.687161e-02 0.9915642
[45,] 5.804950e-03 1.160990e-02 0.9941950
[46,] 8.632474e-03 1.726495e-02 0.9913675
[47,] 1.335216e-02 2.670432e-02 0.9866478
[48,] 1.219062e-02 2.438125e-02 0.9878094
[49,] 2.034300e-02 4.068600e-02 0.9796570
[50,] 1.771071e-02 3.542142e-02 0.9822893
[51,] 4.877595e-02 9.755190e-02 0.9512241
[52,] 3.848380e-02 7.696760e-02 0.9615162
[53,] 4.675500e-02 9.351001e-02 0.9532450
[54,] 4.322860e-02 8.645721e-02 0.9567714
[55,] 3.391882e-02 6.783764e-02 0.9660812
[56,] 2.674827e-02 5.349654e-02 0.9732517
[57,] 2.270233e-02 4.540466e-02 0.9772977
[58,] 2.152392e-02 4.304783e-02 0.9784761
[59,] 2.182352e-02 4.364704e-02 0.9781765
[60,] 2.372137e-02 4.744273e-02 0.9762786
[61,] 2.455227e-02 4.910453e-02 0.9754477
[62,] 1.993630e-02 3.987260e-02 0.9800637
[63,] 1.855047e-02 3.710093e-02 0.9814495
[64,] 1.359018e-02 2.718036e-02 0.9864098
[65,] 1.193933e-02 2.387866e-02 0.9880607
[66,] 9.280215e-03 1.856043e-02 0.9907198
[67,] 7.839144e-03 1.567829e-02 0.9921609
[68,] 5.470202e-03 1.094040e-02 0.9945298
[69,] 4.324987e-03 8.649973e-03 0.9956750
[70,] 7.026253e-03 1.405251e-02 0.9929737
[71,] 1.172255e-02 2.344511e-02 0.9882774
[72,] 1.228692e-02 2.457383e-02 0.9877131
[73,] 1.264898e-01 2.529796e-01 0.8735102
[74,] 1.212602e-01 2.425205e-01 0.8787398
[75,] 1.625996e-01 3.251992e-01 0.8374004
[76,] 1.652327e-01 3.304655e-01 0.8347673
[77,] 2.042611e-01 4.085221e-01 0.7957389
[78,] 2.286390e-01 4.572780e-01 0.7713610
[79,] 1.943200e-01 3.886399e-01 0.8056800
[80,] 1.393488e-01 2.786976e-01 0.8606512
[81,] 1.237016e-01 2.474031e-01 0.8762984
[82,] 9.044570e-02 1.808914e-01 0.9095543
[83,] 8.273319e-02 1.654664e-01 0.9172668
[84,] 4.920480e-02 9.840960e-02 0.9507952
[85,] 2.171487e-01 4.342975e-01 0.7828513
[86,] 5.067854e-01 9.864292e-01 0.4932146
[87,] 5.306654e-01 9.386691e-01 0.4693346
> postscript(file="/var/www/html/rcomp/tmp/1tjf91259022288.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/2gtcn1259022288.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/3f5bc1259022288.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/4gcjr1259022288.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/5myf81259022288.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 = 120
Frequency = 1
1 2 3 4 5 6
52.9557127 99.3957127 -120.3742873 -69.2842873 -135.2042873 255.8122112
7 8 9 10 11 12
63.6522112 16.6922112 -131.2977888 49.6622112 270.0522112 -74.2677888
13 14 15 16 17 18
-10.4932258 68.0467742 -176.4232258 -67.9332258 -187.7532258 183.3632727
19 20 21 22 23 24
82.7032727 -14.4567273 -142.3467273 45.4132727 191.5032727 45.4832727
25 26 27 28 29 30
51.0578356 22.4978356 -204.4721644 -14.3821644 -149.6021644 311.5493494
31 32 33 34 35 36
364.0893494 243.3293494 172.9393494 -49.6006506 -28.8106506 -41.7306506
37 38 39 40 41 42
-49.9560876 182.4839124 179.4139124 75.3039124 -269.4160876 473.8004109
43 44 45 46 47 48
22.4404109 -213.2195891 -236.2095891 -236.9495891 -273.7595891 -101.6795891
49 50 51 52 53 54
65.6949739 -76.7650261 106.9649739 -188.6450261 -41.3650261 -177.6485277
55 56 57 58 59 60
-355.0085277 49.4314723 -103.5585277 -32.8985277 -81.9085277 201.9714723
61 62 63 64 65 66
-125.2539647 -328.4139647 -328.1839647 -174.5939647 125.6860353 -139.3974662
67 68 69 70 71 72
-437.0574662 -82.2174662 115.4925338 70.4525338 40.4425338 -91.7774662
73 74 75 76 77 78
-124.9029032 129.2370968 14.9670968 177.1570968 57.8370968 -156.1464048
79 80 81 82 83 84
164.1935952 -37.7664048 160.9435952 -30.5964048 176.1935952 -12.2264048
85 86 87 88 89 90
-51.4518418 282.3881582 -77.5818418 279.4081582 -242.1118418 -238.9953433
91 92 93 94 95 96
346.4446567 259.1846567 326.2946567 -81.4453433 98.7446567 73.8246567
97 98 99 100 101 102
238.8992197 -100.6607803 404.8692197 -17.6407803 705.7392197 -532.6442819
103 104 105 106 107 108
31.7957181 -167.0642819 -204.3542819 216.2057181 -299.9042819 118.0757181
109 110 111 112 113 114
-46.5497189 -278.2097189 200.8202811 0.6102811 136.1902811 20.3067796
115 116 117 118 119 120
-283.2532204 -53.9132204 42.0967796 49.7567796 -92.5532204 -117.6732204
> postscript(file="/var/www/html/rcomp/tmp/6ybe51259022288.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 = 120
Frequency = 1
lag(myerror, k = 1) myerror
0 52.9557127 NA
1 99.3957127 52.9557127
2 -120.3742873 99.3957127
3 -69.2842873 -120.3742873
4 -135.2042873 -69.2842873
5 255.8122112 -135.2042873
6 63.6522112 255.8122112
7 16.6922112 63.6522112
8 -131.2977888 16.6922112
9 49.6622112 -131.2977888
10 270.0522112 49.6622112
11 -74.2677888 270.0522112
12 -10.4932258 -74.2677888
13 68.0467742 -10.4932258
14 -176.4232258 68.0467742
15 -67.9332258 -176.4232258
16 -187.7532258 -67.9332258
17 183.3632727 -187.7532258
18 82.7032727 183.3632727
19 -14.4567273 82.7032727
20 -142.3467273 -14.4567273
21 45.4132727 -142.3467273
22 191.5032727 45.4132727
23 45.4832727 191.5032727
24 51.0578356 45.4832727
25 22.4978356 51.0578356
26 -204.4721644 22.4978356
27 -14.3821644 -204.4721644
28 -149.6021644 -14.3821644
29 311.5493494 -149.6021644
30 364.0893494 311.5493494
31 243.3293494 364.0893494
32 172.9393494 243.3293494
33 -49.6006506 172.9393494
34 -28.8106506 -49.6006506
35 -41.7306506 -28.8106506
36 -49.9560876 -41.7306506
37 182.4839124 -49.9560876
38 179.4139124 182.4839124
39 75.3039124 179.4139124
40 -269.4160876 75.3039124
41 473.8004109 -269.4160876
42 22.4404109 473.8004109
43 -213.2195891 22.4404109
44 -236.2095891 -213.2195891
45 -236.9495891 -236.2095891
46 -273.7595891 -236.9495891
47 -101.6795891 -273.7595891
48 65.6949739 -101.6795891
49 -76.7650261 65.6949739
50 106.9649739 -76.7650261
51 -188.6450261 106.9649739
52 -41.3650261 -188.6450261
53 -177.6485277 -41.3650261
54 -355.0085277 -177.6485277
55 49.4314723 -355.0085277
56 -103.5585277 49.4314723
57 -32.8985277 -103.5585277
58 -81.9085277 -32.8985277
59 201.9714723 -81.9085277
60 -125.2539647 201.9714723
61 -328.4139647 -125.2539647
62 -328.1839647 -328.4139647
63 -174.5939647 -328.1839647
64 125.6860353 -174.5939647
65 -139.3974662 125.6860353
66 -437.0574662 -139.3974662
67 -82.2174662 -437.0574662
68 115.4925338 -82.2174662
69 70.4525338 115.4925338
70 40.4425338 70.4525338
71 -91.7774662 40.4425338
72 -124.9029032 -91.7774662
73 129.2370968 -124.9029032
74 14.9670968 129.2370968
75 177.1570968 14.9670968
76 57.8370968 177.1570968
77 -156.1464048 57.8370968
78 164.1935952 -156.1464048
79 -37.7664048 164.1935952
80 160.9435952 -37.7664048
81 -30.5964048 160.9435952
82 176.1935952 -30.5964048
83 -12.2264048 176.1935952
84 -51.4518418 -12.2264048
85 282.3881582 -51.4518418
86 -77.5818418 282.3881582
87 279.4081582 -77.5818418
88 -242.1118418 279.4081582
89 -238.9953433 -242.1118418
90 346.4446567 -238.9953433
91 259.1846567 346.4446567
92 326.2946567 259.1846567
93 -81.4453433 326.2946567
94 98.7446567 -81.4453433
95 73.8246567 98.7446567
96 238.8992197 73.8246567
97 -100.6607803 238.8992197
98 404.8692197 -100.6607803
99 -17.6407803 404.8692197
100 705.7392197 -17.6407803
101 -532.6442819 705.7392197
102 31.7957181 -532.6442819
103 -167.0642819 31.7957181
104 -204.3542819 -167.0642819
105 216.2057181 -204.3542819
106 -299.9042819 216.2057181
107 118.0757181 -299.9042819
108 -46.5497189 118.0757181
109 -278.2097189 -46.5497189
110 200.8202811 -278.2097189
111 0.6102811 200.8202811
112 136.1902811 0.6102811
113 20.3067796 136.1902811
114 -283.2532204 20.3067796
115 -53.9132204 -283.2532204
116 42.0967796 -53.9132204
117 49.7567796 42.0967796
118 -92.5532204 49.7567796
119 -117.6732204 -92.5532204
120 NA -117.6732204
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 99.3957127 52.9557127
[2,] -120.3742873 99.3957127
[3,] -69.2842873 -120.3742873
[4,] -135.2042873 -69.2842873
[5,] 255.8122112 -135.2042873
[6,] 63.6522112 255.8122112
[7,] 16.6922112 63.6522112
[8,] -131.2977888 16.6922112
[9,] 49.6622112 -131.2977888
[10,] 270.0522112 49.6622112
[11,] -74.2677888 270.0522112
[12,] -10.4932258 -74.2677888
[13,] 68.0467742 -10.4932258
[14,] -176.4232258 68.0467742
[15,] -67.9332258 -176.4232258
[16,] -187.7532258 -67.9332258
[17,] 183.3632727 -187.7532258
[18,] 82.7032727 183.3632727
[19,] -14.4567273 82.7032727
[20,] -142.3467273 -14.4567273
[21,] 45.4132727 -142.3467273
[22,] 191.5032727 45.4132727
[23,] 45.4832727 191.5032727
[24,] 51.0578356 45.4832727
[25,] 22.4978356 51.0578356
[26,] -204.4721644 22.4978356
[27,] -14.3821644 -204.4721644
[28,] -149.6021644 -14.3821644
[29,] 311.5493494 -149.6021644
[30,] 364.0893494 311.5493494
[31,] 243.3293494 364.0893494
[32,] 172.9393494 243.3293494
[33,] -49.6006506 172.9393494
[34,] -28.8106506 -49.6006506
[35,] -41.7306506 -28.8106506
[36,] -49.9560876 -41.7306506
[37,] 182.4839124 -49.9560876
[38,] 179.4139124 182.4839124
[39,] 75.3039124 179.4139124
[40,] -269.4160876 75.3039124
[41,] 473.8004109 -269.4160876
[42,] 22.4404109 473.8004109
[43,] -213.2195891 22.4404109
[44,] -236.2095891 -213.2195891
[45,] -236.9495891 -236.2095891
[46,] -273.7595891 -236.9495891
[47,] -101.6795891 -273.7595891
[48,] 65.6949739 -101.6795891
[49,] -76.7650261 65.6949739
[50,] 106.9649739 -76.7650261
[51,] -188.6450261 106.9649739
[52,] -41.3650261 -188.6450261
[53,] -177.6485277 -41.3650261
[54,] -355.0085277 -177.6485277
[55,] 49.4314723 -355.0085277
[56,] -103.5585277 49.4314723
[57,] -32.8985277 -103.5585277
[58,] -81.9085277 -32.8985277
[59,] 201.9714723 -81.9085277
[60,] -125.2539647 201.9714723
[61,] -328.4139647 -125.2539647
[62,] -328.1839647 -328.4139647
[63,] -174.5939647 -328.1839647
[64,] 125.6860353 -174.5939647
[65,] -139.3974662 125.6860353
[66,] -437.0574662 -139.3974662
[67,] -82.2174662 -437.0574662
[68,] 115.4925338 -82.2174662
[69,] 70.4525338 115.4925338
[70,] 40.4425338 70.4525338
[71,] -91.7774662 40.4425338
[72,] -124.9029032 -91.7774662
[73,] 129.2370968 -124.9029032
[74,] 14.9670968 129.2370968
[75,] 177.1570968 14.9670968
[76,] 57.8370968 177.1570968
[77,] -156.1464048 57.8370968
[78,] 164.1935952 -156.1464048
[79,] -37.7664048 164.1935952
[80,] 160.9435952 -37.7664048
[81,] -30.5964048 160.9435952
[82,] 176.1935952 -30.5964048
[83,] -12.2264048 176.1935952
[84,] -51.4518418 -12.2264048
[85,] 282.3881582 -51.4518418
[86,] -77.5818418 282.3881582
[87,] 279.4081582 -77.5818418
[88,] -242.1118418 279.4081582
[89,] -238.9953433 -242.1118418
[90,] 346.4446567 -238.9953433
[91,] 259.1846567 346.4446567
[92,] 326.2946567 259.1846567
[93,] -81.4453433 326.2946567
[94,] 98.7446567 -81.4453433
[95,] 73.8246567 98.7446567
[96,] 238.8992197 73.8246567
[97,] -100.6607803 238.8992197
[98,] 404.8692197 -100.6607803
[99,] -17.6407803 404.8692197
[100,] 705.7392197 -17.6407803
[101,] -532.6442819 705.7392197
[102,] 31.7957181 -532.6442819
[103,] -167.0642819 31.7957181
[104,] -204.3542819 -167.0642819
[105,] 216.2057181 -204.3542819
[106,] -299.9042819 216.2057181
[107,] 118.0757181 -299.9042819
[108,] -46.5497189 118.0757181
[109,] -278.2097189 -46.5497189
[110,] 200.8202811 -278.2097189
[111,] 0.6102811 200.8202811
[112,] 136.1902811 0.6102811
[113,] 20.3067796 136.1902811
[114,] -283.2532204 20.3067796
[115,] -53.9132204 -283.2532204
[116,] 42.0967796 -53.9132204
[117,] 49.7567796 42.0967796
[118,] -92.5532204 49.7567796
[119,] -117.6732204 -92.5532204
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 99.3957127 52.9557127
2 -120.3742873 99.3957127
3 -69.2842873 -120.3742873
4 -135.2042873 -69.2842873
5 255.8122112 -135.2042873
6 63.6522112 255.8122112
7 16.6922112 63.6522112
8 -131.2977888 16.6922112
9 49.6622112 -131.2977888
10 270.0522112 49.6622112
11 -74.2677888 270.0522112
12 -10.4932258 -74.2677888
13 68.0467742 -10.4932258
14 -176.4232258 68.0467742
15 -67.9332258 -176.4232258
16 -187.7532258 -67.9332258
17 183.3632727 -187.7532258
18 82.7032727 183.3632727
19 -14.4567273 82.7032727
20 -142.3467273 -14.4567273
21 45.4132727 -142.3467273
22 191.5032727 45.4132727
23 45.4832727 191.5032727
24 51.0578356 45.4832727
25 22.4978356 51.0578356
26 -204.4721644 22.4978356
27 -14.3821644 -204.4721644
28 -149.6021644 -14.3821644
29 311.5493494 -149.6021644
30 364.0893494 311.5493494
31 243.3293494 364.0893494
32 172.9393494 243.3293494
33 -49.6006506 172.9393494
34 -28.8106506 -49.6006506
35 -41.7306506 -28.8106506
36 -49.9560876 -41.7306506
37 182.4839124 -49.9560876
38 179.4139124 182.4839124
39 75.3039124 179.4139124
40 -269.4160876 75.3039124
41 473.8004109 -269.4160876
42 22.4404109 473.8004109
43 -213.2195891 22.4404109
44 -236.2095891 -213.2195891
45 -236.9495891 -236.2095891
46 -273.7595891 -236.9495891
47 -101.6795891 -273.7595891
48 65.6949739 -101.6795891
49 -76.7650261 65.6949739
50 106.9649739 -76.7650261
51 -188.6450261 106.9649739
52 -41.3650261 -188.6450261
53 -177.6485277 -41.3650261
54 -355.0085277 -177.6485277
55 49.4314723 -355.0085277
56 -103.5585277 49.4314723
57 -32.8985277 -103.5585277
58 -81.9085277 -32.8985277
59 201.9714723 -81.9085277
60 -125.2539647 201.9714723
61 -328.4139647 -125.2539647
62 -328.1839647 -328.4139647
63 -174.5939647 -328.1839647
64 125.6860353 -174.5939647
65 -139.3974662 125.6860353
66 -437.0574662 -139.3974662
67 -82.2174662 -437.0574662
68 115.4925338 -82.2174662
69 70.4525338 115.4925338
70 40.4425338 70.4525338
71 -91.7774662 40.4425338
72 -124.9029032 -91.7774662
73 129.2370968 -124.9029032
74 14.9670968 129.2370968
75 177.1570968 14.9670968
76 57.8370968 177.1570968
77 -156.1464048 57.8370968
78 164.1935952 -156.1464048
79 -37.7664048 164.1935952
80 160.9435952 -37.7664048
81 -30.5964048 160.9435952
82 176.1935952 -30.5964048
83 -12.2264048 176.1935952
84 -51.4518418 -12.2264048
85 282.3881582 -51.4518418
86 -77.5818418 282.3881582
87 279.4081582 -77.5818418
88 -242.1118418 279.4081582
89 -238.9953433 -242.1118418
90 346.4446567 -238.9953433
91 259.1846567 346.4446567
92 326.2946567 259.1846567
93 -81.4453433 326.2946567
94 98.7446567 -81.4453433
95 73.8246567 98.7446567
96 238.8992197 73.8246567
97 -100.6607803 238.8992197
98 404.8692197 -100.6607803
99 -17.6407803 404.8692197
100 705.7392197 -17.6407803
101 -532.6442819 705.7392197
102 31.7957181 -532.6442819
103 -167.0642819 31.7957181
104 -204.3542819 -167.0642819
105 216.2057181 -204.3542819
106 -299.9042819 216.2057181
107 118.0757181 -299.9042819
108 -46.5497189 118.0757181
109 -278.2097189 -46.5497189
110 200.8202811 -278.2097189
111 0.6102811 200.8202811
112 136.1902811 0.6102811
113 20.3067796 136.1902811
114 -283.2532204 20.3067796
115 -53.9132204 -283.2532204
116 42.0967796 -53.9132204
117 49.7567796 42.0967796
118 -92.5532204 49.7567796
119 -117.6732204 -92.5532204
> 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/76x9d1259022288.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/8x8r41259022288.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/9xcxt1259022288.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/10z8dn1259022288.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/11p1ko1259022288.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/12x7k81259022288.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/13same1259022288.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/14ruy81259022288.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/155c5c1259022288.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/161f851259022288.tab")
+ }
> system("convert tmp/1tjf91259022288.ps tmp/1tjf91259022288.png")
> system("convert tmp/2gtcn1259022288.ps tmp/2gtcn1259022288.png")
> system("convert tmp/3f5bc1259022288.ps tmp/3f5bc1259022288.png")
> system("convert tmp/4gcjr1259022288.ps tmp/4gcjr1259022288.png")
> system("convert tmp/5myf81259022288.ps tmp/5myf81259022288.png")
> system("convert tmp/6ybe51259022288.ps tmp/6ybe51259022288.png")
> system("convert tmp/76x9d1259022288.ps tmp/76x9d1259022288.png")
> system("convert tmp/8x8r41259022288.ps tmp/8x8r41259022288.png")
> system("convert tmp/9xcxt1259022288.ps tmp/9xcxt1259022288.png")
> system("convert tmp/10z8dn1259022288.ps tmp/10z8dn1259022288.png")
>
>
> proc.time()
user system elapsed
3.258 1.617 4.195