R version 2.8.0 (2008-10-20)
Copyright (C) 2008 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.
Natural language support but running in an English locale
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(2,14,2,18,2,11,1,12,2,16,2,18,2,14,2,14,2,15,2,15,1,17,2,19,1,10,2,16,2,18,1,14,1,14,2,17,1,14,2,16,1,18,2,11,2,14,2,12,1,17,2,9,1,16,2,14,2,15,1,11,2,16,1,13,2,17,2,15,1,14,1,16,1,9,1,15,2,17,1,13,1,15,2,16,1,16,1,12,2,12,2,11,2,15,2,15,2,17,1,13,2,16,1,14,1,11,2,12,1,12,2,15,2,16,2,15,1,12,2,12,1,8,1,13,2,11,2,14,2,15,1,10,2,11,1,12,2,15,1,15,1,14,2,16,2,15,1,15,1,13,2,12,2,17,2,13,1,15,1,13,1,15,1,16,2,15,1,16,2,15,2,14,1,15,2,14,2,13,2,7,2,17,2,13,2,15,2,14,2,13,2,16,2,12,2,14,1,17,1,15,2,17,1,12,2,16,1,11,2,15,1,9,2,16,1,15,1,10,2,10,2,15,2,11,2,13,1,14,2,18,1,16,2,14,2,14,2,14,2,14,2,12,2,14,2,15,2,15,2,15,2,13,1,17,2,17,2,19,2,15,1,13,1,9,2,15,1,15,1,15,2,16,1,11,1,14,2,11,2,15,1,13,2,15,1,16,2,14,1,15,2,16,2,16,1,11,1,12,1,9,2,16,2,13,1,16,2,12,2,9,2,13,2,13,2,14,2,19,2,13,2,12,2,13),dim=c(2,162),dimnames=list(c('x','y'),1:162))
> y <- array(NA,dim=c(2,162),dimnames=list(c('x','y'),1:162))
> 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
y x
1 14 2
2 18 2
3 11 2
4 12 1
5 16 2
6 18 2
7 14 2
8 14 2
9 15 2
10 15 2
11 17 1
12 19 2
13 10 1
14 16 2
15 18 2
16 14 1
17 14 1
18 17 2
19 14 1
20 16 2
21 18 1
22 11 2
23 14 2
24 12 2
25 17 1
26 9 2
27 16 1
28 14 2
29 15 2
30 11 1
31 16 2
32 13 1
33 17 2
34 15 2
35 14 1
36 16 1
37 9 1
38 15 1
39 17 2
40 13 1
41 15 1
42 16 2
43 16 1
44 12 1
45 12 2
46 11 2
47 15 2
48 15 2
49 17 2
50 13 1
51 16 2
52 14 1
53 11 1
54 12 2
55 12 1
56 15 2
57 16 2
58 15 2
59 12 1
60 12 2
61 8 1
62 13 1
63 11 2
64 14 2
65 15 2
66 10 1
67 11 2
68 12 1
69 15 2
70 15 1
71 14 1
72 16 2
73 15 2
74 15 1
75 13 1
76 12 2
77 17 2
78 13 2
79 15 1
80 13 1
81 15 1
82 16 1
83 15 2
84 16 1
85 15 2
86 14 2
87 15 1
88 14 2
89 13 2
90 7 2
91 17 2
92 13 2
93 15 2
94 14 2
95 13 2
96 16 2
97 12 2
98 14 2
99 17 1
100 15 1
101 17 2
102 12 1
103 16 2
104 11 1
105 15 2
106 9 1
107 16 2
108 15 1
109 10 1
110 10 2
111 15 2
112 11 2
113 13 2
114 14 1
115 18 2
116 16 1
117 14 2
118 14 2
119 14 2
120 14 2
121 12 2
122 14 2
123 15 2
124 15 2
125 15 2
126 13 2
127 17 1
128 17 2
129 19 2
130 15 2
131 13 1
132 9 1
133 15 2
134 15 1
135 15 1
136 16 2
137 11 1
138 14 1
139 11 2
140 15 2
141 13 1
142 15 2
143 16 1
144 14 2
145 15 1
146 16 2
147 16 2
148 11 1
149 12 1
150 9 1
151 16 2
152 13 2
153 16 1
154 12 2
155 9 2
156 13 2
157 13 2
158 14 2
159 19 2
160 13 2
161 12 2
162 13 2
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) x
12.6173 0.8745
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-7.3663 -1.3663 0.5082 1.6337 4.6337
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 12.6173 0.6335 19.918 <2e-16 ***
x 0.8745 0.3739 2.339 0.0206 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.306 on 160 degrees of freedom
Multiple R-squared: 0.03306, Adjusted R-squared: 0.02702
F-statistic: 5.471 on 1 and 160 DF, p-value: 0.02057
> 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.8271208 0.3457584 0.17287920
[2,] 0.8421540 0.3156920 0.15784600
[3,] 0.7711096 0.4577809 0.22889043
[4,] 0.6866457 0.6267085 0.31335427
[5,] 0.5775981 0.8448038 0.42240192
[6,] 0.4680311 0.9360622 0.53196889
[7,] 0.5987597 0.8024806 0.40124031
[8,] 0.7324622 0.5350757 0.26753783
[9,] 0.8116233 0.3767534 0.18837670
[10,] 0.7552514 0.4894972 0.24474862
[11,] 0.7639354 0.4721293 0.23606464
[12,] 0.7064865 0.5870269 0.29351347
[13,] 0.6416290 0.7167421 0.35837103
[14,] 0.5994881 0.8010238 0.40051188
[15,] 0.5301889 0.9396222 0.46981111
[16,] 0.4629934 0.9259867 0.53700663
[17,] 0.6274588 0.7450824 0.37254120
[18,] 0.7752607 0.4494786 0.22473928
[19,] 0.7389722 0.5220556 0.26102782
[20,] 0.7746832 0.4506336 0.22531680
[21,] 0.7940994 0.4118012 0.20590061
[22,] 0.9398627 0.1202747 0.06013735
[23,] 0.9307254 0.1385492 0.06927462
[24,] 0.9108813 0.1782374 0.08911872
[25,] 0.8856074 0.2287852 0.11439258
[26,] 0.9060617 0.1878767 0.09393833
[27,] 0.8882016 0.2235968 0.11179839
[28,] 0.8653489 0.2693022 0.13465111
[29,] 0.8621419 0.2757162 0.13785810
[30,] 0.8303068 0.3393864 0.16969321
[31,] 0.7942283 0.4115435 0.20577175
[32,] 0.7838793 0.4322413 0.21612066
[33,] 0.8890550 0.2218901 0.11094504
[34,] 0.8696263 0.2607475 0.13037374
[35,] 0.8668762 0.2662475 0.13312375
[36,] 0.8407404 0.3185191 0.15925957
[37,] 0.8171083 0.3657835 0.18289173
[38,] 0.7920057 0.4159885 0.20799426
[39,] 0.7877234 0.4245532 0.21227660
[40,] 0.7735819 0.4528362 0.22641812
[41,] 0.7886287 0.4227427 0.21137133
[42,] 0.8366104 0.3267793 0.16338964
[43,] 0.8055991 0.3888018 0.19440089
[44,] 0.7714471 0.4571058 0.22855291
[45,] 0.7729738 0.4540523 0.22702616
[46,] 0.7392638 0.5214725 0.26073624
[47,] 0.7133409 0.5733182 0.28665909
[48,] 0.6722558 0.6554883 0.32774416
[49,] 0.6869888 0.6260224 0.31301122
[50,] 0.6992488 0.6015024 0.30075121
[51,] 0.6776725 0.6446549 0.32232746
[52,] 0.6362092 0.7275815 0.36379076
[53,] 0.6086788 0.7826424 0.39132122
[54,] 0.5652451 0.8695099 0.43475495
[55,] 0.5405609 0.9188782 0.45943912
[56,] 0.5525879 0.8948242 0.44741211
[57,] 0.7488848 0.5022304 0.25111520
[58,] 0.7121544 0.5756913 0.28784564
[59,] 0.7600002 0.4799995 0.23999977
[60,] 0.7247376 0.5505248 0.27526239
[61,] 0.6876301 0.6247398 0.31236992
[62,] 0.7349455 0.5301091 0.26505455
[63,] 0.7774692 0.4450615 0.22253076
[64,] 0.7563400 0.4873200 0.24365999
[65,] 0.7218073 0.5563854 0.27819272
[66,] 0.7001185 0.5997630 0.29988149
[67,] 0.6617513 0.6764975 0.33824873
[68,] 0.6393777 0.7212445 0.36062225
[69,] 0.5992445 0.8015111 0.40075555
[70,] 0.5740481 0.8519038 0.42595188
[71,] 0.5312928 0.9374144 0.46870719
[72,] 0.5351979 0.9296043 0.46480214
[73,] 0.5468561 0.9062877 0.45314385
[74,] 0.5186450 0.9627100 0.48135499
[75,] 0.4925421 0.9850842 0.50745792
[76,] 0.4496712 0.8993425 0.55032875
[77,] 0.4237735 0.8475470 0.57622649
[78,] 0.4311518 0.8623036 0.56884821
[79,] 0.3906770 0.7813541 0.60932297
[80,] 0.3987088 0.7974176 0.60129120
[81,] 0.3592250 0.7184500 0.64077501
[82,] 0.3193276 0.6386552 0.68067238
[83,] 0.2973364 0.5946729 0.70266356
[84,] 0.2606259 0.5212517 0.73937413
[85,] 0.2373368 0.4746736 0.76266320
[86,] 0.6210100 0.7579800 0.37898998
[87,] 0.6342390 0.7315220 0.36576102
[88,] 0.6054040 0.7891920 0.39459602
[89,] 0.5644205 0.8711589 0.43557946
[90,] 0.5200121 0.9599758 0.47998788
[91,] 0.4895485 0.9790969 0.51045154
[92,] 0.4670477 0.9340955 0.53295226
[93,] 0.4675833 0.9351667 0.53241667
[94,] 0.4229755 0.8459510 0.57702452
[95,] 0.4889957 0.9779915 0.51100425
[96,] 0.4681291 0.9362582 0.53187090
[97,] 0.4829317 0.9658634 0.51706828
[98,] 0.4516922 0.9033844 0.54830778
[99,] 0.4298653 0.8597306 0.57013471
[100,] 0.4298785 0.8597569 0.57012154
[101,] 0.3882947 0.7765893 0.61170535
[102,] 0.5073294 0.9853413 0.49267064
[103,] 0.4861851 0.9723702 0.51381490
[104,] 0.4607025 0.9214049 0.53929754
[105,] 0.5177451 0.9645098 0.48225489
[106,] 0.6322748 0.7354504 0.36772519
[107,] 0.5896803 0.8206393 0.41031967
[108,] 0.6395229 0.7209543 0.36047714
[109,] 0.6085584 0.7828833 0.39144164
[110,] 0.5623307 0.8753386 0.43766929
[111,] 0.6358882 0.7282236 0.36411182
[112,] 0.6481183 0.7037633 0.35188166
[113,] 0.6005457 0.7989086 0.39945429
[114,] 0.5511865 0.8976269 0.44881346
[115,] 0.5007688 0.9984623 0.49923117
[116,] 0.4500813 0.9001626 0.54991869
[117,] 0.4502110 0.9004220 0.54978899
[118,] 0.3999711 0.7999422 0.60002892
[119,] 0.3533068 0.7066135 0.64669325
[120,] 0.3086224 0.6172448 0.69137759
[121,] 0.2664989 0.5329978 0.73350109
[122,] 0.2370865 0.4741731 0.76291347
[123,] 0.3042486 0.6084971 0.69575144
[124,] 0.3179570 0.6359140 0.68204299
[125,] 0.4925580 0.9851160 0.50744200
[126,] 0.4449432 0.8898863 0.55505683
[127,] 0.3891149 0.7782298 0.61088511
[128,] 0.5241354 0.9517291 0.47586455
[129,] 0.4755248 0.9510497 0.52447515
[130,] 0.4463097 0.8926195 0.55369027
[131,] 0.4226996 0.8453992 0.57730039
[132,] 0.4097727 0.8195454 0.59022730
[133,] 0.4019228 0.8038456 0.59807722
[134,] 0.3471063 0.6942126 0.65289372
[135,] 0.3810212 0.7620425 0.61897877
[136,] 0.3304909 0.6609817 0.66950913
[137,] 0.2718797 0.5437593 0.72812033
[138,] 0.2283863 0.4567727 0.77161365
[139,] 0.2591009 0.5182017 0.74089913
[140,] 0.2045355 0.4090710 0.79546450
[141,] 0.2094329 0.4188658 0.79056712
[142,] 0.2006110 0.4012220 0.79938902
[143,] 0.1995694 0.3991387 0.80043064
[144,] 0.1625199 0.3250398 0.83748011
[145,] 0.1188488 0.2376975 0.88115123
[146,] 0.2934063 0.5868126 0.70659368
[147,] 0.3131088 0.6262176 0.68689121
[148,] 0.2327797 0.4655594 0.76722028
[149,] 0.1652892 0.3305784 0.83471080
[150,] 0.1190802 0.2381604 0.88091978
[151,] 0.2966517 0.5933035 0.70334826
[152,] 0.2029971 0.4059942 0.79700291
[153,] 0.1252204 0.2504409 0.87477957
> postscript(file="/var/www/html/freestat/rcomp/tmp/1oybp1291035456.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/freestat/rcomp/tmp/2z7as1291035456.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/freestat/rcomp/tmp/3z7as1291035456.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/freestat/rcomp/tmp/4z7as1291035456.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/freestat/rcomp/tmp/5agrc1291035456.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 = 162
Frequency = 1
1 2 3 4 5 6 7
-0.3663366 3.6336634 -3.3663366 -1.4918033 1.6336634 3.6336634 -0.3663366
8 9 10 11 12 13 14
-0.3663366 0.6336634 0.6336634 3.5081967 4.6336634 -3.4918033 1.6336634
15 16 17 18 19 20 21
3.6336634 0.5081967 0.5081967 2.6336634 0.5081967 1.6336634 4.5081967
22 23 24 25 26 27 28
-3.3663366 -0.3663366 -2.3663366 3.5081967 -5.3663366 2.5081967 -0.3663366
29 30 31 32 33 34 35
0.6336634 -2.4918033 1.6336634 -0.4918033 2.6336634 0.6336634 0.5081967
36 37 38 39 40 41 42
2.5081967 -4.4918033 1.5081967 2.6336634 -0.4918033 1.5081967 1.6336634
43 44 45 46 47 48 49
2.5081967 -1.4918033 -2.3663366 -3.3663366 0.6336634 0.6336634 2.6336634
50 51 52 53 54 55 56
-0.4918033 1.6336634 0.5081967 -2.4918033 -2.3663366 -1.4918033 0.6336634
57 58 59 60 61 62 63
1.6336634 0.6336634 -1.4918033 -2.3663366 -5.4918033 -0.4918033 -3.3663366
64 65 66 67 68 69 70
-0.3663366 0.6336634 -3.4918033 -3.3663366 -1.4918033 0.6336634 1.5081967
71 72 73 74 75 76 77
0.5081967 1.6336634 0.6336634 1.5081967 -0.4918033 -2.3663366 2.6336634
78 79 80 81 82 83 84
-1.3663366 1.5081967 -0.4918033 1.5081967 2.5081967 0.6336634 2.5081967
85 86 87 88 89 90 91
0.6336634 -0.3663366 1.5081967 -0.3663366 -1.3663366 -7.3663366 2.6336634
92 93 94 95 96 97 98
-1.3663366 0.6336634 -0.3663366 -1.3663366 1.6336634 -2.3663366 -0.3663366
99 100 101 102 103 104 105
3.5081967 1.5081967 2.6336634 -1.4918033 1.6336634 -2.4918033 0.6336634
106 107 108 109 110 111 112
-4.4918033 1.6336634 1.5081967 -3.4918033 -4.3663366 0.6336634 -3.3663366
113 114 115 116 117 118 119
-1.3663366 0.5081967 3.6336634 2.5081967 -0.3663366 -0.3663366 -0.3663366
120 121 122 123 124 125 126
-0.3663366 -2.3663366 -0.3663366 0.6336634 0.6336634 0.6336634 -1.3663366
127 128 129 130 131 132 133
3.5081967 2.6336634 4.6336634 0.6336634 -0.4918033 -4.4918033 0.6336634
134 135 136 137 138 139 140
1.5081967 1.5081967 1.6336634 -2.4918033 0.5081967 -3.3663366 0.6336634
141 142 143 144 145 146 147
-0.4918033 0.6336634 2.5081967 -0.3663366 1.5081967 1.6336634 1.6336634
148 149 150 151 152 153 154
-2.4918033 -1.4918033 -4.4918033 1.6336634 -1.3663366 2.5081967 -2.3663366
155 156 157 158 159 160 161
-5.3663366 -1.3663366 -1.3663366 -0.3663366 4.6336634 -1.3663366 -2.3663366
162
-1.3663366
> postscript(file="/var/www/html/freestat/rcomp/tmp/6agrc1291035456.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 = 162
Frequency = 1
lag(myerror, k = 1) myerror
0 -0.3663366 NA
1 3.6336634 -0.3663366
2 -3.3663366 3.6336634
3 -1.4918033 -3.3663366
4 1.6336634 -1.4918033
5 3.6336634 1.6336634
6 -0.3663366 3.6336634
7 -0.3663366 -0.3663366
8 0.6336634 -0.3663366
9 0.6336634 0.6336634
10 3.5081967 0.6336634
11 4.6336634 3.5081967
12 -3.4918033 4.6336634
13 1.6336634 -3.4918033
14 3.6336634 1.6336634
15 0.5081967 3.6336634
16 0.5081967 0.5081967
17 2.6336634 0.5081967
18 0.5081967 2.6336634
19 1.6336634 0.5081967
20 4.5081967 1.6336634
21 -3.3663366 4.5081967
22 -0.3663366 -3.3663366
23 -2.3663366 -0.3663366
24 3.5081967 -2.3663366
25 -5.3663366 3.5081967
26 2.5081967 -5.3663366
27 -0.3663366 2.5081967
28 0.6336634 -0.3663366
29 -2.4918033 0.6336634
30 1.6336634 -2.4918033
31 -0.4918033 1.6336634
32 2.6336634 -0.4918033
33 0.6336634 2.6336634
34 0.5081967 0.6336634
35 2.5081967 0.5081967
36 -4.4918033 2.5081967
37 1.5081967 -4.4918033
38 2.6336634 1.5081967
39 -0.4918033 2.6336634
40 1.5081967 -0.4918033
41 1.6336634 1.5081967
42 2.5081967 1.6336634
43 -1.4918033 2.5081967
44 -2.3663366 -1.4918033
45 -3.3663366 -2.3663366
46 0.6336634 -3.3663366
47 0.6336634 0.6336634
48 2.6336634 0.6336634
49 -0.4918033 2.6336634
50 1.6336634 -0.4918033
51 0.5081967 1.6336634
52 -2.4918033 0.5081967
53 -2.3663366 -2.4918033
54 -1.4918033 -2.3663366
55 0.6336634 -1.4918033
56 1.6336634 0.6336634
57 0.6336634 1.6336634
58 -1.4918033 0.6336634
59 -2.3663366 -1.4918033
60 -5.4918033 -2.3663366
61 -0.4918033 -5.4918033
62 -3.3663366 -0.4918033
63 -0.3663366 -3.3663366
64 0.6336634 -0.3663366
65 -3.4918033 0.6336634
66 -3.3663366 -3.4918033
67 -1.4918033 -3.3663366
68 0.6336634 -1.4918033
69 1.5081967 0.6336634
70 0.5081967 1.5081967
71 1.6336634 0.5081967
72 0.6336634 1.6336634
73 1.5081967 0.6336634
74 -0.4918033 1.5081967
75 -2.3663366 -0.4918033
76 2.6336634 -2.3663366
77 -1.3663366 2.6336634
78 1.5081967 -1.3663366
79 -0.4918033 1.5081967
80 1.5081967 -0.4918033
81 2.5081967 1.5081967
82 0.6336634 2.5081967
83 2.5081967 0.6336634
84 0.6336634 2.5081967
85 -0.3663366 0.6336634
86 1.5081967 -0.3663366
87 -0.3663366 1.5081967
88 -1.3663366 -0.3663366
89 -7.3663366 -1.3663366
90 2.6336634 -7.3663366
91 -1.3663366 2.6336634
92 0.6336634 -1.3663366
93 -0.3663366 0.6336634
94 -1.3663366 -0.3663366
95 1.6336634 -1.3663366
96 -2.3663366 1.6336634
97 -0.3663366 -2.3663366
98 3.5081967 -0.3663366
99 1.5081967 3.5081967
100 2.6336634 1.5081967
101 -1.4918033 2.6336634
102 1.6336634 -1.4918033
103 -2.4918033 1.6336634
104 0.6336634 -2.4918033
105 -4.4918033 0.6336634
106 1.6336634 -4.4918033
107 1.5081967 1.6336634
108 -3.4918033 1.5081967
109 -4.3663366 -3.4918033
110 0.6336634 -4.3663366
111 -3.3663366 0.6336634
112 -1.3663366 -3.3663366
113 0.5081967 -1.3663366
114 3.6336634 0.5081967
115 2.5081967 3.6336634
116 -0.3663366 2.5081967
117 -0.3663366 -0.3663366
118 -0.3663366 -0.3663366
119 -0.3663366 -0.3663366
120 -2.3663366 -0.3663366
121 -0.3663366 -2.3663366
122 0.6336634 -0.3663366
123 0.6336634 0.6336634
124 0.6336634 0.6336634
125 -1.3663366 0.6336634
126 3.5081967 -1.3663366
127 2.6336634 3.5081967
128 4.6336634 2.6336634
129 0.6336634 4.6336634
130 -0.4918033 0.6336634
131 -4.4918033 -0.4918033
132 0.6336634 -4.4918033
133 1.5081967 0.6336634
134 1.5081967 1.5081967
135 1.6336634 1.5081967
136 -2.4918033 1.6336634
137 0.5081967 -2.4918033
138 -3.3663366 0.5081967
139 0.6336634 -3.3663366
140 -0.4918033 0.6336634
141 0.6336634 -0.4918033
142 2.5081967 0.6336634
143 -0.3663366 2.5081967
144 1.5081967 -0.3663366
145 1.6336634 1.5081967
146 1.6336634 1.6336634
147 -2.4918033 1.6336634
148 -1.4918033 -2.4918033
149 -4.4918033 -1.4918033
150 1.6336634 -4.4918033
151 -1.3663366 1.6336634
152 2.5081967 -1.3663366
153 -2.3663366 2.5081967
154 -5.3663366 -2.3663366
155 -1.3663366 -5.3663366
156 -1.3663366 -1.3663366
157 -0.3663366 -1.3663366
158 4.6336634 -0.3663366
159 -1.3663366 4.6336634
160 -2.3663366 -1.3663366
161 -1.3663366 -2.3663366
162 NA -1.3663366
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.6336634 -0.3663366
[2,] -3.3663366 3.6336634
[3,] -1.4918033 -3.3663366
[4,] 1.6336634 -1.4918033
[5,] 3.6336634 1.6336634
[6,] -0.3663366 3.6336634
[7,] -0.3663366 -0.3663366
[8,] 0.6336634 -0.3663366
[9,] 0.6336634 0.6336634
[10,] 3.5081967 0.6336634
[11,] 4.6336634 3.5081967
[12,] -3.4918033 4.6336634
[13,] 1.6336634 -3.4918033
[14,] 3.6336634 1.6336634
[15,] 0.5081967 3.6336634
[16,] 0.5081967 0.5081967
[17,] 2.6336634 0.5081967
[18,] 0.5081967 2.6336634
[19,] 1.6336634 0.5081967
[20,] 4.5081967 1.6336634
[21,] -3.3663366 4.5081967
[22,] -0.3663366 -3.3663366
[23,] -2.3663366 -0.3663366
[24,] 3.5081967 -2.3663366
[25,] -5.3663366 3.5081967
[26,] 2.5081967 -5.3663366
[27,] -0.3663366 2.5081967
[28,] 0.6336634 -0.3663366
[29,] -2.4918033 0.6336634
[30,] 1.6336634 -2.4918033
[31,] -0.4918033 1.6336634
[32,] 2.6336634 -0.4918033
[33,] 0.6336634 2.6336634
[34,] 0.5081967 0.6336634
[35,] 2.5081967 0.5081967
[36,] -4.4918033 2.5081967
[37,] 1.5081967 -4.4918033
[38,] 2.6336634 1.5081967
[39,] -0.4918033 2.6336634
[40,] 1.5081967 -0.4918033
[41,] 1.6336634 1.5081967
[42,] 2.5081967 1.6336634
[43,] -1.4918033 2.5081967
[44,] -2.3663366 -1.4918033
[45,] -3.3663366 -2.3663366
[46,] 0.6336634 -3.3663366
[47,] 0.6336634 0.6336634
[48,] 2.6336634 0.6336634
[49,] -0.4918033 2.6336634
[50,] 1.6336634 -0.4918033
[51,] 0.5081967 1.6336634
[52,] -2.4918033 0.5081967
[53,] -2.3663366 -2.4918033
[54,] -1.4918033 -2.3663366
[55,] 0.6336634 -1.4918033
[56,] 1.6336634 0.6336634
[57,] 0.6336634 1.6336634
[58,] -1.4918033 0.6336634
[59,] -2.3663366 -1.4918033
[60,] -5.4918033 -2.3663366
[61,] -0.4918033 -5.4918033
[62,] -3.3663366 -0.4918033
[63,] -0.3663366 -3.3663366
[64,] 0.6336634 -0.3663366
[65,] -3.4918033 0.6336634
[66,] -3.3663366 -3.4918033
[67,] -1.4918033 -3.3663366
[68,] 0.6336634 -1.4918033
[69,] 1.5081967 0.6336634
[70,] 0.5081967 1.5081967
[71,] 1.6336634 0.5081967
[72,] 0.6336634 1.6336634
[73,] 1.5081967 0.6336634
[74,] -0.4918033 1.5081967
[75,] -2.3663366 -0.4918033
[76,] 2.6336634 -2.3663366
[77,] -1.3663366 2.6336634
[78,] 1.5081967 -1.3663366
[79,] -0.4918033 1.5081967
[80,] 1.5081967 -0.4918033
[81,] 2.5081967 1.5081967
[82,] 0.6336634 2.5081967
[83,] 2.5081967 0.6336634
[84,] 0.6336634 2.5081967
[85,] -0.3663366 0.6336634
[86,] 1.5081967 -0.3663366
[87,] -0.3663366 1.5081967
[88,] -1.3663366 -0.3663366
[89,] -7.3663366 -1.3663366
[90,] 2.6336634 -7.3663366
[91,] -1.3663366 2.6336634
[92,] 0.6336634 -1.3663366
[93,] -0.3663366 0.6336634
[94,] -1.3663366 -0.3663366
[95,] 1.6336634 -1.3663366
[96,] -2.3663366 1.6336634
[97,] -0.3663366 -2.3663366
[98,] 3.5081967 -0.3663366
[99,] 1.5081967 3.5081967
[100,] 2.6336634 1.5081967
[101,] -1.4918033 2.6336634
[102,] 1.6336634 -1.4918033
[103,] -2.4918033 1.6336634
[104,] 0.6336634 -2.4918033
[105,] -4.4918033 0.6336634
[106,] 1.6336634 -4.4918033
[107,] 1.5081967 1.6336634
[108,] -3.4918033 1.5081967
[109,] -4.3663366 -3.4918033
[110,] 0.6336634 -4.3663366
[111,] -3.3663366 0.6336634
[112,] -1.3663366 -3.3663366
[113,] 0.5081967 -1.3663366
[114,] 3.6336634 0.5081967
[115,] 2.5081967 3.6336634
[116,] -0.3663366 2.5081967
[117,] -0.3663366 -0.3663366
[118,] -0.3663366 -0.3663366
[119,] -0.3663366 -0.3663366
[120,] -2.3663366 -0.3663366
[121,] -0.3663366 -2.3663366
[122,] 0.6336634 -0.3663366
[123,] 0.6336634 0.6336634
[124,] 0.6336634 0.6336634
[125,] -1.3663366 0.6336634
[126,] 3.5081967 -1.3663366
[127,] 2.6336634 3.5081967
[128,] 4.6336634 2.6336634
[129,] 0.6336634 4.6336634
[130,] -0.4918033 0.6336634
[131,] -4.4918033 -0.4918033
[132,] 0.6336634 -4.4918033
[133,] 1.5081967 0.6336634
[134,] 1.5081967 1.5081967
[135,] 1.6336634 1.5081967
[136,] -2.4918033 1.6336634
[137,] 0.5081967 -2.4918033
[138,] -3.3663366 0.5081967
[139,] 0.6336634 -3.3663366
[140,] -0.4918033 0.6336634
[141,] 0.6336634 -0.4918033
[142,] 2.5081967 0.6336634
[143,] -0.3663366 2.5081967
[144,] 1.5081967 -0.3663366
[145,] 1.6336634 1.5081967
[146,] 1.6336634 1.6336634
[147,] -2.4918033 1.6336634
[148,] -1.4918033 -2.4918033
[149,] -4.4918033 -1.4918033
[150,] 1.6336634 -4.4918033
[151,] -1.3663366 1.6336634
[152,] 2.5081967 -1.3663366
[153,] -2.3663366 2.5081967
[154,] -5.3663366 -2.3663366
[155,] -1.3663366 -5.3663366
[156,] -1.3663366 -1.3663366
[157,] -0.3663366 -1.3663366
[158,] 4.6336634 -0.3663366
[159,] -1.3663366 4.6336634
[160,] -2.3663366 -1.3663366
[161,] -1.3663366 -2.3663366
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.6336634 -0.3663366
2 -3.3663366 3.6336634
3 -1.4918033 -3.3663366
4 1.6336634 -1.4918033
5 3.6336634 1.6336634
6 -0.3663366 3.6336634
7 -0.3663366 -0.3663366
8 0.6336634 -0.3663366
9 0.6336634 0.6336634
10 3.5081967 0.6336634
11 4.6336634 3.5081967
12 -3.4918033 4.6336634
13 1.6336634 -3.4918033
14 3.6336634 1.6336634
15 0.5081967 3.6336634
16 0.5081967 0.5081967
17 2.6336634 0.5081967
18 0.5081967 2.6336634
19 1.6336634 0.5081967
20 4.5081967 1.6336634
21 -3.3663366 4.5081967
22 -0.3663366 -3.3663366
23 -2.3663366 -0.3663366
24 3.5081967 -2.3663366
25 -5.3663366 3.5081967
26 2.5081967 -5.3663366
27 -0.3663366 2.5081967
28 0.6336634 -0.3663366
29 -2.4918033 0.6336634
30 1.6336634 -2.4918033
31 -0.4918033 1.6336634
32 2.6336634 -0.4918033
33 0.6336634 2.6336634
34 0.5081967 0.6336634
35 2.5081967 0.5081967
36 -4.4918033 2.5081967
37 1.5081967 -4.4918033
38 2.6336634 1.5081967
39 -0.4918033 2.6336634
40 1.5081967 -0.4918033
41 1.6336634 1.5081967
42 2.5081967 1.6336634
43 -1.4918033 2.5081967
44 -2.3663366 -1.4918033
45 -3.3663366 -2.3663366
46 0.6336634 -3.3663366
47 0.6336634 0.6336634
48 2.6336634 0.6336634
49 -0.4918033 2.6336634
50 1.6336634 -0.4918033
51 0.5081967 1.6336634
52 -2.4918033 0.5081967
53 -2.3663366 -2.4918033
54 -1.4918033 -2.3663366
55 0.6336634 -1.4918033
56 1.6336634 0.6336634
57 0.6336634 1.6336634
58 -1.4918033 0.6336634
59 -2.3663366 -1.4918033
60 -5.4918033 -2.3663366
61 -0.4918033 -5.4918033
62 -3.3663366 -0.4918033
63 -0.3663366 -3.3663366
64 0.6336634 -0.3663366
65 -3.4918033 0.6336634
66 -3.3663366 -3.4918033
67 -1.4918033 -3.3663366
68 0.6336634 -1.4918033
69 1.5081967 0.6336634
70 0.5081967 1.5081967
71 1.6336634 0.5081967
72 0.6336634 1.6336634
73 1.5081967 0.6336634
74 -0.4918033 1.5081967
75 -2.3663366 -0.4918033
76 2.6336634 -2.3663366
77 -1.3663366 2.6336634
78 1.5081967 -1.3663366
79 -0.4918033 1.5081967
80 1.5081967 -0.4918033
81 2.5081967 1.5081967
82 0.6336634 2.5081967
83 2.5081967 0.6336634
84 0.6336634 2.5081967
85 -0.3663366 0.6336634
86 1.5081967 -0.3663366
87 -0.3663366 1.5081967
88 -1.3663366 -0.3663366
89 -7.3663366 -1.3663366
90 2.6336634 -7.3663366
91 -1.3663366 2.6336634
92 0.6336634 -1.3663366
93 -0.3663366 0.6336634
94 -1.3663366 -0.3663366
95 1.6336634 -1.3663366
96 -2.3663366 1.6336634
97 -0.3663366 -2.3663366
98 3.5081967 -0.3663366
99 1.5081967 3.5081967
100 2.6336634 1.5081967
101 -1.4918033 2.6336634
102 1.6336634 -1.4918033
103 -2.4918033 1.6336634
104 0.6336634 -2.4918033
105 -4.4918033 0.6336634
106 1.6336634 -4.4918033
107 1.5081967 1.6336634
108 -3.4918033 1.5081967
109 -4.3663366 -3.4918033
110 0.6336634 -4.3663366
111 -3.3663366 0.6336634
112 -1.3663366 -3.3663366
113 0.5081967 -1.3663366
114 3.6336634 0.5081967
115 2.5081967 3.6336634
116 -0.3663366 2.5081967
117 -0.3663366 -0.3663366
118 -0.3663366 -0.3663366
119 -0.3663366 -0.3663366
120 -2.3663366 -0.3663366
121 -0.3663366 -2.3663366
122 0.6336634 -0.3663366
123 0.6336634 0.6336634
124 0.6336634 0.6336634
125 -1.3663366 0.6336634
126 3.5081967 -1.3663366
127 2.6336634 3.5081967
128 4.6336634 2.6336634
129 0.6336634 4.6336634
130 -0.4918033 0.6336634
131 -4.4918033 -0.4918033
132 0.6336634 -4.4918033
133 1.5081967 0.6336634
134 1.5081967 1.5081967
135 1.6336634 1.5081967
136 -2.4918033 1.6336634
137 0.5081967 -2.4918033
138 -3.3663366 0.5081967
139 0.6336634 -3.3663366
140 -0.4918033 0.6336634
141 0.6336634 -0.4918033
142 2.5081967 0.6336634
143 -0.3663366 2.5081967
144 1.5081967 -0.3663366
145 1.6336634 1.5081967
146 1.6336634 1.6336634
147 -2.4918033 1.6336634
148 -1.4918033 -2.4918033
149 -4.4918033 -1.4918033
150 1.6336634 -4.4918033
151 -1.3663366 1.6336634
152 2.5081967 -1.3663366
153 -2.3663366 2.5081967
154 -5.3663366 -2.3663366
155 -1.3663366 -5.3663366
156 -1.3663366 -1.3663366
157 -0.3663366 -1.3663366
158 4.6336634 -0.3663366
159 -1.3663366 4.6336634
160 -2.3663366 -1.3663366
161 -1.3663366 -2.3663366
> 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/freestat/rcomp/tmp/7k8qx1291035456.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/freestat/rcomp/tmp/8vz8i1291035456.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/freestat/rcomp/tmp/9vz8i1291035456.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/freestat/rcomp/tmp/10vz8i1291035456.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/119r6r1291035456.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/freestat/rcomp/tmp/1220nu1291035456.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/freestat/rcomp/tmp/1391261291035456.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/freestat/rcomp/tmp/14cj0u1291035456.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/freestat/rcomp/tmp/15fkhh1291035456.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/freestat/rcomp/tmp/1612fn1291035456.tab")
+ }
>
> try(system("convert tmp/1oybp1291035456.ps tmp/1oybp1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/2z7as1291035456.ps tmp/2z7as1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/3z7as1291035456.ps tmp/3z7as1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/4z7as1291035456.ps tmp/4z7as1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/5agrc1291035456.ps tmp/5agrc1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/6agrc1291035456.ps tmp/6agrc1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/7k8qx1291035456.ps tmp/7k8qx1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/8vz8i1291035456.ps tmp/8vz8i1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/9vz8i1291035456.ps tmp/9vz8i1291035456.png",intern=TRUE))
character(0)
> try(system("convert tmp/10vz8i1291035456.ps tmp/10vz8i1291035456.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.374 2.667 5.753