R version 2.9.0 (2009-04-17)
Copyright (C) 2009 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(1
+ ,15
+ ,10
+ ,77
+ ,5
+ ,4
+ ,15
+ ,11
+ ,12
+ ,13
+ ,6
+ ,0
+ ,12
+ ,20
+ ,63
+ ,6
+ ,4
+ ,9
+ ,12
+ ,7
+ ,11
+ ,4
+ ,0
+ ,15
+ ,16
+ ,73
+ ,4
+ ,10
+ ,12
+ ,12
+ ,13
+ ,14
+ ,6
+ ,0
+ ,12
+ ,10
+ ,76
+ ,6
+ ,6
+ ,15
+ ,11
+ ,11
+ ,12
+ ,5
+ ,0
+ ,14
+ ,8
+ ,90
+ ,3
+ ,5
+ ,17
+ ,11
+ ,16
+ ,12
+ ,5
+ ,0
+ ,8
+ ,14
+ ,67
+ ,10
+ ,8
+ ,14
+ ,10
+ ,10
+ ,6
+ ,4
+ ,1
+ ,11
+ ,19
+ ,69
+ ,8
+ ,9
+ ,9
+ ,11
+ ,15
+ ,10
+ ,5
+ ,1
+ ,15
+ ,15
+ ,70
+ ,3
+ ,6
+ ,12
+ ,9
+ ,5
+ ,11
+ ,3
+ ,0
+ ,4
+ ,23
+ ,54
+ ,4
+ ,8
+ ,11
+ ,10
+ ,4
+ ,10
+ ,2
+ ,0
+ ,13
+ ,9
+ ,54
+ ,3
+ ,11
+ ,13
+ ,12
+ ,7
+ ,12
+ ,5
+ ,1
+ ,19
+ ,12
+ ,76
+ ,5
+ ,6
+ ,16
+ ,12
+ ,15
+ ,15
+ ,6
+ ,1
+ ,10
+ ,14
+ ,75
+ ,5
+ ,8
+ ,16
+ ,12
+ ,5
+ ,13
+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,15
+ ,12
+ ,11
+ ,13
+ ,6
+ ,1
+ ,12
+ ,14
+ ,54
+ ,12
+ ,4
+ ,16
+ ,12
+ ,14
+ ,14
+ ,4
+ ,1
+ ,9
+ ,14
+ ,54
+ ,6
+ ,6
+ ,14
+ ,10
+ ,11
+ ,13
+ ,3
+ ,1
+ ,14
+ ,10
+ ,80
+ ,6
+ ,7
+ ,13
+ ,12
+ ,8
+ ,14
+ ,4
+ ,0
+ ,15
+ ,8
+ ,76
+ ,8
+ ,9
+ ,15
+ ,12
+ ,12
+ ,16
+ ,7)
+ ,dim=c(11
+ ,156)
+ ,dimnames=list(c('Gender'
+ ,'Popularity'
+ ,'Depression'
+ ,'Belonging'
+ ,'WeightedPopularity'
+ ,'ParentalCriticism'
+ ,'Happiness'
+ ,'FindingFriends'
+ ,'KnowingPeople'
+ ,'Liked'
+ ,'Celebrity')
+ ,1:156))
> y <- array(NA,dim=c(11,156),dimnames=list(c('Gender','Popularity','Depression','Belonging','WeightedPopularity','ParentalCriticism','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 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '5'
> #'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
Attaching package: 'zoo'
The following object(s) are masked from package:base :
as.Date.numeric
> 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
WeightedPopularity Gender Popularity Depression Belonging ParentalCriticism
1 5 1 15 10 77 4
2 6 0 12 20 63 4
3 4 0 15 16 73 10
4 6 0 12 10 76 6
5 3 0 14 8 90 5
6 10 0 8 14 67 8
7 8 1 11 19 69 9
8 3 1 15 15 70 6
9 4 0 4 23 54 8
10 3 0 13 9 54 11
11 5 1 19 12 76 6
12 5 1 10 14 75 8
13 6 1 15 13 76 11
14 5 0 6 11 80 5
15 3 1 7 11 89 10
16 4 0 14 10 73 7
17 8 0 16 12 74 7
18 8 1 16 18 78 13
19 8 1 14 12 76 10
20 5 0 15 10 69 8
21 8 1 14 15 74 6
22 2 1 12 15 82 8
23 0 0 9 12 77 7
24 5 1 12 9 84 5
25 2 1 14 11 75 9
26 7 1 12 15 54 9
27 5 1 14 16 79 11
28 2 1 10 17 79 11
29 12 1 14 12 69 11
30 7 1 16 11 88 9
31 0 1 10 13 57 7
32 2 1 8 9 69 6
33 3 1 12 11 86 6
34 0 1 11 9 65 6
35 9 0 8 20 66 5
36 2 0 13 8 54 4
37 3 1 11 12 85 10
38 1 0 12 10 79 8
39 10 0 16 11 84 6
40 1 1 16 13 70 5
41 4 1 13 13 54 9
42 6 1 14 13 70 10
43 6 0 5 15 54 6
44 4 0 14 12 69 9
45 4 1 13 13 68 10
46 7 1 16 13 68 6
47 7 0 14 9 71 6
48 7 0 15 9 71 6
49 0 1 15 14 66 13
50 3 1 11 9 67 8
51 8 1 15 9 71 10
52 8 1 16 15 54 5
53 10 1 13 10 76 8
54 11 0 11 13 77 6
55 6 0 12 8 71 9
56 2 1 12 15 69 9
57 6 1 10 13 73 7
58 1 1 8 24 46 20
59 5 0 9 11 66 8
60 4 1 12 13 77 8
61 6 0 14 12 77 7
62 6 1 12 22 70 7
63 4 0 11 11 86 10
64 1 0 14 15 38 5
65 6 0 7 7 66 8
66 7 0 16 14 75 9
67 7 1 16 19 80 9
68 2 0 11 10 64 20
69 7 1 16 9 80 6
70 8 1 13 12 86 10
71 5 1 11 16 54 11
72 4 1 13 13 74 7
73 2 1 14 11 88 12
74 0 1 15 12 85 12
75 7 0 10 11 63 8
76 0 1 15 13 81 6
77 5 0 11 13 81 6
78 3 1 11 10 74 9
79 3 1 6 11 80 5
80 3 1 11 9 80 11
81 3 0 12 13 60 6
82 7 0 13 15 65 6
83 6 1 12 14 62 10
84 3 0 8 14 63 8
85 0 1 9 11 89 7
86 2 1 10 10 76 8
87 0 1 16 11 81 9
88 9 1 15 12 72 8
89 10 0 14 14 84 10
90 3 1 12 14 76 13
91 7 1 12 21 76 7
92 3 1 10 14 78 7
93 6 1 12 13 72 7
94 5 0 8 11 81 8
95 0 1 16 12 72 9
96 0 1 11 12 78 9
97 4 1 12 11 79 8
98 0 1 9 14 52 7
99 0 0 14 13 67 6
100 7 0 15 13 74 8
101 3 0 8 12 73 8
102 9 1 12 14 69 4
103 4 0 10 12 67 8
104 4 1 16 12 76 10
105 15 1 17 12 77 7
106 7 0 8 18 63 8
107 8 1 9 11 84 7
108 2 1 8 15 90 10
109 8 0 11 13 75 9
110 7 1 16 11 76 8
111 3 0 13 11 75 8
112 3 1 5 22 53 5
113 6 1 15 10 87 8
114 8 1 15 11 78 9
115 5 1 12 15 54 11
116 6 0 12 14 58 7
117 10 1 16 11 80 8
118 0 1 12 10 74 4
119 5 1 10 14 56 16
120 0 1 12 14 82 9
121 0 1 4 11 64 16
122 5 0 11 15 67 12
123 10 0 16 11 75 8
124 0 0 7 10 69 4
125 5 1 9 10 72 11
126 6 0 14 16 71 11
127 1 1 11 12 54 8
128 5 1 10 14 68 8
129 3 0 6 15 54 12
130 3 1 14 10 71 8
131 6 1 11 12 53 6
132 2 1 11 15 54 8
133 5 0 9 12 71 6
134 6 1 16 11 69 14
135 2 0 7 10 30 10
136 3 0 8 20 53 5
137 7 0 10 19 68 8
138 6 1 14 17 69 12
139 3 1 9 8 54 11
140 6 1 13 17 66 8
141 9 0 13 11 79 8
142 2 0 12 13 67 9
143 5 0 11 9 74 6
144 10 0 10 10 86 5
145 9 1 12 13 63 8
146 8 1 14 16 69 7
147 8 0 11 12 73 4
148 5 0 13 14 69 9
149 9 0 14 11 71 5
150 9 1 13 13 77 9
151 14 1 16 15 74 12
152 5 1 13 14 82 6
153 12 1 12 14 54 4
154 6 1 9 14 54 6
155 6 1 14 10 80 7
156 8 0 15 8 76 9
Happiness FindingFriends KnowingPeople Liked Celebrity
1 15 11 12 13 6
2 9 12 7 11 4
3 12 12 13 14 6
4 15 11 11 12 5
5 17 11 16 12 5
6 14 10 10 6 4
7 9 11 15 10 5
8 12 9 5 11 3
9 11 10 4 10 2
10 13 12 7 12 5
11 16 12 15 15 6
12 16 12 5 13 6
13 15 13 16 18 8
14 10 9 15 11 6
15 16 12 13 12 3
16 12 12 13 13 6
17 15 12 15 14 6
18 13 12 15 16 7
19 18 13 10 16 8
20 13 11 17 16 6
21 17 12 14 15 7
22 14 12 9 13 4
23 13 15 6 8 4
24 13 11 11 14 2
25 15 12 13 15 6
26 13 10 12 13 6
27 15 11 10 16 6
28 13 13 4 13 6
29 14 6 13 12 6
30 13 12 15 15 7
31 16 12 8 11 4
32 14 10 10 14 3
33 18 12 8 13 5
34 15 12 7 13 6
35 9 11 9 12 4
36 16 9 14 14 6
37 16 10 5 13 3
38 17 12 7 12 3
39 13 12 16 14 6
40 17 11 14 15 6
41 15 12 16 16 6
42 14 11 15 15 8
43 10 14 4 5 2
44 13 10 12 15 6
45 11 10 8 8 4
46 11 11 17 16 7
47 16 11 15 16 6
48 16 11 16 14 6
49 11 10 12 16 6
50 15 10 12 14 5
51 15 12 13 13 6
52 12 11 14 14 6
53 17 8 14 14 5
54 15 12 15 12 6
55 16 10 14 13 7
56 14 7 11 15 5
57 17 11 13 15 6
58 10 7 4 13 6
59 11 11 8 10 4
60 15 8 13 13 5
61 15 11 15 14 6
62 7 12 15 13 6
63 17 8 8 13 4
64 14 14 17 18 6
65 18 14 12 12 4
66 14 11 13 14 7
67 12 12 14 16 8
68 14 14 7 13 6
69 9 9 16 16 6
70 14 13 11 15 6
71 11 8 10 14 5
72 16 11 14 13 6
73 17 9 19 12 6
74 16 12 14 16 4
75 12 7 8 9 5
76 15 11 15 15 8
77 15 12 8 16 6
78 15 11 8 12 6
79 16 12 6 11 2
80 16 9 7 13 2
81 11 11 16 13 4
82 15 13 15 14 6
83 12 12 10 15 6
84 14 12 8 14 5
85 15 11 9 12 4
86 17 12 8 16 4
87 19 12 14 14 6
88 15 11 14 13 5
89 16 11 14 12 6
90 14 8 15 13 7
91 16 9 7 12 6
92 15 11 7 9 4
93 15 12 12 13 4
94 17 13 7 10 3
95 12 12 12 15 8
96 18 6 6 9 4
97 13 12 10 13 4
98 14 11 12 13 5
99 14 13 13 13 5
100 14 11 14 15 7
101 12 12 8 13 4
102 14 10 14 14 5
103 12 10 10 11 5
104 15 11 14 15 8
105 11 11 15 14 5
106 11 11 10 15 2
107 15 9 6 12 5
108 14 7 9 15 4
109 15 11 11 14 5
110 16 12 16 16 7
111 12 12 14 14 6
112 14 15 8 12 3
113 18 11 16 11 5
114 14 10 16 13 6
115 13 13 14 12 5
116 14 13 12 12 6
117 14 11 16 16 7
118 17 12 15 13 6
119 12 12 11 12 6
120 16 12 6 14 5
121 15 8 6 4 4
122 10 5 16 14 6
123 13 11 16 15 6
124 15 12 8 12 3
125 16 12 11 11 4
126 15 11 12 12 4
127 14 12 13 11 4
128 11 10 11 12 5
129 13 7 9 11 4
130 17 12 15 13 6
131 14 12 11 12 6
132 16 9 12 12 4
133 15 11 15 15 7
134 12 12 8 14 4
135 16 12 7 12 4
136 8 11 10 12 4
137 9 11 9 12 4
138 13 12 13 13 5
139 19 12 11 11 4
140 11 11 12 13 7
141 15 12 5 12 3
142 11 12 12 14 5
143 15 8 14 15 5
144 16 15 15 15 6
145 15 11 14 13 5
146 12 11 13 16 6
147 16 6 14 17 6
148 15 13 14 13 3
149 13 12 15 14 6
150 14 12 13 13 5
151 11 12 14 16 8
152 15 12 11 13 6
153 16 12 14 14 4
154 14 10 11 13 3
155 13 12 8 14 4
156 15 12 12 16 7
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Gender Popularity Depression
0.97296 -0.72058 0.19398 0.12957
Belonging ParentalCriticism Happiness FindingFriends
0.03855 -0.09957 -0.18111 -0.02937
KnowingPeople Liked Celebrity
0.22347 -0.12469 0.09282
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.55610 -1.74383 -0.02345 1.81695 7.86861
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.97296 3.62723 0.268 0.7889
Gender -0.72058 0.51186 -1.408 0.1613
Popularity 0.19398 0.11831 1.640 0.1033
Depression 0.12957 0.09215 1.406 0.1618
Belonging 0.03855 0.02443 1.578 0.1167
ParentalCriticism -0.09957 0.09251 -1.076 0.2836
Happiness -0.18111 0.12357 -1.466 0.1449
FindingFriends -0.02937 0.13496 -0.218 0.8280
KnowingPeople 0.22347 0.09323 2.397 0.0178 *
Liked -0.12469 0.13853 -0.900 0.3695
Celebrity 0.09282 0.23230 0.400 0.6901
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.879 on 145 degrees of freedom
Multiple R-squared: 0.1998, Adjusted R-squared: 0.1446
F-statistic: 3.62 on 10 and 145 DF, p-value: 0.0002540
> 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.205203972 0.41040794 0.7947960
[2,] 0.111160507 0.22232101 0.8888395
[3,] 0.049617840 0.09923568 0.9503822
[4,] 0.068129026 0.13625805 0.9318710
[5,] 0.047497255 0.09499451 0.9525027
[6,] 0.026776042 0.05355208 0.9732240
[7,] 0.017772431 0.03554486 0.9822276
[8,] 0.009121510 0.01824302 0.9908785
[9,] 0.004965915 0.00993183 0.9950341
[10,] 0.006250235 0.01250047 0.9937498
[11,] 0.068282830 0.13656566 0.9317172
[12,] 0.092372057 0.18474411 0.9076279
[13,] 0.069576928 0.13915386 0.9304231
[14,] 0.045603747 0.09120749 0.9543963
[15,] 0.030359201 0.06071840 0.9696408
[16,] 0.034313028 0.06862606 0.9656870
[17,] 0.030589426 0.06117885 0.9694106
[18,] 0.059346898 0.11869380 0.9406531
[19,] 0.040885954 0.08177191 0.9591140
[20,] 0.027822256 0.05564451 0.9721777
[21,] 0.026401581 0.05280316 0.9735984
[22,] 0.040817968 0.08163594 0.9591820
[23,] 0.057243965 0.11448793 0.9427560
[24,] 0.040584751 0.08116950 0.9594152
[25,] 0.031372868 0.06274574 0.9686271
[26,] 0.045263300 0.09052660 0.9547367
[27,] 0.083428721 0.16685744 0.9165713
[28,] 0.062436389 0.12487278 0.9375636
[29,] 0.048633142 0.09726628 0.9513669
[30,] 0.073301958 0.14660392 0.9266980
[31,] 0.061546451 0.12309290 0.9384535
[32,] 0.055511000 0.11102200 0.9444890
[33,] 0.041585638 0.08317128 0.9584144
[34,] 0.040302465 0.08060493 0.9596975
[35,] 0.031712028 0.06342406 0.9682880
[36,] 0.068488203 0.13697641 0.9315118
[37,] 0.052405575 0.10481115 0.9475944
[38,] 0.066264678 0.13252936 0.9337353
[39,] 0.057767719 0.11553544 0.9422323
[40,] 0.084608137 0.16921627 0.9153919
[41,] 0.106672558 0.21334512 0.8933274
[42,] 0.085803410 0.17160682 0.9141966
[43,] 0.101729024 0.20345805 0.8982710
[44,] 0.085180428 0.17036086 0.9148196
[45,] 0.086768847 0.17353769 0.9132312
[46,] 0.071839388 0.14367878 0.9281606
[47,] 0.065146798 0.13029360 0.9348532
[48,] 0.051451966 0.10290393 0.9485480
[49,] 0.046006508 0.09201302 0.9539935
[50,] 0.034875148 0.06975030 0.9651249
[51,] 0.044559213 0.08911843 0.9554408
[52,] 0.049661348 0.09932270 0.9503387
[53,] 0.037931129 0.07586226 0.9620689
[54,] 0.028721224 0.05744245 0.9712788
[55,] 0.021589410 0.04317882 0.9784106
[56,] 0.018233334 0.03646667 0.9817667
[57,] 0.022536053 0.04507211 0.9774639
[58,] 0.017525841 0.03505168 0.9824742
[59,] 0.015695757 0.03139151 0.9843042
[60,] 0.036985844 0.07397169 0.9630142
[61,] 0.055383226 0.11076645 0.9446168
[62,] 0.050705922 0.10141184 0.9492941
[63,] 0.155035800 0.31007160 0.8449642
[64,] 0.128853786 0.25770757 0.8711462
[65,] 0.106560700 0.21312140 0.8934393
[66,] 0.087687193 0.17537439 0.9123128
[67,] 0.073361253 0.14672251 0.9266387
[68,] 0.081674823 0.16334965 0.9183252
[69,] 0.066123493 0.13224699 0.9338765
[70,] 0.058366378 0.11673276 0.9416336
[71,] 0.045800166 0.09160033 0.9541998
[72,] 0.058754948 0.11750990 0.9412451
[73,] 0.049250263 0.09850053 0.9507497
[74,] 0.098377797 0.19675559 0.9016222
[75,] 0.107639314 0.21527863 0.8923607
[76,] 0.116647170 0.23329434 0.8833528
[77,] 0.119279266 0.23855853 0.8807207
[78,] 0.111596667 0.22319333 0.8884033
[79,] 0.092662237 0.18532447 0.9073378
[80,] 0.078538365 0.15707673 0.9214616
[81,] 0.069758600 0.13951720 0.9302414
[82,] 0.160812458 0.32162492 0.8391875
[83,] 0.168236823 0.33647365 0.8317632
[84,] 0.150232850 0.30046570 0.8497671
[85,] 0.188510145 0.37702029 0.8114899
[86,] 0.342651230 0.68530246 0.6573488
[87,] 0.298523788 0.59704758 0.7014762
[88,] 0.263159124 0.52631825 0.7368409
[89,] 0.264580647 0.52916129 0.7354194
[90,] 0.227440161 0.45488032 0.7725598
[91,] 0.235842734 0.47168547 0.7641573
[92,] 0.495699748 0.99139950 0.5043003
[93,] 0.473769128 0.94753826 0.5262309
[94,] 0.566092739 0.86781452 0.4339073
[95,] 0.551925129 0.89614974 0.4480749
[96,] 0.540924040 0.91815192 0.4590760
[97,] 0.507709291 0.98458142 0.4922907
[98,] 0.555076457 0.88984709 0.4449235
[99,] 0.498902757 0.99780551 0.5010972
[100,] 0.441773668 0.88354734 0.5582263
[101,] 0.393999550 0.78799910 0.6060004
[102,] 0.345918235 0.69183647 0.6540818
[103,] 0.295087118 0.59017424 0.7049129
[104,] 0.273605140 0.54721028 0.7263949
[105,] 0.444219280 0.88843856 0.5557807
[106,] 0.388082350 0.77616470 0.6119176
[107,] 0.605402592 0.78919482 0.3945974
[108,] 0.620994270 0.75801146 0.3790057
[109,] 0.566500660 0.86699868 0.4334993
[110,] 0.556981069 0.88603786 0.4430189
[111,] 0.611775238 0.77644952 0.3882248
[112,] 0.564226290 0.87154742 0.4357737
[113,] 0.494809013 0.98961803 0.5051910
[114,] 0.471833085 0.94366617 0.5281669
[115,] 0.403236501 0.80647300 0.5967635
[116,] 0.417460532 0.83492106 0.5825395
[117,] 0.481345222 0.96269044 0.5186548
[118,] 0.409592168 0.81918434 0.5904078
[119,] 0.424982537 0.84996507 0.5750175
[120,] 0.364786627 0.72957325 0.6352134
[121,] 0.293582441 0.58716488 0.7064176
[122,] 0.227875956 0.45575191 0.7721240
[123,] 0.181769175 0.36353835 0.8182308
[124,] 0.200197806 0.40039561 0.7998022
[125,] 0.147085402 0.29417080 0.8529146
[126,] 0.151538339 0.30307668 0.8484617
[127,] 0.096281055 0.19256211 0.9037189
[128,] 0.686935485 0.62612903 0.3130645
[129,] 0.556698366 0.88660327 0.4433016
> postscript(file="/var/www/html/rcomp/tmp/1bu1r1292956041.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/html/rcomp/tmp/2bu1r1292956041.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/html/rcomp/tmp/3bu1r1292956041.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/html/rcomp/tmp/44l0c1292956041.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/html/rcomp/tmp/54l0c1292956041.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
-0.60569168 -0.50401491 -2.96476841 0.68494875 -3.83827340 4.84634117
7 8 9 10 11 12
0.77206442 -1.79327359 0.43916809 -0.47244286 -1.61357318 2.09605098
13 14 15 16 17 18
0.34387322 -1.61019127 -0.90785411 -2.41678895 1.11865517 1.29940291
19 20 21 22 23 24
4.20258052 -1.72503141 2.35646719 -2.76178124 -4.46460134 0.29272545
25 26 27 28 29 30
-2.91102472 2.32136170 0.25178858 -1.43863473 6.65845772 0.29788426
31 32 33 34 35 36
-2.91417176 -0.97112902 -0.74177332 -2.89175038 2.90420405 -2.99235823
37 38 39 40 41 42
0.19455067 -2.76047816 2.17745106 -4.65426926 -0.71230427 0.27912682
43 44 45 46 47 48
2.39550497 -1.72735431 -0.95981358 -0.20276610 1.31252259 0.64569509
49 50 51 52 53 54
-5.18346853 -0.72826520 3.15853122 1.67318238 5.26379367 4.49435909
55 56 57 58 59 60
0.85596788 -2.59824737 1.81655095 -1.50884493 0.51136645 -1.23293283
61 62 63 64 65 66
-0.63841519 -2.09990505 -0.07585358 -4.76391420 3.12899218 0.16374773
67 68 69 70 71 72
-0.35602216 -0.43169036 -0.25178571 3.12407996 0.82839837 -1.45789160
73 74 75 76 77 78
-4.55423805 -5.05339966 2.27916532 -6.55610283 0.40317998 -0.44709243
79 80 81 82 83 84
0.66760356 0.49210508 -3.71118567 0.58864126 1.81603698 -0.58905842
85 86 87 88 89 90
-4.00396158 -0.35380198 -5.15401141 3.37210690 3.28649410 -2.63975618
91 92 93 94 95 96
2.00325554 -1.08972413 1.29401308 1.58874324 -5.81838697 -3.20547359
97 98 99 100 101 102
-0.53242428 -3.78588578 -6.18935552 0.32749949 -1.10953107 3.32647626
103 104 105 106 107 108
-1.11404697 -1.80599429 7.86861226 2.27617907 4.70763719 -1.99260334
109 110 111 112 113 114
3.07687505 1.10548486 -3.42868386 -0.21194678 -0.10001901 1.61971345
115 116 117 118 119 120
0.12981051 0.52152490 3.55969056 -5.18691358 1.43519815 -3.46814869
121 122 123 124 125 126
-1.58937725 -1.86703652 2.81888523 -3.38905147 1.81813431 0.07955526
127 128 129 130 131 132
-3.24289649 0.02895991 -0.41809944 -2.06092007 1.98249954 -2.00933740
133 134 135 136 137 138
-0.50491604 2.06513729 1.02366126 -2.99919852 0.86743503 0.32280413
139 140 141 142 143 144
1.31452927 -0.11961120 5.00068854 -3.72722004 -0.29882987 4.27380084
145 146 147 148 149 150
4.17143456 2.02528944 2.43080614 -0.76005507 2.19046941 3.60903344
151 152 153 154 155 156
7.51117493 -0.47679019 7.41852496 2.41716567 1.64268867 2.77991665
> postscript(file="/var/www/html/rcomp/tmp/64l0c1292956041.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 -0.60569168 NA
1 -0.50401491 -0.60569168
2 -2.96476841 -0.50401491
3 0.68494875 -2.96476841
4 -3.83827340 0.68494875
5 4.84634117 -3.83827340
6 0.77206442 4.84634117
7 -1.79327359 0.77206442
8 0.43916809 -1.79327359
9 -0.47244286 0.43916809
10 -1.61357318 -0.47244286
11 2.09605098 -1.61357318
12 0.34387322 2.09605098
13 -1.61019127 0.34387322
14 -0.90785411 -1.61019127
15 -2.41678895 -0.90785411
16 1.11865517 -2.41678895
17 1.29940291 1.11865517
18 4.20258052 1.29940291
19 -1.72503141 4.20258052
20 2.35646719 -1.72503141
21 -2.76178124 2.35646719
22 -4.46460134 -2.76178124
23 0.29272545 -4.46460134
24 -2.91102472 0.29272545
25 2.32136170 -2.91102472
26 0.25178858 2.32136170
27 -1.43863473 0.25178858
28 6.65845772 -1.43863473
29 0.29788426 6.65845772
30 -2.91417176 0.29788426
31 -0.97112902 -2.91417176
32 -0.74177332 -0.97112902
33 -2.89175038 -0.74177332
34 2.90420405 -2.89175038
35 -2.99235823 2.90420405
36 0.19455067 -2.99235823
37 -2.76047816 0.19455067
38 2.17745106 -2.76047816
39 -4.65426926 2.17745106
40 -0.71230427 -4.65426926
41 0.27912682 -0.71230427
42 2.39550497 0.27912682
43 -1.72735431 2.39550497
44 -0.95981358 -1.72735431
45 -0.20276610 -0.95981358
46 1.31252259 -0.20276610
47 0.64569509 1.31252259
48 -5.18346853 0.64569509
49 -0.72826520 -5.18346853
50 3.15853122 -0.72826520
51 1.67318238 3.15853122
52 5.26379367 1.67318238
53 4.49435909 5.26379367
54 0.85596788 4.49435909
55 -2.59824737 0.85596788
56 1.81655095 -2.59824737
57 -1.50884493 1.81655095
58 0.51136645 -1.50884493
59 -1.23293283 0.51136645
60 -0.63841519 -1.23293283
61 -2.09990505 -0.63841519
62 -0.07585358 -2.09990505
63 -4.76391420 -0.07585358
64 3.12899218 -4.76391420
65 0.16374773 3.12899218
66 -0.35602216 0.16374773
67 -0.43169036 -0.35602216
68 -0.25178571 -0.43169036
69 3.12407996 -0.25178571
70 0.82839837 3.12407996
71 -1.45789160 0.82839837
72 -4.55423805 -1.45789160
73 -5.05339966 -4.55423805
74 2.27916532 -5.05339966
75 -6.55610283 2.27916532
76 0.40317998 -6.55610283
77 -0.44709243 0.40317998
78 0.66760356 -0.44709243
79 0.49210508 0.66760356
80 -3.71118567 0.49210508
81 0.58864126 -3.71118567
82 1.81603698 0.58864126
83 -0.58905842 1.81603698
84 -4.00396158 -0.58905842
85 -0.35380198 -4.00396158
86 -5.15401141 -0.35380198
87 3.37210690 -5.15401141
88 3.28649410 3.37210690
89 -2.63975618 3.28649410
90 2.00325554 -2.63975618
91 -1.08972413 2.00325554
92 1.29401308 -1.08972413
93 1.58874324 1.29401308
94 -5.81838697 1.58874324
95 -3.20547359 -5.81838697
96 -0.53242428 -3.20547359
97 -3.78588578 -0.53242428
98 -6.18935552 -3.78588578
99 0.32749949 -6.18935552
100 -1.10953107 0.32749949
101 3.32647626 -1.10953107
102 -1.11404697 3.32647626
103 -1.80599429 -1.11404697
104 7.86861226 -1.80599429
105 2.27617907 7.86861226
106 4.70763719 2.27617907
107 -1.99260334 4.70763719
108 3.07687505 -1.99260334
109 1.10548486 3.07687505
110 -3.42868386 1.10548486
111 -0.21194678 -3.42868386
112 -0.10001901 -0.21194678
113 1.61971345 -0.10001901
114 0.12981051 1.61971345
115 0.52152490 0.12981051
116 3.55969056 0.52152490
117 -5.18691358 3.55969056
118 1.43519815 -5.18691358
119 -3.46814869 1.43519815
120 -1.58937725 -3.46814869
121 -1.86703652 -1.58937725
122 2.81888523 -1.86703652
123 -3.38905147 2.81888523
124 1.81813431 -3.38905147
125 0.07955526 1.81813431
126 -3.24289649 0.07955526
127 0.02895991 -3.24289649
128 -0.41809944 0.02895991
129 -2.06092007 -0.41809944
130 1.98249954 -2.06092007
131 -2.00933740 1.98249954
132 -0.50491604 -2.00933740
133 2.06513729 -0.50491604
134 1.02366126 2.06513729
135 -2.99919852 1.02366126
136 0.86743503 -2.99919852
137 0.32280413 0.86743503
138 1.31452927 0.32280413
139 -0.11961120 1.31452927
140 5.00068854 -0.11961120
141 -3.72722004 5.00068854
142 -0.29882987 -3.72722004
143 4.27380084 -0.29882987
144 4.17143456 4.27380084
145 2.02528944 4.17143456
146 2.43080614 2.02528944
147 -0.76005507 2.43080614
148 2.19046941 -0.76005507
149 3.60903344 2.19046941
150 7.51117493 3.60903344
151 -0.47679019 7.51117493
152 7.41852496 -0.47679019
153 2.41716567 7.41852496
154 1.64268867 2.41716567
155 2.77991665 1.64268867
156 NA 2.77991665
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.50401491 -0.60569168
[2,] -2.96476841 -0.50401491
[3,] 0.68494875 -2.96476841
[4,] -3.83827340 0.68494875
[5,] 4.84634117 -3.83827340
[6,] 0.77206442 4.84634117
[7,] -1.79327359 0.77206442
[8,] 0.43916809 -1.79327359
[9,] -0.47244286 0.43916809
[10,] -1.61357318 -0.47244286
[11,] 2.09605098 -1.61357318
[12,] 0.34387322 2.09605098
[13,] -1.61019127 0.34387322
[14,] -0.90785411 -1.61019127
[15,] -2.41678895 -0.90785411
[16,] 1.11865517 -2.41678895
[17,] 1.29940291 1.11865517
[18,] 4.20258052 1.29940291
[19,] -1.72503141 4.20258052
[20,] 2.35646719 -1.72503141
[21,] -2.76178124 2.35646719
[22,] -4.46460134 -2.76178124
[23,] 0.29272545 -4.46460134
[24,] -2.91102472 0.29272545
[25,] 2.32136170 -2.91102472
[26,] 0.25178858 2.32136170
[27,] -1.43863473 0.25178858
[28,] 6.65845772 -1.43863473
[29,] 0.29788426 6.65845772
[30,] -2.91417176 0.29788426
[31,] -0.97112902 -2.91417176
[32,] -0.74177332 -0.97112902
[33,] -2.89175038 -0.74177332
[34,] 2.90420405 -2.89175038
[35,] -2.99235823 2.90420405
[36,] 0.19455067 -2.99235823
[37,] -2.76047816 0.19455067
[38,] 2.17745106 -2.76047816
[39,] -4.65426926 2.17745106
[40,] -0.71230427 -4.65426926
[41,] 0.27912682 -0.71230427
[42,] 2.39550497 0.27912682
[43,] -1.72735431 2.39550497
[44,] -0.95981358 -1.72735431
[45,] -0.20276610 -0.95981358
[46,] 1.31252259 -0.20276610
[47,] 0.64569509 1.31252259
[48,] -5.18346853 0.64569509
[49,] -0.72826520 -5.18346853
[50,] 3.15853122 -0.72826520
[51,] 1.67318238 3.15853122
[52,] 5.26379367 1.67318238
[53,] 4.49435909 5.26379367
[54,] 0.85596788 4.49435909
[55,] -2.59824737 0.85596788
[56,] 1.81655095 -2.59824737
[57,] -1.50884493 1.81655095
[58,] 0.51136645 -1.50884493
[59,] -1.23293283 0.51136645
[60,] -0.63841519 -1.23293283
[61,] -2.09990505 -0.63841519
[62,] -0.07585358 -2.09990505
[63,] -4.76391420 -0.07585358
[64,] 3.12899218 -4.76391420
[65,] 0.16374773 3.12899218
[66,] -0.35602216 0.16374773
[67,] -0.43169036 -0.35602216
[68,] -0.25178571 -0.43169036
[69,] 3.12407996 -0.25178571
[70,] 0.82839837 3.12407996
[71,] -1.45789160 0.82839837
[72,] -4.55423805 -1.45789160
[73,] -5.05339966 -4.55423805
[74,] 2.27916532 -5.05339966
[75,] -6.55610283 2.27916532
[76,] 0.40317998 -6.55610283
[77,] -0.44709243 0.40317998
[78,] 0.66760356 -0.44709243
[79,] 0.49210508 0.66760356
[80,] -3.71118567 0.49210508
[81,] 0.58864126 -3.71118567
[82,] 1.81603698 0.58864126
[83,] -0.58905842 1.81603698
[84,] -4.00396158 -0.58905842
[85,] -0.35380198 -4.00396158
[86,] -5.15401141 -0.35380198
[87,] 3.37210690 -5.15401141
[88,] 3.28649410 3.37210690
[89,] -2.63975618 3.28649410
[90,] 2.00325554 -2.63975618
[91,] -1.08972413 2.00325554
[92,] 1.29401308 -1.08972413
[93,] 1.58874324 1.29401308
[94,] -5.81838697 1.58874324
[95,] -3.20547359 -5.81838697
[96,] -0.53242428 -3.20547359
[97,] -3.78588578 -0.53242428
[98,] -6.18935552 -3.78588578
[99,] 0.32749949 -6.18935552
[100,] -1.10953107 0.32749949
[101,] 3.32647626 -1.10953107
[102,] -1.11404697 3.32647626
[103,] -1.80599429 -1.11404697
[104,] 7.86861226 -1.80599429
[105,] 2.27617907 7.86861226
[106,] 4.70763719 2.27617907
[107,] -1.99260334 4.70763719
[108,] 3.07687505 -1.99260334
[109,] 1.10548486 3.07687505
[110,] -3.42868386 1.10548486
[111,] -0.21194678 -3.42868386
[112,] -0.10001901 -0.21194678
[113,] 1.61971345 -0.10001901
[114,] 0.12981051 1.61971345
[115,] 0.52152490 0.12981051
[116,] 3.55969056 0.52152490
[117,] -5.18691358 3.55969056
[118,] 1.43519815 -5.18691358
[119,] -3.46814869 1.43519815
[120,] -1.58937725 -3.46814869
[121,] -1.86703652 -1.58937725
[122,] 2.81888523 -1.86703652
[123,] -3.38905147 2.81888523
[124,] 1.81813431 -3.38905147
[125,] 0.07955526 1.81813431
[126,] -3.24289649 0.07955526
[127,] 0.02895991 -3.24289649
[128,] -0.41809944 0.02895991
[129,] -2.06092007 -0.41809944
[130,] 1.98249954 -2.06092007
[131,] -2.00933740 1.98249954
[132,] -0.50491604 -2.00933740
[133,] 2.06513729 -0.50491604
[134,] 1.02366126 2.06513729
[135,] -2.99919852 1.02366126
[136,] 0.86743503 -2.99919852
[137,] 0.32280413 0.86743503
[138,] 1.31452927 0.32280413
[139,] -0.11961120 1.31452927
[140,] 5.00068854 -0.11961120
[141,] -3.72722004 5.00068854
[142,] -0.29882987 -3.72722004
[143,] 4.27380084 -0.29882987
[144,] 4.17143456 4.27380084
[145,] 2.02528944 4.17143456
[146,] 2.43080614 2.02528944
[147,] -0.76005507 2.43080614
[148,] 2.19046941 -0.76005507
[149,] 3.60903344 2.19046941
[150,] 7.51117493 3.60903344
[151,] -0.47679019 7.51117493
[152,] 7.41852496 -0.47679019
[153,] 2.41716567 7.41852496
[154,] 1.64268867 2.41716567
[155,] 2.77991665 1.64268867
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.50401491 -0.60569168
2 -2.96476841 -0.50401491
3 0.68494875 -2.96476841
4 -3.83827340 0.68494875
5 4.84634117 -3.83827340
6 0.77206442 4.84634117
7 -1.79327359 0.77206442
8 0.43916809 -1.79327359
9 -0.47244286 0.43916809
10 -1.61357318 -0.47244286
11 2.09605098 -1.61357318
12 0.34387322 2.09605098
13 -1.61019127 0.34387322
14 -0.90785411 -1.61019127
15 -2.41678895 -0.90785411
16 1.11865517 -2.41678895
17 1.29940291 1.11865517
18 4.20258052 1.29940291
19 -1.72503141 4.20258052
20 2.35646719 -1.72503141
21 -2.76178124 2.35646719
22 -4.46460134 -2.76178124
23 0.29272545 -4.46460134
24 -2.91102472 0.29272545
25 2.32136170 -2.91102472
26 0.25178858 2.32136170
27 -1.43863473 0.25178858
28 6.65845772 -1.43863473
29 0.29788426 6.65845772
30 -2.91417176 0.29788426
31 -0.97112902 -2.91417176
32 -0.74177332 -0.97112902
33 -2.89175038 -0.74177332
34 2.90420405 -2.89175038
35 -2.99235823 2.90420405
36 0.19455067 -2.99235823
37 -2.76047816 0.19455067
38 2.17745106 -2.76047816
39 -4.65426926 2.17745106
40 -0.71230427 -4.65426926
41 0.27912682 -0.71230427
42 2.39550497 0.27912682
43 -1.72735431 2.39550497
44 -0.95981358 -1.72735431
45 -0.20276610 -0.95981358
46 1.31252259 -0.20276610
47 0.64569509 1.31252259
48 -5.18346853 0.64569509
49 -0.72826520 -5.18346853
50 3.15853122 -0.72826520
51 1.67318238 3.15853122
52 5.26379367 1.67318238
53 4.49435909 5.26379367
54 0.85596788 4.49435909
55 -2.59824737 0.85596788
56 1.81655095 -2.59824737
57 -1.50884493 1.81655095
58 0.51136645 -1.50884493
59 -1.23293283 0.51136645
60 -0.63841519 -1.23293283
61 -2.09990505 -0.63841519
62 -0.07585358 -2.09990505
63 -4.76391420 -0.07585358
64 3.12899218 -4.76391420
65 0.16374773 3.12899218
66 -0.35602216 0.16374773
67 -0.43169036 -0.35602216
68 -0.25178571 -0.43169036
69 3.12407996 -0.25178571
70 0.82839837 3.12407996
71 -1.45789160 0.82839837
72 -4.55423805 -1.45789160
73 -5.05339966 -4.55423805
74 2.27916532 -5.05339966
75 -6.55610283 2.27916532
76 0.40317998 -6.55610283
77 -0.44709243 0.40317998
78 0.66760356 -0.44709243
79 0.49210508 0.66760356
80 -3.71118567 0.49210508
81 0.58864126 -3.71118567
82 1.81603698 0.58864126
83 -0.58905842 1.81603698
84 -4.00396158 -0.58905842
85 -0.35380198 -4.00396158
86 -5.15401141 -0.35380198
87 3.37210690 -5.15401141
88 3.28649410 3.37210690
89 -2.63975618 3.28649410
90 2.00325554 -2.63975618
91 -1.08972413 2.00325554
92 1.29401308 -1.08972413
93 1.58874324 1.29401308
94 -5.81838697 1.58874324
95 -3.20547359 -5.81838697
96 -0.53242428 -3.20547359
97 -3.78588578 -0.53242428
98 -6.18935552 -3.78588578
99 0.32749949 -6.18935552
100 -1.10953107 0.32749949
101 3.32647626 -1.10953107
102 -1.11404697 3.32647626
103 -1.80599429 -1.11404697
104 7.86861226 -1.80599429
105 2.27617907 7.86861226
106 4.70763719 2.27617907
107 -1.99260334 4.70763719
108 3.07687505 -1.99260334
109 1.10548486 3.07687505
110 -3.42868386 1.10548486
111 -0.21194678 -3.42868386
112 -0.10001901 -0.21194678
113 1.61971345 -0.10001901
114 0.12981051 1.61971345
115 0.52152490 0.12981051
116 3.55969056 0.52152490
117 -5.18691358 3.55969056
118 1.43519815 -5.18691358
119 -3.46814869 1.43519815
120 -1.58937725 -3.46814869
121 -1.86703652 -1.58937725
122 2.81888523 -1.86703652
123 -3.38905147 2.81888523
124 1.81813431 -3.38905147
125 0.07955526 1.81813431
126 -3.24289649 0.07955526
127 0.02895991 -3.24289649
128 -0.41809944 0.02895991
129 -2.06092007 -0.41809944
130 1.98249954 -2.06092007
131 -2.00933740 1.98249954
132 -0.50491604 -2.00933740
133 2.06513729 -0.50491604
134 1.02366126 2.06513729
135 -2.99919852 1.02366126
136 0.86743503 -2.99919852
137 0.32280413 0.86743503
138 1.31452927 0.32280413
139 -0.11961120 1.31452927
140 5.00068854 -0.11961120
141 -3.72722004 5.00068854
142 -0.29882987 -3.72722004
143 4.27380084 -0.29882987
144 4.17143456 4.27380084
145 2.02528944 4.17143456
146 2.43080614 2.02528944
147 -0.76005507 2.43080614
148 2.19046941 -0.76005507
149 3.60903344 2.19046941
150 7.51117493 3.60903344
151 -0.47679019 7.51117493
152 7.41852496 -0.47679019
153 2.41716567 7.41852496
154 1.64268867 2.41716567
155 2.77991665 1.64268867
> 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/html/rcomp/tmp/7xvhx1292956041.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/html/rcomp/tmp/8iejv1292956042.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/html/rcomp/tmp/9iejv1292956042.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/html/rcomp/tmp/10bn0y1292956042.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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/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/html/rcomp/tmp/11w6h41292956042.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/html/rcomp/tmp/12h6xs1292956042.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/html/rcomp/tmp/13dydi1292956042.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/html/rcomp/tmp/14hyb61292956042.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/html/rcomp/tmp/1598b91292956042.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/html/rcomp/tmp/16o0801292956042.tab")
+ }
>
> try(system("convert tmp/1bu1r1292956041.ps tmp/1bu1r1292956041.png",intern=TRUE))
character(0)
> try(system("convert tmp/2bu1r1292956041.ps tmp/2bu1r1292956041.png",intern=TRUE))
character(0)
> try(system("convert tmp/3bu1r1292956041.ps tmp/3bu1r1292956041.png",intern=TRUE))
character(0)
> try(system("convert tmp/44l0c1292956041.ps tmp/44l0c1292956041.png",intern=TRUE))
character(0)
> try(system("convert tmp/54l0c1292956041.ps tmp/54l0c1292956041.png",intern=TRUE))
character(0)
> try(system("convert tmp/64l0c1292956041.ps tmp/64l0c1292956041.png",intern=TRUE))
character(0)
> try(system("convert tmp/7xvhx1292956041.ps tmp/7xvhx1292956041.png",intern=TRUE))
character(0)
> try(system("convert tmp/8iejv1292956042.ps tmp/8iejv1292956042.png",intern=TRUE))
character(0)
> try(system("convert tmp/9iejv1292956042.ps tmp/9iejv1292956042.png",intern=TRUE))
character(0)
> try(system("convert tmp/10bn0y1292956042.ps tmp/10bn0y1292956042.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.496 1.830 12.331