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(5,1,4,1,5,1,6,1,6,1,6,1,7,1,8,1,7,1,8,1,7,1,8,1,8,1,9,1,9,1,8,1,9,1,9,1,10,1,11,1,12,1,13,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,18,1,19,1,20,1,22,1,20,1,22,1,25,1,24,1,25,1,28,1,26,1,27,1,26,1,25,1,27,1,28,1,30,1,31,1,32,1,34,1,34,1,33,1,32,1,34,1,36,1,37,1,40,1,38,1,38,1,36,1,40,1,40,1,42,1,44,1,45,1,47,1,49,1,47,1,49,1,52,1,50,1,50,1,57,1,58,1,58,1,58,1,61,1,61,1,64,1,68,1,40,1,34,1,46,1,36,1,34,1,45,1,55,1,50,1,56,1,72,1,76,1,78,1,77,1,90,1,88,1,97,1,93,1,84,1,67,1,72,1,75,1,71,1,75,1,90,1,78,1,73,1,62,1,65,1,61,1,58,1,33,1,39,1,56,1,79,1,82,1,79,1,73,1,87,1,85,1,83,1,82,1,83,1,92,1,95,1,97,1,87,1,84,1,84,1,89,1,103,1,106,1,109,1,106,1,105,1,115,1,120,1,124,1,121,1,131,1,139,1,133,1,119,1,123,1,120,1,128,1,134,1,126,1,115,1,106,1,99,1,100,1,99,1,99,1,100,1,100,1,108,1,109,1,115,1,114,1,108,1,113,1,118,1,122,1,118,1,121,1,118,1,121,1,121,1,112,1,119,1,116,1,110,0,111,0,106,0,108,0),dim=c(2,176),dimnames=list(c('CO2-uitstoot','Dummy'),1:176))
>  y <- array(NA,dim=c(2,176),dimnames=list(c('CO2-uitstoot','Dummy'),1:176))
>  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 = '1'
> #'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
    CO2-uitstoot Dummy
1              5     1
2              4     1
3              5     1
4              6     1
5              6     1
6              6     1
7              7     1
8              8     1
9              7     1
10             8     1
11             7     1
12             8     1
13             8     1
14             9     1
15             9     1
16             8     1
17             9     1
18             9     1
19            10     1
20            11     1
21            12     1
22            13     1
23            13     1
24            13     1
25            14     1
26            14     1
27            15     1
28            15     1
29            16     1
30            16     1
31            17     1
32            18     1
33            19     1
34            20     1
35            22     1
36            20     1
37            22     1
38            25     1
39            24     1
40            25     1
41            28     1
42            26     1
43            27     1
44            26     1
45            25     1
46            27     1
47            28     1
48            30     1
49            31     1
50            32     1
51            34     1
52            34     1
53            33     1
54            32     1
55            34     1
56            36     1
57            37     1
58            40     1
59            38     1
60            38     1
61            36     1
62            40     1
63            40     1
64            42     1
65            44     1
66            45     1
67            47     1
68            49     1
69            47     1
70            49     1
71            52     1
72            50     1
73            50     1
74            57     1
75            58     1
76            58     1
77            58     1
78            61     1
79            61     1
80            64     1
81            68     1
82            40     1
83            34     1
84            46     1
85            36     1
86            34     1
87            45     1
88            55     1
89            50     1
90            56     1
91            72     1
92            76     1
93            78     1
94            77     1
95            90     1
96            88     1
97            97     1
98            93     1
99            84     1
100           67     1
101           72     1
102           75     1
103           71     1
104           75     1
105           90     1
106           78     1
107           73     1
108           62     1
109           65     1
110           61     1
111           58     1
112           33     1
113           39     1
114           56     1
115           79     1
116           82     1
117           79     1
118           73     1
119           87     1
120           85     1
121           83     1
122           82     1
123           83     1
124           92     1
125           95     1
126           97     1
127           87     1
128           84     1
129           84     1
130           89     1
131          103     1
132          106     1
133          109     1
134          106     1
135          105     1
136          115     1
137          120     1
138          124     1
139          121     1
140          131     1
141          139     1
142          133     1
143          119     1
144          123     1
145          120     1
146          128     1
147          134     1
148          126     1
149          115     1
150          106     1
151           99     1
152          100     1
153           99     1
154           99     1
155          100     1
156          100     1
157          108     1
158          109     1
159          115     1
160          114     1
161          108     1
162          113     1
163          118     1
164          122     1
165          118     1
166          121     1
167          118     1
168          121     1
169          121     1
170          112     1
171          119     1
172          116     1
173          110     0
174          111     0
175          106     0
176          108     0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept)        Dummy  
      108.7        -47.5  
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
   Min     1Q Median     3Q    Max 
-57.25 -34.25  -3.25  34.25  77.75 
Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   108.75      19.51   5.574 9.34e-08 ***
Dummy         -47.50      19.74  -2.407   0.0171 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
Residual standard error: 39.02 on 174 degrees of freedom
Multiple R-squared: 0.03222,	Adjusted R-squared: 0.02666 
F-statistic: 5.793 on 1 and 174 DF,  p-value: 0.01714 
> 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,] 2.215154e-05 4.430307e-05 9.999778e-01
  [2,] 6.576798e-07 1.315360e-06 9.999993e-01
  [3,] 5.286653e-08 1.057331e-07 9.999999e-01
  [4,] 9.255217e-09 1.851043e-08 1.000000e+00
  [5,] 4.321260e-10 8.642519e-10 1.000000e+00
  [6,] 4.067973e-11 8.135946e-11 1.000000e+00
  [7,] 1.731660e-12 3.463319e-12 1.000000e+00
  [8,] 1.335809e-13 2.671619e-13 1.000000e+00
  [9,] 9.325427e-15 1.865085e-14 1.000000e+00
 [10,] 1.451227e-15 2.902454e-15 1.000000e+00
 [11,] 1.789681e-16 3.579361e-16 1.000000e+00
 [12,] 1.036232e-17 2.072464e-17 1.000000e+00
 [13,] 1.089003e-18 2.178006e-18 1.000000e+00
 [14,] 1.054518e-19 2.109036e-19 1.000000e+00
 [15,] 2.171323e-20 4.342646e-20 1.000000e+00
 [16,] 9.398465e-21 1.879693e-20 1.000000e+00
 [17,] 7.223985e-21 1.444797e-20 1.000000e+00
 [18,] 8.113079e-21 1.622616e-20 1.000000e+00
 [19,] 5.119219e-21 1.023844e-20 1.000000e+00
 [20,] 2.327490e-21 4.654981e-21 1.000000e+00
 [21,] 1.600089e-21 3.200179e-21 1.000000e+00
 [22,] 8.287863e-22 1.657573e-21 1.000000e+00
 [23,] 6.179075e-22 1.235815e-21 1.000000e+00
 [24,] 3.599701e-22 7.199403e-22 1.000000e+00
 [25,] 2.905205e-22 5.810409e-22 1.000000e+00
 [26,] 1.887623e-22 3.775247e-22 1.000000e+00
 [27,] 1.647909e-22 3.295818e-22 1.000000e+00
 [28,] 1.852594e-22 3.705188e-22 1.000000e+00
 [29,] 2.566961e-22 5.133921e-22 1.000000e+00
 [30,] 4.210006e-22 8.420012e-22 1.000000e+00
 [31,] 1.216284e-21 2.432568e-21 1.000000e+00
 [32,] 1.166920e-21 2.333840e-21 1.000000e+00
 [33,] 1.919497e-21 3.838993e-21 1.000000e+00
 [34,] 7.438257e-21 1.487651e-20 1.000000e+00
 [35,] 1.404291e-20 2.808582e-20 1.000000e+00
 [36,] 2.908705e-20 5.817410e-20 1.000000e+00
 [37,] 1.197770e-19 2.395540e-19 1.000000e+00
 [38,] 2.054199e-19 4.108397e-19 1.000000e+00
 [39,] 3.879216e-19 7.758433e-19 1.000000e+00
 [40,] 5.129405e-19 1.025881e-18 1.000000e+00
 [41,] 5.245760e-19 1.049152e-18 1.000000e+00
 [42,] 7.420062e-19 1.484012e-18 1.000000e+00
 [43,] 1.180385e-18 2.360771e-18 1.000000e+00
 [44,] 2.545373e-18 5.090746e-18 1.000000e+00
 [45,] 5.902586e-18 1.180517e-17 1.000000e+00
 [46,] 1.456780e-17 2.913560e-17 1.000000e+00
 [47,] 4.578375e-17 9.156750e-17 1.000000e+00
 [48,] 1.221603e-16 2.443206e-16 1.000000e+00
 [49,] 2.463694e-16 4.927389e-16 1.000000e+00
 [50,] 4.046767e-16 8.093534e-16 1.000000e+00
 [51,] 8.300185e-16 1.660037e-15 1.000000e+00
 [52,] 2.096037e-15 4.192075e-15 1.000000e+00
 [53,] 5.533403e-15 1.106681e-14 1.000000e+00
 [54,] 2.005905e-14 4.011810e-14 1.000000e+00
 [55,] 4.878684e-14 9.757368e-14 1.000000e+00
 [56,] 1.105264e-13 2.210527e-13 1.000000e+00
 [57,] 1.965660e-13 3.931321e-13 1.000000e+00
 [58,] 5.008438e-13 1.001688e-12 1.000000e+00
 [59,] 1.195130e-12 2.390259e-12 1.000000e+00
 [60,] 3.266214e-12 6.532427e-12 1.000000e+00
 [61,] 1.003849e-11 2.007698e-11 1.000000e+00
 [62,] 3.083503e-11 6.167006e-11 1.000000e+00
 [63,] 1.032811e-10 2.065623e-10 1.000000e+00
 [64,] 3.691667e-10 7.383333e-10 1.000000e+00
 [65,] 9.930174e-10 1.986035e-09 1.000000e+00
 [66,] 2.863456e-09 5.726911e-09 1.000000e+00
 [67,] 9.374931e-09 1.874986e-08 1.000000e+00
 [68,] 2.395699e-08 4.791399e-08 1.000000e+00
 [69,] 5.714084e-08 1.142817e-07 9.999999e-01
 [70,] 1.946007e-07 3.892015e-07 9.999998e-01
 [71,] 6.103870e-07 1.220774e-06 9.999994e-01
 [72,] 1.675660e-06 3.351319e-06 9.999983e-01
 [73,] 4.122477e-06 8.244954e-06 9.999959e-01
 [74,] 1.061335e-05 2.122671e-05 9.999894e-01
 [75,] 2.447469e-05 4.894937e-05 9.999755e-01
 [76,] 5.805295e-05 1.161059e-04 9.999419e-01
 [77,] 1.454002e-04 2.908003e-04 9.998546e-01
 [78,] 2.142916e-04 4.285831e-04 9.997857e-01
 [79,] 3.667253e-04 7.334507e-04 9.996333e-01
 [80,] 5.613759e-04 1.122752e-03 9.994386e-01
 [81,] 1.012808e-03 2.025615e-03 9.989872e-01
 [82,] 2.038940e-03 4.077879e-03 9.979611e-01
 [83,] 3.493620e-03 6.987241e-03 9.965064e-01
 [84,] 5.852354e-03 1.170471e-02 9.941476e-01
 [85,] 9.808359e-03 1.961672e-02 9.901916e-01
 [86,] 1.614006e-02 3.228012e-02 9.838599e-01
 [87,] 2.980313e-02 5.960627e-02 9.701969e-01
 [88,] 5.310431e-02 1.062086e-01 9.468957e-01
 [89,] 8.750889e-02 1.750178e-01 9.124911e-01
 [90,] 1.292406e-01 2.584812e-01 8.707594e-01
 [91,] 2.102593e-01 4.205187e-01 7.897407e-01
 [92,] 2.926951e-01 5.853902e-01 7.073049e-01
 [93,] 4.122022e-01 8.244044e-01 5.877978e-01
 [94,] 5.053561e-01 9.892877e-01 4.946439e-01
 [95,] 5.609325e-01 8.781349e-01 4.390675e-01
 [96,] 6.000091e-01 7.999817e-01 3.999909e-01
 [97,] 6.361625e-01 7.276750e-01 3.638375e-01
 [98,] 6.702171e-01 6.595657e-01 3.297829e-01
 [99,] 7.027253e-01 5.945495e-01 2.972747e-01
[100,] 7.320677e-01 5.358647e-01 2.679323e-01
[101,] 7.689708e-01 4.620584e-01 2.310292e-01
[102,] 7.909063e-01 4.181874e-01 2.090937e-01
[103,] 8.124712e-01 3.750577e-01 1.875288e-01
[104,] 8.464929e-01 3.070142e-01 1.535071e-01
[105,] 8.742936e-01 2.514128e-01 1.257064e-01
[106,] 9.060952e-01 1.878097e-01 9.390483e-02
[107,] 9.381932e-01 1.236136e-01 6.180678e-02
[108,] 9.890282e-01 2.194362e-02 1.097181e-02
[109,] 9.989424e-01 2.115111e-03 1.057556e-03
[110,] 9.998269e-01 3.461055e-04 1.730528e-04
[111,] 9.999130e-01 1.739181e-04 8.695904e-05
[112,] 9.999535e-01 9.304288e-05 4.652144e-05
[113,] 9.999795e-01 4.105052e-05 2.052526e-05
[114,] 9.999948e-01 1.048133e-05 5.240663e-06
[115,] 9.999972e-01 5.628889e-06 2.814445e-06
[116,] 9.999987e-01 2.630188e-06 1.315094e-06
[117,] 9.999995e-01 9.957219e-07 4.978609e-07
[118,] 9.999998e-01 3.033154e-07 1.516577e-07
[119,] 1.000000e+00 8.477027e-08 4.238514e-08
[120,] 1.000000e+00 4.475891e-08 2.237945e-08
[121,] 1.000000e+00 2.800729e-08 1.400365e-08
[122,] 1.000000e+00 1.964476e-08 9.822379e-09
[123,] 1.000000e+00 5.764879e-09 2.882439e-09
[124,] 1.000000e+00 8.580365e-10 4.290183e-10
[125,] 1.000000e+00 7.757499e-11 3.878750e-11
[126,] 1.000000e+00 1.067370e-11 5.336850e-12
[127,] 1.000000e+00 8.631207e-12 4.315604e-12
[128,] 1.000000e+00 8.911549e-12 4.455775e-12
[129,] 1.000000e+00 1.113459e-11 5.567297e-12
[130,] 1.000000e+00 1.239123e-11 6.195614e-12
[131,] 1.000000e+00 1.307527e-11 6.537637e-12
[132,] 1.000000e+00 2.062473e-11 1.031236e-11
[133,] 1.000000e+00 2.983696e-11 1.491848e-11
[134,] 1.000000e+00 3.507167e-11 1.753583e-11
[135,] 1.000000e+00 5.386906e-11 2.693453e-11
[136,] 1.000000e+00 3.122878e-11 1.561439e-11
[137,] 1.000000e+00 3.312657e-12 1.656328e-12
[138,] 1.000000e+00 1.001511e-12 5.007553e-13
[139,] 1.000000e+00 2.193802e-12 1.096901e-12
[140,] 1.000000e+00 3.402693e-12 1.701347e-12
[141,] 1.000000e+00 7.205029e-12 3.602515e-12
[142,] 1.000000e+00 5.273891e-12 2.636945e-12
[143,] 1.000000e+00 6.777571e-13 3.388786e-13
[144,] 1.000000e+00 4.640103e-13 2.320052e-13
[145,] 1.000000e+00 1.572737e-12 7.863684e-13
[146,] 1.000000e+00 5.178142e-12 2.589071e-12
[147,] 1.000000e+00 6.416149e-12 3.208075e-12
[148,] 1.000000e+00 8.176965e-12 4.088483e-12
[149,] 1.000000e+00 6.454117e-12 3.227059e-12
[150,] 1.000000e+00 3.182777e-12 1.591388e-12
[151,] 1.000000e+00 1.041702e-12 5.208510e-13
[152,] 1.000000e+00 7.138941e-14 3.569471e-14
[153,] 1.000000e+00 9.894031e-14 4.947016e-14
[154,] 1.000000e+00 1.406687e-13 7.033437e-14
[155,] 1.000000e+00 1.112464e-12 5.562321e-13
[156,] 1.000000e+00 7.290124e-12 3.645062e-12
[157,] 1.000000e+00 1.762798e-12 8.813992e-13
[158,] 1.000000e+00 4.262287e-12 2.131144e-12
[159,] 1.000000e+00 5.267385e-11 2.633693e-11
[160,] 1.000000e+00 3.181893e-10 1.590947e-10
[161,] 1.000000e+00 4.070853e-09 2.035427e-09
[162,] 1.000000e+00 3.230060e-08 1.615030e-08
[163,] 9.999998e-01 4.047598e-07 2.023799e-07
[164,] 9.999986e-01 2.720214e-06 1.360107e-06
[165,] 9.999943e-01 1.144098e-05 5.720489e-06
[166,] 9.999803e-01 3.942280e-05 1.971140e-05
[167,] 9.997527e-01 4.946680e-04 2.473340e-04
> postscript(file="/var/www/html/rcomp/tmp/1f7d21292338939.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/2f7d21292338939.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/3f7d21292338939.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/47yu51292338939.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/57yu51292338939.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 = 176 
Frequency = 1 
     1      2      3      4      5      6      7      8      9     10     11 
-56.25 -57.25 -56.25 -55.25 -55.25 -55.25 -54.25 -53.25 -54.25 -53.25 -54.25 
    12     13     14     15     16     17     18     19     20     21     22 
-53.25 -53.25 -52.25 -52.25 -53.25 -52.25 -52.25 -51.25 -50.25 -49.25 -48.25 
    23     24     25     26     27     28     29     30     31     32     33 
-48.25 -48.25 -47.25 -47.25 -46.25 -46.25 -45.25 -45.25 -44.25 -43.25 -42.25 
    34     35     36     37     38     39     40     41     42     43     44 
-41.25 -39.25 -41.25 -39.25 -36.25 -37.25 -36.25 -33.25 -35.25 -34.25 -35.25 
    45     46     47     48     49     50     51     52     53     54     55 
-36.25 -34.25 -33.25 -31.25 -30.25 -29.25 -27.25 -27.25 -28.25 -29.25 -27.25 
    56     57     58     59     60     61     62     63     64     65     66 
-25.25 -24.25 -21.25 -23.25 -23.25 -25.25 -21.25 -21.25 -19.25 -17.25 -16.25 
    67     68     69     70     71     72     73     74     75     76     77 
-14.25 -12.25 -14.25 -12.25  -9.25 -11.25 -11.25  -4.25  -3.25  -3.25  -3.25 
    78     79     80     81     82     83     84     85     86     87     88 
 -0.25  -0.25   2.75   6.75 -21.25 -27.25 -15.25 -25.25 -27.25 -16.25  -6.25 
    89     90     91     92     93     94     95     96     97     98     99 
-11.25  -5.25  10.75  14.75  16.75  15.75  28.75  26.75  35.75  31.75  22.75 
   100    101    102    103    104    105    106    107    108    109    110 
  5.75  10.75  13.75   9.75  13.75  28.75  16.75  11.75   0.75   3.75  -0.25 
   111    112    113    114    115    116    117    118    119    120    121 
 -3.25 -28.25 -22.25  -5.25  17.75  20.75  17.75  11.75  25.75  23.75  21.75 
   122    123    124    125    126    127    128    129    130    131    132 
 20.75  21.75  30.75  33.75  35.75  25.75  22.75  22.75  27.75  41.75  44.75 
   133    134    135    136    137    138    139    140    141    142    143 
 47.75  44.75  43.75  53.75  58.75  62.75  59.75  69.75  77.75  71.75  57.75 
   144    145    146    147    148    149    150    151    152    153    154 
 61.75  58.75  66.75  72.75  64.75  53.75  44.75  37.75  38.75  37.75  37.75 
   155    156    157    158    159    160    161    162    163    164    165 
 38.75  38.75  46.75  47.75  53.75  52.75  46.75  51.75  56.75  60.75  56.75 
   166    167    168    169    170    171    172    173    174    175    176 
 59.75  56.75  59.75  59.75  50.75  57.75  54.75   1.25   2.25  -2.75  -0.75 
> postscript(file="/var/www/html/rcomp/tmp/60qtq1292338939.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 = 176 
Frequency = 1 
    lag(myerror, k = 1) myerror
  0              -56.25      NA
  1              -57.25  -56.25
  2              -56.25  -57.25
  3              -55.25  -56.25
  4              -55.25  -55.25
  5              -55.25  -55.25
  6              -54.25  -55.25
  7              -53.25  -54.25
  8              -54.25  -53.25
  9              -53.25  -54.25
 10              -54.25  -53.25
 11              -53.25  -54.25
 12              -53.25  -53.25
 13              -52.25  -53.25
 14              -52.25  -52.25
 15              -53.25  -52.25
 16              -52.25  -53.25
 17              -52.25  -52.25
 18              -51.25  -52.25
 19              -50.25  -51.25
 20              -49.25  -50.25
 21              -48.25  -49.25
 22              -48.25  -48.25
 23              -48.25  -48.25
 24              -47.25  -48.25
 25              -47.25  -47.25
 26              -46.25  -47.25
 27              -46.25  -46.25
 28              -45.25  -46.25
 29              -45.25  -45.25
 30              -44.25  -45.25
 31              -43.25  -44.25
 32              -42.25  -43.25
 33              -41.25  -42.25
 34              -39.25  -41.25
 35              -41.25  -39.25
 36              -39.25  -41.25
 37              -36.25  -39.25
 38              -37.25  -36.25
 39              -36.25  -37.25
 40              -33.25  -36.25
 41              -35.25  -33.25
 42              -34.25  -35.25
 43              -35.25  -34.25
 44              -36.25  -35.25
 45              -34.25  -36.25
 46              -33.25  -34.25
 47              -31.25  -33.25
 48              -30.25  -31.25
 49              -29.25  -30.25
 50              -27.25  -29.25
 51              -27.25  -27.25
 52              -28.25  -27.25
 53              -29.25  -28.25
 54              -27.25  -29.25
 55              -25.25  -27.25
 56              -24.25  -25.25
 57              -21.25  -24.25
 58              -23.25  -21.25
 59              -23.25  -23.25
 60              -25.25  -23.25
 61              -21.25  -25.25
 62              -21.25  -21.25
 63              -19.25  -21.25
 64              -17.25  -19.25
 65              -16.25  -17.25
 66              -14.25  -16.25
 67              -12.25  -14.25
 68              -14.25  -12.25
 69              -12.25  -14.25
 70               -9.25  -12.25
 71              -11.25   -9.25
 72              -11.25  -11.25
 73               -4.25  -11.25
 74               -3.25   -4.25
 75               -3.25   -3.25
 76               -3.25   -3.25
 77               -0.25   -3.25
 78               -0.25   -0.25
 79                2.75   -0.25
 80                6.75    2.75
 81              -21.25    6.75
 82              -27.25  -21.25
 83              -15.25  -27.25
 84              -25.25  -15.25
 85              -27.25  -25.25
 86              -16.25  -27.25
 87               -6.25  -16.25
 88              -11.25   -6.25
 89               -5.25  -11.25
 90               10.75   -5.25
 91               14.75   10.75
 92               16.75   14.75
 93               15.75   16.75
 94               28.75   15.75
 95               26.75   28.75
 96               35.75   26.75
 97               31.75   35.75
 98               22.75   31.75
 99                5.75   22.75
100               10.75    5.75
101               13.75   10.75
102                9.75   13.75
103               13.75    9.75
104               28.75   13.75
105               16.75   28.75
106               11.75   16.75
107                0.75   11.75
108                3.75    0.75
109               -0.25    3.75
110               -3.25   -0.25
111              -28.25   -3.25
112              -22.25  -28.25
113               -5.25  -22.25
114               17.75   -5.25
115               20.75   17.75
116               17.75   20.75
117               11.75   17.75
118               25.75   11.75
119               23.75   25.75
120               21.75   23.75
121               20.75   21.75
122               21.75   20.75
123               30.75   21.75
124               33.75   30.75
125               35.75   33.75
126               25.75   35.75
127               22.75   25.75
128               22.75   22.75
129               27.75   22.75
130               41.75   27.75
131               44.75   41.75
132               47.75   44.75
133               44.75   47.75
134               43.75   44.75
135               53.75   43.75
136               58.75   53.75
137               62.75   58.75
138               59.75   62.75
139               69.75   59.75
140               77.75   69.75
141               71.75   77.75
142               57.75   71.75
143               61.75   57.75
144               58.75   61.75
145               66.75   58.75
146               72.75   66.75
147               64.75   72.75
148               53.75   64.75
149               44.75   53.75
150               37.75   44.75
151               38.75   37.75
152               37.75   38.75
153               37.75   37.75
154               38.75   37.75
155               38.75   38.75
156               46.75   38.75
157               47.75   46.75
158               53.75   47.75
159               52.75   53.75
160               46.75   52.75
161               51.75   46.75
162               56.75   51.75
163               60.75   56.75
164               56.75   60.75
165               59.75   56.75
166               56.75   59.75
167               59.75   56.75
168               59.75   59.75
169               50.75   59.75
170               57.75   50.75
171               54.75   57.75
172                1.25   54.75
173                2.25    1.25
174               -2.75    2.25
175               -0.75   -2.75
176                  NA   -0.75
> dum1 <- dum[2:length(myerror),]
> dum1
       lag(myerror, k = 1) myerror
  [1,]              -57.25  -56.25
  [2,]              -56.25  -57.25
  [3,]              -55.25  -56.25
  [4,]              -55.25  -55.25
  [5,]              -55.25  -55.25
  [6,]              -54.25  -55.25
  [7,]              -53.25  -54.25
  [8,]              -54.25  -53.25
  [9,]              -53.25  -54.25
 [10,]              -54.25  -53.25
 [11,]              -53.25  -54.25
 [12,]              -53.25  -53.25
 [13,]              -52.25  -53.25
 [14,]              -52.25  -52.25
 [15,]              -53.25  -52.25
 [16,]              -52.25  -53.25
 [17,]              -52.25  -52.25
 [18,]              -51.25  -52.25
 [19,]              -50.25  -51.25
 [20,]              -49.25  -50.25
 [21,]              -48.25  -49.25
 [22,]              -48.25  -48.25
 [23,]              -48.25  -48.25
 [24,]              -47.25  -48.25
 [25,]              -47.25  -47.25
 [26,]              -46.25  -47.25
 [27,]              -46.25  -46.25
 [28,]              -45.25  -46.25
 [29,]              -45.25  -45.25
 [30,]              -44.25  -45.25
 [31,]              -43.25  -44.25
 [32,]              -42.25  -43.25
 [33,]              -41.25  -42.25
 [34,]              -39.25  -41.25
 [35,]              -41.25  -39.25
 [36,]              -39.25  -41.25
 [37,]              -36.25  -39.25
 [38,]              -37.25  -36.25
 [39,]              -36.25  -37.25
 [40,]              -33.25  -36.25
 [41,]              -35.25  -33.25
 [42,]              -34.25  -35.25
 [43,]              -35.25  -34.25
 [44,]              -36.25  -35.25
 [45,]              -34.25  -36.25
 [46,]              -33.25  -34.25
 [47,]              -31.25  -33.25
 [48,]              -30.25  -31.25
 [49,]              -29.25  -30.25
 [50,]              -27.25  -29.25
 [51,]              -27.25  -27.25
 [52,]              -28.25  -27.25
 [53,]              -29.25  -28.25
 [54,]              -27.25  -29.25
 [55,]              -25.25  -27.25
 [56,]              -24.25  -25.25
 [57,]              -21.25  -24.25
 [58,]              -23.25  -21.25
 [59,]              -23.25  -23.25
 [60,]              -25.25  -23.25
 [61,]              -21.25  -25.25
 [62,]              -21.25  -21.25
 [63,]              -19.25  -21.25
 [64,]              -17.25  -19.25
 [65,]              -16.25  -17.25
 [66,]              -14.25  -16.25
 [67,]              -12.25  -14.25
 [68,]              -14.25  -12.25
 [69,]              -12.25  -14.25
 [70,]               -9.25  -12.25
 [71,]              -11.25   -9.25
 [72,]              -11.25  -11.25
 [73,]               -4.25  -11.25
 [74,]               -3.25   -4.25
 [75,]               -3.25   -3.25
 [76,]               -3.25   -3.25
 [77,]               -0.25   -3.25
 [78,]               -0.25   -0.25
 [79,]                2.75   -0.25
 [80,]                6.75    2.75
 [81,]              -21.25    6.75
 [82,]              -27.25  -21.25
 [83,]              -15.25  -27.25
 [84,]              -25.25  -15.25
 [85,]              -27.25  -25.25
 [86,]              -16.25  -27.25
 [87,]               -6.25  -16.25
 [88,]              -11.25   -6.25
 [89,]               -5.25  -11.25
 [90,]               10.75   -5.25
 [91,]               14.75   10.75
 [92,]               16.75   14.75
 [93,]               15.75   16.75
 [94,]               28.75   15.75
 [95,]               26.75   28.75
 [96,]               35.75   26.75
 [97,]               31.75   35.75
 [98,]               22.75   31.75
 [99,]                5.75   22.75
[100,]               10.75    5.75
[101,]               13.75   10.75
[102,]                9.75   13.75
[103,]               13.75    9.75
[104,]               28.75   13.75
[105,]               16.75   28.75
[106,]               11.75   16.75
[107,]                0.75   11.75
[108,]                3.75    0.75
[109,]               -0.25    3.75
[110,]               -3.25   -0.25
[111,]              -28.25   -3.25
[112,]              -22.25  -28.25
[113,]               -5.25  -22.25
[114,]               17.75   -5.25
[115,]               20.75   17.75
[116,]               17.75   20.75
[117,]               11.75   17.75
[118,]               25.75   11.75
[119,]               23.75   25.75
[120,]               21.75   23.75
[121,]               20.75   21.75
[122,]               21.75   20.75
[123,]               30.75   21.75
[124,]               33.75   30.75
[125,]               35.75   33.75
[126,]               25.75   35.75
[127,]               22.75   25.75
[128,]               22.75   22.75
[129,]               27.75   22.75
[130,]               41.75   27.75
[131,]               44.75   41.75
[132,]               47.75   44.75
[133,]               44.75   47.75
[134,]               43.75   44.75
[135,]               53.75   43.75
[136,]               58.75   53.75
[137,]               62.75   58.75
[138,]               59.75   62.75
[139,]               69.75   59.75
[140,]               77.75   69.75
[141,]               71.75   77.75
[142,]               57.75   71.75
[143,]               61.75   57.75
[144,]               58.75   61.75
[145,]               66.75   58.75
[146,]               72.75   66.75
[147,]               64.75   72.75
[148,]               53.75   64.75
[149,]               44.75   53.75
[150,]               37.75   44.75
[151,]               38.75   37.75
[152,]               37.75   38.75
[153,]               37.75   37.75
[154,]               38.75   37.75
[155,]               38.75   38.75
[156,]               46.75   38.75
[157,]               47.75   46.75
[158,]               53.75   47.75
[159,]               52.75   53.75
[160,]               46.75   52.75
[161,]               51.75   46.75
[162,]               56.75   51.75
[163,]               60.75   56.75
[164,]               56.75   60.75
[165,]               59.75   56.75
[166,]               56.75   59.75
[167,]               59.75   56.75
[168,]               59.75   59.75
[169,]               50.75   59.75
[170,]               57.75   50.75
[171,]               54.75   57.75
[172,]                1.25   54.75
[173,]                2.25    1.25
[174,]               -2.75    2.25
[175,]               -0.75   -2.75
> z <- as.data.frame(dum1)
> z
    lag(myerror, k = 1) myerror
1                -57.25  -56.25
2                -56.25  -57.25
3                -55.25  -56.25
4                -55.25  -55.25
5                -55.25  -55.25
6                -54.25  -55.25
7                -53.25  -54.25
8                -54.25  -53.25
9                -53.25  -54.25
10               -54.25  -53.25
11               -53.25  -54.25
12               -53.25  -53.25
13               -52.25  -53.25
14               -52.25  -52.25
15               -53.25  -52.25
16               -52.25  -53.25
17               -52.25  -52.25
18               -51.25  -52.25
19               -50.25  -51.25
20               -49.25  -50.25
21               -48.25  -49.25
22               -48.25  -48.25
23               -48.25  -48.25
24               -47.25  -48.25
25               -47.25  -47.25
26               -46.25  -47.25
27               -46.25  -46.25
28               -45.25  -46.25
29               -45.25  -45.25
30               -44.25  -45.25
31               -43.25  -44.25
32               -42.25  -43.25
33               -41.25  -42.25
34               -39.25  -41.25
35               -41.25  -39.25
36               -39.25  -41.25
37               -36.25  -39.25
38               -37.25  -36.25
39               -36.25  -37.25
40               -33.25  -36.25
41               -35.25  -33.25
42               -34.25  -35.25
43               -35.25  -34.25
44               -36.25  -35.25
45               -34.25  -36.25
46               -33.25  -34.25
47               -31.25  -33.25
48               -30.25  -31.25
49               -29.25  -30.25
50               -27.25  -29.25
51               -27.25  -27.25
52               -28.25  -27.25
53               -29.25  -28.25
54               -27.25  -29.25
55               -25.25  -27.25
56               -24.25  -25.25
57               -21.25  -24.25
58               -23.25  -21.25
59               -23.25  -23.25
60               -25.25  -23.25
61               -21.25  -25.25
62               -21.25  -21.25
63               -19.25  -21.25
64               -17.25  -19.25
65               -16.25  -17.25
66               -14.25  -16.25
67               -12.25  -14.25
68               -14.25  -12.25
69               -12.25  -14.25
70                -9.25  -12.25
71               -11.25   -9.25
72               -11.25  -11.25
73                -4.25  -11.25
74                -3.25   -4.25
75                -3.25   -3.25
76                -3.25   -3.25
77                -0.25   -3.25
78                -0.25   -0.25
79                 2.75   -0.25
80                 6.75    2.75
81               -21.25    6.75
82               -27.25  -21.25
83               -15.25  -27.25
84               -25.25  -15.25
85               -27.25  -25.25
86               -16.25  -27.25
87                -6.25  -16.25
88               -11.25   -6.25
89                -5.25  -11.25
90                10.75   -5.25
91                14.75   10.75
92                16.75   14.75
93                15.75   16.75
94                28.75   15.75
95                26.75   28.75
96                35.75   26.75
97                31.75   35.75
98                22.75   31.75
99                 5.75   22.75
100               10.75    5.75
101               13.75   10.75
102                9.75   13.75
103               13.75    9.75
104               28.75   13.75
105               16.75   28.75
106               11.75   16.75
107                0.75   11.75
108                3.75    0.75
109               -0.25    3.75
110               -3.25   -0.25
111              -28.25   -3.25
112              -22.25  -28.25
113               -5.25  -22.25
114               17.75   -5.25
115               20.75   17.75
116               17.75   20.75
117               11.75   17.75
118               25.75   11.75
119               23.75   25.75
120               21.75   23.75
121               20.75   21.75
122               21.75   20.75
123               30.75   21.75
124               33.75   30.75
125               35.75   33.75
126               25.75   35.75
127               22.75   25.75
128               22.75   22.75
129               27.75   22.75
130               41.75   27.75
131               44.75   41.75
132               47.75   44.75
133               44.75   47.75
134               43.75   44.75
135               53.75   43.75
136               58.75   53.75
137               62.75   58.75
138               59.75   62.75
139               69.75   59.75
140               77.75   69.75
141               71.75   77.75
142               57.75   71.75
143               61.75   57.75
144               58.75   61.75
145               66.75   58.75
146               72.75   66.75
147               64.75   72.75
148               53.75   64.75
149               44.75   53.75
150               37.75   44.75
151               38.75   37.75
152               37.75   38.75
153               37.75   37.75
154               38.75   37.75
155               38.75   38.75
156               46.75   38.75
157               47.75   46.75
158               53.75   47.75
159               52.75   53.75
160               46.75   52.75
161               51.75   46.75
162               56.75   51.75
163               60.75   56.75
164               56.75   60.75
165               59.75   56.75
166               56.75   59.75
167               59.75   56.75
168               59.75   59.75
169               50.75   59.75
170               57.75   50.75
171               54.75   57.75
172                1.25   54.75
173                2.25    1.25
174               -2.75    2.25
175               -0.75   -2.75
> 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/70qtq1292338939.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/8bzbt1292338939.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/9bzbt1292338939.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/1038sw1292338939.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/117rq21292338939.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/12srp81292338939.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/136jny1292338939.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/14f5sb1292338939.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/15vkka1292338939.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/16hlig1292338939.tab") 
+ }
> 
> try(system("convert tmp/1f7d21292338939.ps tmp/1f7d21292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/2f7d21292338939.ps tmp/2f7d21292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/3f7d21292338939.ps tmp/3f7d21292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/47yu51292338939.ps tmp/47yu51292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/57yu51292338939.ps tmp/57yu51292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/60qtq1292338939.ps tmp/60qtq1292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/70qtq1292338939.ps tmp/70qtq1292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/8bzbt1292338939.ps tmp/8bzbt1292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/9bzbt1292338939.ps tmp/9bzbt1292338939.png",intern=TRUE))
character(0)
> try(system("convert tmp/1038sw1292338939.ps tmp/1038sw1292338939.png",intern=TRUE))
character(0)
> 
> 
> proc.time()
   user  system elapsed 
  4.042   1.876  13.138