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(11881.4
+ ,423.4
+ ,10374.2
+ ,404.1
+ ,13828
+ ,500
+ ,13490.5
+ ,472.6
+ ,13092.2
+ ,496.1
+ ,13184.4
+ ,562
+ ,12398.4
+ ,434.8
+ ,13882.3
+ ,538.2
+ ,15861.5
+ ,577.6
+ ,13286.1
+ ,518.1
+ ,15634.9
+ ,625.2
+ ,14211
+ ,561.2
+ ,13646.8
+ ,523.3
+ ,12224.6
+ ,536.1
+ ,15916.4
+ ,607.3
+ ,16535.9
+ ,637.3
+ ,15796
+ ,606.9
+ ,14418.6
+ ,652.9
+ ,15044.5
+ ,617.2
+ ,14944.2
+ ,670.4
+ ,16754.8
+ ,729.9
+ ,14254
+ ,677.2
+ ,15454.9
+ ,710
+ ,15644.8
+ ,844.3
+ ,14568.3
+ ,748.2
+ ,12520.2
+ ,653.9
+ ,14803
+ ,742.6
+ ,15873.2
+ ,854.2
+ ,14755.3
+ ,808.4
+ ,12875.1
+ ,1819
+ ,14291.1
+ ,1936.5
+ ,14205.3
+ ,1966.1
+ ,15859.4
+ ,2083.1
+ ,15258.9
+ ,1620.1
+ ,15498.6
+ ,1527.6
+ ,15106.5
+ ,1795
+ ,15023.6
+ ,1685.1
+ ,12083
+ ,1851.8
+ ,15761.3
+ ,2164.4
+ ,16943
+ ,1981.8
+ ,15070.3
+ ,1726.5
+ ,13659.6
+ ,2144.6
+ ,14768.9
+ ,1758.2
+ ,14725.1
+ ,1672.9
+ ,15998.1
+ ,1837.3
+ ,15370.6
+ ,1596.1
+ ,14956.9
+ ,1446
+ ,15469.7
+ ,1898.4
+ ,15101.8
+ ,1964.1
+ ,11703.7
+ ,1755.9
+ ,16283.6
+ ,2255.3
+ ,16726.5
+ ,1881.2
+ ,14968.9
+ ,2117.9
+ ,14861
+ ,1656.5
+ ,14583.3
+ ,1544.1
+ ,15305.8
+ ,2098.9
+ ,17903.9
+ ,2133.3
+ ,16379.4
+ ,1963.5
+ ,15420.3
+ ,1801.2
+ ,17870.5
+ ,2365.4
+ ,15912.8
+ ,1936.5
+ ,13866.5
+ ,1667.6
+ ,17823.2
+ ,1983.5
+ ,17872
+ ,2058.6
+ ,17420.4
+ ,2448.3
+ ,16704.4
+ ,1858.1
+ ,15991.2
+ ,1625.4
+ ,16583.6
+ ,2130.6
+ ,19123.5
+ ,2515.7
+ ,17838.7
+ ,2230.2
+ ,17209.4
+ ,2086.9
+ ,18586.5
+ ,2235
+ ,16258.1
+ ,2100.2
+ ,15141.6
+ ,2288.6
+ ,19202.1
+ ,2490
+ ,17746.5
+ ,2573.7
+ ,19090.1
+ ,2543.8
+ ,18040.3
+ ,2004.7
+ ,17515.5
+ ,2390
+ ,17751.8
+ ,2338.4
+ ,21072.4
+ ,2724.5
+ ,17170
+ ,2292.5
+ ,19439.5
+ ,2386
+ ,19795.4
+ ,2477.9
+ ,17574.9
+ ,2337
+ ,16165.4
+ ,2605.1
+ ,19464.6
+ ,2560.8
+ ,19932.1
+ ,2839.3
+ ,19961.2
+ ,2407.2
+ ,17343.4
+ ,2085.2
+ ,18924.2
+ ,2735.6
+ ,18574.1
+ ,2798.7
+ ,21350.6
+ ,3053.2
+ ,18594.6
+ ,2405
+ ,19823.1
+ ,2471.9
+ ,20844.4
+ ,2727.3
+ ,19640.2
+ ,2790.7
+ ,17735.4
+ ,2385.4
+ ,19813.6
+ ,3206.6
+ ,22160
+ ,2705.6
+ ,20664.3
+ ,3518.4
+ ,17877.4
+ ,1954.9
+ ,20906.5
+ ,2584.3
+ ,21164.1
+ ,2535.8
+ ,21374.4
+ ,2685.9
+ ,22952.3
+ ,2866
+ ,21343.5
+ ,2236.6
+ ,23899.3
+ ,2934.9
+ ,22392.9
+ ,2668.6
+ ,18274.1
+ ,2371.2
+ ,22786.7
+ ,3165.9
+ ,22321.5
+ ,2887.2
+ ,17842.2
+ ,3112.2
+ ,16373.5
+ ,2671.2
+ ,15993.8
+ ,2432.6
+ ,16446.1
+ ,2812.3
+ ,17729
+ ,3095.7
+ ,16643
+ ,2862.9
+ ,16196.7
+ ,2607.3
+ ,18252.1
+ ,2862.5)
+ ,dim=c(2
+ ,120)
+ ,dimnames=list(c('Y(Totale_export_België)'
+ ,'X(Export_farma_België)')
+ ,1:120))
> y <- array(NA,dim=c(2,120),dimnames=list(c('Y(Totale_export_België)','X(Export_farma_België)'),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(Totale_export_Belgi\353) X(Export_farma_Belgi\353) M1 M2 M3 M4 M5 M6 M7
1 11881.4 423.4 1 0 0 0 0 0 0
2 10374.2 404.1 0 1 0 0 0 0 0
3 13828.0 500.0 0 0 1 0 0 0 0
4 13490.5 472.6 0 0 0 1 0 0 0
5 13092.2 496.1 0 0 0 0 1 0 0
6 13184.4 562.0 0 0 0 0 0 1 0
7 12398.4 434.8 0 0 0 0 0 0 1
8 13882.3 538.2 0 0 0 0 0 0 0
9 15861.5 577.6 0 0 0 0 0 0 0
10 13286.1 518.1 0 0 0 0 0 0 0
11 15634.9 625.2 0 0 0 0 0 0 0
12 14211.0 561.2 0 0 0 0 0 0 0
13 13646.8 523.3 1 0 0 0 0 0 0
14 12224.6 536.1 0 1 0 0 0 0 0
15 15916.4 607.3 0 0 1 0 0 0 0
16 16535.9 637.3 0 0 0 1 0 0 0
17 15796.0 606.9 0 0 0 0 1 0 0
18 14418.6 652.9 0 0 0 0 0 1 0
19 15044.5 617.2 0 0 0 0 0 0 1
20 14944.2 670.4 0 0 0 0 0 0 0
21 16754.8 729.9 0 0 0 0 0 0 0
22 14254.0 677.2 0 0 0 0 0 0 0
23 15454.9 710.0 0 0 0 0 0 0 0
24 15644.8 844.3 0 0 0 0 0 0 0
25 14568.3 748.2 1 0 0 0 0 0 0
26 12520.2 653.9 0 1 0 0 0 0 0
27 14803.0 742.6 0 0 1 0 0 0 0
28 15873.2 854.2 0 0 0 1 0 0 0
29 14755.3 808.4 0 0 0 0 1 0 0
30 12875.1 1819.0 0 0 0 0 0 1 0
31 14291.1 1936.5 0 0 0 0 0 0 1
32 14205.3 1966.1 0 0 0 0 0 0 0
33 15859.4 2083.1 0 0 0 0 0 0 0
34 15258.9 1620.1 0 0 0 0 0 0 0
35 15498.6 1527.6 0 0 0 0 0 0 0
36 15106.5 1795.0 0 0 0 0 0 0 0
37 15023.6 1685.1 1 0 0 0 0 0 0
38 12083.0 1851.8 0 1 0 0 0 0 0
39 15761.3 2164.4 0 0 1 0 0 0 0
40 16943.0 1981.8 0 0 0 1 0 0 0
41 15070.3 1726.5 0 0 0 0 1 0 0
42 13659.6 2144.6 0 0 0 0 0 1 0
43 14768.9 1758.2 0 0 0 0 0 0 1
44 14725.1 1672.9 0 0 0 0 0 0 0
45 15998.1 1837.3 0 0 0 0 0 0 0
46 15370.6 1596.1 0 0 0 0 0 0 0
47 14956.9 1446.0 0 0 0 0 0 0 0
48 15469.7 1898.4 0 0 0 0 0 0 0
49 15101.8 1964.1 1 0 0 0 0 0 0
50 11703.7 1755.9 0 1 0 0 0 0 0
51 16283.6 2255.3 0 0 1 0 0 0 0
52 16726.5 1881.2 0 0 0 1 0 0 0
53 14968.9 2117.9 0 0 0 0 1 0 0
54 14861.0 1656.5 0 0 0 0 0 1 0
55 14583.3 1544.1 0 0 0 0 0 0 1
56 15305.8 2098.9 0 0 0 0 0 0 0
57 17903.9 2133.3 0 0 0 0 0 0 0
58 16379.4 1963.5 0 0 0 0 0 0 0
59 15420.3 1801.2 0 0 0 0 0 0 0
60 17870.5 2365.4 0 0 0 0 0 0 0
61 15912.8 1936.5 1 0 0 0 0 0 0
62 13866.5 1667.6 0 1 0 0 0 0 0
63 17823.2 1983.5 0 0 1 0 0 0 0
64 17872.0 2058.6 0 0 0 1 0 0 0
65 17420.4 2448.3 0 0 0 0 1 0 0
66 16704.4 1858.1 0 0 0 0 0 1 0
67 15991.2 1625.4 0 0 0 0 0 0 1
68 16583.6 2130.6 0 0 0 0 0 0 0
69 19123.5 2515.7 0 0 0 0 0 0 0
70 17838.7 2230.2 0 0 0 0 0 0 0
71 17209.4 2086.9 0 0 0 0 0 0 0
72 18586.5 2235.0 0 0 0 0 0 0 0
73 16258.1 2100.2 1 0 0 0 0 0 0
74 15141.6 2288.6 0 1 0 0 0 0 0
75 19202.1 2490.0 0 0 1 0 0 0 0
76 17746.5 2573.7 0 0 0 1 0 0 0
77 19090.1 2543.8 0 0 0 0 1 0 0
78 18040.3 2004.7 0 0 0 0 0 1 0
79 17515.5 2390.0 0 0 0 0 0 0 1
80 17751.8 2338.4 0 0 0 0 0 0 0
81 21072.4 2724.5 0 0 0 0 0 0 0
82 17170.0 2292.5 0 0 0 0 0 0 0
83 19439.5 2386.0 0 0 0 0 0 0 0
84 19795.4 2477.9 0 0 0 0 0 0 0
85 17574.9 2337.0 1 0 0 0 0 0 0
86 16165.4 2605.1 0 1 0 0 0 0 0
87 19464.6 2560.8 0 0 1 0 0 0 0
88 19932.1 2839.3 0 0 0 1 0 0 0
89 19961.2 2407.2 0 0 0 0 1 0 0
90 17343.4 2085.2 0 0 0 0 0 1 0
91 18924.2 2735.6 0 0 0 0 0 0 1
92 18574.1 2798.7 0 0 0 0 0 0 0
93 21350.6 3053.2 0 0 0 0 0 0 0
94 18594.6 2405.0 0 0 0 0 0 0 0
95 19823.1 2471.9 0 0 0 0 0 0 0
96 20844.4 2727.3 0 0 0 0 0 0 0
97 19640.2 2790.7 1 0 0 0 0 0 0
98 17735.4 2385.4 0 1 0 0 0 0 0
99 19813.6 3206.6 0 0 1 0 0 0 0
100 22160.0 2705.6 0 0 0 1 0 0 0
101 20664.3 3518.4 0 0 0 0 1 0 0
102 17877.4 1954.9 0 0 0 0 0 1 0
103 20906.5 2584.3 0 0 0 0 0 0 1
104 21164.1 2535.8 0 0 0 0 0 0 0
105 21374.4 2685.9 0 0 0 0 0 0 0
106 22952.3 2866.0 0 0 0 0 0 0 0
107 21343.5 2236.6 0 0 0 0 0 0 0
108 23899.3 2934.9 0 0 0 0 0 0 0
109 22392.9 2668.6 1 0 0 0 0 0 0
110 18274.1 2371.2 0 1 0 0 0 0 0
111 22786.7 3165.9 0 0 1 0 0 0 0
112 22321.5 2887.2 0 0 0 1 0 0 0
113 17842.2 3112.2 0 0 0 0 1 0 0
114 16373.5 2671.2 0 0 0 0 0 1 0
115 15993.8 2432.6 0 0 0 0 0 0 1
116 16446.1 2812.3 0 0 0 0 0 0 0
117 17729.0 3095.7 0 0 0 0 0 0 0
118 16643.0 2862.9 0 0 0 0 0 0 0
119 16196.7 2607.3 0 0 0 0 0 0 0
120 18252.1 2862.5 0 0 0 0 0 0 0
M8 M9 M10 M11 t
1 0 0 0 0 1
2 0 0 0 0 2
3 0 0 0 0 3
4 0 0 0 0 4
5 0 0 0 0 5
6 0 0 0 0 6
7 0 0 0 0 7
8 1 0 0 0 8
9 0 1 0 0 9
10 0 0 1 0 10
11 0 0 0 1 11
12 0 0 0 0 12
13 0 0 0 0 13
14 0 0 0 0 14
15 0 0 0 0 15
16 0 0 0 0 16
17 0 0 0 0 17
18 0 0 0 0 18
19 0 0 0 0 19
20 1 0 0 0 20
21 0 1 0 0 21
22 0 0 1 0 22
23 0 0 0 1 23
24 0 0 0 0 24
25 0 0 0 0 25
26 0 0 0 0 26
27 0 0 0 0 27
28 0 0 0 0 28
29 0 0 0 0 29
30 0 0 0 0 30
31 0 0 0 0 31
32 1 0 0 0 32
33 0 1 0 0 33
34 0 0 1 0 34
35 0 0 0 1 35
36 0 0 0 0 36
37 0 0 0 0 37
38 0 0 0 0 38
39 0 0 0 0 39
40 0 0 0 0 40
41 0 0 0 0 41
42 0 0 0 0 42
43 0 0 0 0 43
44 1 0 0 0 44
45 0 1 0 0 45
46 0 0 1 0 46
47 0 0 0 1 47
48 0 0 0 0 48
49 0 0 0 0 49
50 0 0 0 0 50
51 0 0 0 0 51
52 0 0 0 0 52
53 0 0 0 0 53
54 0 0 0 0 54
55 0 0 0 0 55
56 1 0 0 0 56
57 0 1 0 0 57
58 0 0 1 0 58
59 0 0 0 1 59
60 0 0 0 0 60
61 0 0 0 0 61
62 0 0 0 0 62
63 0 0 0 0 63
64 0 0 0 0 64
65 0 0 0 0 65
66 0 0 0 0 66
67 0 0 0 0 67
68 1 0 0 0 68
69 0 1 0 0 69
70 0 0 1 0 70
71 0 0 0 1 71
72 0 0 0 0 72
73 0 0 0 0 73
74 0 0 0 0 74
75 0 0 0 0 75
76 0 0 0 0 76
77 0 0 0 0 77
78 0 0 0 0 78
79 0 0 0 0 79
80 1 0 0 0 80
81 0 1 0 0 81
82 0 0 1 0 82
83 0 0 0 1 83
84 0 0 0 0 84
85 0 0 0 0 85
86 0 0 0 0 86
87 0 0 0 0 87
88 0 0 0 0 88
89 0 0 0 0 89
90 0 0 0 0 90
91 0 0 0 0 91
92 1 0 0 0 92
93 0 1 0 0 93
94 0 0 1 0 94
95 0 0 0 1 95
96 0 0 0 0 96
97 0 0 0 0 97
98 0 0 0 0 98
99 0 0 0 0 99
100 0 0 0 0 100
101 0 0 0 0 101
102 0 0 0 0 102
103 0 0 0 0 103
104 1 0 0 0 104
105 0 1 0 0 105
106 0 0 1 0 106
107 0 0 0 1 107
108 0 0 0 0 108
109 0 0 0 0 109
110 0 0 0 0 110
111 0 0 0 0 111
112 0 0 0 0 112
113 0 0 0 0 113
114 0 0 0 0 114
115 0 0 0 0 115
116 1 0 0 0 116
117 0 1 0 0 117
118 0 0 1 0 118
119 0 0 0 1 119
120 0 0 0 0 120
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `X(Export_farma_Belgi\353)`
14089.4721 -0.1070
M1 M2
-1122.3121 -3382.6755
M3 M4
148.3506 469.7034
M5 M6
-676.8825 -2096.7462
M7 M8
-1643.9486 -1373.4857
M9 M10
528.9583 -1086.8849
M11 t
-838.1047 62.1212
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-4168.18 -665.27 -16.68 857.79 3671.45
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 14089.4721 571.9722 24.633 < 2e-16 ***
`X(Export_farma_Belgi\353)` -0.1070 0.4067 -0.263 0.79307
M1 -1122.3121 632.2368 -1.775 0.07874 .
M2 -3382.6755 635.6208 -5.322 5.78e-07 ***
M3 148.3506 631.1736 0.235 0.81463
M4 469.7034 629.8886 0.746 0.45750
M5 -676.8825 630.1805 -1.074 0.28521
M6 -2096.7462 634.7884 -3.303 0.00130 **
M7 -1643.9486 632.6530 -2.598 0.01070 *
M8 -1373.4857 629.4503 -2.182 0.03131 *
M9 528.9583 631.7800 0.837 0.40434
M10 -1086.8849 631.2308 -1.722 0.08801 .
M11 -838.1047 637.9247 -1.314 0.19175
t 62.1212 9.5432 6.509 2.57e-09 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1407 on 106 degrees of freedom
Multiple R-squared: 0.7618, Adjusted R-squared: 0.7326
F-statistic: 26.08 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.735644e-02 3.471289e-02 0.9826436
[2,] 5.867446e-03 1.173489e-02 0.9941326
[3,] 1.834503e-03 3.669007e-03 0.9981655
[4,] 3.071166e-03 6.142332e-03 0.9969288
[5,] 5.013127e-03 1.002625e-02 0.9949869
[6,] 3.974582e-03 7.949164e-03 0.9960254
[7,] 5.873300e-03 1.174660e-02 0.9941267
[8,] 4.538557e-03 9.077113e-03 0.9954614
[9,] 2.586220e-03 5.172440e-03 0.9974138
[10,] 1.880493e-03 3.760985e-03 0.9981195
[11,] 5.542818e-03 1.108564e-02 0.9944572
[12,] 4.639144e-03 9.278288e-03 0.9953609
[13,] 4.767730e-03 9.535461e-03 0.9952323
[14,] 2.775281e-03 5.550563e-03 0.9972247
[15,] 2.368473e-03 4.736946e-03 0.9976315
[16,] 1.168926e-03 2.337852e-03 0.9988311
[17,] 5.671353e-04 1.134271e-03 0.9994329
[18,] 4.540860e-04 9.081720e-04 0.9995459
[19,] 2.676617e-04 5.353234e-04 0.9997323
[20,] 1.275342e-04 2.550684e-04 0.9998725
[21,] 7.731381e-05 1.546276e-04 0.9999227
[22,] 3.717570e-05 7.435140e-05 0.9999628
[23,] 1.996373e-05 3.992746e-05 0.9999800
[24,] 1.336656e-05 2.673312e-05 0.9999866
[25,] 6.788389e-06 1.357678e-05 0.9999932
[26,] 4.739957e-06 9.479914e-06 0.9999953
[27,] 2.355106e-06 4.710213e-06 0.9999976
[28,] 2.017367e-06 4.034733e-06 0.9999980
[29,] 2.672319e-06 5.344639e-06 0.9999973
[30,] 1.156752e-06 2.313505e-06 0.9999988
[31,] 3.089371e-06 6.178742e-06 0.9999969
[32,] 1.764241e-06 3.528483e-06 0.9999982
[33,] 8.650149e-07 1.730030e-06 0.9999991
[34,] 1.372968e-06 2.745937e-06 0.9999986
[35,] 7.565507e-07 1.513101e-06 0.9999992
[36,] 3.518341e-07 7.036682e-07 0.9999996
[37,] 2.347336e-07 4.694673e-07 0.9999998
[38,] 1.048478e-07 2.096956e-07 0.9999999
[39,] 8.060668e-08 1.612134e-07 0.9999999
[40,] 3.783766e-08 7.567532e-08 1.0000000
[41,] 1.965650e-08 3.931300e-08 1.0000000
[42,] 1.052043e-08 2.104085e-08 1.0000000
[43,] 1.111478e-08 2.222957e-08 1.0000000
[44,] 2.530088e-08 5.060176e-08 1.0000000
[45,] 1.394112e-08 2.788224e-08 1.0000000
[46,] 7.057227e-09 1.411445e-08 1.0000000
[47,] 4.200905e-09 8.401809e-09 1.0000000
[48,] 2.028588e-09 4.057177e-09 1.0000000
[49,] 2.129392e-09 4.258784e-09 1.0000000
[50,] 1.271711e-09 2.543422e-09 1.0000000
[51,] 5.514901e-10 1.102980e-09 1.0000000
[52,] 2.282772e-10 4.565543e-10 1.0000000
[53,] 1.494850e-10 2.989699e-10 1.0000000
[54,] 1.153075e-10 2.306150e-10 1.0000000
[55,] 5.001600e-11 1.000320e-10 1.0000000
[56,] 3.556678e-11 7.113356e-11 1.0000000
[57,] 3.798063e-11 7.596126e-11 1.0000000
[58,] 3.525110e-11 7.050220e-11 1.0000000
[59,] 3.587494e-11 7.174988e-11 1.0000000
[60,] 8.372290e-11 1.674458e-10 1.0000000
[61,] 1.378588e-10 2.757176e-10 1.0000000
[62,] 8.871255e-11 1.774251e-10 1.0000000
[63,] 4.821712e-11 9.643423e-11 1.0000000
[64,] 2.065139e-11 4.130278e-11 1.0000000
[65,] 3.265730e-11 6.531459e-11 1.0000000
[66,] 3.549465e-11 7.098930e-11 1.0000000
[67,] 2.537270e-11 5.074541e-11 1.0000000
[68,] 2.021643e-11 4.043286e-11 1.0000000
[69,] 6.629873e-11 1.325975e-10 1.0000000
[70,] 8.862942e-11 1.772588e-10 1.0000000
[71,] 1.127673e-10 2.255346e-10 1.0000000
[72,] 3.731895e-10 7.463789e-10 1.0000000
[73,] 2.231388e-10 4.462777e-10 1.0000000
[74,] 1.613915e-10 3.227831e-10 1.0000000
[75,] 1.032442e-10 2.064885e-10 1.0000000
[76,] 7.151652e-11 1.430330e-10 1.0000000
[77,] 3.156198e-11 6.312397e-11 1.0000000
[78,] 1.420678e-10 2.841356e-10 1.0000000
[79,] 6.851184e-11 1.370237e-10 1.0000000
[80,] 3.756459e-10 7.512918e-10 1.0000000
[81,] 2.646239e-08 5.292477e-08 1.0000000
[82,] 1.363340e-07 2.726679e-07 0.9999999
[83,] 1.468002e-03 2.936005e-03 0.9985320
[84,] 7.895280e-02 1.579056e-01 0.9210472
[85,] 6.069105e-01 7.861791e-01 0.3930895
[86,] 7.571880e-01 4.856239e-01 0.2428120
[87,] 8.075378e-01 3.849244e-01 0.1924622
> postscript(file="/var/www/html/rcomp/tmp/1fuu71261947035.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/2er7w1261947035.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/31bmn1261947035.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/4f2ft1261947035.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/5bjd61261947035.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
-1102.59000 -413.61231 -542.70113 -1266.60603 -577.92750 879.06435
7 8 9 10 11 12
-435.46103 726.91565 745.76515 -282.27754 1767.07760 -563.89435
13 14 15 16 17 18
-71.95758 705.45386 811.72287 1050.95806 1392.27090 1377.53404
19 20 21 22 23 24
1484.69643 1057.50322 909.90281 -42.81248 850.69478 154.73501
25 26 27 28 29 30
128.14612 268.20105 -1032.65795 -333.99401 -372.32850 -786.68199
31 32 33 34 35 36
126.96822 -288.24949 -586.19912 317.49575 236.39966 -1027.32239
37 38 39 40 41 42
-61.78747 -786.31333 -667.72173 110.97161 -704.57313 -712.80641
43 44 45 46 47 48
-159.75844 -545.26701 -1219.24626 -318.82542 -1059.48299 -1398.51557
49 50 51 52 53 54
-699.19669 -1921.32565 -881.15203 -861.74347 -1509.55891 -309.07240
55 56 57 58 59 60
-1113.71462 -664.45163 -27.23699 -16.17848 -1303.54109 306.78559
61 62 63 64 65 66
-636.60295 -513.42500 -116.08040 -442.72086 231.83013 810.43889
67 68 69 70 71 72
-442.57184 -128.71456 487.81450 726.19656 -229.33361 263.38280
73 74 75 76 77 78
-1019.24583 82.64956 571.54608 -1258.57444 1166.29189 1416.56682
79 80 81 82 83 84
418.06362 316.25994 1713.59597 -681.29308 1287.30727 752.81196
85 86 87 88 89 90
-422.56919 394.85171 96.16568 209.98294 1277.32589 -17.17597
91 92 93 94 95 96
1118.27861 442.34440 1281.50316 9.88717 934.64211 1083.03642
97 98 99 100 101 102
945.80926 1195.89649 -231.20691 1678.12715 1353.83719 -242.56806
103 104 105 106 107 108
2338.94015 2258.76807 520.55916 3671.44651 1684.41816 3414.68953
109 110 111 112 113 114
2939.99433 987.62363 1992.08553 1113.59904 -2257.16795 -2415.29926
115 116 117 118 119 120
-3335.44110 -3175.10858 -3826.45838 -3383.63899 -4168.18190 -2985.70899
> postscript(file="/var/www/html/rcomp/tmp/64ouq1261947035.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 -1102.59000 NA
1 -413.61231 -1102.59000
2 -542.70113 -413.61231
3 -1266.60603 -542.70113
4 -577.92750 -1266.60603
5 879.06435 -577.92750
6 -435.46103 879.06435
7 726.91565 -435.46103
8 745.76515 726.91565
9 -282.27754 745.76515
10 1767.07760 -282.27754
11 -563.89435 1767.07760
12 -71.95758 -563.89435
13 705.45386 -71.95758
14 811.72287 705.45386
15 1050.95806 811.72287
16 1392.27090 1050.95806
17 1377.53404 1392.27090
18 1484.69643 1377.53404
19 1057.50322 1484.69643
20 909.90281 1057.50322
21 -42.81248 909.90281
22 850.69478 -42.81248
23 154.73501 850.69478
24 128.14612 154.73501
25 268.20105 128.14612
26 -1032.65795 268.20105
27 -333.99401 -1032.65795
28 -372.32850 -333.99401
29 -786.68199 -372.32850
30 126.96822 -786.68199
31 -288.24949 126.96822
32 -586.19912 -288.24949
33 317.49575 -586.19912
34 236.39966 317.49575
35 -1027.32239 236.39966
36 -61.78747 -1027.32239
37 -786.31333 -61.78747
38 -667.72173 -786.31333
39 110.97161 -667.72173
40 -704.57313 110.97161
41 -712.80641 -704.57313
42 -159.75844 -712.80641
43 -545.26701 -159.75844
44 -1219.24626 -545.26701
45 -318.82542 -1219.24626
46 -1059.48299 -318.82542
47 -1398.51557 -1059.48299
48 -699.19669 -1398.51557
49 -1921.32565 -699.19669
50 -881.15203 -1921.32565
51 -861.74347 -881.15203
52 -1509.55891 -861.74347
53 -309.07240 -1509.55891
54 -1113.71462 -309.07240
55 -664.45163 -1113.71462
56 -27.23699 -664.45163
57 -16.17848 -27.23699
58 -1303.54109 -16.17848
59 306.78559 -1303.54109
60 -636.60295 306.78559
61 -513.42500 -636.60295
62 -116.08040 -513.42500
63 -442.72086 -116.08040
64 231.83013 -442.72086
65 810.43889 231.83013
66 -442.57184 810.43889
67 -128.71456 -442.57184
68 487.81450 -128.71456
69 726.19656 487.81450
70 -229.33361 726.19656
71 263.38280 -229.33361
72 -1019.24583 263.38280
73 82.64956 -1019.24583
74 571.54608 82.64956
75 -1258.57444 571.54608
76 1166.29189 -1258.57444
77 1416.56682 1166.29189
78 418.06362 1416.56682
79 316.25994 418.06362
80 1713.59597 316.25994
81 -681.29308 1713.59597
82 1287.30727 -681.29308
83 752.81196 1287.30727
84 -422.56919 752.81196
85 394.85171 -422.56919
86 96.16568 394.85171
87 209.98294 96.16568
88 1277.32589 209.98294
89 -17.17597 1277.32589
90 1118.27861 -17.17597
91 442.34440 1118.27861
92 1281.50316 442.34440
93 9.88717 1281.50316
94 934.64211 9.88717
95 1083.03642 934.64211
96 945.80926 1083.03642
97 1195.89649 945.80926
98 -231.20691 1195.89649
99 1678.12715 -231.20691
100 1353.83719 1678.12715
101 -242.56806 1353.83719
102 2338.94015 -242.56806
103 2258.76807 2338.94015
104 520.55916 2258.76807
105 3671.44651 520.55916
106 1684.41816 3671.44651
107 3414.68953 1684.41816
108 2939.99433 3414.68953
109 987.62363 2939.99433
110 1992.08553 987.62363
111 1113.59904 1992.08553
112 -2257.16795 1113.59904
113 -2415.29926 -2257.16795
114 -3335.44110 -2415.29926
115 -3175.10858 -3335.44110
116 -3826.45838 -3175.10858
117 -3383.63899 -3826.45838
118 -4168.18190 -3383.63899
119 -2985.70899 -4168.18190
120 NA -2985.70899
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -413.61231 -1102.59000
[2,] -542.70113 -413.61231
[3,] -1266.60603 -542.70113
[4,] -577.92750 -1266.60603
[5,] 879.06435 -577.92750
[6,] -435.46103 879.06435
[7,] 726.91565 -435.46103
[8,] 745.76515 726.91565
[9,] -282.27754 745.76515
[10,] 1767.07760 -282.27754
[11,] -563.89435 1767.07760
[12,] -71.95758 -563.89435
[13,] 705.45386 -71.95758
[14,] 811.72287 705.45386
[15,] 1050.95806 811.72287
[16,] 1392.27090 1050.95806
[17,] 1377.53404 1392.27090
[18,] 1484.69643 1377.53404
[19,] 1057.50322 1484.69643
[20,] 909.90281 1057.50322
[21,] -42.81248 909.90281
[22,] 850.69478 -42.81248
[23,] 154.73501 850.69478
[24,] 128.14612 154.73501
[25,] 268.20105 128.14612
[26,] -1032.65795 268.20105
[27,] -333.99401 -1032.65795
[28,] -372.32850 -333.99401
[29,] -786.68199 -372.32850
[30,] 126.96822 -786.68199
[31,] -288.24949 126.96822
[32,] -586.19912 -288.24949
[33,] 317.49575 -586.19912
[34,] 236.39966 317.49575
[35,] -1027.32239 236.39966
[36,] -61.78747 -1027.32239
[37,] -786.31333 -61.78747
[38,] -667.72173 -786.31333
[39,] 110.97161 -667.72173
[40,] -704.57313 110.97161
[41,] -712.80641 -704.57313
[42,] -159.75844 -712.80641
[43,] -545.26701 -159.75844
[44,] -1219.24626 -545.26701
[45,] -318.82542 -1219.24626
[46,] -1059.48299 -318.82542
[47,] -1398.51557 -1059.48299
[48,] -699.19669 -1398.51557
[49,] -1921.32565 -699.19669
[50,] -881.15203 -1921.32565
[51,] -861.74347 -881.15203
[52,] -1509.55891 -861.74347
[53,] -309.07240 -1509.55891
[54,] -1113.71462 -309.07240
[55,] -664.45163 -1113.71462
[56,] -27.23699 -664.45163
[57,] -16.17848 -27.23699
[58,] -1303.54109 -16.17848
[59,] 306.78559 -1303.54109
[60,] -636.60295 306.78559
[61,] -513.42500 -636.60295
[62,] -116.08040 -513.42500
[63,] -442.72086 -116.08040
[64,] 231.83013 -442.72086
[65,] 810.43889 231.83013
[66,] -442.57184 810.43889
[67,] -128.71456 -442.57184
[68,] 487.81450 -128.71456
[69,] 726.19656 487.81450
[70,] -229.33361 726.19656
[71,] 263.38280 -229.33361
[72,] -1019.24583 263.38280
[73,] 82.64956 -1019.24583
[74,] 571.54608 82.64956
[75,] -1258.57444 571.54608
[76,] 1166.29189 -1258.57444
[77,] 1416.56682 1166.29189
[78,] 418.06362 1416.56682
[79,] 316.25994 418.06362
[80,] 1713.59597 316.25994
[81,] -681.29308 1713.59597
[82,] 1287.30727 -681.29308
[83,] 752.81196 1287.30727
[84,] -422.56919 752.81196
[85,] 394.85171 -422.56919
[86,] 96.16568 394.85171
[87,] 209.98294 96.16568
[88,] 1277.32589 209.98294
[89,] -17.17597 1277.32589
[90,] 1118.27861 -17.17597
[91,] 442.34440 1118.27861
[92,] 1281.50316 442.34440
[93,] 9.88717 1281.50316
[94,] 934.64211 9.88717
[95,] 1083.03642 934.64211
[96,] 945.80926 1083.03642
[97,] 1195.89649 945.80926
[98,] -231.20691 1195.89649
[99,] 1678.12715 -231.20691
[100,] 1353.83719 1678.12715
[101,] -242.56806 1353.83719
[102,] 2338.94015 -242.56806
[103,] 2258.76807 2338.94015
[104,] 520.55916 2258.76807
[105,] 3671.44651 520.55916
[106,] 1684.41816 3671.44651
[107,] 3414.68953 1684.41816
[108,] 2939.99433 3414.68953
[109,] 987.62363 2939.99433
[110,] 1992.08553 987.62363
[111,] 1113.59904 1992.08553
[112,] -2257.16795 1113.59904
[113,] -2415.29926 -2257.16795
[114,] -3335.44110 -2415.29926
[115,] -3175.10858 -3335.44110
[116,] -3826.45838 -3175.10858
[117,] -3383.63899 -3826.45838
[118,] -4168.18190 -3383.63899
[119,] -2985.70899 -4168.18190
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -413.61231 -1102.59000
2 -542.70113 -413.61231
3 -1266.60603 -542.70113
4 -577.92750 -1266.60603
5 879.06435 -577.92750
6 -435.46103 879.06435
7 726.91565 -435.46103
8 745.76515 726.91565
9 -282.27754 745.76515
10 1767.07760 -282.27754
11 -563.89435 1767.07760
12 -71.95758 -563.89435
13 705.45386 -71.95758
14 811.72287 705.45386
15 1050.95806 811.72287
16 1392.27090 1050.95806
17 1377.53404 1392.27090
18 1484.69643 1377.53404
19 1057.50322 1484.69643
20 909.90281 1057.50322
21 -42.81248 909.90281
22 850.69478 -42.81248
23 154.73501 850.69478
24 128.14612 154.73501
25 268.20105 128.14612
26 -1032.65795 268.20105
27 -333.99401 -1032.65795
28 -372.32850 -333.99401
29 -786.68199 -372.32850
30 126.96822 -786.68199
31 -288.24949 126.96822
32 -586.19912 -288.24949
33 317.49575 -586.19912
34 236.39966 317.49575
35 -1027.32239 236.39966
36 -61.78747 -1027.32239
37 -786.31333 -61.78747
38 -667.72173 -786.31333
39 110.97161 -667.72173
40 -704.57313 110.97161
41 -712.80641 -704.57313
42 -159.75844 -712.80641
43 -545.26701 -159.75844
44 -1219.24626 -545.26701
45 -318.82542 -1219.24626
46 -1059.48299 -318.82542
47 -1398.51557 -1059.48299
48 -699.19669 -1398.51557
49 -1921.32565 -699.19669
50 -881.15203 -1921.32565
51 -861.74347 -881.15203
52 -1509.55891 -861.74347
53 -309.07240 -1509.55891
54 -1113.71462 -309.07240
55 -664.45163 -1113.71462
56 -27.23699 -664.45163
57 -16.17848 -27.23699
58 -1303.54109 -16.17848
59 306.78559 -1303.54109
60 -636.60295 306.78559
61 -513.42500 -636.60295
62 -116.08040 -513.42500
63 -442.72086 -116.08040
64 231.83013 -442.72086
65 810.43889 231.83013
66 -442.57184 810.43889
67 -128.71456 -442.57184
68 487.81450 -128.71456
69 726.19656 487.81450
70 -229.33361 726.19656
71 263.38280 -229.33361
72 -1019.24583 263.38280
73 82.64956 -1019.24583
74 571.54608 82.64956
75 -1258.57444 571.54608
76 1166.29189 -1258.57444
77 1416.56682 1166.29189
78 418.06362 1416.56682
79 316.25994 418.06362
80 1713.59597 316.25994
81 -681.29308 1713.59597
82 1287.30727 -681.29308
83 752.81196 1287.30727
84 -422.56919 752.81196
85 394.85171 -422.56919
86 96.16568 394.85171
87 209.98294 96.16568
88 1277.32589 209.98294
89 -17.17597 1277.32589
90 1118.27861 -17.17597
91 442.34440 1118.27861
92 1281.50316 442.34440
93 9.88717 1281.50316
94 934.64211 9.88717
95 1083.03642 934.64211
96 945.80926 1083.03642
97 1195.89649 945.80926
98 -231.20691 1195.89649
99 1678.12715 -231.20691
100 1353.83719 1678.12715
101 -242.56806 1353.83719
102 2338.94015 -242.56806
103 2258.76807 2338.94015
104 520.55916 2258.76807
105 3671.44651 520.55916
106 1684.41816 3671.44651
107 3414.68953 1684.41816
108 2939.99433 3414.68953
109 987.62363 2939.99433
110 1992.08553 987.62363
111 1113.59904 1992.08553
112 -2257.16795 1113.59904
113 -2415.29926 -2257.16795
114 -3335.44110 -2415.29926
115 -3175.10858 -3335.44110
116 -3826.45838 -3175.10858
117 -3383.63899 -3826.45838
118 -4168.18190 -3383.63899
119 -2985.70899 -4168.18190
> 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/7jevj1261947035.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/8kvpd1261947035.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/9ev3l1261947035.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/103ain1261947035.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/11ord11261947035.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/120xyg1261947035.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/13mm111261947035.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/14c7fr1261947035.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/154m1m1261947035.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/16zass1261947035.tab")
+ }
> try(system("convert tmp/1fuu71261947035.ps tmp/1fuu71261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/2er7w1261947035.ps tmp/2er7w1261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/31bmn1261947035.ps tmp/31bmn1261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/4f2ft1261947035.ps tmp/4f2ft1261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/5bjd61261947035.ps tmp/5bjd61261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/64ouq1261947035.ps tmp/64ouq1261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/7jevj1261947035.ps tmp/7jevj1261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/8kvpd1261947035.ps tmp/8kvpd1261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/9ev3l1261947035.ps tmp/9ev3l1261947035.png",intern=TRUE))
character(0)
> try(system("convert tmp/103ain1261947035.ps tmp/103ain1261947035.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.358 1.653 5.495