R version 2.12.1 (2010-12-16)
Copyright (C) 2010 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
+ ,10
+ ,77
+ ,5
+ ,4
+ ,46
+ ,15
+ ,11
+ ,12
+ ,13
+ ,6
+ ,12
+ ,20
+ ,63
+ ,6
+ ,4
+ ,37
+ ,9
+ ,12
+ ,7
+ ,11
+ ,4
+ ,15
+ ,16
+ ,73
+ ,4
+ ,10
+ ,45
+ ,12
+ ,12
+ ,13
+ ,14
+ ,6
+ ,12
+ ,10
+ ,76
+ ,6
+ ,6
+ ,46
+ ,15
+ ,11
+ ,11
+ ,12
+ ,5
+ ,14
+ ,8
+ ,90
+ ,3
+ ,5
+ ,55
+ ,17
+ ,11
+ ,16
+ ,12
+ ,5
+ ,8
+ ,14
+ ,67
+ ,10
+ ,8
+ ,40
+ ,14
+ ,10
+ ,10
+ ,6
+ ,4
+ ,11
+ ,19
+ ,69
+ ,8
+ ,9
+ ,43
+ ,9
+ ,11
+ ,15
+ ,10
+ ,5
+ ,15
+ ,15
+ ,70
+ ,3
+ ,6
+ ,43
+ ,12
+ ,9
+ ,5
+ ,11
+ ,3
+ ,4
+ ,23
+ ,54
+ ,4
+ ,8
+ ,33
+ ,11
+ ,10
+ ,4
+ ,10
+ ,2
+ ,13
+ ,9
+ ,54
+ ,3
+ ,11
+ ,33
+ ,13
+ ,12
+ ,7
+ ,12
+ ,5
+ ,19
+ ,12
+ ,76
+ ,5
+ ,6
+ ,47
+ ,16
+ ,12
+ ,15
+ ,15
+ ,6
+ ,10
+ ,14
+ ,75
+ ,5
+ ,8
+ ,44
+ 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,82
+ ,5
+ ,6
+ ,49
+ ,15
+ ,12
+ ,11
+ ,13
+ ,6
+ ,12
+ ,14
+ ,54
+ ,12
+ ,4
+ ,33
+ ,16
+ ,12
+ ,14
+ ,14
+ ,4
+ ,9
+ ,14
+ ,54
+ ,6
+ ,6
+ ,33
+ ,14
+ ,10
+ ,11
+ ,13
+ ,3
+ ,14
+ ,10
+ ,80
+ ,6
+ ,7
+ ,47
+ ,13
+ ,12
+ ,8
+ ,14
+ ,4
+ ,15
+ ,8
+ ,76
+ ,8
+ ,9
+ ,47
+ ,15
+ ,12
+ ,12
+ ,16
+ ,7)
+ ,dim=c(11
+ ,156)
+ ,dimnames=list(c('Popularity'
+ ,'Depression'
+ ,'Belonging'
+ ,'Weighted_popularity'
+ ,'Parental_criticism'
+ ,'Belonging_final'
+ ,'Happiness'
+ ,'FindingFriends'
+ ,'KnowingPeople'
+ ,'Liked'
+ ,'Celebrity')
+ ,1:156))
> y <- array(NA,dim=c(11,156),dimnames=list(c('Popularity','Depression','Belonging','Weighted_popularity','Parental_criticism','Belonging_final','Happiness','FindingFriends','KnowingPeople','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])
+ }
+ }
> par20 = ''
> par19 = ''
> par18 = ''
> par17 = ''
> par16 = ''
> par15 = ''
> par14 = ''
> par13 = ''
> par12 = ''
> par11 = ''
> par10 = ''
> par9 = ''
> par8 = ''
> par7 = ''
> par6 = ''
> par5 = ''
> par4 = ''
> par3 = 'Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> 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 Depression Belonging Weighted_popularity Parental_criticism
1 15 10 77 5 4
2 12 20 63 6 4
3 15 16 73 4 10
4 12 10 76 6 6
5 14 8 90 3 5
6 8 14 67 10 8
7 11 19 69 8 9
8 15 15 70 3 6
9 4 23 54 4 8
10 13 9 54 3 11
11 19 12 76 5 6
12 10 14 75 5 8
13 15 13 76 6 11
14 6 11 80 5 5
15 7 11 89 3 10
16 14 10 73 4 7
17 16 12 74 8 7
18 16 18 78 8 13
19 14 12 76 8 10
20 15 10 69 5 8
21 14 15 74 8 6
22 12 15 82 2 8
23 9 12 77 0 7
24 12 9 84 5 5
25 14 11 75 2 9
26 12 15 54 7 9
27 14 16 79 5 11
28 10 17 79 2 11
29 14 12 69 12 11
30 16 11 88 7 9
31 10 13 57 0 7
32 8 9 69 2 6
33 12 11 86 3 6
34 11 9 65 0 6
35 8 20 66 9 5
36 13 8 54 2 4
37 11 12 85 3 10
38 12 10 79 1 8
39 16 11 84 10 6
40 16 13 70 1 5
41 13 13 54 4 9
42 14 13 70 6 10
43 5 15 54 6 6
44 14 12 69 4 9
45 13 13 68 4 10
46 16 13 68 7 6
47 14 9 71 7 6
48 15 9 71 7 6
49 15 14 66 0 13
50 11 9 67 3 8
51 15 9 71 8 10
52 16 15 54 8 5
53 13 10 76 10 8
54 11 13 77 11 6
55 12 8 71 6 9
56 12 15 69 2 9
57 10 13 73 6 7
58 8 24 46 1 20
59 9 11 66 5 8
60 12 13 77 4 8
61 14 12 77 6 7
62 12 22 70 6 7
63 11 11 86 4 10
64 14 15 38 1 5
65 7 7 66 6 8
66 16 14 75 7 9
67 16 19 80 7 9
68 11 10 64 2 20
69 16 9 80 7 6
70 13 12 86 8 10
71 11 16 54 5 11
72 13 13 74 4 7
73 14 11 88 2 12
74 15 12 85 0 12
75 10 11 63 7 8
76 15 13 81 0 6
77 11 13 81 5 6
78 11 10 74 3 9
79 6 11 80 3 5
80 11 9 80 3 11
81 12 13 60 3 6
82 13 15 65 7 6
83 12 14 62 6 10
84 8 14 63 3 8
85 9 11 89 0 7
86 10 10 76 2 8
87 16 11 81 0 9
88 15 12 72 9 8
89 14 14 84 10 10
90 12 14 76 3 13
91 12 21 76 7 7
92 10 14 78 3 7
93 12 13 72 6 7
94 8 11 81 5 8
95 16 12 72 0 9
96 11 12 78 0 9
97 12 11 79 4 8
98 9 14 52 0 7
99 14 13 67 0 6
100 15 13 74 7 8
101 8 12 73 3 8
102 12 14 69 9 4
103 10 12 67 4 8
104 16 12 76 4 10
105 17 12 77 15 7
106 8 18 63 7 8
107 9 11 84 8 7
108 8 15 90 2 10
109 11 13 75 8 9
110 16 11 76 7 8
111 13 11 75 3 8
112 5 22 53 3 5
113 15 10 87 6 8
114 15 11 78 8 9
115 12 15 54 5 11
116 12 14 58 6 7
117 16 11 80 10 8
118 12 10 74 0 4
119 10 14 56 5 16
120 12 14 82 0 9
121 4 11 64 0 16
122 11 15 67 5 12
123 16 11 75 10 8
124 7 10 69 0 4
125 9 10 72 5 11
126 14 16 71 6 11
127 11 12 54 1 8
128 10 14 68 5 8
129 6 15 54 3 12
130 14 10 71 3 8
131 11 12 53 6 6
132 11 15 54 2 8
133 9 12 71 5 6
134 16 11 69 6 14
135 7 10 30 2 10
136 8 20 53 3 5
137 10 19 68 7 8
138 14 17 69 6 12
139 9 8 54 3 11
140 13 17 66 6 8
141 13 11 79 9 8
142 12 13 67 2 9
143 11 9 74 5 6
144 10 10 86 10 5
145 12 13 63 9 8
146 14 16 69 8 7
147 11 12 73 8 4
148 13 14 69 5 9
149 14 11 71 9 5
150 13 13 77 9 9
151 16 15 74 14 12
152 13 14 82 5 6
153 12 14 54 12 4
154 9 14 54 6 6
155 14 10 80 6 7
156 15 8 76 8 9
Belonging_final Happiness FindingFriends KnowingPeople Liked Celebrity t
1 46 15 11 12 13 6 1
2 37 9 12 7 11 4 2
3 45 12 12 13 14 6 3
4 46 15 11 11 12 5 4
5 55 17 11 16 12 5 5
6 40 14 10 10 6 4 6
7 43 9 11 15 10 5 7
8 43 12 9 5 11 3 8
9 33 11 10 4 10 2 9
10 33 13 12 7 12 5 10
11 47 16 12 15 15 6 11
12 44 16 12 5 13 6 12
13 47 15 13 16 18 8 13
14 49 10 9 15 11 6 14
15 55 16 12 13 12 3 15
16 43 12 12 13 13 6 16
17 46 15 12 15 14 6 17
18 51 13 12 15 16 7 18
19 47 18 13 10 16 8 19
20 42 13 11 17 16 6 20
21 42 17 12 14 15 7 21
22 48 14 12 9 13 4 22
23 45 13 15 6 8 4 23
24 51 13 11 11 14 2 24
25 46 15 12 13 15 6 25
26 33 13 10 12 13 6 26
27 47 15 11 10 16 6 27
28 47 13 13 4 13 6 28
29 42 14 6 13 12 6 29
30 55 13 12 15 15 7 30
31 36 16 12 8 11 4 31
32 42 14 10 10 14 3 32
33 51 18 12 8 13 5 33
34 43 15 12 7 13 6 34
35 40 9 11 9 12 4 35
36 33 16 9 14 14 6 36
37 52 16 10 5 13 3 37
38 49 17 12 7 12 3 38
39 50 13 12 16 14 6 39
40 43 17 11 14 15 6 40
41 33 15 12 16 16 6 41
42 44 14 11 15 15 8 42
43 33 10 14 4 5 2 43
44 41 13 10 12 15 6 44
45 40 11 10 8 8 4 45
46 40 11 11 17 16 7 46
47 41 16 11 15 16 6 47
48 41 16 11 16 14 6 48
49 42 11 10 12 16 6 49
50 42 15 10 12 14 5 50
51 45 15 12 13 13 6 51
52 33 12 11 14 14 6 52
53 46 17 8 14 14 5 53
54 47 15 12 15 12 6 54
55 44 16 10 14 13 7 55
56 44 14 7 11 15 5 56
57 46 17 11 13 15 6 57
58 30 10 7 4 13 6 58
59 42 11 11 8 10 4 59
60 46 15 8 13 13 5 60
61 46 15 11 15 14 6 61
62 43 7 12 15 13 6 62
63 52 17 8 8 13 4 63
64 11 14 14 17 18 6 64
65 41 18 14 12 12 4 65
66 45 14 11 13 14 7 66
67 49 12 12 14 16 8 67
68 41 14 14 7 13 6 68
69 47 9 9 16 16 6 69
70 53 14 13 11 15 6 70
71 35 11 8 10 14 5 71
72 45 16 11 14 13 6 72
73 54 17 9 19 12 6 73
74 53 16 12 14 16 4 74
75 36 12 7 8 9 5 75
76 48 15 11 15 15 8 76
77 48 15 12 8 16 6 77
78 45 15 11 8 12 6 78
79 47 16 12 6 11 2 79
80 49 16 9 7 13 2 80
81 38 11 11 16 13 4 81
82 40 15 13 15 14 6 82
83 46 12 12 10 15 6 83
84 42 14 12 8 14 5 84
85 54 15 11 9 12 4 85
86 45 17 12 8 16 4 86
87 53 19 12 14 14 6 87
88 44 15 11 14 13 5 88
89 51 16 11 14 12 6 89
90 46 14 8 15 13 7 90
91 46 16 9 7 12 6 91
92 45 15 11 7 9 4 92
93 44 15 12 12 13 4 93
94 48 17 13 7 10 3 94
95 44 12 12 12 15 8 95
96 47 18 6 6 9 4 96
97 47 13 12 10 13 4 97
98 31 14 11 12 13 5 98
99 44 14 13 13 13 5 99
100 42 14 11 14 15 7 100
101 41 12 12 8 13 4 101
102 43 14 10 14 14 5 102
103 41 12 10 10 11 5 103
104 47 15 11 14 15 8 104
105 45 11 11 15 14 5 105
106 37 11 11 10 15 2 106
107 54 15 9 6 12 5 107
108 55 14 7 9 15 4 108
109 45 15 11 11 14 5 109
110 47 16 12 16 16 7 110
111 46 12 12 14 14 6 111
112 37 14 15 8 12 3 112
113 53 18 11 16 11 5 113
114 46 14 10 16 13 6 114
115 33 13 13 14 12 5 115
116 36 14 13 12 12 6 116
117 49 14 11 16 16 7 117
118 44 17 12 15 13 6 118
119 37 12 12 11 12 6 119
120 53 16 12 6 14 5 120
121 40 15 8 6 4 4 121
122 42 10 5 16 14 6 122
123 45 13 11 16 15 6 123
124 40 15 12 8 12 3 124
125 44 16 12 11 11 4 125
126 43 15 11 12 12 4 126
127 33 14 12 13 11 4 127
128 44 11 10 11 12 5 128
129 33 13 7 9 11 4 129
130 43 17 12 15 13 6 130
131 32 14 12 11 12 6 131
132 33 16 9 12 12 4 132
133 43 15 11 15 15 7 133
134 42 12 12 8 14 4 134
135 0 16 12 7 12 4 135
136 32 8 11 10 12 4 136
137 41 9 11 9 12 4 137
138 44 13 12 13 13 5 138
139 33 19 12 11 11 4 139
140 42 11 11 12 13 7 140
141 46 15 12 5 12 3 141
142 44 11 12 12 14 5 142
143 45 15 8 14 15 5 143
144 53 16 15 15 15 6 144
145 38 15 11 14 13 5 145
146 43 12 11 13 16 6 146
147 43 16 6 14 17 6 147
148 42 15 13 14 13 3 148
149 42 13 12 15 14 6 149
150 47 14 12 13 13 5 150
151 44 11 12 14 16 8 151
152 49 15 12 11 13 6 152
153 33 16 12 14 14 4 153
154 33 14 10 11 13 3 154
155 47 13 12 8 14 4 155
156 47 15 12 12 16 7 156
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Depression Belonging
-1.400332 -0.076095 0.071908
Weighted_popularity Parental_criticism Belonging_final
0.094136 0.083878 -0.039993
Happiness FindingFriends KnowingPeople
-0.060189 0.118164 0.230029
Liked Celebrity t
0.344271 0.522588 -0.006399
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.191 -1.266 0.144 1.046 6.647
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.400332 2.564480 -0.546 0.585877
Depression -0.076095 0.063844 -1.192 0.235270
Belonging 0.071908 0.051482 1.397 0.164632
Weighted_popularity 0.094136 0.058400 1.612 0.109169
Parental_criticism 0.083878 0.065932 1.272 0.205353
Belonging_final -0.039993 0.073107 -0.547 0.585191
Happiness -0.060189 0.085851 -0.701 0.484374
FindingFriends 0.118164 0.093894 1.258 0.210256
KnowingPeople 0.230029 0.064589 3.561 0.000500 ***
Liked 0.344271 0.094193 3.655 0.000360 ***
Celebrity 0.522588 0.158855 3.290 0.001261 **
t -0.006399 0.003744 -1.709 0.089591 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.024 on 144 degrees of freedom
Multiple R-squared: 0.5587, Adjusted R-squared: 0.525
F-statistic: 16.58 on 11 and 144 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.9336493 0.1327014852 6.635074e-02
[2,] 0.9999306 0.0001387563 6.937813e-05
[3,] 0.9998253 0.0003493392 1.746696e-04
[4,] 0.9995788 0.0008423515 4.211758e-04
[5,] 0.9994425 0.0011150741 5.575370e-04
[6,] 0.9989417 0.0021165835 1.058292e-03
[7,] 0.9990348 0.0019304894 9.652447e-04
[8,] 0.9995673 0.0008654991 4.327495e-04
[9,] 0.9991578 0.0016843443 8.421722e-04
[10,] 0.9984453 0.0031093480 1.554674e-03
[11,] 0.9972355 0.0055289651 2.764483e-03
[12,] 0.9952679 0.0094642354 4.732118e-03
[13,] 0.9959427 0.0081146225 4.057311e-03
[14,] 0.9935169 0.0129661352 6.483068e-03
[15,] 0.9965825 0.0068350846 3.417542e-03
[16,] 0.9952172 0.0095656475 4.782824e-03
[17,] 0.9929213 0.0141573260 7.078663e-03
[18,] 0.9962843 0.0074313309 3.715665e-03
[19,] 0.9943309 0.0113382765 5.669138e-03
[20,] 0.9922774 0.0154451259 7.722563e-03
[21,] 0.9912794 0.0174412878 8.720644e-03
[22,] 0.9877578 0.0244843692 1.224218e-02
[23,] 0.9848936 0.0302127147 1.510636e-02
[24,] 0.9860231 0.0279538815 1.397694e-02
[25,] 0.9852618 0.0294764797 1.473824e-02
[26,] 0.9898364 0.0203272883 1.016364e-02
[27,] 0.9860230 0.0279540329 1.397702e-02
[28,] 0.9807785 0.0384429152 1.922146e-02
[29,] 0.9734890 0.0530219268 2.651096e-02
[30,] 0.9676904 0.0646191715 3.230959e-02
[31,] 0.9912926 0.0174148901 8.707445e-03
[32,] 0.9880137 0.0239726436 1.198632e-02
[33,] 0.9839869 0.0320262115 1.601311e-02
[34,] 0.9790217 0.0419565609 2.097828e-02
[35,] 0.9765208 0.0469583356 2.347917e-02
[36,] 0.9720103 0.0559794819 2.798974e-02
[37,] 0.9694320 0.0611360987 3.056805e-02
[38,] 0.9821390 0.0357220227 1.786101e-02
[39,] 0.9760674 0.0478652476 2.393262e-02
[40,] 0.9767379 0.0465241293 2.326206e-02
[41,] 0.9733760 0.0532479788 2.662399e-02
[42,] 0.9663856 0.0672287074 3.361435e-02
[43,] 0.9750728 0.0498543741 2.492719e-02
[44,] 0.9686047 0.0627906292 3.139531e-02
[45,] 0.9587840 0.0824319366 4.121597e-02
[46,] 0.9467447 0.1065105780 5.325529e-02
[47,] 0.9328431 0.1343138176 6.715691e-02
[48,] 0.9198991 0.1602017685 8.010088e-02
[49,] 0.9002519 0.1994961004 9.974805e-02
[50,] 0.8846228 0.2307544507 1.153772e-01
[51,] 0.9361582 0.1276835455 6.384177e-02
[52,] 0.9413024 0.1173951317 5.869757e-02
[53,] 0.9281614 0.1436771948 7.183860e-02
[54,] 0.9155660 0.1688679911 8.443400e-02
[55,] 0.8984462 0.2031075464 1.015538e-01
[56,] 0.8854602 0.2290795272 1.145398e-01
[57,] 0.8627781 0.2744438401 1.372219e-01
[58,] 0.8368683 0.3262633251 1.631317e-01
[59,] 0.8207122 0.3585755769 1.792878e-01
[60,] 0.8151383 0.3697233315 1.848617e-01
[61,] 0.7902476 0.4195048979 2.097524e-01
[62,] 0.7561521 0.4876957838 2.438479e-01
[63,] 0.7466586 0.5066828501 2.533414e-01
[64,] 0.7057337 0.5885326299 2.942663e-01
[65,] 0.7113378 0.5773244990 2.886622e-01
[66,] 0.6972041 0.6055918586 3.027959e-01
[67,] 0.6618987 0.6762026235 3.381013e-01
[68,] 0.6199649 0.7600702958 3.800351e-01
[69,] 0.5726545 0.8546910868 4.273455e-01
[70,] 0.5814237 0.8371526822 4.185763e-01
[71,] 0.5630902 0.8738195925 4.369098e-01
[72,] 0.5395088 0.9209823005 4.604912e-01
[73,] 0.5917909 0.8164181443 4.082091e-01
[74,] 0.6207437 0.7585125497 3.792563e-01
[75,] 0.5858615 0.8282770488 4.141385e-01
[76,] 0.5699168 0.8601663479 4.300832e-01
[77,] 0.5582096 0.8835807283 4.417904e-01
[78,] 0.5264658 0.9470683168 4.735342e-01
[79,] 0.4829475 0.9658949509 5.170525e-01
[80,] 0.4654655 0.9309310527 5.345345e-01
[81,] 0.4793073 0.9586146299 5.206927e-01
[82,] 0.6190567 0.7618866917 3.809433e-01
[83,] 0.5739056 0.8521887993 4.260944e-01
[84,] 0.5379113 0.9241773380 4.620887e-01
[85,] 0.6049848 0.7900304075 3.950152e-01
[86,] 0.5705912 0.8588175732 4.294088e-01
[87,] 0.5908218 0.8183563560 4.091782e-01
[88,] 0.5444238 0.9111524825 4.555762e-01
[89,] 0.4942123 0.9884246177 5.057877e-01
[90,] 0.5002204 0.9995592047 4.997796e-01
[91,] 0.5519344 0.8961312671 4.480656e-01
[92,] 0.5548922 0.8902156980 4.451078e-01
[93,] 0.5119420 0.9761159236 4.880580e-01
[94,] 0.6097246 0.7805508746 3.902754e-01
[95,] 0.5930667 0.8138665182 4.069333e-01
[96,] 0.5505773 0.8988454775 4.494227e-01
[97,] 0.4948266 0.9896531993 5.051734e-01
[98,] 0.6168093 0.7663813134 3.831907e-01
[99,] 0.6261544 0.7476912184 3.738456e-01
[100,] 0.6152355 0.7695290238 3.847645e-01
[101,] 0.5599876 0.8800247408 4.400124e-01
[102,] 0.5211389 0.9577222447 4.788611e-01
[103,] 0.4770162 0.9540323637 5.229838e-01
[104,] 0.4638834 0.9277668332 5.361166e-01
[105,] 0.4947394 0.9894787443 5.052606e-01
[106,] 0.4415309 0.8830617167 5.584691e-01
[107,] 0.4134830 0.8269659044 5.865170e-01
[108,] 0.3685878 0.7371756658 6.314122e-01
[109,] 0.4260640 0.8521280640 5.739360e-01
[110,] 0.3873901 0.7747802074 6.126099e-01
[111,] 0.4151332 0.8302663369 5.848668e-01
[112,] 0.4448626 0.8897251009 5.551374e-01
[113,] 0.4320321 0.8640642461 5.679679e-01
[114,] 0.3616136 0.7232271893 6.383864e-01
[115,] 0.5980661 0.8038677623 4.019339e-01
[116,] 0.7384688 0.5230623367 2.615312e-01
[117,] 0.7418200 0.5163599779 2.581800e-01
[118,] 0.7892672 0.4214655637 2.107328e-01
[119,] 0.7626227 0.4747545478 2.373773e-01
[120,] 0.8089580 0.3820839551 1.910420e-01
[121,] 0.7326375 0.5347249417 2.673625e-01
[122,] 0.6681749 0.6636502375 3.318251e-01
[123,] 0.7582452 0.4835096413 2.417548e-01
[124,] 0.7042372 0.5915255521 2.957628e-01
[125,] 0.6469509 0.7060981706 3.530491e-01
[126,] 0.5030940 0.9938120983 4.969060e-01
[127,] 0.4021277 0.8042553331 5.978723e-01
> postscript(file="/var/www/rcomp/tmp/15lmq1321958772.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/www/rcomp/tmp/2eu881321958772.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/www/rcomp/tmp/39f601321958772.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/www/rcomp/tmp/4nlml1321958772.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/www/rcomp/tmp/5htaz1321958772.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.895881119 2.620427765 1.330717095 -0.178019636 0.365933615 -1.121711250
7 8 9 10 11 12
-1.123213570 6.647304648 -2.330299894 2.390933319 4.619595624 -1.448810891
13 14 15 16 17 18
-2.291412675 -7.190631352 -5.132371829 0.473251186 1.679605980 0.220125052
19 20 21 22 23 24
-1.184223080 -0.206106818 -0.659061264 0.634972150 -0.078438783 0.435413441
25 26 27 28 29 30
0.095636326 -0.039586069 0.255082604 -1.323734745 1.041293627 -0.020941910
31 32 33 34 35 36
1.169255572 -2.710391435 0.255145411 0.108760171 -2.316616832 0.876211275
37 38 39 40 41 42
0.984433103 2.214215114 0.730369634 3.021527893 -0.882268859 -1.271526173
43 44 45 46 47 48
-0.553508690 0.682492275 3.967834104 0.516979380 -0.673137972 0.791774017
49 50 51 52 53 54
1.698770513 -1.158338499 1.397298101 3.385471213 -0.312550828 -2.693270860
55 56 57 58 59 60
-1.877145284 0.463107197 -3.373848399 -1.038388722 -0.604058129 -0.092649403
61 62 63 64 65 66
0.051852785 -1.052834208 -0.007501405 0.090599448 -4.545998168 1.955246027
67 68 69 70 71 72
0.462847129 -1.264760180 0.645387855 -1.418359962 0.179267112 0.196823950
73 74 75 76 77 78
-0.336219969 1.513831060 0.640340593 0.275525580 -1.995810234 -0.402432914
79 80 81 82 83 84
-2.499181981 1.367662582 0.443356298 -0.209140654 -0.321061732 -2.649083341
85 86 87 88 89 90
-1.734921254 -1.646741065 2.884120930 2.234770084 0.430392812 -1.643370365
91 92 93 94 95 96
1.731725238 1.179667937 0.573625387 -1.341345661 1.947923493 3.249126235
97 98 99 100 101 102
0.507725519 -1.299834978 2.689280074 0.558208537 -2.705091434 -0.298513190
103 104 105 106 107 108
-0.412757339 1.216109797 2.728003330 -2.079417059 -1.583871667 -3.375546707
109 110 111 112 113 114
-1.374423718 0.724039971 -0.430672756 -2.711190258 2.215321290 1.059160783
115 116 117 118 119 120
0.602708093 0.604397220 0.276561128 -0.436944958 -1.625554236 1.433900843
121 122 123 124 125 126
-2.222932114 -1.917694464 1.321189884 -1.797126117 -1.712521813 3.171897099
127 128 129 130 131 132
1.354626875 -0.781159058 -2.477331713 1.197647551 0.179825573 1.881395676
133 134 135 136 137 138
-4.864827869 4.627642073 -1.445963415 -0.780907989 0.092752887 2.089274082
139 140 141 142 143 144
-0.551870034 0.755961494 3.415973130 0.347863586 -1.535168116 -4.902001440
145 146 147 148 149 150
0.082795565 0.758068132 -2.318632146 2.008122239 0.457112763 0.435810507
151 152 153 154 155 156
-0.043345997 0.870986398 0.830734395 -0.092914275 2.742232173 0.472002081
> postscript(file="/var/www/rcomp/tmp/6gwqs1321958772.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.895881119 NA
1 2.620427765 1.895881119
2 1.330717095 2.620427765
3 -0.178019636 1.330717095
4 0.365933615 -0.178019636
5 -1.121711250 0.365933615
6 -1.123213570 -1.121711250
7 6.647304648 -1.123213570
8 -2.330299894 6.647304648
9 2.390933319 -2.330299894
10 4.619595624 2.390933319
11 -1.448810891 4.619595624
12 -2.291412675 -1.448810891
13 -7.190631352 -2.291412675
14 -5.132371829 -7.190631352
15 0.473251186 -5.132371829
16 1.679605980 0.473251186
17 0.220125052 1.679605980
18 -1.184223080 0.220125052
19 -0.206106818 -1.184223080
20 -0.659061264 -0.206106818
21 0.634972150 -0.659061264
22 -0.078438783 0.634972150
23 0.435413441 -0.078438783
24 0.095636326 0.435413441
25 -0.039586069 0.095636326
26 0.255082604 -0.039586069
27 -1.323734745 0.255082604
28 1.041293627 -1.323734745
29 -0.020941910 1.041293627
30 1.169255572 -0.020941910
31 -2.710391435 1.169255572
32 0.255145411 -2.710391435
33 0.108760171 0.255145411
34 -2.316616832 0.108760171
35 0.876211275 -2.316616832
36 0.984433103 0.876211275
37 2.214215114 0.984433103
38 0.730369634 2.214215114
39 3.021527893 0.730369634
40 -0.882268859 3.021527893
41 -1.271526173 -0.882268859
42 -0.553508690 -1.271526173
43 0.682492275 -0.553508690
44 3.967834104 0.682492275
45 0.516979380 3.967834104
46 -0.673137972 0.516979380
47 0.791774017 -0.673137972
48 1.698770513 0.791774017
49 -1.158338499 1.698770513
50 1.397298101 -1.158338499
51 3.385471213 1.397298101
52 -0.312550828 3.385471213
53 -2.693270860 -0.312550828
54 -1.877145284 -2.693270860
55 0.463107197 -1.877145284
56 -3.373848399 0.463107197
57 -1.038388722 -3.373848399
58 -0.604058129 -1.038388722
59 -0.092649403 -0.604058129
60 0.051852785 -0.092649403
61 -1.052834208 0.051852785
62 -0.007501405 -1.052834208
63 0.090599448 -0.007501405
64 -4.545998168 0.090599448
65 1.955246027 -4.545998168
66 0.462847129 1.955246027
67 -1.264760180 0.462847129
68 0.645387855 -1.264760180
69 -1.418359962 0.645387855
70 0.179267112 -1.418359962
71 0.196823950 0.179267112
72 -0.336219969 0.196823950
73 1.513831060 -0.336219969
74 0.640340593 1.513831060
75 0.275525580 0.640340593
76 -1.995810234 0.275525580
77 -0.402432914 -1.995810234
78 -2.499181981 -0.402432914
79 1.367662582 -2.499181981
80 0.443356298 1.367662582
81 -0.209140654 0.443356298
82 -0.321061732 -0.209140654
83 -2.649083341 -0.321061732
84 -1.734921254 -2.649083341
85 -1.646741065 -1.734921254
86 2.884120930 -1.646741065
87 2.234770084 2.884120930
88 0.430392812 2.234770084
89 -1.643370365 0.430392812
90 1.731725238 -1.643370365
91 1.179667937 1.731725238
92 0.573625387 1.179667937
93 -1.341345661 0.573625387
94 1.947923493 -1.341345661
95 3.249126235 1.947923493
96 0.507725519 3.249126235
97 -1.299834978 0.507725519
98 2.689280074 -1.299834978
99 0.558208537 2.689280074
100 -2.705091434 0.558208537
101 -0.298513190 -2.705091434
102 -0.412757339 -0.298513190
103 1.216109797 -0.412757339
104 2.728003330 1.216109797
105 -2.079417059 2.728003330
106 -1.583871667 -2.079417059
107 -3.375546707 -1.583871667
108 -1.374423718 -3.375546707
109 0.724039971 -1.374423718
110 -0.430672756 0.724039971
111 -2.711190258 -0.430672756
112 2.215321290 -2.711190258
113 1.059160783 2.215321290
114 0.602708093 1.059160783
115 0.604397220 0.602708093
116 0.276561128 0.604397220
117 -0.436944958 0.276561128
118 -1.625554236 -0.436944958
119 1.433900843 -1.625554236
120 -2.222932114 1.433900843
121 -1.917694464 -2.222932114
122 1.321189884 -1.917694464
123 -1.797126117 1.321189884
124 -1.712521813 -1.797126117
125 3.171897099 -1.712521813
126 1.354626875 3.171897099
127 -0.781159058 1.354626875
128 -2.477331713 -0.781159058
129 1.197647551 -2.477331713
130 0.179825573 1.197647551
131 1.881395676 0.179825573
132 -4.864827869 1.881395676
133 4.627642073 -4.864827869
134 -1.445963415 4.627642073
135 -0.780907989 -1.445963415
136 0.092752887 -0.780907989
137 2.089274082 0.092752887
138 -0.551870034 2.089274082
139 0.755961494 -0.551870034
140 3.415973130 0.755961494
141 0.347863586 3.415973130
142 -1.535168116 0.347863586
143 -4.902001440 -1.535168116
144 0.082795565 -4.902001440
145 0.758068132 0.082795565
146 -2.318632146 0.758068132
147 2.008122239 -2.318632146
148 0.457112763 2.008122239
149 0.435810507 0.457112763
150 -0.043345997 0.435810507
151 0.870986398 -0.043345997
152 0.830734395 0.870986398
153 -0.092914275 0.830734395
154 2.742232173 -0.092914275
155 0.472002081 2.742232173
156 NA 0.472002081
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 2.620427765 1.895881119
[2,] 1.330717095 2.620427765
[3,] -0.178019636 1.330717095
[4,] 0.365933615 -0.178019636
[5,] -1.121711250 0.365933615
[6,] -1.123213570 -1.121711250
[7,] 6.647304648 -1.123213570
[8,] -2.330299894 6.647304648
[9,] 2.390933319 -2.330299894
[10,] 4.619595624 2.390933319
[11,] -1.448810891 4.619595624
[12,] -2.291412675 -1.448810891
[13,] -7.190631352 -2.291412675
[14,] -5.132371829 -7.190631352
[15,] 0.473251186 -5.132371829
[16,] 1.679605980 0.473251186
[17,] 0.220125052 1.679605980
[18,] -1.184223080 0.220125052
[19,] -0.206106818 -1.184223080
[20,] -0.659061264 -0.206106818
[21,] 0.634972150 -0.659061264
[22,] -0.078438783 0.634972150
[23,] 0.435413441 -0.078438783
[24,] 0.095636326 0.435413441
[25,] -0.039586069 0.095636326
[26,] 0.255082604 -0.039586069
[27,] -1.323734745 0.255082604
[28,] 1.041293627 -1.323734745
[29,] -0.020941910 1.041293627
[30,] 1.169255572 -0.020941910
[31,] -2.710391435 1.169255572
[32,] 0.255145411 -2.710391435
[33,] 0.108760171 0.255145411
[34,] -2.316616832 0.108760171
[35,] 0.876211275 -2.316616832
[36,] 0.984433103 0.876211275
[37,] 2.214215114 0.984433103
[38,] 0.730369634 2.214215114
[39,] 3.021527893 0.730369634
[40,] -0.882268859 3.021527893
[41,] -1.271526173 -0.882268859
[42,] -0.553508690 -1.271526173
[43,] 0.682492275 -0.553508690
[44,] 3.967834104 0.682492275
[45,] 0.516979380 3.967834104
[46,] -0.673137972 0.516979380
[47,] 0.791774017 -0.673137972
[48,] 1.698770513 0.791774017
[49,] -1.158338499 1.698770513
[50,] 1.397298101 -1.158338499
[51,] 3.385471213 1.397298101
[52,] -0.312550828 3.385471213
[53,] -2.693270860 -0.312550828
[54,] -1.877145284 -2.693270860
[55,] 0.463107197 -1.877145284
[56,] -3.373848399 0.463107197
[57,] -1.038388722 -3.373848399
[58,] -0.604058129 -1.038388722
[59,] -0.092649403 -0.604058129
[60,] 0.051852785 -0.092649403
[61,] -1.052834208 0.051852785
[62,] -0.007501405 -1.052834208
[63,] 0.090599448 -0.007501405
[64,] -4.545998168 0.090599448
[65,] 1.955246027 -4.545998168
[66,] 0.462847129 1.955246027
[67,] -1.264760180 0.462847129
[68,] 0.645387855 -1.264760180
[69,] -1.418359962 0.645387855
[70,] 0.179267112 -1.418359962
[71,] 0.196823950 0.179267112
[72,] -0.336219969 0.196823950
[73,] 1.513831060 -0.336219969
[74,] 0.640340593 1.513831060
[75,] 0.275525580 0.640340593
[76,] -1.995810234 0.275525580
[77,] -0.402432914 -1.995810234
[78,] -2.499181981 -0.402432914
[79,] 1.367662582 -2.499181981
[80,] 0.443356298 1.367662582
[81,] -0.209140654 0.443356298
[82,] -0.321061732 -0.209140654
[83,] -2.649083341 -0.321061732
[84,] -1.734921254 -2.649083341
[85,] -1.646741065 -1.734921254
[86,] 2.884120930 -1.646741065
[87,] 2.234770084 2.884120930
[88,] 0.430392812 2.234770084
[89,] -1.643370365 0.430392812
[90,] 1.731725238 -1.643370365
[91,] 1.179667937 1.731725238
[92,] 0.573625387 1.179667937
[93,] -1.341345661 0.573625387
[94,] 1.947923493 -1.341345661
[95,] 3.249126235 1.947923493
[96,] 0.507725519 3.249126235
[97,] -1.299834978 0.507725519
[98,] 2.689280074 -1.299834978
[99,] 0.558208537 2.689280074
[100,] -2.705091434 0.558208537
[101,] -0.298513190 -2.705091434
[102,] -0.412757339 -0.298513190
[103,] 1.216109797 -0.412757339
[104,] 2.728003330 1.216109797
[105,] -2.079417059 2.728003330
[106,] -1.583871667 -2.079417059
[107,] -3.375546707 -1.583871667
[108,] -1.374423718 -3.375546707
[109,] 0.724039971 -1.374423718
[110,] -0.430672756 0.724039971
[111,] -2.711190258 -0.430672756
[112,] 2.215321290 -2.711190258
[113,] 1.059160783 2.215321290
[114,] 0.602708093 1.059160783
[115,] 0.604397220 0.602708093
[116,] 0.276561128 0.604397220
[117,] -0.436944958 0.276561128
[118,] -1.625554236 -0.436944958
[119,] 1.433900843 -1.625554236
[120,] -2.222932114 1.433900843
[121,] -1.917694464 -2.222932114
[122,] 1.321189884 -1.917694464
[123,] -1.797126117 1.321189884
[124,] -1.712521813 -1.797126117
[125,] 3.171897099 -1.712521813
[126,] 1.354626875 3.171897099
[127,] -0.781159058 1.354626875
[128,] -2.477331713 -0.781159058
[129,] 1.197647551 -2.477331713
[130,] 0.179825573 1.197647551
[131,] 1.881395676 0.179825573
[132,] -4.864827869 1.881395676
[133,] 4.627642073 -4.864827869
[134,] -1.445963415 4.627642073
[135,] -0.780907989 -1.445963415
[136,] 0.092752887 -0.780907989
[137,] 2.089274082 0.092752887
[138,] -0.551870034 2.089274082
[139,] 0.755961494 -0.551870034
[140,] 3.415973130 0.755961494
[141,] 0.347863586 3.415973130
[142,] -1.535168116 0.347863586
[143,] -4.902001440 -1.535168116
[144,] 0.082795565 -4.902001440
[145,] 0.758068132 0.082795565
[146,] -2.318632146 0.758068132
[147,] 2.008122239 -2.318632146
[148,] 0.457112763 2.008122239
[149,] 0.435810507 0.457112763
[150,] -0.043345997 0.435810507
[151,] 0.870986398 -0.043345997
[152,] 0.830734395 0.870986398
[153,] -0.092914275 0.830734395
[154,] 2.742232173 -0.092914275
[155,] 0.472002081 2.742232173
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 2.620427765 1.895881119
2 1.330717095 2.620427765
3 -0.178019636 1.330717095
4 0.365933615 -0.178019636
5 -1.121711250 0.365933615
6 -1.123213570 -1.121711250
7 6.647304648 -1.123213570
8 -2.330299894 6.647304648
9 2.390933319 -2.330299894
10 4.619595624 2.390933319
11 -1.448810891 4.619595624
12 -2.291412675 -1.448810891
13 -7.190631352 -2.291412675
14 -5.132371829 -7.190631352
15 0.473251186 -5.132371829
16 1.679605980 0.473251186
17 0.220125052 1.679605980
18 -1.184223080 0.220125052
19 -0.206106818 -1.184223080
20 -0.659061264 -0.206106818
21 0.634972150 -0.659061264
22 -0.078438783 0.634972150
23 0.435413441 -0.078438783
24 0.095636326 0.435413441
25 -0.039586069 0.095636326
26 0.255082604 -0.039586069
27 -1.323734745 0.255082604
28 1.041293627 -1.323734745
29 -0.020941910 1.041293627
30 1.169255572 -0.020941910
31 -2.710391435 1.169255572
32 0.255145411 -2.710391435
33 0.108760171 0.255145411
34 -2.316616832 0.108760171
35 0.876211275 -2.316616832
36 0.984433103 0.876211275
37 2.214215114 0.984433103
38 0.730369634 2.214215114
39 3.021527893 0.730369634
40 -0.882268859 3.021527893
41 -1.271526173 -0.882268859
42 -0.553508690 -1.271526173
43 0.682492275 -0.553508690
44 3.967834104 0.682492275
45 0.516979380 3.967834104
46 -0.673137972 0.516979380
47 0.791774017 -0.673137972
48 1.698770513 0.791774017
49 -1.158338499 1.698770513
50 1.397298101 -1.158338499
51 3.385471213 1.397298101
52 -0.312550828 3.385471213
53 -2.693270860 -0.312550828
54 -1.877145284 -2.693270860
55 0.463107197 -1.877145284
56 -3.373848399 0.463107197
57 -1.038388722 -3.373848399
58 -0.604058129 -1.038388722
59 -0.092649403 -0.604058129
60 0.051852785 -0.092649403
61 -1.052834208 0.051852785
62 -0.007501405 -1.052834208
63 0.090599448 -0.007501405
64 -4.545998168 0.090599448
65 1.955246027 -4.545998168
66 0.462847129 1.955246027
67 -1.264760180 0.462847129
68 0.645387855 -1.264760180
69 -1.418359962 0.645387855
70 0.179267112 -1.418359962
71 0.196823950 0.179267112
72 -0.336219969 0.196823950
73 1.513831060 -0.336219969
74 0.640340593 1.513831060
75 0.275525580 0.640340593
76 -1.995810234 0.275525580
77 -0.402432914 -1.995810234
78 -2.499181981 -0.402432914
79 1.367662582 -2.499181981
80 0.443356298 1.367662582
81 -0.209140654 0.443356298
82 -0.321061732 -0.209140654
83 -2.649083341 -0.321061732
84 -1.734921254 -2.649083341
85 -1.646741065 -1.734921254
86 2.884120930 -1.646741065
87 2.234770084 2.884120930
88 0.430392812 2.234770084
89 -1.643370365 0.430392812
90 1.731725238 -1.643370365
91 1.179667937 1.731725238
92 0.573625387 1.179667937
93 -1.341345661 0.573625387
94 1.947923493 -1.341345661
95 3.249126235 1.947923493
96 0.507725519 3.249126235
97 -1.299834978 0.507725519
98 2.689280074 -1.299834978
99 0.558208537 2.689280074
100 -2.705091434 0.558208537
101 -0.298513190 -2.705091434
102 -0.412757339 -0.298513190
103 1.216109797 -0.412757339
104 2.728003330 1.216109797
105 -2.079417059 2.728003330
106 -1.583871667 -2.079417059
107 -3.375546707 -1.583871667
108 -1.374423718 -3.375546707
109 0.724039971 -1.374423718
110 -0.430672756 0.724039971
111 -2.711190258 -0.430672756
112 2.215321290 -2.711190258
113 1.059160783 2.215321290
114 0.602708093 1.059160783
115 0.604397220 0.602708093
116 0.276561128 0.604397220
117 -0.436944958 0.276561128
118 -1.625554236 -0.436944958
119 1.433900843 -1.625554236
120 -2.222932114 1.433900843
121 -1.917694464 -2.222932114
122 1.321189884 -1.917694464
123 -1.797126117 1.321189884
124 -1.712521813 -1.797126117
125 3.171897099 -1.712521813
126 1.354626875 3.171897099
127 -0.781159058 1.354626875
128 -2.477331713 -0.781159058
129 1.197647551 -2.477331713
130 0.179825573 1.197647551
131 1.881395676 0.179825573
132 -4.864827869 1.881395676
133 4.627642073 -4.864827869
134 -1.445963415 4.627642073
135 -0.780907989 -1.445963415
136 0.092752887 -0.780907989
137 2.089274082 0.092752887
138 -0.551870034 2.089274082
139 0.755961494 -0.551870034
140 3.415973130 0.755961494
141 0.347863586 3.415973130
142 -1.535168116 0.347863586
143 -4.902001440 -1.535168116
144 0.082795565 -4.902001440
145 0.758068132 0.082795565
146 -2.318632146 0.758068132
147 2.008122239 -2.318632146
148 0.457112763 2.008122239
149 0.435810507 0.457112763
150 -0.043345997 0.435810507
151 0.870986398 -0.043345997
152 0.830734395 0.870986398
153 -0.092914275 0.830734395
154 2.742232173 -0.092914275
155 0.472002081 2.742232173
> 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/7xf5e1321958772.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/www/rcomp/tmp/8ml8r1321958772.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/www/rcomp/tmp/97uim1321958772.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/www/rcomp/tmp/10pruy1321958772.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/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/1171yu1321958772.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/12nlf41321958772.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/13fq4v1321958772.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/14mvok1321958772.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/15atzx1321958772.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/16f7pn1321958772.tab")
+ }
>
> try(system("convert tmp/15lmq1321958772.ps tmp/15lmq1321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/2eu881321958772.ps tmp/2eu881321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/39f601321958772.ps tmp/39f601321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/4nlml1321958772.ps tmp/4nlml1321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/5htaz1321958772.ps tmp/5htaz1321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/6gwqs1321958772.ps tmp/6gwqs1321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/7xf5e1321958772.ps tmp/7xf5e1321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/8ml8r1321958772.ps tmp/8ml8r1321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/97uim1321958772.ps tmp/97uim1321958772.png",intern=TRUE))
character(0)
> try(system("convert tmp/10pruy1321958772.ps tmp/10pruy1321958772.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
6.740 0.588 7.394