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(9
+ ,24
+ ,14
+ ,11
+ ,12
+ ,24
+ ,26
+ ,9
+ ,25
+ ,11
+ ,7
+ ,8
+ ,25
+ ,23
+ ,9
+ ,17
+ ,6
+ ,17
+ ,8
+ ,30
+ ,25
+ ,9
+ ,18
+ ,12
+ ,10
+ ,8
+ ,19
+ ,23
+ ,9
+ ,18
+ ,8
+ ,12
+ ,9
+ ,22
+ ,19
+ ,9
+ ,16
+ ,10
+ ,12
+ ,7
+ ,22
+ ,29
+ ,10
+ ,20
+ ,10
+ ,11
+ ,4
+ ,25
+ ,25
+ ,10
+ ,16
+ ,11
+ ,11
+ ,11
+ ,23
+ ,21
+ ,10
+ ,18
+ ,16
+ ,12
+ ,7
+ ,17
+ ,22
+ ,10
+ ,17
+ ,11
+ ,13
+ ,7
+ ,21
+ ,25
+ ,10
+ ,23
+ ,13
+ ,14
+ ,12
+ ,19
+ ,24
+ ,10
+ ,30
+ ,12
+ ,16
+ ,10
+ ,19
+ ,18
+ ,10
+ ,23
+ ,8
+ ,11
+ ,10
+ ,15
+ ,22
+ ,10
+ ,18
+ ,12
+ ,10
+ ,8
+ ,16
+ ,15
+ ,10
+ ,15
+ ,11
+ ,11
+ ,8
+ ,23
+ ,22
+ ,10
+ ,12
+ ,4
+ ,15
+ ,4
+ ,27
+ ,28
+ ,10
+ ,21
+ ,9
+ ,9
+ ,9
+ ,22
+ ,20
+ ,10
+ ,15
+ ,8
+ ,11
+ ,8
+ ,14
+ ,12
+ ,10
+ ,20
+ ,8
+ ,17
+ ,7
+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9
+ ,23
+ ,14
+ ,10
+ ,30
+ ,12
+ ,15
+ ,10
+ ,29
+ ,22
+ ,10
+ ,24
+ ,14
+ ,24
+ ,20
+ ,21
+ ,10
+ ,10
+ ,21
+ ,15
+ ,7
+ ,5
+ ,21
+ ,24
+ ,10
+ ,21
+ ,13
+ ,17
+ ,11
+ ,23
+ ,22
+ ,10
+ ,29
+ ,16
+ ,11
+ ,6
+ ,27
+ ,24
+ ,10
+ ,31
+ ,9
+ ,17
+ ,9
+ ,25
+ ,19
+ ,10
+ ,20
+ ,9
+ ,11
+ ,7
+ ,21
+ ,20
+ ,10
+ ,16
+ ,9
+ ,12
+ ,9
+ ,10
+ ,13
+ ,10
+ ,22
+ ,8
+ ,14
+ ,10
+ ,20
+ ,20
+ ,10
+ ,20
+ ,7
+ ,11
+ ,9
+ ,26
+ ,22
+ ,10
+ ,28
+ ,16
+ ,16
+ ,8
+ ,24
+ ,24
+ ,10
+ ,38
+ ,11
+ ,21
+ ,7
+ ,29
+ ,29
+ ,10
+ ,22
+ ,9
+ ,14
+ ,6
+ ,19
+ ,12
+ ,10
+ ,20
+ ,11
+ ,20
+ ,13
+ ,24
+ ,20
+ ,10
+ ,17
+ ,9
+ ,13
+ ,6
+ ,19
+ ,21
+ ,10
+ ,28
+ ,14
+ ,11
+ ,8
+ ,24
+ ,24
+ ,10
+ ,22
+ ,13
+ ,15
+ ,10
+ ,22
+ ,22
+ ,10
+ ,31
+ ,16
+ ,19
+ ,16
+ ,17
+ ,20)
+ ,dim=c(7
+ ,159)
+ ,dimnames=list(c('Month'
+ ,'Concern.over.Mistakes'
+ ,'Doubts.about.actions'
+ ,'Parental.Expectations'
+ ,'Parental.Criticism'
+ ,'Personal.Standards'
+ ,'Organization')
+ ,1:159))
> y <- array(NA,dim=c(7,159),dimnames=list(c('Month','Concern.over.Mistakes','Doubts.about.actions','Parental.Expectations','Parental.Criticism','Personal.Standards','Organization'),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 = '4'
> #'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
Parental.Expectations Month Concern.over.Mistakes Doubts.about.actions
1 11 9 24 14
2 7 9 25 11
3 17 9 17 6
4 10 9 18 12
5 12 9 18 8
6 12 9 16 10
7 11 10 20 10
8 11 10 16 11
9 12 10 18 16
10 13 10 17 11
11 14 10 23 13
12 16 10 30 12
13 11 10 23 8
14 10 10 18 12
15 11 10 15 11
16 15 10 12 4
17 9 10 21 9
18 11 10 15 8
19 17 10 20 8
20 17 10 31 14
21 11 10 27 15
22 18 10 34 16
23 14 10 21 9
24 10 10 31 14
25 11 10 19 11
26 15 10 16 8
27 15 10 20 9
28 13 10 21 9
29 16 10 22 9
30 13 10 17 9
31 9 10 24 10
32 18 10 25 16
33 18 10 26 11
34 12 10 25 8
35 17 10 17 9
36 9 10 32 16
37 9 10 33 11
38 12 10 13 16
39 18 10 32 12
40 12 10 25 12
41 18 10 29 14
42 14 10 22 9
43 15 10 18 10
44 16 10 17 9
45 10 10 20 10
46 11 10 15 12
47 14 10 20 14
48 9 10 33 14
49 12 10 29 10
50 17 10 23 14
51 5 10 26 16
52 12 10 18 9
53 12 10 20 10
54 6 10 11 6
55 24 10 28 8
56 12 10 26 13
57 12 10 22 10
58 14 10 17 8
59 7 10 12 7
60 13 10 14 15
61 12 10 17 9
62 13 10 21 10
63 14 10 19 12
64 8 10 18 13
65 11 10 10 10
66 9 10 29 11
67 11 10 31 8
68 13 10 19 9
69 10 10 9 13
70 11 10 20 11
71 12 10 28 8
72 9 10 19 9
73 15 10 30 9
74 18 10 29 15
75 15 10 26 9
76 12 10 23 10
77 13 10 13 14
78 14 10 21 12
79 10 10 19 12
80 13 10 28 11
81 13 10 23 14
82 11 10 18 6
83 13 10 21 12
84 16 10 20 8
85 8 10 23 14
86 16 10 21 11
87 11 10 21 10
88 9 10 15 14
89 16 10 28 12
90 12 10 19 10
91 14 10 26 14
92 8 10 10 5
93 9 10 16 11
94 15 10 22 10
95 11 10 19 9
96 21 10 31 10
97 14 10 31 16
98 18 10 29 13
99 12 10 19 9
100 13 10 22 10
101 15 10 23 10
102 12 10 15 7
103 19 10 20 9
104 15 10 18 8
105 11 10 23 14
106 11 10 25 14
107 10 10 21 8
108 13 10 24 9
109 15 10 25 14
110 12 10 17 14
111 12 10 13 8
112 16 10 28 8
113 9 10 21 8
114 18 10 25 7
115 8 10 9 6
116 13 10 16 8
117 17 10 19 6
118 9 10 17 11
119 15 10 25 14
120 8 10 20 11
121 7 10 29 11
122 12 10 14 11
123 14 10 22 14
124 6 10 15 8
125 8 10 19 20
126 17 10 20 11
127 10 10 15 8
128 11 10 20 11
129 14 10 18 10
130 11 10 33 14
131 13 10 22 11
132 12 10 16 9
133 11 10 17 9
134 9 10 16 8
135 12 10 21 10
136 20 10 26 13
137 12 10 18 13
138 13 10 18 12
139 12 10 17 8
140 12 10 22 13
141 9 10 30 14
142 15 10 30 12
143 24 10 24 14
144 7 10 21 15
145 17 10 21 13
146 11 10 29 16
147 17 10 31 9
148 11 10 20 9
149 12 10 16 9
150 14 10 22 8
151 11 10 20 7
152 16 10 28 16
153 21 10 38 11
154 14 10 22 9
155 20 10 20 11
156 13 10 17 9
157 11 10 28 14
158 15 10 22 13
159 19 10 31 16
Parental.Criticism Personal.Standards Organization
1 12 24 26
2 8 25 23
3 8 30 25
4 8 19 23
5 9 22 19
6 7 22 29
7 4 25 25
8 11 23 21
9 7 17 22
10 7 21 25
11 12 19 24
12 10 19 18
13 10 15 22
14 8 16 15
15 8 23 22
16 4 27 28
17 9 22 20
18 8 14 12
19 7 22 24
20 11 23 20
21 9 23 21
22 11 21 20
23 13 19 21
24 8 18 23
25 8 20 28
26 9 23 24
27 6 25 24
28 9 19 24
29 9 24 23
30 6 22 23
31 6 25 29
32 16 26 24
33 5 29 18
34 7 32 25
35 9 25 21
36 6 29 26
37 6 28 22
38 5 17 22
39 12 28 22
40 7 29 23
41 10 26 30
42 9 25 23
43 8 14 17
44 5 25 23
45 8 26 23
46 8 20 25
47 10 18 24
48 6 32 24
49 8 25 23
50 7 25 21
51 4 23 24
52 8 21 24
53 8 20 28
54 4 15 16
55 20 30 20
56 8 24 29
57 8 26 27
58 6 24 22
59 4 22 28
60 8 14 16
61 9 24 25
62 6 24 24
63 7 24 28
64 9 24 24
65 5 19 23
66 5 31 30
67 8 22 24
68 8 27 21
69 6 19 25
70 8 25 25
71 7 20 22
72 7 21 23
73 9 27 26
74 11 23 23
75 6 25 25
76 8 20 21
77 6 21 25
78 9 22 24
79 8 23 29
80 6 25 22
81 10 25 27
82 8 17 26
83 8 19 22
84 10 25 24
85 5 19 27
86 7 20 24
87 5 26 24
88 8 23 29
89 14 27 22
90 7 17 21
91 8 17 24
92 6 19 24
93 5 17 23
94 6 22 20
95 10 21 27
96 12 32 26
97 9 21 25
98 12 21 21
99 7 18 21
100 8 18 19
101 10 23 21
102 6 19 21
103 10 20 16
104 10 21 22
105 10 20 29
106 5 17 15
107 7 18 17
108 10 19 15
109 11 22 21
110 6 15 21
111 7 14 19
112 12 18 24
113 11 24 20
114 11 35 17
115 11 29 23
116 5 21 24
117 8 25 14
118 6 20 19
119 9 22 24
120 4 13 13
121 4 26 22
122 7 17 16
123 11 25 19
124 6 20 25
125 7 19 25
126 8 21 23
127 4 22 24
128 8 24 26
129 9 21 26
130 8 26 25
131 11 24 18
132 8 16 21
133 5 23 26
134 4 18 23
135 8 16 23
136 10 26 22
137 6 19 20
138 9 21 13
139 9 21 24
140 13 22 15
141 9 23 14
142 10 29 22
143 20 21 10
144 5 21 24
145 11 23 22
146 6 27 24
147 9 25 19
148 7 21 20
149 9 10 13
150 10 20 20
151 9 26 22
152 8 24 24
153 7 29 29
154 6 19 12
155 13 24 20
156 6 19 21
157 8 24 24
158 10 22 22
159 16 17 20
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Month Concern.over.Mistakes
-10.83206 1.68569 0.08406
Doubts.about.actions Parental.Criticism Personal.Standards
-0.12711 0.67507 0.12287
Organization
-0.08104
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.14370 -1.90580 -0.02147 1.81005 7.24071
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -10.83206 11.55353 -0.938 0.3500
Month 1.68569 1.13213 1.489 0.1386
Concern.over.Mistakes 0.08406 0.04814 1.746 0.0828 .
Doubts.about.actions -0.12711 0.08689 -1.463 0.1456
Parental.Criticism 0.67507 0.08621 7.831 7.72e-13 ***
Personal.Standards 0.12287 0.06311 1.947 0.0534 .
Organization -0.08104 0.06181 -1.311 0.1918
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.685 on 152 degrees of freedom
Multiple R-squared: 0.4159, Adjusted R-squared: 0.3928
F-statistic: 18.04 on 6 and 152 DF, p-value: 9.641e-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.54928311 0.90143378 0.4507169
[2,] 0.63755957 0.72488087 0.3624404
[3,] 0.72516770 0.54966460 0.2748323
[4,] 0.79581310 0.40837379 0.2041869
[5,] 0.72264379 0.55471243 0.2773562
[6,] 0.65435737 0.69128525 0.3456426
[7,] 0.58211094 0.83577813 0.4178891
[8,] 0.67578078 0.64843845 0.3242192
[9,] 0.59548182 0.80903635 0.4045182
[10,] 0.66946193 0.66107613 0.3305381
[11,] 0.71119980 0.57760040 0.2888002
[12,] 0.67406673 0.65186653 0.3259333
[13,] 0.73315590 0.53368820 0.2668441
[14,] 0.67359603 0.65280794 0.3264040
[15,] 0.70617618 0.58764764 0.2938238
[16,] 0.66104970 0.67790061 0.3389503
[17,] 0.61190044 0.77619912 0.3880996
[18,] 0.57339902 0.85320195 0.4266010
[19,] 0.50615657 0.98768686 0.4938434
[20,] 0.45879104 0.91758208 0.5412090
[21,] 0.40122585 0.80245169 0.5987742
[22,] 0.53205987 0.93588026 0.4679401
[23,] 0.48356865 0.96713730 0.5164314
[24,] 0.53753458 0.92493084 0.4624654
[25,] 0.63857655 0.72284689 0.3614234
[26,] 0.63755682 0.72488635 0.3624432
[27,] 0.69809106 0.60381788 0.3019089
[28,] 0.76539303 0.46921393 0.2346070
[29,] 0.75653388 0.48693224 0.2434661
[30,] 0.73457498 0.53085004 0.2654250
[31,] 0.70528291 0.58943418 0.2947171
[32,] 0.75936693 0.48126614 0.2406331
[33,] 0.71599173 0.56801655 0.2840083
[34,] 0.73181710 0.53636579 0.2681829
[35,] 0.79037753 0.41924495 0.2096225
[36,] 0.82483130 0.35033739 0.1751687
[37,] 0.79840953 0.40318094 0.2015905
[38,] 0.76575865 0.46848270 0.2342414
[39,] 0.80398757 0.39202487 0.1960124
[40,] 0.77883369 0.44233262 0.2211663
[41,] 0.84065157 0.31869685 0.1593484
[42,] 0.89751407 0.20497186 0.1024859
[43,] 0.87658752 0.24682497 0.1234125
[44,] 0.84936332 0.30127336 0.1506367
[45,] 0.87976245 0.24047510 0.1202376
[46,] 0.85644248 0.28711503 0.1435575
[47,] 0.82779701 0.34440598 0.1722030
[48,] 0.80291951 0.39416098 0.1970805
[49,] 0.79049930 0.41900139 0.2095007
[50,] 0.79691454 0.40617092 0.2030855
[51,] 0.77404114 0.45191771 0.2259589
[52,] 0.75296529 0.49406943 0.2470347
[53,] 0.72485449 0.55029101 0.2751455
[54,] 0.71595409 0.56809181 0.2840459
[55,] 0.81862605 0.36274790 0.1813739
[56,] 0.79847073 0.40305853 0.2015293
[57,] 0.79616401 0.40767198 0.2038360
[58,] 0.79549513 0.40900975 0.2045049
[59,] 0.76525989 0.46948021 0.2347401
[60,] 0.73784594 0.52430812 0.2621541
[61,] 0.71564844 0.56870312 0.2843516
[62,] 0.68439089 0.63121822 0.3156091
[63,] 0.69043120 0.61913761 0.3095688
[64,] 0.65387432 0.69225135 0.3461257
[65,] 0.67228042 0.65543916 0.3277196
[66,] 0.67945127 0.64109746 0.3205487
[67,] 0.64111365 0.71777270 0.3588864
[68,] 0.67132883 0.65734234 0.3286712
[69,] 0.63371845 0.73256311 0.3662816
[70,] 0.61032374 0.77935251 0.3896763
[71,] 0.56919993 0.86160014 0.4308001
[72,] 0.52568045 0.94863909 0.4743195
[73,] 0.48965555 0.97931110 0.5103445
[74,] 0.44752632 0.89505265 0.5524737
[75,] 0.41437612 0.82875225 0.5856239
[76,] 0.38607120 0.77214240 0.6139288
[77,] 0.46649309 0.93298618 0.5335069
[78,] 0.42094161 0.84188322 0.5790584
[79,] 0.40426041 0.80852082 0.5957396
[80,] 0.38437486 0.76874973 0.6156251
[81,] 0.34152540 0.68305080 0.6584746
[82,] 0.32465913 0.64931827 0.6753409
[83,] 0.32065413 0.64130826 0.6793459
[84,] 0.28034973 0.56069946 0.7196503
[85,] 0.29887976 0.59775952 0.7011202
[86,] 0.29739717 0.59479435 0.7026028
[87,] 0.32580035 0.65160070 0.6741996
[88,] 0.28977723 0.57955445 0.7102228
[89,] 0.26931448 0.53862896 0.7306855
[90,] 0.23098647 0.46197295 0.7690135
[91,] 0.19579507 0.39159015 0.8042049
[92,] 0.16425943 0.32851885 0.8357406
[93,] 0.14041973 0.28083946 0.8595803
[94,] 0.19151508 0.38303017 0.8084849
[95,] 0.16419884 0.32839769 0.8358012
[96,] 0.15649485 0.31298969 0.8435052
[97,] 0.12892033 0.25784066 0.8710797
[98,] 0.12275561 0.24551121 0.8772444
[99,] 0.11160243 0.22320487 0.8883976
[100,] 0.08938863 0.17877726 0.9106114
[101,] 0.08287192 0.16574383 0.9171281
[102,] 0.06839769 0.13679537 0.9316023
[103,] 0.05901783 0.11803566 0.9409822
[104,] 0.17870651 0.35741301 0.8212935
[105,] 0.15254487 0.30508974 0.8474551
[106,] 0.35357639 0.70715278 0.6464236
[107,] 0.35090970 0.70181940 0.6490903
[108,] 0.37555141 0.75110282 0.6244486
[109,] 0.33840764 0.67681527 0.6615924
[110,] 0.30317667 0.60635333 0.6968233
[111,] 0.26387519 0.52775038 0.7361248
[112,] 0.31081878 0.62163755 0.6891812
[113,] 0.28688326 0.57376651 0.7131167
[114,] 0.24285187 0.48570374 0.7571481
[115,] 0.35197457 0.70394913 0.6480254
[116,] 0.31191645 0.62383290 0.6880835
[117,] 0.39250960 0.78501920 0.6074904
[118,] 0.33830236 0.67660472 0.6616976
[119,] 0.31251625 0.62503251 0.6874837
[120,] 0.26102726 0.52205451 0.7389727
[121,] 0.30648883 0.61297766 0.6935112
[122,] 0.29240380 0.58480760 0.7075962
[123,] 0.23773920 0.47547839 0.7622608
[124,] 0.18937348 0.37874696 0.8106265
[125,] 0.14657138 0.29314275 0.8534286
[126,] 0.11491515 0.22983031 0.8850848
[127,] 0.18887103 0.37774206 0.8111290
[128,] 0.17717622 0.35435244 0.8228238
[129,] 0.15386344 0.30772689 0.8461366
[130,] 0.13652716 0.27305432 0.8634728
[131,] 0.16971859 0.33943719 0.8302814
[132,] 0.34607691 0.69215382 0.6539231
[133,] 0.33136267 0.66272535 0.6686373
[134,] 0.25661252 0.51322504 0.7433875
[135,] 0.23156273 0.46312546 0.7684373
[136,] 0.19931423 0.39862845 0.8006858
[137,] 0.18609628 0.37219257 0.8139037
[138,] 0.12285570 0.24571139 0.8771443
[139,] 0.08146949 0.16293897 0.9185305
[140,] 0.04008111 0.08016222 0.9599189
> postscript(file="/var/www/html/rcomp/tmp/1695r1291135997.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/2695r1291135997.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/3hi4b1291135997.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/4hi4b1291135997.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/5hi4b1291135997.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 = 159
Frequency = 1
1 2 3 4 5 6
-2.51961332 -4.65069482 4.93395472 -0.19799459 -0.07424653 2.50859455
7 8 9 10 11 12
0.81914394 -3.52142616 1.46451821 1.66467767 -0.79609523 1.35231852
13 14 15 16 17 18
-2.75210815 -2.16338004 -1.33112380 4.72632107 -4.80395616 -1.41702479
19 20 21 22 23 24
4.82727957 1.51801899 -2.58747098 2.76580019 -2.05459851 -2.59932881
25 26 27 28 29 30
-0.81252647 1.69049890 3.26085883 -0.11120833 2.10936658 1.80058932
31 32 33 34 35 36
-2.54307143 -0.14322471 5.70811972 -1.74062769 3.24470699 -3.18744654
37 38 39 40 41 42
-4.10832838 3.23493865 1.05241865 -1.02566865 3.80297421 -0.01349975
43 44 45 46 47 48
2.99020981 5.10705996 -3.16607536 -0.59230456 1.05618769 -4.05639342
49 50 51 52 53 54
-1.79971513 4.72605195 -4.75784631 -0.42970265 -0.02369132 -3.43345603
55 56 57 58 59 60
1.07184493 -0.55713098 -1.01003899 2.34671083 -2.27802142 1.88094061
61 62 63 64 65 66
-1.30827784 1.42677755 2.49818646 -4.96493681 1.55976019 -2.81733511
67 68 69 70 71 72
-2.77240863 -0.49406850 0.51214706 -1.75402599 -0.76151205 -2.91972646
73 74 75 76 77 78
0.31142935 3.05635171 2.83755865 -0.84312050 3.05729809 0.90151853
79 80 81 82 83 84
-1.97297964 0.68055178 -0.81293369 -1.15748876 0.78311274 1.43347167
85 86 87 88 89 90
-1.70038752 4.37028185 -0.14388547 -2.38253747 -1.83862936 0.53677306
91 92 93 94 95 96
2.02485589 -2.66981532 -0.57173593 3.26430513 -2.62078653 3.71494117
97 98 99 100 101 102
0.77329421 2.21072307 0.28679811 0.32459397 0.43814123 0.92100912
103 104 105 106 107 108
4.52661425 0.93097503 -2.03652762 0.40478614 -2.33257181 -1.76778156
109 110 111 112 113 114
0.22625993 2.13412230 0.99341780 0.27094684 -6.52693672 0.41508846
115 116 117 118 119 120
-7.14369917 2.63651011 2.80307783 -2.02360963 1.81951084 -1.55179801
121 122 123 124 125 126
-4.17623151 0.67897679 -1.05224479 -4.75059975 -2.11372458 4.57536491
127 128 129 130 131 132
0.27276965 -1.55012245 1.18441075 -2.58829750 -2.39174152 0.10962984
133 134 135 136 137 138
0.59590426 -0.40085847 -0.02146829 5.27973660 1.35045491 -0.61485576
139 140 141 142 143 144
-1.14782467 -4.48504253 -5.53400877 -0.55219594 2.46614644 -2.89401073
145 146 147 148 149 150
2.39354712 -0.85161960 1.90584530 -1.24689432 -0.47653950 -0.44445799
151 152 153 154 155 156
-3.30350807 3.25089635 7.24071497 1.85749782 3.58830609 2.00711389
157 158 159
-2.00332089 1.10742686 1.13408602
> postscript(file="/var/www/html/rcomp/tmp/6ralw1291135997.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 = 159
Frequency = 1
lag(myerror, k = 1) myerror
0 -2.51961332 NA
1 -4.65069482 -2.51961332
2 4.93395472 -4.65069482
3 -0.19799459 4.93395472
4 -0.07424653 -0.19799459
5 2.50859455 -0.07424653
6 0.81914394 2.50859455
7 -3.52142616 0.81914394
8 1.46451821 -3.52142616
9 1.66467767 1.46451821
10 -0.79609523 1.66467767
11 1.35231852 -0.79609523
12 -2.75210815 1.35231852
13 -2.16338004 -2.75210815
14 -1.33112380 -2.16338004
15 4.72632107 -1.33112380
16 -4.80395616 4.72632107
17 -1.41702479 -4.80395616
18 4.82727957 -1.41702479
19 1.51801899 4.82727957
20 -2.58747098 1.51801899
21 2.76580019 -2.58747098
22 -2.05459851 2.76580019
23 -2.59932881 -2.05459851
24 -0.81252647 -2.59932881
25 1.69049890 -0.81252647
26 3.26085883 1.69049890
27 -0.11120833 3.26085883
28 2.10936658 -0.11120833
29 1.80058932 2.10936658
30 -2.54307143 1.80058932
31 -0.14322471 -2.54307143
32 5.70811972 -0.14322471
33 -1.74062769 5.70811972
34 3.24470699 -1.74062769
35 -3.18744654 3.24470699
36 -4.10832838 -3.18744654
37 3.23493865 -4.10832838
38 1.05241865 3.23493865
39 -1.02566865 1.05241865
40 3.80297421 -1.02566865
41 -0.01349975 3.80297421
42 2.99020981 -0.01349975
43 5.10705996 2.99020981
44 -3.16607536 5.10705996
45 -0.59230456 -3.16607536
46 1.05618769 -0.59230456
47 -4.05639342 1.05618769
48 -1.79971513 -4.05639342
49 4.72605195 -1.79971513
50 -4.75784631 4.72605195
51 -0.42970265 -4.75784631
52 -0.02369132 -0.42970265
53 -3.43345603 -0.02369132
54 1.07184493 -3.43345603
55 -0.55713098 1.07184493
56 -1.01003899 -0.55713098
57 2.34671083 -1.01003899
58 -2.27802142 2.34671083
59 1.88094061 -2.27802142
60 -1.30827784 1.88094061
61 1.42677755 -1.30827784
62 2.49818646 1.42677755
63 -4.96493681 2.49818646
64 1.55976019 -4.96493681
65 -2.81733511 1.55976019
66 -2.77240863 -2.81733511
67 -0.49406850 -2.77240863
68 0.51214706 -0.49406850
69 -1.75402599 0.51214706
70 -0.76151205 -1.75402599
71 -2.91972646 -0.76151205
72 0.31142935 -2.91972646
73 3.05635171 0.31142935
74 2.83755865 3.05635171
75 -0.84312050 2.83755865
76 3.05729809 -0.84312050
77 0.90151853 3.05729809
78 -1.97297964 0.90151853
79 0.68055178 -1.97297964
80 -0.81293369 0.68055178
81 -1.15748876 -0.81293369
82 0.78311274 -1.15748876
83 1.43347167 0.78311274
84 -1.70038752 1.43347167
85 4.37028185 -1.70038752
86 -0.14388547 4.37028185
87 -2.38253747 -0.14388547
88 -1.83862936 -2.38253747
89 0.53677306 -1.83862936
90 2.02485589 0.53677306
91 -2.66981532 2.02485589
92 -0.57173593 -2.66981532
93 3.26430513 -0.57173593
94 -2.62078653 3.26430513
95 3.71494117 -2.62078653
96 0.77329421 3.71494117
97 2.21072307 0.77329421
98 0.28679811 2.21072307
99 0.32459397 0.28679811
100 0.43814123 0.32459397
101 0.92100912 0.43814123
102 4.52661425 0.92100912
103 0.93097503 4.52661425
104 -2.03652762 0.93097503
105 0.40478614 -2.03652762
106 -2.33257181 0.40478614
107 -1.76778156 -2.33257181
108 0.22625993 -1.76778156
109 2.13412230 0.22625993
110 0.99341780 2.13412230
111 0.27094684 0.99341780
112 -6.52693672 0.27094684
113 0.41508846 -6.52693672
114 -7.14369917 0.41508846
115 2.63651011 -7.14369917
116 2.80307783 2.63651011
117 -2.02360963 2.80307783
118 1.81951084 -2.02360963
119 -1.55179801 1.81951084
120 -4.17623151 -1.55179801
121 0.67897679 -4.17623151
122 -1.05224479 0.67897679
123 -4.75059975 -1.05224479
124 -2.11372458 -4.75059975
125 4.57536491 -2.11372458
126 0.27276965 4.57536491
127 -1.55012245 0.27276965
128 1.18441075 -1.55012245
129 -2.58829750 1.18441075
130 -2.39174152 -2.58829750
131 0.10962984 -2.39174152
132 0.59590426 0.10962984
133 -0.40085847 0.59590426
134 -0.02146829 -0.40085847
135 5.27973660 -0.02146829
136 1.35045491 5.27973660
137 -0.61485576 1.35045491
138 -1.14782467 -0.61485576
139 -4.48504253 -1.14782467
140 -5.53400877 -4.48504253
141 -0.55219594 -5.53400877
142 2.46614644 -0.55219594
143 -2.89401073 2.46614644
144 2.39354712 -2.89401073
145 -0.85161960 2.39354712
146 1.90584530 -0.85161960
147 -1.24689432 1.90584530
148 -0.47653950 -1.24689432
149 -0.44445799 -0.47653950
150 -3.30350807 -0.44445799
151 3.25089635 -3.30350807
152 7.24071497 3.25089635
153 1.85749782 7.24071497
154 3.58830609 1.85749782
155 2.00711389 3.58830609
156 -2.00332089 2.00711389
157 1.10742686 -2.00332089
158 1.13408602 1.10742686
159 NA 1.13408602
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -4.65069482 -2.51961332
[2,] 4.93395472 -4.65069482
[3,] -0.19799459 4.93395472
[4,] -0.07424653 -0.19799459
[5,] 2.50859455 -0.07424653
[6,] 0.81914394 2.50859455
[7,] -3.52142616 0.81914394
[8,] 1.46451821 -3.52142616
[9,] 1.66467767 1.46451821
[10,] -0.79609523 1.66467767
[11,] 1.35231852 -0.79609523
[12,] -2.75210815 1.35231852
[13,] -2.16338004 -2.75210815
[14,] -1.33112380 -2.16338004
[15,] 4.72632107 -1.33112380
[16,] -4.80395616 4.72632107
[17,] -1.41702479 -4.80395616
[18,] 4.82727957 -1.41702479
[19,] 1.51801899 4.82727957
[20,] -2.58747098 1.51801899
[21,] 2.76580019 -2.58747098
[22,] -2.05459851 2.76580019
[23,] -2.59932881 -2.05459851
[24,] -0.81252647 -2.59932881
[25,] 1.69049890 -0.81252647
[26,] 3.26085883 1.69049890
[27,] -0.11120833 3.26085883
[28,] 2.10936658 -0.11120833
[29,] 1.80058932 2.10936658
[30,] -2.54307143 1.80058932
[31,] -0.14322471 -2.54307143
[32,] 5.70811972 -0.14322471
[33,] -1.74062769 5.70811972
[34,] 3.24470699 -1.74062769
[35,] -3.18744654 3.24470699
[36,] -4.10832838 -3.18744654
[37,] 3.23493865 -4.10832838
[38,] 1.05241865 3.23493865
[39,] -1.02566865 1.05241865
[40,] 3.80297421 -1.02566865
[41,] -0.01349975 3.80297421
[42,] 2.99020981 -0.01349975
[43,] 5.10705996 2.99020981
[44,] -3.16607536 5.10705996
[45,] -0.59230456 -3.16607536
[46,] 1.05618769 -0.59230456
[47,] -4.05639342 1.05618769
[48,] -1.79971513 -4.05639342
[49,] 4.72605195 -1.79971513
[50,] -4.75784631 4.72605195
[51,] -0.42970265 -4.75784631
[52,] -0.02369132 -0.42970265
[53,] -3.43345603 -0.02369132
[54,] 1.07184493 -3.43345603
[55,] -0.55713098 1.07184493
[56,] -1.01003899 -0.55713098
[57,] 2.34671083 -1.01003899
[58,] -2.27802142 2.34671083
[59,] 1.88094061 -2.27802142
[60,] -1.30827784 1.88094061
[61,] 1.42677755 -1.30827784
[62,] 2.49818646 1.42677755
[63,] -4.96493681 2.49818646
[64,] 1.55976019 -4.96493681
[65,] -2.81733511 1.55976019
[66,] -2.77240863 -2.81733511
[67,] -0.49406850 -2.77240863
[68,] 0.51214706 -0.49406850
[69,] -1.75402599 0.51214706
[70,] -0.76151205 -1.75402599
[71,] -2.91972646 -0.76151205
[72,] 0.31142935 -2.91972646
[73,] 3.05635171 0.31142935
[74,] 2.83755865 3.05635171
[75,] -0.84312050 2.83755865
[76,] 3.05729809 -0.84312050
[77,] 0.90151853 3.05729809
[78,] -1.97297964 0.90151853
[79,] 0.68055178 -1.97297964
[80,] -0.81293369 0.68055178
[81,] -1.15748876 -0.81293369
[82,] 0.78311274 -1.15748876
[83,] 1.43347167 0.78311274
[84,] -1.70038752 1.43347167
[85,] 4.37028185 -1.70038752
[86,] -0.14388547 4.37028185
[87,] -2.38253747 -0.14388547
[88,] -1.83862936 -2.38253747
[89,] 0.53677306 -1.83862936
[90,] 2.02485589 0.53677306
[91,] -2.66981532 2.02485589
[92,] -0.57173593 -2.66981532
[93,] 3.26430513 -0.57173593
[94,] -2.62078653 3.26430513
[95,] 3.71494117 -2.62078653
[96,] 0.77329421 3.71494117
[97,] 2.21072307 0.77329421
[98,] 0.28679811 2.21072307
[99,] 0.32459397 0.28679811
[100,] 0.43814123 0.32459397
[101,] 0.92100912 0.43814123
[102,] 4.52661425 0.92100912
[103,] 0.93097503 4.52661425
[104,] -2.03652762 0.93097503
[105,] 0.40478614 -2.03652762
[106,] -2.33257181 0.40478614
[107,] -1.76778156 -2.33257181
[108,] 0.22625993 -1.76778156
[109,] 2.13412230 0.22625993
[110,] 0.99341780 2.13412230
[111,] 0.27094684 0.99341780
[112,] -6.52693672 0.27094684
[113,] 0.41508846 -6.52693672
[114,] -7.14369917 0.41508846
[115,] 2.63651011 -7.14369917
[116,] 2.80307783 2.63651011
[117,] -2.02360963 2.80307783
[118,] 1.81951084 -2.02360963
[119,] -1.55179801 1.81951084
[120,] -4.17623151 -1.55179801
[121,] 0.67897679 -4.17623151
[122,] -1.05224479 0.67897679
[123,] -4.75059975 -1.05224479
[124,] -2.11372458 -4.75059975
[125,] 4.57536491 -2.11372458
[126,] 0.27276965 4.57536491
[127,] -1.55012245 0.27276965
[128,] 1.18441075 -1.55012245
[129,] -2.58829750 1.18441075
[130,] -2.39174152 -2.58829750
[131,] 0.10962984 -2.39174152
[132,] 0.59590426 0.10962984
[133,] -0.40085847 0.59590426
[134,] -0.02146829 -0.40085847
[135,] 5.27973660 -0.02146829
[136,] 1.35045491 5.27973660
[137,] -0.61485576 1.35045491
[138,] -1.14782467 -0.61485576
[139,] -4.48504253 -1.14782467
[140,] -5.53400877 -4.48504253
[141,] -0.55219594 -5.53400877
[142,] 2.46614644 -0.55219594
[143,] -2.89401073 2.46614644
[144,] 2.39354712 -2.89401073
[145,] -0.85161960 2.39354712
[146,] 1.90584530 -0.85161960
[147,] -1.24689432 1.90584530
[148,] -0.47653950 -1.24689432
[149,] -0.44445799 -0.47653950
[150,] -3.30350807 -0.44445799
[151,] 3.25089635 -3.30350807
[152,] 7.24071497 3.25089635
[153,] 1.85749782 7.24071497
[154,] 3.58830609 1.85749782
[155,] 2.00711389 3.58830609
[156,] -2.00332089 2.00711389
[157,] 1.10742686 -2.00332089
[158,] 1.13408602 1.10742686
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -4.65069482 -2.51961332
2 4.93395472 -4.65069482
3 -0.19799459 4.93395472
4 -0.07424653 -0.19799459
5 2.50859455 -0.07424653
6 0.81914394 2.50859455
7 -3.52142616 0.81914394
8 1.46451821 -3.52142616
9 1.66467767 1.46451821
10 -0.79609523 1.66467767
11 1.35231852 -0.79609523
12 -2.75210815 1.35231852
13 -2.16338004 -2.75210815
14 -1.33112380 -2.16338004
15 4.72632107 -1.33112380
16 -4.80395616 4.72632107
17 -1.41702479 -4.80395616
18 4.82727957 -1.41702479
19 1.51801899 4.82727957
20 -2.58747098 1.51801899
21 2.76580019 -2.58747098
22 -2.05459851 2.76580019
23 -2.59932881 -2.05459851
24 -0.81252647 -2.59932881
25 1.69049890 -0.81252647
26 3.26085883 1.69049890
27 -0.11120833 3.26085883
28 2.10936658 -0.11120833
29 1.80058932 2.10936658
30 -2.54307143 1.80058932
31 -0.14322471 -2.54307143
32 5.70811972 -0.14322471
33 -1.74062769 5.70811972
34 3.24470699 -1.74062769
35 -3.18744654 3.24470699
36 -4.10832838 -3.18744654
37 3.23493865 -4.10832838
38 1.05241865 3.23493865
39 -1.02566865 1.05241865
40 3.80297421 -1.02566865
41 -0.01349975 3.80297421
42 2.99020981 -0.01349975
43 5.10705996 2.99020981
44 -3.16607536 5.10705996
45 -0.59230456 -3.16607536
46 1.05618769 -0.59230456
47 -4.05639342 1.05618769
48 -1.79971513 -4.05639342
49 4.72605195 -1.79971513
50 -4.75784631 4.72605195
51 -0.42970265 -4.75784631
52 -0.02369132 -0.42970265
53 -3.43345603 -0.02369132
54 1.07184493 -3.43345603
55 -0.55713098 1.07184493
56 -1.01003899 -0.55713098
57 2.34671083 -1.01003899
58 -2.27802142 2.34671083
59 1.88094061 -2.27802142
60 -1.30827784 1.88094061
61 1.42677755 -1.30827784
62 2.49818646 1.42677755
63 -4.96493681 2.49818646
64 1.55976019 -4.96493681
65 -2.81733511 1.55976019
66 -2.77240863 -2.81733511
67 -0.49406850 -2.77240863
68 0.51214706 -0.49406850
69 -1.75402599 0.51214706
70 -0.76151205 -1.75402599
71 -2.91972646 -0.76151205
72 0.31142935 -2.91972646
73 3.05635171 0.31142935
74 2.83755865 3.05635171
75 -0.84312050 2.83755865
76 3.05729809 -0.84312050
77 0.90151853 3.05729809
78 -1.97297964 0.90151853
79 0.68055178 -1.97297964
80 -0.81293369 0.68055178
81 -1.15748876 -0.81293369
82 0.78311274 -1.15748876
83 1.43347167 0.78311274
84 -1.70038752 1.43347167
85 4.37028185 -1.70038752
86 -0.14388547 4.37028185
87 -2.38253747 -0.14388547
88 -1.83862936 -2.38253747
89 0.53677306 -1.83862936
90 2.02485589 0.53677306
91 -2.66981532 2.02485589
92 -0.57173593 -2.66981532
93 3.26430513 -0.57173593
94 -2.62078653 3.26430513
95 3.71494117 -2.62078653
96 0.77329421 3.71494117
97 2.21072307 0.77329421
98 0.28679811 2.21072307
99 0.32459397 0.28679811
100 0.43814123 0.32459397
101 0.92100912 0.43814123
102 4.52661425 0.92100912
103 0.93097503 4.52661425
104 -2.03652762 0.93097503
105 0.40478614 -2.03652762
106 -2.33257181 0.40478614
107 -1.76778156 -2.33257181
108 0.22625993 -1.76778156
109 2.13412230 0.22625993
110 0.99341780 2.13412230
111 0.27094684 0.99341780
112 -6.52693672 0.27094684
113 0.41508846 -6.52693672
114 -7.14369917 0.41508846
115 2.63651011 -7.14369917
116 2.80307783 2.63651011
117 -2.02360963 2.80307783
118 1.81951084 -2.02360963
119 -1.55179801 1.81951084
120 -4.17623151 -1.55179801
121 0.67897679 -4.17623151
122 -1.05224479 0.67897679
123 -4.75059975 -1.05224479
124 -2.11372458 -4.75059975
125 4.57536491 -2.11372458
126 0.27276965 4.57536491
127 -1.55012245 0.27276965
128 1.18441075 -1.55012245
129 -2.58829750 1.18441075
130 -2.39174152 -2.58829750
131 0.10962984 -2.39174152
132 0.59590426 0.10962984
133 -0.40085847 0.59590426
134 -0.02146829 -0.40085847
135 5.27973660 -0.02146829
136 1.35045491 5.27973660
137 -0.61485576 1.35045491
138 -1.14782467 -0.61485576
139 -4.48504253 -1.14782467
140 -5.53400877 -4.48504253
141 -0.55219594 -5.53400877
142 2.46614644 -0.55219594
143 -2.89401073 2.46614644
144 2.39354712 -2.89401073
145 -0.85161960 2.39354712
146 1.90584530 -0.85161960
147 -1.24689432 1.90584530
148 -0.47653950 -1.24689432
149 -0.44445799 -0.47653950
150 -3.30350807 -0.44445799
151 3.25089635 -3.30350807
152 7.24071497 3.25089635
153 1.85749782 7.24071497
154 3.58830609 1.85749782
155 2.00711389 3.58830609
156 -2.00332089 2.00711389
157 1.10742686 -2.00332089
158 1.13408602 1.10742686
> 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/7kjkh1291135997.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/8kjkh1291135997.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/9kjkh1291135997.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/10ds221291135997.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/11yb081291135997.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/12jbze1291135997.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/13glw51291135997.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/14j3db1291135997.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/15mmbz1291135997.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/16q4s41291135997.tab")
+ }
>
> try(system("convert tmp/1695r1291135997.ps tmp/1695r1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/2695r1291135997.ps tmp/2695r1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/3hi4b1291135997.ps tmp/3hi4b1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/4hi4b1291135997.ps tmp/4hi4b1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/5hi4b1291135997.ps tmp/5hi4b1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/6ralw1291135997.ps tmp/6ralw1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/7kjkh1291135997.ps tmp/7kjkh1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/8kjkh1291135997.ps tmp/8kjkh1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/9kjkh1291135997.ps tmp/9kjkh1291135997.png",intern=TRUE))
character(0)
> try(system("convert tmp/10ds221291135997.ps tmp/10ds221291135997.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
4.126 1.809 9.603