R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)
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(0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,1,2,1,1,0,1,1,1,0,2,0,1,0,1,0,2,0,1,1,2,0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,2,0,2,0,1,0,2,0,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,0,2,0,1,1,1,1,2,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,0,1,1,2,1,2,0,1,0,1,1,2,1,1,0,1,1,1,0,2,1,2,0,2,0,1,0,1,1,1,1,1,0,1,0,1,0),dim=c(2,154),dimnames=list(c('T20','Outcome'),1:154))
> y <- array(NA,dim=c(2,154),dimnames=list(c('T20','Outcome'),1:154))
> 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 = 'Do not include Seasonal Dummies'
> par1 = '1'
> par3 <- 'Linear Trend'
> par2 <- 'Do not include Seasonal 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, 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
T20 Outcome t
1 0 1 1
2 0 0 2
3 0 0 3
4 0 0 4
5 0 0 5
6 0 1 6
7 0 0 7
8 0 0 8
9 0 1 9
10 0 0 10
11 0 0 11
12 0 0 12
13 0 0 13
14 0 0 14
15 0 1 15
16 0 1 16
17 0 0 17
18 0 0 18
19 0 1 19
20 0 1 20
21 0 0 21
22 0 1 22
23 0 1 23
24 0 1 24
25 0 1 25
26 0 0 26
27 0 1 27
28 0 0 28
29 0 1 29
30 0 0 30
31 0 0 31
32 0 0 32
33 0 0 33
34 0 1 34
35 0 0 35
36 0 0 36
37 0 0 37
38 0 1 38
39 0 1 39
40 0 0 40
41 0 1 41
42 0 1 42
43 0 1 43
44 0 0 44
45 0 0 45
46 0 1 46
47 0 0 47
48 0 1 48
49 0 1 49
50 0 0 50
51 0 0 51
52 0 0 52
53 0 1 53
54 0 0 54
55 0 0 55
56 0 1 56
57 0 1 57
58 0 1 58
59 0 1 59
60 0 1 60
61 0 1 61
62 0 0 62
63 0 0 63
64 0 1 64
65 0 0 65
66 0 0 66
67 0 0 67
68 0 0 68
69 0 1 69
70 0 0 70
71 0 0 71
72 0 1 72
73 0 1 73
74 0 0 74
75 0 1 75
76 0 1 76
77 0 1 77
78 0 1 78
79 0 1 79
80 0 0 80
81 0 0 81
82 0 1 82
83 0 0 83
84 0 0 84
85 0 1 85
86 0 0 86
87 1 1 87
88 2 1 88
89 1 0 89
90 1 1 90
91 1 0 91
92 2 0 92
93 1 0 93
94 1 0 94
95 2 0 95
96 1 1 96
97 2 0 97
98 1 0 98
99 1 0 99
100 1 1 100
101 1 1 101
102 1 0 102
103 1 0 103
104 1 0 104
105 2 0 105
106 1 0 106
107 1 0 107
108 2 0 108
109 1 0 109
110 1 0 110
111 2 0 111
112 2 0 112
113 1 0 113
114 2 0 114
115 1 0 115
116 1 0 116
117 1 1 117
118 1 0 118
119 1 0 119
120 1 1 120
121 1 0 121
122 1 0 122
123 2 0 123
124 1 1 124
125 1 1 125
126 2 0 126
127 1 0 127
128 1 1 128
129 1 0 129
130 1 1 130
131 1 0 131
132 1 1 132
133 1 0 133
134 1 0 134
135 1 0 135
136 1 0 136
137 1 1 137
138 2 1 138
139 2 0 139
140 1 0 140
141 1 1 141
142 2 1 142
143 1 0 143
144 1 1 144
145 1 0 145
146 2 1 146
147 2 0 147
148 2 0 148
149 1 0 149
150 1 1 150
151 1 1 151
152 1 0 152
153 1 0 153
154 1 0 154
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Outcome t
-0.30751 -0.14214 0.01182
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.70869 -0.29326 -0.05862 0.19501 1.40982
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.3075134 0.0771793 -3.984 0.000105 ***
Outcome -0.1421423 0.0710522 -2.001 0.047235 *
t 0.0118163 0.0007817 15.116 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.4296 on 151 degrees of freedom
Multiple R-squared: 0.6134, Adjusted R-squared: 0.6082
F-statistic: 119.8 on 2 and 151 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.000000e+00 0.000000e+00 1.000000e+00
[2,] 0.000000e+00 0.000000e+00 1.000000e+00
[3,] 0.000000e+00 0.000000e+00 1.000000e+00
[4,] 0.000000e+00 0.000000e+00 1.000000e+00
[5,] 0.000000e+00 0.000000e+00 1.000000e+00
[6,] 0.000000e+00 0.000000e+00 1.000000e+00
[7,] 0.000000e+00 0.000000e+00 1.000000e+00
[8,] 0.000000e+00 0.000000e+00 1.000000e+00
[9,] 0.000000e+00 0.000000e+00 1.000000e+00
[10,] 0.000000e+00 0.000000e+00 1.000000e+00
[11,] 0.000000e+00 0.000000e+00 1.000000e+00
[12,] 0.000000e+00 0.000000e+00 1.000000e+00
[13,] 0.000000e+00 0.000000e+00 1.000000e+00
[14,] 0.000000e+00 0.000000e+00 1.000000e+00
[15,] 0.000000e+00 0.000000e+00 1.000000e+00
[16,] 0.000000e+00 0.000000e+00 1.000000e+00
[17,] 0.000000e+00 0.000000e+00 1.000000e+00
[18,] 0.000000e+00 0.000000e+00 1.000000e+00
[19,] 0.000000e+00 0.000000e+00 1.000000e+00
[20,] 0.000000e+00 0.000000e+00 1.000000e+00
[21,] 0.000000e+00 0.000000e+00 1.000000e+00
[22,] 0.000000e+00 0.000000e+00 1.000000e+00
[23,] 0.000000e+00 0.000000e+00 1.000000e+00
[24,] 0.000000e+00 0.000000e+00 1.000000e+00
[25,] 0.000000e+00 0.000000e+00 1.000000e+00
[26,] 0.000000e+00 0.000000e+00 1.000000e+00
[27,] 0.000000e+00 0.000000e+00 1.000000e+00
[28,] 0.000000e+00 0.000000e+00 1.000000e+00
[29,] 0.000000e+00 0.000000e+00 1.000000e+00
[30,] 0.000000e+00 0.000000e+00 1.000000e+00
[31,] 0.000000e+00 0.000000e+00 1.000000e+00
[32,] 0.000000e+00 0.000000e+00 1.000000e+00
[33,] 0.000000e+00 0.000000e+00 1.000000e+00
[34,] 0.000000e+00 0.000000e+00 1.000000e+00
[35,] 0.000000e+00 0.000000e+00 1.000000e+00
[36,] 0.000000e+00 0.000000e+00 1.000000e+00
[37,] 0.000000e+00 0.000000e+00 1.000000e+00
[38,] 0.000000e+00 0.000000e+00 1.000000e+00
[39,] 0.000000e+00 0.000000e+00 1.000000e+00
[40,] 0.000000e+00 0.000000e+00 1.000000e+00
[41,] 0.000000e+00 0.000000e+00 1.000000e+00
[42,] 0.000000e+00 0.000000e+00 1.000000e+00
[43,] 0.000000e+00 0.000000e+00 1.000000e+00
[44,] 0.000000e+00 0.000000e+00 1.000000e+00
[45,] 0.000000e+00 0.000000e+00 1.000000e+00
[46,] 0.000000e+00 0.000000e+00 1.000000e+00
[47,] 0.000000e+00 0.000000e+00 1.000000e+00
[48,] 0.000000e+00 0.000000e+00 1.000000e+00
[49,] 0.000000e+00 0.000000e+00 1.000000e+00
[50,] 0.000000e+00 0.000000e+00 1.000000e+00
[51,] 0.000000e+00 0.000000e+00 1.000000e+00
[52,] 0.000000e+00 0.000000e+00 1.000000e+00
[53,] 0.000000e+00 0.000000e+00 1.000000e+00
[54,] 0.000000e+00 0.000000e+00 1.000000e+00
[55,] 0.000000e+00 0.000000e+00 1.000000e+00
[56,] 0.000000e+00 0.000000e+00 1.000000e+00
[57,] 0.000000e+00 0.000000e+00 1.000000e+00
[58,] 0.000000e+00 0.000000e+00 1.000000e+00
[59,] 0.000000e+00 0.000000e+00 1.000000e+00
[60,] 0.000000e+00 0.000000e+00 1.000000e+00
[61,] 0.000000e+00 0.000000e+00 1.000000e+00
[62,] 0.000000e+00 0.000000e+00 1.000000e+00
[63,] 0.000000e+00 0.000000e+00 1.000000e+00
[64,] 0.000000e+00 0.000000e+00 1.000000e+00
[65,] 0.000000e+00 0.000000e+00 1.000000e+00
[66,] 0.000000e+00 0.000000e+00 1.000000e+00
[67,] 0.000000e+00 0.000000e+00 1.000000e+00
[68,] 0.000000e+00 0.000000e+00 1.000000e+00
[69,] 0.000000e+00 0.000000e+00 1.000000e+00
[70,] 0.000000e+00 0.000000e+00 1.000000e+00
[71,] 0.000000e+00 0.000000e+00 1.000000e+00
[72,] 0.000000e+00 0.000000e+00 1.000000e+00
[73,] 0.000000e+00 0.000000e+00 1.000000e+00
[74,] 0.000000e+00 0.000000e+00 1.000000e+00
[75,] 0.000000e+00 0.000000e+00 1.000000e+00
[76,] 0.000000e+00 0.000000e+00 1.000000e+00
[77,] 0.000000e+00 0.000000e+00 1.000000e+00
[78,] 0.000000e+00 0.000000e+00 1.000000e+00
[79,] 0.000000e+00 0.000000e+00 1.000000e+00
[80,] 0.000000e+00 0.000000e+00 1.000000e+00
[81,] 0.000000e+00 0.000000e+00 1.000000e+00
[82,] 1.287362e-29 2.574723e-29 1.000000e+00
[83,] 3.858763e-08 7.717526e-08 1.000000e+00
[84,] 6.917901e-07 1.383580e-06 9.999993e-01
[85,] 3.873583e-06 7.747166e-06 9.999961e-01
[86,] 1.754567e-05 3.509134e-05 9.999825e-01
[87,] 6.415085e-03 1.283017e-02 9.935849e-01
[88,] 8.235671e-03 1.647134e-02 9.917643e-01
[89,] 9.844328e-03 1.968866e-02 9.901557e-01
[90,] 8.718568e-02 1.743714e-01 9.128143e-01
[91,] 8.565512e-02 1.713102e-01 9.143449e-01
[92,] 2.652538e-01 5.305076e-01 7.347462e-01
[93,] 2.447188e-01 4.894376e-01 7.552812e-01
[94,] 2.242433e-01 4.484867e-01 7.757567e-01
[95,] 2.059785e-01 4.119569e-01 7.940215e-01
[96,] 1.875109e-01 3.750219e-01 8.124891e-01
[97,] 1.689311e-01 3.378622e-01 8.310689e-01
[98,] 1.519319e-01 3.038638e-01 8.480681e-01
[99,] 1.367376e-01 2.734751e-01 8.632624e-01
[100,] 2.576375e-01 5.152751e-01 7.423625e-01
[101,] 2.308689e-01 4.617378e-01 7.691311e-01
[102,] 2.070991e-01 4.141981e-01 7.929009e-01
[103,] 3.310458e-01 6.620917e-01 6.689542e-01
[104,] 2.974273e-01 5.948546e-01 7.025727e-01
[105,] 2.673739e-01 5.347478e-01 7.326261e-01
[106,] 3.912465e-01 7.824929e-01 6.087535e-01
[107,] 5.433680e-01 9.132639e-01 4.566320e-01
[108,] 4.958851e-01 9.917702e-01 5.041149e-01
[109,] 6.659535e-01 6.680930e-01 3.340465e-01
[110,] 6.173269e-01 7.653463e-01 3.826731e-01
[111,] 5.672710e-01 8.654579e-01 4.327290e-01
[112,] 5.149413e-01 9.701174e-01 4.850587e-01
[113,] 4.649847e-01 9.299695e-01 5.350153e-01
[114,] 4.168710e-01 8.337420e-01 5.831290e-01
[115,] 3.684850e-01 7.369700e-01 6.315150e-01
[116,] 3.265598e-01 6.531196e-01 6.734402e-01
[117,] 2.894071e-01 5.788142e-01 7.105929e-01
[118,] 4.163681e-01 8.327363e-01 5.836319e-01
[119,] 3.660893e-01 7.321785e-01 6.339107e-01
[120,] 3.207131e-01 6.414262e-01 6.792869e-01
[121,] 4.963701e-01 9.927403e-01 5.036299e-01
[122,] 4.388526e-01 8.777052e-01 5.611474e-01
[123,] 3.860281e-01 7.720561e-01 6.139719e-01
[124,] 3.326322e-01 6.652643e-01 6.673678e-01
[125,] 2.906866e-01 5.813732e-01 7.093134e-01
[126,] 2.463129e-01 4.926258e-01 7.536871e-01
[127,] 2.209942e-01 4.419884e-01 7.790058e-01
[128,] 1.890015e-01 3.780030e-01 8.109985e-01
[129,] 1.652715e-01 3.305431e-01 8.347285e-01
[130,] 1.525597e-01 3.051194e-01 8.474403e-01
[131,] 1.588532e-01 3.177064e-01 8.411468e-01
[132,] 1.929637e-01 3.859274e-01 8.070363e-01
[133,] 1.908590e-01 3.817181e-01 8.091410e-01
[134,] 2.149271e-01 4.298542e-01 7.850729e-01
[135,] 2.060509e-01 4.121017e-01 7.939491e-01
[136,] 2.327610e-01 4.655220e-01 7.672390e-01
[137,] 2.432207e-01 4.864414e-01 7.567793e-01
[138,] 2.766316e-01 5.532631e-01 7.233684e-01
[139,] 3.490181e-01 6.980363e-01 6.509819e-01
[140,] 8.064406e-01 3.871187e-01 1.935594e-01
[141,] 7.577722e-01 4.844555e-01 2.422278e-01
[142,] 6.757600e-01 6.484799e-01 3.242400e-01
[143,] 1.000000e+00 3.017540e-48 1.508770e-48
> postscript(file="/var/wessaorg/rcomp/tmp/1o7gi1356086490.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/222j31356086490.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3r2sc1356086490.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/4zm4c1356086490.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/57z061356086490.ps",horizontal=F,onefile=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 = 154
Frequency = 1
1 2 3 4 5
0.4378394434 0.2838808030 0.2720644853 0.2602481677 0.2484318500
6 7 8 9 10
0.3787578552 0.2247992147 0.2129828971 0.3433089022 0.1893502618
11 12 13 14 15
0.1775339441 0.1657176264 0.1539013088 0.1420849911 0.2724109963
16 17 18 19 20
0.2605946786 0.1066360382 0.0948197205 0.2251457257 0.2133294080
21 22 23 24 25
0.0593707676 0.1896967727 0.1778804551 0.1660641374 0.1542478198
26 27 28 29 30
0.0002891793 0.1306151844 -0.0233434560 0.1069825491 -0.0469760913
31 32 33 34 35
-0.0587924090 -0.0706087266 -0.0824250443 0.0479009609 -0.1060576796
36 37 38 39 40
-0.1178739972 -0.1296903149 0.0006356903 -0.0111806274 -0.1651392678
41 42 43 44 45
-0.0348132627 -0.0466295803 -0.0584458980 -0.2124045384 -0.2242208561
46 47 48 49 50
-0.0938948510 -0.2478534914 -0.1175274863 -0.1293438039 -0.2833024444
51 52 53 54 55
-0.2951187620 -0.3069350797 -0.1766090745 -0.3305677150 -0.3423840326
56 57 58 59 60
-0.2120580275 -0.2238743451 -0.2356906628 -0.2475069804 -0.2593232981
61 62 63 64 65
-0.2711396157 -0.4250982562 -0.4369145738 -0.3065885687 -0.4605472091
66 67 68 69 70
-0.4723635268 -0.4841798445 -0.4959961621 -0.3656701570 -0.5196287974
71 72 73 74 75
-0.5314451151 -0.4011191099 -0.4129354276 -0.5668940680 -0.4365680629
76 77 78 79 80
-0.4483843805 -0.4602006982 -0.4720170158 -0.4838333335 -0.6377919739
81 82 83 84 85
-0.6496082916 -0.5192822865 -0.6732409269 -0.6850572445 -0.5547312394
86 87 88 89 90
-0.7086898799 0.4216361253 1.4098198076 0.2558611672 0.3861871723
91 92 93 94 95
0.2322285319 1.2204122142 0.2085958966 0.1967795789 1.1849632613
96 97 98 99 100
0.3152892664 1.1613306260 0.1495143083 0.1376979907 0.2680239958
101 102 103 104 105
0.2562076781 0.1022490377 0.0904327200 0.0786164024 1.0668000847
106 107 108 109 110
0.0549837671 0.0431674494 1.0313511318 0.0195348141 0.0077184965
111 112 113 114 115
0.9959021788 0.9840858612 -0.0277304565 0.9604532259 -0.0513630918
116 117 118 119 120
-0.0631794094 0.0671465957 -0.0868120447 -0.0986283624 0.0316976427
121 122 123 124 125
-0.1222609977 -0.1340773154 0.8541063670 -0.0155676279 -0.0273839455
126 127 128 129 130
0.8186574140 -0.1931589036 -0.0628328985 -0.2167915389 -0.0864655338
131 132 133 134 135
-0.2404241742 -0.1100981691 -0.2640568095 -0.2758731272 -0.2876894448
136 137 138 139 140
-0.2995057625 -0.1691797574 0.8190039250 0.6650452846 -0.3467710331
141 142 143 144 145
-0.2164450280 0.7717386544 -0.3822199861 -0.2518939809 -0.4058526214
146 147 148 149 150
0.7244733838 0.5705147433 0.5586984257 -0.4531178920 -0.3227918868
151 152 153 154
-0.3346082045 -0.4885668449 -0.5003831626 -0.5121994802
> postscript(file="/var/wessaorg/rcomp/tmp/6eilx1356086491.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 154
Frequency = 1
lag(myerror, k = 1) myerror
0 0.4378394434 NA
1 0.2838808030 0.4378394434
2 0.2720644853 0.2838808030
3 0.2602481677 0.2720644853
4 0.2484318500 0.2602481677
5 0.3787578552 0.2484318500
6 0.2247992147 0.3787578552
7 0.2129828971 0.2247992147
8 0.3433089022 0.2129828971
9 0.1893502618 0.3433089022
10 0.1775339441 0.1893502618
11 0.1657176264 0.1775339441
12 0.1539013088 0.1657176264
13 0.1420849911 0.1539013088
14 0.2724109963 0.1420849911
15 0.2605946786 0.2724109963
16 0.1066360382 0.2605946786
17 0.0948197205 0.1066360382
18 0.2251457257 0.0948197205
19 0.2133294080 0.2251457257
20 0.0593707676 0.2133294080
21 0.1896967727 0.0593707676
22 0.1778804551 0.1896967727
23 0.1660641374 0.1778804551
24 0.1542478198 0.1660641374
25 0.0002891793 0.1542478198
26 0.1306151844 0.0002891793
27 -0.0233434560 0.1306151844
28 0.1069825491 -0.0233434560
29 -0.0469760913 0.1069825491
30 -0.0587924090 -0.0469760913
31 -0.0706087266 -0.0587924090
32 -0.0824250443 -0.0706087266
33 0.0479009609 -0.0824250443
34 -0.1060576796 0.0479009609
35 -0.1178739972 -0.1060576796
36 -0.1296903149 -0.1178739972
37 0.0006356903 -0.1296903149
38 -0.0111806274 0.0006356903
39 -0.1651392678 -0.0111806274
40 -0.0348132627 -0.1651392678
41 -0.0466295803 -0.0348132627
42 -0.0584458980 -0.0466295803
43 -0.2124045384 -0.0584458980
44 -0.2242208561 -0.2124045384
45 -0.0938948510 -0.2242208561
46 -0.2478534914 -0.0938948510
47 -0.1175274863 -0.2478534914
48 -0.1293438039 -0.1175274863
49 -0.2833024444 -0.1293438039
50 -0.2951187620 -0.2833024444
51 -0.3069350797 -0.2951187620
52 -0.1766090745 -0.3069350797
53 -0.3305677150 -0.1766090745
54 -0.3423840326 -0.3305677150
55 -0.2120580275 -0.3423840326
56 -0.2238743451 -0.2120580275
57 -0.2356906628 -0.2238743451
58 -0.2475069804 -0.2356906628
59 -0.2593232981 -0.2475069804
60 -0.2711396157 -0.2593232981
61 -0.4250982562 -0.2711396157
62 -0.4369145738 -0.4250982562
63 -0.3065885687 -0.4369145738
64 -0.4605472091 -0.3065885687
65 -0.4723635268 -0.4605472091
66 -0.4841798445 -0.4723635268
67 -0.4959961621 -0.4841798445
68 -0.3656701570 -0.4959961621
69 -0.5196287974 -0.3656701570
70 -0.5314451151 -0.5196287974
71 -0.4011191099 -0.5314451151
72 -0.4129354276 -0.4011191099
73 -0.5668940680 -0.4129354276
74 -0.4365680629 -0.5668940680
75 -0.4483843805 -0.4365680629
76 -0.4602006982 -0.4483843805
77 -0.4720170158 -0.4602006982
78 -0.4838333335 -0.4720170158
79 -0.6377919739 -0.4838333335
80 -0.6496082916 -0.6377919739
81 -0.5192822865 -0.6496082916
82 -0.6732409269 -0.5192822865
83 -0.6850572445 -0.6732409269
84 -0.5547312394 -0.6850572445
85 -0.7086898799 -0.5547312394
86 0.4216361253 -0.7086898799
87 1.4098198076 0.4216361253
88 0.2558611672 1.4098198076
89 0.3861871723 0.2558611672
90 0.2322285319 0.3861871723
91 1.2204122142 0.2322285319
92 0.2085958966 1.2204122142
93 0.1967795789 0.2085958966
94 1.1849632613 0.1967795789
95 0.3152892664 1.1849632613
96 1.1613306260 0.3152892664
97 0.1495143083 1.1613306260
98 0.1376979907 0.1495143083
99 0.2680239958 0.1376979907
100 0.2562076781 0.2680239958
101 0.1022490377 0.2562076781
102 0.0904327200 0.1022490377
103 0.0786164024 0.0904327200
104 1.0668000847 0.0786164024
105 0.0549837671 1.0668000847
106 0.0431674494 0.0549837671
107 1.0313511318 0.0431674494
108 0.0195348141 1.0313511318
109 0.0077184965 0.0195348141
110 0.9959021788 0.0077184965
111 0.9840858612 0.9959021788
112 -0.0277304565 0.9840858612
113 0.9604532259 -0.0277304565
114 -0.0513630918 0.9604532259
115 -0.0631794094 -0.0513630918
116 0.0671465957 -0.0631794094
117 -0.0868120447 0.0671465957
118 -0.0986283624 -0.0868120447
119 0.0316976427 -0.0986283624
120 -0.1222609977 0.0316976427
121 -0.1340773154 -0.1222609977
122 0.8541063670 -0.1340773154
123 -0.0155676279 0.8541063670
124 -0.0273839455 -0.0155676279
125 0.8186574140 -0.0273839455
126 -0.1931589036 0.8186574140
127 -0.0628328985 -0.1931589036
128 -0.2167915389 -0.0628328985
129 -0.0864655338 -0.2167915389
130 -0.2404241742 -0.0864655338
131 -0.1100981691 -0.2404241742
132 -0.2640568095 -0.1100981691
133 -0.2758731272 -0.2640568095
134 -0.2876894448 -0.2758731272
135 -0.2995057625 -0.2876894448
136 -0.1691797574 -0.2995057625
137 0.8190039250 -0.1691797574
138 0.6650452846 0.8190039250
139 -0.3467710331 0.6650452846
140 -0.2164450280 -0.3467710331
141 0.7717386544 -0.2164450280
142 -0.3822199861 0.7717386544
143 -0.2518939809 -0.3822199861
144 -0.4058526214 -0.2518939809
145 0.7244733838 -0.4058526214
146 0.5705147433 0.7244733838
147 0.5586984257 0.5705147433
148 -0.4531178920 0.5586984257
149 -0.3227918868 -0.4531178920
150 -0.3346082045 -0.3227918868
151 -0.4885668449 -0.3346082045
152 -0.5003831626 -0.4885668449
153 -0.5121994802 -0.5003831626
154 NA -0.5121994802
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.2838808030 0.4378394434
[2,] 0.2720644853 0.2838808030
[3,] 0.2602481677 0.2720644853
[4,] 0.2484318500 0.2602481677
[5,] 0.3787578552 0.2484318500
[6,] 0.2247992147 0.3787578552
[7,] 0.2129828971 0.2247992147
[8,] 0.3433089022 0.2129828971
[9,] 0.1893502618 0.3433089022
[10,] 0.1775339441 0.1893502618
[11,] 0.1657176264 0.1775339441
[12,] 0.1539013088 0.1657176264
[13,] 0.1420849911 0.1539013088
[14,] 0.2724109963 0.1420849911
[15,] 0.2605946786 0.2724109963
[16,] 0.1066360382 0.2605946786
[17,] 0.0948197205 0.1066360382
[18,] 0.2251457257 0.0948197205
[19,] 0.2133294080 0.2251457257
[20,] 0.0593707676 0.2133294080
[21,] 0.1896967727 0.0593707676
[22,] 0.1778804551 0.1896967727
[23,] 0.1660641374 0.1778804551
[24,] 0.1542478198 0.1660641374
[25,] 0.0002891793 0.1542478198
[26,] 0.1306151844 0.0002891793
[27,] -0.0233434560 0.1306151844
[28,] 0.1069825491 -0.0233434560
[29,] -0.0469760913 0.1069825491
[30,] -0.0587924090 -0.0469760913
[31,] -0.0706087266 -0.0587924090
[32,] -0.0824250443 -0.0706087266
[33,] 0.0479009609 -0.0824250443
[34,] -0.1060576796 0.0479009609
[35,] -0.1178739972 -0.1060576796
[36,] -0.1296903149 -0.1178739972
[37,] 0.0006356903 -0.1296903149
[38,] -0.0111806274 0.0006356903
[39,] -0.1651392678 -0.0111806274
[40,] -0.0348132627 -0.1651392678
[41,] -0.0466295803 -0.0348132627
[42,] -0.0584458980 -0.0466295803
[43,] -0.2124045384 -0.0584458980
[44,] -0.2242208561 -0.2124045384
[45,] -0.0938948510 -0.2242208561
[46,] -0.2478534914 -0.0938948510
[47,] -0.1175274863 -0.2478534914
[48,] -0.1293438039 -0.1175274863
[49,] -0.2833024444 -0.1293438039
[50,] -0.2951187620 -0.2833024444
[51,] -0.3069350797 -0.2951187620
[52,] -0.1766090745 -0.3069350797
[53,] -0.3305677150 -0.1766090745
[54,] -0.3423840326 -0.3305677150
[55,] -0.2120580275 -0.3423840326
[56,] -0.2238743451 -0.2120580275
[57,] -0.2356906628 -0.2238743451
[58,] -0.2475069804 -0.2356906628
[59,] -0.2593232981 -0.2475069804
[60,] -0.2711396157 -0.2593232981
[61,] -0.4250982562 -0.2711396157
[62,] -0.4369145738 -0.4250982562
[63,] -0.3065885687 -0.4369145738
[64,] -0.4605472091 -0.3065885687
[65,] -0.4723635268 -0.4605472091
[66,] -0.4841798445 -0.4723635268
[67,] -0.4959961621 -0.4841798445
[68,] -0.3656701570 -0.4959961621
[69,] -0.5196287974 -0.3656701570
[70,] -0.5314451151 -0.5196287974
[71,] -0.4011191099 -0.5314451151
[72,] -0.4129354276 -0.4011191099
[73,] -0.5668940680 -0.4129354276
[74,] -0.4365680629 -0.5668940680
[75,] -0.4483843805 -0.4365680629
[76,] -0.4602006982 -0.4483843805
[77,] -0.4720170158 -0.4602006982
[78,] -0.4838333335 -0.4720170158
[79,] -0.6377919739 -0.4838333335
[80,] -0.6496082916 -0.6377919739
[81,] -0.5192822865 -0.6496082916
[82,] -0.6732409269 -0.5192822865
[83,] -0.6850572445 -0.6732409269
[84,] -0.5547312394 -0.6850572445
[85,] -0.7086898799 -0.5547312394
[86,] 0.4216361253 -0.7086898799
[87,] 1.4098198076 0.4216361253
[88,] 0.2558611672 1.4098198076
[89,] 0.3861871723 0.2558611672
[90,] 0.2322285319 0.3861871723
[91,] 1.2204122142 0.2322285319
[92,] 0.2085958966 1.2204122142
[93,] 0.1967795789 0.2085958966
[94,] 1.1849632613 0.1967795789
[95,] 0.3152892664 1.1849632613
[96,] 1.1613306260 0.3152892664
[97,] 0.1495143083 1.1613306260
[98,] 0.1376979907 0.1495143083
[99,] 0.2680239958 0.1376979907
[100,] 0.2562076781 0.2680239958
[101,] 0.1022490377 0.2562076781
[102,] 0.0904327200 0.1022490377
[103,] 0.0786164024 0.0904327200
[104,] 1.0668000847 0.0786164024
[105,] 0.0549837671 1.0668000847
[106,] 0.0431674494 0.0549837671
[107,] 1.0313511318 0.0431674494
[108,] 0.0195348141 1.0313511318
[109,] 0.0077184965 0.0195348141
[110,] 0.9959021788 0.0077184965
[111,] 0.9840858612 0.9959021788
[112,] -0.0277304565 0.9840858612
[113,] 0.9604532259 -0.0277304565
[114,] -0.0513630918 0.9604532259
[115,] -0.0631794094 -0.0513630918
[116,] 0.0671465957 -0.0631794094
[117,] -0.0868120447 0.0671465957
[118,] -0.0986283624 -0.0868120447
[119,] 0.0316976427 -0.0986283624
[120,] -0.1222609977 0.0316976427
[121,] -0.1340773154 -0.1222609977
[122,] 0.8541063670 -0.1340773154
[123,] -0.0155676279 0.8541063670
[124,] -0.0273839455 -0.0155676279
[125,] 0.8186574140 -0.0273839455
[126,] -0.1931589036 0.8186574140
[127,] -0.0628328985 -0.1931589036
[128,] -0.2167915389 -0.0628328985
[129,] -0.0864655338 -0.2167915389
[130,] -0.2404241742 -0.0864655338
[131,] -0.1100981691 -0.2404241742
[132,] -0.2640568095 -0.1100981691
[133,] -0.2758731272 -0.2640568095
[134,] -0.2876894448 -0.2758731272
[135,] -0.2995057625 -0.2876894448
[136,] -0.1691797574 -0.2995057625
[137,] 0.8190039250 -0.1691797574
[138,] 0.6650452846 0.8190039250
[139,] -0.3467710331 0.6650452846
[140,] -0.2164450280 -0.3467710331
[141,] 0.7717386544 -0.2164450280
[142,] -0.3822199861 0.7717386544
[143,] -0.2518939809 -0.3822199861
[144,] -0.4058526214 -0.2518939809
[145,] 0.7244733838 -0.4058526214
[146,] 0.5705147433 0.7244733838
[147,] 0.5586984257 0.5705147433
[148,] -0.4531178920 0.5586984257
[149,] -0.3227918868 -0.4531178920
[150,] -0.3346082045 -0.3227918868
[151,] -0.4885668449 -0.3346082045
[152,] -0.5003831626 -0.4885668449
[153,] -0.5121994802 -0.5003831626
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.2838808030 0.4378394434
2 0.2720644853 0.2838808030
3 0.2602481677 0.2720644853
4 0.2484318500 0.2602481677
5 0.3787578552 0.2484318500
6 0.2247992147 0.3787578552
7 0.2129828971 0.2247992147
8 0.3433089022 0.2129828971
9 0.1893502618 0.3433089022
10 0.1775339441 0.1893502618
11 0.1657176264 0.1775339441
12 0.1539013088 0.1657176264
13 0.1420849911 0.1539013088
14 0.2724109963 0.1420849911
15 0.2605946786 0.2724109963
16 0.1066360382 0.2605946786
17 0.0948197205 0.1066360382
18 0.2251457257 0.0948197205
19 0.2133294080 0.2251457257
20 0.0593707676 0.2133294080
21 0.1896967727 0.0593707676
22 0.1778804551 0.1896967727
23 0.1660641374 0.1778804551
24 0.1542478198 0.1660641374
25 0.0002891793 0.1542478198
26 0.1306151844 0.0002891793
27 -0.0233434560 0.1306151844
28 0.1069825491 -0.0233434560
29 -0.0469760913 0.1069825491
30 -0.0587924090 -0.0469760913
31 -0.0706087266 -0.0587924090
32 -0.0824250443 -0.0706087266
33 0.0479009609 -0.0824250443
34 -0.1060576796 0.0479009609
35 -0.1178739972 -0.1060576796
36 -0.1296903149 -0.1178739972
37 0.0006356903 -0.1296903149
38 -0.0111806274 0.0006356903
39 -0.1651392678 -0.0111806274
40 -0.0348132627 -0.1651392678
41 -0.0466295803 -0.0348132627
42 -0.0584458980 -0.0466295803
43 -0.2124045384 -0.0584458980
44 -0.2242208561 -0.2124045384
45 -0.0938948510 -0.2242208561
46 -0.2478534914 -0.0938948510
47 -0.1175274863 -0.2478534914
48 -0.1293438039 -0.1175274863
49 -0.2833024444 -0.1293438039
50 -0.2951187620 -0.2833024444
51 -0.3069350797 -0.2951187620
52 -0.1766090745 -0.3069350797
53 -0.3305677150 -0.1766090745
54 -0.3423840326 -0.3305677150
55 -0.2120580275 -0.3423840326
56 -0.2238743451 -0.2120580275
57 -0.2356906628 -0.2238743451
58 -0.2475069804 -0.2356906628
59 -0.2593232981 -0.2475069804
60 -0.2711396157 -0.2593232981
61 -0.4250982562 -0.2711396157
62 -0.4369145738 -0.4250982562
63 -0.3065885687 -0.4369145738
64 -0.4605472091 -0.3065885687
65 -0.4723635268 -0.4605472091
66 -0.4841798445 -0.4723635268
67 -0.4959961621 -0.4841798445
68 -0.3656701570 -0.4959961621
69 -0.5196287974 -0.3656701570
70 -0.5314451151 -0.5196287974
71 -0.4011191099 -0.5314451151
72 -0.4129354276 -0.4011191099
73 -0.5668940680 -0.4129354276
74 -0.4365680629 -0.5668940680
75 -0.4483843805 -0.4365680629
76 -0.4602006982 -0.4483843805
77 -0.4720170158 -0.4602006982
78 -0.4838333335 -0.4720170158
79 -0.6377919739 -0.4838333335
80 -0.6496082916 -0.6377919739
81 -0.5192822865 -0.6496082916
82 -0.6732409269 -0.5192822865
83 -0.6850572445 -0.6732409269
84 -0.5547312394 -0.6850572445
85 -0.7086898799 -0.5547312394
86 0.4216361253 -0.7086898799
87 1.4098198076 0.4216361253
88 0.2558611672 1.4098198076
89 0.3861871723 0.2558611672
90 0.2322285319 0.3861871723
91 1.2204122142 0.2322285319
92 0.2085958966 1.2204122142
93 0.1967795789 0.2085958966
94 1.1849632613 0.1967795789
95 0.3152892664 1.1849632613
96 1.1613306260 0.3152892664
97 0.1495143083 1.1613306260
98 0.1376979907 0.1495143083
99 0.2680239958 0.1376979907
100 0.2562076781 0.2680239958
101 0.1022490377 0.2562076781
102 0.0904327200 0.1022490377
103 0.0786164024 0.0904327200
104 1.0668000847 0.0786164024
105 0.0549837671 1.0668000847
106 0.0431674494 0.0549837671
107 1.0313511318 0.0431674494
108 0.0195348141 1.0313511318
109 0.0077184965 0.0195348141
110 0.9959021788 0.0077184965
111 0.9840858612 0.9959021788
112 -0.0277304565 0.9840858612
113 0.9604532259 -0.0277304565
114 -0.0513630918 0.9604532259
115 -0.0631794094 -0.0513630918
116 0.0671465957 -0.0631794094
117 -0.0868120447 0.0671465957
118 -0.0986283624 -0.0868120447
119 0.0316976427 -0.0986283624
120 -0.1222609977 0.0316976427
121 -0.1340773154 -0.1222609977
122 0.8541063670 -0.1340773154
123 -0.0155676279 0.8541063670
124 -0.0273839455 -0.0155676279
125 0.8186574140 -0.0273839455
126 -0.1931589036 0.8186574140
127 -0.0628328985 -0.1931589036
128 -0.2167915389 -0.0628328985
129 -0.0864655338 -0.2167915389
130 -0.2404241742 -0.0864655338
131 -0.1100981691 -0.2404241742
132 -0.2640568095 -0.1100981691
133 -0.2758731272 -0.2640568095
134 -0.2876894448 -0.2758731272
135 -0.2995057625 -0.2876894448
136 -0.1691797574 -0.2995057625
137 0.8190039250 -0.1691797574
138 0.6650452846 0.8190039250
139 -0.3467710331 0.6650452846
140 -0.2164450280 -0.3467710331
141 0.7717386544 -0.2164450280
142 -0.3822199861 0.7717386544
143 -0.2518939809 -0.3822199861
144 -0.4058526214 -0.2518939809
145 0.7244733838 -0.4058526214
146 0.5705147433 0.7244733838
147 0.5586984257 0.5705147433
148 -0.4531178920 0.5586984257
149 -0.3227918868 -0.4531178920
150 -0.3346082045 -0.3227918868
151 -0.4885668449 -0.3346082045
152 -0.5003831626 -0.4885668449
153 -0.5121994802 -0.5003831626
> 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/wessaorg/rcomp/tmp/7hwf41356086491.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/8fnn71356086491.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/98a8j1356086491.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/10rsuw1356086491.ps",horizontal=F,onefile=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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/118o831356086491.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/wessaorg/rcomp/tmp/123c8n1356086491.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/wessaorg/rcomp/tmp/13jl4j1356086491.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/wessaorg/rcomp/tmp/14fzsa1356086491.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/wessaorg/rcomp/tmp/15a4um1356086491.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/wessaorg/rcomp/tmp/16p3ai1356086491.tab")
+ }
>
> try(system("convert tmp/1o7gi1356086490.ps tmp/1o7gi1356086490.png",intern=TRUE))
character(0)
> try(system("convert tmp/222j31356086490.ps tmp/222j31356086490.png",intern=TRUE))
character(0)
> try(system("convert tmp/3r2sc1356086490.ps tmp/3r2sc1356086490.png",intern=TRUE))
character(0)
> try(system("convert tmp/4zm4c1356086490.ps tmp/4zm4c1356086490.png",intern=TRUE))
character(0)
> try(system("convert tmp/57z061356086490.ps tmp/57z061356086490.png",intern=TRUE))
character(0)
> try(system("convert tmp/6eilx1356086491.ps tmp/6eilx1356086491.png",intern=TRUE))
character(0)
> try(system("convert tmp/7hwf41356086491.ps tmp/7hwf41356086491.png",intern=TRUE))
character(0)
> try(system("convert tmp/8fnn71356086491.ps tmp/8fnn71356086491.png",intern=TRUE))
character(0)
> try(system("convert tmp/98a8j1356086491.ps tmp/98a8j1356086491.png",intern=TRUE))
character(0)
> try(system("convert tmp/10rsuw1356086491.ps tmp/10rsuw1356086491.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.171 0.910 8.313