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(24
+ ,14
+ ,11
+ ,12
+ ,24
+ ,26
+ ,1
+ ,25
+ ,11
+ ,7
+ ,8
+ ,25
+ ,23
+ ,1
+ ,17
+ ,6
+ ,17
+ ,8
+ ,30
+ ,25
+ ,1
+ ,18
+ ,12
+ ,10
+ ,8
+ ,19
+ ,23
+ ,2
+ ,18
+ ,8
+ ,12
+ ,9
+ ,22
+ ,19
+ ,2
+ ,16
+ ,10
+ ,12
+ ,7
+ ,22
+ ,29
+ ,3
+ ,20
+ ,10
+ ,11
+ ,4
+ ,25
+ ,25
+ ,4
+ ,16
+ ,11
+ ,11
+ ,11
+ ,23
+ ,21
+ ,5
+ ,18
+ ,16
+ ,12
+ ,7
+ ,17
+ ,22
+ ,5
+ ,17
+ ,11
+ ,13
+ ,7
+ ,21
+ ,25
+ ,6
+ ,23
+ ,13
+ ,14
+ ,12
+ ,19
+ ,24
+ ,6
+ ,30
+ ,12
+ ,16
+ ,10
+ ,19
+ ,18
+ ,7
+ ,23
+ ,8
+ ,11
+ ,10
+ ,15
+ ,22
+ ,7
+ ,18
+ ,12
+ ,10
+ ,8
+ ,16
+ ,15
+ ,7
+ ,15
+ ,11
+ ,11
+ ,8
+ ,23
+ ,22
+ ,8
+ ,12
+ ,4
+ ,15
+ ,4
+ ,27
+ ,28
+ ,9
+ ,21
+ ,9
+ ,9
+ ,9
+ ,22
+ ,20
+ ,9
+ ,15
+ ,8
+ ,11
+ ,8
+ ,14
+ ,12
+ ,10
+ ,20
+ ,8
+ ,17
+ ,7
+ ,22
+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23
+ ,14
+ ,19
+ ,30
+ ,12
+ ,15
+ ,10
+ ,29
+ ,22
+ ,19
+ ,24
+ ,14
+ ,24
+ ,20
+ ,21
+ ,10
+ ,19
+ ,21
+ ,15
+ ,7
+ ,5
+ ,21
+ ,24
+ ,19
+ ,21
+ ,13
+ ,17
+ ,11
+ ,23
+ ,22
+ ,19
+ ,29
+ ,16
+ ,11
+ ,6
+ ,27
+ ,24
+ ,19
+ ,31
+ ,9
+ ,17
+ ,9
+ ,25
+ ,19
+ ,19
+ ,20
+ ,9
+ ,11
+ ,7
+ ,21
+ ,20
+ ,19
+ ,16
+ ,9
+ ,12
+ ,9
+ ,10
+ ,13
+ ,19
+ ,22
+ ,8
+ ,14
+ ,10
+ ,20
+ ,20
+ ,19
+ ,20
+ ,7
+ ,11
+ ,9
+ ,26
+ ,22
+ ,19
+ ,28
+ ,16
+ ,16
+ ,8
+ ,24
+ ,24
+ ,19
+ ,38
+ ,11
+ ,21
+ ,7
+ ,29
+ ,29
+ ,19
+ ,22
+ ,9
+ ,14
+ ,6
+ ,19
+ ,12
+ ,20
+ ,20
+ ,11
+ ,20
+ ,13
+ ,24
+ ,20
+ ,20
+ ,17
+ ,9
+ ,13
+ ,6
+ ,19
+ ,21
+ ,20
+ ,28
+ ,14
+ ,11
+ ,8
+ ,24
+ ,24
+ ,20
+ ,22
+ ,13
+ ,15
+ ,10
+ ,22
+ ,22
+ ,21
+ ,31
+ ,16
+ ,19
+ ,16
+ ,17
+ ,20
+ ,22)
+ ,dim=c(7
+ ,159)
+ ,dimnames=list(c('ConcernoverMistakes'
+ ,'Doubtsaboutactions'
+ ,'ParentalExpectations'
+ ,'ParentalCriticism'
+ ,'PersonalStandards'
+ ,'Organization'
+ ,'Date')
+ ,1:159))
> y <- array(NA,dim=c(7,159),dimnames=list(c('ConcernoverMistakes','Doubtsaboutactions','ParentalExpectations','ParentalCriticism','PersonalStandards','Organization','Date'),1:159))
> 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 = '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
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
ConcernoverMistakes Doubtsaboutactions ParentalExpectations
1 24 14 11
2 25 11 7
3 17 6 17
4 18 12 10
5 18 8 12
6 16 10 12
7 20 10 11
8 16 11 11
9 18 16 12
10 17 11 13
11 23 13 14
12 30 12 16
13 23 8 11
14 18 12 10
15 15 11 11
16 12 4 15
17 21 9 9
18 15 8 11
19 20 8 17
20 31 14 17
21 27 15 11
22 34 16 18
23 21 9 14
24 31 14 10
25 19 11 11
26 16 8 15
27 20 9 15
28 21 9 13
29 22 9 16
30 17 9 13
31 24 10 9
32 25 16 18
33 26 11 18
34 25 8 12
35 17 9 17
36 32 16 9
37 33 11 9
38 13 16 12
39 32 12 18
40 25 12 12
41 29 14 18
42 22 9 14
43 18 10 15
44 17 9 16
45 20 10 10
46 15 12 11
47 20 14 14
48 33 14 9
49 29 10 12
50 23 14 17
51 26 16 5
52 18 9 12
53 20 10 12
54 11 6 6
55 28 8 24
56 26 13 12
57 22 10 12
58 17 8 14
59 12 7 7
60 14 15 13
61 17 9 12
62 21 10 13
63 19 12 14
64 18 13 8
65 10 10 11
66 29 11 9
67 31 8 11
68 19 9 13
69 9 13 10
70 20 11 11
71 28 8 12
72 19 9 9
73 30 9 15
74 29 15 18
75 26 9 15
76 23 10 12
77 13 14 13
78 21 12 14
79 19 12 10
80 28 11 13
81 23 14 13
82 18 6 11
83 21 12 13
84 20 8 16
85 23 14 8
86 21 11 16
87 21 10 11
88 15 14 9
89 28 12 16
90 19 10 12
91 26 14 14
92 10 5 8
93 16 11 9
94 22 10 15
95 19 9 11
96 31 10 21
97 31 16 14
98 29 13 18
99 19 9 12
100 22 10 13
101 23 10 15
102 15 7 12
103 20 9 19
104 18 8 15
105 23 14 11
106 25 14 11
107 21 8 10
108 24 9 13
109 25 14 15
110 17 14 12
111 13 8 12
112 28 8 16
113 21 8 9
114 25 7 18
115 9 6 8
116 16 8 13
117 19 6 17
118 17 11 9
119 25 14 15
120 20 11 8
121 29 11 7
122 14 11 12
123 22 14 14
124 15 8 6
125 19 20 8
126 20 11 17
127 15 8 10
128 20 11 11
129 18 10 14
130 33 14 11
131 22 11 13
132 16 9 12
133 17 9 11
134 16 8 9
135 21 10 12
136 26 13 20
137 18 13 12
138 18 12 13
139 17 8 12
140 22 13 12
141 30 14 9
142 30 12 15
143 24 14 24
144 21 15 7
145 21 13 17
146 29 16 11
147 31 9 17
148 20 9 11
149 16 9 12
150 22 8 14
151 20 7 11
152 28 16 16
153 38 11 21
154 22 9 14
155 20 11 20
156 17 9 13
157 28 14 11
158 22 13 15
159 31 16 19
ParentalCriticism PersonalStandards Organization Date
1 12 24 26 1
2 8 25 23 1
3 8 30 25 1
4 8 19 23 2
5 9 22 19 2
6 7 22 29 3
7 4 25 25 4
8 11 23 21 5
9 7 17 22 5
10 7 21 25 6
11 12 19 24 6
12 10 19 18 7
13 10 15 22 7
14 8 16 15 7
15 8 23 22 8
16 4 27 28 9
17 9 22 20 9
18 8 14 12 10
19 7 22 24 10
20 11 23 20 11
21 9 23 21 12
22 11 21 20 13
23 13 19 21 13
24 8 18 23 13
25 8 20 28 13
26 9 23 24 13
27 6 25 24 13
28 9 19 24 13
29 9 24 23 13
30 6 22 23 13
31 6 25 29 13
32 16 26 24 13
33 5 29 18 13
34 7 32 25 13
35 9 25 21 13
36 6 29 26 13
37 6 28 22 13
38 5 17 22 13
39 12 28 22 13
40 7 29 23 13
41 10 26 30 13
42 9 25 23 13
43 8 14 17 13
44 5 25 23 13
45 8 26 23 14
46 8 20 25 14
47 10 18 24 14
48 6 32 24 14
49 8 25 23 14
50 7 25 21 14
51 4 23 24 14
52 8 21 24 14
53 8 20 28 14
54 4 15 16 14
55 20 30 20 14
56 8 24 29 14
57 8 26 27 15
58 6 24 22 15
59 4 22 28 15
60 8 14 16 15
61 9 24 25 15
62 6 24 24 15
63 7 24 28 15
64 9 24 24 15
65 5 19 23 15
66 5 31 30 15
67 8 22 24 15
68 8 27 21 15
69 6 19 25 15
70 8 25 25 15
71 7 20 22 15
72 7 21 23 15
73 9 27 26 15
74 11 23 23 15
75 6 25 25 15
76 8 20 21 16
77 6 21 25 16
78 9 22 24 16
79 8 23 29 16
80 6 25 22 16
81 10 25 27 16
82 8 17 26 16
83 8 19 22 16
84 10 25 24 16
85 5 19 27 17
86 7 20 24 17
87 5 26 24 17
88 8 23 29 17
89 14 27 22 17
90 7 17 21 17
91 8 17 24 17
92 6 19 24 17
93 5 17 23 17
94 6 22 20 17
95 10 21 27 17
96 12 32 26 17
97 9 21 25 17
98 12 21 21 17
99 7 18 21 18
100 8 18 19 18
101 10 23 21 18
102 6 19 21 18
103 10 20 16 18
104 10 21 22 18
105 10 20 29 18
106 5 17 15 18
107 7 18 17 18
108 10 19 15 18
109 11 22 21 18
110 6 15 21 18
111 7 14 19 18
112 12 18 24 18
113 11 24 20 18
114 11 35 17 18
115 11 29 23 18
116 5 21 24 18
117 8 25 14 18
118 6 20 19 18
119 9 22 24 18
120 4 13 13 18
121 4 26 22 18
122 7 17 16 18
123 11 25 19 18
124 6 20 25 18
125 7 19 25 18
126 8 21 23 19
127 4 22 24 19
128 8 24 26 19
129 9 21 26 19
130 8 26 25 19
131 11 24 18 19
132 8 16 21 19
133 5 23 26 19
134 4 18 23 19
135 8 16 23 19
136 10 26 22 19
137 6 19 20 19
138 9 21 13 19
139 9 21 24 19
140 13 22 15 19
141 9 23 14 19
142 10 29 22 19
143 20 21 10 19
144 5 21 24 19
145 11 23 22 19
146 6 27 24 19
147 9 25 19 19
148 7 21 20 19
149 9 10 13 19
150 10 20 20 19
151 9 26 22 19
152 8 24 24 19
153 7 29 29 19
154 6 19 12 20
155 13 24 20 20
156 6 19 21 20
157 8 24 24 20
158 10 22 22 21
159 16 17 20 22
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Doubtsaboutactions ParentalExpectations
-3.51983 0.80220 0.23777
ParentalCriticism PersonalStandards Organization
0.19980 0.57005 -0.10119
Date
0.08625
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-12.1499 -2.6566 -0.3367 2.7830 12.4821
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -3.51983 3.40162 -1.035 0.3024
Doubtsaboutactions 0.80220 0.13053 6.145 6.69e-09 ***
ParentalExpectations 0.23777 0.13337 1.783 0.0766 .
ParentalCriticism 0.19980 0.16858 1.185 0.2378
PersonalStandards 0.57005 0.09587 5.946 1.81e-08 ***
Organization -0.10119 0.10396 -0.973 0.3319
Date 0.08625 0.08364 1.031 0.3041
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 4.477 on 152 degrees of freedom
Multiple R-squared: 0.4113, Adjusted R-squared: 0.3881
F-statistic: 17.7 on 6 and 152 DF, p-value: 1.715e-15
> 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.10487586 0.20975172 0.89512414
[2,] 0.34940967 0.69881934 0.65059033
[3,] 0.74941077 0.50117846 0.25058923
[4,] 0.74369832 0.51260337 0.25630168
[5,] 0.72235187 0.55529625 0.27764813
[6,] 0.70862426 0.58275149 0.29137574
[7,] 0.62910412 0.74179176 0.37089588
[8,] 0.56306484 0.87387032 0.43693516
[9,] 0.52916762 0.94166476 0.47083238
[10,] 0.47060424 0.94120848 0.52939576
[11,] 0.49825709 0.99651419 0.50174291
[12,] 0.43030654 0.86061308 0.56969346
[13,] 0.41445450 0.82890900 0.58554550
[14,] 0.37357073 0.74714146 0.62642927
[15,] 0.53481844 0.93036311 0.46518156
[16,] 0.48598024 0.97196048 0.51401976
[17,] 0.49437583 0.98875166 0.50562417
[18,] 0.42665348 0.85330696 0.57334652
[19,] 0.36984867 0.73969734 0.63015133
[20,] 0.30762128 0.61524257 0.69237872
[21,] 0.26379887 0.52759774 0.73620113
[22,] 0.26356208 0.52712415 0.73643792
[23,] 0.36473770 0.72947540 0.63526230
[24,] 0.31326531 0.62653063 0.68673469
[25,] 0.28622568 0.57245136 0.71377432
[26,] 0.31297166 0.62594333 0.68702834
[27,] 0.28340970 0.56681940 0.71659030
[28,] 0.40716372 0.81432743 0.59283628
[29,] 0.67886057 0.64227885 0.32113943
[30,] 0.67005227 0.65989546 0.32994773
[31,] 0.62830621 0.74338758 0.37169379
[32,] 0.59794631 0.80410738 0.40205369
[33,] 0.54518742 0.90962517 0.45481258
[34,] 0.49234704 0.98469408 0.50765296
[35,] 0.47585692 0.95171385 0.52414308
[36,] 0.46588327 0.93176654 0.53411673
[37,] 0.51931181 0.96137638 0.48068819
[38,] 0.48511708 0.97023417 0.51488292
[39,] 0.46963901 0.93927802 0.53036099
[40,] 0.51907688 0.96184624 0.48092312
[41,] 0.49413121 0.98826243 0.50586879
[42,] 0.46193617 0.92387233 0.53806383
[43,] 0.41593350 0.83186701 0.58406650
[44,] 0.37157991 0.74315983 0.62842009
[45,] 0.33536147 0.67072294 0.66463853
[46,] 0.29952035 0.59904069 0.70047965
[47,] 0.27132778 0.54265556 0.72867222
[48,] 0.23334898 0.46669796 0.76665102
[49,] 0.21296342 0.42592684 0.78703658
[50,] 0.20240881 0.40481763 0.79759119
[51,] 0.26746677 0.53493354 0.73253323
[52,] 0.26332306 0.52664612 0.73667694
[53,] 0.22577801 0.45155603 0.77422199
[54,] 0.21541849 0.43083699 0.78458151
[55,] 0.25942155 0.51884309 0.74057845
[56,] 0.34338744 0.68677487 0.65661256
[57,] 0.34135776 0.68271551 0.65864224
[58,] 0.65582653 0.68834694 0.34417347
[59,] 0.65257594 0.69484813 0.34742406
[60,] 0.84394177 0.31211647 0.15605823
[61,] 0.82756140 0.34487719 0.17243860
[62,] 0.92502374 0.14995252 0.07497626
[63,] 0.90732652 0.18534696 0.09267348
[64,] 0.93008457 0.13983086 0.06991543
[65,] 0.91670005 0.16659989 0.08329995
[66,] 0.91868059 0.16263882 0.08131941
[67,] 0.91166356 0.17667289 0.08833644
[68,] 0.96506552 0.06986895 0.03493448
[69,] 0.95680969 0.08638062 0.04319031
[70,] 0.94909569 0.10180863 0.05090431
[71,] 0.95118864 0.09762272 0.04881136
[72,] 0.94292777 0.11414446 0.05707223
[73,] 0.94134941 0.11730119 0.05865059
[74,] 0.92626780 0.14746440 0.07373220
[75,] 0.91222716 0.17554568 0.08777284
[76,] 0.90110056 0.19779887 0.09889944
[77,] 0.88235946 0.23528108 0.11764054
[78,] 0.85911252 0.28177496 0.14088748
[79,] 0.91243962 0.17512076 0.08756038
[80,] 0.89490619 0.21018762 0.10509381
[81,] 0.87253068 0.25493863 0.12746932
[82,] 0.87184138 0.25631725 0.12815862
[83,] 0.86248332 0.27503336 0.13751668
[84,] 0.83949110 0.32101781 0.16050890
[85,] 0.80969276 0.38061448 0.19030724
[86,] 0.77521896 0.44956209 0.22478104
[87,] 0.74290856 0.51418287 0.25709144
[88,] 0.76231926 0.47536147 0.23768074
[89,] 0.76331881 0.47336237 0.23668119
[90,] 0.72641851 0.54716298 0.27358149
[91,] 0.70165223 0.59669553 0.29834777
[92,] 0.66058565 0.67882871 0.33941435
[93,] 0.62091183 0.75817633 0.37908817
[94,] 0.58027210 0.83945581 0.41972790
[95,] 0.53755362 0.92489276 0.46244638
[96,] 0.49433997 0.98867994 0.50566003
[97,] 0.47520077 0.95040153 0.52479923
[98,] 0.47327038 0.94654075 0.52672962
[99,] 0.49539683 0.99079366 0.50460317
[100,] 0.45053388 0.90106776 0.54946612
[101,] 0.41667428 0.83334855 0.58332572
[102,] 0.37334142 0.74668283 0.62665858
[103,] 0.67400073 0.65199853 0.32599927
[104,] 0.69189880 0.61620241 0.30810120
[105,] 0.66624957 0.66750086 0.33375043
[106,] 0.83827972 0.32344056 0.16172028
[107,] 0.80908781 0.38182438 0.19091219
[108,] 0.78714792 0.42570416 0.21285208
[109,] 0.75529370 0.48941261 0.24470630
[110,] 0.72036893 0.55926215 0.27963107
[111,] 0.75337066 0.49325868 0.24662934
[112,] 0.81287924 0.37424151 0.18712076
[113,] 0.79518862 0.40962276 0.20481138
[114,] 0.77847218 0.44305564 0.22152782
[115,] 0.73250510 0.53498981 0.26749490
[116,] 0.73605452 0.52789097 0.26394548
[117,] 0.70197486 0.59605029 0.29802514
[118,] 0.69545540 0.60908920 0.30454460
[119,] 0.65874522 0.68250957 0.34125478
[120,] 0.62522649 0.74954702 0.37477351
[121,] 0.70130149 0.59739701 0.29869851
[122,] 0.64544358 0.70911284 0.35455642
[123,] 0.58019535 0.83960930 0.41980465
[124,] 0.57769863 0.84460273 0.42230137
[125,] 0.51492843 0.97014314 0.48507157
[126,] 0.48948297 0.97896595 0.51051703
[127,] 0.45026806 0.90053613 0.54973194
[128,] 0.43975296 0.87950593 0.56024704
[129,] 0.48019211 0.96038422 0.51980789
[130,] 0.40755838 0.81511676 0.59244162
[131,] 0.33340890 0.66681780 0.66659110
[132,] 0.43424779 0.86849558 0.56575221
[133,] 0.37846579 0.75693157 0.62153421
[134,] 0.30427919 0.60855839 0.69572081
[135,] 0.22844129 0.45688258 0.77155871
[136,] 0.28043860 0.56087719 0.71956140
[137,] 0.19420230 0.38840461 0.80579770
[138,] 0.24094724 0.48189449 0.75905276
[139,] 0.14914697 0.29829393 0.85085303
[140,] 0.07972755 0.15945509 0.92027245
> postscript(file="/var/www/html/rcomp/tmp/1m5fk1290547414.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/html/rcomp/tmp/2m5fk1290547414.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/html/rcomp/tmp/3m5fk1290547414.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/html/rcomp/tmp/4eee51290547414.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/html/rcomp/tmp/5eee51290547414.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 = 159
Frequency = 1
1 2 3 4 5 6
0.13943187 4.42269450 -4.59192521 -0.75876595 -0.34022617 -2.61939309
7 8 9 10 11 12
0.01663588 -5.53505278 -3.46311701 -2.75279699 1.44495374 8.47783620
13 14 15 16 17 18
8.56042333 -0.28934364 -6.09320468 -5.38905077 2.06835948 0.25946443
19 20 21 22 23 24
0.68647881 5.01306551 2.05204379 7.13851005 1.54665071 10.25818634
25 26 27 28 29 30
-0.20716472 -4.06636432 -1.40925906 2.88718300 0.22243193 -2.32475315
31 32 33 34 35 36
3.72111360 -5.30598873 -0.41448585 1.01729293 -5.78776369 4.32418400
37 38 39 40 41 42
9.50046110 -8.75348617 4.35951785 -0.68371280 2.10432213 0.12792670
43 44 45 46 47 48
0.95118225 -4.54841838 -2.17967563 -5.39916683 -2.07756098 4.92980555
49 50 51 52 53 54
6.91482961 -3.48538564 2.80654934 -0.90159020 1.27101213 -0.65837144
55 56 57 58 59 60
-0.88545221 2.68541571 -0.33671812 -3.17410843 -3.56068779 -6.85792809
61 62 63 64 65 66
-3.79659772 -0.33835252 -3.97556676 -5.15547648 -7.91394775 4.62711592
67 68 69 70 71 72
12.48208141 -3.94946655 -11.08018673 -2.53346548 10.38183418 0.82409297
73 74 75 76 77 78
6.88112422 1.93167481 4.51943572 3.39021112 -9.82204342 -1.72606130
79 80 81 82 83 84
-2.63928757 5.00078281 -2.69906681 4.05284710 0.21928529 -1.90277362
85 86 87 88 89 90
2.82284403 0.05404207 -0.97559968 -8.09215170 0.66052768 1.21391342
91 92 93 94 95 96
4.63334987 -3.46076086 -1.27299168 0.74896215 -0.01859503 2.03015699
97 98 99 100 101 102
5.65014873 4.10149811 1.35981288 2.91767189 0.39465428 -1.40604666
103 104 105 106 107 108
-1.55002550 -1.75966950 0.65660689 3.94913686 4.23280437 4.34546994
109 110 111 112 113 114
-0.44387636 -2.74121419 -1.76016785 9.51548129 0.55464104 -3.35721895
115 116 117 118 119 120
-12.14988335 -2.08275223 -2.32091792 -2.67393407 0.25928417 4.34666255
121 122 123 124 125 126
7.08447358 -5.18046265 -5.11862675 -0.94691050 -6.67854618 -2.22725858
127 128 129 130 131 132
-2.82593161 -2.20721336 -2.60798593 7.14491532 -2.09165287 -0.78613396
133 134 135 136 137 138
-2.43337423 0.59085168 3.61404490 -1.89599944 -3.40665028 -5.29003464
139 140 141 142 143 144
-1.73042540 -3.02133238 5.01775168 2.38490780 -6.01127722 -1.35773109
145 146 147 148 149 150
-4.67233422 1.26888824 7.49238578 0.70000337 1.62486762 2.75953214
151 152 153 154 155 156
-0.74307976 0.39057649 11.06817824 2.43084390 -6.03952966 -1.42070118
157 158 159
3.09758131 -2.59943278 4.40572213
> postscript(file="/var/www/html/rcomp/tmp/6eee51290547414.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 = 159
Frequency = 1
lag(myerror, k = 1) myerror
0 0.13943187 NA
1 4.42269450 0.13943187
2 -4.59192521 4.42269450
3 -0.75876595 -4.59192521
4 -0.34022617 -0.75876595
5 -2.61939309 -0.34022617
6 0.01663588 -2.61939309
7 -5.53505278 0.01663588
8 -3.46311701 -5.53505278
9 -2.75279699 -3.46311701
10 1.44495374 -2.75279699
11 8.47783620 1.44495374
12 8.56042333 8.47783620
13 -0.28934364 8.56042333
14 -6.09320468 -0.28934364
15 -5.38905077 -6.09320468
16 2.06835948 -5.38905077
17 0.25946443 2.06835948
18 0.68647881 0.25946443
19 5.01306551 0.68647881
20 2.05204379 5.01306551
21 7.13851005 2.05204379
22 1.54665071 7.13851005
23 10.25818634 1.54665071
24 -0.20716472 10.25818634
25 -4.06636432 -0.20716472
26 -1.40925906 -4.06636432
27 2.88718300 -1.40925906
28 0.22243193 2.88718300
29 -2.32475315 0.22243193
30 3.72111360 -2.32475315
31 -5.30598873 3.72111360
32 -0.41448585 -5.30598873
33 1.01729293 -0.41448585
34 -5.78776369 1.01729293
35 4.32418400 -5.78776369
36 9.50046110 4.32418400
37 -8.75348617 9.50046110
38 4.35951785 -8.75348617
39 -0.68371280 4.35951785
40 2.10432213 -0.68371280
41 0.12792670 2.10432213
42 0.95118225 0.12792670
43 -4.54841838 0.95118225
44 -2.17967563 -4.54841838
45 -5.39916683 -2.17967563
46 -2.07756098 -5.39916683
47 4.92980555 -2.07756098
48 6.91482961 4.92980555
49 -3.48538564 6.91482961
50 2.80654934 -3.48538564
51 -0.90159020 2.80654934
52 1.27101213 -0.90159020
53 -0.65837144 1.27101213
54 -0.88545221 -0.65837144
55 2.68541571 -0.88545221
56 -0.33671812 2.68541571
57 -3.17410843 -0.33671812
58 -3.56068779 -3.17410843
59 -6.85792809 -3.56068779
60 -3.79659772 -6.85792809
61 -0.33835252 -3.79659772
62 -3.97556676 -0.33835252
63 -5.15547648 -3.97556676
64 -7.91394775 -5.15547648
65 4.62711592 -7.91394775
66 12.48208141 4.62711592
67 -3.94946655 12.48208141
68 -11.08018673 -3.94946655
69 -2.53346548 -11.08018673
70 10.38183418 -2.53346548
71 0.82409297 10.38183418
72 6.88112422 0.82409297
73 1.93167481 6.88112422
74 4.51943572 1.93167481
75 3.39021112 4.51943572
76 -9.82204342 3.39021112
77 -1.72606130 -9.82204342
78 -2.63928757 -1.72606130
79 5.00078281 -2.63928757
80 -2.69906681 5.00078281
81 4.05284710 -2.69906681
82 0.21928529 4.05284710
83 -1.90277362 0.21928529
84 2.82284403 -1.90277362
85 0.05404207 2.82284403
86 -0.97559968 0.05404207
87 -8.09215170 -0.97559968
88 0.66052768 -8.09215170
89 1.21391342 0.66052768
90 4.63334987 1.21391342
91 -3.46076086 4.63334987
92 -1.27299168 -3.46076086
93 0.74896215 -1.27299168
94 -0.01859503 0.74896215
95 2.03015699 -0.01859503
96 5.65014873 2.03015699
97 4.10149811 5.65014873
98 1.35981288 4.10149811
99 2.91767189 1.35981288
100 0.39465428 2.91767189
101 -1.40604666 0.39465428
102 -1.55002550 -1.40604666
103 -1.75966950 -1.55002550
104 0.65660689 -1.75966950
105 3.94913686 0.65660689
106 4.23280437 3.94913686
107 4.34546994 4.23280437
108 -0.44387636 4.34546994
109 -2.74121419 -0.44387636
110 -1.76016785 -2.74121419
111 9.51548129 -1.76016785
112 0.55464104 9.51548129
113 -3.35721895 0.55464104
114 -12.14988335 -3.35721895
115 -2.08275223 -12.14988335
116 -2.32091792 -2.08275223
117 -2.67393407 -2.32091792
118 0.25928417 -2.67393407
119 4.34666255 0.25928417
120 7.08447358 4.34666255
121 -5.18046265 7.08447358
122 -5.11862675 -5.18046265
123 -0.94691050 -5.11862675
124 -6.67854618 -0.94691050
125 -2.22725858 -6.67854618
126 -2.82593161 -2.22725858
127 -2.20721336 -2.82593161
128 -2.60798593 -2.20721336
129 7.14491532 -2.60798593
130 -2.09165287 7.14491532
131 -0.78613396 -2.09165287
132 -2.43337423 -0.78613396
133 0.59085168 -2.43337423
134 3.61404490 0.59085168
135 -1.89599944 3.61404490
136 -3.40665028 -1.89599944
137 -5.29003464 -3.40665028
138 -1.73042540 -5.29003464
139 -3.02133238 -1.73042540
140 5.01775168 -3.02133238
141 2.38490780 5.01775168
142 -6.01127722 2.38490780
143 -1.35773109 -6.01127722
144 -4.67233422 -1.35773109
145 1.26888824 -4.67233422
146 7.49238578 1.26888824
147 0.70000337 7.49238578
148 1.62486762 0.70000337
149 2.75953214 1.62486762
150 -0.74307976 2.75953214
151 0.39057649 -0.74307976
152 11.06817824 0.39057649
153 2.43084390 11.06817824
154 -6.03952966 2.43084390
155 -1.42070118 -6.03952966
156 3.09758131 -1.42070118
157 -2.59943278 3.09758131
158 4.40572213 -2.59943278
159 NA 4.40572213
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 4.42269450 0.13943187
[2,] -4.59192521 4.42269450
[3,] -0.75876595 -4.59192521
[4,] -0.34022617 -0.75876595
[5,] -2.61939309 -0.34022617
[6,] 0.01663588 -2.61939309
[7,] -5.53505278 0.01663588
[8,] -3.46311701 -5.53505278
[9,] -2.75279699 -3.46311701
[10,] 1.44495374 -2.75279699
[11,] 8.47783620 1.44495374
[12,] 8.56042333 8.47783620
[13,] -0.28934364 8.56042333
[14,] -6.09320468 -0.28934364
[15,] -5.38905077 -6.09320468
[16,] 2.06835948 -5.38905077
[17,] 0.25946443 2.06835948
[18,] 0.68647881 0.25946443
[19,] 5.01306551 0.68647881
[20,] 2.05204379 5.01306551
[21,] 7.13851005 2.05204379
[22,] 1.54665071 7.13851005
[23,] 10.25818634 1.54665071
[24,] -0.20716472 10.25818634
[25,] -4.06636432 -0.20716472
[26,] -1.40925906 -4.06636432
[27,] 2.88718300 -1.40925906
[28,] 0.22243193 2.88718300
[29,] -2.32475315 0.22243193
[30,] 3.72111360 -2.32475315
[31,] -5.30598873 3.72111360
[32,] -0.41448585 -5.30598873
[33,] 1.01729293 -0.41448585
[34,] -5.78776369 1.01729293
[35,] 4.32418400 -5.78776369
[36,] 9.50046110 4.32418400
[37,] -8.75348617 9.50046110
[38,] 4.35951785 -8.75348617
[39,] -0.68371280 4.35951785
[40,] 2.10432213 -0.68371280
[41,] 0.12792670 2.10432213
[42,] 0.95118225 0.12792670
[43,] -4.54841838 0.95118225
[44,] -2.17967563 -4.54841838
[45,] -5.39916683 -2.17967563
[46,] -2.07756098 -5.39916683
[47,] 4.92980555 -2.07756098
[48,] 6.91482961 4.92980555
[49,] -3.48538564 6.91482961
[50,] 2.80654934 -3.48538564
[51,] -0.90159020 2.80654934
[52,] 1.27101213 -0.90159020
[53,] -0.65837144 1.27101213
[54,] -0.88545221 -0.65837144
[55,] 2.68541571 -0.88545221
[56,] -0.33671812 2.68541571
[57,] -3.17410843 -0.33671812
[58,] -3.56068779 -3.17410843
[59,] -6.85792809 -3.56068779
[60,] -3.79659772 -6.85792809
[61,] -0.33835252 -3.79659772
[62,] -3.97556676 -0.33835252
[63,] -5.15547648 -3.97556676
[64,] -7.91394775 -5.15547648
[65,] 4.62711592 -7.91394775
[66,] 12.48208141 4.62711592
[67,] -3.94946655 12.48208141
[68,] -11.08018673 -3.94946655
[69,] -2.53346548 -11.08018673
[70,] 10.38183418 -2.53346548
[71,] 0.82409297 10.38183418
[72,] 6.88112422 0.82409297
[73,] 1.93167481 6.88112422
[74,] 4.51943572 1.93167481
[75,] 3.39021112 4.51943572
[76,] -9.82204342 3.39021112
[77,] -1.72606130 -9.82204342
[78,] -2.63928757 -1.72606130
[79,] 5.00078281 -2.63928757
[80,] -2.69906681 5.00078281
[81,] 4.05284710 -2.69906681
[82,] 0.21928529 4.05284710
[83,] -1.90277362 0.21928529
[84,] 2.82284403 -1.90277362
[85,] 0.05404207 2.82284403
[86,] -0.97559968 0.05404207
[87,] -8.09215170 -0.97559968
[88,] 0.66052768 -8.09215170
[89,] 1.21391342 0.66052768
[90,] 4.63334987 1.21391342
[91,] -3.46076086 4.63334987
[92,] -1.27299168 -3.46076086
[93,] 0.74896215 -1.27299168
[94,] -0.01859503 0.74896215
[95,] 2.03015699 -0.01859503
[96,] 5.65014873 2.03015699
[97,] 4.10149811 5.65014873
[98,] 1.35981288 4.10149811
[99,] 2.91767189 1.35981288
[100,] 0.39465428 2.91767189
[101,] -1.40604666 0.39465428
[102,] -1.55002550 -1.40604666
[103,] -1.75966950 -1.55002550
[104,] 0.65660689 -1.75966950
[105,] 3.94913686 0.65660689
[106,] 4.23280437 3.94913686
[107,] 4.34546994 4.23280437
[108,] -0.44387636 4.34546994
[109,] -2.74121419 -0.44387636
[110,] -1.76016785 -2.74121419
[111,] 9.51548129 -1.76016785
[112,] 0.55464104 9.51548129
[113,] -3.35721895 0.55464104
[114,] -12.14988335 -3.35721895
[115,] -2.08275223 -12.14988335
[116,] -2.32091792 -2.08275223
[117,] -2.67393407 -2.32091792
[118,] 0.25928417 -2.67393407
[119,] 4.34666255 0.25928417
[120,] 7.08447358 4.34666255
[121,] -5.18046265 7.08447358
[122,] -5.11862675 -5.18046265
[123,] -0.94691050 -5.11862675
[124,] -6.67854618 -0.94691050
[125,] -2.22725858 -6.67854618
[126,] -2.82593161 -2.22725858
[127,] -2.20721336 -2.82593161
[128,] -2.60798593 -2.20721336
[129,] 7.14491532 -2.60798593
[130,] -2.09165287 7.14491532
[131,] -0.78613396 -2.09165287
[132,] -2.43337423 -0.78613396
[133,] 0.59085168 -2.43337423
[134,] 3.61404490 0.59085168
[135,] -1.89599944 3.61404490
[136,] -3.40665028 -1.89599944
[137,] -5.29003464 -3.40665028
[138,] -1.73042540 -5.29003464
[139,] -3.02133238 -1.73042540
[140,] 5.01775168 -3.02133238
[141,] 2.38490780 5.01775168
[142,] -6.01127722 2.38490780
[143,] -1.35773109 -6.01127722
[144,] -4.67233422 -1.35773109
[145,] 1.26888824 -4.67233422
[146,] 7.49238578 1.26888824
[147,] 0.70000337 7.49238578
[148,] 1.62486762 0.70000337
[149,] 2.75953214 1.62486762
[150,] -0.74307976 2.75953214
[151,] 0.39057649 -0.74307976
[152,] 11.06817824 0.39057649
[153,] 2.43084390 11.06817824
[154,] -6.03952966 2.43084390
[155,] -1.42070118 -6.03952966
[156,] 3.09758131 -1.42070118
[157,] -2.59943278 3.09758131
[158,] 4.40572213 -2.59943278
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 4.42269450 0.13943187
2 -4.59192521 4.42269450
3 -0.75876595 -4.59192521
4 -0.34022617 -0.75876595
5 -2.61939309 -0.34022617
6 0.01663588 -2.61939309
7 -5.53505278 0.01663588
8 -3.46311701 -5.53505278
9 -2.75279699 -3.46311701
10 1.44495374 -2.75279699
11 8.47783620 1.44495374
12 8.56042333 8.47783620
13 -0.28934364 8.56042333
14 -6.09320468 -0.28934364
15 -5.38905077 -6.09320468
16 2.06835948 -5.38905077
17 0.25946443 2.06835948
18 0.68647881 0.25946443
19 5.01306551 0.68647881
20 2.05204379 5.01306551
21 7.13851005 2.05204379
22 1.54665071 7.13851005
23 10.25818634 1.54665071
24 -0.20716472 10.25818634
25 -4.06636432 -0.20716472
26 -1.40925906 -4.06636432
27 2.88718300 -1.40925906
28 0.22243193 2.88718300
29 -2.32475315 0.22243193
30 3.72111360 -2.32475315
31 -5.30598873 3.72111360
32 -0.41448585 -5.30598873
33 1.01729293 -0.41448585
34 -5.78776369 1.01729293
35 4.32418400 -5.78776369
36 9.50046110 4.32418400
37 -8.75348617 9.50046110
38 4.35951785 -8.75348617
39 -0.68371280 4.35951785
40 2.10432213 -0.68371280
41 0.12792670 2.10432213
42 0.95118225 0.12792670
43 -4.54841838 0.95118225
44 -2.17967563 -4.54841838
45 -5.39916683 -2.17967563
46 -2.07756098 -5.39916683
47 4.92980555 -2.07756098
48 6.91482961 4.92980555
49 -3.48538564 6.91482961
50 2.80654934 -3.48538564
51 -0.90159020 2.80654934
52 1.27101213 -0.90159020
53 -0.65837144 1.27101213
54 -0.88545221 -0.65837144
55 2.68541571 -0.88545221
56 -0.33671812 2.68541571
57 -3.17410843 -0.33671812
58 -3.56068779 -3.17410843
59 -6.85792809 -3.56068779
60 -3.79659772 -6.85792809
61 -0.33835252 -3.79659772
62 -3.97556676 -0.33835252
63 -5.15547648 -3.97556676
64 -7.91394775 -5.15547648
65 4.62711592 -7.91394775
66 12.48208141 4.62711592
67 -3.94946655 12.48208141
68 -11.08018673 -3.94946655
69 -2.53346548 -11.08018673
70 10.38183418 -2.53346548
71 0.82409297 10.38183418
72 6.88112422 0.82409297
73 1.93167481 6.88112422
74 4.51943572 1.93167481
75 3.39021112 4.51943572
76 -9.82204342 3.39021112
77 -1.72606130 -9.82204342
78 -2.63928757 -1.72606130
79 5.00078281 -2.63928757
80 -2.69906681 5.00078281
81 4.05284710 -2.69906681
82 0.21928529 4.05284710
83 -1.90277362 0.21928529
84 2.82284403 -1.90277362
85 0.05404207 2.82284403
86 -0.97559968 0.05404207
87 -8.09215170 -0.97559968
88 0.66052768 -8.09215170
89 1.21391342 0.66052768
90 4.63334987 1.21391342
91 -3.46076086 4.63334987
92 -1.27299168 -3.46076086
93 0.74896215 -1.27299168
94 -0.01859503 0.74896215
95 2.03015699 -0.01859503
96 5.65014873 2.03015699
97 4.10149811 5.65014873
98 1.35981288 4.10149811
99 2.91767189 1.35981288
100 0.39465428 2.91767189
101 -1.40604666 0.39465428
102 -1.55002550 -1.40604666
103 -1.75966950 -1.55002550
104 0.65660689 -1.75966950
105 3.94913686 0.65660689
106 4.23280437 3.94913686
107 4.34546994 4.23280437
108 -0.44387636 4.34546994
109 -2.74121419 -0.44387636
110 -1.76016785 -2.74121419
111 9.51548129 -1.76016785
112 0.55464104 9.51548129
113 -3.35721895 0.55464104
114 -12.14988335 -3.35721895
115 -2.08275223 -12.14988335
116 -2.32091792 -2.08275223
117 -2.67393407 -2.32091792
118 0.25928417 -2.67393407
119 4.34666255 0.25928417
120 7.08447358 4.34666255
121 -5.18046265 7.08447358
122 -5.11862675 -5.18046265
123 -0.94691050 -5.11862675
124 -6.67854618 -0.94691050
125 -2.22725858 -6.67854618
126 -2.82593161 -2.22725858
127 -2.20721336 -2.82593161
128 -2.60798593 -2.20721336
129 7.14491532 -2.60798593
130 -2.09165287 7.14491532
131 -0.78613396 -2.09165287
132 -2.43337423 -0.78613396
133 0.59085168 -2.43337423
134 3.61404490 0.59085168
135 -1.89599944 3.61404490
136 -3.40665028 -1.89599944
137 -5.29003464 -3.40665028
138 -1.73042540 -5.29003464
139 -3.02133238 -1.73042540
140 5.01775168 -3.02133238
141 2.38490780 5.01775168
142 -6.01127722 2.38490780
143 -1.35773109 -6.01127722
144 -4.67233422 -1.35773109
145 1.26888824 -4.67233422
146 7.49238578 1.26888824
147 0.70000337 7.49238578
148 1.62486762 0.70000337
149 2.75953214 1.62486762
150 -0.74307976 2.75953214
151 0.39057649 -0.74307976
152 11.06817824 0.39057649
153 2.43084390 11.06817824
154 -6.03952966 2.43084390
155 -1.42070118 -6.03952966
156 3.09758131 -1.42070118
157 -2.59943278 3.09758131
158 4.40572213 -2.59943278
> 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/775e81290547414.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/html/rcomp/tmp/8hedt1290547414.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/html/rcomp/tmp/9hedt1290547414.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/html/rcomp/tmp/10a6ue1290547414.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/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/11voa11290547414.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/12zp9p1290547414.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/13o9st1290547415.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/14998h1290547415.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/15uso51290547415.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/16ya5t1290547415.tab")
+ }
>
> try(system("convert tmp/1m5fk1290547414.ps tmp/1m5fk1290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/2m5fk1290547414.ps tmp/2m5fk1290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/3m5fk1290547414.ps tmp/3m5fk1290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/4eee51290547414.ps tmp/4eee51290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/5eee51290547414.ps tmp/5eee51290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/6eee51290547414.ps tmp/6eee51290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/775e81290547414.ps tmp/775e81290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/8hedt1290547414.ps tmp/8hedt1290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/9hedt1290547414.ps tmp/9hedt1290547414.png",intern=TRUE))
character(0)
> try(system("convert tmp/10a6ue1290547414.ps tmp/10a6ue1290547414.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.104 1.717 9.289