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(0
+ ,13
+ ,13
+ ,0
+ ,14
+ ,0
+ ,13
+ ,0
+ ,3
+ ,0
+ ,1
+ ,12
+ ,12
+ ,12
+ ,8
+ ,8
+ ,13
+ ,13
+ ,5
+ ,5
+ ,1
+ ,15
+ ,10
+ ,10
+ ,12
+ ,12
+ ,16
+ ,16
+ ,6
+ ,6
+ ,1
+ ,12
+ ,9
+ ,9
+ ,7
+ ,7
+ ,12
+ ,12
+ ,6
+ ,6
+ ,0
+ ,10
+ ,10
+ ,0
+ ,10
+ ,0
+ ,11
+ ,0
+ ,5
+ ,0
+ ,0
+ ,12
+ ,12
+ ,0
+ ,7
+ ,0
+ ,12
+ ,0
+ ,3
+ ,0
+ ,1
+ ,15
+ ,13
+ ,13
+ ,16
+ ,16
+ ,18
+ ,18
+ ,8
+ ,8
+ ,1
+ ,9
+ ,12
+ ,12
+ ,11
+ ,11
+ ,11
+ ,11
+ ,4
+ ,4
+ ,1
+ ,12
+ ,12
+ ,12
+ ,14
+ ,14
+ ,14
+ ,14
+ ,4
+ ,4
+ ,1
+ ,11
+ ,6
+ ,6
+ ,6
+ ,6
+ ,9
+ ,9
+ ,4
+ ,4
+ ,0
+ ,11
+ ,5
+ ,0
+ ,16
+ ,0
+ ,14
+ ,0
+ ,6
+ ,0
+ ,1
+ ,11
+ ,12
+ ,12
+ ,11
+ ,11
+ ,12
+ ,12
+ ,6
+ ,6
+ ,1
+ ,15
+ ,11
+ ,11
+ ,16
+ ,16
+ ,11
+ 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
+ ,12
+ ,12
+ ,12
+ ,15
+ ,15
+ ,8
+ ,8
+ ,1
+ ,13
+ ,11
+ ,11
+ ,12
+ ,12
+ ,13
+ ,13
+ ,7
+ ,7
+ ,1
+ ,16
+ ,12
+ ,12
+ ,15
+ ,15
+ ,16
+ ,16
+ ,7
+ ,7
+ ,1
+ ,9
+ ,11
+ ,11
+ ,9
+ ,9
+ ,12
+ ,12
+ ,4
+ ,4
+ ,0
+ ,14
+ ,10
+ ,0
+ ,12
+ ,0
+ ,15
+ ,0
+ ,6
+ ,0
+ ,0
+ ,14
+ ,11
+ ,0
+ ,14
+ ,0
+ ,12
+ ,0
+ ,6
+ ,0
+ ,1
+ ,12
+ ,11
+ ,11
+ ,11
+ ,11
+ ,14
+ ,14
+ ,2
+ ,2)
+ ,dim=c(10
+ ,156)
+ ,dimnames=list(c('G'
+ ,'Popularity'
+ ,'FindingFriends'
+ ,'Findingfriends*G'
+ ,'KnowingPeople'
+ ,'Knowingpeople*G'
+ ,'Liked'
+ ,'Liked*G'
+ ,'Celebrity'
+ ,'Celebrity*G')
+ ,1:156))
> y <- array(NA,dim=c(10,156),dimnames=list(c('G','Popularity','FindingFriends','Findingfriends*G','KnowingPeople','Knowingpeople*G','Liked','Liked*G','Celebrity','Celebrity*G'),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 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '2'
> 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 G FindingFriends Findingfriends*G KnowingPeople Knowingpeople*G
1 13 0 13 0 14 0
2 12 1 12 12 8 8
3 15 1 10 10 12 12
4 12 1 9 9 7 7
5 10 0 10 0 10 0
6 12 0 12 0 7 0
7 15 1 13 13 16 16
8 9 1 12 12 11 11
9 12 1 12 12 14 14
10 11 1 6 6 6 6
11 11 0 5 0 16 0
12 11 1 12 12 11 11
13 15 1 11 11 16 16
14 7 0 14 0 12 0
15 11 0 14 0 7 0
16 11 1 12 12 13 13
17 10 1 12 12 11 11
18 14 0 11 0 15 0
19 10 1 11 11 7 7
20 6 0 7 0 9 0
21 11 1 9 9 7 7
22 15 0 11 0 14 0
23 11 1 11 11 15 15
24 12 0 12 0 7 0
25 14 1 12 12 15 15
26 15 0 11 0 17 0
27 9 0 11 0 15 0
28 13 1 8 8 14 14
29 13 0 9 0 14 0
30 16 1 12 12 8 8
31 13 1 10 10 8 8
32 12 0 10 0 14 0
33 14 1 12 12 14 14
34 11 0 8 0 8 0
35 9 1 12 12 11 11
36 16 0 11 0 16 0
37 12 1 12 12 10 10
38 10 0 7 0 8 0
39 13 1 11 11 14 14
40 16 1 11 11 16 16
41 14 0 12 0 13 0
42 15 1 9 9 5 5
43 5 1 15 15 8 8
44 8 0 11 0 10 0
45 11 1 11 11 8 8
46 16 0 11 0 13 0
47 17 1 11 11 15 15
48 9 0 15 0 6 0
49 9 1 11 11 12 12
50 13 1 12 12 16 16
51 10 1 12 12 5 5
52 6 0 9 0 15 0
53 12 0 12 0 12 0
54 8 0 12 0 8 0
55 14 0 13 0 13 0
56 12 1 11 11 14 14
57 11 1 9 9 12 12
58 16 1 9 9 16 16
59 8 0 11 0 10 0
60 15 1 11 11 15 15
61 7 0 12 0 8 0
62 16 0 12 0 16 0
63 14 1 9 9 19 19
64 16 1 11 11 14 14
65 9 1 9 9 6 6
66 14 1 12 12 13 13
67 11 0 12 0 15 0
68 13 0 12 0 7 0
69 15 1 12 12 13 13
70 5 0 14 0 4 0
71 15 1 11 11 14 14
72 13 1 12 12 13 13
73 11 0 11 0 11 0
74 11 0 6 0 14 0
75 12 1 10 10 12 12
76 12 1 12 12 15 15
77 12 1 13 13 14 14
78 12 1 8 8 13 13
79 14 1 12 12 8 8
80 6 1 12 12 6 6
81 7 0 12 0 7 0
82 14 1 6 6 13 13
83 14 1 11 11 13 13
84 10 1 10 10 11 11
85 13 0 12 0 5 0
86 12 0 13 0 12 0
87 9 0 11 0 8 0
88 12 1 7 7 11 11
89 16 1 11 11 14 14
90 10 0 11 0 9 0
91 14 1 11 11 10 10
92 10 1 11 11 13 13
93 16 1 12 12 16 16
94 15 1 10 10 16 16
95 12 0 11 0 11 0
96 10 1 12 12 8 8
97 8 1 7 7 4 4
98 8 0 13 0 7 0
99 11 0 8 0 14 0
100 13 1 12 12 11 11
101 16 1 11 11 17 17
102 16 1 12 12 15 15
103 14 0 14 0 17 0
104 11 1 10 10 5 5
105 4 0 10 0 4 0
106 14 1 13 13 10 10
107 9 1 10 10 11 11
108 14 1 11 11 15 15
109 8 1 10 10 10 10
110 8 1 7 7 9 9
111 11 1 10 10 12 12
112 12 1 8 8 15 15
113 11 1 12 12 7 7
114 14 1 12 12 13 13
115 15 0 12 0 12 0
116 16 1 11 11 14 14
117 16 1 12 12 14 14
118 11 0 12 0 8 0
119 14 0 12 0 15 0
120 14 0 11 0 12 0
121 12 1 12 12 12 12
122 14 0 11 0 16 0
123 8 0 11 0 9 0
124 13 0 13 0 15 0
125 16 0 12 0 15 0
126 12 1 12 12 6 6
127 16 1 12 12 14 14
128 12 1 12 12 15 15
129 11 1 8 8 10 10
130 4 1 8 8 6 6
131 16 1 12 12 14 14
132 15 1 11 11 12 12
133 10 1 12 12 8 8
134 13 1 13 13 11 11
135 15 0 12 0 13 0
136 12 1 12 12 9 9
137 14 0 11 0 15 0
138 7 1 12 12 13 13
139 19 1 12 12 15 15
140 12 1 10 10 14 14
141 12 0 11 0 16 0
142 13 0 12 0 14 0
143 15 1 12 12 14 14
144 8 0 10 0 10 0
145 12 1 12 12 10 10
146 10 1 13 13 4 4
147 8 0 12 0 8 0
148 10 0 15 0 15 0
149 15 0 11 0 16 0
150 16 1 12 12 12 12
151 13 1 11 11 12 12
152 16 1 12 12 15 15
153 9 1 11 11 9 9
154 14 0 10 0 12 0
155 14 0 11 0 14 0
156 12 1 11 11 11 11
Liked Liked*G Celebrity Celebrity*G
1 13 0 3 0
2 13 13 5 5
3 16 16 6 6
4 12 12 6 6
5 11 0 5 0
6 12 0 3 0
7 18 18 8 8
8 11 11 4 4
9 14 14 4 4
10 9 9 4 4
11 14 0 6 0
12 12 12 6 6
13 11 11 5 5
14 12 0 4 0
15 13 0 6 0
16 11 11 4 4
17 12 12 6 6
18 16 0 6 0
19 9 9 4 4
20 11 0 4 0
21 13 13 2 2
22 15 0 7 0
23 10 10 5 5
24 11 0 4 0
25 13 13 6 6
26 16 0 6 0
27 15 0 7 0
28 14 14 5 5
29 14 0 6 0
30 14 14 4 4
31 8 8 4 4
32 13 0 7 0
33 15 15 7 7
34 13 0 4 0
35 11 11 4 4
36 15 0 6 0
37 15 15 6 6
38 9 0 5 0
39 13 13 6 6
40 16 16 7 7
41 13 0 6 0
42 11 11 3 3
43 12 12 3 3
44 12 0 4 0
45 12 12 6 6
46 14 0 7 0
47 14 14 5 5
48 8 0 4 0
49 13 13 5 5
50 16 16 6 6
51 13 13 6 6
52 11 0 6 0
53 14 0 5 0
54 13 0 4 0
55 13 0 5 0
56 13 13 5 5
57 12 12 4 4
58 16 16 6 6
59 15 0 2 0
60 15 15 8 8
61 12 0 3 0
62 14 0 6 0
63 12 12 6 6
64 15 15 6 6
65 12 12 5 5
66 13 13 5 5
67 12 0 6 0
68 12 0 5 0
69 13 13 6 6
70 5 0 2 0
71 13 13 5 5
72 13 13 5 5
73 14 0 5 0
74 17 0 6 0
75 13 13 6 6
76 13 13 6 6
77 12 12 5 5
78 13 13 5 5
79 14 14 4 4
80 11 11 2 2
81 12 0 4 0
82 12 12 6 6
83 16 16 6 6
84 12 12 5 5
85 12 0 3 0
86 12 0 6 0
87 10 0 4 0
88 15 15 5 5
89 15 15 8 8
90 12 0 4 0
91 16 16 6 6
92 15 15 6 6
93 16 16 7 7
94 13 13 6 6
95 12 0 5 0
96 11 11 4 4
97 13 13 6 6
98 10 0 3 0
99 15 0 5 0
100 13 13 6 6
101 16 16 7 7
102 15 15 7 7
103 18 0 6 0
104 13 13 3 3
105 10 0 2 0
106 16 16 8 8
107 13 13 3 3
108 15 15 8 8
109 14 14 3 3
110 15 15 4 4
111 14 14 5 5
112 13 13 7 7
113 13 13 6 6
114 15 15 6 6
115 16 0 7 0
116 14 14 6 6
117 14 14 6 6
118 16 0 6 0
119 14 0 6 0
120 12 0 4 0
121 13 13 4 4
122 12 0 5 0
123 12 0 4 0
124 14 0 6 0
125 14 0 6 0
126 14 14 5 5
127 16 16 8 8
128 13 13 6 6
129 14 14 5 5
130 4 4 4 4
131 16 16 8 8
132 13 13 6 6
133 16 16 4 4
134 15 15 6 6
135 14 0 6 0
136 13 13 4 4
137 14 0 6 0
138 12 12 3 3
139 15 15 6 6
140 14 14 5 5
141 13 0 4 0
142 14 0 6 0
143 16 16 4 4
144 6 0 4 0
145 13 13 4 4
146 13 13 6 6
147 14 0 5 0
148 15 0 6 0
149 14 0 6 0
150 15 15 8 8
151 13 13 7 7
152 16 16 7 7
153 12 12 4 4
154 15 0 6 0
155 12 0 6 0
156 14 14 2 2
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) G FindingFriends `Findingfriends*G`
-1.42983 2.84020 0.25531 -0.28087
KnowingPeople `Knowingpeople*G` Liked `Liked*G`
0.23974 0.03076 0.26903 0.12906
Celebrity `Celebrity*G`
0.73654 -0.19771
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.8426 -1.2777 -0.1177 1.2405 6.4717
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.42983 2.26818 -0.630 0.5294
G 2.84020 2.90325 0.978 0.3296
FindingFriends 0.25531 0.13989 1.825 0.0700 .
`Findingfriends*G` -0.28087 0.19435 -1.445 0.1505
KnowingPeople 0.23974 0.11082 2.163 0.0321 *
`Knowingpeople*G` 0.03076 0.13355 0.230 0.8181
Liked 0.26903 0.15106 1.781 0.0770 .
`Liked*G` 0.12906 0.19754 0.653 0.5146
Celebrity 0.73654 0.29431 2.503 0.0134 *
`Celebrity*G` -0.19771 0.34718 -0.569 0.5699
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.088 on 146 degrees of freedom
Multiple R-squared: 0.5238, Adjusted R-squared: 0.4944
F-statistic: 17.84 on 9 and 146 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.4300696 0.86013923 0.569930385
[2,] 0.2748888 0.54977753 0.725111235
[3,] 0.5060268 0.98794642 0.493973210
[4,] 0.3751665 0.75033305 0.624833474
[5,] 0.3188759 0.63775183 0.681124086
[6,] 0.2307997 0.46159933 0.769200335
[7,] 0.1889840 0.37796809 0.811015955
[8,] 0.3301478 0.66029555 0.669852224
[9,] 0.2517008 0.50340170 0.748299152
[10,] 0.2556074 0.51121480 0.744392598
[11,] 0.2123131 0.42462610 0.787686949
[12,] 0.2864844 0.57296885 0.713515574
[13,] 0.2342655 0.46853091 0.765734546
[14,] 0.1795411 0.35908219 0.820458904
[15,] 0.3465535 0.69310705 0.653446473
[16,] 0.3227888 0.64557762 0.677211192
[17,] 0.2963096 0.59261916 0.703690421
[18,] 0.5440326 0.91193471 0.455967354
[19,] 0.6549686 0.69006275 0.345031374
[20,] 0.6637722 0.67245570 0.336227848
[21,] 0.6050120 0.78997594 0.394987972
[22,] 0.5587948 0.88241041 0.441205206
[23,] 0.5635130 0.87297404 0.436487020
[24,] 0.6048862 0.79022764 0.395113820
[25,] 0.5617117 0.87657651 0.438288253
[26,] 0.6053950 0.78921010 0.394605049
[27,] 0.5470339 0.90593230 0.452966148
[28,] 0.5061195 0.98776101 0.493880505
[29,] 0.5022983 0.99540336 0.497701681
[30,] 0.7602599 0.47948030 0.239740148
[31,] 0.8824463 0.23510735 0.117553673
[32,] 0.8920129 0.21597414 0.107987068
[33,] 0.8683848 0.26323048 0.131615239
[34,] 0.8924442 0.21511169 0.107555843
[35,] 0.9286530 0.14269408 0.071347042
[36,] 0.9097032 0.18059353 0.090296764
[37,] 0.9428535 0.11429310 0.057146549
[38,] 0.9412436 0.11751284 0.058756419
[39,] 0.9260387 0.14792257 0.073961285
[40,] 0.9834576 0.03308481 0.016542406
[41,] 0.9779642 0.04407169 0.022035844
[42,] 0.9844565 0.03108702 0.015543512
[43,] 0.9848820 0.03023593 0.015117963
[44,] 0.9805265 0.03894703 0.019473515
[45,] 0.9783791 0.04324187 0.021620936
[46,] 0.9721055 0.05578890 0.027894451
[47,] 0.9732180 0.05356398 0.026781991
[48,] 0.9656326 0.06873472 0.034367358
[49,] 0.9649239 0.07015220 0.035076102
[50,] 0.9702636 0.05947278 0.029736389
[51,] 0.9615752 0.07684969 0.038424846
[52,] 0.9601536 0.07969277 0.039846386
[53,] 0.9618437 0.07631256 0.038156281
[54,] 0.9581791 0.08364170 0.041820852
[55,] 0.9573108 0.08537835 0.042689174
[56,] 0.9642969 0.07140625 0.035703124
[57,] 0.9660228 0.06795441 0.033977205
[58,] 0.9572714 0.08545717 0.042728587
[59,] 0.9597692 0.08046152 0.040230759
[60,] 0.9491511 0.10169781 0.050848907
[61,] 0.9367265 0.12654698 0.063273490
[62,] 0.9423262 0.11534763 0.057673816
[63,] 0.9302481 0.13950378 0.069751891
[64,] 0.9232881 0.15342371 0.076711853
[65,] 0.9065479 0.18690419 0.093452096
[66,] 0.8977884 0.20442313 0.102211565
[67,] 0.9225169 0.15496626 0.077483132
[68,] 0.9286854 0.14262920 0.071314599
[69,] 0.9365626 0.12687486 0.063437428
[70,] 0.9484844 0.10303127 0.051515635
[71,] 0.9344472 0.13110554 0.065552768
[72,] 0.9271854 0.14562921 0.072814603
[73,] 0.9905054 0.01898912 0.009494559
[74,] 0.9870039 0.02599221 0.012996105
[75,] 0.9822845 0.03543103 0.017715517
[76,] 0.9820147 0.03597069 0.017985344
[77,] 0.9774146 0.04517072 0.022585362
[78,] 0.9710436 0.05791273 0.028956366
[79,] 0.9633188 0.07336231 0.036681154
[80,] 0.9849161 0.03016771 0.015083853
[81,] 0.9802874 0.03942524 0.019712620
[82,] 0.9776203 0.04475936 0.022379679
[83,] 0.9719357 0.05612854 0.028064268
[84,] 0.9627459 0.07450822 0.037254111
[85,] 0.9636040 0.07279200 0.036396002
[86,] 0.9628668 0.07426643 0.037133217
[87,] 0.9838885 0.03222291 0.016111456
[88,] 0.9782123 0.04357531 0.021787657
[89,] 0.9704526 0.05909476 0.029547381
[90,] 0.9628369 0.07432613 0.037163065
[91,] 0.9533596 0.09328085 0.046640424
[92,] 0.9712791 0.05744189 0.028720944
[93,] 0.9657620 0.06847604 0.034238018
[94,] 0.9609233 0.07815333 0.039076665
[95,] 0.9547282 0.09054350 0.045271750
[96,] 0.9556782 0.08864362 0.044321811
[97,] 0.9605433 0.07891341 0.039456704
[98,] 0.9652067 0.06958668 0.034793342
[99,] 0.9597291 0.08054179 0.040270896
[100,] 0.9618527 0.07629457 0.038147287
[101,] 0.9481171 0.10376572 0.051882862
[102,] 0.9323476 0.13530484 0.067652421
[103,] 0.9145164 0.17096715 0.085483576
[104,] 0.9152962 0.16940767 0.084703836
[105,] 0.9166357 0.16672855 0.083364275
[106,] 0.8991848 0.20163041 0.100815206
[107,] 0.8694808 0.26103845 0.130519225
[108,] 0.9508539 0.09829227 0.049146137
[109,] 0.9330641 0.13387188 0.066935941
[110,] 0.9151810 0.16963791 0.084818955
[111,] 0.8894287 0.22114255 0.110571276
[112,] 0.8537121 0.29257573 0.146287864
[113,] 0.8659494 0.26810124 0.134050620
[114,] 0.8400549 0.31989015 0.159945073
[115,] 0.7994598 0.40108032 0.200540161
[116,] 0.8089447 0.38211054 0.191055271
[117,] 0.7613436 0.47731270 0.238656350
[118,] 0.7188427 0.56231466 0.281157331
[119,] 0.6807175 0.63856497 0.319282485
[120,] 0.6972953 0.60540931 0.302704653
[121,] 0.8081904 0.38361913 0.191809567
[122,] 0.8006388 0.39872240 0.199361201
[123,] 0.8528042 0.29439168 0.147195840
[124,] 0.8319678 0.33606439 0.168032196
[125,] 0.7648800 0.47023999 0.235119995
[126,] 0.9777962 0.04440759 0.022203793
[127,] 0.9969004 0.00619925 0.003099625
[128,] 0.9946625 0.01067494 0.005337472
[129,] 0.9855113 0.02897743 0.014488715
[130,] 0.9571380 0.08572406 0.042862031
[131,] 0.8924988 0.21500231 0.107501157
> postscript(file="/var/wessaorg/rcomp/tmp/1y1wc1321986790.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/2yfmg1321986790.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/39qpx1321986790.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/43z1q1321986790.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/5s5rl1321986790.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
2.04748365 0.86303846 0.99681360 0.91611021 -0.16266342 3.24998491
7 8 9 10 11 12
-1.88235244 -1.61345701 -0.61922413 2.38185920 -0.86815991 -1.08921266
13 14 15 16 17 18
2.46964024 -4.19586650 -0.73928987 -0.15446005 -2.08921266 0.30165919
19 20 21 22 23 24
1.23916304 -2.42045182 1.67335896 1.07388207 -0.86177072 2.78247018
25 26 27 28 29 30
0.43069374 0.82218396 -5.16585554 -0.26030249 0.59007274 5.00378501
31 32 33 34 35 36
4.34118797 -1.13275263 -0.63381384 2.02592050 -1.61345701 2.33094890
37 38 39 40 41 42
-1.01297369 1.62079839 -0.32436582 0.40153452 1.33290574 6.47170297
43 44 45 46 47 48
-4.58452267 -1.95045934 -0.30326916 2.58264701 3.54587921 0.06335784
49 50 51 52 53 54
-3.24452870 -2.03407034 -0.86429104 -5.84258290 0.04015809 -1.99532208
55 56 57 58 59 60
1.81413715 -0.78553175 -0.35872927 0.88924644 -1.28445720 -0.46871051
61 62 63 64 65 66
-1.98975270 2.34466558 -0.32990806 1.87945915 -1.27455420 1.51053085
67 68 69 70 71 72
-1.87754216 2.77690080 1.97169678 -0.92169020 2.21446825 0.51053085
73 74 75 76 77 78
-0.46479366 -1.45107730 -0.80892384 -1.56930626 -0.33632208 -0.59171345
79 80 81 82 83 84
3.00378501 -2.18328126 -2.48655714 1.21641786 -0.24812685 -1.60150074
85 86 87 88 89 90
4.72946014 -0.41363996 0.06707054 -0.87244651 0.80179102 0.28927828
91 92 93 94 95 96
0.56337772 -3.85003933 0.42709559 1.10907007 1.07326100 0.19804756
97 98 99 100 101 102
-2.72159489 -0.46727108 -0.68710189 0.51269982 0.13103300 1.09568463
103 104 105 106 107 108
-1.48180262 1.70108901 -2.24558425 -0.46316827 -1.92192012 -1.46871051
109 110 111 112 113 114
-3.04950612 -3.79260940 -1.66817730 -2.21038462 -0.40529409 0.17552174
115 116 117 118 119 120
1.02901933 2.27754667 2.30310774 -1.27548817 0.58440319 3.57006544
121 122 123 124 125 126
0.31986644 1.87457293 -1.71072172 -0.67090745 2.58440319 1.00595398
127 128 129 130 131 132
0.42926457 -1.56930626 -1.17829640 -2.57658106 0.42926457 2.21663723
133 134 135 136 137 138
-1.79239003 -0.25791414 2.06387842 1.13137100 0.83971384 -4.01371350
139 140 141 142 143 144
4.63451870 -1.20918034 0.34208766 -0.17585919 1.58460084 -0.08098474
145 146 147 148 149 150
0.86086948 -0.56822845 -3.00089146 -4.45055607 1.59997623 1.36835513
151 152 153 154 155 156
-0.32219684 0.69759712 -1.49610255 1.54521000 1.61750610 1.24438750
> postscript(file="/var/wessaorg/rcomp/tmp/6hrr61321986790.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 2.04748365 NA
1 0.86303846 2.04748365
2 0.99681360 0.86303846
3 0.91611021 0.99681360
4 -0.16266342 0.91611021
5 3.24998491 -0.16266342
6 -1.88235244 3.24998491
7 -1.61345701 -1.88235244
8 -0.61922413 -1.61345701
9 2.38185920 -0.61922413
10 -0.86815991 2.38185920
11 -1.08921266 -0.86815991
12 2.46964024 -1.08921266
13 -4.19586650 2.46964024
14 -0.73928987 -4.19586650
15 -0.15446005 -0.73928987
16 -2.08921266 -0.15446005
17 0.30165919 -2.08921266
18 1.23916304 0.30165919
19 -2.42045182 1.23916304
20 1.67335896 -2.42045182
21 1.07388207 1.67335896
22 -0.86177072 1.07388207
23 2.78247018 -0.86177072
24 0.43069374 2.78247018
25 0.82218396 0.43069374
26 -5.16585554 0.82218396
27 -0.26030249 -5.16585554
28 0.59007274 -0.26030249
29 5.00378501 0.59007274
30 4.34118797 5.00378501
31 -1.13275263 4.34118797
32 -0.63381384 -1.13275263
33 2.02592050 -0.63381384
34 -1.61345701 2.02592050
35 2.33094890 -1.61345701
36 -1.01297369 2.33094890
37 1.62079839 -1.01297369
38 -0.32436582 1.62079839
39 0.40153452 -0.32436582
40 1.33290574 0.40153452
41 6.47170297 1.33290574
42 -4.58452267 6.47170297
43 -1.95045934 -4.58452267
44 -0.30326916 -1.95045934
45 2.58264701 -0.30326916
46 3.54587921 2.58264701
47 0.06335784 3.54587921
48 -3.24452870 0.06335784
49 -2.03407034 -3.24452870
50 -0.86429104 -2.03407034
51 -5.84258290 -0.86429104
52 0.04015809 -5.84258290
53 -1.99532208 0.04015809
54 1.81413715 -1.99532208
55 -0.78553175 1.81413715
56 -0.35872927 -0.78553175
57 0.88924644 -0.35872927
58 -1.28445720 0.88924644
59 -0.46871051 -1.28445720
60 -1.98975270 -0.46871051
61 2.34466558 -1.98975270
62 -0.32990806 2.34466558
63 1.87945915 -0.32990806
64 -1.27455420 1.87945915
65 1.51053085 -1.27455420
66 -1.87754216 1.51053085
67 2.77690080 -1.87754216
68 1.97169678 2.77690080
69 -0.92169020 1.97169678
70 2.21446825 -0.92169020
71 0.51053085 2.21446825
72 -0.46479366 0.51053085
73 -1.45107730 -0.46479366
74 -0.80892384 -1.45107730
75 -1.56930626 -0.80892384
76 -0.33632208 -1.56930626
77 -0.59171345 -0.33632208
78 3.00378501 -0.59171345
79 -2.18328126 3.00378501
80 -2.48655714 -2.18328126
81 1.21641786 -2.48655714
82 -0.24812685 1.21641786
83 -1.60150074 -0.24812685
84 4.72946014 -1.60150074
85 -0.41363996 4.72946014
86 0.06707054 -0.41363996
87 -0.87244651 0.06707054
88 0.80179102 -0.87244651
89 0.28927828 0.80179102
90 0.56337772 0.28927828
91 -3.85003933 0.56337772
92 0.42709559 -3.85003933
93 1.10907007 0.42709559
94 1.07326100 1.10907007
95 0.19804756 1.07326100
96 -2.72159489 0.19804756
97 -0.46727108 -2.72159489
98 -0.68710189 -0.46727108
99 0.51269982 -0.68710189
100 0.13103300 0.51269982
101 1.09568463 0.13103300
102 -1.48180262 1.09568463
103 1.70108901 -1.48180262
104 -2.24558425 1.70108901
105 -0.46316827 -2.24558425
106 -1.92192012 -0.46316827
107 -1.46871051 -1.92192012
108 -3.04950612 -1.46871051
109 -3.79260940 -3.04950612
110 -1.66817730 -3.79260940
111 -2.21038462 -1.66817730
112 -0.40529409 -2.21038462
113 0.17552174 -0.40529409
114 1.02901933 0.17552174
115 2.27754667 1.02901933
116 2.30310774 2.27754667
117 -1.27548817 2.30310774
118 0.58440319 -1.27548817
119 3.57006544 0.58440319
120 0.31986644 3.57006544
121 1.87457293 0.31986644
122 -1.71072172 1.87457293
123 -0.67090745 -1.71072172
124 2.58440319 -0.67090745
125 1.00595398 2.58440319
126 0.42926457 1.00595398
127 -1.56930626 0.42926457
128 -1.17829640 -1.56930626
129 -2.57658106 -1.17829640
130 0.42926457 -2.57658106
131 2.21663723 0.42926457
132 -1.79239003 2.21663723
133 -0.25791414 -1.79239003
134 2.06387842 -0.25791414
135 1.13137100 2.06387842
136 0.83971384 1.13137100
137 -4.01371350 0.83971384
138 4.63451870 -4.01371350
139 -1.20918034 4.63451870
140 0.34208766 -1.20918034
141 -0.17585919 0.34208766
142 1.58460084 -0.17585919
143 -0.08098474 1.58460084
144 0.86086948 -0.08098474
145 -0.56822845 0.86086948
146 -3.00089146 -0.56822845
147 -4.45055607 -3.00089146
148 1.59997623 -4.45055607
149 1.36835513 1.59997623
150 -0.32219684 1.36835513
151 0.69759712 -0.32219684
152 -1.49610255 0.69759712
153 1.54521000 -1.49610255
154 1.61750610 1.54521000
155 1.24438750 1.61750610
156 NA 1.24438750
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 0.86303846 2.04748365
[2,] 0.99681360 0.86303846
[3,] 0.91611021 0.99681360
[4,] -0.16266342 0.91611021
[5,] 3.24998491 -0.16266342
[6,] -1.88235244 3.24998491
[7,] -1.61345701 -1.88235244
[8,] -0.61922413 -1.61345701
[9,] 2.38185920 -0.61922413
[10,] -0.86815991 2.38185920
[11,] -1.08921266 -0.86815991
[12,] 2.46964024 -1.08921266
[13,] -4.19586650 2.46964024
[14,] -0.73928987 -4.19586650
[15,] -0.15446005 -0.73928987
[16,] -2.08921266 -0.15446005
[17,] 0.30165919 -2.08921266
[18,] 1.23916304 0.30165919
[19,] -2.42045182 1.23916304
[20,] 1.67335896 -2.42045182
[21,] 1.07388207 1.67335896
[22,] -0.86177072 1.07388207
[23,] 2.78247018 -0.86177072
[24,] 0.43069374 2.78247018
[25,] 0.82218396 0.43069374
[26,] -5.16585554 0.82218396
[27,] -0.26030249 -5.16585554
[28,] 0.59007274 -0.26030249
[29,] 5.00378501 0.59007274
[30,] 4.34118797 5.00378501
[31,] -1.13275263 4.34118797
[32,] -0.63381384 -1.13275263
[33,] 2.02592050 -0.63381384
[34,] -1.61345701 2.02592050
[35,] 2.33094890 -1.61345701
[36,] -1.01297369 2.33094890
[37,] 1.62079839 -1.01297369
[38,] -0.32436582 1.62079839
[39,] 0.40153452 -0.32436582
[40,] 1.33290574 0.40153452
[41,] 6.47170297 1.33290574
[42,] -4.58452267 6.47170297
[43,] -1.95045934 -4.58452267
[44,] -0.30326916 -1.95045934
[45,] 2.58264701 -0.30326916
[46,] 3.54587921 2.58264701
[47,] 0.06335784 3.54587921
[48,] -3.24452870 0.06335784
[49,] -2.03407034 -3.24452870
[50,] -0.86429104 -2.03407034
[51,] -5.84258290 -0.86429104
[52,] 0.04015809 -5.84258290
[53,] -1.99532208 0.04015809
[54,] 1.81413715 -1.99532208
[55,] -0.78553175 1.81413715
[56,] -0.35872927 -0.78553175
[57,] 0.88924644 -0.35872927
[58,] -1.28445720 0.88924644
[59,] -0.46871051 -1.28445720
[60,] -1.98975270 -0.46871051
[61,] 2.34466558 -1.98975270
[62,] -0.32990806 2.34466558
[63,] 1.87945915 -0.32990806
[64,] -1.27455420 1.87945915
[65,] 1.51053085 -1.27455420
[66,] -1.87754216 1.51053085
[67,] 2.77690080 -1.87754216
[68,] 1.97169678 2.77690080
[69,] -0.92169020 1.97169678
[70,] 2.21446825 -0.92169020
[71,] 0.51053085 2.21446825
[72,] -0.46479366 0.51053085
[73,] -1.45107730 -0.46479366
[74,] -0.80892384 -1.45107730
[75,] -1.56930626 -0.80892384
[76,] -0.33632208 -1.56930626
[77,] -0.59171345 -0.33632208
[78,] 3.00378501 -0.59171345
[79,] -2.18328126 3.00378501
[80,] -2.48655714 -2.18328126
[81,] 1.21641786 -2.48655714
[82,] -0.24812685 1.21641786
[83,] -1.60150074 -0.24812685
[84,] 4.72946014 -1.60150074
[85,] -0.41363996 4.72946014
[86,] 0.06707054 -0.41363996
[87,] -0.87244651 0.06707054
[88,] 0.80179102 -0.87244651
[89,] 0.28927828 0.80179102
[90,] 0.56337772 0.28927828
[91,] -3.85003933 0.56337772
[92,] 0.42709559 -3.85003933
[93,] 1.10907007 0.42709559
[94,] 1.07326100 1.10907007
[95,] 0.19804756 1.07326100
[96,] -2.72159489 0.19804756
[97,] -0.46727108 -2.72159489
[98,] -0.68710189 -0.46727108
[99,] 0.51269982 -0.68710189
[100,] 0.13103300 0.51269982
[101,] 1.09568463 0.13103300
[102,] -1.48180262 1.09568463
[103,] 1.70108901 -1.48180262
[104,] -2.24558425 1.70108901
[105,] -0.46316827 -2.24558425
[106,] -1.92192012 -0.46316827
[107,] -1.46871051 -1.92192012
[108,] -3.04950612 -1.46871051
[109,] -3.79260940 -3.04950612
[110,] -1.66817730 -3.79260940
[111,] -2.21038462 -1.66817730
[112,] -0.40529409 -2.21038462
[113,] 0.17552174 -0.40529409
[114,] 1.02901933 0.17552174
[115,] 2.27754667 1.02901933
[116,] 2.30310774 2.27754667
[117,] -1.27548817 2.30310774
[118,] 0.58440319 -1.27548817
[119,] 3.57006544 0.58440319
[120,] 0.31986644 3.57006544
[121,] 1.87457293 0.31986644
[122,] -1.71072172 1.87457293
[123,] -0.67090745 -1.71072172
[124,] 2.58440319 -0.67090745
[125,] 1.00595398 2.58440319
[126,] 0.42926457 1.00595398
[127,] -1.56930626 0.42926457
[128,] -1.17829640 -1.56930626
[129,] -2.57658106 -1.17829640
[130,] 0.42926457 -2.57658106
[131,] 2.21663723 0.42926457
[132,] -1.79239003 2.21663723
[133,] -0.25791414 -1.79239003
[134,] 2.06387842 -0.25791414
[135,] 1.13137100 2.06387842
[136,] 0.83971384 1.13137100
[137,] -4.01371350 0.83971384
[138,] 4.63451870 -4.01371350
[139,] -1.20918034 4.63451870
[140,] 0.34208766 -1.20918034
[141,] -0.17585919 0.34208766
[142,] 1.58460084 -0.17585919
[143,] -0.08098474 1.58460084
[144,] 0.86086948 -0.08098474
[145,] -0.56822845 0.86086948
[146,] -3.00089146 -0.56822845
[147,] -4.45055607 -3.00089146
[148,] 1.59997623 -4.45055607
[149,] 1.36835513 1.59997623
[150,] -0.32219684 1.36835513
[151,] 0.69759712 -0.32219684
[152,] -1.49610255 0.69759712
[153,] 1.54521000 -1.49610255
[154,] 1.61750610 1.54521000
[155,] 1.24438750 1.61750610
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 0.86303846 2.04748365
2 0.99681360 0.86303846
3 0.91611021 0.99681360
4 -0.16266342 0.91611021
5 3.24998491 -0.16266342
6 -1.88235244 3.24998491
7 -1.61345701 -1.88235244
8 -0.61922413 -1.61345701
9 2.38185920 -0.61922413
10 -0.86815991 2.38185920
11 -1.08921266 -0.86815991
12 2.46964024 -1.08921266
13 -4.19586650 2.46964024
14 -0.73928987 -4.19586650
15 -0.15446005 -0.73928987
16 -2.08921266 -0.15446005
17 0.30165919 -2.08921266
18 1.23916304 0.30165919
19 -2.42045182 1.23916304
20 1.67335896 -2.42045182
21 1.07388207 1.67335896
22 -0.86177072 1.07388207
23 2.78247018 -0.86177072
24 0.43069374 2.78247018
25 0.82218396 0.43069374
26 -5.16585554 0.82218396
27 -0.26030249 -5.16585554
28 0.59007274 -0.26030249
29 5.00378501 0.59007274
30 4.34118797 5.00378501
31 -1.13275263 4.34118797
32 -0.63381384 -1.13275263
33 2.02592050 -0.63381384
34 -1.61345701 2.02592050
35 2.33094890 -1.61345701
36 -1.01297369 2.33094890
37 1.62079839 -1.01297369
38 -0.32436582 1.62079839
39 0.40153452 -0.32436582
40 1.33290574 0.40153452
41 6.47170297 1.33290574
42 -4.58452267 6.47170297
43 -1.95045934 -4.58452267
44 -0.30326916 -1.95045934
45 2.58264701 -0.30326916
46 3.54587921 2.58264701
47 0.06335784 3.54587921
48 -3.24452870 0.06335784
49 -2.03407034 -3.24452870
50 -0.86429104 -2.03407034
51 -5.84258290 -0.86429104
52 0.04015809 -5.84258290
53 -1.99532208 0.04015809
54 1.81413715 -1.99532208
55 -0.78553175 1.81413715
56 -0.35872927 -0.78553175
57 0.88924644 -0.35872927
58 -1.28445720 0.88924644
59 -0.46871051 -1.28445720
60 -1.98975270 -0.46871051
61 2.34466558 -1.98975270
62 -0.32990806 2.34466558
63 1.87945915 -0.32990806
64 -1.27455420 1.87945915
65 1.51053085 -1.27455420
66 -1.87754216 1.51053085
67 2.77690080 -1.87754216
68 1.97169678 2.77690080
69 -0.92169020 1.97169678
70 2.21446825 -0.92169020
71 0.51053085 2.21446825
72 -0.46479366 0.51053085
73 -1.45107730 -0.46479366
74 -0.80892384 -1.45107730
75 -1.56930626 -0.80892384
76 -0.33632208 -1.56930626
77 -0.59171345 -0.33632208
78 3.00378501 -0.59171345
79 -2.18328126 3.00378501
80 -2.48655714 -2.18328126
81 1.21641786 -2.48655714
82 -0.24812685 1.21641786
83 -1.60150074 -0.24812685
84 4.72946014 -1.60150074
85 -0.41363996 4.72946014
86 0.06707054 -0.41363996
87 -0.87244651 0.06707054
88 0.80179102 -0.87244651
89 0.28927828 0.80179102
90 0.56337772 0.28927828
91 -3.85003933 0.56337772
92 0.42709559 -3.85003933
93 1.10907007 0.42709559
94 1.07326100 1.10907007
95 0.19804756 1.07326100
96 -2.72159489 0.19804756
97 -0.46727108 -2.72159489
98 -0.68710189 -0.46727108
99 0.51269982 -0.68710189
100 0.13103300 0.51269982
101 1.09568463 0.13103300
102 -1.48180262 1.09568463
103 1.70108901 -1.48180262
104 -2.24558425 1.70108901
105 -0.46316827 -2.24558425
106 -1.92192012 -0.46316827
107 -1.46871051 -1.92192012
108 -3.04950612 -1.46871051
109 -3.79260940 -3.04950612
110 -1.66817730 -3.79260940
111 -2.21038462 -1.66817730
112 -0.40529409 -2.21038462
113 0.17552174 -0.40529409
114 1.02901933 0.17552174
115 2.27754667 1.02901933
116 2.30310774 2.27754667
117 -1.27548817 2.30310774
118 0.58440319 -1.27548817
119 3.57006544 0.58440319
120 0.31986644 3.57006544
121 1.87457293 0.31986644
122 -1.71072172 1.87457293
123 -0.67090745 -1.71072172
124 2.58440319 -0.67090745
125 1.00595398 2.58440319
126 0.42926457 1.00595398
127 -1.56930626 0.42926457
128 -1.17829640 -1.56930626
129 -2.57658106 -1.17829640
130 0.42926457 -2.57658106
131 2.21663723 0.42926457
132 -1.79239003 2.21663723
133 -0.25791414 -1.79239003
134 2.06387842 -0.25791414
135 1.13137100 2.06387842
136 0.83971384 1.13137100
137 -4.01371350 0.83971384
138 4.63451870 -4.01371350
139 -1.20918034 4.63451870
140 0.34208766 -1.20918034
141 -0.17585919 0.34208766
142 1.58460084 -0.17585919
143 -0.08098474 1.58460084
144 0.86086948 -0.08098474
145 -0.56822845 0.86086948
146 -3.00089146 -0.56822845
147 -4.45055607 -3.00089146
148 1.59997623 -4.45055607
149 1.36835513 1.59997623
150 -0.32219684 1.36835513
151 0.69759712 -0.32219684
152 -1.49610255 0.69759712
153 1.54521000 -1.49610255
154 1.61750610 1.54521000
155 1.24438750 1.61750610
> 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/74aaz1321986790.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/8w5uv1321986790.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/97r761321986790.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/107tmg1321986790.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/11kben1321986790.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/12bgd41321986790.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/13l5p31321986790.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/14xg911321986790.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/15rj0n1321986790.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/16pvjx1321986790.tab")
+ }
>
> try(system("convert tmp/1y1wc1321986790.ps tmp/1y1wc1321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/2yfmg1321986790.ps tmp/2yfmg1321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/39qpx1321986790.ps tmp/39qpx1321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/43z1q1321986790.ps tmp/43z1q1321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/5s5rl1321986790.ps tmp/5s5rl1321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/6hrr61321986790.ps tmp/6hrr61321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/74aaz1321986790.ps tmp/74aaz1321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/8w5uv1321986790.ps tmp/8w5uv1321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/97r761321986790.ps tmp/97r761321986790.png",intern=TRUE))
character(0)
> try(system("convert tmp/107tmg1321986790.ps tmp/107tmg1321986790.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.322 0.480 6.000