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(0,24,0,25,0,17,0,18,0,18,0,16,1,20,1,16,1,18,1,17,1,23,1,30,1,23,1,18,1,15,1,12,1,21,1,15,1,20,1,31,1,27,1,34,1,21,1,31,1,19,1,16,1,20,1,21,1,22,1,17,1,24,1,25,1,26,1,25,1,17,1,32,1,33,1,13,1,32,1,25,1,29,1,22,1,18,1,17,1,20,1,15,1,20,1,33,1,29,1,23,1,26,1,18,1,20,1,11,1,28,1,26,1,22,1,17,1,12,1,14,1,17,1,21,1,19,1,18,1,10,1,29,1,31,1,19,1,9,1,20,1,28,1,19,1,30,1,29,1,26,1,23,1,13,1,21,1,19,1,28,1,23,1,18,1,21,1,20,1,23,1,21,1,21,1,15,1,28,1,19,1,26,1,10,1,16,1,22,1,19,1,31,1,31,1,29,1,19,1,22,1,23,1,15,1,20,1,18,1,23,1,25,1,21,1,24,1,25,1,17,1,13,1,28,1,21,1,25,1,9,1,16,1,19,1,17,1,25,1,20,1,29,1,14,1,22,1,15,1,19,1,20,1,15,1,20,1,18,1,33,1,22,1,16,1,17,1,16,1,21,1,26,1,18,1,18,1,17,1,22,1,30,1,30,1,24,1,21,1,21,1,29,1,31,1,20,1,16,1,22,1,20,1,28,1,38,1,22,1,20,1,17,1,28,1,22,1,31),dim=c(2,159),dimnames=list(c('Month','Concernovermistakes'),1:159))
> y <- array(NA,dim=c(2,159),dimnames=list(c('Month','Concernovermistakes'),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 = '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
Concernovermistakes Month
1 24 0
2 25 0
3 17 0
4 18 0
5 18 0
6 16 0
7 20 1
8 16 1
9 18 1
10 17 1
11 23 1
12 30 1
13 23 1
14 18 1
15 15 1
16 12 1
17 21 1
18 15 1
19 20 1
20 31 1
21 27 1
22 34 1
23 21 1
24 31 1
25 19 1
26 16 1
27 20 1
28 21 1
29 22 1
30 17 1
31 24 1
32 25 1
33 26 1
34 25 1
35 17 1
36 32 1
37 33 1
38 13 1
39 32 1
40 25 1
41 29 1
42 22 1
43 18 1
44 17 1
45 20 1
46 15 1
47 20 1
48 33 1
49 29 1
50 23 1
51 26 1
52 18 1
53 20 1
54 11 1
55 28 1
56 26 1
57 22 1
58 17 1
59 12 1
60 14 1
61 17 1
62 21 1
63 19 1
64 18 1
65 10 1
66 29 1
67 31 1
68 19 1
69 9 1
70 20 1
71 28 1
72 19 1
73 30 1
74 29 1
75 26 1
76 23 1
77 13 1
78 21 1
79 19 1
80 28 1
81 23 1
82 18 1
83 21 1
84 20 1
85 23 1
86 21 1
87 21 1
88 15 1
89 28 1
90 19 1
91 26 1
92 10 1
93 16 1
94 22 1
95 19 1
96 31 1
97 31 1
98 29 1
99 19 1
100 22 1
101 23 1
102 15 1
103 20 1
104 18 1
105 23 1
106 25 1
107 21 1
108 24 1
109 25 1
110 17 1
111 13 1
112 28 1
113 21 1
114 25 1
115 9 1
116 16 1
117 19 1
118 17 1
119 25 1
120 20 1
121 29 1
122 14 1
123 22 1
124 15 1
125 19 1
126 20 1
127 15 1
128 20 1
129 18 1
130 33 1
131 22 1
132 16 1
133 17 1
134 16 1
135 21 1
136 26 1
137 18 1
138 18 1
139 17 1
140 22 1
141 30 1
142 30 1
143 24 1
144 21 1
145 21 1
146 29 1
147 31 1
148 20 1
149 16 1
150 22 1
151 20 1
152 28 1
153 38 1
154 22 1
155 20 1
156 17 1
157 28 1
158 22 1
159 31 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Month
19.667 1.993
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-12.6601 -3.6601 -0.6601 4.3366 16.3399
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 19.667 2.339 8.410 2.36e-14 ***
Month 1.993 2.384 0.836 0.404
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 5.728 on 157 degrees of freedom
Multiple R-squared: 0.004434, Adjusted R-squared: -0.001907
F-statistic: 0.6992 on 1 and 157 DF, p-value: 0.4043
> 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.36485877 0.72971753 0.6351412
[2,] 0.29715861 0.59431721 0.7028414
[3,] 0.17529576 0.35059153 0.8247042
[4,] 0.12221143 0.24442286 0.8777886
[5,] 0.06657688 0.13315377 0.9334231
[6,] 0.03548024 0.07096048 0.9645198
[7,] 0.03887160 0.07774320 0.9611284
[8,] 0.19893041 0.39786081 0.8010696
[9,] 0.14612367 0.29224734 0.8538763
[10,] 0.11145774 0.22291547 0.8885423
[11,] 0.11691343 0.23382686 0.8830866
[12,] 0.17823181 0.35646362 0.8217682
[13,] 0.13303032 0.26606064 0.8669697
[14,] 0.12102727 0.24205454 0.8789727
[15,] 0.08651243 0.17302486 0.9134876
[16,] 0.25058325 0.50116650 0.7494168
[17,] 0.27938220 0.55876441 0.7206178
[18,] 0.56540478 0.86919043 0.4345952
[19,] 0.49810761 0.99621523 0.5018924
[20,] 0.60512020 0.78975959 0.3948798
[21,] 0.55509754 0.88980493 0.4449025
[22,] 0.54851988 0.90296025 0.4514801
[23,] 0.48933661 0.97867323 0.5106634
[24,] 0.42782624 0.85565249 0.5721738
[25,] 0.36917549 0.73835098 0.6308245
[26,] 0.34496311 0.68992622 0.6550369
[27,] 0.30349885 0.60699770 0.6965011
[28,] 0.27369791 0.54739581 0.7263021
[29,] 0.25632136 0.51264273 0.7436786
[30,] 0.22736678 0.45473356 0.7726332
[31,] 0.21373169 0.42746339 0.7862683
[32,] 0.32283460 0.64566920 0.6771654
[33,] 0.46791419 0.93582837 0.5320858
[34,] 0.54384851 0.91230298 0.4561515
[35,] 0.64587100 0.70825800 0.3541290
[36,] 0.60834803 0.78330394 0.3916520
[37,] 0.62744539 0.74510921 0.3725546
[38,] 0.57748063 0.84503873 0.4225194
[39,] 0.55300917 0.89398166 0.4469908
[40,] 0.54126123 0.91747753 0.4587388
[41,] 0.49649396 0.99298792 0.5035060
[42,] 0.51858180 0.96283639 0.4814182
[43,] 0.47336851 0.94673701 0.5266315
[44,] 0.60521251 0.78957498 0.3947875
[45,] 0.62635369 0.74729261 0.3736463
[46,] 0.58031032 0.83937937 0.4196897
[47,] 0.55446256 0.89107489 0.4455374
[48,] 0.53031054 0.93937892 0.4696895
[49,] 0.48797053 0.97594106 0.5120295
[50,] 0.61069910 0.77860179 0.3893009
[51,] 0.61565422 0.76869157 0.3843458
[52,] 0.59238562 0.81522877 0.4076144
[53,] 0.54574798 0.90850404 0.4542520
[54,] 0.53284125 0.93431749 0.4671587
[55,] 0.61998087 0.76003826 0.3800191
[56,] 0.65452322 0.69095356 0.3454768
[57,] 0.63949879 0.72100242 0.3605012
[58,] 0.59545730 0.80908540 0.4045427
[59,] 0.55945075 0.88109849 0.4405492
[60,] 0.53161845 0.93676311 0.4683816
[61,] 0.66597674 0.66804651 0.3340233
[62,] 0.69159252 0.61681496 0.3084075
[63,] 0.75283423 0.49433155 0.2471658
[64,] 0.72321833 0.55356334 0.2767817
[65,] 0.84652549 0.30694902 0.1534745
[66,] 0.82016766 0.35966468 0.1798323
[67,] 0.82623377 0.34753247 0.1737662
[68,] 0.80197151 0.39605698 0.1980285
[69,] 0.83442537 0.33114925 0.1655746
[70,] 0.85109018 0.29781965 0.1489098
[71,] 0.83916460 0.32167081 0.1608354
[72,] 0.81136094 0.37727813 0.1886391
[73,] 0.84740325 0.30519350 0.1525967
[74,] 0.81927393 0.36145214 0.1807261
[75,] 0.79462853 0.41074295 0.2053715
[76,] 0.80129010 0.39741981 0.1987099
[77,] 0.76978510 0.46042980 0.2302149
[78,] 0.74845477 0.50309046 0.2515452
[79,] 0.71112549 0.57774902 0.2888745
[80,] 0.67422460 0.65155080 0.3257754
[81,] 0.63428001 0.73143999 0.3657200
[82,] 0.59096558 0.81806883 0.4090344
[83,] 0.54647471 0.90705059 0.4535253
[84,] 0.56139165 0.87721669 0.4386083
[85,] 0.57040316 0.85919368 0.4295968
[86,] 0.53449858 0.93100284 0.4655014
[87,] 0.51437679 0.97124642 0.4856232
[88,] 0.65296404 0.69407193 0.3470360
[89,] 0.65235427 0.69529146 0.3476457
[90,] 0.60858307 0.78283386 0.3914169
[91,] 0.57358322 0.85283356 0.4264168
[92,] 0.64469425 0.71061151 0.3553058
[93,] 0.71307096 0.57385809 0.2869290
[94,] 0.73879188 0.52241625 0.2612081
[95,] 0.70735472 0.58529056 0.2926453
[96,] 0.66542140 0.66915720 0.3345786
[97,] 0.62364414 0.75271171 0.3763559
[98,] 0.63842826 0.72314349 0.3615717
[99,] 0.59643279 0.80713441 0.4035672
[100,] 0.56859962 0.86280077 0.4314004
[101,] 0.52312780 0.95374441 0.4768722
[102,] 0.49068535 0.98137070 0.5093147
[103,] 0.44289960 0.88579919 0.5571004
[104,] 0.40282416 0.80564832 0.5971758
[105,] 0.37157986 0.74315972 0.6284201
[106,] 0.35445503 0.70891006 0.6455450
[107,] 0.41271041 0.82542081 0.5872896
[108,] 0.42073542 0.84147084 0.5792646
[109,] 0.37290450 0.74580900 0.6270955
[110,] 0.34100879 0.68201757 0.6589912
[111,] 0.53031946 0.93936108 0.4696805
[112,] 0.53226248 0.93547504 0.4677375
[113,] 0.49391057 0.98782114 0.5060894
[114,] 0.48104540 0.96209080 0.5189546
[115,] 0.44240166 0.88480332 0.5575983
[116,] 0.39691316 0.79382633 0.6030868
[117,] 0.42007334 0.84014668 0.5799267
[118,] 0.46889546 0.93779091 0.5311045
[119,] 0.41493313 0.82986626 0.5850669
[120,] 0.44406687 0.88813374 0.5559331
[121,] 0.40733067 0.81466133 0.5926693
[122,] 0.36272123 0.72544246 0.6372788
[123,] 0.39919516 0.79839033 0.6008048
[124,] 0.35620301 0.71240602 0.6437970
[125,] 0.33869517 0.67739033 0.6613048
[126,] 0.46128732 0.92257463 0.5387127
[127,] 0.40283481 0.80566963 0.5971652
[128,] 0.42393340 0.84786680 0.5760666
[129,] 0.42807175 0.85614350 0.5719282
[130,] 0.46403898 0.92807795 0.5359610
[131,] 0.41221182 0.82442364 0.5877882
[132,] 0.36321347 0.72642695 0.6367865
[133,] 0.35666931 0.71333863 0.6433307
[134,] 0.35559274 0.71118548 0.6444073
[135,] 0.38808173 0.77616346 0.6119183
[136,] 0.33328897 0.66657794 0.6667110
[137,] 0.33422775 0.66845550 0.6657723
[138,] 0.33962934 0.67925868 0.6603707
[139,] 0.27290870 0.54581741 0.7270913
[140,] 0.22587824 0.45175649 0.7741218
[141,] 0.18434900 0.36869799 0.8156510
[142,] 0.16511387 0.33022774 0.8348861
[143,] 0.18625877 0.37251754 0.8137412
[144,] 0.14830820 0.29661640 0.8516918
[145,] 0.18982813 0.37965626 0.8101719
[146,] 0.13896911 0.27793822 0.8610309
[147,] 0.11882325 0.23764650 0.8811768
[148,] 0.07774737 0.15549474 0.9222526
[149,] 0.39791737 0.79583474 0.6020826
[150,] 0.26037040 0.52074079 0.7396296
> postscript(file="/var/www/html/rcomp/tmp/1lpp71290855782.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/2lpp71290855782.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/3lpp71290855782.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/4wgos1290855782.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/5wgos1290855782.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
4.3333333 5.3333333 -2.6666667 -1.6666667 -1.6666667 -3.6666667
7 8 9 10 11 12
-1.6601307 -5.6601307 -3.6601307 -4.6601307 1.3398693 8.3398693
13 14 15 16 17 18
1.3398693 -3.6601307 -6.6601307 -9.6601307 -0.6601307 -6.6601307
19 20 21 22 23 24
-1.6601307 9.3398693 5.3398693 12.3398693 -0.6601307 9.3398693
25 26 27 28 29 30
-2.6601307 -5.6601307 -1.6601307 -0.6601307 0.3398693 -4.6601307
31 32 33 34 35 36
2.3398693 3.3398693 4.3398693 3.3398693 -4.6601307 10.3398693
37 38 39 40 41 42
11.3398693 -8.6601307 10.3398693 3.3398693 7.3398693 0.3398693
43 44 45 46 47 48
-3.6601307 -4.6601307 -1.6601307 -6.6601307 -1.6601307 11.3398693
49 50 51 52 53 54
7.3398693 1.3398693 4.3398693 -3.6601307 -1.6601307 -10.6601307
55 56 57 58 59 60
6.3398693 4.3398693 0.3398693 -4.6601307 -9.6601307 -7.6601307
61 62 63 64 65 66
-4.6601307 -0.6601307 -2.6601307 -3.6601307 -11.6601307 7.3398693
67 68 69 70 71 72
9.3398693 -2.6601307 -12.6601307 -1.6601307 6.3398693 -2.6601307
73 74 75 76 77 78
8.3398693 7.3398693 4.3398693 1.3398693 -8.6601307 -0.6601307
79 80 81 82 83 84
-2.6601307 6.3398693 1.3398693 -3.6601307 -0.6601307 -1.6601307
85 86 87 88 89 90
1.3398693 -0.6601307 -0.6601307 -6.6601307 6.3398693 -2.6601307
91 92 93 94 95 96
4.3398693 -11.6601307 -5.6601307 0.3398693 -2.6601307 9.3398693
97 98 99 100 101 102
9.3398693 7.3398693 -2.6601307 0.3398693 1.3398693 -6.6601307
103 104 105 106 107 108
-1.6601307 -3.6601307 1.3398693 3.3398693 -0.6601307 2.3398693
109 110 111 112 113 114
3.3398693 -4.6601307 -8.6601307 6.3398693 -0.6601307 3.3398693
115 116 117 118 119 120
-12.6601307 -5.6601307 -2.6601307 -4.6601307 3.3398693 -1.6601307
121 122 123 124 125 126
7.3398693 -7.6601307 0.3398693 -6.6601307 -2.6601307 -1.6601307
127 128 129 130 131 132
-6.6601307 -1.6601307 -3.6601307 11.3398693 0.3398693 -5.6601307
133 134 135 136 137 138
-4.6601307 -5.6601307 -0.6601307 4.3398693 -3.6601307 -3.6601307
139 140 141 142 143 144
-4.6601307 0.3398693 8.3398693 8.3398693 2.3398693 -0.6601307
145 146 147 148 149 150
-0.6601307 7.3398693 9.3398693 -1.6601307 -5.6601307 0.3398693
151 152 153 154 155 156
-1.6601307 6.3398693 16.3398693 0.3398693 -1.6601307 -4.6601307
157 158 159
6.3398693 0.3398693 9.3398693
> postscript(file="/var/www/html/rcomp/tmp/6wgos1290855782.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 4.3333333 NA
1 5.3333333 4.3333333
2 -2.6666667 5.3333333
3 -1.6666667 -2.6666667
4 -1.6666667 -1.6666667
5 -3.6666667 -1.6666667
6 -1.6601307 -3.6666667
7 -5.6601307 -1.6601307
8 -3.6601307 -5.6601307
9 -4.6601307 -3.6601307
10 1.3398693 -4.6601307
11 8.3398693 1.3398693
12 1.3398693 8.3398693
13 -3.6601307 1.3398693
14 -6.6601307 -3.6601307
15 -9.6601307 -6.6601307
16 -0.6601307 -9.6601307
17 -6.6601307 -0.6601307
18 -1.6601307 -6.6601307
19 9.3398693 -1.6601307
20 5.3398693 9.3398693
21 12.3398693 5.3398693
22 -0.6601307 12.3398693
23 9.3398693 -0.6601307
24 -2.6601307 9.3398693
25 -5.6601307 -2.6601307
26 -1.6601307 -5.6601307
27 -0.6601307 -1.6601307
28 0.3398693 -0.6601307
29 -4.6601307 0.3398693
30 2.3398693 -4.6601307
31 3.3398693 2.3398693
32 4.3398693 3.3398693
33 3.3398693 4.3398693
34 -4.6601307 3.3398693
35 10.3398693 -4.6601307
36 11.3398693 10.3398693
37 -8.6601307 11.3398693
38 10.3398693 -8.6601307
39 3.3398693 10.3398693
40 7.3398693 3.3398693
41 0.3398693 7.3398693
42 -3.6601307 0.3398693
43 -4.6601307 -3.6601307
44 -1.6601307 -4.6601307
45 -6.6601307 -1.6601307
46 -1.6601307 -6.6601307
47 11.3398693 -1.6601307
48 7.3398693 11.3398693
49 1.3398693 7.3398693
50 4.3398693 1.3398693
51 -3.6601307 4.3398693
52 -1.6601307 -3.6601307
53 -10.6601307 -1.6601307
54 6.3398693 -10.6601307
55 4.3398693 6.3398693
56 0.3398693 4.3398693
57 -4.6601307 0.3398693
58 -9.6601307 -4.6601307
59 -7.6601307 -9.6601307
60 -4.6601307 -7.6601307
61 -0.6601307 -4.6601307
62 -2.6601307 -0.6601307
63 -3.6601307 -2.6601307
64 -11.6601307 -3.6601307
65 7.3398693 -11.6601307
66 9.3398693 7.3398693
67 -2.6601307 9.3398693
68 -12.6601307 -2.6601307
69 -1.6601307 -12.6601307
70 6.3398693 -1.6601307
71 -2.6601307 6.3398693
72 8.3398693 -2.6601307
73 7.3398693 8.3398693
74 4.3398693 7.3398693
75 1.3398693 4.3398693
76 -8.6601307 1.3398693
77 -0.6601307 -8.6601307
78 -2.6601307 -0.6601307
79 6.3398693 -2.6601307
80 1.3398693 6.3398693
81 -3.6601307 1.3398693
82 -0.6601307 -3.6601307
83 -1.6601307 -0.6601307
84 1.3398693 -1.6601307
85 -0.6601307 1.3398693
86 -0.6601307 -0.6601307
87 -6.6601307 -0.6601307
88 6.3398693 -6.6601307
89 -2.6601307 6.3398693
90 4.3398693 -2.6601307
91 -11.6601307 4.3398693
92 -5.6601307 -11.6601307
93 0.3398693 -5.6601307
94 -2.6601307 0.3398693
95 9.3398693 -2.6601307
96 9.3398693 9.3398693
97 7.3398693 9.3398693
98 -2.6601307 7.3398693
99 0.3398693 -2.6601307
100 1.3398693 0.3398693
101 -6.6601307 1.3398693
102 -1.6601307 -6.6601307
103 -3.6601307 -1.6601307
104 1.3398693 -3.6601307
105 3.3398693 1.3398693
106 -0.6601307 3.3398693
107 2.3398693 -0.6601307
108 3.3398693 2.3398693
109 -4.6601307 3.3398693
110 -8.6601307 -4.6601307
111 6.3398693 -8.6601307
112 -0.6601307 6.3398693
113 3.3398693 -0.6601307
114 -12.6601307 3.3398693
115 -5.6601307 -12.6601307
116 -2.6601307 -5.6601307
117 -4.6601307 -2.6601307
118 3.3398693 -4.6601307
119 -1.6601307 3.3398693
120 7.3398693 -1.6601307
121 -7.6601307 7.3398693
122 0.3398693 -7.6601307
123 -6.6601307 0.3398693
124 -2.6601307 -6.6601307
125 -1.6601307 -2.6601307
126 -6.6601307 -1.6601307
127 -1.6601307 -6.6601307
128 -3.6601307 -1.6601307
129 11.3398693 -3.6601307
130 0.3398693 11.3398693
131 -5.6601307 0.3398693
132 -4.6601307 -5.6601307
133 -5.6601307 -4.6601307
134 -0.6601307 -5.6601307
135 4.3398693 -0.6601307
136 -3.6601307 4.3398693
137 -3.6601307 -3.6601307
138 -4.6601307 -3.6601307
139 0.3398693 -4.6601307
140 8.3398693 0.3398693
141 8.3398693 8.3398693
142 2.3398693 8.3398693
143 -0.6601307 2.3398693
144 -0.6601307 -0.6601307
145 7.3398693 -0.6601307
146 9.3398693 7.3398693
147 -1.6601307 9.3398693
148 -5.6601307 -1.6601307
149 0.3398693 -5.6601307
150 -1.6601307 0.3398693
151 6.3398693 -1.6601307
152 16.3398693 6.3398693
153 0.3398693 16.3398693
154 -1.6601307 0.3398693
155 -4.6601307 -1.6601307
156 6.3398693 -4.6601307
157 0.3398693 6.3398693
158 9.3398693 0.3398693
159 NA 9.3398693
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 5.3333333 4.3333333
[2,] -2.6666667 5.3333333
[3,] -1.6666667 -2.6666667
[4,] -1.6666667 -1.6666667
[5,] -3.6666667 -1.6666667
[6,] -1.6601307 -3.6666667
[7,] -5.6601307 -1.6601307
[8,] -3.6601307 -5.6601307
[9,] -4.6601307 -3.6601307
[10,] 1.3398693 -4.6601307
[11,] 8.3398693 1.3398693
[12,] 1.3398693 8.3398693
[13,] -3.6601307 1.3398693
[14,] -6.6601307 -3.6601307
[15,] -9.6601307 -6.6601307
[16,] -0.6601307 -9.6601307
[17,] -6.6601307 -0.6601307
[18,] -1.6601307 -6.6601307
[19,] 9.3398693 -1.6601307
[20,] 5.3398693 9.3398693
[21,] 12.3398693 5.3398693
[22,] -0.6601307 12.3398693
[23,] 9.3398693 -0.6601307
[24,] -2.6601307 9.3398693
[25,] -5.6601307 -2.6601307
[26,] -1.6601307 -5.6601307
[27,] -0.6601307 -1.6601307
[28,] 0.3398693 -0.6601307
[29,] -4.6601307 0.3398693
[30,] 2.3398693 -4.6601307
[31,] 3.3398693 2.3398693
[32,] 4.3398693 3.3398693
[33,] 3.3398693 4.3398693
[34,] -4.6601307 3.3398693
[35,] 10.3398693 -4.6601307
[36,] 11.3398693 10.3398693
[37,] -8.6601307 11.3398693
[38,] 10.3398693 -8.6601307
[39,] 3.3398693 10.3398693
[40,] 7.3398693 3.3398693
[41,] 0.3398693 7.3398693
[42,] -3.6601307 0.3398693
[43,] -4.6601307 -3.6601307
[44,] -1.6601307 -4.6601307
[45,] -6.6601307 -1.6601307
[46,] -1.6601307 -6.6601307
[47,] 11.3398693 -1.6601307
[48,] 7.3398693 11.3398693
[49,] 1.3398693 7.3398693
[50,] 4.3398693 1.3398693
[51,] -3.6601307 4.3398693
[52,] -1.6601307 -3.6601307
[53,] -10.6601307 -1.6601307
[54,] 6.3398693 -10.6601307
[55,] 4.3398693 6.3398693
[56,] 0.3398693 4.3398693
[57,] -4.6601307 0.3398693
[58,] -9.6601307 -4.6601307
[59,] -7.6601307 -9.6601307
[60,] -4.6601307 -7.6601307
[61,] -0.6601307 -4.6601307
[62,] -2.6601307 -0.6601307
[63,] -3.6601307 -2.6601307
[64,] -11.6601307 -3.6601307
[65,] 7.3398693 -11.6601307
[66,] 9.3398693 7.3398693
[67,] -2.6601307 9.3398693
[68,] -12.6601307 -2.6601307
[69,] -1.6601307 -12.6601307
[70,] 6.3398693 -1.6601307
[71,] -2.6601307 6.3398693
[72,] 8.3398693 -2.6601307
[73,] 7.3398693 8.3398693
[74,] 4.3398693 7.3398693
[75,] 1.3398693 4.3398693
[76,] -8.6601307 1.3398693
[77,] -0.6601307 -8.6601307
[78,] -2.6601307 -0.6601307
[79,] 6.3398693 -2.6601307
[80,] 1.3398693 6.3398693
[81,] -3.6601307 1.3398693
[82,] -0.6601307 -3.6601307
[83,] -1.6601307 -0.6601307
[84,] 1.3398693 -1.6601307
[85,] -0.6601307 1.3398693
[86,] -0.6601307 -0.6601307
[87,] -6.6601307 -0.6601307
[88,] 6.3398693 -6.6601307
[89,] -2.6601307 6.3398693
[90,] 4.3398693 -2.6601307
[91,] -11.6601307 4.3398693
[92,] -5.6601307 -11.6601307
[93,] 0.3398693 -5.6601307
[94,] -2.6601307 0.3398693
[95,] 9.3398693 -2.6601307
[96,] 9.3398693 9.3398693
[97,] 7.3398693 9.3398693
[98,] -2.6601307 7.3398693
[99,] 0.3398693 -2.6601307
[100,] 1.3398693 0.3398693
[101,] -6.6601307 1.3398693
[102,] -1.6601307 -6.6601307
[103,] -3.6601307 -1.6601307
[104,] 1.3398693 -3.6601307
[105,] 3.3398693 1.3398693
[106,] -0.6601307 3.3398693
[107,] 2.3398693 -0.6601307
[108,] 3.3398693 2.3398693
[109,] -4.6601307 3.3398693
[110,] -8.6601307 -4.6601307
[111,] 6.3398693 -8.6601307
[112,] -0.6601307 6.3398693
[113,] 3.3398693 -0.6601307
[114,] -12.6601307 3.3398693
[115,] -5.6601307 -12.6601307
[116,] -2.6601307 -5.6601307
[117,] -4.6601307 -2.6601307
[118,] 3.3398693 -4.6601307
[119,] -1.6601307 3.3398693
[120,] 7.3398693 -1.6601307
[121,] -7.6601307 7.3398693
[122,] 0.3398693 -7.6601307
[123,] -6.6601307 0.3398693
[124,] -2.6601307 -6.6601307
[125,] -1.6601307 -2.6601307
[126,] -6.6601307 -1.6601307
[127,] -1.6601307 -6.6601307
[128,] -3.6601307 -1.6601307
[129,] 11.3398693 -3.6601307
[130,] 0.3398693 11.3398693
[131,] -5.6601307 0.3398693
[132,] -4.6601307 -5.6601307
[133,] -5.6601307 -4.6601307
[134,] -0.6601307 -5.6601307
[135,] 4.3398693 -0.6601307
[136,] -3.6601307 4.3398693
[137,] -3.6601307 -3.6601307
[138,] -4.6601307 -3.6601307
[139,] 0.3398693 -4.6601307
[140,] 8.3398693 0.3398693
[141,] 8.3398693 8.3398693
[142,] 2.3398693 8.3398693
[143,] -0.6601307 2.3398693
[144,] -0.6601307 -0.6601307
[145,] 7.3398693 -0.6601307
[146,] 9.3398693 7.3398693
[147,] -1.6601307 9.3398693
[148,] -5.6601307 -1.6601307
[149,] 0.3398693 -5.6601307
[150,] -1.6601307 0.3398693
[151,] 6.3398693 -1.6601307
[152,] 16.3398693 6.3398693
[153,] 0.3398693 16.3398693
[154,] -1.6601307 0.3398693
[155,] -4.6601307 -1.6601307
[156,] 6.3398693 -4.6601307
[157,] 0.3398693 6.3398693
[158,] 9.3398693 0.3398693
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 5.3333333 4.3333333
2 -2.6666667 5.3333333
3 -1.6666667 -2.6666667
4 -1.6666667 -1.6666667
5 -3.6666667 -1.6666667
6 -1.6601307 -3.6666667
7 -5.6601307 -1.6601307
8 -3.6601307 -5.6601307
9 -4.6601307 -3.6601307
10 1.3398693 -4.6601307
11 8.3398693 1.3398693
12 1.3398693 8.3398693
13 -3.6601307 1.3398693
14 -6.6601307 -3.6601307
15 -9.6601307 -6.6601307
16 -0.6601307 -9.6601307
17 -6.6601307 -0.6601307
18 -1.6601307 -6.6601307
19 9.3398693 -1.6601307
20 5.3398693 9.3398693
21 12.3398693 5.3398693
22 -0.6601307 12.3398693
23 9.3398693 -0.6601307
24 -2.6601307 9.3398693
25 -5.6601307 -2.6601307
26 -1.6601307 -5.6601307
27 -0.6601307 -1.6601307
28 0.3398693 -0.6601307
29 -4.6601307 0.3398693
30 2.3398693 -4.6601307
31 3.3398693 2.3398693
32 4.3398693 3.3398693
33 3.3398693 4.3398693
34 -4.6601307 3.3398693
35 10.3398693 -4.6601307
36 11.3398693 10.3398693
37 -8.6601307 11.3398693
38 10.3398693 -8.6601307
39 3.3398693 10.3398693
40 7.3398693 3.3398693
41 0.3398693 7.3398693
42 -3.6601307 0.3398693
43 -4.6601307 -3.6601307
44 -1.6601307 -4.6601307
45 -6.6601307 -1.6601307
46 -1.6601307 -6.6601307
47 11.3398693 -1.6601307
48 7.3398693 11.3398693
49 1.3398693 7.3398693
50 4.3398693 1.3398693
51 -3.6601307 4.3398693
52 -1.6601307 -3.6601307
53 -10.6601307 -1.6601307
54 6.3398693 -10.6601307
55 4.3398693 6.3398693
56 0.3398693 4.3398693
57 -4.6601307 0.3398693
58 -9.6601307 -4.6601307
59 -7.6601307 -9.6601307
60 -4.6601307 -7.6601307
61 -0.6601307 -4.6601307
62 -2.6601307 -0.6601307
63 -3.6601307 -2.6601307
64 -11.6601307 -3.6601307
65 7.3398693 -11.6601307
66 9.3398693 7.3398693
67 -2.6601307 9.3398693
68 -12.6601307 -2.6601307
69 -1.6601307 -12.6601307
70 6.3398693 -1.6601307
71 -2.6601307 6.3398693
72 8.3398693 -2.6601307
73 7.3398693 8.3398693
74 4.3398693 7.3398693
75 1.3398693 4.3398693
76 -8.6601307 1.3398693
77 -0.6601307 -8.6601307
78 -2.6601307 -0.6601307
79 6.3398693 -2.6601307
80 1.3398693 6.3398693
81 -3.6601307 1.3398693
82 -0.6601307 -3.6601307
83 -1.6601307 -0.6601307
84 1.3398693 -1.6601307
85 -0.6601307 1.3398693
86 -0.6601307 -0.6601307
87 -6.6601307 -0.6601307
88 6.3398693 -6.6601307
89 -2.6601307 6.3398693
90 4.3398693 -2.6601307
91 -11.6601307 4.3398693
92 -5.6601307 -11.6601307
93 0.3398693 -5.6601307
94 -2.6601307 0.3398693
95 9.3398693 -2.6601307
96 9.3398693 9.3398693
97 7.3398693 9.3398693
98 -2.6601307 7.3398693
99 0.3398693 -2.6601307
100 1.3398693 0.3398693
101 -6.6601307 1.3398693
102 -1.6601307 -6.6601307
103 -3.6601307 -1.6601307
104 1.3398693 -3.6601307
105 3.3398693 1.3398693
106 -0.6601307 3.3398693
107 2.3398693 -0.6601307
108 3.3398693 2.3398693
109 -4.6601307 3.3398693
110 -8.6601307 -4.6601307
111 6.3398693 -8.6601307
112 -0.6601307 6.3398693
113 3.3398693 -0.6601307
114 -12.6601307 3.3398693
115 -5.6601307 -12.6601307
116 -2.6601307 -5.6601307
117 -4.6601307 -2.6601307
118 3.3398693 -4.6601307
119 -1.6601307 3.3398693
120 7.3398693 -1.6601307
121 -7.6601307 7.3398693
122 0.3398693 -7.6601307
123 -6.6601307 0.3398693
124 -2.6601307 -6.6601307
125 -1.6601307 -2.6601307
126 -6.6601307 -1.6601307
127 -1.6601307 -6.6601307
128 -3.6601307 -1.6601307
129 11.3398693 -3.6601307
130 0.3398693 11.3398693
131 -5.6601307 0.3398693
132 -4.6601307 -5.6601307
133 -5.6601307 -4.6601307
134 -0.6601307 -5.6601307
135 4.3398693 -0.6601307
136 -3.6601307 4.3398693
137 -3.6601307 -3.6601307
138 -4.6601307 -3.6601307
139 0.3398693 -4.6601307
140 8.3398693 0.3398693
141 8.3398693 8.3398693
142 2.3398693 8.3398693
143 -0.6601307 2.3398693
144 -0.6601307 -0.6601307
145 7.3398693 -0.6601307
146 9.3398693 7.3398693
147 -1.6601307 9.3398693
148 -5.6601307 -1.6601307
149 0.3398693 -5.6601307
150 -1.6601307 0.3398693
151 6.3398693 -1.6601307
152 16.3398693 6.3398693
153 0.3398693 16.3398693
154 -1.6601307 0.3398693
155 -4.6601307 -1.6601307
156 6.3398693 -4.6601307
157 0.3398693 6.3398693
158 9.3398693 0.3398693
> 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/7oqod1290855782.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/8hz5f1290855782.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/9hz5f1290855782.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/10hz5f1290855782.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/11d9l61290855782.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/12h9ju1290855782.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/13djzl1290855782.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/14gky91290855782.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/15j2ef1290855782.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/165lu31290855782.tab")
+ }
>
> try(system("convert tmp/1lpp71290855782.ps tmp/1lpp71290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/2lpp71290855782.ps tmp/2lpp71290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/3lpp71290855782.ps tmp/3lpp71290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/4wgos1290855782.ps tmp/4wgos1290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/5wgos1290855782.ps tmp/5wgos1290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/6wgos1290855782.ps tmp/6wgos1290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/7oqod1290855782.ps tmp/7oqod1290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/8hz5f1290855782.ps tmp/8hz5f1290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/9hz5f1290855782.ps tmp/9hz5f1290855782.png",intern=TRUE))
character(0)
> try(system("convert tmp/10hz5f1290855782.ps tmp/10hz5f1290855782.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.716 1.719 10.218