R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(15
+ ,15
+ ,77
+ ,10
+ ,5
+ ,4
+ ,11
+ ,12
+ ,13
+ ,6
+ ,12
+ ,9
+ ,63
+ ,20
+ ,6
+ ,4
+ ,12
+ ,7
+ ,11
+ ,4
+ ,15
+ ,12
+ ,73
+ ,16
+ ,4
+ ,10
+ ,12
+ ,13
+ ,14
+ ,6
+ ,12
+ ,15
+ ,76
+ ,10
+ ,6
+ ,6
+ ,11
+ ,11
+ ,12
+ ,5
+ ,14
+ ,17
+ ,90
+ ,8
+ ,3
+ ,5
+ ,11
+ ,16
+ ,12
+ ,5
+ ,8
+ ,14
+ ,67
+ ,14
+ ,10
+ ,8
+ ,10
+ ,10
+ ,6
+ ,4
+ ,11
+ ,9
+ ,69
+ ,19
+ ,8
+ ,9
+ ,11
+ ,15
+ ,10
+ ,5
+ ,15
+ ,12
+ ,70
+ ,15
+ ,3
+ ,6
+ ,9
+ ,5
+ ,11
+ ,3
+ ,4
+ ,11
+ ,54
+ ,23
+ ,4
+ ,8
+ ,10
+ ,4
+ ,10
+ ,2
+ ,13
+ ,13
+ ,54
+ ,9
+ ,3
+ ,11
+ ,12
+ ,7
+ ,12
+ ,5
+ ,19
+ ,16
+ ,76
+ ,12
+ ,5
+ ,6
+ ,12
+ ,15
+ ,15
+ ,6
+ ,10
+ ,16
+ ,75
+ ,14
+ ,5
+ ,8
+ ,12
+ ,5
+ ,13
+ ,6
+ ,15
+ ,15
+ ,76
+ ,13
+ ,6
+ ,11
+ ,13
+ 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
+ ,13
+ ,9
+ ,9
+ ,12
+ ,13
+ ,13
+ ,5
+ ,16
+ ,11
+ ,74
+ ,15
+ ,14
+ ,12
+ ,12
+ ,14
+ ,16
+ ,8
+ ,13
+ ,15
+ ,82
+ ,14
+ ,5
+ ,6
+ ,12
+ ,11
+ ,13
+ ,6
+ ,12
+ ,16
+ ,54
+ ,14
+ ,12
+ ,4
+ ,12
+ ,14
+ ,14
+ ,4
+ ,9
+ ,14
+ ,54
+ ,14
+ ,6
+ ,6
+ ,10
+ ,11
+ ,13
+ ,3
+ ,14
+ ,13
+ ,80
+ ,10
+ ,6
+ ,7
+ ,12
+ ,8
+ ,14
+ ,4
+ ,15
+ ,15
+ ,76
+ ,8
+ ,8
+ ,9
+ ,12
+ ,12
+ ,16
+ ,7)
+ ,dim=c(10
+ ,156)
+ ,dimnames=list(c('Popularity'
+ ,'Happiness'
+ ,'Belonging'
+ ,'Depression'
+ ,'Weighted_popularity'
+ ,'Parental_criticism'
+ ,'Finding_Friends'
+ ,'Knowing_People'
+ ,'Perceived_Liked'
+ ,'Celebrity')
+ ,1:156))
> y <- array(NA,dim=c(10,156),dimnames=list(c('Popularity','Happiness','Belonging','Depression','Weighted_popularity','Parental_criticism','Finding_Friends','Knowing_People','Perceived_Liked','Celebrity'),1:156))
> 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
Popularity Happiness Belonging Depression Weighted_popularity
1 15 15 77 10 5
2 12 9 63 20 6
3 15 12 73 16 4
4 12 15 76 10 6
5 14 17 90 8 3
6 8 14 67 14 10
7 11 9 69 19 8
8 15 12 70 15 3
9 4 11 54 23 4
10 13 13 54 9 3
11 19 16 76 12 5
12 10 16 75 14 5
13 15 15 76 13 6
14 6 10 80 11 5
15 7 16 89 11 3
16 14 12 73 10 4
17 16 15 74 12 8
18 16 13 78 18 8
19 14 18 76 12 8
20 15 13 69 10 5
21 14 17 74 15 8
22 12 14 82 15 2
23 9 13 77 12 0
24 12 13 84 9 5
25 14 15 75 11 2
26 12 13 54 15 7
27 14 15 79 16 5
28 10 13 79 17 2
29 14 14 69 12 12
30 16 13 88 11 7
31 10 16 57 13 0
32 8 14 69 9 2
33 12 18 86 11 3
34 11 15 65 9 0
35 8 9 66 20 9
36 13 16 54 8 2
37 11 16 85 12 3
38 12 17 79 10 1
39 16 13 84 11 10
40 16 17 70 13 1
41 13 15 54 13 4
42 14 14 70 13 6
43 5 10 54 15 6
44 14 13 69 12 4
45 13 11 68 13 4
46 16 11 68 13 7
47 14 16 71 9 7
48 15 16 71 9 7
49 15 11 66 14 0
50 11 15 67 9 3
51 15 15 71 9 8
52 16 12 54 15 8
53 13 17 76 10 10
54 11 15 77 13 11
55 12 16 71 8 6
56 12 14 69 15 2
57 10 17 73 13 6
58 8 10 46 24 1
59 9 11 66 11 5
60 12 15 77 13 4
61 14 15 77 12 6
62 12 7 70 22 6
63 11 17 86 11 4
64 14 14 38 15 1
65 7 18 66 7 6
66 16 14 75 14 7
67 16 12 80 19 7
68 11 14 64 10 2
69 16 9 80 9 7
70 13 14 86 12 8
71 11 11 54 16 5
72 13 16 74 13 4
73 14 17 88 11 2
74 15 16 85 12 0
75 10 12 63 11 7
76 15 15 81 13 0
77 11 15 81 13 5
78 11 15 74 10 3
79 6 16 80 11 3
80 11 16 80 9 3
81 12 11 60 13 3
82 13 15 65 15 7
83 12 12 62 14 6
84 8 14 63 14 3
85 9 15 89 11 0
86 10 17 76 10 2
87 16 19 81 11 0
88 15 15 72 12 9
89 14 16 84 14 10
90 12 14 76 14 3
91 12 16 76 21 7
92 10 15 78 14 3
93 12 15 72 13 6
94 8 17 81 11 5
95 16 12 72 12 0
96 11 18 78 12 0
97 12 13 79 11 4
98 9 14 52 14 0
99 14 14 67 13 0
100 15 14 74 13 7
101 8 12 73 12 3
102 12 14 69 14 9
103 10 12 67 12 4
104 16 15 76 12 4
105 17 11 77 12 15
106 8 11 63 18 7
107 9 15 84 11 8
108 8 14 90 15 2
109 11 15 75 13 8
110 16 16 76 11 7
111 13 12 75 11 3
112 5 14 53 22 3
113 15 18 87 10 6
114 15 14 78 11 8
115 12 13 54 15 5
116 12 14 58 14 6
117 16 14 80 11 10
118 12 17 74 10 0
119 10 12 56 14 5
120 12 16 82 14 0
121 4 15 64 11 0
122 11 10 67 15 5
123 16 13 75 11 10
124 7 15 69 10 0
125 9 16 72 10 5
126 14 15 71 16 6
127 11 14 54 12 1
128 10 11 68 14 5
129 6 13 54 15 3
130 14 17 71 10 3
131 11 14 53 12 6
132 11 16 54 15 2
133 9 15 71 12 5
134 16 12 69 11 6
135 7 16 30 10 2
136 8 8 53 20 3
137 10 9 68 19 7
138 14 13 69 17 6
139 9 19 54 8 3
140 13 11 66 17 6
141 13 15 79 11 9
142 12 11 67 13 2
143 11 15 74 9 5
144 10 16 86 10 10
145 12 15 63 13 9
146 14 12 69 16 8
147 11 16 73 12 8
148 13 15 69 14 5
149 14 13 71 11 9
150 13 14 77 13 9
151 16 11 74 15 14
152 13 15 82 14 5
153 12 16 54 14 12
154 9 14 54 14 6
155 14 13 80 10 6
156 15 15 76 8 8
Parental_criticism Finding_Friends Knowing_People Perceived_Liked Celebrity
1 4 11 12 13 6
2 4 12 7 11 4
3 10 12 13 14 6
4 6 11 11 12 5
5 5 11 16 12 5
6 8 10 10 6 4
7 9 11 15 10 5
8 6 9 5 11 3
9 8 10 4 10 2
10 11 12 7 12 5
11 6 12 15 15 6
12 8 12 5 13 6
13 11 13 16 18 8
14 5 9 15 11 6
15 10 12 13 12 3
16 7 12 13 13 6
17 7 12 15 14 6
18 13 12 15 16 7
19 10 13 10 16 8
20 8 11 17 16 6
21 6 12 14 15 7
22 8 12 9 13 4
23 7 15 6 8 4
24 5 11 11 14 2
25 9 12 13 15 6
26 9 10 12 13 6
27 11 11 10 16 6
28 11 13 4 13 6
29 11 6 13 12 6
30 9 12 15 15 7
31 7 12 8 11 4
32 6 10 10 14 3
33 6 12 8 13 5
34 6 12 7 13 6
35 5 11 9 12 4
36 4 9 14 14 6
37 10 10 5 13 3
38 8 12 7 12 3
39 6 12 16 14 6
40 5 11 14 15 6
41 9 12 16 16 6
42 10 11 15 15 8
43 6 14 4 5 2
44 9 10 12 15 6
45 10 10 8 8 4
46 6 11 17 16 7
47 6 11 15 16 6
48 6 11 16 14 6
49 13 10 12 16 6
50 8 10 12 14 5
51 10 12 13 13 6
52 5 11 14 14 6
53 8 8 14 14 5
54 6 12 15 12 6
55 9 10 14 13 7
56 9 7 11 15 5
57 7 11 13 15 6
58 20 7 4 13 6
59 8 11 8 10 4
60 8 8 13 13 5
61 7 11 15 14 6
62 7 12 15 13 6
63 10 8 8 13 4
64 5 14 17 18 6
65 8 14 12 12 4
66 9 11 13 14 7
67 9 12 14 16 8
68 20 14 7 13 6
69 6 9 16 16 6
70 10 13 11 15 6
71 11 8 10 14 5
72 7 11 14 13 6
73 12 9 19 12 6
74 12 12 14 16 4
75 8 7 8 9 5
76 6 11 15 15 8
77 6 12 8 16 6
78 9 11 8 12 6
79 5 12 6 11 2
80 11 9 7 13 2
81 6 11 16 13 4
82 6 13 15 14 6
83 10 12 10 15 6
84 8 12 8 14 5
85 7 11 9 12 4
86 8 12 8 16 4
87 9 12 14 14 6
88 8 11 14 13 5
89 10 11 14 12 6
90 13 8 15 13 7
91 7 9 7 12 6
92 7 11 7 9 4
93 7 12 12 13 4
94 8 13 7 10 3
95 9 12 12 15 8
96 9 6 6 9 4
97 8 12 10 13 4
98 7 11 12 13 5
99 6 13 13 13 5
100 8 11 14 15 7
101 8 12 8 13 4
102 4 10 14 14 5
103 8 10 10 11 5
104 10 11 14 15 8
105 7 11 15 14 5
106 8 11 10 15 2
107 7 9 6 12 5
108 10 7 9 15 4
109 9 11 11 14 5
110 8 12 16 16 7
111 8 12 14 14 6
112 5 15 8 12 3
113 8 11 16 11 5
114 9 10 16 13 6
115 11 13 14 12 5
116 7 13 12 12 6
117 8 11 16 16 7
118 4 12 15 13 6
119 16 12 11 12 6
120 9 12 6 14 5
121 16 8 6 4 4
122 12 5 16 14 6
123 8 11 16 15 6
124 4 12 8 12 3
125 11 12 11 11 4
126 11 11 12 12 4
127 8 12 13 11 4
128 8 10 11 12 5
129 12 7 9 11 4
130 8 12 15 13 6
131 6 12 11 12 6
132 8 9 12 12 4
133 6 11 15 15 7
134 14 12 8 14 4
135 10 12 7 12 4
136 5 11 10 12 4
137 8 11 9 12 4
138 12 12 13 13 5
139 11 12 11 11 4
140 8 11 12 13 7
141 8 12 5 12 3
142 9 12 12 14 5
143 6 8 14 15 5
144 5 15 15 15 6
145 8 11 14 13 5
146 7 11 13 16 6
147 4 6 14 17 6
148 9 13 14 13 3
149 5 12 15 14 6
150 9 12 13 13 5
151 12 12 14 16 8
152 6 12 11 13 6
153 4 12 14 14 4
154 6 10 11 13 3
155 7 12 8 14 4
156 9 12 12 16 7
t
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
50 50
51 51
52 52
53 53
54 54
55 55
56 56
57 57
58 58
59 59
60 60
61 61
62 62
63 63
64 64
65 65
66 66
67 67
68 68
69 69
70 70
71 71
72 72
73 73
74 74
75 75
76 76
77 77
78 78
79 79
80 80
81 81
82 82
83 83
84 84
85 85
86 86
87 87
88 88
89 89
90 90
91 91
92 92
93 93
94 94
95 95
96 96
97 97
98 98
99 99
100 100
101 101
102 102
103 103
104 104
105 105
106 106
107 107
108 108
109 109
110 110
111 111
112 112
113 113
114 114
115 115
116 116
117 117
118 118
119 119
120 120
121 121
122 122
123 123
124 124
125 125
126 126
127 127
128 128
129 129
130 130
131 131
132 132
133 133
134 134
135 135
136 136
137 137
138 138
139 139
140 140
141 141
142 142
143 143
144 144
145 145
146 146
147 147
148 148
149 149
150 150
151 151
152 152
153 153
154 154
155 155
156 156
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Happiness Belonging
-1.168928 -0.057277 0.045325
Depression Weighted_popularity Parental_criticism
-0.080731 0.096415 0.077277
Finding_Friends Knowing_People Perceived_Liked
0.117597 0.227711 0.347083
Celebrity t
0.520076 -0.006407
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.1875 -1.2321 0.1329 1.0492 6.6177
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.168928 2.523234 -0.463 0.643868
Happiness -0.057277 0.085478 -0.670 0.503876
Belonging 0.045325 0.016962 2.672 0.008399 **
Depression -0.080731 0.063126 -1.279 0.202984
Weighted_popularity 0.096415 0.058110 1.659 0.099240 .
Parental_criticism 0.077277 0.064661 1.195 0.233999
Finding_Friends 0.117597 0.093661 1.256 0.211299
Knowing_People 0.227711 0.064294 3.542 0.000535 ***
Perceived_Liked 0.347083 0.093825 3.699 0.000306 ***
Celebrity 0.520076 0.158405 3.283 0.001286 **
t -0.006407 0.003735 -1.716 0.088366 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.019 on 145 degrees of freedom
Multiple R-squared: 0.5578, Adjusted R-squared: 0.5273
F-statistic: 18.29 on 10 and 145 DF, p-value: < 2.2e-16
> if (n > n25) {
+ kp3 <- k + 3
+ nmkm3 <- n - k - 3
+ gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
+ numgqtests <- 0
+ numsignificant1 <- 0
+ numsignificant5 <- 0
+ numsignificant10 <- 0
+ for (mypoint in kp3:nmkm3) {
+ j <- 0
+ numgqtests <- numgqtests + 1
+ for (myalt in c('greater', 'two.sided', 'less')) {
+ j <- j + 1
+ gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
+ }
+ if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
+ if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
+ }
+ gqarr
+ }
[,1] [,2] [,3]
[1,] 0.9997493 0.0005014775 0.0002507387
[2,] 0.9998971 0.0002057263 0.0001028632
[3,] 0.9998951 0.0002097046 0.0001048523
[4,] 0.9998316 0.0003368600 0.0001684300
[5,] 0.9998796 0.0002407090 0.0001203545
[6,] 0.9997379 0.0005242909 0.0002621455
[7,] 0.9995654 0.0008691259 0.0004345630
[8,] 0.9991375 0.0017250793 0.0008625396
[9,] 0.9994529 0.0010941518 0.0005470759
[10,] 0.9992083 0.0015833592 0.0007916796
[11,] 0.9985830 0.0028339676 0.0014169838
[12,] 0.9976450 0.0047099562 0.0023549781
[13,] 0.9960943 0.0078113295 0.0039056647
[14,] 0.9953208 0.0093583748 0.0046791874
[15,] 0.9926112 0.0147775609 0.0073887805
[16,] 0.9954354 0.0091291252 0.0045645626
[17,] 0.9942477 0.0115046725 0.0057523362
[18,] 0.9914964 0.0170071157 0.0085035578
[19,] 0.9954312 0.0091376820 0.0045688410
[20,] 0.9932089 0.0135821964 0.0067910982
[21,] 0.9899419 0.0201162164 0.0100581082
[22,] 0.9885356 0.0229287340 0.0114643670
[23,] 0.9839023 0.0321953306 0.0160976653
[24,] 0.9805971 0.0388057571 0.0194028785
[25,] 0.9824818 0.0350363592 0.0175181796
[26,] 0.9812121 0.0375758758 0.0187879379
[27,] 0.9867397 0.0265206026 0.0132603013
[28,] 0.9823697 0.0352606707 0.0176303353
[29,] 0.9762052 0.0475896304 0.0237948152
[30,] 0.9678151 0.0643698630 0.0321849315
[31,] 0.9602668 0.0794664989 0.0397332495
[32,] 0.9892035 0.0215929404 0.0107964702
[33,] 0.9854827 0.0290345185 0.0145172592
[34,] 0.9805814 0.0388372873 0.0194186437
[35,] 0.9751230 0.0497540490 0.0248770245
[36,] 0.9720529 0.0558941109 0.0279470555
[37,] 0.9675091 0.0649818004 0.0324909002
[38,] 0.9635855 0.0728289342 0.0364144671
[39,] 0.9775420 0.0449160203 0.0224580102
[40,] 0.9702408 0.0595184231 0.0297592115
[41,] 0.9712802 0.0574396710 0.0287198355
[42,] 0.9679157 0.0641686089 0.0320843044
[43,] 0.9593090 0.0813820275 0.0406910137
[44,] 0.9718416 0.0563168204 0.0281584102
[45,] 0.9645183 0.0709634590 0.0354817295
[46,] 0.9540985 0.0918030475 0.0459015237
[47,] 0.9415396 0.1169207868 0.0584603934
[48,] 0.9272512 0.1454975467 0.0727487734
[49,] 0.9124335 0.1751330470 0.0875665235
[50,] 0.8918938 0.2162124065 0.1081062033
[51,] 0.8761864 0.2476272440 0.1238136220
[52,] 0.9350950 0.1298100376 0.0649050188
[53,] 0.9414434 0.1171131758 0.0585565879
[54,] 0.9284020 0.1431960927 0.0715980464
[55,] 0.9163987 0.1672025434 0.0836012717
[56,] 0.9000105 0.1999789842 0.0999894921
[57,] 0.8873822 0.2252356956 0.1126178478
[58,] 0.8649267 0.2701466846 0.1350733423
[59,] 0.8392516 0.3214967887 0.1607483943
[60,] 0.8238246 0.3523507479 0.1761753740
[61,] 0.8172289 0.3655422714 0.1827711357
[62,] 0.7936049 0.4127902941 0.2063951471
[63,] 0.7609771 0.4780457798 0.2390228899
[64,] 0.7510138 0.4979724948 0.2489862474
[65,] 0.7107363 0.5785274415 0.2892637207
[66,] 0.7152341 0.5695317211 0.2847658605
[67,] 0.7011334 0.5977332698 0.2988666349
[68,] 0.6644571 0.6710857021 0.3355428511
[69,] 0.6217936 0.7564128655 0.3782064327
[70,] 0.5746545 0.8506910749 0.4253455375
[71,] 0.5968753 0.8062493198 0.4031246599
[72,] 0.5780599 0.8438801876 0.4219400938
[73,] 0.5545420 0.8909160416 0.4454580208
[74,] 0.5971583 0.8056834794 0.4028417397
[75,] 0.6252310 0.7495379729 0.3747689864
[76,] 0.5912222 0.8175556421 0.4087778210
[77,] 0.5718954 0.8562091023 0.4281045511
[78,] 0.5641122 0.8717756871 0.4358878436
[79,] 0.5372589 0.9254821379 0.4627410689
[80,] 0.4938645 0.9877290064 0.5061354968
[81,] 0.4751316 0.9502631579 0.5248684211
[82,] 0.4901709 0.9803417987 0.5098291007
[83,] 0.6343305 0.7313389230 0.3656694615
[84,] 0.5908055 0.8183890633 0.4091945316
[85,] 0.5557194 0.8885612692 0.4442806346
[86,] 0.6135686 0.7728627412 0.3864313706
[87,] 0.5845496 0.8309008838 0.4154504419
[88,] 0.5983612 0.8032775123 0.4016387562
[89,] 0.5514690 0.8970620438 0.4485310219
[90,] 0.5014318 0.9971364184 0.4985682092
[91,] 0.5090954 0.9818091447 0.4909045723
[92,] 0.5666182 0.8667636330 0.4333818165
[93,] 0.5669413 0.8661174187 0.4330587093
[94,] 0.5265533 0.9468933911 0.4734466955
[95,] 0.6113309 0.7773381907 0.3886690953
[96,] 0.5924192 0.8151615870 0.4075807935
[97,] 0.5493062 0.9013876054 0.4506938027
[98,] 0.4939869 0.9879737071 0.5060131464
[99,] 0.6451669 0.7096662961 0.3548331480
[100,] 0.6595099 0.6809801380 0.3404900690
[101,] 0.6518290 0.6963420277 0.3481710138
[102,] 0.5989865 0.8020270280 0.4010135140
[103,] 0.5614664 0.8770672668 0.4385336334
[104,] 0.5184822 0.9630355761 0.4815177880
[105,] 0.5057864 0.9884271577 0.4942135788
[106,] 0.5265866 0.9468267017 0.4734133508
[107,] 0.4719281 0.9438561994 0.5280719003
[108,] 0.4466560 0.8933120797 0.5533439602
[109,] 0.4062972 0.8125943264 0.5937028368
[110,] 0.4513334 0.9026667950 0.5486666025
[111,] 0.4109431 0.8218862135 0.5890568932
[112,] 0.4445165 0.8890330909 0.5554834546
[113,] 0.4640487 0.9280973260 0.5359513370
[114,] 0.4522297 0.9044594721 0.5477702639
[115,] 0.3826198 0.7652396023 0.6173801988
[116,] 0.6069339 0.7861322814 0.3930661407
[117,] 0.7167584 0.5664832100 0.2832416050
[118,] 0.7712683 0.4574634862 0.2287317431
[119,] 0.8290645 0.3418709675 0.1709354838
[120,] 0.8068868 0.3862264602 0.1931132301
[121,] 0.8620869 0.2758262213 0.1379131107
[122,] 0.8029250 0.3941500426 0.1970750213
[123,] 0.7477576 0.5044847194 0.2522423597
[124,] 0.8073846 0.3852307953 0.1926153977
[125,] 0.7485514 0.5028972239 0.2514486119
[126,] 0.6441293 0.7117413418 0.3558706709
[127,] 0.5136510 0.9726979585 0.4863489792
[128,] 0.4818939 0.9637878416 0.5181060792
[129,] 0.3364232 0.6728464478 0.6635767761
> postscript(file="/var/wessaorg/rcomp/tmp/1dyfb1321954209.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/2jsis1321954209.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/3hvuk1321954209.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/4f66i1321954209.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/5bhdv1321954209.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 156
Frequency = 1
1 2 3 4 5 6
1.90191544 2.66538889 1.34895095 -0.18963442 0.36327516 -1.09557558
7 8 9 10 11 12
-1.11155726 6.61771406 -2.33579814 2.34679759 4.58060294 -1.38947521
13 14 15 16 17 18
-2.29263588 -7.18746664 -5.12310234 0.52677730 1.63298278 0.15001762
19 20 21 22 23 24
-1.21821100 -0.21720571 -0.54681367 0.74205177 0.01148626 0.42038143
25 26 27 28 29 30
0.09046514 -0.06793063 0.33548005 -1.23036350 1.03962409 -0.03885605
31 32 33 34 35 36
1.07793074 -2.75399997 0.30318939 -0.07497962 -2.31057265 0.78640918
37 38 39 40 41 42
0.98969533 2.16772159 0.78214417 2.98462516 -0.91676925 -1.31071226
43 44 45 46 47 48
-0.59431255 0.72041079 4.04162560 0.56399925 -0.62661033 0.84625243
49 50 51 52 53 54
1.66480444 -1.23728116 1.31529791 3.33397529 -0.32584059 -2.70298887
55 56 57 58 59 60
-1.92501332 0.39017666 -3.45134223 -1.04261104 -0.69310574 -0.04538799
61 62 63 64 65 66
0.08936294 -1.00837134 0.02307786 0.50127448 -4.63086472 2.00061425
67 68 69 70 71 72
0.50994426 -1.29824094 0.71297151 -1.41426577 0.08846959 0.20145399
73 74 75 76 77 78
-0.28071104 1.51554332 0.70722944 0.35343760 -1.95277978 -0.40435548
79 80 81 82 83 84
-2.45757353 1.35462508 0.36571477 -0.24431548 -0.65811267 -2.81609623
85 86 87 88 89 90
-1.70241357 -1.62127940 2.75708545 2.21733990 0.47461965 -1.56992617
91 92 93 94 95 96
1.76540058 1.29063663 0.55453274 -1.29247099 1.96425592 3.27702208
97 98 99 100 101 102
0.55784762 -1.30745554 2.55271267 0.68554504 -2.56927796 -0.37317530
103 104 105 106 107 108
-0.42706510 1.21168719 2.79452354 -2.03438203 -1.70789363 -3.33024514
109 110 111 112 113 114
-1.34815884 0.69195825 -0.43008827 -2.92422945 2.23600455 1.13521147
115 116 117 118 119 120
0.59955953 0.54924901 0.26930644 -0.41653429 -1.70919630 1.33533628
121 122 123 124 125 126
-2.22150795 -1.92281744 1.34426094 -1.76472456 -1.71615589 3.20907061
127 128 129 130 131 132
1.32149217 -0.87922892 -2.48388603 1.19797946 0.13311129 1.84727689
133 134 135 136 137 138
-4.87081375 4.64275121 -0.81813033 -0.78068323 0.13260994 2.05304484
139 140 141 142 143 144
-0.60739523 0.70154490 3.47796939 0.22996890 -1.56425405 -4.93950729
145 146 147 148 149 150
0.07122522 0.71611991 -2.30757291 2.01256976 0.47760003 0.44426910
151 152 153 154 155 156
0.03318864 0.92130218 0.74367676 -0.15504322 2.79621066 0.42438758
> postscript(file="/var/wessaorg/rcomp/tmp/6t5z51321954210.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 156
Frequency = 1
lag(myerror, k = 1) myerror
0 1.90191544 NA
1 2.66538889 1.90191544
2 1.34895095 2.66538889
3 -0.18963442 1.34895095
4 0.36327516 -0.18963442
5 -1.09557558 0.36327516
6 -1.11155726 -1.09557558
7 6.61771406 -1.11155726
8 -2.33579814 6.61771406
9 2.34679759 -2.33579814
10 4.58060294 2.34679759
11 -1.38947521 4.58060294
12 -2.29263588 -1.38947521
13 -7.18746664 -2.29263588
14 -5.12310234 -7.18746664
15 0.52677730 -5.12310234
16 1.63298278 0.52677730
17 0.15001762 1.63298278
18 -1.21821100 0.15001762
19 -0.21720571 -1.21821100
20 -0.54681367 -0.21720571
21 0.74205177 -0.54681367
22 0.01148626 0.74205177
23 0.42038143 0.01148626
24 0.09046514 0.42038143
25 -0.06793063 0.09046514
26 0.33548005 -0.06793063
27 -1.23036350 0.33548005
28 1.03962409 -1.23036350
29 -0.03885605 1.03962409
30 1.07793074 -0.03885605
31 -2.75399997 1.07793074
32 0.30318939 -2.75399997
33 -0.07497962 0.30318939
34 -2.31057265 -0.07497962
35 0.78640918 -2.31057265
36 0.98969533 0.78640918
37 2.16772159 0.98969533
38 0.78214417 2.16772159
39 2.98462516 0.78214417
40 -0.91676925 2.98462516
41 -1.31071226 -0.91676925
42 -0.59431255 -1.31071226
43 0.72041079 -0.59431255
44 4.04162560 0.72041079
45 0.56399925 4.04162560
46 -0.62661033 0.56399925
47 0.84625243 -0.62661033
48 1.66480444 0.84625243
49 -1.23728116 1.66480444
50 1.31529791 -1.23728116
51 3.33397529 1.31529791
52 -0.32584059 3.33397529
53 -2.70298887 -0.32584059
54 -1.92501332 -2.70298887
55 0.39017666 -1.92501332
56 -3.45134223 0.39017666
57 -1.04261104 -3.45134223
58 -0.69310574 -1.04261104
59 -0.04538799 -0.69310574
60 0.08936294 -0.04538799
61 -1.00837134 0.08936294
62 0.02307786 -1.00837134
63 0.50127448 0.02307786
64 -4.63086472 0.50127448
65 2.00061425 -4.63086472
66 0.50994426 2.00061425
67 -1.29824094 0.50994426
68 0.71297151 -1.29824094
69 -1.41426577 0.71297151
70 0.08846959 -1.41426577
71 0.20145399 0.08846959
72 -0.28071104 0.20145399
73 1.51554332 -0.28071104
74 0.70722944 1.51554332
75 0.35343760 0.70722944
76 -1.95277978 0.35343760
77 -0.40435548 -1.95277978
78 -2.45757353 -0.40435548
79 1.35462508 -2.45757353
80 0.36571477 1.35462508
81 -0.24431548 0.36571477
82 -0.65811267 -0.24431548
83 -2.81609623 -0.65811267
84 -1.70241357 -2.81609623
85 -1.62127940 -1.70241357
86 2.75708545 -1.62127940
87 2.21733990 2.75708545
88 0.47461965 2.21733990
89 -1.56992617 0.47461965
90 1.76540058 -1.56992617
91 1.29063663 1.76540058
92 0.55453274 1.29063663
93 -1.29247099 0.55453274
94 1.96425592 -1.29247099
95 3.27702208 1.96425592
96 0.55784762 3.27702208
97 -1.30745554 0.55784762
98 2.55271267 -1.30745554
99 0.68554504 2.55271267
100 -2.56927796 0.68554504
101 -0.37317530 -2.56927796
102 -0.42706510 -0.37317530
103 1.21168719 -0.42706510
104 2.79452354 1.21168719
105 -2.03438203 2.79452354
106 -1.70789363 -2.03438203
107 -3.33024514 -1.70789363
108 -1.34815884 -3.33024514
109 0.69195825 -1.34815884
110 -0.43008827 0.69195825
111 -2.92422945 -0.43008827
112 2.23600455 -2.92422945
113 1.13521147 2.23600455
114 0.59955953 1.13521147
115 0.54924901 0.59955953
116 0.26930644 0.54924901
117 -0.41653429 0.26930644
118 -1.70919630 -0.41653429
119 1.33533628 -1.70919630
120 -2.22150795 1.33533628
121 -1.92281744 -2.22150795
122 1.34426094 -1.92281744
123 -1.76472456 1.34426094
124 -1.71615589 -1.76472456
125 3.20907061 -1.71615589
126 1.32149217 3.20907061
127 -0.87922892 1.32149217
128 -2.48388603 -0.87922892
129 1.19797946 -2.48388603
130 0.13311129 1.19797946
131 1.84727689 0.13311129
132 -4.87081375 1.84727689
133 4.64275121 -4.87081375
134 -0.81813033 4.64275121
135 -0.78068323 -0.81813033
136 0.13260994 -0.78068323
137 2.05304484 0.13260994
138 -0.60739523 2.05304484
139 0.70154490 -0.60739523
140 3.47796939 0.70154490
141 0.22996890 3.47796939
142 -1.56425405 0.22996890
143 -4.93950729 -1.56425405
144 0.07122522 -4.93950729
145 0.71611991 0.07122522
146 -2.30757291 0.71611991
147 2.01256976 -2.30757291
148 0.47760003 2.01256976
149 0.44426910 0.47760003
150 0.03318864 0.44426910
151 0.92130218 0.03318864
152 0.74367676 0.92130218
153 -0.15504322 0.74367676
154 2.79621066 -0.15504322
155 0.42438758 2.79621066
156 NA 0.42438758
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 2.66538889 1.90191544
[2,] 1.34895095 2.66538889
[3,] -0.18963442 1.34895095
[4,] 0.36327516 -0.18963442
[5,] -1.09557558 0.36327516
[6,] -1.11155726 -1.09557558
[7,] 6.61771406 -1.11155726
[8,] -2.33579814 6.61771406
[9,] 2.34679759 -2.33579814
[10,] 4.58060294 2.34679759
[11,] -1.38947521 4.58060294
[12,] -2.29263588 -1.38947521
[13,] -7.18746664 -2.29263588
[14,] -5.12310234 -7.18746664
[15,] 0.52677730 -5.12310234
[16,] 1.63298278 0.52677730
[17,] 0.15001762 1.63298278
[18,] -1.21821100 0.15001762
[19,] -0.21720571 -1.21821100
[20,] -0.54681367 -0.21720571
[21,] 0.74205177 -0.54681367
[22,] 0.01148626 0.74205177
[23,] 0.42038143 0.01148626
[24,] 0.09046514 0.42038143
[25,] -0.06793063 0.09046514
[26,] 0.33548005 -0.06793063
[27,] -1.23036350 0.33548005
[28,] 1.03962409 -1.23036350
[29,] -0.03885605 1.03962409
[30,] 1.07793074 -0.03885605
[31,] -2.75399997 1.07793074
[32,] 0.30318939 -2.75399997
[33,] -0.07497962 0.30318939
[34,] -2.31057265 -0.07497962
[35,] 0.78640918 -2.31057265
[36,] 0.98969533 0.78640918
[37,] 2.16772159 0.98969533
[38,] 0.78214417 2.16772159
[39,] 2.98462516 0.78214417
[40,] -0.91676925 2.98462516
[41,] -1.31071226 -0.91676925
[42,] -0.59431255 -1.31071226
[43,] 0.72041079 -0.59431255
[44,] 4.04162560 0.72041079
[45,] 0.56399925 4.04162560
[46,] -0.62661033 0.56399925
[47,] 0.84625243 -0.62661033
[48,] 1.66480444 0.84625243
[49,] -1.23728116 1.66480444
[50,] 1.31529791 -1.23728116
[51,] 3.33397529 1.31529791
[52,] -0.32584059 3.33397529
[53,] -2.70298887 -0.32584059
[54,] -1.92501332 -2.70298887
[55,] 0.39017666 -1.92501332
[56,] -3.45134223 0.39017666
[57,] -1.04261104 -3.45134223
[58,] -0.69310574 -1.04261104
[59,] -0.04538799 -0.69310574
[60,] 0.08936294 -0.04538799
[61,] -1.00837134 0.08936294
[62,] 0.02307786 -1.00837134
[63,] 0.50127448 0.02307786
[64,] -4.63086472 0.50127448
[65,] 2.00061425 -4.63086472
[66,] 0.50994426 2.00061425
[67,] -1.29824094 0.50994426
[68,] 0.71297151 -1.29824094
[69,] -1.41426577 0.71297151
[70,] 0.08846959 -1.41426577
[71,] 0.20145399 0.08846959
[72,] -0.28071104 0.20145399
[73,] 1.51554332 -0.28071104
[74,] 0.70722944 1.51554332
[75,] 0.35343760 0.70722944
[76,] -1.95277978 0.35343760
[77,] -0.40435548 -1.95277978
[78,] -2.45757353 -0.40435548
[79,] 1.35462508 -2.45757353
[80,] 0.36571477 1.35462508
[81,] -0.24431548 0.36571477
[82,] -0.65811267 -0.24431548
[83,] -2.81609623 -0.65811267
[84,] -1.70241357 -2.81609623
[85,] -1.62127940 -1.70241357
[86,] 2.75708545 -1.62127940
[87,] 2.21733990 2.75708545
[88,] 0.47461965 2.21733990
[89,] -1.56992617 0.47461965
[90,] 1.76540058 -1.56992617
[91,] 1.29063663 1.76540058
[92,] 0.55453274 1.29063663
[93,] -1.29247099 0.55453274
[94,] 1.96425592 -1.29247099
[95,] 3.27702208 1.96425592
[96,] 0.55784762 3.27702208
[97,] -1.30745554 0.55784762
[98,] 2.55271267 -1.30745554
[99,] 0.68554504 2.55271267
[100,] -2.56927796 0.68554504
[101,] -0.37317530 -2.56927796
[102,] -0.42706510 -0.37317530
[103,] 1.21168719 -0.42706510
[104,] 2.79452354 1.21168719
[105,] -2.03438203 2.79452354
[106,] -1.70789363 -2.03438203
[107,] -3.33024514 -1.70789363
[108,] -1.34815884 -3.33024514
[109,] 0.69195825 -1.34815884
[110,] -0.43008827 0.69195825
[111,] -2.92422945 -0.43008827
[112,] 2.23600455 -2.92422945
[113,] 1.13521147 2.23600455
[114,] 0.59955953 1.13521147
[115,] 0.54924901 0.59955953
[116,] 0.26930644 0.54924901
[117,] -0.41653429 0.26930644
[118,] -1.70919630 -0.41653429
[119,] 1.33533628 -1.70919630
[120,] -2.22150795 1.33533628
[121,] -1.92281744 -2.22150795
[122,] 1.34426094 -1.92281744
[123,] -1.76472456 1.34426094
[124,] -1.71615589 -1.76472456
[125,] 3.20907061 -1.71615589
[126,] 1.32149217 3.20907061
[127,] -0.87922892 1.32149217
[128,] -2.48388603 -0.87922892
[129,] 1.19797946 -2.48388603
[130,] 0.13311129 1.19797946
[131,] 1.84727689 0.13311129
[132,] -4.87081375 1.84727689
[133,] 4.64275121 -4.87081375
[134,] -0.81813033 4.64275121
[135,] -0.78068323 -0.81813033
[136,] 0.13260994 -0.78068323
[137,] 2.05304484 0.13260994
[138,] -0.60739523 2.05304484
[139,] 0.70154490 -0.60739523
[140,] 3.47796939 0.70154490
[141,] 0.22996890 3.47796939
[142,] -1.56425405 0.22996890
[143,] -4.93950729 -1.56425405
[144,] 0.07122522 -4.93950729
[145,] 0.71611991 0.07122522
[146,] -2.30757291 0.71611991
[147,] 2.01256976 -2.30757291
[148,] 0.47760003 2.01256976
[149,] 0.44426910 0.47760003
[150,] 0.03318864 0.44426910
[151,] 0.92130218 0.03318864
[152,] 0.74367676 0.92130218
[153,] -0.15504322 0.74367676
[154,] 2.79621066 -0.15504322
[155,] 0.42438758 2.79621066
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 2.66538889 1.90191544
2 1.34895095 2.66538889
3 -0.18963442 1.34895095
4 0.36327516 -0.18963442
5 -1.09557558 0.36327516
6 -1.11155726 -1.09557558
7 6.61771406 -1.11155726
8 -2.33579814 6.61771406
9 2.34679759 -2.33579814
10 4.58060294 2.34679759
11 -1.38947521 4.58060294
12 -2.29263588 -1.38947521
13 -7.18746664 -2.29263588
14 -5.12310234 -7.18746664
15 0.52677730 -5.12310234
16 1.63298278 0.52677730
17 0.15001762 1.63298278
18 -1.21821100 0.15001762
19 -0.21720571 -1.21821100
20 -0.54681367 -0.21720571
21 0.74205177 -0.54681367
22 0.01148626 0.74205177
23 0.42038143 0.01148626
24 0.09046514 0.42038143
25 -0.06793063 0.09046514
26 0.33548005 -0.06793063
27 -1.23036350 0.33548005
28 1.03962409 -1.23036350
29 -0.03885605 1.03962409
30 1.07793074 -0.03885605
31 -2.75399997 1.07793074
32 0.30318939 -2.75399997
33 -0.07497962 0.30318939
34 -2.31057265 -0.07497962
35 0.78640918 -2.31057265
36 0.98969533 0.78640918
37 2.16772159 0.98969533
38 0.78214417 2.16772159
39 2.98462516 0.78214417
40 -0.91676925 2.98462516
41 -1.31071226 -0.91676925
42 -0.59431255 -1.31071226
43 0.72041079 -0.59431255
44 4.04162560 0.72041079
45 0.56399925 4.04162560
46 -0.62661033 0.56399925
47 0.84625243 -0.62661033
48 1.66480444 0.84625243
49 -1.23728116 1.66480444
50 1.31529791 -1.23728116
51 3.33397529 1.31529791
52 -0.32584059 3.33397529
53 -2.70298887 -0.32584059
54 -1.92501332 -2.70298887
55 0.39017666 -1.92501332
56 -3.45134223 0.39017666
57 -1.04261104 -3.45134223
58 -0.69310574 -1.04261104
59 -0.04538799 -0.69310574
60 0.08936294 -0.04538799
61 -1.00837134 0.08936294
62 0.02307786 -1.00837134
63 0.50127448 0.02307786
64 -4.63086472 0.50127448
65 2.00061425 -4.63086472
66 0.50994426 2.00061425
67 -1.29824094 0.50994426
68 0.71297151 -1.29824094
69 -1.41426577 0.71297151
70 0.08846959 -1.41426577
71 0.20145399 0.08846959
72 -0.28071104 0.20145399
73 1.51554332 -0.28071104
74 0.70722944 1.51554332
75 0.35343760 0.70722944
76 -1.95277978 0.35343760
77 -0.40435548 -1.95277978
78 -2.45757353 -0.40435548
79 1.35462508 -2.45757353
80 0.36571477 1.35462508
81 -0.24431548 0.36571477
82 -0.65811267 -0.24431548
83 -2.81609623 -0.65811267
84 -1.70241357 -2.81609623
85 -1.62127940 -1.70241357
86 2.75708545 -1.62127940
87 2.21733990 2.75708545
88 0.47461965 2.21733990
89 -1.56992617 0.47461965
90 1.76540058 -1.56992617
91 1.29063663 1.76540058
92 0.55453274 1.29063663
93 -1.29247099 0.55453274
94 1.96425592 -1.29247099
95 3.27702208 1.96425592
96 0.55784762 3.27702208
97 -1.30745554 0.55784762
98 2.55271267 -1.30745554
99 0.68554504 2.55271267
100 -2.56927796 0.68554504
101 -0.37317530 -2.56927796
102 -0.42706510 -0.37317530
103 1.21168719 -0.42706510
104 2.79452354 1.21168719
105 -2.03438203 2.79452354
106 -1.70789363 -2.03438203
107 -3.33024514 -1.70789363
108 -1.34815884 -3.33024514
109 0.69195825 -1.34815884
110 -0.43008827 0.69195825
111 -2.92422945 -0.43008827
112 2.23600455 -2.92422945
113 1.13521147 2.23600455
114 0.59955953 1.13521147
115 0.54924901 0.59955953
116 0.26930644 0.54924901
117 -0.41653429 0.26930644
118 -1.70919630 -0.41653429
119 1.33533628 -1.70919630
120 -2.22150795 1.33533628
121 -1.92281744 -2.22150795
122 1.34426094 -1.92281744
123 -1.76472456 1.34426094
124 -1.71615589 -1.76472456
125 3.20907061 -1.71615589
126 1.32149217 3.20907061
127 -0.87922892 1.32149217
128 -2.48388603 -0.87922892
129 1.19797946 -2.48388603
130 0.13311129 1.19797946
131 1.84727689 0.13311129
132 -4.87081375 1.84727689
133 4.64275121 -4.87081375
134 -0.81813033 4.64275121
135 -0.78068323 -0.81813033
136 0.13260994 -0.78068323
137 2.05304484 0.13260994
138 -0.60739523 2.05304484
139 0.70154490 -0.60739523
140 3.47796939 0.70154490
141 0.22996890 3.47796939
142 -1.56425405 0.22996890
143 -4.93950729 -1.56425405
144 0.07122522 -4.93950729
145 0.71611991 0.07122522
146 -2.30757291 0.71611991
147 2.01256976 -2.30757291
148 0.47760003 2.01256976
149 0.44426910 0.47760003
150 0.03318864 0.44426910
151 0.92130218 0.03318864
152 0.74367676 0.92130218
153 -0.15504322 0.74367676
154 2.79621066 -0.15504322
155 0.42438758 2.79621066
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/7fxj51321954210.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/8l6my1321954210.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/941ao1321954210.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/10tsgb1321954210.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/11oav31321954210.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/12h1ls1321954210.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/13jzod1321954210.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/wessaorg/rcomp/tmp/145oik1321954210.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/15l2p61321954210.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/wessaorg/rcomp/tmp/168b5d1321954210.tab")
+ }
>
> try(system("convert tmp/1dyfb1321954209.ps tmp/1dyfb1321954209.png",intern=TRUE))
character(0)
> try(system("convert tmp/2jsis1321954209.ps tmp/2jsis1321954209.png",intern=TRUE))
character(0)
> try(system("convert tmp/3hvuk1321954209.ps tmp/3hvuk1321954209.png",intern=TRUE))
character(0)
> try(system("convert tmp/4f66i1321954209.ps tmp/4f66i1321954209.png",intern=TRUE))
character(0)
> try(system("convert tmp/5bhdv1321954209.ps tmp/5bhdv1321954209.png",intern=TRUE))
character(0)
> try(system("convert tmp/6t5z51321954210.ps tmp/6t5z51321954210.png",intern=TRUE))
character(0)
> try(system("convert tmp/7fxj51321954210.ps tmp/7fxj51321954210.png",intern=TRUE))
character(0)
> try(system("convert tmp/8l6my1321954210.ps tmp/8l6my1321954210.png",intern=TRUE))
character(0)
> try(system("convert tmp/941ao1321954210.ps tmp/941ao1321954210.png",intern=TRUE))
character(0)
> try(system("convert tmp/10tsgb1321954210.ps tmp/10tsgb1321954210.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.447 0.538 6.003