R version 2.8.0 (2008-10-20)
Copyright (C) 2008 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(6392.3
+ ,0
+ ,8686.4
+ ,0
+ ,9244.7
+ ,0
+ ,8182.7
+ ,0
+ ,7451.4
+ ,0
+ ,7988.8
+ ,0
+ ,8243.5
+ ,0
+ ,8843
+ ,0
+ ,9092.7
+ ,0
+ ,8246.7
+ ,0
+ ,9311.7
+ ,0
+ ,8341.2
+ ,0
+ ,7116.7
+ ,0
+ ,9635.7
+ ,0
+ ,9815.4
+ ,0
+ ,8611.3
+ ,0
+ ,8297.8
+ ,0
+ ,8715.1
+ ,0
+ ,8919.9
+ ,0
+ ,10085.8
+ ,0
+ ,9511.7
+ ,0
+ ,8991.3
+ ,0
+ ,10311.2
+ ,0
+ ,8895.4
+ ,0
+ ,7449.8
+ ,0
+ ,10084
+ ,0
+ ,9859.4
+ ,0
+ ,9100.1
+ ,0
+ ,8920.8
+ ,0
+ ,8502.7
+ ,0
+ ,8599.6
+ ,0
+ ,10394.4
+ ,0
+ ,9290.4
+ ,0
+ ,8742.2
+ ,0
+ ,10217.3
+ ,0
+ ,8639
+ ,0
+ ,8139.6
+ ,0
+ ,10779.1
+ ,0
+ ,10427.7
+ ,0
+ ,10349.1
+ ,0
+ ,10036.4
+ ,0
+ ,9492.1
+ ,0
+ ,10638.8
+ ,0
+ ,12054.5
+ ,0
+ ,10324.7
+ ,0
+ ,11817.3
+ ,0
+ ,11008.9
+ ,0
+ ,9996.6
+ ,0
+ ,9419.5
+ ,0
+ ,11958.8
+ ,0
+ ,12594.6
+ ,0
+ ,11890.6
+ ,0
+ ,10871.7
+ ,0
+ ,11835.7
+ ,0
+ ,11542.2
+ ,0
+ ,13093.7
+ ,0
+ ,11180.2
+ ,0
+ ,12035.7
+ ,0
+ ,12112
+ ,0
+ ,10875.2
+ ,0
+ ,9897.3
+ ,0
+ ,11672.1
+ ,1
+ ,12385.7
+ ,1
+ ,11405.6
+ ,1
+ ,9830.9
+ ,1
+ ,11025.1
+ ,1
+ ,10853.8
+ ,1
+ ,12252.6
+ ,1
+ ,11839.4
+ ,1
+ ,11669.1
+ ,1
+ ,11601.4
+ ,1
+ ,11178.4
+ ,1
+ ,9516.4
+ ,1
+ ,12102.8
+ ,1
+ ,12989
+ ,1
+ ,11610.2
+ ,1
+ ,10205.5
+ ,1
+ ,11356.2
+ ,1
+ ,11307.1
+ ,1
+ ,12648.6
+ ,1
+ ,11947.2
+ ,1
+ ,11714.1
+ ,1
+ ,12192.5
+ ,1
+ ,11268.8
+ ,1
+ ,9097.4
+ ,1
+ ,12639.8
+ ,1
+ ,13040.1
+ ,1
+ ,11687.3
+ ,1
+ ,11191.7
+ ,1
+ ,11391.9
+ ,1
+ ,11793.1
+ ,1
+ ,13933.2
+ ,1
+ ,12778.1
+ ,1
+ ,11810.3
+ ,1
+ ,13698.4
+ ,1
+ ,11956.6
+ ,1
+ ,10723.8
+ ,1
+ ,13938.9
+ ,1
+ ,13979.8
+ ,1
+ ,13807.4
+ ,1
+ ,12973.9
+ ,1
+ ,12509.8
+ ,1
+ ,12934.1
+ ,1
+ ,14908.3
+ ,1
+ ,13772.1
+ ,1
+ ,13012.6
+ ,1
+ ,14049.9
+ ,1
+ ,11816.5
+ ,1
+ ,11593.2
+ ,1
+ ,14466.2
+ ,1
+ ,13615.9
+ ,1
+ ,14733.9
+ ,1
+ ,13880.7
+ ,1
+ ,13527.5
+ ,1
+ ,13584
+ ,1
+ ,16170.2
+ ,1
+ ,13260.6
+ ,1
+ ,14741.9
+ ,1
+ ,15486.5
+ ,1
+ ,13154.5
+ ,1
+ ,12621.2
+ ,1)
+ ,dim=c(2
+ ,121)
+ ,dimnames=list(c('y'
+ ,'x')
+ ,1:121))
> y <- array(NA,dim=c(2,121),dimnames=list(c('y','x'),1:121))
> 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 x M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 6392.3 0 1 0 0 0 0 0 0 0 0 0 0 1
2 8686.4 0 0 1 0 0 0 0 0 0 0 0 0 2
3 9244.7 0 0 0 1 0 0 0 0 0 0 0 0 3
4 8182.7 0 0 0 0 1 0 0 0 0 0 0 0 4
5 7451.4 0 0 0 0 0 1 0 0 0 0 0 0 5
6 7988.8 0 0 0 0 0 0 1 0 0 0 0 0 6
7 8243.5 0 0 0 0 0 0 0 1 0 0 0 0 7
8 8843.0 0 0 0 0 0 0 0 0 1 0 0 0 8
9 9092.7 0 0 0 0 0 0 0 0 0 1 0 0 9
10 8246.7 0 0 0 0 0 0 0 0 0 0 1 0 10
11 9311.7 0 0 0 0 0 0 0 0 0 0 0 1 11
12 8341.2 0 0 0 0 0 0 0 0 0 0 0 0 12
13 7116.7 0 1 0 0 0 0 0 0 0 0 0 0 13
14 9635.7 0 0 1 0 0 0 0 0 0 0 0 0 14
15 9815.4 0 0 0 1 0 0 0 0 0 0 0 0 15
16 8611.3 0 0 0 0 1 0 0 0 0 0 0 0 16
17 8297.8 0 0 0 0 0 1 0 0 0 0 0 0 17
18 8715.1 0 0 0 0 0 0 1 0 0 0 0 0 18
19 8919.9 0 0 0 0 0 0 0 1 0 0 0 0 19
20 10085.8 0 0 0 0 0 0 0 0 1 0 0 0 20
21 9511.7 0 0 0 0 0 0 0 0 0 1 0 0 21
22 8991.3 0 0 0 0 0 0 0 0 0 0 1 0 22
23 10311.2 0 0 0 0 0 0 0 0 0 0 0 1 23
24 8895.4 0 0 0 0 0 0 0 0 0 0 0 0 24
25 7449.8 0 1 0 0 0 0 0 0 0 0 0 0 25
26 10084.0 0 0 1 0 0 0 0 0 0 0 0 0 26
27 9859.4 0 0 0 1 0 0 0 0 0 0 0 0 27
28 9100.1 0 0 0 0 1 0 0 0 0 0 0 0 28
29 8920.8 0 0 0 0 0 1 0 0 0 0 0 0 29
30 8502.7 0 0 0 0 0 0 1 0 0 0 0 0 30
31 8599.6 0 0 0 0 0 0 0 1 0 0 0 0 31
32 10394.4 0 0 0 0 0 0 0 0 1 0 0 0 32
33 9290.4 0 0 0 0 0 0 0 0 0 1 0 0 33
34 8742.2 0 0 0 0 0 0 0 0 0 0 1 0 34
35 10217.3 0 0 0 0 0 0 0 0 0 0 0 1 35
36 8639.0 0 0 0 0 0 0 0 0 0 0 0 0 36
37 8139.6 0 1 0 0 0 0 0 0 0 0 0 0 37
38 10779.1 0 0 1 0 0 0 0 0 0 0 0 0 38
39 10427.7 0 0 0 1 0 0 0 0 0 0 0 0 39
40 10349.1 0 0 0 0 1 0 0 0 0 0 0 0 40
41 10036.4 0 0 0 0 0 1 0 0 0 0 0 0 41
42 9492.1 0 0 0 0 0 0 1 0 0 0 0 0 42
43 10638.8 0 0 0 0 0 0 0 1 0 0 0 0 43
44 12054.5 0 0 0 0 0 0 0 0 1 0 0 0 44
45 10324.7 0 0 0 0 0 0 0 0 0 1 0 0 45
46 11817.3 0 0 0 0 0 0 0 0 0 0 1 0 46
47 11008.9 0 0 0 0 0 0 0 0 0 0 0 1 47
48 9996.6 0 0 0 0 0 0 0 0 0 0 0 0 48
49 9419.5 0 1 0 0 0 0 0 0 0 0 0 0 49
50 11958.8 0 0 1 0 0 0 0 0 0 0 0 0 50
51 12594.6 0 0 0 1 0 0 0 0 0 0 0 0 51
52 11890.6 0 0 0 0 1 0 0 0 0 0 0 0 52
53 10871.7 0 0 0 0 0 1 0 0 0 0 0 0 53
54 11835.7 0 0 0 0 0 0 1 0 0 0 0 0 54
55 11542.2 0 0 0 0 0 0 0 1 0 0 0 0 55
56 13093.7 0 0 0 0 0 0 0 0 1 0 0 0 56
57 11180.2 0 0 0 0 0 0 0 0 0 1 0 0 57
58 12035.7 0 0 0 0 0 0 0 0 0 0 1 0 58
59 12112.0 0 0 0 0 0 0 0 0 0 0 0 1 59
60 10875.2 0 0 0 0 0 0 0 0 0 0 0 0 60
61 9897.3 0 1 0 0 0 0 0 0 0 0 0 0 61
62 11672.1 1 0 1 0 0 0 0 0 0 0 0 0 62
63 12385.7 1 0 0 1 0 0 0 0 0 0 0 0 63
64 11405.6 1 0 0 0 1 0 0 0 0 0 0 0 64
65 9830.9 1 0 0 0 0 1 0 0 0 0 0 0 65
66 11025.1 1 0 0 0 0 0 1 0 0 0 0 0 66
67 10853.8 1 0 0 0 0 0 0 1 0 0 0 0 67
68 12252.6 1 0 0 0 0 0 0 0 1 0 0 0 68
69 11839.4 1 0 0 0 0 0 0 0 0 1 0 0 69
70 11669.1 1 0 0 0 0 0 0 0 0 0 1 0 70
71 11601.4 1 0 0 0 0 0 0 0 0 0 0 1 71
72 11178.4 1 0 0 0 0 0 0 0 0 0 0 0 72
73 9516.4 1 1 0 0 0 0 0 0 0 0 0 0 73
74 12102.8 1 0 1 0 0 0 0 0 0 0 0 0 74
75 12989.0 1 0 0 1 0 0 0 0 0 0 0 0 75
76 11610.2 1 0 0 0 1 0 0 0 0 0 0 0 76
77 10205.5 1 0 0 0 0 1 0 0 0 0 0 0 77
78 11356.2 1 0 0 0 0 0 1 0 0 0 0 0 78
79 11307.1 1 0 0 0 0 0 0 1 0 0 0 0 79
80 12648.6 1 0 0 0 0 0 0 0 1 0 0 0 80
81 11947.2 1 0 0 0 0 0 0 0 0 1 0 0 81
82 11714.1 1 0 0 0 0 0 0 0 0 0 1 0 82
83 12192.5 1 0 0 0 0 0 0 0 0 0 0 1 83
84 11268.8 1 0 0 0 0 0 0 0 0 0 0 0 84
85 9097.4 1 1 0 0 0 0 0 0 0 0 0 0 85
86 12639.8 1 0 1 0 0 0 0 0 0 0 0 0 86
87 13040.1 1 0 0 1 0 0 0 0 0 0 0 0 87
88 11687.3 1 0 0 0 1 0 0 0 0 0 0 0 88
89 11191.7 1 0 0 0 0 1 0 0 0 0 0 0 89
90 11391.9 1 0 0 0 0 0 1 0 0 0 0 0 90
91 11793.1 1 0 0 0 0 0 0 1 0 0 0 0 91
92 13933.2 1 0 0 0 0 0 0 0 1 0 0 0 92
93 12778.1 1 0 0 0 0 0 0 0 0 1 0 0 93
94 11810.3 1 0 0 0 0 0 0 0 0 0 1 0 94
95 13698.4 1 0 0 0 0 0 0 0 0 0 0 1 95
96 11956.6 1 0 0 0 0 0 0 0 0 0 0 0 96
97 10723.8 1 1 0 0 0 0 0 0 0 0 0 0 97
98 13938.9 1 0 1 0 0 0 0 0 0 0 0 0 98
99 13979.8 1 0 0 1 0 0 0 0 0 0 0 0 99
100 13807.4 1 0 0 0 1 0 0 0 0 0 0 0 100
101 12973.9 1 0 0 0 0 1 0 0 0 0 0 0 101
102 12509.8 1 0 0 0 0 0 1 0 0 0 0 0 102
103 12934.1 1 0 0 0 0 0 0 1 0 0 0 0 103
104 14908.3 1 0 0 0 0 0 0 0 1 0 0 0 104
105 13772.1 1 0 0 0 0 0 0 0 0 1 0 0 105
106 13012.6 1 0 0 0 0 0 0 0 0 0 1 0 106
107 14049.9 1 0 0 0 0 0 0 0 0 0 0 1 107
108 11816.5 1 0 0 0 0 0 0 0 0 0 0 0 108
109 11593.2 1 1 0 0 0 0 0 0 0 0 0 0 109
110 14466.2 1 0 1 0 0 0 0 0 0 0 0 0 110
111 13615.9 1 0 0 1 0 0 0 0 0 0 0 0 111
112 14733.9 1 0 0 0 1 0 0 0 0 0 0 0 112
113 13880.7 1 0 0 0 0 1 0 0 0 0 0 0 113
114 13527.5 1 0 0 0 0 0 1 0 0 0 0 0 114
115 13584.0 1 0 0 0 0 0 0 1 0 0 0 0 115
116 16170.2 1 0 0 0 0 0 0 0 1 0 0 0 116
117 13260.6 1 0 0 0 0 0 0 0 0 1 0 0 117
118 14741.9 1 0 0 0 0 0 0 0 0 0 1 0 118
119 15486.5 1 0 0 0 0 0 0 0 0 0 0 1 119
120 13154.5 1 0 0 0 0 0 0 0 0 0 0 0 120
121 12621.2 1 1 0 0 0 0 0 0 0 0 0 0 121
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) x M1 M2 M3 M4
6977.32 -1116.87 -1075.56 1619.51 1754.83 1033.88
M5 M6 M7 M8 M9 M10
198.61 403.48 547.07 2080.35 878.10 792.97
M11 t
1450.30 63.54
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-1188.295 -304.205 -2.655 359.820 1124.380
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6977.320 193.856 35.992 < 2e-16 ***
x -1116.875 188.163 -5.936 3.67e-08 ***
M1 -1075.565 223.332 -4.816 4.85e-06 ***
M2 1619.514 230.055 7.040 1.93e-10 ***
M3 1754.829 229.753 7.638 9.88e-12 ***
M4 1033.883 229.483 4.505 1.70e-05 ***
M5 198.608 229.244 0.866 0.388231
M6 403.482 229.036 1.762 0.080984 .
M7 547.067 228.861 2.390 0.018578 *
M8 2080.352 228.717 9.096 5.66e-15 ***
M9 878.096 228.606 3.841 0.000208 ***
M10 792.971 228.526 3.470 0.000752 ***
M11 1450.295 228.478 6.348 5.40e-09 ***
t 63.535 2.703 23.509 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 510.9 on 107 degrees of freedom
Multiple R-squared: 0.9417, Adjusted R-squared: 0.9346
F-statistic: 132.9 on 13 and 107 DF, p-value: < 2.2e-16
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 0.0423450464 0.0846900928 0.9576550
[2,] 0.0110243647 0.0220487295 0.9889756
[3,] 0.0026251170 0.0052502339 0.9973749
[4,] 0.0070063570 0.0140127141 0.9929936
[5,] 0.0046036976 0.0092073951 0.9953963
[6,] 0.0015033011 0.0030066022 0.9984967
[7,] 0.0007739421 0.0015478841 0.9992261
[8,] 0.0003389008 0.0006778016 0.9996611
[9,] 0.0003596756 0.0007193511 0.9996403
[10,] 0.0001285114 0.0002570228 0.9998715
[11,] 0.0006721028 0.0013442056 0.9993279
[12,] 0.0003691093 0.0007382187 0.9996309
[13,] 0.0001630032 0.0003260064 0.9998370
[14,] 0.0008643575 0.0017287150 0.9991356
[15,] 0.0035266351 0.0070532702 0.9964734
[16,] 0.0024146625 0.0048293251 0.9975853
[17,] 0.0058737026 0.0117474053 0.9941263
[18,] 0.0114900258 0.0229800516 0.9885100
[19,] 0.0082408954 0.0164817907 0.9917591
[20,] 0.0113954309 0.0227908619 0.9886046
[21,] 0.0085202840 0.0170405681 0.9914797
[22,] 0.0079679372 0.0159358745 0.9920321
[23,] 0.0074758750 0.0149517500 0.9925241
[24,] 0.0170647549 0.0341295098 0.9829352
[25,] 0.0303301835 0.0606603670 0.9696698
[26,] 0.0279070101 0.0558140202 0.9720930
[27,] 0.0610817915 0.1221635830 0.9389182
[28,] 0.1392375877 0.2784751753 0.8607624
[29,] 0.1234242427 0.2468484853 0.8765758
[30,] 0.5506726826 0.8986546348 0.4493273
[31,] 0.5339622080 0.9320755839 0.4660378
[32,] 0.4803822412 0.9607644825 0.5196178
[33,] 0.4611530540 0.9223061080 0.5388469
[34,] 0.4359957390 0.8719914779 0.5640043
[35,] 0.5083898167 0.9832203667 0.4916102
[36,] 0.5678203254 0.8643593492 0.4321797
[37,] 0.5234858359 0.9530283282 0.4765142
[38,] 0.6665441656 0.6669116688 0.3334558
[39,] 0.6483855314 0.7032289372 0.3516145
[40,] 0.6464633319 0.7070733361 0.3535367
[41,] 0.6243007241 0.7513985519 0.3756993
[42,] 0.6124067644 0.7751864713 0.3875932
[43,] 0.5636694401 0.8726611199 0.4363306
[44,] 0.5068189872 0.9863620256 0.4931810
[45,] 0.4505431835 0.9010863669 0.5494568
[46,] 0.3973452445 0.7946904890 0.6026548
[47,] 0.4133325735 0.8266651471 0.5866674
[48,] 0.3671242827 0.7342485654 0.6328757
[49,] 0.3820316677 0.7640633354 0.6179683
[50,] 0.3763311757 0.7526623515 0.6236688
[51,] 0.3387493750 0.6774987500 0.6612506
[52,] 0.2903189525 0.5806379049 0.7096810
[53,] 0.3156316534 0.6312633067 0.6843683
[54,] 0.3322193349 0.6644386698 0.6677807
[55,] 0.3005365939 0.6010731877 0.6994634
[56,] 0.3987016880 0.7974033760 0.6012983
[57,] 0.4048079251 0.8096158502 0.5951921
[58,] 0.3599414698 0.7198829397 0.6400585
[59,] 0.4783465593 0.9566931186 0.5216534
[60,] 0.4241057699 0.8482115398 0.5758942
[61,] 0.4880485991 0.9760971982 0.5119514
[62,] 0.4883497670 0.9766995341 0.5116502
[63,] 0.4555335964 0.9110671927 0.5444664
[64,] 0.4363069922 0.8726139844 0.5636930
[65,] 0.4099992725 0.8199985449 0.5900007
[66,] 0.3794696730 0.7589393459 0.6205303
[67,] 0.3431046514 0.6862093028 0.6568953
[68,] 0.3873240147 0.7746480295 0.6126760
[69,] 0.4863935713 0.9727871425 0.5136064
[70,] 0.4267271503 0.8534543007 0.5732728
[71,] 0.4224547298 0.8449094596 0.5775453
[72,] 0.5898267144 0.8203465713 0.4101733
[73,] 0.6632080506 0.6735838987 0.3367919
[74,] 0.6321221813 0.7357556373 0.3678778
[75,] 0.5720507556 0.8558984889 0.4279492
[76,] 0.5266640060 0.9466719880 0.4733360
[77,] 0.4888607845 0.9777215689 0.5111392
[78,] 0.5841183927 0.8317632147 0.4158816
[79,] 0.5084499853 0.9831000295 0.4915500
[80,] 0.5165741583 0.9668516833 0.4834258
[81,] 0.4264153314 0.8528306628 0.5735847
[82,] 0.3516185215 0.7032370430 0.6483815
[83,] 0.5524424612 0.8951150777 0.4475575
[84,] 0.4586299797 0.9172599594 0.5413700
[85,] 0.3570104566 0.7140209132 0.6429895
[86,] 0.2483615346 0.4967230693 0.7516385
[87,] 0.1699019637 0.3398039274 0.8300980
[88,] 0.0988983999 0.1977967997 0.9011016
> postscript(file="/var/www/html/rcomp/tmp/1fzaw1229527548.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/28q0u1229527548.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/30jge1229527548.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/4p0al1229527548.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/527pg1229527548.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 = 121
Frequency = 1
1 2 3 4 5 6
427.008727 -37.505291 321.944709 -82.645291 -42.205291 226.784709
7 8 9 10 11 12
274.364709 -722.955291 665.464709 -158.945291 185.194709 601.454709
13 14 15 16 17 18
388.983836 149.369818 130.219818 -416.470182 41.769818 190.659818
19 20 21 22 23 24
188.339818 -242.580182 322.039818 -176.770182 422.269818 393.229818
25 26 27 28 29 30
-40.341055 -164.755073 -588.205073 -690.095073 -97.655073 -784.165073
31 32 33 34 35 36
-894.385073 -696.405073 -661.685073 -1188.295073 -434.055073 -625.595073
37 38 39 40 41 42
-112.965945 -232.079964 -782.329964 -203.519964 255.520036 -557.189964
43 44 45 46 47 48
382.390036 201.270036 -389.809964 1124.380036 -404.879964 -30.419964
49 50 51 52 53 54
404.509164 185.195145 622.145145 575.555145 328.395145 1023.985145
55 56 57 58 59 60
523.365145 478.045145 -296.734855 580.355145 -64.204855 85.755145
61 62 63 64 65 66
119.884273 252.944855 767.694855 445.004855 -357.955145 567.834855
67 68 69 70 71 72
189.414855 -8.605145 716.914855 568.204855 -220.355145 743.404855
73 74 75 76 77 78
93.433982 -78.780036 608.569964 -112.820036 -745.780036 136.509964
79 80 81 82 83 84
-119.710036 -375.030036 62.289964 -149.220036 -391.680036 71.379964
85 86 87 88 89 90
-1087.990909 -304.204927 -102.754927 -798.144927 -522.004927 -590.214927
91 92 93 94 95 96
-396.134927 147.145073 130.765073 -815.444927 351.795073 -3.244927
97 98 99 100 101 102
-224.015800 232.470182 74.520182 559.530182 497.770182 -234.739818
103 104 105 106 107 108
-17.559818 359.820182 362.340182 -375.569818 -59.129818 -905.769818
109 110 111 112 113 114
-117.040691 -2.654709 -1051.804709 723.605291 642.145291 20.535291
115 116 117 118 119 120
-130.084709 859.295291 -911.584709 591.305291 615.045291 -330.194709
121
148.534418
> postscript(file="/var/www/html/rcomp/tmp/6ynbc1229527548.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 = 121
Frequency = 1
lag(myerror, k = 1) myerror
0 427.008727 NA
1 -37.505291 427.008727
2 321.944709 -37.505291
3 -82.645291 321.944709
4 -42.205291 -82.645291
5 226.784709 -42.205291
6 274.364709 226.784709
7 -722.955291 274.364709
8 665.464709 -722.955291
9 -158.945291 665.464709
10 185.194709 -158.945291
11 601.454709 185.194709
12 388.983836 601.454709
13 149.369818 388.983836
14 130.219818 149.369818
15 -416.470182 130.219818
16 41.769818 -416.470182
17 190.659818 41.769818
18 188.339818 190.659818
19 -242.580182 188.339818
20 322.039818 -242.580182
21 -176.770182 322.039818
22 422.269818 -176.770182
23 393.229818 422.269818
24 -40.341055 393.229818
25 -164.755073 -40.341055
26 -588.205073 -164.755073
27 -690.095073 -588.205073
28 -97.655073 -690.095073
29 -784.165073 -97.655073
30 -894.385073 -784.165073
31 -696.405073 -894.385073
32 -661.685073 -696.405073
33 -1188.295073 -661.685073
34 -434.055073 -1188.295073
35 -625.595073 -434.055073
36 -112.965945 -625.595073
37 -232.079964 -112.965945
38 -782.329964 -232.079964
39 -203.519964 -782.329964
40 255.520036 -203.519964
41 -557.189964 255.520036
42 382.390036 -557.189964
43 201.270036 382.390036
44 -389.809964 201.270036
45 1124.380036 -389.809964
46 -404.879964 1124.380036
47 -30.419964 -404.879964
48 404.509164 -30.419964
49 185.195145 404.509164
50 622.145145 185.195145
51 575.555145 622.145145
52 328.395145 575.555145
53 1023.985145 328.395145
54 523.365145 1023.985145
55 478.045145 523.365145
56 -296.734855 478.045145
57 580.355145 -296.734855
58 -64.204855 580.355145
59 85.755145 -64.204855
60 119.884273 85.755145
61 252.944855 119.884273
62 767.694855 252.944855
63 445.004855 767.694855
64 -357.955145 445.004855
65 567.834855 -357.955145
66 189.414855 567.834855
67 -8.605145 189.414855
68 716.914855 -8.605145
69 568.204855 716.914855
70 -220.355145 568.204855
71 743.404855 -220.355145
72 93.433982 743.404855
73 -78.780036 93.433982
74 608.569964 -78.780036
75 -112.820036 608.569964
76 -745.780036 -112.820036
77 136.509964 -745.780036
78 -119.710036 136.509964
79 -375.030036 -119.710036
80 62.289964 -375.030036
81 -149.220036 62.289964
82 -391.680036 -149.220036
83 71.379964 -391.680036
84 -1087.990909 71.379964
85 -304.204927 -1087.990909
86 -102.754927 -304.204927
87 -798.144927 -102.754927
88 -522.004927 -798.144927
89 -590.214927 -522.004927
90 -396.134927 -590.214927
91 147.145073 -396.134927
92 130.765073 147.145073
93 -815.444927 130.765073
94 351.795073 -815.444927
95 -3.244927 351.795073
96 -224.015800 -3.244927
97 232.470182 -224.015800
98 74.520182 232.470182
99 559.530182 74.520182
100 497.770182 559.530182
101 -234.739818 497.770182
102 -17.559818 -234.739818
103 359.820182 -17.559818
104 362.340182 359.820182
105 -375.569818 362.340182
106 -59.129818 -375.569818
107 -905.769818 -59.129818
108 -117.040691 -905.769818
109 -2.654709 -117.040691
110 -1051.804709 -2.654709
111 723.605291 -1051.804709
112 642.145291 723.605291
113 20.535291 642.145291
114 -130.084709 20.535291
115 859.295291 -130.084709
116 -911.584709 859.295291
117 591.305291 -911.584709
118 615.045291 591.305291
119 -330.194709 615.045291
120 148.534418 -330.194709
121 NA 148.534418
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -37.505291 427.008727
[2,] 321.944709 -37.505291
[3,] -82.645291 321.944709
[4,] -42.205291 -82.645291
[5,] 226.784709 -42.205291
[6,] 274.364709 226.784709
[7,] -722.955291 274.364709
[8,] 665.464709 -722.955291
[9,] -158.945291 665.464709
[10,] 185.194709 -158.945291
[11,] 601.454709 185.194709
[12,] 388.983836 601.454709
[13,] 149.369818 388.983836
[14,] 130.219818 149.369818
[15,] -416.470182 130.219818
[16,] 41.769818 -416.470182
[17,] 190.659818 41.769818
[18,] 188.339818 190.659818
[19,] -242.580182 188.339818
[20,] 322.039818 -242.580182
[21,] -176.770182 322.039818
[22,] 422.269818 -176.770182
[23,] 393.229818 422.269818
[24,] -40.341055 393.229818
[25,] -164.755073 -40.341055
[26,] -588.205073 -164.755073
[27,] -690.095073 -588.205073
[28,] -97.655073 -690.095073
[29,] -784.165073 -97.655073
[30,] -894.385073 -784.165073
[31,] -696.405073 -894.385073
[32,] -661.685073 -696.405073
[33,] -1188.295073 -661.685073
[34,] -434.055073 -1188.295073
[35,] -625.595073 -434.055073
[36,] -112.965945 -625.595073
[37,] -232.079964 -112.965945
[38,] -782.329964 -232.079964
[39,] -203.519964 -782.329964
[40,] 255.520036 -203.519964
[41,] -557.189964 255.520036
[42,] 382.390036 -557.189964
[43,] 201.270036 382.390036
[44,] -389.809964 201.270036
[45,] 1124.380036 -389.809964
[46,] -404.879964 1124.380036
[47,] -30.419964 -404.879964
[48,] 404.509164 -30.419964
[49,] 185.195145 404.509164
[50,] 622.145145 185.195145
[51,] 575.555145 622.145145
[52,] 328.395145 575.555145
[53,] 1023.985145 328.395145
[54,] 523.365145 1023.985145
[55,] 478.045145 523.365145
[56,] -296.734855 478.045145
[57,] 580.355145 -296.734855
[58,] -64.204855 580.355145
[59,] 85.755145 -64.204855
[60,] 119.884273 85.755145
[61,] 252.944855 119.884273
[62,] 767.694855 252.944855
[63,] 445.004855 767.694855
[64,] -357.955145 445.004855
[65,] 567.834855 -357.955145
[66,] 189.414855 567.834855
[67,] -8.605145 189.414855
[68,] 716.914855 -8.605145
[69,] 568.204855 716.914855
[70,] -220.355145 568.204855
[71,] 743.404855 -220.355145
[72,] 93.433982 743.404855
[73,] -78.780036 93.433982
[74,] 608.569964 -78.780036
[75,] -112.820036 608.569964
[76,] -745.780036 -112.820036
[77,] 136.509964 -745.780036
[78,] -119.710036 136.509964
[79,] -375.030036 -119.710036
[80,] 62.289964 -375.030036
[81,] -149.220036 62.289964
[82,] -391.680036 -149.220036
[83,] 71.379964 -391.680036
[84,] -1087.990909 71.379964
[85,] -304.204927 -1087.990909
[86,] -102.754927 -304.204927
[87,] -798.144927 -102.754927
[88,] -522.004927 -798.144927
[89,] -590.214927 -522.004927
[90,] -396.134927 -590.214927
[91,] 147.145073 -396.134927
[92,] 130.765073 147.145073
[93,] -815.444927 130.765073
[94,] 351.795073 -815.444927
[95,] -3.244927 351.795073
[96,] -224.015800 -3.244927
[97,] 232.470182 -224.015800
[98,] 74.520182 232.470182
[99,] 559.530182 74.520182
[100,] 497.770182 559.530182
[101,] -234.739818 497.770182
[102,] -17.559818 -234.739818
[103,] 359.820182 -17.559818
[104,] 362.340182 359.820182
[105,] -375.569818 362.340182
[106,] -59.129818 -375.569818
[107,] -905.769818 -59.129818
[108,] -117.040691 -905.769818
[109,] -2.654709 -117.040691
[110,] -1051.804709 -2.654709
[111,] 723.605291 -1051.804709
[112,] 642.145291 723.605291
[113,] 20.535291 642.145291
[114,] -130.084709 20.535291
[115,] 859.295291 -130.084709
[116,] -911.584709 859.295291
[117,] 591.305291 -911.584709
[118,] 615.045291 591.305291
[119,] -330.194709 615.045291
[120,] 148.534418 -330.194709
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -37.505291 427.008727
2 321.944709 -37.505291
3 -82.645291 321.944709
4 -42.205291 -82.645291
5 226.784709 -42.205291
6 274.364709 226.784709
7 -722.955291 274.364709
8 665.464709 -722.955291
9 -158.945291 665.464709
10 185.194709 -158.945291
11 601.454709 185.194709
12 388.983836 601.454709
13 149.369818 388.983836
14 130.219818 149.369818
15 -416.470182 130.219818
16 41.769818 -416.470182
17 190.659818 41.769818
18 188.339818 190.659818
19 -242.580182 188.339818
20 322.039818 -242.580182
21 -176.770182 322.039818
22 422.269818 -176.770182
23 393.229818 422.269818
24 -40.341055 393.229818
25 -164.755073 -40.341055
26 -588.205073 -164.755073
27 -690.095073 -588.205073
28 -97.655073 -690.095073
29 -784.165073 -97.655073
30 -894.385073 -784.165073
31 -696.405073 -894.385073
32 -661.685073 -696.405073
33 -1188.295073 -661.685073
34 -434.055073 -1188.295073
35 -625.595073 -434.055073
36 -112.965945 -625.595073
37 -232.079964 -112.965945
38 -782.329964 -232.079964
39 -203.519964 -782.329964
40 255.520036 -203.519964
41 -557.189964 255.520036
42 382.390036 -557.189964
43 201.270036 382.390036
44 -389.809964 201.270036
45 1124.380036 -389.809964
46 -404.879964 1124.380036
47 -30.419964 -404.879964
48 404.509164 -30.419964
49 185.195145 404.509164
50 622.145145 185.195145
51 575.555145 622.145145
52 328.395145 575.555145
53 1023.985145 328.395145
54 523.365145 1023.985145
55 478.045145 523.365145
56 -296.734855 478.045145
57 580.355145 -296.734855
58 -64.204855 580.355145
59 85.755145 -64.204855
60 119.884273 85.755145
61 252.944855 119.884273
62 767.694855 252.944855
63 445.004855 767.694855
64 -357.955145 445.004855
65 567.834855 -357.955145
66 189.414855 567.834855
67 -8.605145 189.414855
68 716.914855 -8.605145
69 568.204855 716.914855
70 -220.355145 568.204855
71 743.404855 -220.355145
72 93.433982 743.404855
73 -78.780036 93.433982
74 608.569964 -78.780036
75 -112.820036 608.569964
76 -745.780036 -112.820036
77 136.509964 -745.780036
78 -119.710036 136.509964
79 -375.030036 -119.710036
80 62.289964 -375.030036
81 -149.220036 62.289964
82 -391.680036 -149.220036
83 71.379964 -391.680036
84 -1087.990909 71.379964
85 -304.204927 -1087.990909
86 -102.754927 -304.204927
87 -798.144927 -102.754927
88 -522.004927 -798.144927
89 -590.214927 -522.004927
90 -396.134927 -590.214927
91 147.145073 -396.134927
92 130.765073 147.145073
93 -815.444927 130.765073
94 351.795073 -815.444927
95 -3.244927 351.795073
96 -224.015800 -3.244927
97 232.470182 -224.015800
98 74.520182 232.470182
99 559.530182 74.520182
100 497.770182 559.530182
101 -234.739818 497.770182
102 -17.559818 -234.739818
103 359.820182 -17.559818
104 362.340182 359.820182
105 -375.569818 362.340182
106 -59.129818 -375.569818
107 -905.769818 -59.129818
108 -117.040691 -905.769818
109 -2.654709 -117.040691
110 -1051.804709 -2.654709
111 723.605291 -1051.804709
112 642.145291 723.605291
113 20.535291 642.145291
114 -130.084709 20.535291
115 859.295291 -130.084709
116 -911.584709 859.295291
117 591.305291 -911.584709
118 615.045291 591.305291
119 -330.194709 615.045291
120 148.534418 -330.194709
> 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/7owo31229527548.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/86u651229527548.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/979r61229527548.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/10k9hd1229527548.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/118yzh1229527548.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/12lfet1229527548.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/13ta0q1229527548.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/14bavb1229527548.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/15hz5a1229527548.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/16cs331229527548.tab")
+ }
>
> system("convert tmp/1fzaw1229527548.ps tmp/1fzaw1229527548.png")
> system("convert tmp/28q0u1229527548.ps tmp/28q0u1229527548.png")
> system("convert tmp/30jge1229527548.ps tmp/30jge1229527548.png")
> system("convert tmp/4p0al1229527548.ps tmp/4p0al1229527548.png")
> system("convert tmp/527pg1229527548.ps tmp/527pg1229527548.png")
> system("convert tmp/6ynbc1229527548.ps tmp/6ynbc1229527548.png")
> system("convert tmp/7owo31229527548.ps tmp/7owo31229527548.png")
> system("convert tmp/86u651229527548.ps tmp/86u651229527548.png")
> system("convert tmp/979r61229527548.ps tmp/979r61229527548.png")
> system("convert tmp/10k9hd1229527548.ps tmp/10k9hd1229527548.png")
>
>
> proc.time()
user system elapsed
3.487 1.692 4.703