R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
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(68
+ ,13
+ ,5
+ ,20
+ ,0
+ ,17
+ ,26
+ ,7
+ ,28
+ ,0
+ ,1
+ ,0
+ ,0
+ ,0
+ ,0
+ ,114
+ ,37
+ ,12
+ ,40
+ ,0
+ ,95
+ ,47
+ ,15
+ ,60
+ ,0
+ ,148
+ ,80
+ ,16
+ ,60
+ ,1
+ ,56
+ ,21
+ ,12
+ ,44
+ ,0
+ ,26
+ ,36
+ ,13
+ ,52
+ ,0
+ ,63
+ ,35
+ ,15
+ ,60
+ ,0
+ ,96
+ ,40
+ ,13
+ ,52
+ ,1
+ ,74
+ ,35
+ ,6
+ ,24
+ ,1
+ ,65
+ ,46
+ ,16
+ ,64
+ ,0
+ ,40
+ ,20
+ ,7
+ ,26
+ ,0
+ ,173
+ ,24
+ ,12
+ ,48
+ ,4
+ ,28
+ ,19
+ ,9
+ ,36
+ ,3
+ ,55
+ ,15
+ ,10
+ ,40
+ ,3
+ ,58
+ ,48
+ ,16
+ ,64
+ ,0
+ ,25
+ ,0
+ ,5
+ ,20
+ ,4
+ ,103
+ ,38
+ ,20
+ ,79
+ ,0
+ ,29
+ ,12
+ ,7
+ ,16
+ ,0
+ ,31
+ ,10
+ ,13
+ ,52
+ ,0
+ ,43
+ ,51
+ ,13
+ ,52
+ ,0
+ ,74
+ ,4
+ ,11
+ ,44
+ ,0
+ ,99
+ ,24
+ ,9
+ ,29
+ ,1
+ ,25
+ ,39
+ ,10
+ ,40
+ ,1
+ ,69
+ ,19
+ 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,0
+ ,55
+ ,26
+ ,14
+ ,56
+ ,0
+ ,22
+ ,1
+ ,2
+ ,8
+ ,0
+ ,7
+ ,0
+ ,0
+ ,0
+ ,0
+ ,21
+ ,12
+ ,9
+ ,25
+ ,0
+ ,5
+ ,0
+ ,1
+ ,4
+ ,0
+ ,21
+ ,17
+ ,3
+ ,12
+ ,0
+ ,1
+ ,5
+ ,0
+ ,0
+ ,0
+ ,22
+ ,4
+ ,2
+ ,6
+ ,1
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,31
+ ,6
+ ,12
+ ,48
+ ,0
+ ,25
+ ,0
+ ,14
+ ,52
+ ,0
+ ,0
+ ,0
+ ,0
+ ,0
+ ,1
+ ,4
+ ,0
+ ,0
+ ,0
+ ,0
+ ,20
+ ,15
+ ,4
+ ,12
+ ,1
+ ,29
+ ,0
+ ,7
+ ,28
+ ,0
+ ,33
+ ,12
+ ,10
+ ,40
+ ,0)
+ ,dim=c(5
+ ,144)
+ ,dimnames=list(c('CompendiumViews'
+ ,'BloggedComputations'
+ ,'ReviewedCompendiums'
+ ,'submittedfeedback'
+ ,'Sharedcompendiums')
+ ,1:144))
>  y <- array(NA,dim=c(5,144),dimnames=list(c('CompendiumViews','BloggedComputations','ReviewedCompendiums','submittedfeedback','Sharedcompendiums'),1:144))
>  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
> 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
    CompendiumViews BloggedComputations ReviewedCompendiums submittedfeedback
1                68                  13                   5                20
2                17                  26                   7                28
3                 1                   0                   0                 0
4               114                  37                  12                40
5                95                  47                  15                60
6               148                  80                  16                60
7                56                  21                  12                44
8                26                  36                  13                52
9                63                  35                  15                60
10               96                  40                  13                52
11               74                  35                   6                24
12               65                  46                  16                64
13               40                  20                   7                26
14              173                  24                  12                48
15               28                  19                   9                36
16               55                  15                  10                40
17               58                  48                  16                64
18               25                   0                   5                20
19              103                  38                  20                79
20               29                  12                   7                16
21               31                  10                  13                52
22               43                  51                  13                52
23               74                   4                  11                44
24               99                  24                   9                29
25               25                  39                  10                40
26               69                  19                   7                28
27               62                  23                  13                49
28               25                  39                  15                60
29               38                  37                  13                52
30               57                  20                   7                28
31               52                  20                  14                56
32               91                  41                  11                35
33               48                  26                   3                12
34               52                   0                   8                32
35               35                  31                  12                48
36                0                   0                   0                 0
37               31                   8                  12                48
38              107                  35                   8                31
39              242                   3                  20                64
40               41                  47                  18                72
41               57                  42                   9                36
42               32                  11                  14                56
43               17                  10                   7                28
44               36                  26                  13                52
45               29                  27                  11                44
46               22                   0                  11                44
47               21                  15                  14                55
48               41                  32                   9                36
49               64                  13                  12                48
50               71                  24                  11                44
51               28                  10                  17                66
52               36                  14                  10                40
53               45                  24                  11                44
54               22                  29                  12                48
55               27                  40                  17                68
56               38                  22                   6                24
57               26                  27                   8                32
58               41                   8                  12                44
59               21                  27                  13                52
60               28                   0                  14                56
61               36                   0                  17                68
62               58                  17                   8                32
63               65                   7                   9                34
64               29                  18                   9                36
65               21                   7                   9                34
66               19                  24                  15                56
67               55                  18                  16                64
68              119                  39                  13                52
69               34                  17                  12                48
70               25                   0                  10                40
71              113                  39                   9                36
72               46                  20                   3                10
73               28                  29                  12                48
74               63                  27                   8                25
75               52                  23                  17                68
76               35                   0                   9                36
77               32                  31                   8                32
78               45                  19                   9                36
79               42                  12                  12                43
80               28                  23                   5                17
81               32                  33                  14                52
82               32                  21                  14                56
83               27                  17                  10                40
84               69                  27                  12                48
85               30                  14                  10                40
86               48                  12                  12                48
87               57                  21                  17                68
88               36                  14                  11                44
89               20                  14                  10                40
90               54                  22                  11                40
91               26                  25                   7                28
92               58                  36                  10                40
93               35                  10                  11                44
94               28                  16                   5                20
95                8                  12                   6                22
96               96                  20                  14                56
97               50                  38                  13                52
98               15                  13                   1                 2
99               65                  12                  13                52
100              33                  11                   9                30
101               7                   8                   1                 3
102              17                  22                   6                20
103              55                  14                  12                48
104              32                   7                   9                32
105              22                  14                   9                36
106              41                   2                  12                45
107              50                  35                  10                40
108               7                   5                   2                 8
109               0                   0                   0                 0
110              26                  34                   8                32
111              22                  12                   7                28
112              26                  34                  11                44
113              37                  30                  14                56
114              29                  21                   4                13
115               0                   0                   0                 0
116               0                   0                   0                 0
117              42                  28                  13                52
118              51                  16                  17                51
119              77                  12                  13                52
120              32                  14                  12                48
121              63                   7                   1                 3
122              50                  41                  12                48
123              18                  21                   6                24
124              37                  28                  11                37
125              23                   1                   8                32
126              19                  10                   2                 8
127              39                  31                  12                44
128              38                   7                  12                48
129              55                  26                  14                56
130              22                   1                   2                 8
131               7                   0                   0                 0
132              21                  12                   9                25
133               5                   0                   1                 4
134              21                  17                   3                12
135               1                   5                   0                 0
136              22                   4                   2                 6
137               0                   0                   0                 0
138              31                   6                  12                48
139              25                   0                  14                52
140               0                   0                   0                 0
141               4                   0                   0                 0
142              20                  15                   4                12
143              29                   0                   7                28
144              33                  12                  10                40
    Sharedcompendiums
1                   0
2                   0
3                   0
4                   0
5                   0
6                   1
7                   0
8                   0
9                   0
10                  1
11                  1
12                  0
13                  0
14                  4
15                  3
16                  3
17                  0
18                  4
19                  0
20                  0
21                  0
22                  0
23                  0
24                  1
25                  1
26                  0
27                  0
28                  0
29                  0
30                  0
31                  0
32                  2
33                  4
34                  0
35                  1
36                  0
37                  0
38                  3
39                  4
40                  0
41                  1
42                  0
43                  2
44                  1
45                  1
46                  2
47                  1
48                  0
49                  1
50                  0
51                  0
52                  0
53                  0
54                  0
55                  1
56                  3
57                  0
58                  0
59                  0
60                  4
61                  0
62                  0
63                  4
64                  3
65                  0
66                  0
67                  4
68                  2
69                  0
70                  0
71                  2
72                  0
73                  1
74                  0
75                  0
76                  1
77                  0
78                  0
79                  0
80                  0
81                  0
82                  0
83                  0
84                  0
85                  0
86                  0
87                  0
88                  0
89                  2
90                  0
91                  0
92                  1
93                  0
94                  0
95                  0
96                  0
97                  0
98                  0
99                  0
100                 0
101                 0
102                 0
103                 0
104                 1
105                 0
106                 0
107                 0
108                 0
109                 0
110                 0
111                 0
112                 0
113                 0
114                 0
115                 0
116                 0
117                 0
118                 0
119                 1
120                 0
121                 0
122                 1
123                 0
124                 0
125                 3
126                 1
127                 2
128                 0
129                 0
130                 0
131                 0
132                 0
133                 0
134                 0
135                 0
136                 1
137                 0
138                 0
139                 0
140                 1
141                 0
142                 1
143                 0
144                 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
        (Intercept)  BloggedComputations  ReviewedCompendiums  
             1.1404               0.6575              13.7596  
  submittedfeedback    Sharedcompendiums  
            -2.9244               9.7061  
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
    Min      1Q  Median      3Q     Max 
-45.428 -15.928  -1.508   7.235 112.033 
Coefficients:
                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)           1.1404     4.9526   0.230 0.818218    
BloggedComputations   0.6575     0.1680   3.914 0.000142 ***
ReviewedCompendiums  13.7596     2.9358   4.687 6.54e-06 ***
submittedfeedback    -2.9244     0.7450  -3.925 0.000136 ***
Sharedcompendiums     9.7061     1.9425   4.997 1.72e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
Residual standard error: 25.21 on 139 degrees of freedom
Multiple R-squared: 0.4429,	Adjusted R-squared: 0.4268 
F-statistic: 27.62 on 4 and 139 DF,  p-value: < 2.2e-16 
> 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.9106352 1.787296e-01 8.936479e-02
  [2,] 0.8409102 3.181795e-01 1.590898e-01
  [3,] 0.7650387 4.699225e-01 2.349613e-01
  [4,] 0.6691248 6.617504e-01 3.308752e-01
  [5,] 0.5606150 8.787699e-01 4.393850e-01
  [6,] 0.4600757 9.201514e-01 5.399243e-01
  [7,] 0.4563327 9.126655e-01 5.436673e-01
  [8,] 0.9716409 5.671814e-02 2.835907e-02
  [9,] 0.9729443 5.411144e-02 2.705572e-02
 [10,] 0.9618801 7.623988e-02 3.811994e-02
 [11,] 0.9764849 4.703014e-02 2.351507e-02
 [12,] 0.9765459 4.690816e-02 2.345408e-02
 [13,] 0.9827950 3.441003e-02 1.720502e-02
 [14,] 0.9736937 5.261255e-02 2.630627e-02
 [15,] 0.9785363 4.292740e-02 2.146370e-02
 [16,] 0.9906605 1.867902e-02 9.339508e-03
 [17,] 0.9908358 1.832843e-02 9.164215e-03
 [18,] 0.9940181 1.196382e-02 5.981910e-03
 [19,] 0.9963016 7.396713e-03 3.698356e-03
 [20,] 0.9943988 1.120245e-02 5.601225e-03
 [21,] 0.9966316 6.736823e-03 3.368412e-03
 [22,] 0.9957535 8.492913e-03 4.246456e-03
 [23,] 0.9956648 8.670468e-03 4.335234e-03
 [24,] 0.9935601 1.287981e-02 6.439906e-03
 [25,] 0.9915823 1.683542e-02 8.417709e-03
 [26,] 0.9895435 2.091291e-02 1.045645e-02
 [27,] 0.9899057 2.018851e-02 1.009426e-02
 [28,] 0.9896669 2.066616e-02 1.033308e-02
 [29,] 0.9852262 2.954763e-02 1.477382e-02
 [30,] 0.9800923 3.981548e-02 1.990774e-02
 [31,] 0.9840033 3.199340e-02 1.599670e-02
 [32,] 0.9999954 9.271641e-06 4.635820e-06
 [33,] 0.9999973 5.343558e-06 2.671779e-06
 [34,] 0.9999952 9.668664e-06 4.834332e-06
 [35,] 0.9999930 1.398752e-05 6.993762e-06
 [36,] 0.9999940 1.207771e-05 6.038856e-06
 [37,] 0.9999933 1.335409e-05 6.677045e-06
 [38,] 0.9999931 1.387126e-05 6.935629e-06
 [39,] 0.9999937 1.264776e-05 6.323879e-06
 [40,] 0.9999966 6.772305e-06 3.386153e-06
 [41,] 0.9999940 1.208712e-05 6.043559e-06
 [42,] 0.9999931 1.385853e-05 6.929263e-06
 [43,] 0.9999955 9.009419e-06 4.504709e-06
 [44,] 0.9999958 8.315497e-06 4.157749e-06
 [45,] 0.9999927 1.459112e-05 7.295558e-06
 [46,] 0.9999875 2.500769e-05 1.250385e-05
 [47,] 0.9999881 2.384938e-05 1.192469e-05
 [48,] 0.9999975 5.019577e-06 2.509789e-06
 [49,] 0.9999964 7.153136e-06 3.576568e-06
 [50,] 0.9999945 1.099279e-05 5.496397e-06
 [51,] 0.9999915 1.698163e-05 8.490814e-06
 [52,] 0.9999934 1.329354e-05 6.646771e-06
 [53,] 0.9999965 6.915366e-06 3.457683e-06
 [54,] 0.9999940 1.209575e-05 6.047873e-06
 [55,] 0.9999954 9.196001e-06 4.598000e-06
 [56,] 0.9999940 1.193260e-05 5.966302e-06
 [57,] 0.9999945 1.107867e-05 5.539337e-06
 [58,] 0.9999913 1.749351e-05 8.746754e-06
 [59,] 0.9999973 5.383564e-06 2.691782e-06
 [60,] 0.9999971 5.726324e-06 2.863162e-06
 [61,] 0.9999998 3.408313e-07 1.704157e-07
 [62,] 0.9999997 6.157161e-07 3.078581e-07
 [63,] 0.9999994 1.136436e-06 5.682181e-07
 [64,] 1.0000000 3.621266e-09 1.810633e-09
 [65,] 1.0000000 2.503432e-09 1.251716e-09
 [66,] 1.0000000 2.544876e-09 1.272438e-09
 [67,] 1.0000000 9.044829e-10 4.522414e-10
 [68,] 1.0000000 1.855946e-09 9.279729e-10
 [69,] 1.0000000 3.909139e-09 1.954569e-09
 [70,] 1.0000000 8.222106e-09 4.111053e-09
 [71,] 1.0000000 1.425234e-08 7.126170e-09
 [72,] 1.0000000 2.703713e-08 1.351857e-08
 [73,] 1.0000000 5.046432e-08 2.523216e-08
 [74,] 1.0000000 3.622697e-08 1.811348e-08
 [75,] 1.0000000 4.092322e-08 2.046161e-08
 [76,] 1.0000000 6.749504e-08 3.374752e-08
 [77,] 1.0000000 4.759758e-08 2.379879e-08
 [78,] 1.0000000 9.067553e-08 4.533776e-08
 [79,] 0.9999999 1.675896e-07 8.379479e-08
 [80,] 0.9999998 3.334603e-07 1.667302e-07
 [81,] 0.9999997 6.518631e-07 3.259315e-07
 [82,] 0.9999997 5.798399e-07 2.899200e-07
 [83,] 0.9999996 8.263401e-07 4.131700e-07
 [84,] 0.9999992 1.582188e-06 7.910940e-07
 [85,] 0.9999989 2.182216e-06 1.091108e-06
 [86,] 0.9999980 4.083548e-06 2.041774e-06
 [87,] 0.9999962 7.682807e-06 3.841404e-06
 [88,] 0.9999957 8.627954e-06 4.313977e-06
 [89,] 0.9999999 1.326390e-07 6.631951e-08
 [90,] 0.9999999 2.920002e-07 1.460001e-07
 [91,] 0.9999997 6.099683e-07 3.049841e-07
 [92,] 0.9999998 3.462657e-07 1.731329e-07
 [93,] 0.9999997 6.655881e-07 3.327940e-07
 [94,] 0.9999993 1.416028e-06 7.080138e-07
 [95,] 0.9999989 2.244929e-06 1.122465e-06
 [96,] 0.9999988 2.456329e-06 1.228164e-06
 [97,] 0.9999975 4.935682e-06 2.467841e-06
 [98,] 0.9999956 8.729842e-06 4.364921e-06
 [99,] 0.9999916 1.679952e-05 8.399758e-06
[100,] 0.9999868 2.630861e-05 1.315430e-05
[101,] 0.9999748 5.038966e-05 2.519483e-05
[102,] 0.9999548 9.034942e-05 4.517471e-05
[103,] 0.9999208 1.583179e-04 7.915893e-05
[104,] 0.9998499 3.001152e-04 1.500576e-04
[105,] 0.9998271 3.457131e-04 1.728565e-04
[106,] 0.9997550 4.899694e-04 2.449847e-04
[107,] 0.9995521 8.957018e-04 4.478509e-04
[108,] 0.9992428 1.514456e-03 7.572278e-04
[109,] 0.9987638 2.472416e-03 1.236208e-03
[110,] 0.9978605 4.279089e-03 2.139544e-03
[111,] 0.9979262 4.147524e-03 2.073762e-03
[112,] 0.9997170 5.660818e-04 2.830409e-04
[113,] 0.9994416 1.116824e-03 5.584118e-04
[114,] 1.0000000 1.722364e-08 8.611820e-09
[115,] 1.0000000 7.139544e-08 3.569772e-08
[116,] 1.0000000 6.535110e-08 3.267555e-08
[117,] 0.9999999 2.643546e-07 1.321773e-07
[118,] 0.9999995 1.066473e-06 5.332363e-07
[119,] 0.9999980 3.911128e-06 1.955564e-06
[120,] 0.9999962 7.564138e-06 3.782069e-06
[121,] 0.9999854 2.919801e-05 1.459900e-05
[122,] 0.9999509 9.819867e-05 4.909933e-05
[123,] 0.9999644 7.115451e-05 3.557725e-05
[124,] 0.9998707 2.586575e-04 1.293287e-04
[125,] 0.9995253 9.494642e-04 4.747321e-04
[126,] 0.9980860 3.827950e-03 1.913975e-03
[127,] 0.9929560 1.408792e-02 7.043958e-03
[128,] 0.9786775 4.264500e-02 2.132250e-02
[129,] 0.9721315 5.573705e-02 2.786853e-02
> postscript(file="/var/wessaorg/rcomp/tmp/1mnvb1322146673.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/wessaorg/rcomp/tmp/2crhy1322146673.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/wessaorg/rcomp/tmp/3gxyz1322146673.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/wessaorg/rcomp/tmp/4xq841322146673.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/wessaorg/rcomp/tmp/5jda31322146673.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 = 144 
Frequency = 1 
          1           2           3           4           5           6 
 48.0026941 -15.6683131  -0.1404419  40.3944757  32.0292105  39.8669929 
          7           8           9          10          11          12 
  4.6116297 -25.6147211   7.9188438  32.0492702  27.7702833   0.6247277 
         13          14          15          16          17          18 
  5.4276820  92.5123408 -33.3083243  -5.7403988  -7.6902112 -25.2747268 
         19          20          21          22          23          24 
 32.7122634 -29.5566700  -3.5205157 -18.4767627  47.5482055  33.3457151 
         25          26          27          28          29          30 
-32.1074035  40.9339729  10.1591493 -32.7110340 -14.2721906  28.2765035 
         31          32          33          34          35          36 
  8.8428376  -5.5101223 -15.2450277  34.3639400 -20.9715526  -1.1404419 
         37          38          39          40          41          42 
 -0.1436246  34.3097062 112.0330089 -28.1566463  -0.0178596  -5.2399374 
         43          44          45          46          47          48 
-24.5610639 -18.7461576 -22.2797225 -21.2341786 -31.5003568   0.2629657 
         49          50          51          52          53          54 
 19.8628973  31.3988167 -20.6171463   5.0354633   5.3988167 -22.9504828 
         55          56          57          58          59          60 
-45.1985388 -19.0948758  -9.3877349  -1.8412676 -24.6974962 -40.8322972 
         61          62          63          64          65          66 
 -0.1936304  29.1869595  -3.9736434 -31.6508549  -9.1491198 -40.5466354 
         67          68          69          70          71          72 
-29.7906516  46.0006088  -3.0608495   3.2400355  48.2484178  19.6754910 
         73          74          75          76          77          78 
-26.6566137   7.1413899   0.6845725   5.5958568  -6.0176126  12.8100684 
         79          80          81          82          83          84 
 -6.3955561  -7.3452326 -31.4019081 -11.8146318  -5.9369450  25.3644561 
         85          86          87          88          89          90 
 -0.9645367  14.2264977   6.9995114   2.9735111 -30.3767985   4.0161125 
         91          92          93          94          95          96 
 -6.0108437   2.8650048   4.6033888   6.0302858 -19.2506102  52.8428376 
         97          98          99         100         101         102 
 -2.9296600  -2.5983184  29.1645454 -11.4766406  -4.3865604 -22.6741261 
        103         104         105         106         107         108 
 19.9115588 -13.7040722  -6.9025844   5.0279598   5.2286051  -1.5516936 
        109         110         111         112         113         114 
 -1.1404419 -13.9900209  -1.4637410 -20.1758777 -12.7318568  -2.9683414 
        115         116         117         118         119         120 
 -1.1404419  -1.1404419  -4.3549656 -45.4281242  31.4584145  -3.0884412 
        121         122         123         124         125         126 
 52.2709090 -12.5462470  -9.3190137 -25.7019363 -24.4119221  -2.5451717 
        127         128         129         130         131         132 
-38.3753265   7.5138449   7.8980210  16.0781842   5.8595581 -38.7561638 
        133         134         135         136         137         138 
  1.7976059   2.4967209  -3.4277891  -1.4491766  -1.1404419   1.1713143 
        139         140         141         142         143         144 
-16.7054166 -10.8465728   2.8595581 -20.6540664  13.4258923   3.3504022 
> postscript(file="/var/wessaorg/rcomp/tmp/6wxwe1322146673.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 = 144 
Frequency = 1 
    lag(myerror, k = 1)     myerror
  0          48.0026941          NA
  1         -15.6683131  48.0026941
  2          -0.1404419 -15.6683131
  3          40.3944757  -0.1404419
  4          32.0292105  40.3944757
  5          39.8669929  32.0292105
  6           4.6116297  39.8669929
  7         -25.6147211   4.6116297
  8           7.9188438 -25.6147211
  9          32.0492702   7.9188438
 10          27.7702833  32.0492702
 11           0.6247277  27.7702833
 12           5.4276820   0.6247277
 13          92.5123408   5.4276820
 14         -33.3083243  92.5123408
 15          -5.7403988 -33.3083243
 16          -7.6902112  -5.7403988
 17         -25.2747268  -7.6902112
 18          32.7122634 -25.2747268
 19         -29.5566700  32.7122634
 20          -3.5205157 -29.5566700
 21         -18.4767627  -3.5205157
 22          47.5482055 -18.4767627
 23          33.3457151  47.5482055
 24         -32.1074035  33.3457151
 25          40.9339729 -32.1074035
 26          10.1591493  40.9339729
 27         -32.7110340  10.1591493
 28         -14.2721906 -32.7110340
 29          28.2765035 -14.2721906
 30           8.8428376  28.2765035
 31          -5.5101223   8.8428376
 32         -15.2450277  -5.5101223
 33          34.3639400 -15.2450277
 34         -20.9715526  34.3639400
 35          -1.1404419 -20.9715526
 36          -0.1436246  -1.1404419
 37          34.3097062  -0.1436246
 38         112.0330089  34.3097062
 39         -28.1566463 112.0330089
 40          -0.0178596 -28.1566463
 41          -5.2399374  -0.0178596
 42         -24.5610639  -5.2399374
 43         -18.7461576 -24.5610639
 44         -22.2797225 -18.7461576
 45         -21.2341786 -22.2797225
 46         -31.5003568 -21.2341786
 47           0.2629657 -31.5003568
 48          19.8628973   0.2629657
 49          31.3988167  19.8628973
 50         -20.6171463  31.3988167
 51           5.0354633 -20.6171463
 52           5.3988167   5.0354633
 53         -22.9504828   5.3988167
 54         -45.1985388 -22.9504828
 55         -19.0948758 -45.1985388
 56          -9.3877349 -19.0948758
 57          -1.8412676  -9.3877349
 58         -24.6974962  -1.8412676
 59         -40.8322972 -24.6974962
 60          -0.1936304 -40.8322972
 61          29.1869595  -0.1936304
 62          -3.9736434  29.1869595
 63         -31.6508549  -3.9736434
 64          -9.1491198 -31.6508549
 65         -40.5466354  -9.1491198
 66         -29.7906516 -40.5466354
 67          46.0006088 -29.7906516
 68          -3.0608495  46.0006088
 69           3.2400355  -3.0608495
 70          48.2484178   3.2400355
 71          19.6754910  48.2484178
 72         -26.6566137  19.6754910
 73           7.1413899 -26.6566137
 74           0.6845725   7.1413899
 75           5.5958568   0.6845725
 76          -6.0176126   5.5958568
 77          12.8100684  -6.0176126
 78          -6.3955561  12.8100684
 79          -7.3452326  -6.3955561
 80         -31.4019081  -7.3452326
 81         -11.8146318 -31.4019081
 82          -5.9369450 -11.8146318
 83          25.3644561  -5.9369450
 84          -0.9645367  25.3644561
 85          14.2264977  -0.9645367
 86           6.9995114  14.2264977
 87           2.9735111   6.9995114
 88         -30.3767985   2.9735111
 89           4.0161125 -30.3767985
 90          -6.0108437   4.0161125
 91           2.8650048  -6.0108437
 92           4.6033888   2.8650048
 93           6.0302858   4.6033888
 94         -19.2506102   6.0302858
 95          52.8428376 -19.2506102
 96          -2.9296600  52.8428376
 97          -2.5983184  -2.9296600
 98          29.1645454  -2.5983184
 99         -11.4766406  29.1645454
100          -4.3865604 -11.4766406
101         -22.6741261  -4.3865604
102          19.9115588 -22.6741261
103         -13.7040722  19.9115588
104          -6.9025844 -13.7040722
105           5.0279598  -6.9025844
106           5.2286051   5.0279598
107          -1.5516936   5.2286051
108          -1.1404419  -1.5516936
109         -13.9900209  -1.1404419
110          -1.4637410 -13.9900209
111         -20.1758777  -1.4637410
112         -12.7318568 -20.1758777
113          -2.9683414 -12.7318568
114          -1.1404419  -2.9683414
115          -1.1404419  -1.1404419
116          -4.3549656  -1.1404419
117         -45.4281242  -4.3549656
118          31.4584145 -45.4281242
119          -3.0884412  31.4584145
120          52.2709090  -3.0884412
121         -12.5462470  52.2709090
122          -9.3190137 -12.5462470
123         -25.7019363  -9.3190137
124         -24.4119221 -25.7019363
125          -2.5451717 -24.4119221
126         -38.3753265  -2.5451717
127           7.5138449 -38.3753265
128           7.8980210   7.5138449
129          16.0781842   7.8980210
130           5.8595581  16.0781842
131         -38.7561638   5.8595581
132           1.7976059 -38.7561638
133           2.4967209   1.7976059
134          -3.4277891   2.4967209
135          -1.4491766  -3.4277891
136          -1.1404419  -1.4491766
137           1.1713143  -1.1404419
138         -16.7054166   1.1713143
139         -10.8465728 -16.7054166
140           2.8595581 -10.8465728
141         -20.6540664   2.8595581
142          13.4258923 -20.6540664
143           3.3504022  13.4258923
144                  NA   3.3504022
> dum1 <- dum[2:length(myerror),]
> dum1
       lag(myerror, k = 1)     myerror
  [1,]         -15.6683131  48.0026941
  [2,]          -0.1404419 -15.6683131
  [3,]          40.3944757  -0.1404419
  [4,]          32.0292105  40.3944757
  [5,]          39.8669929  32.0292105
  [6,]           4.6116297  39.8669929
  [7,]         -25.6147211   4.6116297
  [8,]           7.9188438 -25.6147211
  [9,]          32.0492702   7.9188438
 [10,]          27.7702833  32.0492702
 [11,]           0.6247277  27.7702833
 [12,]           5.4276820   0.6247277
 [13,]          92.5123408   5.4276820
 [14,]         -33.3083243  92.5123408
 [15,]          -5.7403988 -33.3083243
 [16,]          -7.6902112  -5.7403988
 [17,]         -25.2747268  -7.6902112
 [18,]          32.7122634 -25.2747268
 [19,]         -29.5566700  32.7122634
 [20,]          -3.5205157 -29.5566700
 [21,]         -18.4767627  -3.5205157
 [22,]          47.5482055 -18.4767627
 [23,]          33.3457151  47.5482055
 [24,]         -32.1074035  33.3457151
 [25,]          40.9339729 -32.1074035
 [26,]          10.1591493  40.9339729
 [27,]         -32.7110340  10.1591493
 [28,]         -14.2721906 -32.7110340
 [29,]          28.2765035 -14.2721906
 [30,]           8.8428376  28.2765035
 [31,]          -5.5101223   8.8428376
 [32,]         -15.2450277  -5.5101223
 [33,]          34.3639400 -15.2450277
 [34,]         -20.9715526  34.3639400
 [35,]          -1.1404419 -20.9715526
 [36,]          -0.1436246  -1.1404419
 [37,]          34.3097062  -0.1436246
 [38,]         112.0330089  34.3097062
 [39,]         -28.1566463 112.0330089
 [40,]          -0.0178596 -28.1566463
 [41,]          -5.2399374  -0.0178596
 [42,]         -24.5610639  -5.2399374
 [43,]         -18.7461576 -24.5610639
 [44,]         -22.2797225 -18.7461576
 [45,]         -21.2341786 -22.2797225
 [46,]         -31.5003568 -21.2341786
 [47,]           0.2629657 -31.5003568
 [48,]          19.8628973   0.2629657
 [49,]          31.3988167  19.8628973
 [50,]         -20.6171463  31.3988167
 [51,]           5.0354633 -20.6171463
 [52,]           5.3988167   5.0354633
 [53,]         -22.9504828   5.3988167
 [54,]         -45.1985388 -22.9504828
 [55,]         -19.0948758 -45.1985388
 [56,]          -9.3877349 -19.0948758
 [57,]          -1.8412676  -9.3877349
 [58,]         -24.6974962  -1.8412676
 [59,]         -40.8322972 -24.6974962
 [60,]          -0.1936304 -40.8322972
 [61,]          29.1869595  -0.1936304
 [62,]          -3.9736434  29.1869595
 [63,]         -31.6508549  -3.9736434
 [64,]          -9.1491198 -31.6508549
 [65,]         -40.5466354  -9.1491198
 [66,]         -29.7906516 -40.5466354
 [67,]          46.0006088 -29.7906516
 [68,]          -3.0608495  46.0006088
 [69,]           3.2400355  -3.0608495
 [70,]          48.2484178   3.2400355
 [71,]          19.6754910  48.2484178
 [72,]         -26.6566137  19.6754910
 [73,]           7.1413899 -26.6566137
 [74,]           0.6845725   7.1413899
 [75,]           5.5958568   0.6845725
 [76,]          -6.0176126   5.5958568
 [77,]          12.8100684  -6.0176126
 [78,]          -6.3955561  12.8100684
 [79,]          -7.3452326  -6.3955561
 [80,]         -31.4019081  -7.3452326
 [81,]         -11.8146318 -31.4019081
 [82,]          -5.9369450 -11.8146318
 [83,]          25.3644561  -5.9369450
 [84,]          -0.9645367  25.3644561
 [85,]          14.2264977  -0.9645367
 [86,]           6.9995114  14.2264977
 [87,]           2.9735111   6.9995114
 [88,]         -30.3767985   2.9735111
 [89,]           4.0161125 -30.3767985
 [90,]          -6.0108437   4.0161125
 [91,]           2.8650048  -6.0108437
 [92,]           4.6033888   2.8650048
 [93,]           6.0302858   4.6033888
 [94,]         -19.2506102   6.0302858
 [95,]          52.8428376 -19.2506102
 [96,]          -2.9296600  52.8428376
 [97,]          -2.5983184  -2.9296600
 [98,]          29.1645454  -2.5983184
 [99,]         -11.4766406  29.1645454
[100,]          -4.3865604 -11.4766406
[101,]         -22.6741261  -4.3865604
[102,]          19.9115588 -22.6741261
[103,]         -13.7040722  19.9115588
[104,]          -6.9025844 -13.7040722
[105,]           5.0279598  -6.9025844
[106,]           5.2286051   5.0279598
[107,]          -1.5516936   5.2286051
[108,]          -1.1404419  -1.5516936
[109,]         -13.9900209  -1.1404419
[110,]          -1.4637410 -13.9900209
[111,]         -20.1758777  -1.4637410
[112,]         -12.7318568 -20.1758777
[113,]          -2.9683414 -12.7318568
[114,]          -1.1404419  -2.9683414
[115,]          -1.1404419  -1.1404419
[116,]          -4.3549656  -1.1404419
[117,]         -45.4281242  -4.3549656
[118,]          31.4584145 -45.4281242
[119,]          -3.0884412  31.4584145
[120,]          52.2709090  -3.0884412
[121,]         -12.5462470  52.2709090
[122,]          -9.3190137 -12.5462470
[123,]         -25.7019363  -9.3190137
[124,]         -24.4119221 -25.7019363
[125,]          -2.5451717 -24.4119221
[126,]         -38.3753265  -2.5451717
[127,]           7.5138449 -38.3753265
[128,]           7.8980210   7.5138449
[129,]          16.0781842   7.8980210
[130,]           5.8595581  16.0781842
[131,]         -38.7561638   5.8595581
[132,]           1.7976059 -38.7561638
[133,]           2.4967209   1.7976059
[134,]          -3.4277891   2.4967209
[135,]          -1.4491766  -3.4277891
[136,]          -1.1404419  -1.4491766
[137,]           1.1713143  -1.1404419
[138,]         -16.7054166   1.1713143
[139,]         -10.8465728 -16.7054166
[140,]           2.8595581 -10.8465728
[141,]         -20.6540664   2.8595581
[142,]          13.4258923 -20.6540664
[143,]           3.3504022  13.4258923
> z <- as.data.frame(dum1)
> z
    lag(myerror, k = 1)     myerror
1           -15.6683131  48.0026941
2            -0.1404419 -15.6683131
3            40.3944757  -0.1404419
4            32.0292105  40.3944757
5            39.8669929  32.0292105
6             4.6116297  39.8669929
7           -25.6147211   4.6116297
8             7.9188438 -25.6147211
9            32.0492702   7.9188438
10           27.7702833  32.0492702
11            0.6247277  27.7702833
12            5.4276820   0.6247277
13           92.5123408   5.4276820
14          -33.3083243  92.5123408
15           -5.7403988 -33.3083243
16           -7.6902112  -5.7403988
17          -25.2747268  -7.6902112
18           32.7122634 -25.2747268
19          -29.5566700  32.7122634
20           -3.5205157 -29.5566700
21          -18.4767627  -3.5205157
22           47.5482055 -18.4767627
23           33.3457151  47.5482055
24          -32.1074035  33.3457151
25           40.9339729 -32.1074035
26           10.1591493  40.9339729
27          -32.7110340  10.1591493
28          -14.2721906 -32.7110340
29           28.2765035 -14.2721906
30            8.8428376  28.2765035
31           -5.5101223   8.8428376
32          -15.2450277  -5.5101223
33           34.3639400 -15.2450277
34          -20.9715526  34.3639400
35           -1.1404419 -20.9715526
36           -0.1436246  -1.1404419
37           34.3097062  -0.1436246
38          112.0330089  34.3097062
39          -28.1566463 112.0330089
40           -0.0178596 -28.1566463
41           -5.2399374  -0.0178596
42          -24.5610639  -5.2399374
43          -18.7461576 -24.5610639
44          -22.2797225 -18.7461576
45          -21.2341786 -22.2797225
46          -31.5003568 -21.2341786
47            0.2629657 -31.5003568
48           19.8628973   0.2629657
49           31.3988167  19.8628973
50          -20.6171463  31.3988167
51            5.0354633 -20.6171463
52            5.3988167   5.0354633
53          -22.9504828   5.3988167
54          -45.1985388 -22.9504828
55          -19.0948758 -45.1985388
56           -9.3877349 -19.0948758
57           -1.8412676  -9.3877349
58          -24.6974962  -1.8412676
59          -40.8322972 -24.6974962
60           -0.1936304 -40.8322972
61           29.1869595  -0.1936304
62           -3.9736434  29.1869595
63          -31.6508549  -3.9736434
64           -9.1491198 -31.6508549
65          -40.5466354  -9.1491198
66          -29.7906516 -40.5466354
67           46.0006088 -29.7906516
68           -3.0608495  46.0006088
69            3.2400355  -3.0608495
70           48.2484178   3.2400355
71           19.6754910  48.2484178
72          -26.6566137  19.6754910
73            7.1413899 -26.6566137
74            0.6845725   7.1413899
75            5.5958568   0.6845725
76           -6.0176126   5.5958568
77           12.8100684  -6.0176126
78           -6.3955561  12.8100684
79           -7.3452326  -6.3955561
80          -31.4019081  -7.3452326
81          -11.8146318 -31.4019081
82           -5.9369450 -11.8146318
83           25.3644561  -5.9369450
84           -0.9645367  25.3644561
85           14.2264977  -0.9645367
86            6.9995114  14.2264977
87            2.9735111   6.9995114
88          -30.3767985   2.9735111
89            4.0161125 -30.3767985
90           -6.0108437   4.0161125
91            2.8650048  -6.0108437
92            4.6033888   2.8650048
93            6.0302858   4.6033888
94          -19.2506102   6.0302858
95           52.8428376 -19.2506102
96           -2.9296600  52.8428376
97           -2.5983184  -2.9296600
98           29.1645454  -2.5983184
99          -11.4766406  29.1645454
100          -4.3865604 -11.4766406
101         -22.6741261  -4.3865604
102          19.9115588 -22.6741261
103         -13.7040722  19.9115588
104          -6.9025844 -13.7040722
105           5.0279598  -6.9025844
106           5.2286051   5.0279598
107          -1.5516936   5.2286051
108          -1.1404419  -1.5516936
109         -13.9900209  -1.1404419
110          -1.4637410 -13.9900209
111         -20.1758777  -1.4637410
112         -12.7318568 -20.1758777
113          -2.9683414 -12.7318568
114          -1.1404419  -2.9683414
115          -1.1404419  -1.1404419
116          -4.3549656  -1.1404419
117         -45.4281242  -4.3549656
118          31.4584145 -45.4281242
119          -3.0884412  31.4584145
120          52.2709090  -3.0884412
121         -12.5462470  52.2709090
122          -9.3190137 -12.5462470
123         -25.7019363  -9.3190137
124         -24.4119221 -25.7019363
125          -2.5451717 -24.4119221
126         -38.3753265  -2.5451717
127           7.5138449 -38.3753265
128           7.8980210   7.5138449
129          16.0781842   7.8980210
130           5.8595581  16.0781842
131         -38.7561638   5.8595581
132           1.7976059 -38.7561638
133           2.4967209   1.7976059
134          -3.4277891   2.4967209
135          -1.4491766  -3.4277891
136          -1.1404419  -1.4491766
137           1.1713143  -1.1404419
138         -16.7054166   1.1713143
139         -10.8465728 -16.7054166
140           2.8595581 -10.8465728
141         -20.6540664   2.8595581
142          13.4258923 -20.6540664
143           3.3504022  13.4258923
> 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/wessaorg/rcomp/tmp/76bur1322146673.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/wessaorg/rcomp/tmp/8we9j1322146673.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/wessaorg/rcomp/tmp/925ve1322146673.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/wessaorg/rcomp/tmp/10wdcd1322146673.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11abd71322146673.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/wessaorg/rcomp/tmp/121lcl1322146673.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/wessaorg/rcomp/tmp/13ymov1322146673.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/wessaorg/rcomp/tmp/14jkaq1322146673.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/wessaorg/rcomp/tmp/15w5it1322146673.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/wessaorg/rcomp/tmp/16krdm1322146673.tab") 
+ }
> 
> try(system("convert tmp/1mnvb1322146673.ps tmp/1mnvb1322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/2crhy1322146673.ps tmp/2crhy1322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/3gxyz1322146673.ps tmp/3gxyz1322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/4xq841322146673.ps tmp/4xq841322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/5jda31322146673.ps tmp/5jda31322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/6wxwe1322146673.ps tmp/6wxwe1322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/76bur1322146673.ps tmp/76bur1322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/8we9j1322146673.ps tmp/8we9j1322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/925ve1322146673.ps tmp/925ve1322146673.png",intern=TRUE))
character(0)
> try(system("convert tmp/10wdcd1322146673.ps tmp/10wdcd1322146673.png",intern=TRUE))
character(0)
> 
> 
> proc.time()
   user  system elapsed 
  4.710   0.511   5.367