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(24
+ ,14
+ ,11
+ ,12
+ ,24
+ ,26
+ ,25
+ ,11
+ ,7
+ ,8
+ ,25
+ ,23
+ ,17
+ ,6
+ ,17
+ ,8
+ ,30
+ ,25
+ ,18
+ ,12
+ ,10
+ ,8
+ ,19
+ ,23
+ ,18
+ ,8
+ ,12
+ ,9
+ ,22
+ ,19
+ ,16
+ ,10
+ ,12
+ ,7
+ ,22
+ ,29
+ ,20
+ ,10
+ ,11
+ ,4
+ ,25
+ ,25
+ ,16
+ ,11
+ ,11
+ ,11
+ ,23
+ ,21
+ ,18
+ ,16
+ ,12
+ ,7
+ ,17
+ ,22
+ ,17
+ ,11
+ ,13
+ ,7
+ ,21
+ ,25
+ ,23
+ ,13
+ ,14
+ ,12
+ ,19
+ ,24
+ ,30
+ ,12
+ ,16
+ ,10
+ ,19
+ ,18
+ ,23
+ ,8
+ ,11
+ ,10
+ ,15
+ ,22
+ ,18
+ ,12
+ ,10
+ ,8
+ ,16
+ ,15
+ ,15
+ ,11
+ ,11
+ ,8
+ ,23
+ ,22
+ ,12
+ ,4
+ ,15
+ ,4
+ ,27
+ ,28
+ ,21
+ ,9
+ ,9
+ ,9
+ ,22
+ ,20
+ ,15
+ ,8
+ ,11
+ ,8
+ ,14
+ ,12
+ ,20
+ ,8
+ ,17
+ ,7
+ ,22
+ ,24
+ ,31
+ ,14
+ ,17
+ ,11
+ ,23
+ ,20
+ ,27
+ ,15
+ ,11
+ ,9
+ ,23
+ ,21
+ ,34
+ ,16
+ ,18
+ ,11
+ ,21
+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+ ,26
+ ,22
+ ,18
+ ,13
+ ,12
+ ,6
+ ,19
+ ,20
+ ,18
+ ,12
+ ,13
+ ,9
+ ,21
+ ,13
+ ,17
+ ,8
+ ,12
+ ,9
+ ,21
+ ,24
+ ,22
+ ,13
+ ,12
+ ,13
+ ,22
+ ,15
+ ,30
+ ,14
+ ,9
+ ,9
+ ,23
+ ,14
+ ,30
+ ,12
+ ,15
+ ,10
+ ,29
+ ,22
+ ,24
+ ,14
+ ,24
+ ,20
+ ,21
+ ,10
+ ,21
+ ,15
+ ,7
+ ,5
+ ,21
+ ,24
+ ,21
+ ,13
+ ,17
+ ,11
+ ,23
+ ,22
+ ,29
+ ,16
+ ,11
+ ,6
+ ,27
+ ,24
+ ,31
+ ,9
+ ,17
+ ,9
+ ,25
+ ,19
+ ,20
+ ,9
+ ,11
+ ,7
+ ,21
+ ,20
+ ,16
+ ,9
+ ,12
+ ,9
+ ,10
+ ,13
+ ,22
+ ,8
+ ,14
+ ,10
+ ,20
+ ,20
+ ,20
+ ,7
+ ,11
+ ,9
+ ,26
+ ,22
+ ,28
+ ,16
+ ,16
+ ,8
+ ,24
+ ,24
+ ,38
+ ,11
+ ,21
+ ,7
+ ,29
+ ,29
+ ,22
+ ,9
+ ,14
+ ,6
+ ,19
+ ,12
+ ,20
+ ,11
+ ,20
+ ,13
+ ,24
+ ,20
+ ,17
+ ,9
+ ,13
+ ,6
+ ,19
+ ,21
+ ,28
+ ,14
+ ,11
+ ,8
+ ,24
+ ,24
+ ,22
+ ,13
+ ,15
+ ,10
+ ,22
+ ,22
+ ,31
+ ,16
+ ,19
+ ,16
+ ,17
+ ,20)
+ ,dim=c(6
+ ,159)
+ ,dimnames=list(c('Concern_over_Mistakes'
+ ,'Doubts_about_actions'
+ ,'Parental_Expectations'
+ ,'Parental_Criticism'
+ ,'Personal_Standards'
+ ,'Organization
')
+ ,1:159))
> y <- array(NA,dim=c(6,159),dimnames=list(c('Concern_over_Mistakes','Doubts_about_actions','Parental_Expectations','Parental_Criticism','Personal_Standards','Organization
'),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 = '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
Concern_over_Mistakes Doubts_about_actions Parental_Expectations
1 24 14 11
2 25 11 7
3 17 6 17
4 18 12 10
5 18 8 12
6 16 10 12
7 20 10 11
8 16 11 11
9 18 16 12
10 17 11 13
11 23 13 14
12 30 12 16
13 23 8 11
14 18 12 10
15 15 11 11
16 12 4 15
17 21 9 9
18 15 8 11
19 20 8 17
20 31 14 17
21 27 15 11
22 34 16 18
23 21 9 14
24 31 14 10
25 19 11 11
26 16 8 15
27 20 9 15
28 21 9 13
29 22 9 16
30 17 9 13
31 24 10 9
32 25 16 18
33 26 11 18
34 25 8 12
35 17 9 17
36 32 16 9
37 33 11 9
38 13 16 12
39 32 12 18
40 25 12 12
41 29 14 18
42 22 9 14
43 18 10 15
44 17 9 16
45 20 10 10
46 15 12 11
47 20 14 14
48 33 14 9
49 29 10 12
50 23 14 17
51 26 16 5
52 18 9 12
53 20 10 12
54 11 6 6
55 28 8 24
56 26 13 12
57 22 10 12
58 17 8 14
59 12 7 7
60 14 15 13
61 17 9 12
62 21 10 13
63 19 12 14
64 18 13 8
65 10 10 11
66 29 11 9
67 31 8 11
68 19 9 13
69 9 13 10
70 20 11 11
71 28 8 12
72 19 9 9
73 30 9 15
74 29 15 18
75 26 9 15
76 23 10 12
77 13 14 13
78 21 12 14
79 19 12 10
80 28 11 13
81 23 14 13
82 18 6 11
83 21 12 13
84 20 8 16
85 23 14 8
86 21 11 16
87 21 10 11
88 15 14 9
89 28 12 16
90 19 10 12
91 26 14 14
92 10 5 8
93 16 11 9
94 22 10 15
95 19 9 11
96 31 10 21
97 31 16 14
98 29 13 18
99 19 9 12
100 22 10 13
101 23 10 15
102 15 7 12
103 20 9 19
104 18 8 15
105 23 14 11
106 25 14 11
107 21 8 10
108 24 9 13
109 25 14 15
110 17 14 12
111 13 8 12
112 28 8 16
113 21 8 9
114 25 7 18
115 9 6 8
116 16 8 13
117 19 6 17
118 17 11 9
119 25 14 15
120 20 11 8
121 29 11 7
122 14 11 12
123 22 14 14
124 15 8 6
125 19 20 8
126 20 11 17
127 15 8 10
128 20 11 11
129 18 10 14
130 33 14 11
131 22 11 13
132 16 9 12
133 17 9 11
134 16 8 9
135 21 10 12
136 26 13 20
137 18 13 12
138 18 12 13
139 17 8 12
140 22 13 12
141 30 14 9
142 30 12 15
143 24 14 24
144 21 15 7
145 21 13 17
146 29 16 11
147 31 9 17
148 20 9 11
149 16 9 12
150 22 8 14
151 20 7 11
152 28 16 16
153 38 11 21
154 22 9 14
155 20 11 20
156 17 9 13
157 28 14 11
158 22 13 15
159 31 16 19
Parental_Criticism Personal_Standards Organization\r t
1 12 24 26 1
2 8 25 23 2
3 8 30 25 3
4 8 19 23 4
5 9 22 19 5
6 7 22 29 6
7 4 25 25 7
8 11 23 21 8
9 7 17 22 9
10 7 21 25 10
11 12 19 24 11
12 10 19 18 12
13 10 15 22 13
14 8 16 15 14
15 8 23 22 15
16 4 27 28 16
17 9 22 20 17
18 8 14 12 18
19 7 22 24 19
20 11 23 20 20
21 9 23 21 21
22 11 21 20 22
23 13 19 21 23
24 8 18 23 24
25 8 20 28 25
26 9 23 24 26
27 6 25 24 27
28 9 19 24 28
29 9 24 23 29
30 6 22 23 30
31 6 25 29 31
32 16 26 24 32
33 5 29 18 33
34 7 32 25 34
35 9 25 21 35
36 6 29 26 36
37 6 28 22 37
38 5 17 22 38
39 12 28 22 39
40 7 29 23 40
41 10 26 30 41
42 9 25 23 42
43 8 14 17 43
44 5 25 23 44
45 8 26 23 45
46 8 20 25 46
47 10 18 24 47
48 6 32 24 48
49 8 25 23 49
50 7 25 21 50
51 4 23 24 51
52 8 21 24 52
53 8 20 28 53
54 4 15 16 54
55 20 30 20 55
56 8 24 29 56
57 8 26 27 57
58 6 24 22 58
59 4 22 28 59
60 8 14 16 60
61 9 24 25 61
62 6 24 24 62
63 7 24 28 63
64 9 24 24 64
65 5 19 23 65
66 5 31 30 66
67 8 22 24 67
68 8 27 21 68
69 6 19 25 69
70 8 25 25 70
71 7 20 22 71
72 7 21 23 72
73 9 27 26 73
74 11 23 23 74
75 6 25 25 75
76 8 20 21 76
77 6 21 25 77
78 9 22 24 78
79 8 23 29 79
80 6 25 22 80
81 10 25 27 81
82 8 17 26 82
83 8 19 22 83
84 10 25 24 84
85 5 19 27 85
86 7 20 24 86
87 5 26 24 87
88 8 23 29 88
89 14 27 22 89
90 7 17 21 90
91 8 17 24 91
92 6 19 24 92
93 5 17 23 93
94 6 22 20 94
95 10 21 27 95
96 12 32 26 96
97 9 21 25 97
98 12 21 21 98
99 7 18 21 99
100 8 18 19 100
101 10 23 21 101
102 6 19 21 102
103 10 20 16 103
104 10 21 22 104
105 10 20 29 105
106 5 17 15 106
107 7 18 17 107
108 10 19 15 108
109 11 22 21 109
110 6 15 21 110
111 7 14 19 111
112 12 18 24 112
113 11 24 20 113
114 11 35 17 114
115 11 29 23 115
116 5 21 24 116
117 8 25 14 117
118 6 20 19 118
119 9 22 24 119
120 4 13 13 120
121 4 26 22 121
122 7 17 16 122
123 11 25 19 123
124 6 20 25 124
125 7 19 25 125
126 8 21 23 126
127 4 22 24 127
128 8 24 26 128
129 9 21 26 129
130 8 26 25 130
131 11 24 18 131
132 8 16 21 132
133 5 23 26 133
134 4 18 23 134
135 8 16 23 135
136 10 26 22 136
137 6 19 20 137
138 9 21 13 138
139 9 21 24 139
140 13 22 15 140
141 9 23 14 141
142 10 29 22 142
143 20 21 10 143
144 5 21 24 144
145 11 23 22 145
146 6 27 24 146
147 9 25 19 147
148 7 21 20 148
149 9 10 13 149
150 10 20 20 150
151 9 26 22 151
152 8 24 24 152
153 7 29 29 153
154 6 19 12 154
155 13 24 20 155
156 6 19 21 156
157 8 24 24 157
158 10 22 22 158
159 16 17 20 159
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Doubts_about_actions Parental_Expectations
-2.706768 0.804826 0.246619
Parental_Criticism Personal_Standards `Organization\r`
0.190858 0.568213 -0.100757
t
0.005644
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-12.0044 -2.6222 -0.3906 2.8105 12.5678
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.706768 3.230753 -0.838 0.4035
Doubts_about_actions 0.804826 0.130765 6.155 6.39e-09 ***
Parental_Expectations 0.246619 0.133141 1.852 0.0659 .
Parental_Criticism 0.190858 0.168568 1.132 0.2593
Personal_Standards 0.568213 0.096019 5.918 2.09e-08 ***
`Organization\r` -0.100757 0.105352 -0.956 0.3404
t 0.005644 0.008004 0.705 0.4817
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 4.485 on 152 degrees of freedom
Multiple R-squared: 0.4091, Adjusted R-squared: 0.3858
F-statistic: 17.54 on 6 and 152 DF, p-value: 2.250e-15
> 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.09861377 0.19722753 0.90138623
[2,] 0.35497557 0.70995114 0.64502443
[3,] 0.74920567 0.50158865 0.25079433
[4,] 0.74399427 0.51201145 0.25600573
[5,] 0.72714235 0.54571530 0.27285765
[6,] 0.68980603 0.62038794 0.31019397
[7,] 0.60752052 0.78495895 0.39247948
[8,] 0.55296398 0.89407205 0.44703602
[9,] 0.52448930 0.95102141 0.47551070
[10,] 0.46970512 0.93941024 0.53029488
[11,] 0.49868932 0.99737864 0.50131068
[12,] 0.43117618 0.86235236 0.56882382
[13,] 0.41945109 0.83890219 0.58054891
[14,] 0.37693748 0.75387497 0.62306252
[15,] 0.53093435 0.93813130 0.46906565
[16,] 0.48877827 0.97755654 0.51122173
[17,] 0.50572430 0.98855139 0.49427570
[18,] 0.43839346 0.87678692 0.56160654
[19,] 0.37935932 0.75871863 0.62064068
[20,] 0.31782325 0.63564650 0.68217675
[21,] 0.27807511 0.55615022 0.72192489
[22,] 0.26960411 0.53920822 0.73039589
[23,] 0.39900659 0.79801318 0.60099341
[24,] 0.34322207 0.68644414 0.65677793
[25,] 0.31364172 0.62728343 0.68635828
[26,] 0.35677341 0.71354681 0.64322659
[27,] 0.32399828 0.64799655 0.67600172
[28,] 0.43855519 0.87711039 0.56144481
[29,] 0.74562444 0.50875112 0.25437556
[30,] 0.72998173 0.54003653 0.27001827
[31,] 0.69393408 0.61213183 0.30606592
[32,] 0.65672299 0.68655402 0.34327701
[33,] 0.60963549 0.78072903 0.39036451
[34,] 0.55943235 0.88113530 0.44056765
[35,] 0.55279891 0.89440218 0.44720109
[36,] 0.54019325 0.91961350 0.45980675
[37,] 0.58417501 0.83164998 0.41582499
[38,] 0.54711759 0.90576482 0.45288241
[39,] 0.53701162 0.92597675 0.46298838
[40,] 0.58966964 0.82066073 0.41033036
[41,] 0.56842203 0.86315593 0.43157797
[42,] 0.53817823 0.92364355 0.46182177
[43,] 0.49105798 0.98211597 0.50894202
[44,] 0.44553697 0.89107395 0.55446303
[45,] 0.40493521 0.80987042 0.59506479
[46,] 0.36654463 0.73308926 0.63345537
[47,] 0.33576261 0.67152521 0.66423739
[48,] 0.29273382 0.58546764 0.70726618
[49,] 0.26737154 0.53474308 0.73262846
[50,] 0.24951050 0.49902100 0.75048950
[51,] 0.30867088 0.61734176 0.69132912
[52,] 0.29409771 0.58819543 0.70590229
[53,] 0.25509958 0.51019916 0.74490042
[54,] 0.23943007 0.47886013 0.76056993
[55,] 0.26564423 0.53128845 0.73435577
[56,] 0.33036433 0.66072866 0.66963567
[57,] 0.33896684 0.67793369 0.66103316
[58,] 0.68380050 0.63239900 0.31619950
[59,] 0.67331548 0.65336904 0.32668452
[60,] 0.84119016 0.31761968 0.15880984
[61,] 0.81913833 0.36172334 0.18086167
[62,] 0.93085174 0.13829652 0.06914826
[63,] 0.91465690 0.17068620 0.08534310
[64,] 0.93828293 0.12343413 0.06171707
[65,] 0.92638610 0.14722779 0.07361390
[66,] 0.92762810 0.14474379 0.07237190
[67,] 0.92153290 0.15693419 0.07846710
[68,] 0.96932878 0.06134244 0.03067122
[69,] 0.96166734 0.07666532 0.03833266
[70,] 0.95410749 0.09178503 0.04589251
[71,] 0.95660195 0.08679610 0.04339805
[72,] 0.94866640 0.10266720 0.05133360
[73,] 0.94767456 0.10465089 0.05232544
[74,] 0.93387686 0.13224627 0.06612314
[75,] 0.92077846 0.15844307 0.07922154
[76,] 0.91125584 0.17748831 0.08874416
[77,] 0.89368596 0.21262809 0.10631404
[78,] 0.87164729 0.25670542 0.12835271
[79,] 0.91937978 0.16124045 0.08062022
[80,] 0.90261156 0.19477687 0.09738844
[81,] 0.88176524 0.23646951 0.11823476
[82,] 0.88139741 0.23720517 0.11860259
[83,] 0.87139804 0.25720392 0.12860196
[84,] 0.84913248 0.30173503 0.15086752
[85,] 0.82042235 0.35915530 0.17957765
[86,] 0.78701774 0.42596451 0.21298226
[87,] 0.75571572 0.48856856 0.24428428
[88,] 0.77322150 0.45355700 0.22677850
[89,] 0.76999162 0.46001675 0.23000838
[90,] 0.73436003 0.53127995 0.26563997
[91,] 0.71228534 0.57542931 0.28771466
[92,] 0.67380418 0.65239164 0.32619582
[93,] 0.63288070 0.73423861 0.36711930
[94,] 0.59179549 0.81640902 0.40820451
[95,] 0.54863122 0.90273756 0.45136878
[96,] 0.50634049 0.98731902 0.49365951
[97,] 0.49269163 0.98538327 0.50730837
[98,] 0.50000209 0.99999582 0.49999791
[99,] 0.53930362 0.92139276 0.46069638
[100,] 0.50186534 0.99626931 0.49813466
[101,] 0.46070429 0.92140858 0.53929571
[102,] 0.41374391 0.82748783 0.58625609
[103,] 0.74061884 0.51876232 0.25938116
[104,] 0.77557916 0.44884168 0.22442084
[105,] 0.75119249 0.49761501 0.24880751
[106,] 0.87545986 0.24908027 0.12454014
[107,] 0.84709319 0.30581363 0.15290681
[108,] 0.81763053 0.36473895 0.18236947
[109,] 0.78416978 0.43166044 0.21583022
[110,] 0.75623962 0.48752076 0.24376038
[111,] 0.80497058 0.39005885 0.19502942
[112,] 0.88405952 0.23188096 0.11594048
[113,] 0.86524974 0.26950052 0.13475026
[114,] 0.84491032 0.31017935 0.15508968
[115,] 0.80690013 0.38619974 0.19309987
[116,] 0.81156418 0.37687164 0.18843582
[117,] 0.76821223 0.46357554 0.23178777
[118,] 0.73686741 0.52626518 0.26313259
[119,] 0.69033076 0.61933849 0.30966924
[120,] 0.64501592 0.70996815 0.35498408
[121,] 0.76589394 0.46821213 0.23410606
[122,] 0.71358028 0.57283943 0.28641972
[123,] 0.65340743 0.69318514 0.34659257
[124,] 0.61538019 0.76923962 0.38461981
[125,] 0.54569034 0.90861932 0.45430966
[126,] 0.57100071 0.85799859 0.42899929
[127,] 0.50053575 0.99892851 0.49946425
[128,] 0.45340849 0.90681699 0.54659151
[129,] 0.47018663 0.94037326 0.52981337
[130,] 0.39628127 0.79256253 0.60371873
[131,] 0.32283780 0.64567559 0.67716220
[132,] 0.42594053 0.85188107 0.57405947
[133,] 0.37594693 0.75189386 0.62405307
[134,] 0.30335049 0.60670098 0.69664951
[135,] 0.22718590 0.45437179 0.77281410
[136,] 0.33352554 0.66705109 0.66647446
[137,] 0.25415057 0.50830115 0.74584943
[138,] 0.25287062 0.50574125 0.74712938
[139,] 0.15961230 0.31922460 0.84038770
[140,] 0.08634341 0.17268683 0.91365659
> postscript(file="/var/www/html/rcomp/tmp/1mndt1290534474.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/2fwde1290534474.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/3fwde1290534474.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/4fwde1290534474.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/5fwde1290534474.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 6
-0.58697514 3.70128184 -5.38597267 -1.44541094 -1.02351424 -3.24952574
7 8 9 10 11 12
-0.54364296 -5.95672141 -3.95964568 -3.15836182 1.06110202 8.14422146
13 14 15 16 17 18
8.26685262 -0.60326998 -6.32290065 -5.58611855 1.94454071 0.18099219
19 20 21 22 23 24
0.54987130 4.98059995 2.13231543 7.24946705 1.71954391 10.40026339
25 26 27 28 29 30
-0.07016460 -3.94633107 -1.32065258 3.00364387 0.31632164 -2.24046607
31 32 33 34 35 36
3.83544064 -5.19930511 -0.39056084 1.11692659 -5.73388982 4.40314238
37 38 39 40 41 42
9.58681230 -8.74161587 4.40598027 -0.63311703 2.10923677 0.16796943
43 44 45 46 47 48
0.94754076 -4.57312410 -2.04466923 -5.29579229 -1.99699142 5.03890891
49 50 51 52 53 54
7.00772883 -3.46096741 2.89443247 -0.83076988 1.33000021 -0.58121293
55 56 57 58 59 60
-0.80954401 2.72649493 -0.20261188 -3.07748400 -3.42928849 -6.78006121
61 62 63 64 65 66
-3.67630943 -0.26158052 -3.91132601 -5.02682716 -7.85410990 4.71539937
67 68 69 70 71 72
12.56779614 -3.87924663 -11.03389028 -2.46749616 10.42437049 0.88630045
73 74 75 76 77 78
6.91221988 1.92663032 4.50917481 3.49488232 -9.76015303 -1.64430900
79 80 81 82 83 84
-2.53704927 5.06226870 -2.61750146 4.13536055 0.26807143 -1.84760695
85 86 87 88 89 90
2.95658344 0.14026661 -0.85501990 -7.95088119 0.80349626 1.31135834
91 92 93 94 95 96
4.70458593 -3.33262437 -1.18731433 0.79796119 0.09369532 2.08422207
97 98 99 100 101 102
5.69811509 4.14487121 1.49717180 3.04771125 0.52756180 -1.28746471
103 104 105 106 107 108
-1.46452120 -1.64253715 0.78284977 4.02554006 4.34705289 4.45442557
109 110 111 112 113 114
-0.35954108 -2.69354759 -1.69439655 9.59012539 0.68936532 -3.28363505
115 116 117 118 119 120
-12.00444777 -2.06122762 -2.29668984 -2.62694765 0.26800201 4.36304876
121 122 123 124 125 126
7.12406560 -5.17787092 -5.09809592 -0.90193978 -6.68137516 -2.19195456
127 128 129 130 131 132
-2.76081421 -2.12589942 -2.55279354 7.21115202 -2.01469882 -0.74352439
133 134 135 136 137 138
-2.40368237 0.61838909 3.63623042 -1.92144378 -3.41472837 -5.27646376
139 140 141 142 143 144
-1.70786189 -2.97609150 5.04775754 2.37797049 -6.02885325 -1.37333724
145 146 147 148 149 150
-4.71860608 1.22393739 7.43242799 0.66182105 1.57288679 2.71114030
151 152 153 154 155 156
-0.76672826 0.27990013 10.91886784 2.40932845 -6.05669741 -1.44853041
157 158 159
3.09442339 -2.53967419 4.54813171
> postscript(file="/var/www/html/rcomp/tmp/68nuz1290534474.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 -0.58697514 NA
1 3.70128184 -0.58697514
2 -5.38597267 3.70128184
3 -1.44541094 -5.38597267
4 -1.02351424 -1.44541094
5 -3.24952574 -1.02351424
6 -0.54364296 -3.24952574
7 -5.95672141 -0.54364296
8 -3.95964568 -5.95672141
9 -3.15836182 -3.95964568
10 1.06110202 -3.15836182
11 8.14422146 1.06110202
12 8.26685262 8.14422146
13 -0.60326998 8.26685262
14 -6.32290065 -0.60326998
15 -5.58611855 -6.32290065
16 1.94454071 -5.58611855
17 0.18099219 1.94454071
18 0.54987130 0.18099219
19 4.98059995 0.54987130
20 2.13231543 4.98059995
21 7.24946705 2.13231543
22 1.71954391 7.24946705
23 10.40026339 1.71954391
24 -0.07016460 10.40026339
25 -3.94633107 -0.07016460
26 -1.32065258 -3.94633107
27 3.00364387 -1.32065258
28 0.31632164 3.00364387
29 -2.24046607 0.31632164
30 3.83544064 -2.24046607
31 -5.19930511 3.83544064
32 -0.39056084 -5.19930511
33 1.11692659 -0.39056084
34 -5.73388982 1.11692659
35 4.40314238 -5.73388982
36 9.58681230 4.40314238
37 -8.74161587 9.58681230
38 4.40598027 -8.74161587
39 -0.63311703 4.40598027
40 2.10923677 -0.63311703
41 0.16796943 2.10923677
42 0.94754076 0.16796943
43 -4.57312410 0.94754076
44 -2.04466923 -4.57312410
45 -5.29579229 -2.04466923
46 -1.99699142 -5.29579229
47 5.03890891 -1.99699142
48 7.00772883 5.03890891
49 -3.46096741 7.00772883
50 2.89443247 -3.46096741
51 -0.83076988 2.89443247
52 1.33000021 -0.83076988
53 -0.58121293 1.33000021
54 -0.80954401 -0.58121293
55 2.72649493 -0.80954401
56 -0.20261188 2.72649493
57 -3.07748400 -0.20261188
58 -3.42928849 -3.07748400
59 -6.78006121 -3.42928849
60 -3.67630943 -6.78006121
61 -0.26158052 -3.67630943
62 -3.91132601 -0.26158052
63 -5.02682716 -3.91132601
64 -7.85410990 -5.02682716
65 4.71539937 -7.85410990
66 12.56779614 4.71539937
67 -3.87924663 12.56779614
68 -11.03389028 -3.87924663
69 -2.46749616 -11.03389028
70 10.42437049 -2.46749616
71 0.88630045 10.42437049
72 6.91221988 0.88630045
73 1.92663032 6.91221988
74 4.50917481 1.92663032
75 3.49488232 4.50917481
76 -9.76015303 3.49488232
77 -1.64430900 -9.76015303
78 -2.53704927 -1.64430900
79 5.06226870 -2.53704927
80 -2.61750146 5.06226870
81 4.13536055 -2.61750146
82 0.26807143 4.13536055
83 -1.84760695 0.26807143
84 2.95658344 -1.84760695
85 0.14026661 2.95658344
86 -0.85501990 0.14026661
87 -7.95088119 -0.85501990
88 0.80349626 -7.95088119
89 1.31135834 0.80349626
90 4.70458593 1.31135834
91 -3.33262437 4.70458593
92 -1.18731433 -3.33262437
93 0.79796119 -1.18731433
94 0.09369532 0.79796119
95 2.08422207 0.09369532
96 5.69811509 2.08422207
97 4.14487121 5.69811509
98 1.49717180 4.14487121
99 3.04771125 1.49717180
100 0.52756180 3.04771125
101 -1.28746471 0.52756180
102 -1.46452120 -1.28746471
103 -1.64253715 -1.46452120
104 0.78284977 -1.64253715
105 4.02554006 0.78284977
106 4.34705289 4.02554006
107 4.45442557 4.34705289
108 -0.35954108 4.45442557
109 -2.69354759 -0.35954108
110 -1.69439655 -2.69354759
111 9.59012539 -1.69439655
112 0.68936532 9.59012539
113 -3.28363505 0.68936532
114 -12.00444777 -3.28363505
115 -2.06122762 -12.00444777
116 -2.29668984 -2.06122762
117 -2.62694765 -2.29668984
118 0.26800201 -2.62694765
119 4.36304876 0.26800201
120 7.12406560 4.36304876
121 -5.17787092 7.12406560
122 -5.09809592 -5.17787092
123 -0.90193978 -5.09809592
124 -6.68137516 -0.90193978
125 -2.19195456 -6.68137516
126 -2.76081421 -2.19195456
127 -2.12589942 -2.76081421
128 -2.55279354 -2.12589942
129 7.21115202 -2.55279354
130 -2.01469882 7.21115202
131 -0.74352439 -2.01469882
132 -2.40368237 -0.74352439
133 0.61838909 -2.40368237
134 3.63623042 0.61838909
135 -1.92144378 3.63623042
136 -3.41472837 -1.92144378
137 -5.27646376 -3.41472837
138 -1.70786189 -5.27646376
139 -2.97609150 -1.70786189
140 5.04775754 -2.97609150
141 2.37797049 5.04775754
142 -6.02885325 2.37797049
143 -1.37333724 -6.02885325
144 -4.71860608 -1.37333724
145 1.22393739 -4.71860608
146 7.43242799 1.22393739
147 0.66182105 7.43242799
148 1.57288679 0.66182105
149 2.71114030 1.57288679
150 -0.76672826 2.71114030
151 0.27990013 -0.76672826
152 10.91886784 0.27990013
153 2.40932845 10.91886784
154 -6.05669741 2.40932845
155 -1.44853041 -6.05669741
156 3.09442339 -1.44853041
157 -2.53967419 3.09442339
158 4.54813171 -2.53967419
159 NA 4.54813171
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.70128184 -0.58697514
[2,] -5.38597267 3.70128184
[3,] -1.44541094 -5.38597267
[4,] -1.02351424 -1.44541094
[5,] -3.24952574 -1.02351424
[6,] -0.54364296 -3.24952574
[7,] -5.95672141 -0.54364296
[8,] -3.95964568 -5.95672141
[9,] -3.15836182 -3.95964568
[10,] 1.06110202 -3.15836182
[11,] 8.14422146 1.06110202
[12,] 8.26685262 8.14422146
[13,] -0.60326998 8.26685262
[14,] -6.32290065 -0.60326998
[15,] -5.58611855 -6.32290065
[16,] 1.94454071 -5.58611855
[17,] 0.18099219 1.94454071
[18,] 0.54987130 0.18099219
[19,] 4.98059995 0.54987130
[20,] 2.13231543 4.98059995
[21,] 7.24946705 2.13231543
[22,] 1.71954391 7.24946705
[23,] 10.40026339 1.71954391
[24,] -0.07016460 10.40026339
[25,] -3.94633107 -0.07016460
[26,] -1.32065258 -3.94633107
[27,] 3.00364387 -1.32065258
[28,] 0.31632164 3.00364387
[29,] -2.24046607 0.31632164
[30,] 3.83544064 -2.24046607
[31,] -5.19930511 3.83544064
[32,] -0.39056084 -5.19930511
[33,] 1.11692659 -0.39056084
[34,] -5.73388982 1.11692659
[35,] 4.40314238 -5.73388982
[36,] 9.58681230 4.40314238
[37,] -8.74161587 9.58681230
[38,] 4.40598027 -8.74161587
[39,] -0.63311703 4.40598027
[40,] 2.10923677 -0.63311703
[41,] 0.16796943 2.10923677
[42,] 0.94754076 0.16796943
[43,] -4.57312410 0.94754076
[44,] -2.04466923 -4.57312410
[45,] -5.29579229 -2.04466923
[46,] -1.99699142 -5.29579229
[47,] 5.03890891 -1.99699142
[48,] 7.00772883 5.03890891
[49,] -3.46096741 7.00772883
[50,] 2.89443247 -3.46096741
[51,] -0.83076988 2.89443247
[52,] 1.33000021 -0.83076988
[53,] -0.58121293 1.33000021
[54,] -0.80954401 -0.58121293
[55,] 2.72649493 -0.80954401
[56,] -0.20261188 2.72649493
[57,] -3.07748400 -0.20261188
[58,] -3.42928849 -3.07748400
[59,] -6.78006121 -3.42928849
[60,] -3.67630943 -6.78006121
[61,] -0.26158052 -3.67630943
[62,] -3.91132601 -0.26158052
[63,] -5.02682716 -3.91132601
[64,] -7.85410990 -5.02682716
[65,] 4.71539937 -7.85410990
[66,] 12.56779614 4.71539937
[67,] -3.87924663 12.56779614
[68,] -11.03389028 -3.87924663
[69,] -2.46749616 -11.03389028
[70,] 10.42437049 -2.46749616
[71,] 0.88630045 10.42437049
[72,] 6.91221988 0.88630045
[73,] 1.92663032 6.91221988
[74,] 4.50917481 1.92663032
[75,] 3.49488232 4.50917481
[76,] -9.76015303 3.49488232
[77,] -1.64430900 -9.76015303
[78,] -2.53704927 -1.64430900
[79,] 5.06226870 -2.53704927
[80,] -2.61750146 5.06226870
[81,] 4.13536055 -2.61750146
[82,] 0.26807143 4.13536055
[83,] -1.84760695 0.26807143
[84,] 2.95658344 -1.84760695
[85,] 0.14026661 2.95658344
[86,] -0.85501990 0.14026661
[87,] -7.95088119 -0.85501990
[88,] 0.80349626 -7.95088119
[89,] 1.31135834 0.80349626
[90,] 4.70458593 1.31135834
[91,] -3.33262437 4.70458593
[92,] -1.18731433 -3.33262437
[93,] 0.79796119 -1.18731433
[94,] 0.09369532 0.79796119
[95,] 2.08422207 0.09369532
[96,] 5.69811509 2.08422207
[97,] 4.14487121 5.69811509
[98,] 1.49717180 4.14487121
[99,] 3.04771125 1.49717180
[100,] 0.52756180 3.04771125
[101,] -1.28746471 0.52756180
[102,] -1.46452120 -1.28746471
[103,] -1.64253715 -1.46452120
[104,] 0.78284977 -1.64253715
[105,] 4.02554006 0.78284977
[106,] 4.34705289 4.02554006
[107,] 4.45442557 4.34705289
[108,] -0.35954108 4.45442557
[109,] -2.69354759 -0.35954108
[110,] -1.69439655 -2.69354759
[111,] 9.59012539 -1.69439655
[112,] 0.68936532 9.59012539
[113,] -3.28363505 0.68936532
[114,] -12.00444777 -3.28363505
[115,] -2.06122762 -12.00444777
[116,] -2.29668984 -2.06122762
[117,] -2.62694765 -2.29668984
[118,] 0.26800201 -2.62694765
[119,] 4.36304876 0.26800201
[120,] 7.12406560 4.36304876
[121,] -5.17787092 7.12406560
[122,] -5.09809592 -5.17787092
[123,] -0.90193978 -5.09809592
[124,] -6.68137516 -0.90193978
[125,] -2.19195456 -6.68137516
[126,] -2.76081421 -2.19195456
[127,] -2.12589942 -2.76081421
[128,] -2.55279354 -2.12589942
[129,] 7.21115202 -2.55279354
[130,] -2.01469882 7.21115202
[131,] -0.74352439 -2.01469882
[132,] -2.40368237 -0.74352439
[133,] 0.61838909 -2.40368237
[134,] 3.63623042 0.61838909
[135,] -1.92144378 3.63623042
[136,] -3.41472837 -1.92144378
[137,] -5.27646376 -3.41472837
[138,] -1.70786189 -5.27646376
[139,] -2.97609150 -1.70786189
[140,] 5.04775754 -2.97609150
[141,] 2.37797049 5.04775754
[142,] -6.02885325 2.37797049
[143,] -1.37333724 -6.02885325
[144,] -4.71860608 -1.37333724
[145,] 1.22393739 -4.71860608
[146,] 7.43242799 1.22393739
[147,] 0.66182105 7.43242799
[148,] 1.57288679 0.66182105
[149,] 2.71114030 1.57288679
[150,] -0.76672826 2.71114030
[151,] 0.27990013 -0.76672826
[152,] 10.91886784 0.27990013
[153,] 2.40932845 10.91886784
[154,] -6.05669741 2.40932845
[155,] -1.44853041 -6.05669741
[156,] 3.09442339 -1.44853041
[157,] -2.53967419 3.09442339
[158,] 4.54813171 -2.53967419
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.70128184 -0.58697514
2 -5.38597267 3.70128184
3 -1.44541094 -5.38597267
4 -1.02351424 -1.44541094
5 -3.24952574 -1.02351424
6 -0.54364296 -3.24952574
7 -5.95672141 -0.54364296
8 -3.95964568 -5.95672141
9 -3.15836182 -3.95964568
10 1.06110202 -3.15836182
11 8.14422146 1.06110202
12 8.26685262 8.14422146
13 -0.60326998 8.26685262
14 -6.32290065 -0.60326998
15 -5.58611855 -6.32290065
16 1.94454071 -5.58611855
17 0.18099219 1.94454071
18 0.54987130 0.18099219
19 4.98059995 0.54987130
20 2.13231543 4.98059995
21 7.24946705 2.13231543
22 1.71954391 7.24946705
23 10.40026339 1.71954391
24 -0.07016460 10.40026339
25 -3.94633107 -0.07016460
26 -1.32065258 -3.94633107
27 3.00364387 -1.32065258
28 0.31632164 3.00364387
29 -2.24046607 0.31632164
30 3.83544064 -2.24046607
31 -5.19930511 3.83544064
32 -0.39056084 -5.19930511
33 1.11692659 -0.39056084
34 -5.73388982 1.11692659
35 4.40314238 -5.73388982
36 9.58681230 4.40314238
37 -8.74161587 9.58681230
38 4.40598027 -8.74161587
39 -0.63311703 4.40598027
40 2.10923677 -0.63311703
41 0.16796943 2.10923677
42 0.94754076 0.16796943
43 -4.57312410 0.94754076
44 -2.04466923 -4.57312410
45 -5.29579229 -2.04466923
46 -1.99699142 -5.29579229
47 5.03890891 -1.99699142
48 7.00772883 5.03890891
49 -3.46096741 7.00772883
50 2.89443247 -3.46096741
51 -0.83076988 2.89443247
52 1.33000021 -0.83076988
53 -0.58121293 1.33000021
54 -0.80954401 -0.58121293
55 2.72649493 -0.80954401
56 -0.20261188 2.72649493
57 -3.07748400 -0.20261188
58 -3.42928849 -3.07748400
59 -6.78006121 -3.42928849
60 -3.67630943 -6.78006121
61 -0.26158052 -3.67630943
62 -3.91132601 -0.26158052
63 -5.02682716 -3.91132601
64 -7.85410990 -5.02682716
65 4.71539937 -7.85410990
66 12.56779614 4.71539937
67 -3.87924663 12.56779614
68 -11.03389028 -3.87924663
69 -2.46749616 -11.03389028
70 10.42437049 -2.46749616
71 0.88630045 10.42437049
72 6.91221988 0.88630045
73 1.92663032 6.91221988
74 4.50917481 1.92663032
75 3.49488232 4.50917481
76 -9.76015303 3.49488232
77 -1.64430900 -9.76015303
78 -2.53704927 -1.64430900
79 5.06226870 -2.53704927
80 -2.61750146 5.06226870
81 4.13536055 -2.61750146
82 0.26807143 4.13536055
83 -1.84760695 0.26807143
84 2.95658344 -1.84760695
85 0.14026661 2.95658344
86 -0.85501990 0.14026661
87 -7.95088119 -0.85501990
88 0.80349626 -7.95088119
89 1.31135834 0.80349626
90 4.70458593 1.31135834
91 -3.33262437 4.70458593
92 -1.18731433 -3.33262437
93 0.79796119 -1.18731433
94 0.09369532 0.79796119
95 2.08422207 0.09369532
96 5.69811509 2.08422207
97 4.14487121 5.69811509
98 1.49717180 4.14487121
99 3.04771125 1.49717180
100 0.52756180 3.04771125
101 -1.28746471 0.52756180
102 -1.46452120 -1.28746471
103 -1.64253715 -1.46452120
104 0.78284977 -1.64253715
105 4.02554006 0.78284977
106 4.34705289 4.02554006
107 4.45442557 4.34705289
108 -0.35954108 4.45442557
109 -2.69354759 -0.35954108
110 -1.69439655 -2.69354759
111 9.59012539 -1.69439655
112 0.68936532 9.59012539
113 -3.28363505 0.68936532
114 -12.00444777 -3.28363505
115 -2.06122762 -12.00444777
116 -2.29668984 -2.06122762
117 -2.62694765 -2.29668984
118 0.26800201 -2.62694765
119 4.36304876 0.26800201
120 7.12406560 4.36304876
121 -5.17787092 7.12406560
122 -5.09809592 -5.17787092
123 -0.90193978 -5.09809592
124 -6.68137516 -0.90193978
125 -2.19195456 -6.68137516
126 -2.76081421 -2.19195456
127 -2.12589942 -2.76081421
128 -2.55279354 -2.12589942
129 7.21115202 -2.55279354
130 -2.01469882 7.21115202
131 -0.74352439 -2.01469882
132 -2.40368237 -0.74352439
133 0.61838909 -2.40368237
134 3.63623042 0.61838909
135 -1.92144378 3.63623042
136 -3.41472837 -1.92144378
137 -5.27646376 -3.41472837
138 -1.70786189 -5.27646376
139 -2.97609150 -1.70786189
140 5.04775754 -2.97609150
141 2.37797049 5.04775754
142 -6.02885325 2.37797049
143 -1.37333724 -6.02885325
144 -4.71860608 -1.37333724
145 1.22393739 -4.71860608
146 7.43242799 1.22393739
147 0.66182105 7.43242799
148 1.57288679 0.66182105
149 2.71114030 1.57288679
150 -0.76672826 2.71114030
151 0.27990013 -0.76672826
152 10.91886784 0.27990013
153 2.40932845 10.91886784
154 -6.05669741 2.40932845
155 -1.44853041 -6.05669741
156 3.09442339 -1.44853041
157 -2.53967419 3.09442339
158 4.54813171 -2.53967419
> 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/7ifbk1290534474.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/8ifbk1290534474.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/9t6an1290534474.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/10t6an1290534474.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/11w69b1290534474.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/12i77z1290534474.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/137q4s1290534474.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/14a8ly1290534474.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/15vr2m1290534474.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/16za0a1290534474.tab")
+ }
>
> try(system("convert tmp/1mndt1290534474.ps tmp/1mndt1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/2fwde1290534474.ps tmp/2fwde1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/3fwde1290534474.ps tmp/3fwde1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/4fwde1290534474.ps tmp/4fwde1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/5fwde1290534474.ps tmp/5fwde1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/68nuz1290534474.ps tmp/68nuz1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ifbk1290534474.ps tmp/7ifbk1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/8ifbk1290534474.ps tmp/8ifbk1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/9t6an1290534474.ps tmp/9t6an1290534474.png",intern=TRUE))
character(0)
> try(system("convert tmp/10t6an1290534474.ps tmp/10t6an1290534474.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.016 1.750 9.205