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(26
+ ,24
+ ,14
+ ,11
+ ,12
+ ,24
+ ,23
+ ,25
+ ,11
+ ,7
+ ,8
+ ,25
+ ,25
+ ,17
+ ,6
+ ,17
+ ,8
+ ,30
+ ,23
+ ,18
+ ,12
+ ,10
+ ,8
+ ,19
+ ,19
+ ,18
+ ,8
+ ,12
+ ,9
+ ,22
+ ,29
+ ,16
+ ,10
+ ,12
+ ,7
+ ,22
+ ,25
+ ,20
+ ,10
+ ,11
+ ,4
+ ,25
+ ,21
+ ,16
+ ,11
+ ,11
+ ,11
+ ,23
+ ,22
+ ,18
+ ,16
+ ,12
+ ,7
+ ,17
+ ,25
+ ,17
+ ,11
+ ,13
+ ,7
+ ,21
+ ,24
+ ,23
+ ,13
+ ,14
+ ,12
+ ,19
+ ,18
+ ,30
+ ,12
+ ,16
+ ,10
+ ,19
+ ,22
+ ,23
+ ,8
+ ,11
+ ,10
+ ,15
+ ,15
+ ,18
+ ,12
+ ,10
+ ,8
+ ,16
+ ,22
+ ,15
+ ,11
+ ,11
+ ,8
+ ,23
+ ,28
+ ,12
+ ,4
+ ,15
+ ,4
+ ,27
+ ,20
+ ,21
+ ,9
+ ,9
+ ,9
+ ,22
+ ,12
+ ,15
+ ,8
+ ,11
+ ,8
+ ,14
+ ,24
+ ,20
+ ,8
+ ,17
+ ,7
+ ,22
+ ,20
+ ,31
+ ,14
+ ,17
+ ,11
+ ,23
+ ,21
+ ,27
+ ,15
+ ,11
+ ,9
+ ,23
+ ,20
+ ,34
+ ,16
+ ,18
+ ,11
+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ations','ParentalCriticism','PersonalStandards'),1:159))
> 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 = '5'
> #'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
ParentalCriticism Organization ConcernOverMistakes DoubtsAboutActions
1 12 26 24 14
2 8 23 25 11
3 8 25 17 6
4 8 23 18 12
5 9 19 18 8
6 7 29 16 10
7 4 25 20 10
8 11 21 16 11
9 7 22 18 16
10 7 25 17 11
11 12 24 23 13
12 10 18 30 12
13 10 22 23 8
14 8 15 18 12
15 8 22 15 11
16 4 28 12 4
17 9 20 21 9
18 8 12 15 8
19 7 24 20 8
20 11 20 31 14
21 9 21 27 15
22 11 20 34 16
23 13 21 21 9
24 8 23 31 14
25 8 28 19 11
26 9 24 16 8
27 6 24 20 9
28 9 24 21 9
29 9 23 22 9
30 6 23 17 9
31 6 29 24 10
32 16 24 25 16
33 5 18 26 11
34 7 25 25 8
35 9 21 17 9
36 6 26 32 16
37 6 22 33 11
38 5 22 13 16
39 12 22 32 12
40 7 23 25 12
41 10 30 29 14
42 9 23 22 9
43 8 17 18 10
44 5 23 17 9
45 8 23 20 10
46 8 25 15 12
47 10 24 20 14
48 6 24 33 14
49 8 23 29 10
50 7 21 23 14
51 4 24 26 16
52 8 24 18 9
53 8 28 20 10
54 4 16 11 6
55 20 20 28 8
56 8 29 26 13
57 8 27 22 10
58 6 22 17 8
59 4 28 12 7
60 8 16 14 15
61 9 25 17 9
62 6 24 21 10
63 7 28 19 12
64 9 24 18 13
65 5 23 10 10
66 5 30 29 11
67 8 24 31 8
68 8 21 19 9
69 6 25 9 13
70 8 25 20 11
71 7 22 28 8
72 7 23 19 9
73 9 26 30 9
74 11 23 29 15
75 6 25 26 9
76 8 21 23 10
77 6 25 13 14
78 9 24 21 12
79 8 29 19 12
80 6 22 28 11
81 10 27 23 14
82 8 26 18 6
83 8 22 21 12
84 10 24 20 8
85 5 27 23 14
86 7 24 21 11
87 5 24 21 10
88 8 29 15 14
89 14 22 28 12
90 7 21 19 10
91 8 24 26 14
92 6 24 10 5
93 5 23 16 11
94 6 20 22 10
95 10 27 19 9
96 12 26 31 10
97 9 25 31 16
98 12 21 29 13
99 7 21 19 9
100 8 19 22 10
101 10 21 23 10
102 6 21 15 7
103 10 16 20 9
104 10 22 18 8
105 10 29 23 14
106 5 15 25 14
107 7 17 21 8
108 10 15 24 9
109 11 21 25 14
110 6 21 17 14
111 7 19 13 8
112 12 24 28 8
113 11 20 21 8
114 11 17 25 7
115 11 23 9 6
116 5 24 16 8
117 8 14 19 6
118 6 19 17 11
119 9 24 25 14
120 4 13 20 11
121 4 22 29 11
122 7 16 14 11
123 11 19 22 14
124 6 25 15 8
125 7 25 19 20
126 8 23 20 11
127 4 24 15 8
128 8 26 20 11
129 9 26 18 10
130 8 25 33 14
131 11 18 22 11
132 8 21 16 9
133 5 26 17 9
134 4 23 16 8
135 8 23 21 10
136 10 22 26 13
137 6 20 18 13
138 9 13 18 12
139 9 24 17 8
140 13 15 22 13
141 9 14 30 14
142 10 22 30 12
143 20 10 24 14
144 5 24 21 15
145 11 22 21 13
146 6 24 29 16
147 9 19 31 9
148 7 20 20 9
149 9 13 16 9
150 10 20 22 8
151 9 22 20 7
152 8 24 28 16
153 7 29 38 11
154 6 12 22 9
155 13 20 20 11
156 6 21 17 9
157 8 24 28 14
158 10 22 22 13
159 16 20 31 16
ParentalExpectations PersonalStandards t
1 11 24 1
2 7 25 2
3 17 30 3
4 10 19 4
5 12 22 5
6 12 22 6
7 11 25 7
8 11 23 8
9 12 17 9
10 13 21 10
11 14 19 11
12 16 19 12
13 11 15 13
14 10 16 14
15 11 23 15
16 15 27 16
17 9 22 17
18 11 14 18
19 17 22 19
20 17 23 20
21 11 23 21
22 18 21 22
23 14 19 23
24 10 18 24
25 11 20 25
26 15 23 26
27 15 25 27
28 13 19 28
29 16 24 29
30 13 22 30
31 9 25 31
32 18 26 32
33 18 29 33
34 12 32 34
35 17 25 35
36 9 29 36
37 9 28 37
38 12 17 38
39 18 28 39
40 12 29 40
41 18 26 41
42 14 25 42
43 15 14 43
44 16 25 44
45 10 26 45
46 11 20 46
47 14 18 47
48 9 32 48
49 12 25 49
50 17 25 50
51 5 23 51
52 12 21 52
53 12 20 53
54 6 15 54
55 24 30 55
56 12 24 56
57 12 26 57
58 14 24 58
59 7 22 59
60 13 14 60
61 12 24 61
62 13 24 62
63 14 24 63
64 8 24 64
65 11 19 65
66 9 31 66
67 11 22 67
68 13 27 68
69 10 19 69
70 11 25 70
71 12 20 71
72 9 21 72
73 15 27 73
74 18 23 74
75 15 25 75
76 12 20 76
77 13 21 77
78 14 22 78
79 10 23 79
80 13 25 80
81 13 25 81
82 11 17 82
83 13 19 83
84 16 25 84
85 8 19 85
86 16 20 86
87 11 26 87
88 9 23 88
89 16 27 89
90 12 17 90
91 14 17 91
92 8 19 92
93 9 17 93
94 15 22 94
95 11 21 95
96 21 32 96
97 14 21 97
98 18 21 98
99 12 18 99
100 13 18 100
101 15 23 101
102 12 19 102
103 19 20 103
104 15 21 104
105 11 20 105
106 11 17 106
107 10 18 107
108 13 19 108
109 15 22 109
110 12 15 110
111 12 14 111
112 16 18 112
113 9 24 113
114 18 35 114
115 8 29 115
116 13 21 116
117 17 25 117
118 9 20 118
119 15 22 119
120 8 13 120
121 7 26 121
122 12 17 122
123 14 25 123
124 6 20 124
125 8 19 125
126 17 21 126
127 10 22 127
128 11 24 128
129 14 21 129
130 11 26 130
131 13 24 131
132 12 16 132
133 11 23 133
134 9 18 134
135 12 16 135
136 20 26 136
137 12 19 137
138 13 21 138
139 12 21 139
140 12 22 140
141 9 23 141
142 15 29 142
143 24 21 143
144 7 21 144
145 17 23 145
146 11 27 146
147 17 25 147
148 11 21 148
149 12 10 149
150 14 20 150
151 11 26 151
152 16 24 152
153 21 29 153
154 14 19 154
155 20 24 155
156 13 19 156
157 11 24 157
158 15 22 158
159 19 17 159
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Organization ConcernOverMistakes
2.775490 -0.098640 0.043820
DoubtsAboutActions ParentalExpectations PersonalStandards
0.110457 0.421047 0.008400
t
-0.001174
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.13803 -1.35872 -0.03503 1.04602 6.79412
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.775490 1.535193 1.808 0.0726 .
Organization -0.098640 0.049996 -1.973 0.0503 .
ConcernOverMistakes 0.043820 0.038702 1.132 0.2593
DoubtsAboutActions 0.110457 0.069456 1.590 0.1138
ParentalExpectations 0.421047 0.054730 7.693 1.68e-12 ***
PersonalStandards 0.008400 0.051029 0.165 0.8695
t -0.001174 0.003840 -0.306 0.7603
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.149 on 152 degrees of freedom
Multiple R-squared: 0.3937, Adjusted R-squared: 0.3698
F-statistic: 16.45 on 6 and 152 DF, p-value: 1.478e-14
> 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.79904642 0.40190716 0.20095358
[2,] 0.91987722 0.16024556 0.08012278
[3,] 0.89685279 0.20629441 0.10314721
[4,] 0.88166067 0.23667866 0.11833933
[5,] 0.81907029 0.36185941 0.18092971
[6,] 0.78011581 0.43976839 0.21988419
[7,] 0.73124119 0.53751762 0.26875881
[8,] 0.69489587 0.61020826 0.30510413
[9,] 0.61248367 0.77503266 0.38751633
[10,] 0.54084071 0.91831859 0.45915929
[11,] 0.45648055 0.91296109 0.54351945
[12,] 0.37970616 0.75941233 0.62029384
[13,] 0.30757322 0.61514644 0.69242678
[14,] 0.61396557 0.77206886 0.38603443
[15,] 0.60132296 0.79735407 0.39867704
[16,] 0.54856011 0.90287978 0.45143989
[17,] 0.51459669 0.97080662 0.48540331
[18,] 0.49993500 0.99987000 0.50006500
[19,] 0.44745279 0.89490559 0.55254721
[20,] 0.38806254 0.77612508 0.61193746
[21,] 0.35103808 0.70207616 0.64896192
[22,] 0.29716686 0.59433372 0.70283314
[23,] 0.66563455 0.66873089 0.33436545
[24,] 0.85205209 0.29589582 0.14794791
[25,] 0.82298698 0.35402603 0.17701302
[26,] 0.79046837 0.41906326 0.20953163
[27,] 0.77695410 0.44609181 0.22304590
[28,] 0.73452890 0.53094220 0.26547110
[29,] 0.78181212 0.43637575 0.21818788
[30,] 0.77844884 0.44310232 0.22155116
[31,] 0.73839162 0.52321676 0.26160838
[32,] 0.69179982 0.61640036 0.30820018
[33,] 0.66932296 0.66135408 0.33067704
[34,] 0.62404187 0.75191626 0.37595813
[35,] 0.66777752 0.66444496 0.33222248
[36,] 0.67137679 0.65724641 0.32862321
[37,] 0.64638064 0.70723873 0.35361936
[38,] 0.61945986 0.76108029 0.38054014
[39,] 0.57838481 0.84323038 0.42161519
[40,] 0.52853613 0.94292774 0.47146387
[41,] 0.55374699 0.89250603 0.44625301
[42,] 0.53478244 0.93043513 0.46521756
[43,] 0.50429781 0.99140437 0.49570219
[44,] 0.46341907 0.92683813 0.53658093
[45,] 0.41523856 0.83047712 0.58476144
[46,] 0.90961363 0.18077273 0.09038637
[47,] 0.88915647 0.22168705 0.11084353
[48,] 0.86989649 0.26020702 0.13010351
[49,] 0.86103764 0.27792472 0.13896236
[50,] 0.83404945 0.33190110 0.16595055
[51,] 0.80369738 0.39260525 0.19630262
[52,] 0.80653674 0.38692653 0.19346326
[53,] 0.79408158 0.41183684 0.20591842
[54,] 0.76547245 0.46905510 0.23452755
[55,] 0.81981848 0.36036304 0.18018152
[56,] 0.80298013 0.39403974 0.19701987
[57,] 0.77787286 0.44425427 0.22212714
[58,] 0.74871366 0.50257267 0.25128634
[59,] 0.71736080 0.56527839 0.28263920
[60,] 0.68284218 0.63431563 0.31715782
[61,] 0.65254869 0.69490261 0.34745131
[62,] 0.61686095 0.76627809 0.38313905
[63,] 0.58144335 0.83711330 0.41855665
[64,] 0.53545618 0.92908764 0.46454382
[65,] 0.48841997 0.97683994 0.51158003
[66,] 0.51323035 0.97353930 0.48676965
[67,] 0.46731615 0.93463230 0.53268385
[68,] 0.46550438 0.93100877 0.53449562
[69,] 0.42384570 0.84769141 0.57615430
[70,] 0.40615119 0.81230238 0.59384881
[71,] 0.41423323 0.82846646 0.58576677
[72,] 0.40276227 0.80552453 0.59723773
[73,] 0.38932376 0.77864751 0.61067624
[74,] 0.34532614 0.69065228 0.65467386
[75,] 0.31742106 0.63484211 0.68257894
[76,] 0.28628229 0.57256458 0.71371771
[77,] 0.29090323 0.58180646 0.70909677
[78,] 0.29314255 0.58628510 0.70685745
[79,] 0.28584151 0.57168302 0.71415849
[80,] 0.40360094 0.80720187 0.59639906
[81,] 0.36103555 0.72207110 0.63896445
[82,] 0.32535489 0.65070978 0.67464511
[83,] 0.29782598 0.59565197 0.70217402
[84,] 0.26875852 0.53751704 0.73124148
[85,] 0.31510470 0.63020940 0.68489530
[86,] 0.37843958 0.75687916 0.62156042
[87,] 0.33706235 0.67412469 0.66293765
[88,] 0.29507519 0.59015038 0.70492481
[89,] 0.26665115 0.53330229 0.73334885
[90,] 0.22938759 0.45877518 0.77061241
[91,] 0.19432691 0.38865382 0.80567309
[92,] 0.16898798 0.33797597 0.83101202
[93,] 0.14814864 0.29629727 0.85185136
[94,] 0.13157789 0.26315578 0.86842211
[95,] 0.11591565 0.23183131 0.88408435
[96,] 0.14446106 0.28892212 0.85553894
[97,] 0.18044143 0.36088286 0.81955857
[98,] 0.15010277 0.30020553 0.84989723
[99,] 0.13377450 0.26754899 0.86622550
[100,] 0.11914643 0.23829286 0.88085357
[101,] 0.11442797 0.22885595 0.88557203
[102,] 0.09301193 0.18602387 0.90698807
[103,] 0.15208643 0.30417286 0.84791357
[104,] 0.33993595 0.67987189 0.66006405
[105,] 0.29961717 0.59923433 0.70038283
[106,] 0.60192732 0.79614536 0.39807268
[107,] 0.58755543 0.82488915 0.41244457
[108,] 0.58386800 0.83226400 0.41613200
[109,] 0.53286634 0.93426732 0.46713366
[110,] 0.47700754 0.95401507 0.52299246
[111,] 0.53617486 0.92765028 0.46382514
[112,] 0.50651620 0.98696761 0.49348380
[113,] 0.52111383 0.95777234 0.47888617
[114,] 0.47856092 0.95712184 0.52143908
[115,] 0.48873709 0.97747417 0.51126291
[116,] 0.43223605 0.86447211 0.56776395
[117,] 0.43592168 0.87184336 0.56407832
[118,] 0.42756534 0.85513067 0.57243466
[119,] 0.38959167 0.77918333 0.61040833
[120,] 0.34745085 0.69490171 0.65254915
[121,] 0.30793244 0.61586488 0.69206756
[122,] 0.30233424 0.60466848 0.69766576
[123,] 0.25092595 0.50185190 0.74907405
[124,] 0.20644673 0.41289346 0.79355327
[125,] 0.17452531 0.34905062 0.82547469
[126,] 0.14164069 0.28328137 0.85835931
[127,] 0.13494401 0.26988803 0.86505599
[128,] 0.18769024 0.37538049 0.81230976
[129,] 0.22415290 0.44830580 0.77584710
[130,] 0.19398353 0.38796707 0.80601647
[131,] 0.22248596 0.44497191 0.77751404
[132,] 0.17841284 0.35682567 0.82158716
[133,] 0.14637128 0.29274257 0.85362872
[134,] 0.20898484 0.41796969 0.79101516
[135,] 0.15226126 0.30452253 0.84773874
[136,] 0.10345399 0.20690799 0.89654601
[137,] 0.06741231 0.13482462 0.93258769
[138,] 0.04439779 0.08879557 0.95560221
[139,] 0.02239043 0.04478085 0.97760957
[140,] 0.01017779 0.02035558 0.98982221
> postscript(file="/var/www/html/rcomp/tmp/1zntf1290508974.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/2zntf1290508974.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/3zntf1290508974.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/4sea01290508974.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/5sea01290508974.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 = 159
Frequency = 1
1 2 3 4 5
4.3591269091 2.0277205175 -1.1234630258 1.0136089744 1.1947533927
6 7 8 9 10
0.0490518815 -3.1237658925 3.5644711659 -1.3462819114 -0.9077353620
11 12 13 14 15
3.1067214256 -0.5223193208 2.7608160608 0.2614296901 0.7151474168
16 17 18 19 20
-3.5049765222 2.3287062145 0.1392437626 -2.4884900607 -0.0350307597
21 22 23 24 25
0.6558893476 -0.7893015264 4.3543531396 0.2549182901 1.1686477733
26 27 28 29 30
0.5286995421 -2.7726623579 1.0771892925 -0.3692407407 -1.8690258261
31 32 33 34 35
-0.0342180291 4.9693703615 -6.1380331100 -0.5701077405 -0.7698274001
36 37 38 39 40
-1.3711660614 -1.2476881296 -3.0931429162 0.8985956585 -1.1769693591
41 42 43 44 45
-0.3825913035 0.4797134943 -1.3747727911 -4.1409357845 1.1362069379
46 47 48 49 50
0.9622004373 1.1783819404 -1.4024675953 -0.0871684706 -3.5674201642
51 52 53 54 55
-1.5533285301 0.6410665560 0.8471045220 -0.9309107645 6.7941162621
56 57 58 59 60
0.3213770428 0.6151182754 -2.2621901925 -0.3754898603 -0.9883670152
61 62 63 64 65
1.7688891983 -2.0353591481 -1.1939472322 2.8723148343 -1.7643650783
66 67 68 69 70
-1.2744511393 0.6121229276 -0.1513412952 -0.4288926393 0.8397288428
71 72 73 74 75
-0.8532492963 0.7852260145 0.0236168113 -0.1195891858 -2.8805961938
76 77 78 79 80
0.0521648527 -1.9851800378 0.3582624612 1.6160640646 -2.6371039921
81 82 83 84 85
1.7449974371 1.6595799013 -0.3868993989 0.9836550397 -1.0946675301
86 87 88 89 90
-2.3471843884 -2.1807193790 2.0020412377 3.9830607853 -0.7309219166
91 92 93 94 95
-1.0244866479 1.1813931782 -1.2459761868 -3.2614696337 3.3646886523
96 97 98 99 100
0.3280520438 -0.3924165132 0.9490169371 -0.6183013335 -0.4773699496
101 102 103 104 105
0.7931670214 -1.2269888444 -1.1147577764 1.3521402214 2.8545460477
106 107 108 109 110
-3.5876760146 -0.1385578844 1.1518782057 1.2814927563 -2.0448314560
111 112 113 114 115
-0.3945193408 2.7247685386 4.5350495620 0.2936504455 5.9591102273
116 117 118 119 120
-2.5067600651 -2.1203219139 -0.6802107229 -0.4108493777 -2.9213105661
121 122 123 124 125
-2.1149123690 -1.0779172514 1.6279515873 1.6008224870 0.2675450642
126 127 128 129 130
-1.7844993268 -2.1952864675 1.0148512464 0.9761797489 0.0007339644
131 132 133 134 135
2.2995198417 0.5686946529 -1.6185073462 -1.8748799758 0.4399413835
136 137 138 139 140
-1.6603759015 -2.0787426485 -0.0954395551 1.8974658678 4.2310999453
141 142 143 144 145
0.9273625720 0.3618811784 5.4991576384 -0.9399019192 0.8576300737
146 147 148 149 150
-2.1331597688 -1.4491123940 -0.3073969518 0.8499334448 1.4630261888
151 152 153 154 155
2.0723152127 -2.1623331133 -4.7011124686 -3.4234534574 1.6652785922
156 157 158 159
-1.8932017236 0.1696862893 0.6795655675 4.1155261625
> postscript(file="/var/www/html/rcomp/tmp/6sea01290508974.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 = 159
Frequency = 1
lag(myerror, k = 1) myerror
0 4.3591269091 NA
1 2.0277205175 4.3591269091
2 -1.1234630258 2.0277205175
3 1.0136089744 -1.1234630258
4 1.1947533927 1.0136089744
5 0.0490518815 1.1947533927
6 -3.1237658925 0.0490518815
7 3.5644711659 -3.1237658925
8 -1.3462819114 3.5644711659
9 -0.9077353620 -1.3462819114
10 3.1067214256 -0.9077353620
11 -0.5223193208 3.1067214256
12 2.7608160608 -0.5223193208
13 0.2614296901 2.7608160608
14 0.7151474168 0.2614296901
15 -3.5049765222 0.7151474168
16 2.3287062145 -3.5049765222
17 0.1392437626 2.3287062145
18 -2.4884900607 0.1392437626
19 -0.0350307597 -2.4884900607
20 0.6558893476 -0.0350307597
21 -0.7893015264 0.6558893476
22 4.3543531396 -0.7893015264
23 0.2549182901 4.3543531396
24 1.1686477733 0.2549182901
25 0.5286995421 1.1686477733
26 -2.7726623579 0.5286995421
27 1.0771892925 -2.7726623579
28 -0.3692407407 1.0771892925
29 -1.8690258261 -0.3692407407
30 -0.0342180291 -1.8690258261
31 4.9693703615 -0.0342180291
32 -6.1380331100 4.9693703615
33 -0.5701077405 -6.1380331100
34 -0.7698274001 -0.5701077405
35 -1.3711660614 -0.7698274001
36 -1.2476881296 -1.3711660614
37 -3.0931429162 -1.2476881296
38 0.8985956585 -3.0931429162
39 -1.1769693591 0.8985956585
40 -0.3825913035 -1.1769693591
41 0.4797134943 -0.3825913035
42 -1.3747727911 0.4797134943
43 -4.1409357845 -1.3747727911
44 1.1362069379 -4.1409357845
45 0.9622004373 1.1362069379
46 1.1783819404 0.9622004373
47 -1.4024675953 1.1783819404
48 -0.0871684706 -1.4024675953
49 -3.5674201642 -0.0871684706
50 -1.5533285301 -3.5674201642
51 0.6410665560 -1.5533285301
52 0.8471045220 0.6410665560
53 -0.9309107645 0.8471045220
54 6.7941162621 -0.9309107645
55 0.3213770428 6.7941162621
56 0.6151182754 0.3213770428
57 -2.2621901925 0.6151182754
58 -0.3754898603 -2.2621901925
59 -0.9883670152 -0.3754898603
60 1.7688891983 -0.9883670152
61 -2.0353591481 1.7688891983
62 -1.1939472322 -2.0353591481
63 2.8723148343 -1.1939472322
64 -1.7643650783 2.8723148343
65 -1.2744511393 -1.7643650783
66 0.6121229276 -1.2744511393
67 -0.1513412952 0.6121229276
68 -0.4288926393 -0.1513412952
69 0.8397288428 -0.4288926393
70 -0.8532492963 0.8397288428
71 0.7852260145 -0.8532492963
72 0.0236168113 0.7852260145
73 -0.1195891858 0.0236168113
74 -2.8805961938 -0.1195891858
75 0.0521648527 -2.8805961938
76 -1.9851800378 0.0521648527
77 0.3582624612 -1.9851800378
78 1.6160640646 0.3582624612
79 -2.6371039921 1.6160640646
80 1.7449974371 -2.6371039921
81 1.6595799013 1.7449974371
82 -0.3868993989 1.6595799013
83 0.9836550397 -0.3868993989
84 -1.0946675301 0.9836550397
85 -2.3471843884 -1.0946675301
86 -2.1807193790 -2.3471843884
87 2.0020412377 -2.1807193790
88 3.9830607853 2.0020412377
89 -0.7309219166 3.9830607853
90 -1.0244866479 -0.7309219166
91 1.1813931782 -1.0244866479
92 -1.2459761868 1.1813931782
93 -3.2614696337 -1.2459761868
94 3.3646886523 -3.2614696337
95 0.3280520438 3.3646886523
96 -0.3924165132 0.3280520438
97 0.9490169371 -0.3924165132
98 -0.6183013335 0.9490169371
99 -0.4773699496 -0.6183013335
100 0.7931670214 -0.4773699496
101 -1.2269888444 0.7931670214
102 -1.1147577764 -1.2269888444
103 1.3521402214 -1.1147577764
104 2.8545460477 1.3521402214
105 -3.5876760146 2.8545460477
106 -0.1385578844 -3.5876760146
107 1.1518782057 -0.1385578844
108 1.2814927563 1.1518782057
109 -2.0448314560 1.2814927563
110 -0.3945193408 -2.0448314560
111 2.7247685386 -0.3945193408
112 4.5350495620 2.7247685386
113 0.2936504455 4.5350495620
114 5.9591102273 0.2936504455
115 -2.5067600651 5.9591102273
116 -2.1203219139 -2.5067600651
117 -0.6802107229 -2.1203219139
118 -0.4108493777 -0.6802107229
119 -2.9213105661 -0.4108493777
120 -2.1149123690 -2.9213105661
121 -1.0779172514 -2.1149123690
122 1.6279515873 -1.0779172514
123 1.6008224870 1.6279515873
124 0.2675450642 1.6008224870
125 -1.7844993268 0.2675450642
126 -2.1952864675 -1.7844993268
127 1.0148512464 -2.1952864675
128 0.9761797489 1.0148512464
129 0.0007339644 0.9761797489
130 2.2995198417 0.0007339644
131 0.5686946529 2.2995198417
132 -1.6185073462 0.5686946529
133 -1.8748799758 -1.6185073462
134 0.4399413835 -1.8748799758
135 -1.6603759015 0.4399413835
136 -2.0787426485 -1.6603759015
137 -0.0954395551 -2.0787426485
138 1.8974658678 -0.0954395551
139 4.2310999453 1.8974658678
140 0.9273625720 4.2310999453
141 0.3618811784 0.9273625720
142 5.4991576384 0.3618811784
143 -0.9399019192 5.4991576384
144 0.8576300737 -0.9399019192
145 -2.1331597688 0.8576300737
146 -1.4491123940 -2.1331597688
147 -0.3073969518 -1.4491123940
148 0.8499334448 -0.3073969518
149 1.4630261888 0.8499334448
150 2.0723152127 1.4630261888
151 -2.1623331133 2.0723152127
152 -4.7011124686 -2.1623331133
153 -3.4234534574 -4.7011124686
154 1.6652785922 -3.4234534574
155 -1.8932017236 1.6652785922
156 0.1696862893 -1.8932017236
157 0.6795655675 0.1696862893
158 4.1155261625 0.6795655675
159 NA 4.1155261625
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 2.0277205175 4.3591269091
[2,] -1.1234630258 2.0277205175
[3,] 1.0136089744 -1.1234630258
[4,] 1.1947533927 1.0136089744
[5,] 0.0490518815 1.1947533927
[6,] -3.1237658925 0.0490518815
[7,] 3.5644711659 -3.1237658925
[8,] -1.3462819114 3.5644711659
[9,] -0.9077353620 -1.3462819114
[10,] 3.1067214256 -0.9077353620
[11,] -0.5223193208 3.1067214256
[12,] 2.7608160608 -0.5223193208
[13,] 0.2614296901 2.7608160608
[14,] 0.7151474168 0.2614296901
[15,] -3.5049765222 0.7151474168
[16,] 2.3287062145 -3.5049765222
[17,] 0.1392437626 2.3287062145
[18,] -2.4884900607 0.1392437626
[19,] -0.0350307597 -2.4884900607
[20,] 0.6558893476 -0.0350307597
[21,] -0.7893015264 0.6558893476
[22,] 4.3543531396 -0.7893015264
[23,] 0.2549182901 4.3543531396
[24,] 1.1686477733 0.2549182901
[25,] 0.5286995421 1.1686477733
[26,] -2.7726623579 0.5286995421
[27,] 1.0771892925 -2.7726623579
[28,] -0.3692407407 1.0771892925
[29,] -1.8690258261 -0.3692407407
[30,] -0.0342180291 -1.8690258261
[31,] 4.9693703615 -0.0342180291
[32,] -6.1380331100 4.9693703615
[33,] -0.5701077405 -6.1380331100
[34,] -0.7698274001 -0.5701077405
[35,] -1.3711660614 -0.7698274001
[36,] -1.2476881296 -1.3711660614
[37,] -3.0931429162 -1.2476881296
[38,] 0.8985956585 -3.0931429162
[39,] -1.1769693591 0.8985956585
[40,] -0.3825913035 -1.1769693591
[41,] 0.4797134943 -0.3825913035
[42,] -1.3747727911 0.4797134943
[43,] -4.1409357845 -1.3747727911
[44,] 1.1362069379 -4.1409357845
[45,] 0.9622004373 1.1362069379
[46,] 1.1783819404 0.9622004373
[47,] -1.4024675953 1.1783819404
[48,] -0.0871684706 -1.4024675953
[49,] -3.5674201642 -0.0871684706
[50,] -1.5533285301 -3.5674201642
[51,] 0.6410665560 -1.5533285301
[52,] 0.8471045220 0.6410665560
[53,] -0.9309107645 0.8471045220
[54,] 6.7941162621 -0.9309107645
[55,] 0.3213770428 6.7941162621
[56,] 0.6151182754 0.3213770428
[57,] -2.2621901925 0.6151182754
[58,] -0.3754898603 -2.2621901925
[59,] -0.9883670152 -0.3754898603
[60,] 1.7688891983 -0.9883670152
[61,] -2.0353591481 1.7688891983
[62,] -1.1939472322 -2.0353591481
[63,] 2.8723148343 -1.1939472322
[64,] -1.7643650783 2.8723148343
[65,] -1.2744511393 -1.7643650783
[66,] 0.6121229276 -1.2744511393
[67,] -0.1513412952 0.6121229276
[68,] -0.4288926393 -0.1513412952
[69,] 0.8397288428 -0.4288926393
[70,] -0.8532492963 0.8397288428
[71,] 0.7852260145 -0.8532492963
[72,] 0.0236168113 0.7852260145
[73,] -0.1195891858 0.0236168113
[74,] -2.8805961938 -0.1195891858
[75,] 0.0521648527 -2.8805961938
[76,] -1.9851800378 0.0521648527
[77,] 0.3582624612 -1.9851800378
[78,] 1.6160640646 0.3582624612
[79,] -2.6371039921 1.6160640646
[80,] 1.7449974371 -2.6371039921
[81,] 1.6595799013 1.7449974371
[82,] -0.3868993989 1.6595799013
[83,] 0.9836550397 -0.3868993989
[84,] -1.0946675301 0.9836550397
[85,] -2.3471843884 -1.0946675301
[86,] -2.1807193790 -2.3471843884
[87,] 2.0020412377 -2.1807193790
[88,] 3.9830607853 2.0020412377
[89,] -0.7309219166 3.9830607853
[90,] -1.0244866479 -0.7309219166
[91,] 1.1813931782 -1.0244866479
[92,] -1.2459761868 1.1813931782
[93,] -3.2614696337 -1.2459761868
[94,] 3.3646886523 -3.2614696337
[95,] 0.3280520438 3.3646886523
[96,] -0.3924165132 0.3280520438
[97,] 0.9490169371 -0.3924165132
[98,] -0.6183013335 0.9490169371
[99,] -0.4773699496 -0.6183013335
[100,] 0.7931670214 -0.4773699496
[101,] -1.2269888444 0.7931670214
[102,] -1.1147577764 -1.2269888444
[103,] 1.3521402214 -1.1147577764
[104,] 2.8545460477 1.3521402214
[105,] -3.5876760146 2.8545460477
[106,] -0.1385578844 -3.5876760146
[107,] 1.1518782057 -0.1385578844
[108,] 1.2814927563 1.1518782057
[109,] -2.0448314560 1.2814927563
[110,] -0.3945193408 -2.0448314560
[111,] 2.7247685386 -0.3945193408
[112,] 4.5350495620 2.7247685386
[113,] 0.2936504455 4.5350495620
[114,] 5.9591102273 0.2936504455
[115,] -2.5067600651 5.9591102273
[116,] -2.1203219139 -2.5067600651
[117,] -0.6802107229 -2.1203219139
[118,] -0.4108493777 -0.6802107229
[119,] -2.9213105661 -0.4108493777
[120,] -2.1149123690 -2.9213105661
[121,] -1.0779172514 -2.1149123690
[122,] 1.6279515873 -1.0779172514
[123,] 1.6008224870 1.6279515873
[124,] 0.2675450642 1.6008224870
[125,] -1.7844993268 0.2675450642
[126,] -2.1952864675 -1.7844993268
[127,] 1.0148512464 -2.1952864675
[128,] 0.9761797489 1.0148512464
[129,] 0.0007339644 0.9761797489
[130,] 2.2995198417 0.0007339644
[131,] 0.5686946529 2.2995198417
[132,] -1.6185073462 0.5686946529
[133,] -1.8748799758 -1.6185073462
[134,] 0.4399413835 -1.8748799758
[135,] -1.6603759015 0.4399413835
[136,] -2.0787426485 -1.6603759015
[137,] -0.0954395551 -2.0787426485
[138,] 1.8974658678 -0.0954395551
[139,] 4.2310999453 1.8974658678
[140,] 0.9273625720 4.2310999453
[141,] 0.3618811784 0.9273625720
[142,] 5.4991576384 0.3618811784
[143,] -0.9399019192 5.4991576384
[144,] 0.8576300737 -0.9399019192
[145,] -2.1331597688 0.8576300737
[146,] -1.4491123940 -2.1331597688
[147,] -0.3073969518 -1.4491123940
[148,] 0.8499334448 -0.3073969518
[149,] 1.4630261888 0.8499334448
[150,] 2.0723152127 1.4630261888
[151,] -2.1623331133 2.0723152127
[152,] -4.7011124686 -2.1623331133
[153,] -3.4234534574 -4.7011124686
[154,] 1.6652785922 -3.4234534574
[155,] -1.8932017236 1.6652785922
[156,] 0.1696862893 -1.8932017236
[157,] 0.6795655675 0.1696862893
[158,] 4.1155261625 0.6795655675
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 2.0277205175 4.3591269091
2 -1.1234630258 2.0277205175
3 1.0136089744 -1.1234630258
4 1.1947533927 1.0136089744
5 0.0490518815 1.1947533927
6 -3.1237658925 0.0490518815
7 3.5644711659 -3.1237658925
8 -1.3462819114 3.5644711659
9 -0.9077353620 -1.3462819114
10 3.1067214256 -0.9077353620
11 -0.5223193208 3.1067214256
12 2.7608160608 -0.5223193208
13 0.2614296901 2.7608160608
14 0.7151474168 0.2614296901
15 -3.5049765222 0.7151474168
16 2.3287062145 -3.5049765222
17 0.1392437626 2.3287062145
18 -2.4884900607 0.1392437626
19 -0.0350307597 -2.4884900607
20 0.6558893476 -0.0350307597
21 -0.7893015264 0.6558893476
22 4.3543531396 -0.7893015264
23 0.2549182901 4.3543531396
24 1.1686477733 0.2549182901
25 0.5286995421 1.1686477733
26 -2.7726623579 0.5286995421
27 1.0771892925 -2.7726623579
28 -0.3692407407 1.0771892925
29 -1.8690258261 -0.3692407407
30 -0.0342180291 -1.8690258261
31 4.9693703615 -0.0342180291
32 -6.1380331100 4.9693703615
33 -0.5701077405 -6.1380331100
34 -0.7698274001 -0.5701077405
35 -1.3711660614 -0.7698274001
36 -1.2476881296 -1.3711660614
37 -3.0931429162 -1.2476881296
38 0.8985956585 -3.0931429162
39 -1.1769693591 0.8985956585
40 -0.3825913035 -1.1769693591
41 0.4797134943 -0.3825913035
42 -1.3747727911 0.4797134943
43 -4.1409357845 -1.3747727911
44 1.1362069379 -4.1409357845
45 0.9622004373 1.1362069379
46 1.1783819404 0.9622004373
47 -1.4024675953 1.1783819404
48 -0.0871684706 -1.4024675953
49 -3.5674201642 -0.0871684706
50 -1.5533285301 -3.5674201642
51 0.6410665560 -1.5533285301
52 0.8471045220 0.6410665560
53 -0.9309107645 0.8471045220
54 6.7941162621 -0.9309107645
55 0.3213770428 6.7941162621
56 0.6151182754 0.3213770428
57 -2.2621901925 0.6151182754
58 -0.3754898603 -2.2621901925
59 -0.9883670152 -0.3754898603
60 1.7688891983 -0.9883670152
61 -2.0353591481 1.7688891983
62 -1.1939472322 -2.0353591481
63 2.8723148343 -1.1939472322
64 -1.7643650783 2.8723148343
65 -1.2744511393 -1.7643650783
66 0.6121229276 -1.2744511393
67 -0.1513412952 0.6121229276
68 -0.4288926393 -0.1513412952
69 0.8397288428 -0.4288926393
70 -0.8532492963 0.8397288428
71 0.7852260145 -0.8532492963
72 0.0236168113 0.7852260145
73 -0.1195891858 0.0236168113
74 -2.8805961938 -0.1195891858
75 0.0521648527 -2.8805961938
76 -1.9851800378 0.0521648527
77 0.3582624612 -1.9851800378
78 1.6160640646 0.3582624612
79 -2.6371039921 1.6160640646
80 1.7449974371 -2.6371039921
81 1.6595799013 1.7449974371
82 -0.3868993989 1.6595799013
83 0.9836550397 -0.3868993989
84 -1.0946675301 0.9836550397
85 -2.3471843884 -1.0946675301
86 -2.1807193790 -2.3471843884
87 2.0020412377 -2.1807193790
88 3.9830607853 2.0020412377
89 -0.7309219166 3.9830607853
90 -1.0244866479 -0.7309219166
91 1.1813931782 -1.0244866479
92 -1.2459761868 1.1813931782
93 -3.2614696337 -1.2459761868
94 3.3646886523 -3.2614696337
95 0.3280520438 3.3646886523
96 -0.3924165132 0.3280520438
97 0.9490169371 -0.3924165132
98 -0.6183013335 0.9490169371
99 -0.4773699496 -0.6183013335
100 0.7931670214 -0.4773699496
101 -1.2269888444 0.7931670214
102 -1.1147577764 -1.2269888444
103 1.3521402214 -1.1147577764
104 2.8545460477 1.3521402214
105 -3.5876760146 2.8545460477
106 -0.1385578844 -3.5876760146
107 1.1518782057 -0.1385578844
108 1.2814927563 1.1518782057
109 -2.0448314560 1.2814927563
110 -0.3945193408 -2.0448314560
111 2.7247685386 -0.3945193408
112 4.5350495620 2.7247685386
113 0.2936504455 4.5350495620
114 5.9591102273 0.2936504455
115 -2.5067600651 5.9591102273
116 -2.1203219139 -2.5067600651
117 -0.6802107229 -2.1203219139
118 -0.4108493777 -0.6802107229
119 -2.9213105661 -0.4108493777
120 -2.1149123690 -2.9213105661
121 -1.0779172514 -2.1149123690
122 1.6279515873 -1.0779172514
123 1.6008224870 1.6279515873
124 0.2675450642 1.6008224870
125 -1.7844993268 0.2675450642
126 -2.1952864675 -1.7844993268
127 1.0148512464 -2.1952864675
128 0.9761797489 1.0148512464
129 0.0007339644 0.9761797489
130 2.2995198417 0.0007339644
131 0.5686946529 2.2995198417
132 -1.6185073462 0.5686946529
133 -1.8748799758 -1.6185073462
134 0.4399413835 -1.8748799758
135 -1.6603759015 0.4399413835
136 -2.0787426485 -1.6603759015
137 -0.0954395551 -2.0787426485
138 1.8974658678 -0.0954395551
139 4.2310999453 1.8974658678
140 0.9273625720 4.2310999453
141 0.3618811784 0.9273625720
142 5.4991576384 0.3618811784
143 -0.9399019192 5.4991576384
144 0.8576300737 -0.9399019192
145 -2.1331597688 0.8576300737
146 -1.4491123940 -2.1331597688
147 -0.3073969518 -1.4491123940
148 0.8499334448 -0.3073969518
149 1.4630261888 0.8499334448
150 2.0723152127 1.4630261888
151 -2.1623331133 2.0723152127
152 -4.7011124686 -2.1623331133
153 -3.4234534574 -4.7011124686
154 1.6652785922 -3.4234534574
155 -1.8932017236 1.6652785922
156 0.1696862893 -1.8932017236
157 0.6795655675 0.1696862893
158 4.1155261625 0.6795655675
> 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/73oal1290508974.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/8vfro1290508974.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/9vfro1290508974.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/10vfro1290508974.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/11gx7t1290508974.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/12kg6z1290508974.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/13rhlt1290508974.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/14uhjz1290508974.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/15nr1k1290508974.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/161igb1290508974.tab")
+ }
>
> try(system("convert tmp/1zntf1290508974.ps tmp/1zntf1290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/2zntf1290508974.ps tmp/2zntf1290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/3zntf1290508974.ps tmp/3zntf1290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/4sea01290508974.ps tmp/4sea01290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/5sea01290508974.ps tmp/5sea01290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/6sea01290508974.ps tmp/6sea01290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/73oal1290508974.ps tmp/73oal1290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/8vfro1290508974.ps tmp/8vfro1290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/9vfro1290508974.ps tmp/9vfro1290508974.png",intern=TRUE))
character(0)
> try(system("convert tmp/10vfro1290508974.ps tmp/10vfro1290508974.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.095 1.876 9.088