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(13
+ ,14
+ ,5
+ ,12
+ ,18
+ ,3
+ ,15
+ ,11
+ ,0
+ ,12
+ ,12
+ ,7
+ ,10
+ ,16
+ ,4
+ ,12
+ ,18
+ ,1
+ ,15
+ ,14
+ ,6
+ ,9
+ ,14
+ ,3
+ ,12
+ ,15
+ ,12
+ ,11
+ ,15
+ ,0
+ ,11
+ ,17
+ ,5
+ ,11
+ ,19
+ ,6
+ ,15
+ ,10
+ ,6
+ ,7
+ ,16
+ ,6
+ ,11
+ ,18
+ ,2
+ ,11
+ ,14
+ ,1
+ ,10
+ ,14
+ ,5
+ ,14
+ ,17
+ ,7
+ ,10
+ ,14
+ ,3
+ ,6
+ ,16
+ ,3
+ ,11
+ ,18
+ ,3
+ ,15
+ ,11
+ ,7
+ ,11
+ ,14
+ ,8
+ ,12
+ ,12
+ ,6
+ ,14
+ ,17
+ ,3
+ ,15
+ ,9
+ ,5
+ ,9
+ ,16
+ ,5
+ ,13
+ ,14
+ ,10
+ ,13
+ ,15
+ ,2
+ ,16
+ ,11
+ ,6
+ ,13
+ ,16
+ ,4
+ ,12
+ ,13
+ ,6
+ ,14
+ ,17
+ ,8
+ ,11
+ ,15
+ ,4
+ ,9
+ ,14
+ ,5
+ ,16
+ ,16
+ ,10
+ ,12
+ ,9
+ ,6
+ ,10
+ ,15
+ ,7
+ ,13
+ ,17
+ ,4
+ ,16
+ ,13
+ ,10
+ ,14
+ ,15
+ ,4
+ ,15
+ ,16
+ ,3
+ ,5
+ ,16
+ ,3
+ ,8
+ ,12
+ ,3
+ ,11
+ ,12
+ ,3
+ ,16
+ ,11
+ ,7
+ ,17
+ ,15
+ ,15
+ ,9
+ ,15
+ ,0
+ ,9
+ ,17
+ ,0
+ ,13
+ ,13
+ ,4
+ ,10
+ ,16
+ ,5
+ ,6
+ ,14
+ ,5
+ ,12
+ ,11
+ ,2
+ ,8
+ ,12
+ ,3
+ ,14
+ ,12
+ ,0
+ ,12
+ ,15
+ ,9
+ ,11
+ ,16
+ ,2
+ ,16
+ ,15
+ ,7
+ ,8
+ ,12
+ ,7
+ ,15
+ ,12
+ ,0
+ ,7
+ ,8
+ ,0
+ ,16
+ ,13
+ ,10
+ ,14
+ ,11
+ ,2
+ ,16
+ ,14
+ ,1
+ ,9
+ ,15
+ ,8
+ ,14
+ ,10
+ ,6
+ ,11
+ ,11
+ ,11
+ ,13
+ ,12
+ ,3
+ ,15
+ ,15
+ ,8
+ ,5
+ ,15
+ ,6
+ ,15
+ ,14
+ ,9
+ ,13
+ ,16
+ ,9
+ ,11
+ ,15
+ ,8
+ ,11
+ ,15
+ ,8
+ ,12
+ ,13
+ ,7
+ ,12
+ ,12
+ ,6
+ ,12
+ ,17
+ ,5
+ ,12
+ ,13
+ ,4
+ ,14
+ ,15
+ ,6
+ ,6
+ ,13
+ ,3
+ ,7
+ ,15
+ ,2
+ ,14
+ ,16
+ ,12
+ ,14
+ ,15
+ ,8
+ ,10
+ ,16
+ ,5
+ ,13
+ ,15
+ ,9
+ ,12
+ ,14
+ ,6
+ ,9
+ ,15
+ ,5
+ ,12
+ ,14
+ ,2
+ ,16
+ ,13
+ ,4
+ ,10
+ ,7
+ ,7
+ ,14
+ ,17
+ ,5
+ ,10
+ ,13
+ ,6
+ ,16
+ ,15
+ ,7
+ ,15
+ ,14
+ ,8
+ ,12
+ ,13
+ ,6
+ ,10
+ ,16
+ ,0
+ ,8
+ ,12
+ ,1
+ ,8
+ ,14
+ ,5
+ ,11
+ ,17
+ ,5
+ ,13
+ ,15
+ ,5
+ ,16
+ ,17
+ ,7
+ ,16
+ ,12
+ ,7
+ ,14
+ ,16
+ ,1
+ ,11
+ ,11
+ ,3
+ ,4
+ ,15
+ ,4
+ ,14
+ ,9
+ ,8
+ ,9
+ ,16
+ ,6
+ ,14
+ ,15
+ ,6
+ ,8
+ ,10
+ ,2
+ ,8
+ ,10
+ ,2
+ ,11
+ ,15
+ ,3
+ ,12
+ ,11
+ ,3
+ ,11
+ ,13
+ ,0
+ ,14
+ ,14
+ ,2
+ ,15
+ ,18
+ ,8
+ ,16
+ ,16
+ ,8
+ ,16
+ ,14
+ ,0
+ ,11
+ ,14
+ ,5
+ ,14
+ ,14
+ ,9
+ ,14
+ ,14
+ ,6
+ ,12
+ ,12
+ ,6
+ ,14
+ ,14
+ ,3
+ ,8
+ ,15
+ ,9
+ ,13
+ ,15
+ ,7
+ ,16
+ ,15
+ ,8
+ ,12
+ ,13
+ ,0
+ ,16
+ ,17
+ ,7
+ ,12
+ ,17
+ ,0
+ ,11
+ ,19
+ ,5
+ ,4
+ ,15
+ ,0
+ ,16
+ ,13
+ ,14
+ ,15
+ ,9
+ ,5
+ ,10
+ ,15
+ ,2
+ ,13
+ ,15
+ ,8
+ ,15
+ ,15
+ ,4
+ ,12
+ ,16
+ ,2
+ ,14
+ ,11
+ ,6
+ ,7
+ ,14
+ ,3
+ ,19
+ ,11
+ ,5
+ ,12
+ ,15
+ ,9
+ ,12
+ ,13
+ ,3
+ ,13
+ ,15
+ ,3
+ ,15
+ ,16
+ ,0
+ ,8
+ ,14
+ ,10
+ ,12
+ ,15
+ ,4
+ ,10
+ ,16
+ ,2
+ ,8
+ ,16
+ ,3
+ ,10
+ ,11
+ ,10
+ ,15
+ ,12
+ ,7
+ ,16
+ ,9
+ ,0
+ ,13
+ ,16
+ ,6
+ ,16
+ ,13
+ ,8
+ ,9
+ ,16
+ ,0
+ ,14
+ ,12
+ ,4
+ ,14
+ ,9
+ ,10
+ ,12
+ ,13
+ ,5)
+ ,dim=c(3
+ ,156)
+ ,dimnames=list(c('IEP'
+ ,'HS'
+ ,'WP')
+ ,1:156))
> y <- array(NA,dim=c(3,156),dimnames=list(c('IEP','HS','WP'),1:156))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '2'
> #'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
HS IEP WP
1 14 13 5
2 18 12 3
3 11 15 0
4 12 12 7
5 16 10 4
6 18 12 1
7 14 15 6
8 14 9 3
9 15 12 12
10 15 11 0
11 17 11 5
12 19 11 6
13 10 15 6
14 16 7 6
15 18 11 2
16 14 11 1
17 14 10 5
18 17 14 7
19 14 10 3
20 16 6 3
21 18 11 3
22 11 15 7
23 14 11 8
24 12 12 6
25 17 14 3
26 9 15 5
27 16 9 5
28 14 13 10
29 15 13 2
30 11 16 6
31 16 13 4
32 13 12 6
33 17 14 8
34 15 11 4
35 14 9 5
36 16 16 10
37 9 12 6
38 15 10 7
39 17 13 4
40 13 16 10
41 15 14 4
42 16 15 3
43 16 5 3
44 12 8 3
45 12 11 3
46 11 16 7
47 15 17 15
48 15 9 0
49 17 9 0
50 13 13 4
51 16 10 5
52 14 6 5
53 11 12 2
54 12 8 3
55 12 14 0
56 15 12 9
57 16 11 2
58 15 16 7
59 12 8 7
60 12 15 0
61 8 7 0
62 13 16 10
63 11 14 2
64 14 16 1
65 15 9 8
66 10 14 6
67 11 11 11
68 12 13 3
69 15 15 8
70 15 5 6
71 14 15 9
72 16 13 9
73 15 11 8
74 15 11 8
75 13 12 7
76 12 12 6
77 17 12 5
78 13 12 4
79 15 14 6
80 13 6 3
81 15 7 2
82 16 14 12
83 15 14 8
84 16 10 5
85 15 13 9
86 14 12 6
87 15 9 5
88 14 12 2
89 13 16 4
90 7 10 7
91 17 14 5
92 13 10 6
93 15 16 7
94 14 15 8
95 13 12 6
96 16 10 0
97 12 8 1
98 14 8 5
99 17 11 5
100 15 13 5
101 17 16 7
102 12 16 7
103 16 14 1
104 11 11 3
105 15 4 4
106 9 14 8
107 16 9 6
108 15 14 6
109 10 8 2
110 10 8 2
111 15 11 3
112 11 12 3
113 13 11 0
114 14 14 2
115 18 15 8
116 16 16 8
117 14 16 0
118 14 11 5
119 14 14 9
120 14 14 6
121 12 12 6
122 14 14 3
123 15 8 9
124 15 13 7
125 15 16 8
126 13 12 0
127 17 16 7
128 17 12 0
129 19 11 5
130 15 4 0
131 13 16 14
132 9 15 5
133 15 10 2
134 15 13 8
135 15 15 4
136 16 12 2
137 11 14 6
138 14 7 3
139 11 19 5
140 15 12 9
141 13 12 3
142 15 13 3
143 16 15 0
144 14 8 10
145 15 12 4
146 16 10 2
147 16 8 3
148 11 10 10
149 12 15 7
150 9 16 0
151 16 13 6
152 13 16 8
153 16 9 0
154 12 14 4
155 9 14 10
156 13 12 5
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) IEP WP
15.01800 -0.08583 0.01084
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.2355 -1.5818 0.3037 1.5474 4.8720
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.01800 0.79794 18.821 <2e-16 ***
IEP -0.08583 0.06692 -1.283 0.202
WP 0.01084 0.06313 0.172 0.864
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.341 on 153 degrees of freedom
Multiple R-squared: 0.01092, Adjusted R-squared: -0.002009
F-statistic: 0.8446 on 2 and 153 DF, p-value: 0.4317
> 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.6375511 0.7248979 0.3624489
[2,] 0.7206178 0.5587644 0.2793822
[3,] 0.7631831 0.4736338 0.2368169
[4,] 0.6826446 0.6347109 0.3173554
[5,] 0.5771834 0.8456332 0.4228166
[6,] 0.5306296 0.9387408 0.4693704
[7,] 0.6449952 0.7100097 0.3550048
[8,] 0.6897514 0.6204971 0.3102486
[9,] 0.6784237 0.6431527 0.3215763
[10,] 0.6848308 0.6303383 0.3151692
[11,] 0.6464094 0.7071811 0.3535906
[12,] 0.6161225 0.7677550 0.3838775
[13,] 0.6767741 0.6464518 0.3232259
[14,] 0.6432067 0.7135867 0.3567933
[15,] 0.5937436 0.8125128 0.4062564
[16,] 0.6301872 0.7396257 0.3698128
[17,] 0.6465114 0.7069772 0.3534886
[18,] 0.5918521 0.8162959 0.4081479
[19,] 0.6013391 0.7973217 0.3986609
[20,] 0.6390630 0.7218740 0.3609370
[21,] 0.7730889 0.4538222 0.2269111
[22,] 0.7297526 0.5404949 0.2702474
[23,] 0.6778862 0.6442276 0.3221138
[24,] 0.6268630 0.7462741 0.3731370
[25,] 0.6030669 0.7938661 0.3969331
[26,] 0.5839609 0.8320781 0.4160391
[27,] 0.5454977 0.9090047 0.4545023
[28,] 0.6235739 0.7528522 0.3764261
[29,] 0.5710892 0.8578216 0.4289108
[30,] 0.5467934 0.9064132 0.4532066
[31,] 0.5866127 0.8267745 0.4133873
[32,] 0.7908767 0.4182467 0.2091233
[33,] 0.7518649 0.4962703 0.2481351
[34,] 0.7703254 0.4593491 0.2296746
[35,] 0.7294493 0.5411013 0.2705507
[36,] 0.6932623 0.6134754 0.3067377
[37,] 0.6869604 0.6260792 0.3130396
[38,] 0.6545579 0.6908843 0.3454421
[39,] 0.7043891 0.5912217 0.2956109
[40,] 0.7155990 0.5688020 0.2844010
[41,] 0.7209914 0.5580172 0.2790086
[42,] 0.7063900 0.5872200 0.2936100
[43,] 0.6660266 0.6679467 0.3339734
[44,] 0.6640840 0.6718320 0.3359160
[45,] 0.6288517 0.7422966 0.3711483
[46,] 0.6001598 0.7996805 0.3998402
[47,] 0.5746373 0.8507255 0.4253627
[48,] 0.6203463 0.7593074 0.3796537
[49,] 0.6432469 0.7135061 0.3567531
[50,] 0.6248634 0.7502731 0.3751366
[51,] 0.5834084 0.8331832 0.4165916
[52,] 0.5631237 0.8737525 0.4368763
[53,] 0.5319192 0.9361616 0.4680808
[54,] 0.5510457 0.8979087 0.4489543
[55,] 0.5288732 0.9422536 0.4711268
[56,] 0.8093885 0.3812230 0.1906115
[57,] 0.7796102 0.4407797 0.2203898
[58,] 0.7922683 0.4154634 0.2077317
[59,] 0.7588372 0.4823256 0.2411628
[60,] 0.7238343 0.5523315 0.2761657
[61,] 0.7851762 0.4296477 0.2148238
[62,] 0.8138980 0.3722040 0.1861020
[63,] 0.8027153 0.3945693 0.1972847
[64,] 0.7780820 0.4438361 0.2219180
[65,] 0.7437508 0.5124983 0.2562492
[66,] 0.7052087 0.5895825 0.2947913
[67,] 0.6936419 0.6127162 0.3063581
[68,] 0.6573115 0.6853771 0.3426885
[69,] 0.6196638 0.7606724 0.3803362
[70,] 0.5838811 0.8322377 0.4161189
[71,] 0.5723094 0.8553812 0.4276906
[72,] 0.5982460 0.8035079 0.4017540
[73,] 0.5613407 0.8773187 0.4386593
[74,] 0.5259274 0.9481452 0.4740726
[75,] 0.4996779 0.9993559 0.5003221
[76,] 0.4565877 0.9131754 0.5434123
[77,] 0.4471004 0.8942009 0.5528996
[78,] 0.4121516 0.8243033 0.5878484
[79,] 0.3944952 0.7889904 0.6055048
[80,] 0.3602431 0.7204862 0.6397569
[81,] 0.3179232 0.6358465 0.6820768
[82,] 0.2825351 0.5650702 0.7174649
[83,] 0.2444528 0.4889055 0.7555472
[84,] 0.2123775 0.4247549 0.7876225
[85,] 0.5596624 0.8806753 0.4403376
[86,] 0.5950368 0.8099264 0.4049632
[87,] 0.5599247 0.8801506 0.4400753
[88,] 0.5275250 0.9449500 0.4724750
[89,] 0.4809214 0.9618428 0.5190786
[90,] 0.4420467 0.8840934 0.5579533
[91,] 0.4230614 0.8461228 0.5769386
[92,] 0.4212375 0.8424750 0.5787625
[93,] 0.3759341 0.7518682 0.6240659
[94,] 0.3993103 0.7986205 0.6006897
[95,] 0.3632230 0.7264459 0.6367770
[96,] 0.4119729 0.8239458 0.5880271
[97,] 0.3860087 0.7720174 0.6139913
[98,] 0.3793040 0.7586080 0.6206960
[99,] 0.4098049 0.8196098 0.5901951
[100,] 0.3631637 0.7263275 0.6368363
[101,] 0.5118987 0.9762027 0.4881013
[102,] 0.4894273 0.9788545 0.5105727
[103,] 0.4521011 0.9042022 0.5478989
[104,] 0.5746278 0.8507443 0.4253722
[105,] 0.7126451 0.5747099 0.2873549
[106,] 0.6713500 0.6572999 0.3286500
[107,] 0.7109176 0.5781648 0.2890824
[108,] 0.6842882 0.6314236 0.3157118
[109,] 0.6356151 0.7287698 0.3643849
[110,] 0.7642658 0.4714684 0.2357342
[111,] 0.7873942 0.4252116 0.2126058
[112,] 0.7462002 0.5075995 0.2537998
[113,] 0.7003772 0.5992456 0.2996228
[114,] 0.6551892 0.6896217 0.3448108
[115,] 0.6041303 0.7917394 0.3958697
[116,] 0.5899992 0.8200015 0.4100008
[117,] 0.5336641 0.9326719 0.4663359
[118,] 0.4775304 0.9550607 0.5224696
[119,] 0.4373075 0.8746151 0.5626925
[120,] 0.4272912 0.8545825 0.5727088
[121,] 0.3939236 0.7878472 0.6060764
[122,] 0.5336845 0.9326310 0.4663155
[123,] 0.5487415 0.9025170 0.4512585
[124,] 0.7691809 0.4616382 0.2308191
[125,] 0.7523703 0.4952594 0.2476297
[126,] 0.7599075 0.4801851 0.2400925
[127,] 0.8546196 0.2907608 0.1453804
[128,] 0.8110840 0.3778319 0.1889160
[129,] 0.8151366 0.3697269 0.1848634
[130,] 0.8131313 0.3737374 0.1868687
[131,] 0.7949146 0.4101708 0.2050854
[132,] 0.7743917 0.4512165 0.2256083
[133,] 0.7632601 0.4734797 0.2367399
[134,] 0.7042479 0.5915042 0.2957521
[135,] 0.7162758 0.5674484 0.2837242
[136,] 0.6602938 0.6794125 0.3397062
[137,] 0.6006425 0.7987149 0.3993575
[138,] 0.6401541 0.7196918 0.3598459
[139,] 0.5473333 0.9053334 0.4526667
[140,] 0.4853969 0.9707937 0.5146031
[141,] 0.4083044 0.8166088 0.5916956
[142,] 0.3102276 0.6204553 0.6897724
[143,] 0.3835835 0.7671670 0.6164165
[144,] 0.2661909 0.5323817 0.7338091
[145,] 0.3473705 0.6947411 0.6526295
> postscript(file="/var/www/html/rcomp/tmp/1m7hu1292931204.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/2m7hu1292931204.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/3m7hu1292931204.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/4xyyf1292931204.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/5xyyf1292931204.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 156
Frequency = 1
1 2 3 4 5 6
0.043660342 3.979502906 -2.730478126 -2.063851166 1.796995445 4.001179942
7 8 9 10 11 12
0.204490766 -0.278000508 0.881956244 0.926183988 2.871991399 4.861152881
13 14 15 16 17 18
-3.795509234 1.517814995 3.904506953 -0.084654530 -0.213843073 3.107817777
19 20 21 22 23 24
-0.192166037 1.464496077 3.893668435 -2.806347752 -0.160524155 -2.053012648
25 26 27 28 29 30
3.151171849 -4.784670716 1.700322456 -0.010532248 1.076175895 -2.709674762
31 32 33 34 35 36
2.054498859 -1.053012648 3.096979259 0.882829917 -0.299677544 2.246971166
37 38 39 40 41 42
-5.053012648 0.764479891 3.054498859 -0.753028834 1.140333331 2.237006320
43 44 45 46 47 48
1.378661606 -2.363834980 -2.106331565 -2.720513280 1.278613048 0.754515046
49 50 51 52 53 54
2.754515046 -0.945501141 1.786156927 -0.557180959 -3.009658576 -2.363834980
55 56 57 58 59 60
-1.816312597 0.914471798 1.904506953 1.279486720 -2.407189052 -1.730478126
61 62 63 64 65 66
-6.417153897 -0.753028834 -2.837989633 0.344517828 0.667806902 -3.881343705
67 68 69 70 71 72
-3.193039709 -1.934662623 1.182813731 0.346146052 0.171975213 2.000306270
73 74 75 76 77 78
0.839475845 0.839475845 -1.063851166 -2.053012648 2.957825870 -1.031335612
79 80 81 82 83 84
1.118656295 -1.535503923 0.561169067 2.053625187 1.096979259 1.786156927
85 86 87 88 89 90
1.000306270 -0.053012648 0.700322456 -0.009658576 -0.687997726 -7.235520109
91 92 93 94 95 96
3.129494813 -1.224681591 1.279486720 0.182813731 -1.053012648 1.840349517
97 98 99 100 101 102
-2.342157944 -0.385512016 2.871991399 1.043660342 3.279486720 -1.720513280
103 104 105 106 107 108
2.172848885 -3.106331565 0.281988617 -4.903020741 1.689483938 1.118656295
109 110 111 112 113 114
-4.352996462 -4.352996462 0.893668435 -3.020497094 -1.073816012 0.162010367
115 116 117 118 119 120
4.182813731 2.268648202 0.355356346 -0.128008601 0.086140741 0.118656295
121 122 123 124 125 126
-2.053012648 0.151171849 0.571133913 1.021983306 1.268648202 -0.987981540
127 128 129 130 131 132
3.279486720 3.012018460 4.871991399 0.325342688 -0.796382906 -4.784670716
133 134 135 136 137 138
0.818672481 1.011144788 1.226167802 1.990341424 -2.881343705 -0.449669451
139 140 141 142 143 144
-2.441332830 0.914471798 -1.020497094 1.065337377 2.269521874 -0.439704605
145 146 147 148 149 150
0.968664388 1.818672481 1.636165020 -3.268035663 -1.806347752 -4.644643654
151 152 153 154 155 156
2.032821824 -0.731351798 1.754515046 -1.859666669 -4.924697777 -1.042174130
> postscript(file="/var/www/html/rcomp/tmp/6xyyf1292931204.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 156
Frequency = 1
lag(myerror, k = 1) myerror
0 0.043660342 NA
1 3.979502906 0.043660342
2 -2.730478126 3.979502906
3 -2.063851166 -2.730478126
4 1.796995445 -2.063851166
5 4.001179942 1.796995445
6 0.204490766 4.001179942
7 -0.278000508 0.204490766
8 0.881956244 -0.278000508
9 0.926183988 0.881956244
10 2.871991399 0.926183988
11 4.861152881 2.871991399
12 -3.795509234 4.861152881
13 1.517814995 -3.795509234
14 3.904506953 1.517814995
15 -0.084654530 3.904506953
16 -0.213843073 -0.084654530
17 3.107817777 -0.213843073
18 -0.192166037 3.107817777
19 1.464496077 -0.192166037
20 3.893668435 1.464496077
21 -2.806347752 3.893668435
22 -0.160524155 -2.806347752
23 -2.053012648 -0.160524155
24 3.151171849 -2.053012648
25 -4.784670716 3.151171849
26 1.700322456 -4.784670716
27 -0.010532248 1.700322456
28 1.076175895 -0.010532248
29 -2.709674762 1.076175895
30 2.054498859 -2.709674762
31 -1.053012648 2.054498859
32 3.096979259 -1.053012648
33 0.882829917 3.096979259
34 -0.299677544 0.882829917
35 2.246971166 -0.299677544
36 -5.053012648 2.246971166
37 0.764479891 -5.053012648
38 3.054498859 0.764479891
39 -0.753028834 3.054498859
40 1.140333331 -0.753028834
41 2.237006320 1.140333331
42 1.378661606 2.237006320
43 -2.363834980 1.378661606
44 -2.106331565 -2.363834980
45 -2.720513280 -2.106331565
46 1.278613048 -2.720513280
47 0.754515046 1.278613048
48 2.754515046 0.754515046
49 -0.945501141 2.754515046
50 1.786156927 -0.945501141
51 -0.557180959 1.786156927
52 -3.009658576 -0.557180959
53 -2.363834980 -3.009658576
54 -1.816312597 -2.363834980
55 0.914471798 -1.816312597
56 1.904506953 0.914471798
57 1.279486720 1.904506953
58 -2.407189052 1.279486720
59 -1.730478126 -2.407189052
60 -6.417153897 -1.730478126
61 -0.753028834 -6.417153897
62 -2.837989633 -0.753028834
63 0.344517828 -2.837989633
64 0.667806902 0.344517828
65 -3.881343705 0.667806902
66 -3.193039709 -3.881343705
67 -1.934662623 -3.193039709
68 1.182813731 -1.934662623
69 0.346146052 1.182813731
70 0.171975213 0.346146052
71 2.000306270 0.171975213
72 0.839475845 2.000306270
73 0.839475845 0.839475845
74 -1.063851166 0.839475845
75 -2.053012648 -1.063851166
76 2.957825870 -2.053012648
77 -1.031335612 2.957825870
78 1.118656295 -1.031335612
79 -1.535503923 1.118656295
80 0.561169067 -1.535503923
81 2.053625187 0.561169067
82 1.096979259 2.053625187
83 1.786156927 1.096979259
84 1.000306270 1.786156927
85 -0.053012648 1.000306270
86 0.700322456 -0.053012648
87 -0.009658576 0.700322456
88 -0.687997726 -0.009658576
89 -7.235520109 -0.687997726
90 3.129494813 -7.235520109
91 -1.224681591 3.129494813
92 1.279486720 -1.224681591
93 0.182813731 1.279486720
94 -1.053012648 0.182813731
95 1.840349517 -1.053012648
96 -2.342157944 1.840349517
97 -0.385512016 -2.342157944
98 2.871991399 -0.385512016
99 1.043660342 2.871991399
100 3.279486720 1.043660342
101 -1.720513280 3.279486720
102 2.172848885 -1.720513280
103 -3.106331565 2.172848885
104 0.281988617 -3.106331565
105 -4.903020741 0.281988617
106 1.689483938 -4.903020741
107 1.118656295 1.689483938
108 -4.352996462 1.118656295
109 -4.352996462 -4.352996462
110 0.893668435 -4.352996462
111 -3.020497094 0.893668435
112 -1.073816012 -3.020497094
113 0.162010367 -1.073816012
114 4.182813731 0.162010367
115 2.268648202 4.182813731
116 0.355356346 2.268648202
117 -0.128008601 0.355356346
118 0.086140741 -0.128008601
119 0.118656295 0.086140741
120 -2.053012648 0.118656295
121 0.151171849 -2.053012648
122 0.571133913 0.151171849
123 1.021983306 0.571133913
124 1.268648202 1.021983306
125 -0.987981540 1.268648202
126 3.279486720 -0.987981540
127 3.012018460 3.279486720
128 4.871991399 3.012018460
129 0.325342688 4.871991399
130 -0.796382906 0.325342688
131 -4.784670716 -0.796382906
132 0.818672481 -4.784670716
133 1.011144788 0.818672481
134 1.226167802 1.011144788
135 1.990341424 1.226167802
136 -2.881343705 1.990341424
137 -0.449669451 -2.881343705
138 -2.441332830 -0.449669451
139 0.914471798 -2.441332830
140 -1.020497094 0.914471798
141 1.065337377 -1.020497094
142 2.269521874 1.065337377
143 -0.439704605 2.269521874
144 0.968664388 -0.439704605
145 1.818672481 0.968664388
146 1.636165020 1.818672481
147 -3.268035663 1.636165020
148 -1.806347752 -3.268035663
149 -4.644643654 -1.806347752
150 2.032821824 -4.644643654
151 -0.731351798 2.032821824
152 1.754515046 -0.731351798
153 -1.859666669 1.754515046
154 -4.924697777 -1.859666669
155 -1.042174130 -4.924697777
156 NA -1.042174130
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.979502906 0.043660342
[2,] -2.730478126 3.979502906
[3,] -2.063851166 -2.730478126
[4,] 1.796995445 -2.063851166
[5,] 4.001179942 1.796995445
[6,] 0.204490766 4.001179942
[7,] -0.278000508 0.204490766
[8,] 0.881956244 -0.278000508
[9,] 0.926183988 0.881956244
[10,] 2.871991399 0.926183988
[11,] 4.861152881 2.871991399
[12,] -3.795509234 4.861152881
[13,] 1.517814995 -3.795509234
[14,] 3.904506953 1.517814995
[15,] -0.084654530 3.904506953
[16,] -0.213843073 -0.084654530
[17,] 3.107817777 -0.213843073
[18,] -0.192166037 3.107817777
[19,] 1.464496077 -0.192166037
[20,] 3.893668435 1.464496077
[21,] -2.806347752 3.893668435
[22,] -0.160524155 -2.806347752
[23,] -2.053012648 -0.160524155
[24,] 3.151171849 -2.053012648
[25,] -4.784670716 3.151171849
[26,] 1.700322456 -4.784670716
[27,] -0.010532248 1.700322456
[28,] 1.076175895 -0.010532248
[29,] -2.709674762 1.076175895
[30,] 2.054498859 -2.709674762
[31,] -1.053012648 2.054498859
[32,] 3.096979259 -1.053012648
[33,] 0.882829917 3.096979259
[34,] -0.299677544 0.882829917
[35,] 2.246971166 -0.299677544
[36,] -5.053012648 2.246971166
[37,] 0.764479891 -5.053012648
[38,] 3.054498859 0.764479891
[39,] -0.753028834 3.054498859
[40,] 1.140333331 -0.753028834
[41,] 2.237006320 1.140333331
[42,] 1.378661606 2.237006320
[43,] -2.363834980 1.378661606
[44,] -2.106331565 -2.363834980
[45,] -2.720513280 -2.106331565
[46,] 1.278613048 -2.720513280
[47,] 0.754515046 1.278613048
[48,] 2.754515046 0.754515046
[49,] -0.945501141 2.754515046
[50,] 1.786156927 -0.945501141
[51,] -0.557180959 1.786156927
[52,] -3.009658576 -0.557180959
[53,] -2.363834980 -3.009658576
[54,] -1.816312597 -2.363834980
[55,] 0.914471798 -1.816312597
[56,] 1.904506953 0.914471798
[57,] 1.279486720 1.904506953
[58,] -2.407189052 1.279486720
[59,] -1.730478126 -2.407189052
[60,] -6.417153897 -1.730478126
[61,] -0.753028834 -6.417153897
[62,] -2.837989633 -0.753028834
[63,] 0.344517828 -2.837989633
[64,] 0.667806902 0.344517828
[65,] -3.881343705 0.667806902
[66,] -3.193039709 -3.881343705
[67,] -1.934662623 -3.193039709
[68,] 1.182813731 -1.934662623
[69,] 0.346146052 1.182813731
[70,] 0.171975213 0.346146052
[71,] 2.000306270 0.171975213
[72,] 0.839475845 2.000306270
[73,] 0.839475845 0.839475845
[74,] -1.063851166 0.839475845
[75,] -2.053012648 -1.063851166
[76,] 2.957825870 -2.053012648
[77,] -1.031335612 2.957825870
[78,] 1.118656295 -1.031335612
[79,] -1.535503923 1.118656295
[80,] 0.561169067 -1.535503923
[81,] 2.053625187 0.561169067
[82,] 1.096979259 2.053625187
[83,] 1.786156927 1.096979259
[84,] 1.000306270 1.786156927
[85,] -0.053012648 1.000306270
[86,] 0.700322456 -0.053012648
[87,] -0.009658576 0.700322456
[88,] -0.687997726 -0.009658576
[89,] -7.235520109 -0.687997726
[90,] 3.129494813 -7.235520109
[91,] -1.224681591 3.129494813
[92,] 1.279486720 -1.224681591
[93,] 0.182813731 1.279486720
[94,] -1.053012648 0.182813731
[95,] 1.840349517 -1.053012648
[96,] -2.342157944 1.840349517
[97,] -0.385512016 -2.342157944
[98,] 2.871991399 -0.385512016
[99,] 1.043660342 2.871991399
[100,] 3.279486720 1.043660342
[101,] -1.720513280 3.279486720
[102,] 2.172848885 -1.720513280
[103,] -3.106331565 2.172848885
[104,] 0.281988617 -3.106331565
[105,] -4.903020741 0.281988617
[106,] 1.689483938 -4.903020741
[107,] 1.118656295 1.689483938
[108,] -4.352996462 1.118656295
[109,] -4.352996462 -4.352996462
[110,] 0.893668435 -4.352996462
[111,] -3.020497094 0.893668435
[112,] -1.073816012 -3.020497094
[113,] 0.162010367 -1.073816012
[114,] 4.182813731 0.162010367
[115,] 2.268648202 4.182813731
[116,] 0.355356346 2.268648202
[117,] -0.128008601 0.355356346
[118,] 0.086140741 -0.128008601
[119,] 0.118656295 0.086140741
[120,] -2.053012648 0.118656295
[121,] 0.151171849 -2.053012648
[122,] 0.571133913 0.151171849
[123,] 1.021983306 0.571133913
[124,] 1.268648202 1.021983306
[125,] -0.987981540 1.268648202
[126,] 3.279486720 -0.987981540
[127,] 3.012018460 3.279486720
[128,] 4.871991399 3.012018460
[129,] 0.325342688 4.871991399
[130,] -0.796382906 0.325342688
[131,] -4.784670716 -0.796382906
[132,] 0.818672481 -4.784670716
[133,] 1.011144788 0.818672481
[134,] 1.226167802 1.011144788
[135,] 1.990341424 1.226167802
[136,] -2.881343705 1.990341424
[137,] -0.449669451 -2.881343705
[138,] -2.441332830 -0.449669451
[139,] 0.914471798 -2.441332830
[140,] -1.020497094 0.914471798
[141,] 1.065337377 -1.020497094
[142,] 2.269521874 1.065337377
[143,] -0.439704605 2.269521874
[144,] 0.968664388 -0.439704605
[145,] 1.818672481 0.968664388
[146,] 1.636165020 1.818672481
[147,] -3.268035663 1.636165020
[148,] -1.806347752 -3.268035663
[149,] -4.644643654 -1.806347752
[150,] 2.032821824 -4.644643654
[151,] -0.731351798 2.032821824
[152,] 1.754515046 -0.731351798
[153,] -1.859666669 1.754515046
[154,] -4.924697777 -1.859666669
[155,] -1.042174130 -4.924697777
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.979502906 0.043660342
2 -2.730478126 3.979502906
3 -2.063851166 -2.730478126
4 1.796995445 -2.063851166
5 4.001179942 1.796995445
6 0.204490766 4.001179942
7 -0.278000508 0.204490766
8 0.881956244 -0.278000508
9 0.926183988 0.881956244
10 2.871991399 0.926183988
11 4.861152881 2.871991399
12 -3.795509234 4.861152881
13 1.517814995 -3.795509234
14 3.904506953 1.517814995
15 -0.084654530 3.904506953
16 -0.213843073 -0.084654530
17 3.107817777 -0.213843073
18 -0.192166037 3.107817777
19 1.464496077 -0.192166037
20 3.893668435 1.464496077
21 -2.806347752 3.893668435
22 -0.160524155 -2.806347752
23 -2.053012648 -0.160524155
24 3.151171849 -2.053012648
25 -4.784670716 3.151171849
26 1.700322456 -4.784670716
27 -0.010532248 1.700322456
28 1.076175895 -0.010532248
29 -2.709674762 1.076175895
30 2.054498859 -2.709674762
31 -1.053012648 2.054498859
32 3.096979259 -1.053012648
33 0.882829917 3.096979259
34 -0.299677544 0.882829917
35 2.246971166 -0.299677544
36 -5.053012648 2.246971166
37 0.764479891 -5.053012648
38 3.054498859 0.764479891
39 -0.753028834 3.054498859
40 1.140333331 -0.753028834
41 2.237006320 1.140333331
42 1.378661606 2.237006320
43 -2.363834980 1.378661606
44 -2.106331565 -2.363834980
45 -2.720513280 -2.106331565
46 1.278613048 -2.720513280
47 0.754515046 1.278613048
48 2.754515046 0.754515046
49 -0.945501141 2.754515046
50 1.786156927 -0.945501141
51 -0.557180959 1.786156927
52 -3.009658576 -0.557180959
53 -2.363834980 -3.009658576
54 -1.816312597 -2.363834980
55 0.914471798 -1.816312597
56 1.904506953 0.914471798
57 1.279486720 1.904506953
58 -2.407189052 1.279486720
59 -1.730478126 -2.407189052
60 -6.417153897 -1.730478126
61 -0.753028834 -6.417153897
62 -2.837989633 -0.753028834
63 0.344517828 -2.837989633
64 0.667806902 0.344517828
65 -3.881343705 0.667806902
66 -3.193039709 -3.881343705
67 -1.934662623 -3.193039709
68 1.182813731 -1.934662623
69 0.346146052 1.182813731
70 0.171975213 0.346146052
71 2.000306270 0.171975213
72 0.839475845 2.000306270
73 0.839475845 0.839475845
74 -1.063851166 0.839475845
75 -2.053012648 -1.063851166
76 2.957825870 -2.053012648
77 -1.031335612 2.957825870
78 1.118656295 -1.031335612
79 -1.535503923 1.118656295
80 0.561169067 -1.535503923
81 2.053625187 0.561169067
82 1.096979259 2.053625187
83 1.786156927 1.096979259
84 1.000306270 1.786156927
85 -0.053012648 1.000306270
86 0.700322456 -0.053012648
87 -0.009658576 0.700322456
88 -0.687997726 -0.009658576
89 -7.235520109 -0.687997726
90 3.129494813 -7.235520109
91 -1.224681591 3.129494813
92 1.279486720 -1.224681591
93 0.182813731 1.279486720
94 -1.053012648 0.182813731
95 1.840349517 -1.053012648
96 -2.342157944 1.840349517
97 -0.385512016 -2.342157944
98 2.871991399 -0.385512016
99 1.043660342 2.871991399
100 3.279486720 1.043660342
101 -1.720513280 3.279486720
102 2.172848885 -1.720513280
103 -3.106331565 2.172848885
104 0.281988617 -3.106331565
105 -4.903020741 0.281988617
106 1.689483938 -4.903020741
107 1.118656295 1.689483938
108 -4.352996462 1.118656295
109 -4.352996462 -4.352996462
110 0.893668435 -4.352996462
111 -3.020497094 0.893668435
112 -1.073816012 -3.020497094
113 0.162010367 -1.073816012
114 4.182813731 0.162010367
115 2.268648202 4.182813731
116 0.355356346 2.268648202
117 -0.128008601 0.355356346
118 0.086140741 -0.128008601
119 0.118656295 0.086140741
120 -2.053012648 0.118656295
121 0.151171849 -2.053012648
122 0.571133913 0.151171849
123 1.021983306 0.571133913
124 1.268648202 1.021983306
125 -0.987981540 1.268648202
126 3.279486720 -0.987981540
127 3.012018460 3.279486720
128 4.871991399 3.012018460
129 0.325342688 4.871991399
130 -0.796382906 0.325342688
131 -4.784670716 -0.796382906
132 0.818672481 -4.784670716
133 1.011144788 0.818672481
134 1.226167802 1.011144788
135 1.990341424 1.226167802
136 -2.881343705 1.990341424
137 -0.449669451 -2.881343705
138 -2.441332830 -0.449669451
139 0.914471798 -2.441332830
140 -1.020497094 0.914471798
141 1.065337377 -1.020497094
142 2.269521874 1.065337377
143 -0.439704605 2.269521874
144 0.968664388 -0.439704605
145 1.818672481 0.968664388
146 1.636165020 1.818672481
147 -3.268035663 1.636165020
148 -1.806347752 -3.268035663
149 -4.644643654 -1.806347752
150 2.032821824 -4.644643654
151 -0.731351798 2.032821824
152 1.754515046 -0.731351798
153 -1.859666669 1.754515046
154 -4.924697777 -1.859666669
155 -1.042174130 -4.924697777
> 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/7qpg01292931204.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/81zx31292931204.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/91zx31292931204.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/101zx31292931204.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/11x8uc1292931204.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/12q0ux1292931204.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/13e19r1292931204.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/14psqt1292931204.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/15atph1292931204.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/16okmq1292931204.tab")
+ }
>
> try(system("convert tmp/1m7hu1292931204.ps tmp/1m7hu1292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/2m7hu1292931204.ps tmp/2m7hu1292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/3m7hu1292931204.ps tmp/3m7hu1292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/4xyyf1292931204.ps tmp/4xyyf1292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/5xyyf1292931204.ps tmp/5xyyf1292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/6xyyf1292931204.ps tmp/6xyyf1292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/7qpg01292931204.ps tmp/7qpg01292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/81zx31292931204.ps tmp/81zx31292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/91zx31292931204.ps tmp/91zx31292931204.png",intern=TRUE))
character(0)
> try(system("convert tmp/101zx31292931204.ps tmp/101zx31292931204.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.906 1.833 20.040