R version 2.11.1 (2010-05-31)
Copyright (C) 2010 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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+ ,10
+ ,26
+ ,20
+ ,18
+ ,13
+ ,12
+ ,6
+ ,19
+ ,13
+ ,18
+ ,12
+ ,13
+ ,9
+ ,21
+ ,24
+ ,17
+ ,8
+ ,12
+ ,9
+ ,21
+ ,15
+ ,22
+ ,13
+ ,12
+ ,13
+ ,22
+ ,14
+ ,30
+ ,14
+ ,9
+ ,9
+ ,23
+ ,22
+ ,30
+ ,12
+ ,15
+ ,10
+ ,29
+ ,10
+ ,24
+ ,14
+ ,24
+ ,20
+ ,21
+ ,24
+ ,21
+ ,15
+ ,7
+ ,5
+ ,21
+ ,22
+ ,21
+ ,13
+ ,17
+ ,11
+ ,23
+ ,24
+ ,29
+ ,16
+ ,11
+ ,6
+ ,27
+ ,19
+ ,31
+ ,9
+ ,17
+ ,9
+ ,25
+ ,20
+ ,20
+ ,9
+ ,11
+ ,7
+ ,21
+ ,13
+ ,16
+ ,9
+ ,12
+ ,9
+ ,10
+ ,20
+ ,22
+ ,8
+ ,14
+ ,10
+ ,20
+ ,22
+ ,20
+ ,7
+ ,11
+ ,9
+ ,26
+ ,24
+ ,28
+ ,16
+ ,16
+ ,8
+ ,24
+ ,29
+ ,38
+ ,11
+ ,21
+ ,7
+ ,29
+ ,12
+ ,22
+ ,9
+ ,14
+ ,6
+ ,19
+ ,20
+ ,20
+ ,11
+ ,20
+ ,13
+ ,24
+ ,21
+ ,17
+ ,9
+ ,13
+ ,6
+ ,19
+ ,24
+ ,28
+ ,14
+ ,11
+ ,8
+ ,24
+ ,22
+ ,22
+ ,13
+ ,15
+ ,10
+ ,22
+ ,20
+ ,31
+ ,16
+ ,19
+ ,16
+ ,17)
+ ,dim=c(6
+ ,159)
+ ,dimnames=list(c('Organization'
+ ,'Concernmistakes'
+ ,'Doubtsmistakes'
+ ,'Parentalexpectations'
+ ,'Parentalcriticism'
+ ,'Personalstandards')
+ ,1:159))
> y <- array(NA,dim=c(6,159),dimnames=list(c('Organization','Concernmistakes','Doubtsmistakes','Parentalexpectations','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 = '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
> 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
Organization Concernmistakes Doubtsmistakes Parentalexpectations
1 26 24 14 11
2 23 25 11 7
3 25 17 6 17
4 23 18 12 10
5 19 18 8 12
6 29 16 10 12
7 25 20 10 11
8 21 16 11 11
9 22 18 16 12
10 25 17 11 13
11 24 23 13 14
12 18 30 12 16
13 22 23 8 11
14 15 18 12 10
15 22 15 11 11
16 28 12 4 15
17 20 21 9 9
18 12 15 8 11
19 24 20 8 17
20 20 31 14 17
21 21 27 15 11
22 20 34 16 18
23 21 21 9 14
24 23 31 14 10
25 28 19 11 11
26 24 16 8 15
27 24 20 9 15
28 24 21 9 13
29 23 22 9 16
30 23 17 9 13
31 29 24 10 9
32 24 25 16 18
33 18 26 11 18
34 25 25 8 12
35 21 17 9 17
36 26 32 16 9
37 22 33 11 9
38 22 13 16 12
39 22 32 12 18
40 23 25 12 12
41 30 29 14 18
42 23 22 9 14
43 17 18 10 15
44 23 17 9 16
45 23 20 10 10
46 25 15 12 11
47 24 20 14 14
48 24 33 14 9
49 23 29 10 12
50 21 23 14 17
51 24 26 16 5
52 24 18 9 12
53 28 20 10 12
54 16 11 6 6
55 20 28 8 24
56 29 26 13 12
57 27 22 10 12
58 22 17 8 14
59 28 12 7 7
60 16 14 15 13
61 25 17 9 12
62 24 21 10 13
63 28 19 12 14
64 24 18 13 8
65 23 10 10 11
66 30 29 11 9
67 24 31 8 11
68 21 19 9 13
69 25 9 13 10
70 25 20 11 11
71 22 28 8 12
72 23 19 9 9
73 26 30 9 15
74 23 29 15 18
75 25 26 9 15
76 21 23 10 12
77 25 13 14 13
78 24 21 12 14
79 29 19 12 10
80 22 28 11 13
81 27 23 14 13
82 26 18 6 11
83 22 21 12 13
84 24 20 8 16
85 27 23 14 8
86 24 21 11 16
87 24 21 10 11
88 29 15 14 9
89 22 28 12 16
90 21 19 10 12
91 24 26 14 14
92 24 10 5 8
93 23 16 11 9
94 20 22 10 15
95 27 19 9 11
96 26 31 10 21
97 25 31 16 14
98 21 29 13 18
99 21 19 9 12
100 19 22 10 13
101 21 23 10 15
102 21 15 7 12
103 16 20 9 19
104 22 18 8 15
105 29 23 14 11
106 15 25 14 11
107 17 21 8 10
108 15 24 9 13
109 21 25 14 15
110 21 17 14 12
111 19 13 8 12
112 24 28 8 16
113 20 21 8 9
114 17 25 7 18
115 23 9 6 8
116 24 16 8 13
117 14 19 6 17
118 19 17 11 9
119 24 25 14 15
120 13 20 11 8
121 22 29 11 7
122 16 14 11 12
123 19 22 14 14
124 25 15 8 6
125 25 19 20 8
126 23 20 11 17
127 24 15 8 10
128 26 20 11 11
129 26 18 10 14
130 25 33 14 11
131 18 22 11 13
132 21 16 9 12
133 26 17 9 11
134 23 16 8 9
135 23 21 10 12
136 22 26 13 20
137 20 18 13 12
138 13 18 12 13
139 24 17 8 12
140 15 22 13 12
141 14 30 14 9
142 22 30 12 15
143 10 24 14 24
144 24 21 15 7
145 22 21 13 17
146 24 29 16 11
147 19 31 9 17
148 20 20 9 11
149 13 16 9 12
150 20 22 8 14
151 22 20 7 11
152 24 28 16 16
153 29 38 11 21
154 12 22 9 14
155 20 20 11 20
156 21 17 9 13
157 24 28 14 11
158 22 22 13 15
159 20 31 16 19
Parentalcriticism Personalstandards t
1 12 24 1
2 8 25 2
3 8 30 3
4 8 19 4
5 9 22 5
6 7 22 6
7 4 25 7
8 11 23 8
9 7 17 9
10 7 21 10
11 12 19 11
12 10 19 12
13 10 15 13
14 8 16 14
15 8 23 15
16 4 27 16
17 9 22 17
18 8 14 18
19 7 22 19
20 11 23 20
21 9 23 21
22 11 21 22
23 13 19 23
24 8 18 24
25 8 20 25
26 9 23 26
27 6 25 27
28 9 19 28
29 9 24 29
30 6 22 30
31 6 25 31
32 16 26 32
33 5 29 33
34 7 32 34
35 9 25 35
36 6 29 36
37 6 28 37
38 5 17 38
39 12 28 39
40 7 29 40
41 10 26 41
42 9 25 42
43 8 14 43
44 5 25 44
45 8 26 45
46 8 20 46
47 10 18 47
48 6 32 48
49 8 25 49
50 7 25 50
51 4 23 51
52 8 21 52
53 8 20 53
54 4 15 54
55 20 30 55
56 8 24 56
57 8 26 57
58 6 24 58
59 4 22 59
60 8 14 60
61 9 24 61
62 6 24 62
63 7 24 63
64 9 24 64
65 5 19 65
66 5 31 66
67 8 22 67
68 8 27 68
69 6 19 69
70 8 25 70
71 7 20 71
72 7 21 72
73 9 27 73
74 11 23 74
75 6 25 75
76 8 20 76
77 6 21 77
78 9 22 78
79 8 23 79
80 6 25 80
81 10 25 81
82 8 17 82
83 8 19 83
84 10 25 84
85 5 19 85
86 7 20 86
87 5 26 87
88 8 23 88
89 14 27 89
90 7 17 90
91 8 17 91
92 6 19 92
93 5 17 93
94 6 22 94
95 10 21 95
96 12 32 96
97 9 21 97
98 12 21 98
99 7 18 99
100 8 18 100
101 10 23 101
102 6 19 102
103 10 20 103
104 10 21 104
105 10 20 105
106 5 17 106
107 7 18 107
108 10 19 108
109 11 22 109
110 6 15 110
111 7 14 111
112 12 18 112
113 11 24 113
114 11 35 114
115 11 29 115
116 5 21 116
117 8 25 117
118 6 20 118
119 9 22 119
120 4 13 120
121 4 26 121
122 7 17 122
123 11 25 123
124 6 20 124
125 7 19 125
126 8 21 126
127 4 22 127
128 8 24 128
129 9 21 129
130 8 26 130
131 11 24 131
132 8 16 132
133 5 23 133
134 4 18 134
135 8 16 135
136 10 26 136
137 6 19 137
138 9 21 138
139 9 21 139
140 13 22 140
141 9 23 141
142 10 29 142
143 20 21 143
144 5 21 144
145 11 23 145
146 6 27 146
147 9 25 147
148 7 21 148
149 9 10 149
150 10 20 150
151 9 26 151
152 8 24 152
153 7 29 153
154 6 19 154
155 13 24 155
156 6 19 156
157 8 24 157
158 10 22 158
159 16 17 159
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Concernmistakes Doubtsmistakes
17.46847 -0.05937 0.21679
Parentalexpectations Parentalcriticism Personalstandards
-0.13318 -0.25314 0.39599
t
-0.01487
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-8.2564 -1.9302 0.2788 2.1675 7.5001
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 17.468466 2.042261 8.553 1.20e-14 ***
Concernmistakes -0.059366 0.062074 -0.956 0.3404
Doubtsmistakes 0.216790 0.110801 1.957 0.0522 .
Parentalexpectations -0.133177 0.102779 -1.296 0.1970
Parentalcriticism -0.253140 0.128304 -1.973 0.0503 .
Personalstandards 0.395987 0.075181 5.267 4.66e-07 ***
t -0.014872 0.006034 -2.465 0.0148 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.443 on 152 degrees of freedom
Multiple R-squared: 0.2523, Adjusted R-squared: 0.2227
F-statistic: 8.546 on 6 and 152 DF, p-value: 5.247e-08
> 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.680450224 0.639099552 0.3195498
[2,] 0.635984547 0.728030906 0.3640155
[3,] 0.577322828 0.845354344 0.4226772
[4,] 0.581068405 0.837863189 0.4189316
[5,] 0.733906275 0.532187450 0.2660937
[6,] 0.653079844 0.693840312 0.3469202
[7,] 0.652192144 0.695615713 0.3478079
[8,] 0.566207034 0.867585933 0.4337930
[9,] 0.710150491 0.579699018 0.2898495
[10,] 0.648191463 0.703617074 0.3518085
[11,] 0.594530476 0.810939048 0.4054695
[12,] 0.525089666 0.949820668 0.4749103
[13,] 0.451523570 0.903047140 0.5484764
[14,] 0.440215607 0.880431214 0.5597844
[15,] 0.490098653 0.980197305 0.5099013
[16,] 0.660631160 0.678737679 0.3393688
[17,] 0.596398043 0.807203914 0.4036020
[18,] 0.532967872 0.934064256 0.4670321
[19,] 0.512652083 0.974695835 0.4873479
[20,] 0.448314460 0.896628920 0.5516855
[21,] 0.387221749 0.774443497 0.6127783
[22,] 0.387811490 0.775622979 0.6121885
[23,] 0.327885533 0.655771066 0.6721145
[24,] 0.597865908 0.804268184 0.4021341
[25,] 0.556715815 0.886568371 0.4432842
[26,] 0.526900676 0.946198649 0.4730993
[27,] 0.471589142 0.943178283 0.5284109
[28,] 0.457660319 0.915320639 0.5423397
[29,] 0.406076584 0.812153168 0.5939234
[30,] 0.357738345 0.715476690 0.6422617
[31,] 0.335245494 0.670490987 0.6647545
[32,] 0.499536270 0.999072541 0.5004637
[33,] 0.445767272 0.891534544 0.5542327
[34,] 0.418199228 0.836398456 0.5818008
[35,] 0.371840280 0.743680560 0.6281597
[36,] 0.333037345 0.666074690 0.6669627
[37,] 0.306540999 0.613081998 0.6934590
[38,] 0.282763626 0.565527251 0.7172364
[39,] 0.279287012 0.558574024 0.7207130
[40,] 0.242666885 0.485333770 0.7573331
[41,] 0.243302621 0.486605242 0.7566974
[42,] 0.223717999 0.447435997 0.7762820
[43,] 0.194148224 0.388296449 0.8058518
[44,] 0.261284270 0.522568540 0.7387157
[45,] 0.341299150 0.682598301 0.6587008
[46,] 0.325844434 0.651688867 0.6741556
[47,] 0.385933682 0.771867364 0.6140663
[48,] 0.362759712 0.725519425 0.6372403
[49,] 0.332672251 0.665344501 0.6673277
[50,] 0.332673707 0.665347414 0.6673263
[51,] 0.413942083 0.827884166 0.5860579
[52,] 0.370202179 0.740404358 0.6297978
[53,] 0.328403442 0.656806884 0.6715966
[54,] 0.329885822 0.659771644 0.6701142
[55,] 0.296427537 0.592855073 0.7035725
[56,] 0.258087037 0.516174074 0.7419130
[57,] 0.241939008 0.483878016 0.7580610
[58,] 0.214043776 0.428087553 0.7859562
[59,] 0.236880230 0.473760460 0.7631198
[60,] 0.204071915 0.408143829 0.7959281
[61,] 0.172207107 0.344414213 0.8277929
[62,] 0.144173730 0.288347460 0.8558263
[63,] 0.119834348 0.239668696 0.8801657
[64,] 0.104200550 0.208401100 0.8957994
[65,] 0.084677171 0.169354341 0.9153228
[66,] 0.068872275 0.137744550 0.9311277
[67,] 0.057602553 0.115205105 0.9423974
[68,] 0.045619837 0.091239674 0.9543802
[69,] 0.035547204 0.071094408 0.9644528
[70,] 0.040597827 0.081195654 0.9594022
[71,] 0.037319868 0.074639737 0.9626801
[72,] 0.031286429 0.062572859 0.9687136
[73,] 0.041527053 0.083054105 0.9584729
[74,] 0.032436730 0.064873460 0.9675633
[75,] 0.025392684 0.050785367 0.9746073
[76,] 0.023318190 0.046636380 0.9766818
[77,] 0.018455708 0.036911417 0.9815443
[78,] 0.015033785 0.030067569 0.9849662
[79,] 0.015461071 0.030922142 0.9845389
[80,] 0.013005665 0.026011329 0.9869943
[81,] 0.009835151 0.019670301 0.9901648
[82,] 0.008402143 0.016804287 0.9915979
[83,] 0.006864492 0.013728985 0.9931355
[84,] 0.005058388 0.010116775 0.9949416
[85,] 0.004820755 0.009641511 0.9951792
[86,] 0.007192716 0.014385433 0.9928073
[87,] 0.005871846 0.011743693 0.9941282
[88,] 0.005023763 0.010047526 0.9949762
[89,] 0.003851197 0.007702394 0.9961488
[90,] 0.002911770 0.005823541 0.9970882
[91,] 0.002425582 0.004851163 0.9975744
[92,] 0.001912568 0.003825137 0.9980874
[93,] 0.001408128 0.002816257 0.9985919
[94,] 0.001735412 0.003470824 0.9982646
[95,] 0.001357702 0.002715403 0.9986423
[96,] 0.005962920 0.011925840 0.9940371
[97,] 0.014473669 0.028947339 0.9855263
[98,] 0.015300649 0.030601298 0.9846994
[99,] 0.020841175 0.041682350 0.9791588
[100,] 0.016311702 0.032623404 0.9836883
[101,] 0.011896813 0.023793626 0.9881032
[102,] 0.008646928 0.017293856 0.9913531
[103,] 0.024934342 0.049868683 0.9750657
[104,] 0.025077392 0.050154785 0.9749226
[105,] 0.061951222 0.123902444 0.9380488
[106,] 0.053302459 0.106604918 0.9466975
[107,] 0.045010589 0.090021178 0.9549894
[108,] 0.116099902 0.232199804 0.8839001
[109,] 0.110022546 0.220045093 0.8899775
[110,] 0.098823887 0.197647775 0.9011761
[111,] 0.170298309 0.340596619 0.8297017
[112,] 0.167887379 0.335774757 0.8321126
[113,] 0.212322431 0.424644861 0.7876776
[114,] 0.212549502 0.425099003 0.7874505
[115,] 0.202595744 0.405191487 0.7974043
[116,] 0.177262689 0.354525377 0.8227373
[117,] 0.143970194 0.287940389 0.8560298
[118,] 0.114308395 0.228616791 0.8856916
[119,] 0.112120161 0.224240321 0.8878798
[120,] 0.156046938 0.312093876 0.8439531
[121,] 0.136643414 0.273286828 0.8633566
[122,] 0.116172198 0.232344397 0.8838278
[123,] 0.104425661 0.208851322 0.8955743
[124,] 0.103083906 0.206167813 0.8969161
[125,] 0.093028922 0.186057844 0.9069711
[126,] 0.210219174 0.420438348 0.7897808
[127,] 0.171437697 0.342875393 0.8285623
[128,] 0.146613959 0.293227918 0.8533860
[129,] 0.204602598 0.409205196 0.7953974
[130,] 0.464282877 0.928565755 0.5357171
[131,] 0.410398047 0.820796094 0.5896020
[132,] 0.565461332 0.869077336 0.4345387
[133,] 0.476837149 0.953674298 0.5231629
[134,] 0.648440829 0.703118343 0.3515592
[135,] 0.603518416 0.792963167 0.3964816
[136,] 0.513747415 0.972505169 0.4862526
[137,] 0.409838014 0.819676028 0.5901620
[138,] 0.415303854 0.830607707 0.5846961
[139,] 0.285548084 0.571096168 0.7144519
[140,] 0.198960259 0.397920518 0.8010397
> postscript(file="/var/www/rcomp/tmp/153u51290173697.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/rcomp/tmp/2gcuq1290173697.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/rcomp/tmp/3gcuq1290173697.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/rcomp/tmp/4gcuq1290173697.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/rcomp/tmp/5gcuq1290173697.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
1.93507903 -2.28156755 -0.30584788 -0.10872593 -3.89516355 5.06111635
7 8 9 10 11 12
-0.76710421 -2.64253278 -1.09633769 1.49234427 2.62068601 -2.97201508
13 14 15 16 17 18
2.41251595 -6.77204595 -2.35721608 2.93328180 -3.15492111 -8.09834847
19 20 21 22 23 24
1.59137836 -2.42488421 -3.16960685 -1.72546994 0.80071443 0.92288226
25 26 27 28 29 30
5.21692928 1.30195618 -0.21389036 2.72933705 0.22316990 -0.42576581
31 32 33 34 35 36
4.06721357 1.17471709 -7.63959853 -1.51446460 -2.24724092 -1.26818179
37 38 39 40 41 42
-3.71400861 -1.46816468 -1.24299121 -3.10443052 6.46076828 -0.24583567
43 44 45 46 47 48
-2.44932501 -1.25913073 -1.71857564 2.07498405 2.65089239 -3.78473463
49 50 51 52 53 54
-0.46245079 -3.25819252 -2.06436578 1.72987274 6.04267476 -5.44127672
55 56 57 58 59 60
-0.34314207 5.20917168 2.84497290 -1.45136072 3.83692693 -4.78426930
61 62 63 64 65 66
1.86953243 0.27883650 4.12771316 -0.42635018 0.13086426 3.03870975
67 68 69 70 71 72
2.41233961 -3.21555619 1.60058022 0.96559567 0.96573869 0.43400715
73 74 75 76 77 78
3.03132629 1.17585226 1.85615853 -0.43717268 1.34778683 1.76777841
79 80 81 82 83 84
5.48208423 -1.65068163 3.42955004 6.27716976 0.64378229 1.99633390
85 86 87 88 89 90
3.93337654 2.65559018 -0.66083346 4.81171014 -0.10094799 0.46838942
91 92 93 94 95 96
3.55116060 2.46996361 1.21230662 -2.12756943 5.80183400 2.79450109
97 98 99 100 101 102
3.17283650 1.01147094 0.42303901 -1.21446301 -0.34752660 0.01464138
103 104 105 106 107 108
-3.55842492 1.62581056 7.50005741 -6.44407728 -3.38881672 -4.64967248
109 110 111 112 113 114
-0.32785002 0.31877020 0.04604130 6.16586692 -1.79612380 -7.48426502
115 116 117 118 119 120
-1.15830868 2.15348710 -7.51178440 -3.29135073 2.31458877 -6.95105547
121 122 123 124 125 126
-2.68289430 -4.56933136 -3.61888020 2.92998697 1.49632946 2.18142913
127 128 129 130 131 132
1.20905476 3.22415242 5.17771205 1.58331591 -3.58672587 1.78082651
133 134 135 136 137 138
3.19055884 1.82329586 3.90548433 0.17864171 -1.58748087 -8.25519666
139 140 141 142 143 144
3.43429065 -5.72138041 -8.25644433 -1.13171589 -7.00873528 0.55014528
145 146 147 148 149 150
1.05722842 -0.75204552 -1.75046017 -1.11000957 -3.33728914 0.81019342
151 152 153 154 155 156
-0.10546970 1.63794354 6.76323451 -7.96368184 0.08998299 0.63605365
157 158 159
1.47999931 1.18642317 3.11670521
> postscript(file="/var/www/rcomp/tmp/684bb1290173697.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 1.93507903 NA
1 -2.28156755 1.93507903
2 -0.30584788 -2.28156755
3 -0.10872593 -0.30584788
4 -3.89516355 -0.10872593
5 5.06111635 -3.89516355
6 -0.76710421 5.06111635
7 -2.64253278 -0.76710421
8 -1.09633769 -2.64253278
9 1.49234427 -1.09633769
10 2.62068601 1.49234427
11 -2.97201508 2.62068601
12 2.41251595 -2.97201508
13 -6.77204595 2.41251595
14 -2.35721608 -6.77204595
15 2.93328180 -2.35721608
16 -3.15492111 2.93328180
17 -8.09834847 -3.15492111
18 1.59137836 -8.09834847
19 -2.42488421 1.59137836
20 -3.16960685 -2.42488421
21 -1.72546994 -3.16960685
22 0.80071443 -1.72546994
23 0.92288226 0.80071443
24 5.21692928 0.92288226
25 1.30195618 5.21692928
26 -0.21389036 1.30195618
27 2.72933705 -0.21389036
28 0.22316990 2.72933705
29 -0.42576581 0.22316990
30 4.06721357 -0.42576581
31 1.17471709 4.06721357
32 -7.63959853 1.17471709
33 -1.51446460 -7.63959853
34 -2.24724092 -1.51446460
35 -1.26818179 -2.24724092
36 -3.71400861 -1.26818179
37 -1.46816468 -3.71400861
38 -1.24299121 -1.46816468
39 -3.10443052 -1.24299121
40 6.46076828 -3.10443052
41 -0.24583567 6.46076828
42 -2.44932501 -0.24583567
43 -1.25913073 -2.44932501
44 -1.71857564 -1.25913073
45 2.07498405 -1.71857564
46 2.65089239 2.07498405
47 -3.78473463 2.65089239
48 -0.46245079 -3.78473463
49 -3.25819252 -0.46245079
50 -2.06436578 -3.25819252
51 1.72987274 -2.06436578
52 6.04267476 1.72987274
53 -5.44127672 6.04267476
54 -0.34314207 -5.44127672
55 5.20917168 -0.34314207
56 2.84497290 5.20917168
57 -1.45136072 2.84497290
58 3.83692693 -1.45136072
59 -4.78426930 3.83692693
60 1.86953243 -4.78426930
61 0.27883650 1.86953243
62 4.12771316 0.27883650
63 -0.42635018 4.12771316
64 0.13086426 -0.42635018
65 3.03870975 0.13086426
66 2.41233961 3.03870975
67 -3.21555619 2.41233961
68 1.60058022 -3.21555619
69 0.96559567 1.60058022
70 0.96573869 0.96559567
71 0.43400715 0.96573869
72 3.03132629 0.43400715
73 1.17585226 3.03132629
74 1.85615853 1.17585226
75 -0.43717268 1.85615853
76 1.34778683 -0.43717268
77 1.76777841 1.34778683
78 5.48208423 1.76777841
79 -1.65068163 5.48208423
80 3.42955004 -1.65068163
81 6.27716976 3.42955004
82 0.64378229 6.27716976
83 1.99633390 0.64378229
84 3.93337654 1.99633390
85 2.65559018 3.93337654
86 -0.66083346 2.65559018
87 4.81171014 -0.66083346
88 -0.10094799 4.81171014
89 0.46838942 -0.10094799
90 3.55116060 0.46838942
91 2.46996361 3.55116060
92 1.21230662 2.46996361
93 -2.12756943 1.21230662
94 5.80183400 -2.12756943
95 2.79450109 5.80183400
96 3.17283650 2.79450109
97 1.01147094 3.17283650
98 0.42303901 1.01147094
99 -1.21446301 0.42303901
100 -0.34752660 -1.21446301
101 0.01464138 -0.34752660
102 -3.55842492 0.01464138
103 1.62581056 -3.55842492
104 7.50005741 1.62581056
105 -6.44407728 7.50005741
106 -3.38881672 -6.44407728
107 -4.64967248 -3.38881672
108 -0.32785002 -4.64967248
109 0.31877020 -0.32785002
110 0.04604130 0.31877020
111 6.16586692 0.04604130
112 -1.79612380 6.16586692
113 -7.48426502 -1.79612380
114 -1.15830868 -7.48426502
115 2.15348710 -1.15830868
116 -7.51178440 2.15348710
117 -3.29135073 -7.51178440
118 2.31458877 -3.29135073
119 -6.95105547 2.31458877
120 -2.68289430 -6.95105547
121 -4.56933136 -2.68289430
122 -3.61888020 -4.56933136
123 2.92998697 -3.61888020
124 1.49632946 2.92998697
125 2.18142913 1.49632946
126 1.20905476 2.18142913
127 3.22415242 1.20905476
128 5.17771205 3.22415242
129 1.58331591 5.17771205
130 -3.58672587 1.58331591
131 1.78082651 -3.58672587
132 3.19055884 1.78082651
133 1.82329586 3.19055884
134 3.90548433 1.82329586
135 0.17864171 3.90548433
136 -1.58748087 0.17864171
137 -8.25519666 -1.58748087
138 3.43429065 -8.25519666
139 -5.72138041 3.43429065
140 -8.25644433 -5.72138041
141 -1.13171589 -8.25644433
142 -7.00873528 -1.13171589
143 0.55014528 -7.00873528
144 1.05722842 0.55014528
145 -0.75204552 1.05722842
146 -1.75046017 -0.75204552
147 -1.11000957 -1.75046017
148 -3.33728914 -1.11000957
149 0.81019342 -3.33728914
150 -0.10546970 0.81019342
151 1.63794354 -0.10546970
152 6.76323451 1.63794354
153 -7.96368184 6.76323451
154 0.08998299 -7.96368184
155 0.63605365 0.08998299
156 1.47999931 0.63605365
157 1.18642317 1.47999931
158 3.11670521 1.18642317
159 NA 3.11670521
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -2.28156755 1.93507903
[2,] -0.30584788 -2.28156755
[3,] -0.10872593 -0.30584788
[4,] -3.89516355 -0.10872593
[5,] 5.06111635 -3.89516355
[6,] -0.76710421 5.06111635
[7,] -2.64253278 -0.76710421
[8,] -1.09633769 -2.64253278
[9,] 1.49234427 -1.09633769
[10,] 2.62068601 1.49234427
[11,] -2.97201508 2.62068601
[12,] 2.41251595 -2.97201508
[13,] -6.77204595 2.41251595
[14,] -2.35721608 -6.77204595
[15,] 2.93328180 -2.35721608
[16,] -3.15492111 2.93328180
[17,] -8.09834847 -3.15492111
[18,] 1.59137836 -8.09834847
[19,] -2.42488421 1.59137836
[20,] -3.16960685 -2.42488421
[21,] -1.72546994 -3.16960685
[22,] 0.80071443 -1.72546994
[23,] 0.92288226 0.80071443
[24,] 5.21692928 0.92288226
[25,] 1.30195618 5.21692928
[26,] -0.21389036 1.30195618
[27,] 2.72933705 -0.21389036
[28,] 0.22316990 2.72933705
[29,] -0.42576581 0.22316990
[30,] 4.06721357 -0.42576581
[31,] 1.17471709 4.06721357
[32,] -7.63959853 1.17471709
[33,] -1.51446460 -7.63959853
[34,] -2.24724092 -1.51446460
[35,] -1.26818179 -2.24724092
[36,] -3.71400861 -1.26818179
[37,] -1.46816468 -3.71400861
[38,] -1.24299121 -1.46816468
[39,] -3.10443052 -1.24299121
[40,] 6.46076828 -3.10443052
[41,] -0.24583567 6.46076828
[42,] -2.44932501 -0.24583567
[43,] -1.25913073 -2.44932501
[44,] -1.71857564 -1.25913073
[45,] 2.07498405 -1.71857564
[46,] 2.65089239 2.07498405
[47,] -3.78473463 2.65089239
[48,] -0.46245079 -3.78473463
[49,] -3.25819252 -0.46245079
[50,] -2.06436578 -3.25819252
[51,] 1.72987274 -2.06436578
[52,] 6.04267476 1.72987274
[53,] -5.44127672 6.04267476
[54,] -0.34314207 -5.44127672
[55,] 5.20917168 -0.34314207
[56,] 2.84497290 5.20917168
[57,] -1.45136072 2.84497290
[58,] 3.83692693 -1.45136072
[59,] -4.78426930 3.83692693
[60,] 1.86953243 -4.78426930
[61,] 0.27883650 1.86953243
[62,] 4.12771316 0.27883650
[63,] -0.42635018 4.12771316
[64,] 0.13086426 -0.42635018
[65,] 3.03870975 0.13086426
[66,] 2.41233961 3.03870975
[67,] -3.21555619 2.41233961
[68,] 1.60058022 -3.21555619
[69,] 0.96559567 1.60058022
[70,] 0.96573869 0.96559567
[71,] 0.43400715 0.96573869
[72,] 3.03132629 0.43400715
[73,] 1.17585226 3.03132629
[74,] 1.85615853 1.17585226
[75,] -0.43717268 1.85615853
[76,] 1.34778683 -0.43717268
[77,] 1.76777841 1.34778683
[78,] 5.48208423 1.76777841
[79,] -1.65068163 5.48208423
[80,] 3.42955004 -1.65068163
[81,] 6.27716976 3.42955004
[82,] 0.64378229 6.27716976
[83,] 1.99633390 0.64378229
[84,] 3.93337654 1.99633390
[85,] 2.65559018 3.93337654
[86,] -0.66083346 2.65559018
[87,] 4.81171014 -0.66083346
[88,] -0.10094799 4.81171014
[89,] 0.46838942 -0.10094799
[90,] 3.55116060 0.46838942
[91,] 2.46996361 3.55116060
[92,] 1.21230662 2.46996361
[93,] -2.12756943 1.21230662
[94,] 5.80183400 -2.12756943
[95,] 2.79450109 5.80183400
[96,] 3.17283650 2.79450109
[97,] 1.01147094 3.17283650
[98,] 0.42303901 1.01147094
[99,] -1.21446301 0.42303901
[100,] -0.34752660 -1.21446301
[101,] 0.01464138 -0.34752660
[102,] -3.55842492 0.01464138
[103,] 1.62581056 -3.55842492
[104,] 7.50005741 1.62581056
[105,] -6.44407728 7.50005741
[106,] -3.38881672 -6.44407728
[107,] -4.64967248 -3.38881672
[108,] -0.32785002 -4.64967248
[109,] 0.31877020 -0.32785002
[110,] 0.04604130 0.31877020
[111,] 6.16586692 0.04604130
[112,] -1.79612380 6.16586692
[113,] -7.48426502 -1.79612380
[114,] -1.15830868 -7.48426502
[115,] 2.15348710 -1.15830868
[116,] -7.51178440 2.15348710
[117,] -3.29135073 -7.51178440
[118,] 2.31458877 -3.29135073
[119,] -6.95105547 2.31458877
[120,] -2.68289430 -6.95105547
[121,] -4.56933136 -2.68289430
[122,] -3.61888020 -4.56933136
[123,] 2.92998697 -3.61888020
[124,] 1.49632946 2.92998697
[125,] 2.18142913 1.49632946
[126,] 1.20905476 2.18142913
[127,] 3.22415242 1.20905476
[128,] 5.17771205 3.22415242
[129,] 1.58331591 5.17771205
[130,] -3.58672587 1.58331591
[131,] 1.78082651 -3.58672587
[132,] 3.19055884 1.78082651
[133,] 1.82329586 3.19055884
[134,] 3.90548433 1.82329586
[135,] 0.17864171 3.90548433
[136,] -1.58748087 0.17864171
[137,] -8.25519666 -1.58748087
[138,] 3.43429065 -8.25519666
[139,] -5.72138041 3.43429065
[140,] -8.25644433 -5.72138041
[141,] -1.13171589 -8.25644433
[142,] -7.00873528 -1.13171589
[143,] 0.55014528 -7.00873528
[144,] 1.05722842 0.55014528
[145,] -0.75204552 1.05722842
[146,] -1.75046017 -0.75204552
[147,] -1.11000957 -1.75046017
[148,] -3.33728914 -1.11000957
[149,] 0.81019342 -3.33728914
[150,] -0.10546970 0.81019342
[151,] 1.63794354 -0.10546970
[152,] 6.76323451 1.63794354
[153,] -7.96368184 6.76323451
[154,] 0.08998299 -7.96368184
[155,] 0.63605365 0.08998299
[156,] 1.47999931 0.63605365
[157,] 1.18642317 1.47999931
[158,] 3.11670521 1.18642317
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -2.28156755 1.93507903
2 -0.30584788 -2.28156755
3 -0.10872593 -0.30584788
4 -3.89516355 -0.10872593
5 5.06111635 -3.89516355
6 -0.76710421 5.06111635
7 -2.64253278 -0.76710421
8 -1.09633769 -2.64253278
9 1.49234427 -1.09633769
10 2.62068601 1.49234427
11 -2.97201508 2.62068601
12 2.41251595 -2.97201508
13 -6.77204595 2.41251595
14 -2.35721608 -6.77204595
15 2.93328180 -2.35721608
16 -3.15492111 2.93328180
17 -8.09834847 -3.15492111
18 1.59137836 -8.09834847
19 -2.42488421 1.59137836
20 -3.16960685 -2.42488421
21 -1.72546994 -3.16960685
22 0.80071443 -1.72546994
23 0.92288226 0.80071443
24 5.21692928 0.92288226
25 1.30195618 5.21692928
26 -0.21389036 1.30195618
27 2.72933705 -0.21389036
28 0.22316990 2.72933705
29 -0.42576581 0.22316990
30 4.06721357 -0.42576581
31 1.17471709 4.06721357
32 -7.63959853 1.17471709
33 -1.51446460 -7.63959853
34 -2.24724092 -1.51446460
35 -1.26818179 -2.24724092
36 -3.71400861 -1.26818179
37 -1.46816468 -3.71400861
38 -1.24299121 -1.46816468
39 -3.10443052 -1.24299121
40 6.46076828 -3.10443052
41 -0.24583567 6.46076828
42 -2.44932501 -0.24583567
43 -1.25913073 -2.44932501
44 -1.71857564 -1.25913073
45 2.07498405 -1.71857564
46 2.65089239 2.07498405
47 -3.78473463 2.65089239
48 -0.46245079 -3.78473463
49 -3.25819252 -0.46245079
50 -2.06436578 -3.25819252
51 1.72987274 -2.06436578
52 6.04267476 1.72987274
53 -5.44127672 6.04267476
54 -0.34314207 -5.44127672
55 5.20917168 -0.34314207
56 2.84497290 5.20917168
57 -1.45136072 2.84497290
58 3.83692693 -1.45136072
59 -4.78426930 3.83692693
60 1.86953243 -4.78426930
61 0.27883650 1.86953243
62 4.12771316 0.27883650
63 -0.42635018 4.12771316
64 0.13086426 -0.42635018
65 3.03870975 0.13086426
66 2.41233961 3.03870975
67 -3.21555619 2.41233961
68 1.60058022 -3.21555619
69 0.96559567 1.60058022
70 0.96573869 0.96559567
71 0.43400715 0.96573869
72 3.03132629 0.43400715
73 1.17585226 3.03132629
74 1.85615853 1.17585226
75 -0.43717268 1.85615853
76 1.34778683 -0.43717268
77 1.76777841 1.34778683
78 5.48208423 1.76777841
79 -1.65068163 5.48208423
80 3.42955004 -1.65068163
81 6.27716976 3.42955004
82 0.64378229 6.27716976
83 1.99633390 0.64378229
84 3.93337654 1.99633390
85 2.65559018 3.93337654
86 -0.66083346 2.65559018
87 4.81171014 -0.66083346
88 -0.10094799 4.81171014
89 0.46838942 -0.10094799
90 3.55116060 0.46838942
91 2.46996361 3.55116060
92 1.21230662 2.46996361
93 -2.12756943 1.21230662
94 5.80183400 -2.12756943
95 2.79450109 5.80183400
96 3.17283650 2.79450109
97 1.01147094 3.17283650
98 0.42303901 1.01147094
99 -1.21446301 0.42303901
100 -0.34752660 -1.21446301
101 0.01464138 -0.34752660
102 -3.55842492 0.01464138
103 1.62581056 -3.55842492
104 7.50005741 1.62581056
105 -6.44407728 7.50005741
106 -3.38881672 -6.44407728
107 -4.64967248 -3.38881672
108 -0.32785002 -4.64967248
109 0.31877020 -0.32785002
110 0.04604130 0.31877020
111 6.16586692 0.04604130
112 -1.79612380 6.16586692
113 -7.48426502 -1.79612380
114 -1.15830868 -7.48426502
115 2.15348710 -1.15830868
116 -7.51178440 2.15348710
117 -3.29135073 -7.51178440
118 2.31458877 -3.29135073
119 -6.95105547 2.31458877
120 -2.68289430 -6.95105547
121 -4.56933136 -2.68289430
122 -3.61888020 -4.56933136
123 2.92998697 -3.61888020
124 1.49632946 2.92998697
125 2.18142913 1.49632946
126 1.20905476 2.18142913
127 3.22415242 1.20905476
128 5.17771205 3.22415242
129 1.58331591 5.17771205
130 -3.58672587 1.58331591
131 1.78082651 -3.58672587
132 3.19055884 1.78082651
133 1.82329586 3.19055884
134 3.90548433 1.82329586
135 0.17864171 3.90548433
136 -1.58748087 0.17864171
137 -8.25519666 -1.58748087
138 3.43429065 -8.25519666
139 -5.72138041 3.43429065
140 -8.25644433 -5.72138041
141 -1.13171589 -8.25644433
142 -7.00873528 -1.13171589
143 0.55014528 -7.00873528
144 1.05722842 0.55014528
145 -0.75204552 1.05722842
146 -1.75046017 -0.75204552
147 -1.11000957 -1.75046017
148 -3.33728914 -1.11000957
149 0.81019342 -3.33728914
150 -0.10546970 0.81019342
151 1.63794354 -0.10546970
152 6.76323451 1.63794354
153 -7.96368184 6.76323451
154 0.08998299 -7.96368184
155 0.63605365 0.08998299
156 1.47999931 0.63605365
157 1.18642317 1.47999931
158 3.11670521 1.18642317
> 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/rcomp/tmp/7jvse1290173697.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/rcomp/tmp/8jvse1290173697.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/rcomp/tmp/9um9z1290173697.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/rcomp/tmp/10um9z1290173697.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/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/rcomp/tmp/11xn841290173697.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/rcomp/tmp/12in6a1290173697.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/rcomp/tmp/13pol41290173697.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/rcomp/tmp/14ix3p1290173697.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/rcomp/tmp/153y1d1290173697.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/rcomp/tmp/160qhm1290173697.tab")
+ }
>
> try(system("convert tmp/153u51290173697.ps tmp/153u51290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/2gcuq1290173697.ps tmp/2gcuq1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/3gcuq1290173697.ps tmp/3gcuq1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/4gcuq1290173697.ps tmp/4gcuq1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/5gcuq1290173697.ps tmp/5gcuq1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/684bb1290173697.ps tmp/684bb1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/7jvse1290173697.ps tmp/7jvse1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/8jvse1290173697.ps tmp/8jvse1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/9um9z1290173697.ps tmp/9um9z1290173697.png",intern=TRUE))
character(0)
> try(system("convert tmp/10um9z1290173697.ps tmp/10um9z1290173697.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.570 2.280 8.026