R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(15
+ ,10
+ ,77
+ ,5
+ ,4
+ ,15
+ ,11
+ ,12
+ ,13
+ ,6
+ ,12
+ ,20
+ ,63
+ ,6
+ ,4
+ ,9
+ ,12
+ ,7
+ ,11
+ ,4
+ ,15
+ ,16
+ ,73
+ ,4
+ ,10
+ ,12
+ ,12
+ ,13
+ ,14
+ ,6
+ ,12
+ ,10
+ ,76
+ ,6
+ ,6
+ ,15
+ ,11
+ ,11
+ ,12
+ ,5
+ ,14
+ ,8
+ ,90
+ ,3
+ ,5
+ ,17
+ ,11
+ ,16
+ ,12
+ ,5
+ ,8
+ ,14
+ ,67
+ ,10
+ ,8
+ ,14
+ ,10
+ ,10
+ ,6
+ ,4
+ ,11
+ ,19
+ ,69
+ ,8
+ ,9
+ ,9
+ ,11
+ ,15
+ ,10
+ ,5
+ ,15
+ ,15
+ ,70
+ ,3
+ ,6
+ ,12
+ ,9
+ ,5
+ ,11
+ ,3
+ ,4
+ ,23
+ ,54
+ ,4
+ ,8
+ ,11
+ ,10
+ ,4
+ ,10
+ ,2
+ ,13
+ ,9
+ ,54
+ ,3
+ ,11
+ ,13
+ ,12
+ ,7
+ ,12
+ ,5
+ ,19
+ ,12
+ ,76
+ ,5
+ ,6
+ ,16
+ ,12
+ ,15
+ ,15
+ ,6
+ ,10
+ ,14
+ ,75
+ ,5
+ ,8
+ ,16
+ ,12
+ ,5
+ ,13
+ ,6
+ ,15
+ ,13
+ ,76
+ ,6
+ ,11
+ ,15
+ ,13
+ ,16
+ ,18
+ ,8
+ ,6
+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12
+ ,13
+ ,13
+ ,5
+ ,16
+ ,15
+ ,74
+ ,14
+ ,12
+ ,11
+ ,12
+ ,14
+ ,16
+ ,8
+ ,13
+ ,14
+ ,82
+ ,5
+ ,6
+ ,15
+ ,12
+ ,11
+ ,13
+ ,6
+ ,12
+ ,14
+ ,54
+ ,12
+ ,4
+ ,16
+ ,12
+ ,14
+ ,14
+ ,4
+ ,9
+ ,14
+ ,54
+ ,6
+ ,6
+ ,14
+ ,10
+ ,11
+ ,13
+ ,3
+ ,14
+ ,10
+ ,80
+ ,6
+ ,7
+ ,13
+ ,12
+ ,8
+ ,14
+ ,4
+ ,15
+ ,8
+ ,76
+ ,8
+ ,9
+ ,15
+ ,12
+ ,12
+ ,16
+ ,7)
+ ,dim=c(10
+ ,156)
+ ,dimnames=list(c('Popularity'
+ ,'Depression'
+ ,'Belonging'
+ ,'Weighted_popularity'
+ ,'Parental_criticism'
+ ,'Happiness'
+ ,'FindingFriends'
+ ,'KnowingPeople'
+ ,'Liked'
+ ,'Celebrity')
+ ,1:156))
> y <- array(NA,dim=c(10,156),dimnames=list(c('Popularity','Depression','Belonging','Weighted_popularity','Parental_criticism','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])
+ }
+ }
> 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 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
Happiness FindingFriends KnowingPeople Liked Celebrity t
1 15 11 12 13 6 1
2 9 12 7 11 4 2
3 12 12 13 14 6 3
4 15 11 11 12 5 4
5 17 11 16 12 5 5
6 14 10 10 6 4 6
7 9 11 15 10 5 7
8 12 9 5 11 3 8
9 11 10 4 10 2 9
10 13 12 7 12 5 10
11 16 12 15 15 6 11
12 16 12 5 13 6 12
13 15 13 16 18 8 13
14 10 9 15 11 6 14
15 16 12 13 12 3 15
16 12 12 13 13 6 16
17 15 12 15 14 6 17
18 13 12 15 16 7 18
19 18 13 10 16 8 19
20 13 11 17 16 6 20
21 17 12 14 15 7 21
22 14 12 9 13 4 22
23 13 15 6 8 4 23
24 13 11 11 14 2 24
25 15 12 13 15 6 25
26 13 10 12 13 6 26
27 15 11 10 16 6 27
28 13 13 4 13 6 28
29 14 6 13 12 6 29
30 13 12 15 15 7 30
31 16 12 8 11 4 31
32 14 10 10 14 3 32
33 18 12 8 13 5 33
34 15 12 7 13 6 34
35 9 11 9 12 4 35
36 16 9 14 14 6 36
37 16 10 5 13 3 37
38 17 12 7 12 3 38
39 13 12 16 14 6 39
40 17 11 14 15 6 40
41 15 12 16 16 6 41
42 14 11 15 15 8 42
43 10 14 4 5 2 43
44 13 10 12 15 6 44
45 11 10 8 8 4 45
46 11 11 17 16 7 46
47 16 11 15 16 6 47
48 16 11 16 14 6 48
49 11 10 12 16 6 49
50 15 10 12 14 5 50
51 15 12 13 13 6 51
52 12 11 14 14 6 52
53 17 8 14 14 5 53
54 15 12 15 12 6 54
55 16 10 14 13 7 55
56 14 7 11 15 5 56
57 17 11 13 15 6 57
58 10 7 4 13 6 58
59 11 11 8 10 4 59
60 15 8 13 13 5 60
61 15 11 15 14 6 61
62 7 12 15 13 6 62
63 17 8 8 13 4 63
64 14 14 17 18 6 64
65 18 14 12 12 4 65
66 14 11 13 14 7 66
67 12 12 14 16 8 67
68 14 14 7 13 6 68
69 9 9 16 16 6 69
70 14 13 11 15 6 70
71 11 8 10 14 5 71
72 16 11 14 13 6 72
73 17 9 19 12 6 73
74 16 12 14 16 4 74
75 12 7 8 9 5 75
76 15 11 15 15 8 76
77 15 12 8 16 6 77
78 15 11 8 12 6 78
79 16 12 6 11 2 79
80 16 9 7 13 2 80
81 11 11 16 13 4 81
82 15 13 15 14 6 82
83 12 12 10 15 6 83
84 14 12 8 14 5 84
85 15 11 9 12 4 85
86 17 12 8 16 4 86
87 19 12 14 14 6 87
88 15 11 14 13 5 88
89 16 11 14 12 6 89
90 14 8 15 13 7 90
91 16 9 7 12 6 91
92 15 11 7 9 4 92
93 15 12 12 13 4 93
94 17 13 7 10 3 94
95 12 12 12 15 8 95
96 18 6 6 9 4 96
97 13 12 10 13 4 97
98 14 11 12 13 5 98
99 14 13 13 13 5 99
100 14 11 14 15 7 100
101 12 12 8 13 4 101
102 14 10 14 14 5 102
103 12 10 10 11 5 103
104 15 11 14 15 8 104
105 11 11 15 14 5 105
106 11 11 10 15 2 106
107 15 9 6 12 5 107
108 14 7 9 15 4 108
109 15 11 11 14 5 109
110 16 12 16 16 7 110
111 12 12 14 14 6 111
112 14 15 8 12 3 112
113 18 11 16 11 5 113
114 14 10 16 13 6 114
115 13 13 14 12 5 115
116 14 13 12 12 6 116
117 14 11 16 16 7 117
118 17 12 15 13 6 118
119 12 12 11 12 6 119
120 16 12 6 14 5 120
121 15 8 6 4 4 121
122 10 5 16 14 6 122
123 13 11 16 15 6 123
124 15 12 8 12 3 124
125 16 12 11 11 4 125
126 15 11 12 12 4 126
127 14 12 13 11 4 127
128 11 10 11 12 5 128
129 13 7 9 11 4 129
130 17 12 15 13 6 130
131 14 12 11 12 6 131
132 16 9 12 12 4 132
133 15 11 15 15 7 133
134 12 12 8 14 4 134
135 16 12 7 12 4 135
136 8 11 10 12 4 136
137 9 11 9 12 4 137
138 13 12 13 13 5 138
139 19 12 11 11 4 139
140 11 11 12 13 7 140
141 15 12 5 12 3 141
142 11 12 12 14 5 142
143 15 8 14 15 5 143
144 16 15 15 15 6 144
145 15 11 14 13 5 145
146 12 11 13 16 6 146
147 16 6 14 17 6 147
148 15 13 14 13 3 148
149 13 12 15 14 6 149
150 14 12 13 13 5 150
151 11 12 14 16 8 151
152 15 12 11 13 6 152
153 16 12 14 14 4 153
154 14 10 11 13 3 154
155 13 12 8 14 4 155
156 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.168928 -0.080731 0.045325
Weighted_popularity Parental_criticism Happiness
0.096415 0.077277 -0.057277
FindingFriends KnowingPeople 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
Depression -0.080731 0.063126 -1.279 0.202984
Belonging 0.045325 0.016962 2.672 0.008399 **
Weighted_popularity 0.096415 0.058110 1.659 0.099240 .
Parental_criticism 0.077277 0.064661 1.195 0.233999
Happiness -0.057277 0.085478 -0.670 0.503876
FindingFriends 0.117597 0.093661 1.256 0.211299
KnowingPeople 0.227711 0.064294 3.542 0.000535 ***
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/www/rcomp/tmp/1495s1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/2f04c1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/3f04c1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/4f04c1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/5f04c1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 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/www/rcomp/tmp/6pa4f1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 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/www/rcomp/tmp/7013i1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/8013i1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/9bbk31290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/rcomp/tmp/10mk2o1290190073.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/117kic1290190073.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/12a3zi1290190073.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/137dx91290190073.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/14k5gs1290190074.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/1566wf1290190074.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/16kxco1290190074.tab")
+ }
> try(system("convert tmp/1495s1290190073.ps tmp/1495s1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/2f04c1290190073.ps tmp/2f04c1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/3f04c1290190073.ps tmp/3f04c1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/4f04c1290190073.ps tmp/4f04c1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/5f04c1290190073.ps tmp/5f04c1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/6pa4f1290190073.ps tmp/6pa4f1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/7013i1290190073.ps tmp/7013i1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/8013i1290190073.ps tmp/8013i1290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/9bbk31290190073.ps tmp/9bbk31290190073.png",intern=TRUE))
character(0)
> try(system("convert tmp/10mk2o1290190073.ps tmp/10mk2o1290190073.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
6.120 2.180 8.297