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(106.3
+ ,0
+ ,97.7
+ ,98.3
+ ,91.6
+ ,104.6
+ ,111.6
+ ,102.3
+ ,0
+ ,106.3
+ ,97.7
+ ,98.3
+ ,91.6
+ ,104.6
+ ,106.6
+ ,0
+ ,102.3
+ ,106.3
+ ,97.7
+ ,98.3
+ ,91.6
+ ,108.1
+ ,0
+ ,106.6
+ ,102.3
+ ,106.3
+ ,97.7
+ ,98.3
+ ,93.8
+ ,0
+ ,108.1
+ ,106.6
+ ,102.3
+ ,106.3
+ ,97.7
+ ,88.2
+ ,0
+ ,93.8
+ ,108.1
+ ,106.6
+ ,102.3
+ ,106.3
+ ,108.9
+ ,0
+ ,88.2
+ ,93.8
+ ,108.1
+ ,106.6
+ ,102.3
+ ,114.2
+ ,0
+ ,108.9
+ ,88.2
+ ,93.8
+ ,108.1
+ ,106.6
+ ,102.5
+ ,0
+ ,114.2
+ ,108.9
+ ,88.2
+ ,93.8
+ ,108.1
+ ,94.2
+ ,0
+ ,102.5
+ ,114.2
+ ,108.9
+ ,88.2
+ ,93.8
+ ,97.4
+ ,0
+ ,94.2
+ ,102.5
+ ,114.2
+ ,108.9
+ ,88.2
+ ,98.5
+ ,0
+ ,97.4
+ ,94.2
+ ,102.5
+ ,114.2
+ ,108.9
+ ,106.5
+ ,0
+ ,98.5
+ ,97.4
+ ,94.2
+ ,102.5
+ ,114.2
+ ,102.9
+ ,0
+ ,106.5
+ ,98.5
+ ,97.4
+ ,94.2
+ ,102.5
+ ,97.1
+ ,0
+ ,102.9
+ ,106.5
+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,97.4
+ ,116.4
+ ,98.3
+ ,105.5)
+ ,dim=c(7
+ ,91)
+ ,dimnames=list(c('y'
+ ,'x'
+ ,'y1'
+ ,'y2'
+ ,'y3'
+ ,'y4'
+ ,'y5')
+ ,1:91))
> y <- array(NA,dim=c(7,91),dimnames=list(c('y','x','y1','y2','y3','y4','y5'),1:91))
> 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 y1 y2 y3 y4 y5 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 106.3 0 97.7 98.3 91.6 104.6 111.6 1 0 0 0 0 0 0 0 0 0 0 1
2 102.3 0 106.3 97.7 98.3 91.6 104.6 0 1 0 0 0 0 0 0 0 0 0 2
3 106.6 0 102.3 106.3 97.7 98.3 91.6 0 0 1 0 0 0 0 0 0 0 0 3
4 108.1 0 106.6 102.3 106.3 97.7 98.3 0 0 0 1 0 0 0 0 0 0 0 4
5 93.8 0 108.1 106.6 102.3 106.3 97.7 0 0 0 0 1 0 0 0 0 0 0 5
6 88.2 0 93.8 108.1 106.6 102.3 106.3 0 0 0 0 0 1 0 0 0 0 0 6
7 108.9 0 88.2 93.8 108.1 106.6 102.3 0 0 0 0 0 0 1 0 0 0 0 7
8 114.2 0 108.9 88.2 93.8 108.1 106.6 0 0 0 0 0 0 0 1 0 0 0 8
9 102.5 0 114.2 108.9 88.2 93.8 108.1 0 0 0 0 0 0 0 0 1 0 0 9
10 94.2 0 102.5 114.2 108.9 88.2 93.8 0 0 0 0 0 0 0 0 0 1 0 10
11 97.4 0 94.2 102.5 114.2 108.9 88.2 0 0 0 0 0 0 0 0 0 0 1 11
12 98.5 0 97.4 94.2 102.5 114.2 108.9 0 0 0 0 0 0 0 0 0 0 0 12
13 106.5 0 98.5 97.4 94.2 102.5 114.2 1 0 0 0 0 0 0 0 0 0 0 13
14 102.9 0 106.5 98.5 97.4 94.2 102.5 0 1 0 0 0 0 0 0 0 0 0 14
15 97.1 0 102.9 106.5 98.5 97.4 94.2 0 0 1 0 0 0 0 0 0 0 0 15
16 103.7 0 97.1 102.9 106.5 98.5 97.4 0 0 0 1 0 0 0 0 0 0 0 16
17 93.4 0 103.7 97.1 102.9 106.5 98.5 0 0 0 0 1 0 0 0 0 0 0 17
18 85.8 0 93.4 103.7 97.1 102.9 106.5 0 0 0 0 0 1 0 0 0 0 0 18
19 108.6 0 85.8 93.4 103.7 97.1 102.9 0 0 0 0 0 0 1 0 0 0 0 19
20 110.2 0 108.6 85.8 93.4 103.7 97.1 0 0 0 0 0 0 0 1 0 0 0 20
21 101.2 0 110.2 108.6 85.8 93.4 103.7 0 0 0 0 0 0 0 0 1 0 0 21
22 101.2 0 101.2 110.2 108.6 85.8 93.4 0 0 0 0 0 0 0 0 0 1 0 22
23 96.9 0 101.2 101.2 110.2 108.6 85.8 0 0 0 0 0 0 0 0 0 0 1 23
24 99.4 0 96.9 101.2 101.2 110.2 108.6 0 0 0 0 0 0 0 0 0 0 0 24
25 118.7 0 99.4 96.9 101.2 101.2 110.2 1 0 0 0 0 0 0 0 0 0 0 25
26 108.0 0 118.7 99.4 96.9 101.2 101.2 0 1 0 0 0 0 0 0 0 0 0 26
27 101.2 0 108.0 118.7 99.4 96.9 101.2 0 0 1 0 0 0 0 0 0 0 0 27
28 119.9 0 101.2 108.0 118.7 99.4 96.9 0 0 0 1 0 0 0 0 0 0 0 28
29 94.8 0 119.9 101.2 108.0 118.7 99.4 0 0 0 0 1 0 0 0 0 0 0 29
30 95.3 0 94.8 119.9 101.2 108.0 118.7 0 0 0 0 0 1 0 0 0 0 0 30
31 118.0 0 95.3 94.8 119.9 101.2 108.0 0 0 0 0 0 0 1 0 0 0 0 31
32 115.9 0 118.0 95.3 94.8 119.9 101.2 0 0 0 0 0 0 0 1 0 0 0 32
33 111.4 0 115.9 118.0 95.3 94.8 119.9 0 0 0 0 0 0 0 0 1 0 0 33
34 108.2 0 111.4 115.9 118.0 95.3 94.8 0 0 0 0 0 0 0 0 0 1 0 34
35 108.8 0 108.2 111.4 115.9 118.0 95.3 0 0 0 0 0 0 0 0 0 0 1 35
36 109.5 0 108.8 108.2 111.4 115.9 118.0 0 0 0 0 0 0 0 0 0 0 0 36
37 124.8 0 109.5 108.8 108.2 111.4 115.9 1 0 0 0 0 0 0 0 0 0 0 37
38 115.3 0 124.8 109.5 108.8 108.2 111.4 0 1 0 0 0 0 0 0 0 0 0 38
39 109.5 0 115.3 124.8 109.5 108.8 108.2 0 0 1 0 0 0 0 0 0 0 0 39
40 124.2 0 109.5 115.3 124.8 109.5 108.8 0 0 0 1 0 0 0 0 0 0 0 40
41 92.9 0 124.2 109.5 115.3 124.8 109.5 0 0 0 0 1 0 0 0 0 0 0 41
42 98.4 0 92.9 124.2 109.5 115.3 124.8 0 0 0 0 0 1 0 0 0 0 0 42
43 120.9 0 98.4 92.9 124.2 109.5 115.3 0 0 0 0 0 0 1 0 0 0 0 43
44 111.7 0 120.9 98.4 92.9 124.2 109.5 0 0 0 0 0 0 0 1 0 0 0 44
45 116.1 0 111.7 120.9 98.4 92.9 124.2 0 0 0 0 0 0 0 0 1 0 0 45
46 109.4 0 116.1 111.7 120.9 98.4 92.9 0 0 0 0 0 0 0 0 0 1 0 46
47 111.7 0 109.4 116.1 111.7 120.9 98.4 0 0 0 0 0 0 0 0 0 0 1 47
48 114.3 0 111.7 109.4 116.1 111.7 120.9 0 0 0 0 0 0 0 0 0 0 0 48
49 133.7 0 114.3 111.7 109.4 116.1 111.7 1 0 0 0 0 0 0 0 0 0 0 49
50 114.3 0 133.7 114.3 111.7 109.4 116.1 0 1 0 0 0 0 0 0 0 0 0 50
51 126.5 0 114.3 133.7 114.3 111.7 109.4 0 0 1 0 0 0 0 0 0 0 0 51
52 131.0 0 126.5 114.3 133.7 114.3 111.7 0 0 0 1 0 0 0 0 0 0 0 52
53 104.0 0 131.0 126.5 114.3 133.7 114.3 0 0 0 0 1 0 0 0 0 0 0 53
54 108.9 0 104.0 131.0 126.5 114.3 133.7 0 0 0 0 0 1 0 0 0 0 0 54
55 128.5 0 108.9 104.0 131.0 126.5 114.3 0 0 0 0 0 0 1 0 0 0 0 55
56 132.4 0 128.5 108.9 104.0 131.0 126.5 0 0 0 0 0 0 0 1 0 0 0 56
57 128.0 0 132.4 128.5 108.9 104.0 131.0 0 0 0 0 0 0 0 0 1 0 0 57
58 116.4 0 128.0 132.4 128.5 108.9 104.0 0 0 0 0 0 0 0 0 0 1 0 58
59 120.9 0 116.4 128.0 132.4 128.5 108.9 0 0 0 0 0 0 0 0 0 0 1 59
60 118.6 0 120.9 116.4 128.0 132.4 128.5 0 0 0 0 0 0 0 0 0 0 0 60
61 133.1 0 118.6 120.9 116.4 128.0 132.4 1 0 0 0 0 0 0 0 0 0 0 61
62 121.1 0 133.1 118.6 120.9 116.4 128.0 0 1 0 0 0 0 0 0 0 0 0 62
63 127.6 0 121.1 133.1 118.6 120.9 116.4 0 0 1 0 0 0 0 0 0 0 0 63
64 135.4 0 127.6 121.1 133.1 118.6 120.9 0 0 0 1 0 0 0 0 0 0 0 64
65 114.9 0 135.4 127.6 121.1 133.1 118.6 0 0 0 0 1 0 0 0 0 0 0 65
66 114.3 0 114.9 135.4 127.6 121.1 133.1 0 0 0 0 0 1 0 0 0 0 0 66
67 128.9 0 114.3 114.9 135.4 127.6 121.1 0 0 0 0 0 0 1 0 0 0 0 67
68 138.9 0 128.9 114.3 114.9 135.4 127.6 0 0 0 0 0 0 0 1 0 0 0 68
69 129.4 0 138.9 128.9 114.3 114.9 135.4 0 0 0 0 0 0 0 0 1 0 0 69
70 115.0 0 129.4 138.9 128.9 114.3 114.9 0 0 0 0 0 0 0 0 0 1 0 70
71 128.0 0 115.0 129.4 138.9 128.9 114.3 0 0 0 0 0 0 0 0 0 0 1 71
72 127.0 0 128.0 115.0 129.4 138.9 128.9 0 0 0 0 0 0 0 0 0 0 0 72
73 128.8 0 127.0 128.0 115.0 129.4 138.9 1 0 0 0 0 0 0 0 0 0 0 73
74 137.9 0 128.8 127.0 128.0 115.0 129.4 0 1 0 0 0 0 0 0 0 0 0 74
75 128.4 0 137.9 128.8 127.0 128.0 115.0 0 0 1 0 0 0 0 0 0 0 0 75
76 135.9 0 128.4 137.9 128.8 127.0 128.0 0 0 0 1 0 0 0 0 0 0 0 76
77 122.2 0 135.9 128.4 137.9 128.8 127.0 0 0 0 0 1 0 0 0 0 0 0 77
78 113.1 0 122.2 135.9 128.4 137.9 128.8 0 0 0 0 0 1 0 0 0 0 0 78
79 136.2 1 113.1 122.2 135.9 128.4 137.9 0 0 0 0 0 0 1 0 0 0 0 79
80 138.0 1 136.2 113.1 122.2 135.9 128.4 0 0 0 0 0 0 0 1 0 0 0 80
81 115.2 1 138.0 136.2 113.1 122.2 135.9 0 0 0 0 0 0 0 0 1 0 0 81
82 111.0 1 115.2 138.0 136.2 113.1 122.2 0 0 0 0 0 0 0 0 0 1 0 82
83 99.2 1 111.0 115.2 138.0 136.2 113.1 0 0 0 0 0 0 0 0 0 0 1 83
84 102.4 1 99.2 111.0 115.2 138.0 136.2 0 0 0 0 0 0 0 0 0 0 0 84
85 112.7 1 102.4 99.2 111.0 115.2 138.0 1 0 0 0 0 0 0 0 0 0 0 85
86 105.5 1 112.7 102.4 99.2 111.0 115.2 0 1 0 0 0 0 0 0 0 0 0 86
87 98.3 1 105.5 112.7 102.4 99.2 111.0 0 0 1 0 0 0 0 0 0 0 0 87
88 116.4 1 98.3 105.5 112.7 102.4 99.2 0 0 0 1 0 0 0 0 0 0 0 88
89 97.4 1 116.4 98.3 105.5 112.7 102.4 0 0 0 0 1 0 0 0 0 0 0 89
90 93.3 1 97.4 116.4 98.3 105.5 112.7 0 0 0 0 0 1 0 0 0 0 0 90
91 117.4 1 93.3 97.4 116.4 98.3 105.5 0 0 0 0 0 0 1 0 0 0 0 91
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) x y1 y2 y3 y4
38.24345 -9.64428 0.06950 0.44837 0.54834 -0.22818
y5 M1 M2 M3 M4 M5
-0.21168 14.21327 1.26209 -7.01049 -0.04423 -13.50740
M6 M7 M8 M9 M10 M11
-16.96829 7.20522 21.34649 1.66102 -21.69985 -13.11919
t
0.16555
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-10.0388 -2.2730 0.3067 2.7118 8.6357
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 38.24345 8.67564 4.408 3.57e-05 ***
x -9.64428 2.37106 -4.068 0.000120 ***
y1 0.06950 0.11246 0.618 0.538538
y2 0.44837 0.10869 4.125 9.82e-05 ***
y3 0.54834 0.10083 5.438 7.01e-07 ***
y4 -0.22818 0.10417 -2.190 0.031735 *
y5 -0.21168 0.11377 -1.861 0.066887 .
M1 14.21327 2.47677 5.739 2.10e-07 ***
M2 1.26209 3.45136 0.366 0.715677
M3 -7.01049 3.74377 -1.873 0.065188 .
M4 -0.04423 3.33722 -0.013 0.989461
M5 -13.50740 2.92367 -4.620 1.64e-05 ***
M6 -16.96829 2.92947 -5.792 1.69e-07 ***
M7 7.20522 2.72179 2.647 0.009963 **
M8 21.34649 3.04820 7.003 1.09e-09 ***
M9 1.66102 4.66724 0.356 0.722964
M10 -21.69985 4.80183 -4.519 2.38e-05 ***
M11 -13.11919 3.93353 -3.335 0.001350 **
t 0.16555 0.04240 3.904 0.000211 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 4.085 on 72 degrees of freedom
Multiple R-squared: 0.9219, Adjusted R-squared: 0.9023
F-statistic: 47.2 on 18 and 72 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.69581988 0.60836024 0.3041801
[2,] 0.54031771 0.91936459 0.4596823
[3,] 0.44647753 0.89295506 0.5535225
[4,] 0.57236668 0.85526665 0.4276333
[5,] 0.46436944 0.92873888 0.5356306
[6,] 0.37933820 0.75867639 0.6206618
[7,] 0.33677189 0.67354378 0.6632281
[8,] 0.34711771 0.69423542 0.6528823
[9,] 0.43519602 0.87039203 0.5648040
[10,] 0.34721151 0.69442302 0.6527885
[11,] 0.28207035 0.56414069 0.7179297
[12,] 0.21288500 0.42577000 0.7871150
[13,] 0.16989616 0.33979233 0.8301038
[14,] 0.16695785 0.33391570 0.8330422
[15,] 0.11759213 0.23518425 0.8824079
[16,] 0.08044285 0.16088569 0.9195572
[17,] 0.05735391 0.11470781 0.9426461
[18,] 0.05809743 0.11619486 0.9419026
[19,] 0.03803616 0.07607232 0.9619638
[20,] 0.13383431 0.26766862 0.8661657
[21,] 0.09573858 0.19147716 0.9042614
[22,] 0.06712510 0.13425020 0.9328749
[23,] 0.12253476 0.24506952 0.8774652
[24,] 0.09575414 0.19150827 0.9042459
[25,] 0.07545076 0.15090151 0.9245492
[26,] 0.13257739 0.26515479 0.8674226
[27,] 0.10022238 0.20044476 0.8997776
[28,] 0.11813867 0.23627735 0.8818613
[29,] 0.14002197 0.28004395 0.8599780
[30,] 0.14233895 0.28467789 0.8576611
[31,] 0.10939818 0.21879636 0.8906018
[32,] 0.10661478 0.21322956 0.8933852
[33,] 0.08894537 0.17789074 0.9110546
[34,] 0.06074913 0.12149827 0.9392509
[35,] 0.07662196 0.15324392 0.9233780
[36,] 0.06122706 0.12245411 0.9387729
[37,] 0.04394259 0.08788518 0.9560574
[38,] 0.02986971 0.05973942 0.9701303
[39,] 0.03101335 0.06202669 0.9689867
[40,] 0.02191737 0.04383473 0.9780826
[41,] 0.03845952 0.07691904 0.9615405
[42,] 0.05378471 0.10756942 0.9462153
[43,] 0.03724313 0.07448626 0.9627569
[44,] 0.02243203 0.04486405 0.9775680
[45,] 0.01841880 0.03683760 0.9815812
[46,] 0.12298805 0.24597609 0.8770120
[47,] 0.10382298 0.20764595 0.8961770
[48,] 0.05171366 0.10342731 0.9482863
> postscript(file="/var/www/html/rcomp/tmp/1c5ve1262014961.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/2gnij1262014961.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/33eei1262014961.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/4n9wv1262014961.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/5smzl1262014961.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 = 91
Frequency = 1
1 2 3 4 5 6
0.0759216 0.4108981 8.3459247 0.7743710 1.7684744 -1.6651035
7 8 9 10 11 12
0.8087237 1.9679929 0.2634713 -2.0599658 -1.1516002 2.1694761
13 14 15 16 17 18
-2.7171930 -0.7059831 -3.3656660 -5.3386084 3.8332364 1.3374871
19 20 21 22 23 24
-0.7597054 -5.7172159 -2.3172088 4.3695218 -1.9248507 -2.2843216
25 26 27 28 29 30
2.6761603 2.7523477 -6.2026476 -0.2870361 0.4603151 2.9880083
31 32 33 34 35 36
-1.5022195 -3.1198071 -0.1751972 3.4280593 3.9590365 -0.4391580
37 38 39 40 41 42
0.4476983 0.3444353 -4.4727213 -0.3447938 -7.9195914 0.7112400
43 44 45 46 47 48
1.1290058 -7.1178828 0.3066727 2.9130363 6.3027123 -1.2869983
49 50 51 52 53 54
5.2526906 -5.7343049 4.9034152 0.5644934 -3.3058305 -2.2617141
55 56 57 58 59 60
0.9745133 5.4230583 3.5885633 -1.6036921 0.3001862 -2.9446495
61 62 63 64 65 66
1.5010002 -3.7356487 5.0364786 3.1101972 1.8532117 -0.7571524
67 68 69 70 71 72
-6.5968714 2.7474269 2.8284746 -4.6818131 2.5533294 4.4032850
73 74 75 76 77 78
-6.0897228 3.6939762 1.3280726 -0.1870902 -1.6420121 -2.1906229
79 80 81 82 83 84
8.6357095 5.8164277 -4.4947758 -2.3651465 -10.0388135 0.3823663
85 86 87 88 89 90
-1.1465553 2.9742794 -5.5728563 1.7084668 4.9521963 1.8378574
91
-2.6891561
> postscript(file="/var/www/html/rcomp/tmp/6o1fh1262014961.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 = 91
Frequency = 1
lag(myerror, k = 1) myerror
0 0.0759216 NA
1 0.4108981 0.0759216
2 8.3459247 0.4108981
3 0.7743710 8.3459247
4 1.7684744 0.7743710
5 -1.6651035 1.7684744
6 0.8087237 -1.6651035
7 1.9679929 0.8087237
8 0.2634713 1.9679929
9 -2.0599658 0.2634713
10 -1.1516002 -2.0599658
11 2.1694761 -1.1516002
12 -2.7171930 2.1694761
13 -0.7059831 -2.7171930
14 -3.3656660 -0.7059831
15 -5.3386084 -3.3656660
16 3.8332364 -5.3386084
17 1.3374871 3.8332364
18 -0.7597054 1.3374871
19 -5.7172159 -0.7597054
20 -2.3172088 -5.7172159
21 4.3695218 -2.3172088
22 -1.9248507 4.3695218
23 -2.2843216 -1.9248507
24 2.6761603 -2.2843216
25 2.7523477 2.6761603
26 -6.2026476 2.7523477
27 -0.2870361 -6.2026476
28 0.4603151 -0.2870361
29 2.9880083 0.4603151
30 -1.5022195 2.9880083
31 -3.1198071 -1.5022195
32 -0.1751972 -3.1198071
33 3.4280593 -0.1751972
34 3.9590365 3.4280593
35 -0.4391580 3.9590365
36 0.4476983 -0.4391580
37 0.3444353 0.4476983
38 -4.4727213 0.3444353
39 -0.3447938 -4.4727213
40 -7.9195914 -0.3447938
41 0.7112400 -7.9195914
42 1.1290058 0.7112400
43 -7.1178828 1.1290058
44 0.3066727 -7.1178828
45 2.9130363 0.3066727
46 6.3027123 2.9130363
47 -1.2869983 6.3027123
48 5.2526906 -1.2869983
49 -5.7343049 5.2526906
50 4.9034152 -5.7343049
51 0.5644934 4.9034152
52 -3.3058305 0.5644934
53 -2.2617141 -3.3058305
54 0.9745133 -2.2617141
55 5.4230583 0.9745133
56 3.5885633 5.4230583
57 -1.6036921 3.5885633
58 0.3001862 -1.6036921
59 -2.9446495 0.3001862
60 1.5010002 -2.9446495
61 -3.7356487 1.5010002
62 5.0364786 -3.7356487
63 3.1101972 5.0364786
64 1.8532117 3.1101972
65 -0.7571524 1.8532117
66 -6.5968714 -0.7571524
67 2.7474269 -6.5968714
68 2.8284746 2.7474269
69 -4.6818131 2.8284746
70 2.5533294 -4.6818131
71 4.4032850 2.5533294
72 -6.0897228 4.4032850
73 3.6939762 -6.0897228
74 1.3280726 3.6939762
75 -0.1870902 1.3280726
76 -1.6420121 -0.1870902
77 -2.1906229 -1.6420121
78 8.6357095 -2.1906229
79 5.8164277 8.6357095
80 -4.4947758 5.8164277
81 -2.3651465 -4.4947758
82 -10.0388135 -2.3651465
83 0.3823663 -10.0388135
84 -1.1465553 0.3823663
85 2.9742794 -1.1465553
86 -5.5728563 2.9742794
87 1.7084668 -5.5728563
88 4.9521963 1.7084668
89 1.8378574 4.9521963
90 -2.6891561 1.8378574
91 NA -2.6891561
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.4108981 0.0759216
[2,] 8.3459247 0.4108981
[3,] 0.7743710 8.3459247
[4,] 1.7684744 0.7743710
[5,] -1.6651035 1.7684744
[6,] 0.8087237 -1.6651035
[7,] 1.9679929 0.8087237
[8,] 0.2634713 1.9679929
[9,] -2.0599658 0.2634713
[10,] -1.1516002 -2.0599658
[11,] 2.1694761 -1.1516002
[12,] -2.7171930 2.1694761
[13,] -0.7059831 -2.7171930
[14,] -3.3656660 -0.7059831
[15,] -5.3386084 -3.3656660
[16,] 3.8332364 -5.3386084
[17,] 1.3374871 3.8332364
[18,] -0.7597054 1.3374871
[19,] -5.7172159 -0.7597054
[20,] -2.3172088 -5.7172159
[21,] 4.3695218 -2.3172088
[22,] -1.9248507 4.3695218
[23,] -2.2843216 -1.9248507
[24,] 2.6761603 -2.2843216
[25,] 2.7523477 2.6761603
[26,] -6.2026476 2.7523477
[27,] -0.2870361 -6.2026476
[28,] 0.4603151 -0.2870361
[29,] 2.9880083 0.4603151
[30,] -1.5022195 2.9880083
[31,] -3.1198071 -1.5022195
[32,] -0.1751972 -3.1198071
[33,] 3.4280593 -0.1751972
[34,] 3.9590365 3.4280593
[35,] -0.4391580 3.9590365
[36,] 0.4476983 -0.4391580
[37,] 0.3444353 0.4476983
[38,] -4.4727213 0.3444353
[39,] -0.3447938 -4.4727213
[40,] -7.9195914 -0.3447938
[41,] 0.7112400 -7.9195914
[42,] 1.1290058 0.7112400
[43,] -7.1178828 1.1290058
[44,] 0.3066727 -7.1178828
[45,] 2.9130363 0.3066727
[46,] 6.3027123 2.9130363
[47,] -1.2869983 6.3027123
[48,] 5.2526906 -1.2869983
[49,] -5.7343049 5.2526906
[50,] 4.9034152 -5.7343049
[51,] 0.5644934 4.9034152
[52,] -3.3058305 0.5644934
[53,] -2.2617141 -3.3058305
[54,] 0.9745133 -2.2617141
[55,] 5.4230583 0.9745133
[56,] 3.5885633 5.4230583
[57,] -1.6036921 3.5885633
[58,] 0.3001862 -1.6036921
[59,] -2.9446495 0.3001862
[60,] 1.5010002 -2.9446495
[61,] -3.7356487 1.5010002
[62,] 5.0364786 -3.7356487
[63,] 3.1101972 5.0364786
[64,] 1.8532117 3.1101972
[65,] -0.7571524 1.8532117
[66,] -6.5968714 -0.7571524
[67,] 2.7474269 -6.5968714
[68,] 2.8284746 2.7474269
[69,] -4.6818131 2.8284746
[70,] 2.5533294 -4.6818131
[71,] 4.4032850 2.5533294
[72,] -6.0897228 4.4032850
[73,] 3.6939762 -6.0897228
[74,] 1.3280726 3.6939762
[75,] -0.1870902 1.3280726
[76,] -1.6420121 -0.1870902
[77,] -2.1906229 -1.6420121
[78,] 8.6357095 -2.1906229
[79,] 5.8164277 8.6357095
[80,] -4.4947758 5.8164277
[81,] -2.3651465 -4.4947758
[82,] -10.0388135 -2.3651465
[83,] 0.3823663 -10.0388135
[84,] -1.1465553 0.3823663
[85,] 2.9742794 -1.1465553
[86,] -5.5728563 2.9742794
[87,] 1.7084668 -5.5728563
[88,] 4.9521963 1.7084668
[89,] 1.8378574 4.9521963
[90,] -2.6891561 1.8378574
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.4108981 0.0759216
2 8.3459247 0.4108981
3 0.7743710 8.3459247
4 1.7684744 0.7743710
5 -1.6651035 1.7684744
6 0.8087237 -1.6651035
7 1.9679929 0.8087237
8 0.2634713 1.9679929
9 -2.0599658 0.2634713
10 -1.1516002 -2.0599658
11 2.1694761 -1.1516002
12 -2.7171930 2.1694761
13 -0.7059831 -2.7171930
14 -3.3656660 -0.7059831
15 -5.3386084 -3.3656660
16 3.8332364 -5.3386084
17 1.3374871 3.8332364
18 -0.7597054 1.3374871
19 -5.7172159 -0.7597054
20 -2.3172088 -5.7172159
21 4.3695218 -2.3172088
22 -1.9248507 4.3695218
23 -2.2843216 -1.9248507
24 2.6761603 -2.2843216
25 2.7523477 2.6761603
26 -6.2026476 2.7523477
27 -0.2870361 -6.2026476
28 0.4603151 -0.2870361
29 2.9880083 0.4603151
30 -1.5022195 2.9880083
31 -3.1198071 -1.5022195
32 -0.1751972 -3.1198071
33 3.4280593 -0.1751972
34 3.9590365 3.4280593
35 -0.4391580 3.9590365
36 0.4476983 -0.4391580
37 0.3444353 0.4476983
38 -4.4727213 0.3444353
39 -0.3447938 -4.4727213
40 -7.9195914 -0.3447938
41 0.7112400 -7.9195914
42 1.1290058 0.7112400
43 -7.1178828 1.1290058
44 0.3066727 -7.1178828
45 2.9130363 0.3066727
46 6.3027123 2.9130363
47 -1.2869983 6.3027123
48 5.2526906 -1.2869983
49 -5.7343049 5.2526906
50 4.9034152 -5.7343049
51 0.5644934 4.9034152
52 -3.3058305 0.5644934
53 -2.2617141 -3.3058305
54 0.9745133 -2.2617141
55 5.4230583 0.9745133
56 3.5885633 5.4230583
57 -1.6036921 3.5885633
58 0.3001862 -1.6036921
59 -2.9446495 0.3001862
60 1.5010002 -2.9446495
61 -3.7356487 1.5010002
62 5.0364786 -3.7356487
63 3.1101972 5.0364786
64 1.8532117 3.1101972
65 -0.7571524 1.8532117
66 -6.5968714 -0.7571524
67 2.7474269 -6.5968714
68 2.8284746 2.7474269
69 -4.6818131 2.8284746
70 2.5533294 -4.6818131
71 4.4032850 2.5533294
72 -6.0897228 4.4032850
73 3.6939762 -6.0897228
74 1.3280726 3.6939762
75 -0.1870902 1.3280726
76 -1.6420121 -0.1870902
77 -2.1906229 -1.6420121
78 8.6357095 -2.1906229
79 5.8164277 8.6357095
80 -4.4947758 5.8164277
81 -2.3651465 -4.4947758
82 -10.0388135 -2.3651465
83 0.3823663 -10.0388135
84 -1.1465553 0.3823663
85 2.9742794 -1.1465553
86 -5.5728563 2.9742794
87 1.7084668 -5.5728563
88 4.9521963 1.7084668
89 1.8378574 4.9521963
90 -2.6891561 1.8378574
> 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/7jsr91262014961.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/8yep41262014961.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/9ki151262014961.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/10u5c61262014961.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/11wjql1262014961.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/12e8681262014961.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/13hbne1262014961.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/14o7q21262014961.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/155a541262014961.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/16ei6a1262014961.tab")
+ }
>
> try(system("convert tmp/1c5ve1262014961.ps tmp/1c5ve1262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/2gnij1262014961.ps tmp/2gnij1262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/33eei1262014961.ps tmp/33eei1262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/4n9wv1262014961.ps tmp/4n9wv1262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/5smzl1262014961.ps tmp/5smzl1262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/6o1fh1262014961.ps tmp/6o1fh1262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/7jsr91262014961.ps tmp/7jsr91262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/8yep41262014961.ps tmp/8yep41262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/9ki151262014961.ps tmp/9ki151262014961.png",intern=TRUE))
character(0)
> try(system("convert tmp/10u5c61262014961.ps tmp/10u5c61262014961.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
2.875 1.594 3.926