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(7787.0
+ ,0
+ ,8474.2
+ ,0
+ ,9154.7
+ ,0
+ ,8557.2
+ ,0
+ ,7951.1
+ ,0
+ ,9156.7
+ ,0
+ ,7865.7
+ ,0
+ ,7337.4
+ ,0
+ ,9131.7
+ ,0
+ ,8814.6
+ ,0
+ ,8598.8
+ ,0
+ ,8439.6
+ ,0
+ ,7451.8
+ ,0
+ ,8016.2
+ ,0
+ ,9544.1
+ ,0
+ ,8270.7
+ ,0
+ ,8102.2
+ ,0
+ ,9369.0
+ ,0
+ ,7657.7
+ ,0
+ ,7816.6
+ ,0
+ ,9391.3
+ ,0
+ ,9445.4
+ ,0
+ ,9533.1
+ ,0
+ ,10068.7
+ ,0
+ ,8955.5
+ ,0
+ ,10423.9
+ ,0
+ ,11617.2
+ ,0
+ ,9391.1
+ ,0
+ ,10872.0
+ ,0
+ ,10230.4
+ ,0
+ ,9221.0
+ ,0
+ ,9428.6
+ ,0
+ ,10934.5
+ ,0
+ ,10986.0
+ ,0
+ ,11724.6
+ ,0
+ ,11180.9
+ ,0
+ ,11163.2
+ ,0
+ ,11240.9
+ ,0
+ ,12107.1
+ ,0
+ ,10762.3
+ ,0
+ ,11340.4
+ ,0
+ ,11266.8
+ ,0
+ ,9542.7
+ ,0
+ ,9227.7
+ ,0
+ ,10571.9
+ ,1
+ ,10774.4
+ ,1
+ ,10392.8
+ ,1
+ ,9920.2
+ ,1
+ ,9884.9
+ ,1
+ ,10174.5
+ ,1
+ ,11395.4
+ ,1
+ ,10760.2
+ ,1
+ ,10570.1
+ ,1
+ ,10536.0
+ ,1
+ ,9902.6
+ ,1
+ ,8889.0
+ ,1
+ ,10837.3
+ ,1
+ ,11624.1
+ ,1
+ ,10509.0
+ ,1
+ ,10984.9
+ ,1
+ ,10649.1
+ ,1
+ ,10855.7
+ ,1
+ ,11677.4
+ ,1
+ ,10760.2
+ ,1
+ ,10046.2
+ ,1
+ ,10772.8
+ ,1
+ ,9987.7
+ ,1
+ ,8638.7
+ ,1
+ ,11063.7
+ ,1
+ ,11855.7
+ ,1
+ ,10684.5
+ ,1
+ ,11337.4
+ ,1
+ ,10478.0
+ ,1
+ ,11123.9
+ ,1
+ ,12909.3
+ ,1
+ ,11339.9
+ ,1
+ ,10462.2
+ ,1
+ ,12733.5
+ ,1
+ ,10519.2
+ ,1
+ ,10414.9
+ ,1
+ ,12476.8
+ ,1
+ ,12384.6
+ ,1
+ ,12266.7
+ ,1
+ ,12919.9
+ ,1
+ ,11497.3
+ ,1
+ ,12142.0
+ ,1
+ ,13919.4
+ ,1
+ ,12656.8
+ ,1
+ ,12034.1
+ ,1
+ ,13199.7
+ ,1
+ ,10881.3
+ ,1
+ ,11301.2
+ ,1
+ ,13643.9
+ ,1
+ ,12517.0
+ ,1
+ ,13981.1
+ ,1
+ ,14275.7
+ ,1
+ ,13435.0
+ ,1
+ ,13565.7
+ ,1
+ ,16216.3
+ ,1
+ ,12970.0
+ ,1
+ ,14079.9
+ ,1
+ ,14235.0
+ ,1
+ ,12213.4
+ ,1
+ ,12581.0
+ ,1
+ ,14130.4
+ ,1
+ ,14210.8
+ ,1
+ ,14378.5
+ ,1
+ ,13142.8
+ ,1
+ ,13714.7
+ ,1
+ ,13621.9
+ ,1
+ ,15379.8
+ ,1
+ ,13306.3
+ ,1
+ ,14391.2
+ ,1
+ ,14909.9
+ ,1
+ ,14025.4
+ ,1
+ ,12951.2
+ ,1
+ ,14344.3
+ ,1
+ ,16093.4
+ ,1
+ ,15413.6
+ ,1
+ ,14705.7
+ ,1
+ ,15972.8
+ ,1
+ ,16241.4
+ ,1
+ ,16626.4
+ ,1
+ ,17136.2
+ ,1
+ ,15622.9
+ ,1
+ ,18003.9
+ ,1
+ ,16136.1
+ ,1
+ ,14423.7
+ ,1
+ ,16789.4
+ ,1
+ ,16782.2
+ ,1
+ ,14133.8
+ ,1
+ ,12607
+ ,1)
+ ,dim=c(2
+ ,132)
+ ,dimnames=list(c('Invoer'
+ ,'Dummie')
+ ,1:132))
> y <- array(NA,dim=c(2,132),dimnames=list(c('Invoer','Dummie'),1:132))
> 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
Invoer Dummie M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 7787.0 0 1 0 0 0 0 0 0 0 0 0 0 1
2 8474.2 0 0 1 0 0 0 0 0 0 0 0 0 2
3 9154.7 0 0 0 1 0 0 0 0 0 0 0 0 3
4 8557.2 0 0 0 0 1 0 0 0 0 0 0 0 4
5 7951.1 0 0 0 0 0 1 0 0 0 0 0 0 5
6 9156.7 0 0 0 0 0 0 1 0 0 0 0 0 6
7 7865.7 0 0 0 0 0 0 0 1 0 0 0 0 7
8 7337.4 0 0 0 0 0 0 0 0 1 0 0 0 8
9 9131.7 0 0 0 0 0 0 0 0 0 1 0 0 9
10 8814.6 0 0 0 0 0 0 0 0 0 0 1 0 10
11 8598.8 0 0 0 0 0 0 0 0 0 0 0 1 11
12 8439.6 0 0 0 0 0 0 0 0 0 0 0 0 12
13 7451.8 0 1 0 0 0 0 0 0 0 0 0 0 13
14 8016.2 0 0 1 0 0 0 0 0 0 0 0 0 14
15 9544.1 0 0 0 1 0 0 0 0 0 0 0 0 15
16 8270.7 0 0 0 0 1 0 0 0 0 0 0 0 16
17 8102.2 0 0 0 0 0 1 0 0 0 0 0 0 17
18 9369.0 0 0 0 0 0 0 1 0 0 0 0 0 18
19 7657.7 0 0 0 0 0 0 0 1 0 0 0 0 19
20 7816.6 0 0 0 0 0 0 0 0 1 0 0 0 20
21 9391.3 0 0 0 0 0 0 0 0 0 1 0 0 21
22 9445.4 0 0 0 0 0 0 0 0 0 0 1 0 22
23 9533.1 0 0 0 0 0 0 0 0 0 0 0 1 23
24 10068.7 0 0 0 0 0 0 0 0 0 0 0 0 24
25 8955.5 0 1 0 0 0 0 0 0 0 0 0 0 25
26 10423.9 0 0 1 0 0 0 0 0 0 0 0 0 26
27 11617.2 0 0 0 1 0 0 0 0 0 0 0 0 27
28 9391.1 0 0 0 0 1 0 0 0 0 0 0 0 28
29 10872.0 0 0 0 0 0 1 0 0 0 0 0 0 29
30 10230.4 0 0 0 0 0 0 1 0 0 0 0 0 30
31 9221.0 0 0 0 0 0 0 0 1 0 0 0 0 31
32 9428.6 0 0 0 0 0 0 0 0 1 0 0 0 32
33 10934.5 0 0 0 0 0 0 0 0 0 1 0 0 33
34 10986.0 0 0 0 0 0 0 0 0 0 0 1 0 34
35 11724.6 0 0 0 0 0 0 0 0 0 0 0 1 35
36 11180.9 0 0 0 0 0 0 0 0 0 0 0 0 36
37 11163.2 0 1 0 0 0 0 0 0 0 0 0 0 37
38 11240.9 0 0 1 0 0 0 0 0 0 0 0 0 38
39 12107.1 0 0 0 1 0 0 0 0 0 0 0 0 39
40 10762.3 0 0 0 0 1 0 0 0 0 0 0 0 40
41 11340.4 0 0 0 0 0 1 0 0 0 0 0 0 41
42 11266.8 0 0 0 0 0 0 1 0 0 0 0 0 42
43 9542.7 0 0 0 0 0 0 0 1 0 0 0 0 43
44 9227.7 0 0 0 0 0 0 0 0 1 0 0 0 44
45 10571.9 1 0 0 0 0 0 0 0 0 1 0 0 45
46 10774.4 1 0 0 0 0 0 0 0 0 0 1 0 46
47 10392.8 1 0 0 0 0 0 0 0 0 0 0 1 47
48 9920.2 1 0 0 0 0 0 0 0 0 0 0 0 48
49 9884.9 1 1 0 0 0 0 0 0 0 0 0 0 49
50 10174.5 1 0 1 0 0 0 0 0 0 0 0 0 50
51 11395.4 1 0 0 1 0 0 0 0 0 0 0 0 51
52 10760.2 1 0 0 0 1 0 0 0 0 0 0 0 52
53 10570.1 1 0 0 0 0 1 0 0 0 0 0 0 53
54 10536.0 1 0 0 0 0 0 1 0 0 0 0 0 54
55 9902.6 1 0 0 0 0 0 0 1 0 0 0 0 55
56 8889.0 1 0 0 0 0 0 0 0 1 0 0 0 56
57 10837.3 1 0 0 0 0 0 0 0 0 1 0 0 57
58 11624.1 1 0 0 0 0 0 0 0 0 0 1 0 58
59 10509.0 1 0 0 0 0 0 0 0 0 0 0 1 59
60 10984.9 1 0 0 0 0 0 0 0 0 0 0 0 60
61 10649.1 1 1 0 0 0 0 0 0 0 0 0 0 61
62 10855.7 1 0 1 0 0 0 0 0 0 0 0 0 62
63 11677.4 1 0 0 1 0 0 0 0 0 0 0 0 63
64 10760.2 1 0 0 0 1 0 0 0 0 0 0 0 64
65 10046.2 1 0 0 0 0 1 0 0 0 0 0 0 65
66 10772.8 1 0 0 0 0 0 1 0 0 0 0 0 66
67 9987.7 1 0 0 0 0 0 0 1 0 0 0 0 67
68 8638.7 1 0 0 0 0 0 0 0 1 0 0 0 68
69 11063.7 1 0 0 0 0 0 0 0 0 1 0 0 69
70 11855.7 1 0 0 0 0 0 0 0 0 0 1 0 70
71 10684.5 1 0 0 0 0 0 0 0 0 0 0 1 71
72 11337.4 1 0 0 0 0 0 0 0 0 0 0 0 72
73 10478.0 1 1 0 0 0 0 0 0 0 0 0 0 73
74 11123.9 1 0 1 0 0 0 0 0 0 0 0 0 74
75 12909.3 1 0 0 1 0 0 0 0 0 0 0 0 75
76 11339.9 1 0 0 0 1 0 0 0 0 0 0 0 76
77 10462.2 1 0 0 0 0 1 0 0 0 0 0 0 77
78 12733.5 1 0 0 0 0 0 1 0 0 0 0 0 78
79 10519.2 1 0 0 0 0 0 0 1 0 0 0 0 79
80 10414.9 1 0 0 0 0 0 0 0 1 0 0 0 80
81 12476.8 1 0 0 0 0 0 0 0 0 1 0 0 81
82 12384.6 1 0 0 0 0 0 0 0 0 0 1 0 82
83 12266.7 1 0 0 0 0 0 0 0 0 0 0 1 83
84 12919.9 1 0 0 0 0 0 0 0 0 0 0 0 84
85 11497.3 1 1 0 0 0 0 0 0 0 0 0 0 85
86 12142.0 1 0 1 0 0 0 0 0 0 0 0 0 86
87 13919.4 1 0 0 1 0 0 0 0 0 0 0 0 87
88 12656.8 1 0 0 0 1 0 0 0 0 0 0 0 88
89 12034.1 1 0 0 0 0 1 0 0 0 0 0 0 89
90 13199.7 1 0 0 0 0 0 1 0 0 0 0 0 90
91 10881.3 1 0 0 0 0 0 0 1 0 0 0 0 91
92 11301.2 1 0 0 0 0 0 0 0 1 0 0 0 92
93 13643.9 1 0 0 0 0 0 0 0 0 1 0 0 93
94 12517.0 1 0 0 0 0 0 0 0 0 0 1 0 94
95 13981.1 1 0 0 0 0 0 0 0 0 0 0 1 95
96 14275.7 1 0 0 0 0 0 0 0 0 0 0 0 96
97 13435.0 1 1 0 0 0 0 0 0 0 0 0 0 97
98 13565.7 1 0 1 0 0 0 0 0 0 0 0 0 98
99 16216.3 1 0 0 1 0 0 0 0 0 0 0 0 99
100 12970.0 1 0 0 0 1 0 0 0 0 0 0 0 100
101 14079.9 1 0 0 0 0 1 0 0 0 0 0 0 101
102 14235.0 1 0 0 0 0 0 1 0 0 0 0 0 102
103 12213.4 1 0 0 0 0 0 0 1 0 0 0 0 103
104 12581.0 1 0 0 0 0 0 0 0 1 0 0 0 104
105 14130.4 1 0 0 0 0 0 0 0 0 1 0 0 105
106 14210.8 1 0 0 0 0 0 0 0 0 0 1 0 106
107 14378.5 1 0 0 0 0 0 0 0 0 0 0 1 107
108 13142.8 1 0 0 0 0 0 0 0 0 0 0 0 108
109 13714.7 1 1 0 0 0 0 0 0 0 0 0 0 109
110 13621.9 1 0 1 0 0 0 0 0 0 0 0 0 110
111 15379.8 1 0 0 1 0 0 0 0 0 0 0 0 111
112 13306.3 1 0 0 0 1 0 0 0 0 0 0 0 112
113 14391.2 1 0 0 0 0 1 0 0 0 0 0 0 113
114 14909.9 1 0 0 0 0 0 1 0 0 0 0 0 114
115 14025.4 1 0 0 0 0 0 0 1 0 0 0 0 115
116 12951.2 1 0 0 0 0 0 0 0 1 0 0 0 116
117 14344.3 1 0 0 0 0 0 0 0 0 1 0 0 117
118 16093.4 1 0 0 0 0 0 0 0 0 0 1 0 118
119 15413.6 1 0 0 0 0 0 0 0 0 0 0 1 119
120 14705.7 1 0 0 0 0 0 0 0 0 0 0 0 120
121 15972.8 1 1 0 0 0 0 0 0 0 0 0 0 121
122 16241.4 1 0 1 0 0 0 0 0 0 0 0 0 122
123 16626.4 1 0 0 1 0 0 0 0 0 0 0 0 123
124 17136.2 1 0 0 0 1 0 0 0 0 0 0 0 124
125 15622.9 1 0 0 0 0 1 0 0 0 0 0 0 125
126 18003.9 1 0 0 0 0 0 1 0 0 0 0 0 126
127 16136.1 1 0 0 0 0 0 0 1 0 0 0 0 127
128 14423.7 1 0 0 0 0 0 0 0 1 0 0 0 128
129 16789.4 1 0 0 0 0 0 0 0 0 1 0 0 129
130 16782.2 1 0 0 0 0 0 0 0 0 0 1 0 130
131 14133.8 1 0 0 0 0 0 0 0 0 0 0 1 131
132 12607.0 1 0 0 0 0 0 0 0 0 0 0 0 132
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Dummie M1 M2 M3 M4
7685.64 -1757.34 -120.16 249.86 1508.58 103.40
M5 M6 M7 M8 M9 M10
-11.10 727.14 -843.93 -1367.89 563.17 686.10
M11 t
259.50 74.62
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-3171.219 -431.786 -3.397 420.940 1946.267
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7685.635 252.046 30.493 < 2e-16 ***
Dummie -1757.344 235.444 -7.464 1.57e-11 ***
M1 -120.159 313.208 -0.384 0.70194
M2 249.857 313.086 0.798 0.42645
M3 1508.582 312.991 4.820 4.32e-06 ***
M4 103.398 312.923 0.330 0.74166
M5 -11.096 312.883 -0.035 0.97177
M6 727.138 312.869 2.324 0.02183 *
M7 -843.928 312.883 -2.697 0.00802 **
M8 -1367.894 312.923 -4.371 2.67e-05 ***
M9 563.171 312.747 1.801 0.07430 .
M10 686.096 312.679 2.194 0.03018 *
M11 259.502 312.639 0.830 0.40819
t 74.621 2.913 25.619 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 733.2 on 118 degrees of freedom
Multiple R-squared: 0.9177, Adjusted R-squared: 0.9086
F-statistic: 101.2 on 13 and 118 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,] 7.183521e-02 1.436704e-01 0.9281648
[2,] 2.964631e-02 5.929263e-02 0.9703537
[3,] 9.871261e-03 1.974252e-02 0.9901287
[4,] 7.508663e-03 1.501733e-02 0.9924913
[5,] 2.984834e-03 5.969668e-03 0.9970152
[6,] 2.775078e-03 5.550156e-03 0.9972249
[7,] 4.692968e-03 9.385935e-03 0.9953070
[8,] 2.953644e-02 5.907287e-02 0.9704636
[9,] 3.551368e-02 7.102735e-02 0.9644863
[10,] 1.085614e-01 2.171229e-01 0.8914386
[11,] 1.725302e-01 3.450604e-01 0.8274698
[12,] 1.264412e-01 2.528824e-01 0.8735588
[13,] 2.737090e-01 5.474180e-01 0.7262910
[14,] 2.207421e-01 4.414842e-01 0.7792579
[15,] 1.689244e-01 3.378488e-01 0.8310756
[16,] 1.438153e-01 2.876306e-01 0.8561847
[17,] 1.098277e-01 2.196553e-01 0.8901723
[18,] 8.771869e-02 1.754374e-01 0.9122813
[19,] 1.243527e-01 2.487053e-01 0.8756473
[20,] 1.039817e-01 2.079634e-01 0.8960183
[21,] 1.231610e-01 2.463219e-01 0.8768390
[22,] 9.485982e-02 1.897196e-01 0.9051402
[23,] 6.917277e-02 1.383455e-01 0.9308272
[24,] 4.926562e-02 9.853125e-02 0.9507344
[25,] 3.913462e-02 7.826924e-02 0.9608654
[26,] 2.945945e-02 5.891890e-02 0.9705406
[27,] 2.721397e-02 5.442794e-02 0.9727860
[28,] 2.941070e-02 5.882141e-02 0.9705893
[29,] 2.179516e-02 4.359032e-02 0.9782048
[30,] 1.604067e-02 3.208133e-02 0.9839593
[31,] 1.302772e-02 2.605544e-02 0.9869723
[32,] 1.142581e-02 2.285162e-02 0.9885742
[33,] 7.761811e-03 1.552362e-02 0.9922382
[34,] 5.679392e-03 1.135878e-02 0.9943206
[35,] 3.711443e-03 7.422886e-03 0.9962886
[36,] 3.316037e-03 6.632073e-03 0.9966840
[37,] 2.579345e-03 5.158690e-03 0.9974207
[38,] 1.864347e-03 3.728693e-03 0.9981357
[39,] 1.478240e-03 2.956480e-03 0.9985218
[40,] 1.177135e-03 2.354269e-03 0.9988229
[41,] 8.865467e-04 1.773093e-03 0.9991135
[42,] 7.303365e-04 1.460673e-03 0.9992697
[43,] 7.762933e-04 1.552587e-03 0.9992237
[44,] 7.137788e-04 1.427558e-03 0.9992862
[45,] 4.760663e-04 9.521325e-04 0.9995239
[46,] 3.612418e-04 7.224837e-04 0.9996388
[47,] 3.190783e-04 6.381565e-04 0.9996809
[48,] 2.151058e-04 4.302116e-04 0.9997849
[49,] 4.143946e-04 8.287893e-04 0.9995856
[50,] 4.682355e-04 9.364711e-04 0.9995318
[51,] 3.049844e-04 6.099687e-04 0.9996950
[52,] 6.350083e-04 1.270017e-03 0.9993650
[53,] 5.804459e-04 1.160892e-03 0.9994196
[54,] 3.765082e-04 7.530164e-04 0.9996235
[55,] 4.875566e-04 9.751132e-04 0.9995124
[56,] 3.889558e-04 7.779117e-04 0.9996110
[57,] 3.653423e-04 7.306846e-04 0.9996347
[58,] 2.785845e-04 5.571689e-04 0.9997214
[59,] 1.659058e-04 3.318117e-04 0.9998341
[60,] 1.017145e-04 2.034289e-04 0.9998983
[61,] 1.920078e-04 3.840156e-04 0.9998080
[62,] 1.441777e-04 2.883553e-04 0.9998558
[63,] 9.251432e-05 1.850286e-04 0.9999075
[64,] 5.222645e-05 1.044529e-04 0.9999478
[65,] 2.921282e-05 5.842563e-05 0.9999708
[66,] 1.665907e-05 3.331815e-05 0.9999833
[67,] 8.998409e-06 1.799682e-05 0.9999910
[68,] 1.618575e-05 3.237149e-05 0.9999838
[69,] 1.197397e-05 2.394795e-05 0.9999880
[70,] 6.825022e-06 1.365004e-05 0.9999932
[71,] 3.836228e-06 7.672457e-06 0.9999962
[72,] 2.066860e-06 4.133721e-06 0.9999979
[73,] 1.284007e-06 2.568014e-06 0.9999987
[74,] 7.426344e-07 1.485269e-06 0.9999993
[75,] 1.131892e-06 2.263784e-06 0.9999989
[76,] 5.571199e-07 1.114240e-06 0.9999994
[77,] 3.110019e-07 6.220039e-07 0.9999997
[78,] 6.105441e-07 1.221088e-06 0.9999994
[79,] 7.781849e-07 1.556370e-06 0.9999992
[80,] 2.075099e-05 4.150198e-05 0.9999792
[81,] 1.423680e-05 2.847360e-05 0.9999858
[82,] 7.492260e-06 1.498452e-05 0.9999925
[83,] 6.648571e-05 1.329714e-04 0.9999335
[84,] 4.090271e-05 8.180542e-05 0.9999591
[85,] 3.740973e-05 7.481946e-05 0.9999626
[86,] 2.064118e-05 4.128235e-05 0.9999794
[87,] 2.024970e-05 4.049940e-05 0.9999798
[88,] 1.145803e-05 2.291605e-05 0.9999885
[89,] 5.361755e-06 1.072351e-05 0.9999946
[90,] 2.732376e-06 5.464753e-06 0.9999973
[91,] 3.053131e-06 6.106262e-06 0.9999969
[92,] 9.026656e-06 1.805331e-05 0.9999910
[93,] 4.885553e-06 9.771106e-06 0.9999951
[94,] 4.543520e-06 9.087039e-06 0.9999955
[95,] 1.676661e-06 3.353323e-06 0.9999983
[96,] 2.773489e-05 5.546978e-05 0.9999723
[97,] 1.029074e-05 2.058147e-05 0.9999897
[98,] 7.056003e-05 1.411201e-04 0.9999294
[99,] 1.408489e-04 2.816979e-04 0.9998592
> postscript(file="/var/www/html/rcomp/tmp/1jruc1260790827.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/2m7kt1260790827.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/3zagz1260790827.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/4jg9o1260790827.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/5hvf91260790827.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 = 132
Frequency = 1
1 2 3 4 5 6
146.902841 389.466477 -263.378977 469.684659 -96.542614 296.202841
7 8 9 10 11 12
501.648295 422.693750 211.307955 -303.337500 -167.164773 -141.482955
13 14 15 16 17 18
-1083.745114 -963.981477 -769.426932 -712.263295 -840.890568 -386.945114
19 20 21 22 23 24
-601.799659 6.445795 -424.540000 -567.985455 -128.312727 592.169091
25 26 27 28 29 30
-475.493068 548.270568 408.225114 -487.311250 1033.461477 -420.993068
31 32 33 34 35 36
66.052386 722.997841 223.212045 77.166591 1167.739318 808.921136
37 38 39 40 41 42
836.758977 469.822614 2.677159 -11.559205 606.413523 -280.041023
43 44 45 46 47 48
-507.695568 -373.350114 722.507841 727.462386 697.835114 410.116932
49 50 51 52 53 54
420.354773 265.318409 152.872955 848.236591 698.009318 -148.945227
55 56 57 58 59 60
714.100227 149.845682 92.459886 681.714432 -81.412841 579.368977
61 62 63 64 65 66
289.106818 51.070455 -460.575000 -47.211364 -721.338636 -807.593182
67 68 69 70 71 72
-96.247727 -995.902273 -576.588068 17.866477 -801.360795 36.421023
73 74 75 76 77 78
-777.441136 -576.177500 -124.122955 -362.959318 -1200.786591 257.658864
79 80 81 82 83 84
-460.195682 -115.150227 -58.936023 -348.681477 -114.608750 723.473068
85 86 87 88 89 90
-653.589091 -453.525455 -9.470909 58.492727 -524.334545 -171.589091
91 92 93 94 95 96
-993.543636 -124.298182 212.716023 -1111.729432 704.343295 1183.825114
97 98 99 100 101 102
388.662955 74.726591 1391.981136 -523.755227 626.017500 -31.737045
103 104 105 106 107 108
-556.891591 260.053864 -196.231932 -313.377386 206.295341 -844.522841
109 110 111 112 113 114
-227.085000 -764.521364 -339.966818 -1082.903182 41.869545 -252.285000
115 116 117 118 119 120
359.660455 -265.194091 -877.779886 673.774659 345.947386 -177.070795
121 122 123 124 125 126
1135.567045 959.530682 11.185227 1851.548864 378.121591 1946.267045
127 128 129 130 131 132
1574.912500 311.857955 671.872159 467.126705 -1829.300568 -3171.218750
> postscript(file="/var/www/html/rcomp/tmp/6k0191260790827.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 = 132
Frequency = 1
lag(myerror, k = 1) myerror
0 146.902841 NA
1 389.466477 146.902841
2 -263.378977 389.466477
3 469.684659 -263.378977
4 -96.542614 469.684659
5 296.202841 -96.542614
6 501.648295 296.202841
7 422.693750 501.648295
8 211.307955 422.693750
9 -303.337500 211.307955
10 -167.164773 -303.337500
11 -141.482955 -167.164773
12 -1083.745114 -141.482955
13 -963.981477 -1083.745114
14 -769.426932 -963.981477
15 -712.263295 -769.426932
16 -840.890568 -712.263295
17 -386.945114 -840.890568
18 -601.799659 -386.945114
19 6.445795 -601.799659
20 -424.540000 6.445795
21 -567.985455 -424.540000
22 -128.312727 -567.985455
23 592.169091 -128.312727
24 -475.493068 592.169091
25 548.270568 -475.493068
26 408.225114 548.270568
27 -487.311250 408.225114
28 1033.461477 -487.311250
29 -420.993068 1033.461477
30 66.052386 -420.993068
31 722.997841 66.052386
32 223.212045 722.997841
33 77.166591 223.212045
34 1167.739318 77.166591
35 808.921136 1167.739318
36 836.758977 808.921136
37 469.822614 836.758977
38 2.677159 469.822614
39 -11.559205 2.677159
40 606.413523 -11.559205
41 -280.041023 606.413523
42 -507.695568 -280.041023
43 -373.350114 -507.695568
44 722.507841 -373.350114
45 727.462386 722.507841
46 697.835114 727.462386
47 410.116932 697.835114
48 420.354773 410.116932
49 265.318409 420.354773
50 152.872955 265.318409
51 848.236591 152.872955
52 698.009318 848.236591
53 -148.945227 698.009318
54 714.100227 -148.945227
55 149.845682 714.100227
56 92.459886 149.845682
57 681.714432 92.459886
58 -81.412841 681.714432
59 579.368977 -81.412841
60 289.106818 579.368977
61 51.070455 289.106818
62 -460.575000 51.070455
63 -47.211364 -460.575000
64 -721.338636 -47.211364
65 -807.593182 -721.338636
66 -96.247727 -807.593182
67 -995.902273 -96.247727
68 -576.588068 -995.902273
69 17.866477 -576.588068
70 -801.360795 17.866477
71 36.421023 -801.360795
72 -777.441136 36.421023
73 -576.177500 -777.441136
74 -124.122955 -576.177500
75 -362.959318 -124.122955
76 -1200.786591 -362.959318
77 257.658864 -1200.786591
78 -460.195682 257.658864
79 -115.150227 -460.195682
80 -58.936023 -115.150227
81 -348.681477 -58.936023
82 -114.608750 -348.681477
83 723.473068 -114.608750
84 -653.589091 723.473068
85 -453.525455 -653.589091
86 -9.470909 -453.525455
87 58.492727 -9.470909
88 -524.334545 58.492727
89 -171.589091 -524.334545
90 -993.543636 -171.589091
91 -124.298182 -993.543636
92 212.716023 -124.298182
93 -1111.729432 212.716023
94 704.343295 -1111.729432
95 1183.825114 704.343295
96 388.662955 1183.825114
97 74.726591 388.662955
98 1391.981136 74.726591
99 -523.755227 1391.981136
100 626.017500 -523.755227
101 -31.737045 626.017500
102 -556.891591 -31.737045
103 260.053864 -556.891591
104 -196.231932 260.053864
105 -313.377386 -196.231932
106 206.295341 -313.377386
107 -844.522841 206.295341
108 -227.085000 -844.522841
109 -764.521364 -227.085000
110 -339.966818 -764.521364
111 -1082.903182 -339.966818
112 41.869545 -1082.903182
113 -252.285000 41.869545
114 359.660455 -252.285000
115 -265.194091 359.660455
116 -877.779886 -265.194091
117 673.774659 -877.779886
118 345.947386 673.774659
119 -177.070795 345.947386
120 1135.567045 -177.070795
121 959.530682 1135.567045
122 11.185227 959.530682
123 1851.548864 11.185227
124 378.121591 1851.548864
125 1946.267045 378.121591
126 1574.912500 1946.267045
127 311.857955 1574.912500
128 671.872159 311.857955
129 467.126705 671.872159
130 -1829.300568 467.126705
131 -3171.218750 -1829.300568
132 NA -3171.218750
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 389.466477 146.902841
[2,] -263.378977 389.466477
[3,] 469.684659 -263.378977
[4,] -96.542614 469.684659
[5,] 296.202841 -96.542614
[6,] 501.648295 296.202841
[7,] 422.693750 501.648295
[8,] 211.307955 422.693750
[9,] -303.337500 211.307955
[10,] -167.164773 -303.337500
[11,] -141.482955 -167.164773
[12,] -1083.745114 -141.482955
[13,] -963.981477 -1083.745114
[14,] -769.426932 -963.981477
[15,] -712.263295 -769.426932
[16,] -840.890568 -712.263295
[17,] -386.945114 -840.890568
[18,] -601.799659 -386.945114
[19,] 6.445795 -601.799659
[20,] -424.540000 6.445795
[21,] -567.985455 -424.540000
[22,] -128.312727 -567.985455
[23,] 592.169091 -128.312727
[24,] -475.493068 592.169091
[25,] 548.270568 -475.493068
[26,] 408.225114 548.270568
[27,] -487.311250 408.225114
[28,] 1033.461477 -487.311250
[29,] -420.993068 1033.461477
[30,] 66.052386 -420.993068
[31,] 722.997841 66.052386
[32,] 223.212045 722.997841
[33,] 77.166591 223.212045
[34,] 1167.739318 77.166591
[35,] 808.921136 1167.739318
[36,] 836.758977 808.921136
[37,] 469.822614 836.758977
[38,] 2.677159 469.822614
[39,] -11.559205 2.677159
[40,] 606.413523 -11.559205
[41,] -280.041023 606.413523
[42,] -507.695568 -280.041023
[43,] -373.350114 -507.695568
[44,] 722.507841 -373.350114
[45,] 727.462386 722.507841
[46,] 697.835114 727.462386
[47,] 410.116932 697.835114
[48,] 420.354773 410.116932
[49,] 265.318409 420.354773
[50,] 152.872955 265.318409
[51,] 848.236591 152.872955
[52,] 698.009318 848.236591
[53,] -148.945227 698.009318
[54,] 714.100227 -148.945227
[55,] 149.845682 714.100227
[56,] 92.459886 149.845682
[57,] 681.714432 92.459886
[58,] -81.412841 681.714432
[59,] 579.368977 -81.412841
[60,] 289.106818 579.368977
[61,] 51.070455 289.106818
[62,] -460.575000 51.070455
[63,] -47.211364 -460.575000
[64,] -721.338636 -47.211364
[65,] -807.593182 -721.338636
[66,] -96.247727 -807.593182
[67,] -995.902273 -96.247727
[68,] -576.588068 -995.902273
[69,] 17.866477 -576.588068
[70,] -801.360795 17.866477
[71,] 36.421023 -801.360795
[72,] -777.441136 36.421023
[73,] -576.177500 -777.441136
[74,] -124.122955 -576.177500
[75,] -362.959318 -124.122955
[76,] -1200.786591 -362.959318
[77,] 257.658864 -1200.786591
[78,] -460.195682 257.658864
[79,] -115.150227 -460.195682
[80,] -58.936023 -115.150227
[81,] -348.681477 -58.936023
[82,] -114.608750 -348.681477
[83,] 723.473068 -114.608750
[84,] -653.589091 723.473068
[85,] -453.525455 -653.589091
[86,] -9.470909 -453.525455
[87,] 58.492727 -9.470909
[88,] -524.334545 58.492727
[89,] -171.589091 -524.334545
[90,] -993.543636 -171.589091
[91,] -124.298182 -993.543636
[92,] 212.716023 -124.298182
[93,] -1111.729432 212.716023
[94,] 704.343295 -1111.729432
[95,] 1183.825114 704.343295
[96,] 388.662955 1183.825114
[97,] 74.726591 388.662955
[98,] 1391.981136 74.726591
[99,] -523.755227 1391.981136
[100,] 626.017500 -523.755227
[101,] -31.737045 626.017500
[102,] -556.891591 -31.737045
[103,] 260.053864 -556.891591
[104,] -196.231932 260.053864
[105,] -313.377386 -196.231932
[106,] 206.295341 -313.377386
[107,] -844.522841 206.295341
[108,] -227.085000 -844.522841
[109,] -764.521364 -227.085000
[110,] -339.966818 -764.521364
[111,] -1082.903182 -339.966818
[112,] 41.869545 -1082.903182
[113,] -252.285000 41.869545
[114,] 359.660455 -252.285000
[115,] -265.194091 359.660455
[116,] -877.779886 -265.194091
[117,] 673.774659 -877.779886
[118,] 345.947386 673.774659
[119,] -177.070795 345.947386
[120,] 1135.567045 -177.070795
[121,] 959.530682 1135.567045
[122,] 11.185227 959.530682
[123,] 1851.548864 11.185227
[124,] 378.121591 1851.548864
[125,] 1946.267045 378.121591
[126,] 1574.912500 1946.267045
[127,] 311.857955 1574.912500
[128,] 671.872159 311.857955
[129,] 467.126705 671.872159
[130,] -1829.300568 467.126705
[131,] -3171.218750 -1829.300568
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 389.466477 146.902841
2 -263.378977 389.466477
3 469.684659 -263.378977
4 -96.542614 469.684659
5 296.202841 -96.542614
6 501.648295 296.202841
7 422.693750 501.648295
8 211.307955 422.693750
9 -303.337500 211.307955
10 -167.164773 -303.337500
11 -141.482955 -167.164773
12 -1083.745114 -141.482955
13 -963.981477 -1083.745114
14 -769.426932 -963.981477
15 -712.263295 -769.426932
16 -840.890568 -712.263295
17 -386.945114 -840.890568
18 -601.799659 -386.945114
19 6.445795 -601.799659
20 -424.540000 6.445795
21 -567.985455 -424.540000
22 -128.312727 -567.985455
23 592.169091 -128.312727
24 -475.493068 592.169091
25 548.270568 -475.493068
26 408.225114 548.270568
27 -487.311250 408.225114
28 1033.461477 -487.311250
29 -420.993068 1033.461477
30 66.052386 -420.993068
31 722.997841 66.052386
32 223.212045 722.997841
33 77.166591 223.212045
34 1167.739318 77.166591
35 808.921136 1167.739318
36 836.758977 808.921136
37 469.822614 836.758977
38 2.677159 469.822614
39 -11.559205 2.677159
40 606.413523 -11.559205
41 -280.041023 606.413523
42 -507.695568 -280.041023
43 -373.350114 -507.695568
44 722.507841 -373.350114
45 727.462386 722.507841
46 697.835114 727.462386
47 410.116932 697.835114
48 420.354773 410.116932
49 265.318409 420.354773
50 152.872955 265.318409
51 848.236591 152.872955
52 698.009318 848.236591
53 -148.945227 698.009318
54 714.100227 -148.945227
55 149.845682 714.100227
56 92.459886 149.845682
57 681.714432 92.459886
58 -81.412841 681.714432
59 579.368977 -81.412841
60 289.106818 579.368977
61 51.070455 289.106818
62 -460.575000 51.070455
63 -47.211364 -460.575000
64 -721.338636 -47.211364
65 -807.593182 -721.338636
66 -96.247727 -807.593182
67 -995.902273 -96.247727
68 -576.588068 -995.902273
69 17.866477 -576.588068
70 -801.360795 17.866477
71 36.421023 -801.360795
72 -777.441136 36.421023
73 -576.177500 -777.441136
74 -124.122955 -576.177500
75 -362.959318 -124.122955
76 -1200.786591 -362.959318
77 257.658864 -1200.786591
78 -460.195682 257.658864
79 -115.150227 -460.195682
80 -58.936023 -115.150227
81 -348.681477 -58.936023
82 -114.608750 -348.681477
83 723.473068 -114.608750
84 -653.589091 723.473068
85 -453.525455 -653.589091
86 -9.470909 -453.525455
87 58.492727 -9.470909
88 -524.334545 58.492727
89 -171.589091 -524.334545
90 -993.543636 -171.589091
91 -124.298182 -993.543636
92 212.716023 -124.298182
93 -1111.729432 212.716023
94 704.343295 -1111.729432
95 1183.825114 704.343295
96 388.662955 1183.825114
97 74.726591 388.662955
98 1391.981136 74.726591
99 -523.755227 1391.981136
100 626.017500 -523.755227
101 -31.737045 626.017500
102 -556.891591 -31.737045
103 260.053864 -556.891591
104 -196.231932 260.053864
105 -313.377386 -196.231932
106 206.295341 -313.377386
107 -844.522841 206.295341
108 -227.085000 -844.522841
109 -764.521364 -227.085000
110 -339.966818 -764.521364
111 -1082.903182 -339.966818
112 41.869545 -1082.903182
113 -252.285000 41.869545
114 359.660455 -252.285000
115 -265.194091 359.660455
116 -877.779886 -265.194091
117 673.774659 -877.779886
118 345.947386 673.774659
119 -177.070795 345.947386
120 1135.567045 -177.070795
121 959.530682 1135.567045
122 11.185227 959.530682
123 1851.548864 11.185227
124 378.121591 1851.548864
125 1946.267045 378.121591
126 1574.912500 1946.267045
127 311.857955 1574.912500
128 671.872159 311.857955
129 467.126705 671.872159
130 -1829.300568 467.126705
131 -3171.218750 -1829.300568
> 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/7ni4g1260790827.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/85s321260790827.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/97ye91260790827.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/10ysb01260790827.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/11o78t1260790827.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/127tmj1260790827.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/13vphf1260790827.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/14k8kq1260790827.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/15v6cm1260790827.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/16yg1g1260790827.tab")
+ }
>
> try(system("convert tmp/1jruc1260790827.ps tmp/1jruc1260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/2m7kt1260790827.ps tmp/2m7kt1260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/3zagz1260790827.ps tmp/3zagz1260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/4jg9o1260790827.ps tmp/4jg9o1260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/5hvf91260790827.ps tmp/5hvf91260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/6k0191260790827.ps tmp/6k0191260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ni4g1260790827.ps tmp/7ni4g1260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/85s321260790827.ps tmp/85s321260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/97ye91260790827.ps tmp/97ye91260790827.png",intern=TRUE))
character(0)
> try(system("convert tmp/10ysb01260790827.ps tmp/10ysb01260790827.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.486 1.655 5.023