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(11
+ ,12
+ ,24
+ ,7
+ ,8
+ ,25
+ ,17
+ ,8
+ ,30
+ ,10
+ ,8
+ ,19
+ ,12
+ ,9
+ ,22
+ ,12
+ ,7
+ ,22
+ ,11
+ ,4
+ ,25
+ ,11
+ ,11
+ ,23
+ ,12
+ ,7
+ ,17
+ ,13
+ ,7
+ ,21
+ ,14
+ ,12
+ ,19
+ ,16
+ ,10
+ ,19
+ ,11
+ ,10
+ ,15
+ ,10
+ ,8
+ ,16
+ ,11
+ ,8
+ ,23
+ ,15
+ ,4
+ ,27
+ ,9
+ ,9
+ ,22
+ ,11
+ ,8
+ ,14
+ ,17
+ ,7
+ ,22
+ ,17
+ ,11
+ ,23
+ ,11
+ ,9
+ ,23
+ ,18
+ ,11
+ ,21
+ ,14
+ ,13
+ ,19
+ ,10
+ ,8
+ ,18
+ ,11
+ ,8
+ ,20
+ ,15
+ ,9
+ ,23
+ ,15
+ ,6
+ ,25
+ ,13
+ ,9
+ ,19
+ ,16
+ ,9
+ ,24
+ ,13
+ ,6
+ ,22
+ ,9
+ ,6
+ ,25
+ ,18
+ ,16
+ ,26
+ ,18
+ ,5
+ ,29
+ ,12
+ ,7
+ ,32
+ ,17
+ ,9
+ ,25
+ ,9
+ ,6
+ ,29
+ ,9
+ ,6
+ ,28
+ ,12
+ ,5
+ ,17
+ ,18
+ ,12
+ ,28
+ ,12
+ ,7
+ ,29
+ ,18
+ ,10
+ ,26
+ ,14
+ ,9
+ ,25
+ ,15
+ ,8
+ ,14
+ ,16
+ ,5
+ ,25
+ ,10
+ ,8
+ ,26
+ ,11
+ ,8
+ ,20
+ ,14
+ ,10
+ ,18
+ ,9
+ ,6
+ ,32
+ ,12
+ ,8
+ ,25
+ ,17
+ ,7
+ ,25
+ ,5
+ ,4
+ ,23
+ ,12
+ ,8
+ ,21
+ ,12
+ ,8
+ ,20
+ ,6
+ ,4
+ ,15
+ ,24
+ ,20
+ ,30
+ ,12
+ ,8
+ ,24
+ ,12
+ ,8
+ ,26
+ ,14
+ ,6
+ ,24
+ ,7
+ ,4
+ ,22
+ ,13
+ ,8
+ ,14
+ ,12
+ ,9
+ ,24
+ ,13
+ ,6
+ ,24
+ ,14
+ ,7
+ ,24
+ ,8
+ ,9
+ ,24
+ ,11
+ ,5
+ ,19
+ ,9
+ ,5
+ ,31
+ ,11
+ ,8
+ ,22
+ ,13
+ ,8
+ ,27
+ ,10
+ ,6
+ ,19
+ ,11
+ ,8
+ ,25
+ ,12
+ ,7
+ ,20
+ ,9
+ ,7
+ ,21
+ ,15
+ ,9
+ ,27
+ ,18
+ ,11
+ ,23
+ ,15
+ ,6
+ ,25
+ ,12
+ ,8
+ ,20
+ ,13
+ ,6
+ ,21
+ ,14
+ ,9
+ ,22
+ ,10
+ ,8
+ ,23
+ ,13
+ ,6
+ ,25
+ ,13
+ ,10
+ ,25
+ ,11
+ ,8
+ ,17
+ ,13
+ ,8
+ ,19
+ ,16
+ ,10
+ ,25
+ ,8
+ ,5
+ ,19
+ ,16
+ ,7
+ ,20
+ ,11
+ ,5
+ ,26
+ ,9
+ ,8
+ ,23
+ ,16
+ ,14
+ ,27
+ ,12
+ ,7
+ ,17
+ ,14
+ ,8
+ ,17
+ ,8
+ ,6
+ ,19
+ ,9
+ ,5
+ ,17
+ ,15
+ ,6
+ ,22
+ ,11
+ ,10
+ ,21
+ ,21
+ ,12
+ ,32
+ ,14
+ ,9
+ ,21
+ ,18
+ ,12
+ ,21
+ ,12
+ ,7
+ ,18
+ ,13
+ ,8
+ ,18
+ ,15
+ ,10
+ ,23
+ ,12
+ ,6
+ ,19
+ ,19
+ ,10
+ ,20
+ ,15
+ ,10
+ ,21
+ ,11
+ ,10
+ ,20
+ ,11
+ ,5
+ ,17
+ ,10
+ ,7
+ ,18
+ ,13
+ ,10
+ ,19
+ ,15
+ ,11
+ ,22
+ ,12
+ ,6
+ ,15
+ ,12
+ ,7
+ ,14
+ ,16
+ ,12
+ ,18
+ ,9
+ ,11
+ ,24
+ ,18
+ ,11
+ ,35
+ ,8
+ ,11
+ ,29
+ ,13
+ ,5
+ ,21
+ ,17
+ ,8
+ ,25
+ ,9
+ ,6
+ ,20
+ ,15
+ ,9
+ ,22
+ ,8
+ ,4
+ ,13
+ ,7
+ ,4
+ ,26
+ ,12
+ ,7
+ ,17
+ ,14
+ ,11
+ ,25
+ ,6
+ ,6
+ ,20
+ ,8
+ ,7
+ ,19
+ ,17
+ ,8
+ ,21
+ ,10
+ ,4
+ ,22
+ ,11
+ ,8
+ ,24
+ ,14
+ ,9
+ ,21
+ ,11
+ ,8
+ ,26
+ ,13
+ ,11
+ ,24
+ ,12
+ ,8
+ ,16
+ ,11
+ ,5
+ ,23
+ ,9
+ ,4
+ ,18
+ ,12
+ ,8
+ ,16
+ ,20
+ ,10
+ ,26
+ ,12
+ ,6
+ ,19
+ ,13
+ ,9
+ ,21
+ ,12
+ ,9
+ ,21
+ ,12
+ ,13
+ ,22
+ ,9
+ ,9
+ ,23
+ ,15
+ ,10
+ ,29
+ ,24
+ ,20
+ ,21
+ ,7
+ ,5
+ ,21
+ ,17
+ ,11
+ ,23
+ ,11
+ ,6
+ ,27
+ ,17
+ ,9
+ ,25
+ ,11
+ ,7
+ ,21
+ ,12
+ ,9
+ ,10
+ ,14
+ ,10
+ ,20
+ ,11
+ ,9
+ ,26
+ ,16
+ ,8
+ ,24
+ ,21
+ ,7
+ ,29
+ ,14
+ ,6
+ ,19
+ ,20
+ ,13
+ ,24
+ ,13
+ ,6
+ ,19
+ ,11
+ ,8
+ ,24
+ ,15
+ ,10
+ ,22
+ ,19
+ ,16
+ ,17)
+ ,dim=c(3
+ ,159)
+ ,dimnames=list(c('ParExpectations'
+ ,'ParCriticism'
+ ,'PerStandards')
+ ,1:159))
> y <- array(NA,dim=c(3,159),dimnames=list(c('ParExpectations','ParCriticism','PerStandards'),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 = '3'
> #'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
PerStandards ParExpectations ParCriticism
1 24 11 12
2 25 7 8
3 30 17 8
4 19 10 8
5 22 12 9
6 22 12 7
7 25 11 4
8 23 11 11
9 17 12 7
10 21 13 7
11 19 14 12
12 19 16 10
13 15 11 10
14 16 10 8
15 23 11 8
16 27 15 4
17 22 9 9
18 14 11 8
19 22 17 7
20 23 17 11
21 23 11 9
22 21 18 11
23 19 14 13
24 18 10 8
25 20 11 8
26 23 15 9
27 25 15 6
28 19 13 9
29 24 16 9
30 22 13 6
31 25 9 6
32 26 18 16
33 29 18 5
34 32 12 7
35 25 17 9
36 29 9 6
37 28 9 6
38 17 12 5
39 28 18 12
40 29 12 7
41 26 18 10
42 25 14 9
43 14 15 8
44 25 16 5
45 26 10 8
46 20 11 8
47 18 14 10
48 32 9 6
49 25 12 8
50 25 17 7
51 23 5 4
52 21 12 8
53 20 12 8
54 15 6 4
55 30 24 20
56 24 12 8
57 26 12 8
58 24 14 6
59 22 7 4
60 14 13 8
61 24 12 9
62 24 13 6
63 24 14 7
64 24 8 9
65 19 11 5
66 31 9 5
67 22 11 8
68 27 13 8
69 19 10 6
70 25 11 8
71 20 12 7
72 21 9 7
73 27 15 9
74 23 18 11
75 25 15 6
76 20 12 8
77 21 13 6
78 22 14 9
79 23 10 8
80 25 13 6
81 25 13 10
82 17 11 8
83 19 13 8
84 25 16 10
85 19 8 5
86 20 16 7
87 26 11 5
88 23 9 8
89 27 16 14
90 17 12 7
91 17 14 8
92 19 8 6
93 17 9 5
94 22 15 6
95 21 11 10
96 32 21 12
97 21 14 9
98 21 18 12
99 18 12 7
100 18 13 8
101 23 15 10
102 19 12 6
103 20 19 10
104 21 15 10
105 20 11 10
106 17 11 5
107 18 10 7
108 19 13 10
109 22 15 11
110 15 12 6
111 14 12 7
112 18 16 12
113 24 9 11
114 35 18 11
115 29 8 11
116 21 13 5
117 25 17 8
118 20 9 6
119 22 15 9
120 13 8 4
121 26 7 4
122 17 12 7
123 25 14 11
124 20 6 6
125 19 8 7
126 21 17 8
127 22 10 4
128 24 11 8
129 21 14 9
130 26 11 8
131 24 13 11
132 16 12 8
133 23 11 5
134 18 9 4
135 16 12 8
136 26 20 10
137 19 12 6
138 21 13 9
139 21 12 9
140 22 12 13
141 23 9 9
142 29 15 10
143 21 24 20
144 21 7 5
145 23 17 11
146 27 11 6
147 25 17 9
148 21 11 7
149 10 12 9
150 20 14 10
151 26 11 9
152 24 16 8
153 29 21 7
154 19 14 6
155 24 20 13
156 19 13 6
157 24 11 8
158 22 15 10
159 17 19 16
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) ParExpectations ParCriticism
18.38235 0.31304 -0.03185
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-11.8523 -2.9478 -0.2292 2.4607 11.3332
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 18.38235 1.30824 14.051 < 2e-16 ***
ParExpectations 0.31304 0.11804 2.652 0.00883 **
ParCriticism -0.03185 0.15023 -0.212 0.83240
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 4.115 on 156 degrees of freedom
Multiple R-squared: 0.05963, Adjusted R-squared: 0.04758
F-statistic: 4.946 on 2 and 156 DF, p-value: 0.008263
> 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.56808263 0.8638347 0.4319174
[2,] 0.42273981 0.8454796 0.5772602
[3,] 0.28160384 0.5632077 0.7183962
[4,] 0.51955211 0.9608958 0.4804479
[5,] 0.44388230 0.8877646 0.5561177
[6,] 0.45793610 0.9158722 0.5420639
[7,] 0.44431809 0.8886362 0.5556819
[8,] 0.56762681 0.8647464 0.4323732
[9,] 0.60836198 0.7832760 0.3916380
[10,] 0.53653970 0.9269206 0.4634603
[11,] 0.48190199 0.9638040 0.5180980
[12,] 0.41414890 0.8282978 0.5858511
[13,] 0.58435147 0.8312971 0.4156485
[14,] 0.52169977 0.9566005 0.4783002
[15,] 0.45152855 0.9030571 0.5484714
[16,] 0.40014095 0.8002819 0.5998590
[17,] 0.34094879 0.6818976 0.6590512
[18,] 0.28638400 0.5727680 0.7136160
[19,] 0.25842474 0.5168495 0.7415753
[20,] 0.20987195 0.4197439 0.7901280
[21,] 0.16698238 0.3339648 0.8330176
[22,] 0.13469439 0.2693888 0.8653056
[23,] 0.11435661 0.2287132 0.8856434
[24,] 0.08974905 0.1794981 0.9102509
[25,] 0.06714962 0.1342992 0.9328504
[26,] 0.06621342 0.1324268 0.9337866
[27,] 0.08447056 0.1689411 0.9155294
[28,] 0.08506183 0.1701237 0.9149382
[29,] 0.27850268 0.5570054 0.7214973
[30,] 0.23588780 0.4717756 0.7641122
[31,] 0.35287636 0.7057527 0.6471236
[32,] 0.41634075 0.8326815 0.5836593
[33,] 0.50069924 0.9986015 0.4993008
[34,] 0.52366908 0.9526618 0.4763309
[35,] 0.59899289 0.8020142 0.4010071
[36,] 0.55963209 0.8807358 0.4403679
[37,] 0.52201653 0.9559669 0.4779835
[38,] 0.72344744 0.5531051 0.2765526
[39,] 0.68466102 0.6306780 0.3153390
[40,] 0.68964597 0.6207081 0.3103540
[41,] 0.65395534 0.6920893 0.3460447
[42,] 0.65884944 0.6823011 0.3411506
[43,] 0.84688836 0.3062233 0.1531116
[44,] 0.82939311 0.3412138 0.1706069
[45,] 0.80039851 0.3992030 0.1996015
[46,] 0.77591586 0.4481683 0.2240841
[47,] 0.74246244 0.5150751 0.2575376
[48,] 0.71528491 0.5694302 0.2847151
[49,] 0.77273760 0.4545248 0.2272624
[50,] 0.80518275 0.3896345 0.1948172
[51,] 0.77792430 0.4441514 0.2220757
[52,] 0.77300597 0.4539881 0.2269940
[53,] 0.74015234 0.5196953 0.2598477
[54,] 0.70508541 0.5898292 0.2949146
[55,] 0.81934203 0.3613159 0.1806580
[56,] 0.79472291 0.4105542 0.2052771
[57,] 0.76590892 0.4681822 0.2340911
[58,] 0.73337969 0.5332406 0.2666203
[59,] 0.71899289 0.5620142 0.2810071
[60,] 0.70129634 0.5974073 0.2987037
[61,] 0.85685942 0.2862812 0.1431406
[62,] 0.82992518 0.3401496 0.1700748
[63,] 0.83953923 0.3209215 0.1604608
[64,] 0.82268994 0.3546201 0.1773101
[65,] 0.81336906 0.3732619 0.1866309
[66,] 0.79056756 0.4188649 0.2094324
[67,] 0.75734416 0.4853117 0.2426558
[68,] 0.75944632 0.4811074 0.2405537
[69,] 0.72392729 0.5521454 0.2760727
[70,] 0.69899950 0.6020010 0.3010005
[71,] 0.66847441 0.6630512 0.3315256
[72,] 0.63346486 0.7330703 0.3665351
[73,] 0.59116211 0.8176758 0.4088379
[74,] 0.55563588 0.8887282 0.4443641
[75,] 0.53630040 0.9273992 0.4636996
[76,] 0.51422006 0.9715599 0.4857799
[77,] 0.52632707 0.9473459 0.4736729
[78,] 0.50880303 0.9823939 0.4911970
[79,] 0.47503777 0.9500755 0.5249622
[80,] 0.43919285 0.8783857 0.5608072
[81,] 0.42109679 0.8421936 0.5789032
[82,] 0.43786609 0.8757322 0.5621339
[83,] 0.40702944 0.8140589 0.5929706
[84,] 0.40528348 0.8105670 0.5947165
[85,] 0.42111574 0.8422315 0.5788843
[86,] 0.45266438 0.9053288 0.5473356
[87,] 0.41423891 0.8284778 0.5857611
[88,] 0.40711244 0.8142249 0.5928876
[89,] 0.36554682 0.7310936 0.6344532
[90,] 0.32328822 0.6465764 0.6767118
[91,] 0.43320062 0.8664012 0.5667994
[92,] 0.39266972 0.7853394 0.6073303
[93,] 0.36432478 0.7286496 0.6356752
[94,] 0.35412449 0.7082490 0.6458755
[95,] 0.34960383 0.6992077 0.6503962
[96,] 0.30807512 0.6161502 0.6919249
[97,] 0.28332990 0.5666598 0.7166701
[98,] 0.27438533 0.5487707 0.7256147
[99,] 0.24102342 0.4820468 0.7589766
[100,] 0.20891346 0.4178269 0.7910865
[101,] 0.21081215 0.4216243 0.7891878
[102,] 0.19493898 0.3898780 0.8050610
[103,] 0.17866059 0.3573212 0.8213394
[104,] 0.14905284 0.2981057 0.8509472
[105,] 0.19588560 0.3917712 0.8041144
[106,] 0.28796714 0.5759343 0.7120329
[107,] 0.30435871 0.6087174 0.6956413
[108,] 0.28311379 0.5662276 0.7168862
[109,] 0.61494108 0.7701178 0.3850589
[110,] 0.78054915 0.4389017 0.2194509
[111,] 0.74401734 0.5119653 0.2559827
[112,] 0.70754202 0.5849160 0.2924580
[113,] 0.66146935 0.6770613 0.3385307
[114,] 0.61162350 0.7767530 0.3883765
[115,] 0.74737554 0.5052489 0.2526245
[116,] 0.78014819 0.4397036 0.2198518
[117,] 0.79706388 0.4058722 0.2029361
[118,] 0.78567636 0.4286473 0.2143236
[119,] 0.74151041 0.5169792 0.2584896
[120,] 0.69787412 0.6042518 0.3021259
[121,] 0.66504803 0.6699039 0.3349520
[122,] 0.61005365 0.7798927 0.3899464
[123,] 0.58025354 0.8394929 0.4197465
[124,] 0.52474984 0.9505003 0.4752502
[125,] 0.55397297 0.8920541 0.4460270
[126,] 0.53205105 0.9358979 0.4679489
[127,] 0.57436090 0.8512782 0.4256391
[128,] 0.51503782 0.9699244 0.4849622
[129,] 0.49621046 0.9924209 0.5037895
[130,] 0.55624782 0.8875044 0.4437522
[131,] 0.49963902 0.9992780 0.5003610
[132,] 0.48499364 0.9699873 0.5150064
[133,] 0.41876169 0.8375234 0.5812383
[134,] 0.35140345 0.7028069 0.6485966
[135,] 0.30713539 0.6142708 0.6928646
[136,] 0.28183243 0.5636649 0.7181676
[137,] 0.41239408 0.8247882 0.5876059
[138,] 0.35516350 0.7103270 0.6448365
[139,] 0.28255540 0.5651108 0.7174446
[140,] 0.21943322 0.4388664 0.7805668
[141,] 0.26086390 0.5217278 0.7391361
[142,] 0.20385995 0.4077199 0.7961400
[143,] 0.14456815 0.2891363 0.8554319
[144,] 0.57205781 0.8558844 0.4279422
[145,] 0.47142056 0.9428411 0.5285794
[146,] 0.61187849 0.7762430 0.3881215
[147,] 0.47484087 0.9496817 0.5251591
[148,] 0.48460182 0.9692036 0.5153982
> postscript(file="/var/www/html/rcomp/tmp/14e7s1290541556.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/24e7s1290541556.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/3kqw11290541556.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/4kqw11290541556.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/5kqw11290541556.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
2.55632082 4.68111160 6.55068001 -2.25801788 0.14774127 0.08405034
7 8 9 10 11 12
3.30155711 1.52447536 -4.91594966 -1.22899282 -3.38280866 -4.07258591
13 14 15 16 17 18
-6.50737011 -5.25801788 1.42893896 4.04938447 1.08687075 -7.57106104
19 20 21 22 23 24
-1.48116546 -0.35378360 1.46078443 -2.66682676 -3.35096320 -3.25801788
25 26 27 28 29 30
-1.57106104 0.20861179 2.11307540 -3.16530189 0.89556863 -0.26083828
31 32 33 34 35 36
3.99133436 2.49240056 5.14210046 10.08405034 1.58252547 7.99133436
37 38 39 40 41 42
6.99133436 -4.97964059 4.36501870 7.08405034 2.30132777 2.52165495
43 44 45 46 47 48
-8.82323367 1.76818678 4.74198212 -1.57106104 -4.44649959 10.99133436
49 50 51 52 53 54
3.11589581 1.51883454 3.17981607 -0.88410419 -1.88410419 -5.13322709
55 56 57 58 59 60
4.74152345 2.11589581 4.11589581 1.42611856 1.55372975 -8.19714735
61 62 63 64 65 66
2.14774127 1.73916172 1.45796402 3.39991391 -2.66659743 9.95948889
67 68 69 70 71 72
0.42893896 4.80285265 -2.32170880 3.42893896 -1.91594966 0.02317982
73 74 75 76 77 78
4.20861179 -0.66682676 2.11307540 -1.88410419 -1.26083828 -0.47834505
79 80 81 82 83 84
1.74198212 2.73916172 2.86654357 -4.57106104 -3.19714735 1.92741409
85 86 87 88 89 90
-1.72746795 -3.16812230 4.33340257 2.05502528 4.05479595 -4.91594966
91 92 93 94 95 96
-5.51019051 -1.69562248 -4.04051111 -0.88692460 -0.50737011 7.42588922
97 98 99 100 101 102
-1.47834505 -2.63498130 -3.91594966 -4.19714735 0.24045725 -2.94779512
103 104 105 106 107 108
-4.01171539 -1.75954275 -1.50737011 -4.66659743 -3.28986334 -3.13345643
109 110 111 112 113 114
-0.72769728 -6.94779512 -7.91594966 -5.00889498 3.15056167 11.33317324
115 116 117 118 119 120
8.46360483 -1.29268375 1.55068001 -1.00866564 -0.79138821 -7.75931341
121 122 123 124 125 126
5.55372975 -4.91594966 2.58534588 -0.06953616 -1.66377702 -2.44931999
127 128 129 130 131 132
0.61460027 2.42893896 -1.47834505 4.42893896 1.89838904 -5.88410419
133 134 135 136 137 138
1.33340257 -3.07235657 -5.88410419 1.67524146 -2.94779512 -1.16530189
139 140 141 142 143 144
-0.85225873 0.27512312 2.08687075 6.24045725 -4.25847655 0.58557521
145 146 147 148 149 150
-0.35378360 5.36524804 1.58252547 -0.60290650 -11.85225873 -2.44649959
151 152 153 154 155 156
4.46078443 0.86372317 4.26666190 -3.57388144 -0.22922215 -3.26083828
157 158 159
2.42893896 -0.75954275 -6.82064260
> postscript(file="/var/www/html/rcomp/tmp/6pe6f1290541556.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 2.55632082 NA
1 4.68111160 2.55632082
2 6.55068001 4.68111160
3 -2.25801788 6.55068001
4 0.14774127 -2.25801788
5 0.08405034 0.14774127
6 3.30155711 0.08405034
7 1.52447536 3.30155711
8 -4.91594966 1.52447536
9 -1.22899282 -4.91594966
10 -3.38280866 -1.22899282
11 -4.07258591 -3.38280866
12 -6.50737011 -4.07258591
13 -5.25801788 -6.50737011
14 1.42893896 -5.25801788
15 4.04938447 1.42893896
16 1.08687075 4.04938447
17 -7.57106104 1.08687075
18 -1.48116546 -7.57106104
19 -0.35378360 -1.48116546
20 1.46078443 -0.35378360
21 -2.66682676 1.46078443
22 -3.35096320 -2.66682676
23 -3.25801788 -3.35096320
24 -1.57106104 -3.25801788
25 0.20861179 -1.57106104
26 2.11307540 0.20861179
27 -3.16530189 2.11307540
28 0.89556863 -3.16530189
29 -0.26083828 0.89556863
30 3.99133436 -0.26083828
31 2.49240056 3.99133436
32 5.14210046 2.49240056
33 10.08405034 5.14210046
34 1.58252547 10.08405034
35 7.99133436 1.58252547
36 6.99133436 7.99133436
37 -4.97964059 6.99133436
38 4.36501870 -4.97964059
39 7.08405034 4.36501870
40 2.30132777 7.08405034
41 2.52165495 2.30132777
42 -8.82323367 2.52165495
43 1.76818678 -8.82323367
44 4.74198212 1.76818678
45 -1.57106104 4.74198212
46 -4.44649959 -1.57106104
47 10.99133436 -4.44649959
48 3.11589581 10.99133436
49 1.51883454 3.11589581
50 3.17981607 1.51883454
51 -0.88410419 3.17981607
52 -1.88410419 -0.88410419
53 -5.13322709 -1.88410419
54 4.74152345 -5.13322709
55 2.11589581 4.74152345
56 4.11589581 2.11589581
57 1.42611856 4.11589581
58 1.55372975 1.42611856
59 -8.19714735 1.55372975
60 2.14774127 -8.19714735
61 1.73916172 2.14774127
62 1.45796402 1.73916172
63 3.39991391 1.45796402
64 -2.66659743 3.39991391
65 9.95948889 -2.66659743
66 0.42893896 9.95948889
67 4.80285265 0.42893896
68 -2.32170880 4.80285265
69 3.42893896 -2.32170880
70 -1.91594966 3.42893896
71 0.02317982 -1.91594966
72 4.20861179 0.02317982
73 -0.66682676 4.20861179
74 2.11307540 -0.66682676
75 -1.88410419 2.11307540
76 -1.26083828 -1.88410419
77 -0.47834505 -1.26083828
78 1.74198212 -0.47834505
79 2.73916172 1.74198212
80 2.86654357 2.73916172
81 -4.57106104 2.86654357
82 -3.19714735 -4.57106104
83 1.92741409 -3.19714735
84 -1.72746795 1.92741409
85 -3.16812230 -1.72746795
86 4.33340257 -3.16812230
87 2.05502528 4.33340257
88 4.05479595 2.05502528
89 -4.91594966 4.05479595
90 -5.51019051 -4.91594966
91 -1.69562248 -5.51019051
92 -4.04051111 -1.69562248
93 -0.88692460 -4.04051111
94 -0.50737011 -0.88692460
95 7.42588922 -0.50737011
96 -1.47834505 7.42588922
97 -2.63498130 -1.47834505
98 -3.91594966 -2.63498130
99 -4.19714735 -3.91594966
100 0.24045725 -4.19714735
101 -2.94779512 0.24045725
102 -4.01171539 -2.94779512
103 -1.75954275 -4.01171539
104 -1.50737011 -1.75954275
105 -4.66659743 -1.50737011
106 -3.28986334 -4.66659743
107 -3.13345643 -3.28986334
108 -0.72769728 -3.13345643
109 -6.94779512 -0.72769728
110 -7.91594966 -6.94779512
111 -5.00889498 -7.91594966
112 3.15056167 -5.00889498
113 11.33317324 3.15056167
114 8.46360483 11.33317324
115 -1.29268375 8.46360483
116 1.55068001 -1.29268375
117 -1.00866564 1.55068001
118 -0.79138821 -1.00866564
119 -7.75931341 -0.79138821
120 5.55372975 -7.75931341
121 -4.91594966 5.55372975
122 2.58534588 -4.91594966
123 -0.06953616 2.58534588
124 -1.66377702 -0.06953616
125 -2.44931999 -1.66377702
126 0.61460027 -2.44931999
127 2.42893896 0.61460027
128 -1.47834505 2.42893896
129 4.42893896 -1.47834505
130 1.89838904 4.42893896
131 -5.88410419 1.89838904
132 1.33340257 -5.88410419
133 -3.07235657 1.33340257
134 -5.88410419 -3.07235657
135 1.67524146 -5.88410419
136 -2.94779512 1.67524146
137 -1.16530189 -2.94779512
138 -0.85225873 -1.16530189
139 0.27512312 -0.85225873
140 2.08687075 0.27512312
141 6.24045725 2.08687075
142 -4.25847655 6.24045725
143 0.58557521 -4.25847655
144 -0.35378360 0.58557521
145 5.36524804 -0.35378360
146 1.58252547 5.36524804
147 -0.60290650 1.58252547
148 -11.85225873 -0.60290650
149 -2.44649959 -11.85225873
150 4.46078443 -2.44649959
151 0.86372317 4.46078443
152 4.26666190 0.86372317
153 -3.57388144 4.26666190
154 -0.22922215 -3.57388144
155 -3.26083828 -0.22922215
156 2.42893896 -3.26083828
157 -0.75954275 2.42893896
158 -6.82064260 -0.75954275
159 NA -6.82064260
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 4.68111160 2.55632082
[2,] 6.55068001 4.68111160
[3,] -2.25801788 6.55068001
[4,] 0.14774127 -2.25801788
[5,] 0.08405034 0.14774127
[6,] 3.30155711 0.08405034
[7,] 1.52447536 3.30155711
[8,] -4.91594966 1.52447536
[9,] -1.22899282 -4.91594966
[10,] -3.38280866 -1.22899282
[11,] -4.07258591 -3.38280866
[12,] -6.50737011 -4.07258591
[13,] -5.25801788 -6.50737011
[14,] 1.42893896 -5.25801788
[15,] 4.04938447 1.42893896
[16,] 1.08687075 4.04938447
[17,] -7.57106104 1.08687075
[18,] -1.48116546 -7.57106104
[19,] -0.35378360 -1.48116546
[20,] 1.46078443 -0.35378360
[21,] -2.66682676 1.46078443
[22,] -3.35096320 -2.66682676
[23,] -3.25801788 -3.35096320
[24,] -1.57106104 -3.25801788
[25,] 0.20861179 -1.57106104
[26,] 2.11307540 0.20861179
[27,] -3.16530189 2.11307540
[28,] 0.89556863 -3.16530189
[29,] -0.26083828 0.89556863
[30,] 3.99133436 -0.26083828
[31,] 2.49240056 3.99133436
[32,] 5.14210046 2.49240056
[33,] 10.08405034 5.14210046
[34,] 1.58252547 10.08405034
[35,] 7.99133436 1.58252547
[36,] 6.99133436 7.99133436
[37,] -4.97964059 6.99133436
[38,] 4.36501870 -4.97964059
[39,] 7.08405034 4.36501870
[40,] 2.30132777 7.08405034
[41,] 2.52165495 2.30132777
[42,] -8.82323367 2.52165495
[43,] 1.76818678 -8.82323367
[44,] 4.74198212 1.76818678
[45,] -1.57106104 4.74198212
[46,] -4.44649959 -1.57106104
[47,] 10.99133436 -4.44649959
[48,] 3.11589581 10.99133436
[49,] 1.51883454 3.11589581
[50,] 3.17981607 1.51883454
[51,] -0.88410419 3.17981607
[52,] -1.88410419 -0.88410419
[53,] -5.13322709 -1.88410419
[54,] 4.74152345 -5.13322709
[55,] 2.11589581 4.74152345
[56,] 4.11589581 2.11589581
[57,] 1.42611856 4.11589581
[58,] 1.55372975 1.42611856
[59,] -8.19714735 1.55372975
[60,] 2.14774127 -8.19714735
[61,] 1.73916172 2.14774127
[62,] 1.45796402 1.73916172
[63,] 3.39991391 1.45796402
[64,] -2.66659743 3.39991391
[65,] 9.95948889 -2.66659743
[66,] 0.42893896 9.95948889
[67,] 4.80285265 0.42893896
[68,] -2.32170880 4.80285265
[69,] 3.42893896 -2.32170880
[70,] -1.91594966 3.42893896
[71,] 0.02317982 -1.91594966
[72,] 4.20861179 0.02317982
[73,] -0.66682676 4.20861179
[74,] 2.11307540 -0.66682676
[75,] -1.88410419 2.11307540
[76,] -1.26083828 -1.88410419
[77,] -0.47834505 -1.26083828
[78,] 1.74198212 -0.47834505
[79,] 2.73916172 1.74198212
[80,] 2.86654357 2.73916172
[81,] -4.57106104 2.86654357
[82,] -3.19714735 -4.57106104
[83,] 1.92741409 -3.19714735
[84,] -1.72746795 1.92741409
[85,] -3.16812230 -1.72746795
[86,] 4.33340257 -3.16812230
[87,] 2.05502528 4.33340257
[88,] 4.05479595 2.05502528
[89,] -4.91594966 4.05479595
[90,] -5.51019051 -4.91594966
[91,] -1.69562248 -5.51019051
[92,] -4.04051111 -1.69562248
[93,] -0.88692460 -4.04051111
[94,] -0.50737011 -0.88692460
[95,] 7.42588922 -0.50737011
[96,] -1.47834505 7.42588922
[97,] -2.63498130 -1.47834505
[98,] -3.91594966 -2.63498130
[99,] -4.19714735 -3.91594966
[100,] 0.24045725 -4.19714735
[101,] -2.94779512 0.24045725
[102,] -4.01171539 -2.94779512
[103,] -1.75954275 -4.01171539
[104,] -1.50737011 -1.75954275
[105,] -4.66659743 -1.50737011
[106,] -3.28986334 -4.66659743
[107,] -3.13345643 -3.28986334
[108,] -0.72769728 -3.13345643
[109,] -6.94779512 -0.72769728
[110,] -7.91594966 -6.94779512
[111,] -5.00889498 -7.91594966
[112,] 3.15056167 -5.00889498
[113,] 11.33317324 3.15056167
[114,] 8.46360483 11.33317324
[115,] -1.29268375 8.46360483
[116,] 1.55068001 -1.29268375
[117,] -1.00866564 1.55068001
[118,] -0.79138821 -1.00866564
[119,] -7.75931341 -0.79138821
[120,] 5.55372975 -7.75931341
[121,] -4.91594966 5.55372975
[122,] 2.58534588 -4.91594966
[123,] -0.06953616 2.58534588
[124,] -1.66377702 -0.06953616
[125,] -2.44931999 -1.66377702
[126,] 0.61460027 -2.44931999
[127,] 2.42893896 0.61460027
[128,] -1.47834505 2.42893896
[129,] 4.42893896 -1.47834505
[130,] 1.89838904 4.42893896
[131,] -5.88410419 1.89838904
[132,] 1.33340257 -5.88410419
[133,] -3.07235657 1.33340257
[134,] -5.88410419 -3.07235657
[135,] 1.67524146 -5.88410419
[136,] -2.94779512 1.67524146
[137,] -1.16530189 -2.94779512
[138,] -0.85225873 -1.16530189
[139,] 0.27512312 -0.85225873
[140,] 2.08687075 0.27512312
[141,] 6.24045725 2.08687075
[142,] -4.25847655 6.24045725
[143,] 0.58557521 -4.25847655
[144,] -0.35378360 0.58557521
[145,] 5.36524804 -0.35378360
[146,] 1.58252547 5.36524804
[147,] -0.60290650 1.58252547
[148,] -11.85225873 -0.60290650
[149,] -2.44649959 -11.85225873
[150,] 4.46078443 -2.44649959
[151,] 0.86372317 4.46078443
[152,] 4.26666190 0.86372317
[153,] -3.57388144 4.26666190
[154,] -0.22922215 -3.57388144
[155,] -3.26083828 -0.22922215
[156,] 2.42893896 -3.26083828
[157,] -0.75954275 2.42893896
[158,] -6.82064260 -0.75954275
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 4.68111160 2.55632082
2 6.55068001 4.68111160
3 -2.25801788 6.55068001
4 0.14774127 -2.25801788
5 0.08405034 0.14774127
6 3.30155711 0.08405034
7 1.52447536 3.30155711
8 -4.91594966 1.52447536
9 -1.22899282 -4.91594966
10 -3.38280866 -1.22899282
11 -4.07258591 -3.38280866
12 -6.50737011 -4.07258591
13 -5.25801788 -6.50737011
14 1.42893896 -5.25801788
15 4.04938447 1.42893896
16 1.08687075 4.04938447
17 -7.57106104 1.08687075
18 -1.48116546 -7.57106104
19 -0.35378360 -1.48116546
20 1.46078443 -0.35378360
21 -2.66682676 1.46078443
22 -3.35096320 -2.66682676
23 -3.25801788 -3.35096320
24 -1.57106104 -3.25801788
25 0.20861179 -1.57106104
26 2.11307540 0.20861179
27 -3.16530189 2.11307540
28 0.89556863 -3.16530189
29 -0.26083828 0.89556863
30 3.99133436 -0.26083828
31 2.49240056 3.99133436
32 5.14210046 2.49240056
33 10.08405034 5.14210046
34 1.58252547 10.08405034
35 7.99133436 1.58252547
36 6.99133436 7.99133436
37 -4.97964059 6.99133436
38 4.36501870 -4.97964059
39 7.08405034 4.36501870
40 2.30132777 7.08405034
41 2.52165495 2.30132777
42 -8.82323367 2.52165495
43 1.76818678 -8.82323367
44 4.74198212 1.76818678
45 -1.57106104 4.74198212
46 -4.44649959 -1.57106104
47 10.99133436 -4.44649959
48 3.11589581 10.99133436
49 1.51883454 3.11589581
50 3.17981607 1.51883454
51 -0.88410419 3.17981607
52 -1.88410419 -0.88410419
53 -5.13322709 -1.88410419
54 4.74152345 -5.13322709
55 2.11589581 4.74152345
56 4.11589581 2.11589581
57 1.42611856 4.11589581
58 1.55372975 1.42611856
59 -8.19714735 1.55372975
60 2.14774127 -8.19714735
61 1.73916172 2.14774127
62 1.45796402 1.73916172
63 3.39991391 1.45796402
64 -2.66659743 3.39991391
65 9.95948889 -2.66659743
66 0.42893896 9.95948889
67 4.80285265 0.42893896
68 -2.32170880 4.80285265
69 3.42893896 -2.32170880
70 -1.91594966 3.42893896
71 0.02317982 -1.91594966
72 4.20861179 0.02317982
73 -0.66682676 4.20861179
74 2.11307540 -0.66682676
75 -1.88410419 2.11307540
76 -1.26083828 -1.88410419
77 -0.47834505 -1.26083828
78 1.74198212 -0.47834505
79 2.73916172 1.74198212
80 2.86654357 2.73916172
81 -4.57106104 2.86654357
82 -3.19714735 -4.57106104
83 1.92741409 -3.19714735
84 -1.72746795 1.92741409
85 -3.16812230 -1.72746795
86 4.33340257 -3.16812230
87 2.05502528 4.33340257
88 4.05479595 2.05502528
89 -4.91594966 4.05479595
90 -5.51019051 -4.91594966
91 -1.69562248 -5.51019051
92 -4.04051111 -1.69562248
93 -0.88692460 -4.04051111
94 -0.50737011 -0.88692460
95 7.42588922 -0.50737011
96 -1.47834505 7.42588922
97 -2.63498130 -1.47834505
98 -3.91594966 -2.63498130
99 -4.19714735 -3.91594966
100 0.24045725 -4.19714735
101 -2.94779512 0.24045725
102 -4.01171539 -2.94779512
103 -1.75954275 -4.01171539
104 -1.50737011 -1.75954275
105 -4.66659743 -1.50737011
106 -3.28986334 -4.66659743
107 -3.13345643 -3.28986334
108 -0.72769728 -3.13345643
109 -6.94779512 -0.72769728
110 -7.91594966 -6.94779512
111 -5.00889498 -7.91594966
112 3.15056167 -5.00889498
113 11.33317324 3.15056167
114 8.46360483 11.33317324
115 -1.29268375 8.46360483
116 1.55068001 -1.29268375
117 -1.00866564 1.55068001
118 -0.79138821 -1.00866564
119 -7.75931341 -0.79138821
120 5.55372975 -7.75931341
121 -4.91594966 5.55372975
122 2.58534588 -4.91594966
123 -0.06953616 2.58534588
124 -1.66377702 -0.06953616
125 -2.44931999 -1.66377702
126 0.61460027 -2.44931999
127 2.42893896 0.61460027
128 -1.47834505 2.42893896
129 4.42893896 -1.47834505
130 1.89838904 4.42893896
131 -5.88410419 1.89838904
132 1.33340257 -5.88410419
133 -3.07235657 1.33340257
134 -5.88410419 -3.07235657
135 1.67524146 -5.88410419
136 -2.94779512 1.67524146
137 -1.16530189 -2.94779512
138 -0.85225873 -1.16530189
139 0.27512312 -0.85225873
140 2.08687075 0.27512312
141 6.24045725 2.08687075
142 -4.25847655 6.24045725
143 0.58557521 -4.25847655
144 -0.35378360 0.58557521
145 5.36524804 -0.35378360
146 1.58252547 5.36524804
147 -0.60290650 1.58252547
148 -11.85225873 -0.60290650
149 -2.44649959 -11.85225873
150 4.46078443 -2.44649959
151 0.86372317 4.46078443
152 4.26666190 0.86372317
153 -3.57388144 4.26666190
154 -0.22922215 -3.57388144
155 -3.26083828 -0.22922215
156 2.42893896 -3.26083828
157 -0.75954275 2.42893896
158 -6.82064260 -0.75954275
> 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/7ion11290541556.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/8ion11290541556.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/9bf5l1290541556.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/10bf5l1290541556.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/11wx3r1290541556.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/12zgjf1290541556.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/13ohy91290541556.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/14hqgu1290541556.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/152rwi1290541556.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/16gicq1290541556.tab")
+ }
>
> try(system("convert tmp/14e7s1290541556.ps tmp/14e7s1290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/24e7s1290541556.ps tmp/24e7s1290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/3kqw11290541556.ps tmp/3kqw11290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/4kqw11290541556.ps tmp/4kqw11290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/5kqw11290541556.ps tmp/5kqw11290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/6pe6f1290541556.ps tmp/6pe6f1290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/7ion11290541556.ps tmp/7ion11290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/8ion11290541556.ps tmp/8ion11290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/9bf5l1290541556.ps tmp/9bf5l1290541556.png",intern=TRUE))
character(0)
> try(system("convert tmp/10bf5l1290541556.ps tmp/10bf5l1290541556.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.791 1.714 8.422