R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-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(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,0,0,1,0,0,1,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0),dim=c(3,154),dimnames=list(c('T40','T20','Outcome'),1:154))
> y <- array(NA,dim=c(3,154),dimnames=list(c('T40','T20','Outcome'),1:154))
> 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'
> 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, 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
T40 T20 Outcome
1 1 0 1
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 1
7 0 0 0
8 1 0 0
9 0 0 1
10 0 0 0
11 1 0 0
12 0 0 0
13 0 0 0
14 1 0 0
15 0 0 1
16 1 0 1
17 1 0 0
18 1 0 0
19 0 0 1
20 1 0 1
21 0 0 0
22 0 0 1
23 0 0 1
24 0 0 1
25 1 0 1
26 0 0 0
27 0 0 1
28 0 0 0
29 0 0 1
30 0 0 0
31 0 0 0
32 0 0 0
33 0 0 0
34 1 0 1
35 0 0 0
36 0 0 0
37 1 0 0
38 0 0 1
39 0 0 1
40 1 0 0
41 0 0 1
42 0 0 1
43 0 0 1
44 1 0 0
45 0 0 0
46 0 0 1
47 0 0 0
48 0 0 1
49 0 0 1
50 0 0 0
51 1 0 0
52 1 0 0
53 0 0 1
54 0 0 0
55 0 0 0
56 1 0 1
57 0 0 1
58 0 0 1
59 0 0 1
60 1 0 1
61 1 0 1
62 0 0 0
63 0 0 0
64 1 0 1
65 0 0 0
66 0 0 0
67 1 0 0
68 0 0 0
69 0 0 1
70 0 0 0
71 0 0 0
72 0 0 1
73 0 0 1
74 0 0 0
75 0 0 1
76 1 0 1
77 0 0 1
78 0 0 1
79 1 0 1
80 1 0 0
81 0 0 0
82 0 0 1
83 0 0 0
84 0 0 0
85 0 0 1
86 0 0 0
87 0 0 1
88 0 1 1
89 0 0 0
90 0 0 1
91 0 0 0
92 0 1 0
93 0 0 0
94 0 0 0
95 0 1 0
96 0 0 1
97 0 1 0
98 0 0 0
99 0 0 0
100 0 0 1
101 0 0 1
102 0 0 0
103 0 0 0
104 0 0 0
105 0 1 0
106 0 0 0
107 0 0 0
108 0 1 0
109 0 0 0
110 0 0 0
111 0 1 0
112 0 1 0
113 0 0 0
114 0 1 0
115 0 0 0
116 0 0 0
117 0 0 1
118 0 0 0
119 0 0 0
120 0 0 1
121 0 0 0
122 0 0 0
123 0 1 0
124 0 0 1
125 0 0 1
126 0 1 0
127 0 0 0
128 0 0 1
129 0 0 0
130 0 0 1
131 0 0 0
132 0 0 1
133 0 0 0
134 0 0 0
135 0 0 0
136 0 0 0
137 0 0 1
138 0 1 1
139 0 1 0
140 0 0 0
141 0 0 1
142 0 1 1
143 0 0 0
144 0 0 1
145 0 0 0
146 0 1 1
147 0 1 0
148 0 1 0
149 0 0 0
150 0 0 1
151 0 0 1
152 0 0 0
153 0 0 0
154 0 0 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) T20 Outcome
0.15151 -0.16077 0.03936
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-0.1909 -0.1909 -0.1515 -0.0301 0.8485
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.15151 0.03904 3.880 0.000155 ***
T20 -0.16077 0.09203 -1.747 0.082692 .
Outcome 0.03936 0.05897 0.668 0.505429
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.3555 on 151 degrees of freedom
Multiple R-squared: 0.02466, Adjusted R-squared: 0.01175
F-statistic: 1.909 on 2 and 151 DF, p-value: 0.1517
> 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.7302555 5.394890e-01 2.697445e-01
[2,] 0.5825371 8.349259e-01 4.174629e-01
[3,] 0.9396301 1.207399e-01 6.036993e-02
[4,] 0.9341186 1.317628e-01 6.588138e-02
[5,] 0.8988584 2.022833e-01 1.011416e-01
[6,] 0.9735633 5.287347e-02 2.643674e-02
[7,] 0.9618102 7.637956e-02 3.818978e-02
[8,] 0.9456919 1.086163e-01 5.430814e-02
[9,] 0.9833924 3.321511e-02 1.660755e-02
[10,] 0.9781801 4.363983e-02 2.181991e-02
[11,] 0.9911619 1.767622e-02 8.838111e-03
[12,] 0.9971508 5.698382e-03 2.849191e-03
[13,] 0.9990294 1.941115e-03 9.705574e-04
[14,] 0.9988140 2.372088e-03 1.186044e-03
[15,] 0.9995768 8.464169e-04 4.232084e-04
[16,] 0.9994777 1.044643e-03 5.223216e-04
[17,] 0.9994036 1.192827e-03 5.964137e-04
[18,] 0.9992615 1.477073e-03 7.385364e-04
[19,] 0.9990395 1.920991e-03 9.604953e-04
[20,] 0.9997262 5.476627e-04 2.738314e-04
[21,] 0.9996495 7.009578e-04 3.504789e-04
[22,] 0.9995623 8.754672e-04 4.377336e-04
[23,] 0.9994293 1.141338e-03 5.706691e-04
[24,] 0.9992690 1.462073e-03 7.310363e-04
[25,] 0.9990385 1.923014e-03 9.615069e-04
[26,] 0.9987212 2.557557e-03 1.278778e-03
[27,] 0.9982881 3.423717e-03 1.711858e-03
[28,] 0.9977016 4.596740e-03 2.298370e-03
[29,] 0.9993234 1.353151e-03 6.765754e-04
[30,] 0.9990640 1.871984e-03 9.359922e-04
[31,] 0.9987070 2.585915e-03 1.292958e-03
[32,] 0.9997553 4.894435e-04 2.447217e-04
[33,] 0.9996954 6.092442e-04 3.046221e-04
[34,] 0.9996120 7.760845e-04 3.880422e-04
[35,] 0.9999364 1.271742e-04 6.358711e-05
[36,] 0.9999150 1.700688e-04 8.503440e-05
[37,] 0.9998849 2.301042e-04 1.150521e-04
[38,] 0.9998432 3.136206e-04 1.568103e-04
[39,] 0.9999784 4.310402e-05 2.155201e-05
[40,] 0.9999703 5.942590e-05 2.971295e-05
[41,] 0.9999582 8.363556e-05 4.181778e-05
[42,] 0.9999423 1.153696e-04 5.768481e-05
[43,] 0.9999193 1.614534e-04 8.072670e-05
[44,] 0.9998871 2.257603e-04 1.128802e-04
[45,] 0.9998458 3.084480e-04 1.542240e-04
[46,] 0.9999829 3.420653e-05 1.710327e-05
[47,] 0.9999989 2.270823e-06 1.135411e-06
[48,] 0.9999983 3.407465e-06 1.703732e-06
[49,] 0.9999976 4.882057e-06 2.441028e-06
[50,] 0.9999965 7.049129e-06 3.524564e-06
[51,] 0.9999998 4.169189e-07 2.084595e-07
[52,] 0.9999997 6.388867e-07 3.194434e-07
[53,] 0.9999995 9.765675e-07 4.882838e-07
[54,] 0.9999993 1.486590e-06 7.432952e-07
[55,] 1.0000000 5.399111e-08 2.699556e-08
[56,] 1.0000000 7.812794e-10 3.906397e-10
[57,] 1.0000000 1.340867e-09 6.704335e-10
[58,] 1.0000000 2.312081e-09 1.156041e-09
[59,] 1.0000000 9.236785e-12 4.618393e-12
[60,] 1.0000000 1.748347e-11 8.741736e-12
[61,] 1.0000000 3.316112e-11 1.658056e-11
[62,] 1.0000000 8.991649e-15 4.495824e-15
[63,] 1.0000000 1.922174e-14 9.610869e-15
[64,] 1.0000000 3.899138e-14 1.949569e-14
[65,] 1.0000000 8.300106e-14 4.150053e-14
[66,] 1.0000000 1.767937e-13 8.839686e-14
[67,] 1.0000000 3.546464e-13 1.773232e-13
[68,] 1.0000000 7.111935e-13 3.555968e-13
[69,] 1.0000000 1.493534e-12 7.467671e-13
[70,] 1.0000000 2.968097e-12 1.484048e-12
[71,] 1.0000000 7.813046e-17 3.906523e-17
[72,] 1.0000000 1.875405e-16 9.377026e-17
[73,] 1.0000000 4.495652e-16 2.247826e-16
[74,] 1.0000000 6.043505e-25 3.021752e-25
[75,] 1.0000000 0.000000e+00 0.000000e+00
[76,] 1.0000000 0.000000e+00 0.000000e+00
[77,] 1.0000000 0.000000e+00 0.000000e+00
[78,] 1.0000000 0.000000e+00 0.000000e+00
[79,] 1.0000000 0.000000e+00 0.000000e+00
[80,] 1.0000000 0.000000e+00 0.000000e+00
[81,] 1.0000000 0.000000e+00 0.000000e+00
[82,] 1.0000000 0.000000e+00 0.000000e+00
[83,] 1.0000000 0.000000e+00 0.000000e+00
[84,] 1.0000000 0.000000e+00 0.000000e+00
[85,] 1.0000000 0.000000e+00 0.000000e+00
[86,] 1.0000000 0.000000e+00 0.000000e+00
[87,] 1.0000000 0.000000e+00 0.000000e+00
[88,] 1.0000000 0.000000e+00 0.000000e+00
[89,] 1.0000000 0.000000e+00 0.000000e+00
[90,] 1.0000000 0.000000e+00 0.000000e+00
[91,] 1.0000000 0.000000e+00 0.000000e+00
[92,] 1.0000000 0.000000e+00 0.000000e+00
[93,] 1.0000000 0.000000e+00 0.000000e+00
[94,] 1.0000000 0.000000e+00 0.000000e+00
[95,] 1.0000000 0.000000e+00 0.000000e+00
[96,] 1.0000000 0.000000e+00 0.000000e+00
[97,] 1.0000000 0.000000e+00 0.000000e+00
[98,] 1.0000000 0.000000e+00 0.000000e+00
[99,] 1.0000000 0.000000e+00 0.000000e+00
[100,] 1.0000000 0.000000e+00 0.000000e+00
[101,] 1.0000000 0.000000e+00 0.000000e+00
[102,] 1.0000000 0.000000e+00 0.000000e+00
[103,] 1.0000000 0.000000e+00 0.000000e+00
[104,] 1.0000000 0.000000e+00 0.000000e+00
[105,] 1.0000000 0.000000e+00 0.000000e+00
[106,] 1.0000000 0.000000e+00 0.000000e+00
[107,] 1.0000000 0.000000e+00 0.000000e+00
[108,] 1.0000000 0.000000e+00 0.000000e+00
[109,] 1.0000000 0.000000e+00 0.000000e+00
[110,] 1.0000000 0.000000e+00 0.000000e+00
[111,] 1.0000000 0.000000e+00 0.000000e+00
[112,] 1.0000000 0.000000e+00 0.000000e+00
[113,] 1.0000000 0.000000e+00 0.000000e+00
[114,] 1.0000000 0.000000e+00 0.000000e+00
[115,] 1.0000000 0.000000e+00 0.000000e+00
[116,] 1.0000000 0.000000e+00 0.000000e+00
[117,] 1.0000000 0.000000e+00 0.000000e+00
[118,] 1.0000000 0.000000e+00 0.000000e+00
[119,] 1.0000000 0.000000e+00 0.000000e+00
[120,] 1.0000000 0.000000e+00 0.000000e+00
[121,] 1.0000000 0.000000e+00 0.000000e+00
[122,] 1.0000000 0.000000e+00 0.000000e+00
[123,] 1.0000000 0.000000e+00 0.000000e+00
[124,] 1.0000000 0.000000e+00 0.000000e+00
[125,] 1.0000000 0.000000e+00 0.000000e+00
[126,] 1.0000000 0.000000e+00 0.000000e+00
[127,] 1.0000000 0.000000e+00 0.000000e+00
[128,] 1.0000000 0.000000e+00 0.000000e+00
[129,] 1.0000000 0.000000e+00 0.000000e+00
[130,] 1.0000000 0.000000e+00 0.000000e+00
[131,] 1.0000000 0.000000e+00 0.000000e+00
[132,] 1.0000000 0.000000e+00 0.000000e+00
[133,] 1.0000000 0.000000e+00 0.000000e+00
[134,] 1.0000000 0.000000e+00 0.000000e+00
[135,] 1.0000000 0.000000e+00 0.000000e+00
[136,] 1.0000000 0.000000e+00 0.000000e+00
[137,] 1.0000000 0.000000e+00 0.000000e+00
[138,] 1.0000000 0.000000e+00 0.000000e+00
[139,] 1.0000000 0.000000e+00 0.000000e+00
[140,] 1.0000000 0.000000e+00 0.000000e+00
[141,] 1.0000000 0.000000e+00 0.000000e+00
[142,] 1.0000000 0.000000e+00 0.000000e+00
[143,] 1.0000000 0.000000e+00 0.000000e+00
> postscript(file="/var/fisher/rcomp/tmp/14an21356034061.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/fisher/rcomp/tmp/2407c1356034061.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/fisher/rcomp/tmp/315wk1356034061.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/fisher/rcomp/tmp/44q6m1356034061.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/fisher/rcomp/tmp/5d7zg1356034061.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 = 154
Frequency = 1
1 2 3 4 5 6
0.809130003 -0.151505127 -0.151505127 -0.151505127 -0.151505127 -0.190869997
7 8 9 10 11 12
-0.151505127 0.848494873 -0.190869997 -0.151505127 0.848494873 -0.151505127
13 14 15 16 17 18
-0.151505127 0.848494873 -0.190869997 0.809130003 0.848494873 0.848494873
19 20 21 22 23 24
-0.190869997 0.809130003 -0.151505127 -0.190869997 -0.190869997 -0.190869997
25 26 27 28 29 30
0.809130003 -0.151505127 -0.190869997 -0.151505127 -0.190869997 -0.151505127
31 32 33 34 35 36
-0.151505127 -0.151505127 -0.151505127 0.809130003 -0.151505127 -0.151505127
37 38 39 40 41 42
0.848494873 -0.190869997 -0.190869997 0.848494873 -0.190869997 -0.190869997
43 44 45 46 47 48
-0.190869997 0.848494873 -0.151505127 -0.190869997 -0.151505127 -0.190869997
49 50 51 52 53 54
-0.190869997 -0.151505127 0.848494873 0.848494873 -0.190869997 -0.151505127
55 56 57 58 59 60
-0.151505127 0.809130003 -0.190869997 -0.190869997 -0.190869997 0.809130003
61 62 63 64 65 66
0.809130003 -0.151505127 -0.151505127 0.809130003 -0.151505127 -0.151505127
67 68 69 70 71 72
0.848494873 -0.151505127 -0.190869997 -0.151505127 -0.151505127 -0.190869997
73 74 75 76 77 78
-0.190869997 -0.151505127 -0.190869997 0.809130003 -0.190869997 -0.190869997
79 80 81 82 83 84
0.809130003 0.848494873 -0.151505127 -0.190869997 -0.151505127 -0.151505127
85 86 87 88 89 90
-0.190869997 -0.151505127 -0.190869997 -0.030102547 -0.151505127 -0.190869997
91 92 93 94 95 96
-0.151505127 0.009262322 -0.151505127 -0.151505127 0.009262322 -0.190869997
97 98 99 100 101 102
0.009262322 -0.151505127 -0.151505127 -0.190869997 -0.190869997 -0.151505127
103 104 105 106 107 108
-0.151505127 -0.151505127 0.009262322 -0.151505127 -0.151505127 0.009262322
109 110 111 112 113 114
-0.151505127 -0.151505127 0.009262322 0.009262322 -0.151505127 0.009262322
115 116 117 118 119 120
-0.151505127 -0.151505127 -0.190869997 -0.151505127 -0.151505127 -0.190869997
121 122 123 124 125 126
-0.151505127 -0.151505127 0.009262322 -0.190869997 -0.190869997 0.009262322
127 128 129 130 131 132
-0.151505127 -0.190869997 -0.151505127 -0.190869997 -0.151505127 -0.190869997
133 134 135 136 137 138
-0.151505127 -0.151505127 -0.151505127 -0.151505127 -0.190869997 -0.030102547
139 140 141 142 143 144
0.009262322 -0.151505127 -0.190869997 -0.030102547 -0.151505127 -0.190869997
145 146 147 148 149 150
-0.151505127 -0.030102547 0.009262322 0.009262322 -0.151505127 -0.190869997
151 152 153 154
-0.190869997 -0.151505127 -0.151505127 -0.151505127
> postscript(file="/var/fisher/rcomp/tmp/6eluw1356034061.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 = 154
Frequency = 1
lag(myerror, k = 1) myerror
0 0.809130003 NA
1 -0.151505127 0.809130003
2 -0.151505127 -0.151505127
3 -0.151505127 -0.151505127
4 -0.151505127 -0.151505127
5 -0.190869997 -0.151505127
6 -0.151505127 -0.190869997
7 0.848494873 -0.151505127
8 -0.190869997 0.848494873
9 -0.151505127 -0.190869997
10 0.848494873 -0.151505127
11 -0.151505127 0.848494873
12 -0.151505127 -0.151505127
13 0.848494873 -0.151505127
14 -0.190869997 0.848494873
15 0.809130003 -0.190869997
16 0.848494873 0.809130003
17 0.848494873 0.848494873
18 -0.190869997 0.848494873
19 0.809130003 -0.190869997
20 -0.151505127 0.809130003
21 -0.190869997 -0.151505127
22 -0.190869997 -0.190869997
23 -0.190869997 -0.190869997
24 0.809130003 -0.190869997
25 -0.151505127 0.809130003
26 -0.190869997 -0.151505127
27 -0.151505127 -0.190869997
28 -0.190869997 -0.151505127
29 -0.151505127 -0.190869997
30 -0.151505127 -0.151505127
31 -0.151505127 -0.151505127
32 -0.151505127 -0.151505127
33 0.809130003 -0.151505127
34 -0.151505127 0.809130003
35 -0.151505127 -0.151505127
36 0.848494873 -0.151505127
37 -0.190869997 0.848494873
38 -0.190869997 -0.190869997
39 0.848494873 -0.190869997
40 -0.190869997 0.848494873
41 -0.190869997 -0.190869997
42 -0.190869997 -0.190869997
43 0.848494873 -0.190869997
44 -0.151505127 0.848494873
45 -0.190869997 -0.151505127
46 -0.151505127 -0.190869997
47 -0.190869997 -0.151505127
48 -0.190869997 -0.190869997
49 -0.151505127 -0.190869997
50 0.848494873 -0.151505127
51 0.848494873 0.848494873
52 -0.190869997 0.848494873
53 -0.151505127 -0.190869997
54 -0.151505127 -0.151505127
55 0.809130003 -0.151505127
56 -0.190869997 0.809130003
57 -0.190869997 -0.190869997
58 -0.190869997 -0.190869997
59 0.809130003 -0.190869997
60 0.809130003 0.809130003
61 -0.151505127 0.809130003
62 -0.151505127 -0.151505127
63 0.809130003 -0.151505127
64 -0.151505127 0.809130003
65 -0.151505127 -0.151505127
66 0.848494873 -0.151505127
67 -0.151505127 0.848494873
68 -0.190869997 -0.151505127
69 -0.151505127 -0.190869997
70 -0.151505127 -0.151505127
71 -0.190869997 -0.151505127
72 -0.190869997 -0.190869997
73 -0.151505127 -0.190869997
74 -0.190869997 -0.151505127
75 0.809130003 -0.190869997
76 -0.190869997 0.809130003
77 -0.190869997 -0.190869997
78 0.809130003 -0.190869997
79 0.848494873 0.809130003
80 -0.151505127 0.848494873
81 -0.190869997 -0.151505127
82 -0.151505127 -0.190869997
83 -0.151505127 -0.151505127
84 -0.190869997 -0.151505127
85 -0.151505127 -0.190869997
86 -0.190869997 -0.151505127
87 -0.030102547 -0.190869997
88 -0.151505127 -0.030102547
89 -0.190869997 -0.151505127
90 -0.151505127 -0.190869997
91 0.009262322 -0.151505127
92 -0.151505127 0.009262322
93 -0.151505127 -0.151505127
94 0.009262322 -0.151505127
95 -0.190869997 0.009262322
96 0.009262322 -0.190869997
97 -0.151505127 0.009262322
98 -0.151505127 -0.151505127
99 -0.190869997 -0.151505127
100 -0.190869997 -0.190869997
101 -0.151505127 -0.190869997
102 -0.151505127 -0.151505127
103 -0.151505127 -0.151505127
104 0.009262322 -0.151505127
105 -0.151505127 0.009262322
106 -0.151505127 -0.151505127
107 0.009262322 -0.151505127
108 -0.151505127 0.009262322
109 -0.151505127 -0.151505127
110 0.009262322 -0.151505127
111 0.009262322 0.009262322
112 -0.151505127 0.009262322
113 0.009262322 -0.151505127
114 -0.151505127 0.009262322
115 -0.151505127 -0.151505127
116 -0.190869997 -0.151505127
117 -0.151505127 -0.190869997
118 -0.151505127 -0.151505127
119 -0.190869997 -0.151505127
120 -0.151505127 -0.190869997
121 -0.151505127 -0.151505127
122 0.009262322 -0.151505127
123 -0.190869997 0.009262322
124 -0.190869997 -0.190869997
125 0.009262322 -0.190869997
126 -0.151505127 0.009262322
127 -0.190869997 -0.151505127
128 -0.151505127 -0.190869997
129 -0.190869997 -0.151505127
130 -0.151505127 -0.190869997
131 -0.190869997 -0.151505127
132 -0.151505127 -0.190869997
133 -0.151505127 -0.151505127
134 -0.151505127 -0.151505127
135 -0.151505127 -0.151505127
136 -0.190869997 -0.151505127
137 -0.030102547 -0.190869997
138 0.009262322 -0.030102547
139 -0.151505127 0.009262322
140 -0.190869997 -0.151505127
141 -0.030102547 -0.190869997
142 -0.151505127 -0.030102547
143 -0.190869997 -0.151505127
144 -0.151505127 -0.190869997
145 -0.030102547 -0.151505127
146 0.009262322 -0.030102547
147 0.009262322 0.009262322
148 -0.151505127 0.009262322
149 -0.190869997 -0.151505127
150 -0.190869997 -0.190869997
151 -0.151505127 -0.190869997
152 -0.151505127 -0.151505127
153 -0.151505127 -0.151505127
154 NA -0.151505127
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.151505127 0.809130003
[2,] -0.151505127 -0.151505127
[3,] -0.151505127 -0.151505127
[4,] -0.151505127 -0.151505127
[5,] -0.190869997 -0.151505127
[6,] -0.151505127 -0.190869997
[7,] 0.848494873 -0.151505127
[8,] -0.190869997 0.848494873
[9,] -0.151505127 -0.190869997
[10,] 0.848494873 -0.151505127
[11,] -0.151505127 0.848494873
[12,] -0.151505127 -0.151505127
[13,] 0.848494873 -0.151505127
[14,] -0.190869997 0.848494873
[15,] 0.809130003 -0.190869997
[16,] 0.848494873 0.809130003
[17,] 0.848494873 0.848494873
[18,] -0.190869997 0.848494873
[19,] 0.809130003 -0.190869997
[20,] -0.151505127 0.809130003
[21,] -0.190869997 -0.151505127
[22,] -0.190869997 -0.190869997
[23,] -0.190869997 -0.190869997
[24,] 0.809130003 -0.190869997
[25,] -0.151505127 0.809130003
[26,] -0.190869997 -0.151505127
[27,] -0.151505127 -0.190869997
[28,] -0.190869997 -0.151505127
[29,] -0.151505127 -0.190869997
[30,] -0.151505127 -0.151505127
[31,] -0.151505127 -0.151505127
[32,] -0.151505127 -0.151505127
[33,] 0.809130003 -0.151505127
[34,] -0.151505127 0.809130003
[35,] -0.151505127 -0.151505127
[36,] 0.848494873 -0.151505127
[37,] -0.190869997 0.848494873
[38,] -0.190869997 -0.190869997
[39,] 0.848494873 -0.190869997
[40,] -0.190869997 0.848494873
[41,] -0.190869997 -0.190869997
[42,] -0.190869997 -0.190869997
[43,] 0.848494873 -0.190869997
[44,] -0.151505127 0.848494873
[45,] -0.190869997 -0.151505127
[46,] -0.151505127 -0.190869997
[47,] -0.190869997 -0.151505127
[48,] -0.190869997 -0.190869997
[49,] -0.151505127 -0.190869997
[50,] 0.848494873 -0.151505127
[51,] 0.848494873 0.848494873
[52,] -0.190869997 0.848494873
[53,] -0.151505127 -0.190869997
[54,] -0.151505127 -0.151505127
[55,] 0.809130003 -0.151505127
[56,] -0.190869997 0.809130003
[57,] -0.190869997 -0.190869997
[58,] -0.190869997 -0.190869997
[59,] 0.809130003 -0.190869997
[60,] 0.809130003 0.809130003
[61,] -0.151505127 0.809130003
[62,] -0.151505127 -0.151505127
[63,] 0.809130003 -0.151505127
[64,] -0.151505127 0.809130003
[65,] -0.151505127 -0.151505127
[66,] 0.848494873 -0.151505127
[67,] -0.151505127 0.848494873
[68,] -0.190869997 -0.151505127
[69,] -0.151505127 -0.190869997
[70,] -0.151505127 -0.151505127
[71,] -0.190869997 -0.151505127
[72,] -0.190869997 -0.190869997
[73,] -0.151505127 -0.190869997
[74,] -0.190869997 -0.151505127
[75,] 0.809130003 -0.190869997
[76,] -0.190869997 0.809130003
[77,] -0.190869997 -0.190869997
[78,] 0.809130003 -0.190869997
[79,] 0.848494873 0.809130003
[80,] -0.151505127 0.848494873
[81,] -0.190869997 -0.151505127
[82,] -0.151505127 -0.190869997
[83,] -0.151505127 -0.151505127
[84,] -0.190869997 -0.151505127
[85,] -0.151505127 -0.190869997
[86,] -0.190869997 -0.151505127
[87,] -0.030102547 -0.190869997
[88,] -0.151505127 -0.030102547
[89,] -0.190869997 -0.151505127
[90,] -0.151505127 -0.190869997
[91,] 0.009262322 -0.151505127
[92,] -0.151505127 0.009262322
[93,] -0.151505127 -0.151505127
[94,] 0.009262322 -0.151505127
[95,] -0.190869997 0.009262322
[96,] 0.009262322 -0.190869997
[97,] -0.151505127 0.009262322
[98,] -0.151505127 -0.151505127
[99,] -0.190869997 -0.151505127
[100,] -0.190869997 -0.190869997
[101,] -0.151505127 -0.190869997
[102,] -0.151505127 -0.151505127
[103,] -0.151505127 -0.151505127
[104,] 0.009262322 -0.151505127
[105,] -0.151505127 0.009262322
[106,] -0.151505127 -0.151505127
[107,] 0.009262322 -0.151505127
[108,] -0.151505127 0.009262322
[109,] -0.151505127 -0.151505127
[110,] 0.009262322 -0.151505127
[111,] 0.009262322 0.009262322
[112,] -0.151505127 0.009262322
[113,] 0.009262322 -0.151505127
[114,] -0.151505127 0.009262322
[115,] -0.151505127 -0.151505127
[116,] -0.190869997 -0.151505127
[117,] -0.151505127 -0.190869997
[118,] -0.151505127 -0.151505127
[119,] -0.190869997 -0.151505127
[120,] -0.151505127 -0.190869997
[121,] -0.151505127 -0.151505127
[122,] 0.009262322 -0.151505127
[123,] -0.190869997 0.009262322
[124,] -0.190869997 -0.190869997
[125,] 0.009262322 -0.190869997
[126,] -0.151505127 0.009262322
[127,] -0.190869997 -0.151505127
[128,] -0.151505127 -0.190869997
[129,] -0.190869997 -0.151505127
[130,] -0.151505127 -0.190869997
[131,] -0.190869997 -0.151505127
[132,] -0.151505127 -0.190869997
[133,] -0.151505127 -0.151505127
[134,] -0.151505127 -0.151505127
[135,] -0.151505127 -0.151505127
[136,] -0.190869997 -0.151505127
[137,] -0.030102547 -0.190869997
[138,] 0.009262322 -0.030102547
[139,] -0.151505127 0.009262322
[140,] -0.190869997 -0.151505127
[141,] -0.030102547 -0.190869997
[142,] -0.151505127 -0.030102547
[143,] -0.190869997 -0.151505127
[144,] -0.151505127 -0.190869997
[145,] -0.030102547 -0.151505127
[146,] 0.009262322 -0.030102547
[147,] 0.009262322 0.009262322
[148,] -0.151505127 0.009262322
[149,] -0.190869997 -0.151505127
[150,] -0.190869997 -0.190869997
[151,] -0.151505127 -0.190869997
[152,] -0.151505127 -0.151505127
[153,] -0.151505127 -0.151505127
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.151505127 0.809130003
2 -0.151505127 -0.151505127
3 -0.151505127 -0.151505127
4 -0.151505127 -0.151505127
5 -0.190869997 -0.151505127
6 -0.151505127 -0.190869997
7 0.848494873 -0.151505127
8 -0.190869997 0.848494873
9 -0.151505127 -0.190869997
10 0.848494873 -0.151505127
11 -0.151505127 0.848494873
12 -0.151505127 -0.151505127
13 0.848494873 -0.151505127
14 -0.190869997 0.848494873
15 0.809130003 -0.190869997
16 0.848494873 0.809130003
17 0.848494873 0.848494873
18 -0.190869997 0.848494873
19 0.809130003 -0.190869997
20 -0.151505127 0.809130003
21 -0.190869997 -0.151505127
22 -0.190869997 -0.190869997
23 -0.190869997 -0.190869997
24 0.809130003 -0.190869997
25 -0.151505127 0.809130003
26 -0.190869997 -0.151505127
27 -0.151505127 -0.190869997
28 -0.190869997 -0.151505127
29 -0.151505127 -0.190869997
30 -0.151505127 -0.151505127
31 -0.151505127 -0.151505127
32 -0.151505127 -0.151505127
33 0.809130003 -0.151505127
34 -0.151505127 0.809130003
35 -0.151505127 -0.151505127
36 0.848494873 -0.151505127
37 -0.190869997 0.848494873
38 -0.190869997 -0.190869997
39 0.848494873 -0.190869997
40 -0.190869997 0.848494873
41 -0.190869997 -0.190869997
42 -0.190869997 -0.190869997
43 0.848494873 -0.190869997
44 -0.151505127 0.848494873
45 -0.190869997 -0.151505127
46 -0.151505127 -0.190869997
47 -0.190869997 -0.151505127
48 -0.190869997 -0.190869997
49 -0.151505127 -0.190869997
50 0.848494873 -0.151505127
51 0.848494873 0.848494873
52 -0.190869997 0.848494873
53 -0.151505127 -0.190869997
54 -0.151505127 -0.151505127
55 0.809130003 -0.151505127
56 -0.190869997 0.809130003
57 -0.190869997 -0.190869997
58 -0.190869997 -0.190869997
59 0.809130003 -0.190869997
60 0.809130003 0.809130003
61 -0.151505127 0.809130003
62 -0.151505127 -0.151505127
63 0.809130003 -0.151505127
64 -0.151505127 0.809130003
65 -0.151505127 -0.151505127
66 0.848494873 -0.151505127
67 -0.151505127 0.848494873
68 -0.190869997 -0.151505127
69 -0.151505127 -0.190869997
70 -0.151505127 -0.151505127
71 -0.190869997 -0.151505127
72 -0.190869997 -0.190869997
73 -0.151505127 -0.190869997
74 -0.190869997 -0.151505127
75 0.809130003 -0.190869997
76 -0.190869997 0.809130003
77 -0.190869997 -0.190869997
78 0.809130003 -0.190869997
79 0.848494873 0.809130003
80 -0.151505127 0.848494873
81 -0.190869997 -0.151505127
82 -0.151505127 -0.190869997
83 -0.151505127 -0.151505127
84 -0.190869997 -0.151505127
85 -0.151505127 -0.190869997
86 -0.190869997 -0.151505127
87 -0.030102547 -0.190869997
88 -0.151505127 -0.030102547
89 -0.190869997 -0.151505127
90 -0.151505127 -0.190869997
91 0.009262322 -0.151505127
92 -0.151505127 0.009262322
93 -0.151505127 -0.151505127
94 0.009262322 -0.151505127
95 -0.190869997 0.009262322
96 0.009262322 -0.190869997
97 -0.151505127 0.009262322
98 -0.151505127 -0.151505127
99 -0.190869997 -0.151505127
100 -0.190869997 -0.190869997
101 -0.151505127 -0.190869997
102 -0.151505127 -0.151505127
103 -0.151505127 -0.151505127
104 0.009262322 -0.151505127
105 -0.151505127 0.009262322
106 -0.151505127 -0.151505127
107 0.009262322 -0.151505127
108 -0.151505127 0.009262322
109 -0.151505127 -0.151505127
110 0.009262322 -0.151505127
111 0.009262322 0.009262322
112 -0.151505127 0.009262322
113 0.009262322 -0.151505127
114 -0.151505127 0.009262322
115 -0.151505127 -0.151505127
116 -0.190869997 -0.151505127
117 -0.151505127 -0.190869997
118 -0.151505127 -0.151505127
119 -0.190869997 -0.151505127
120 -0.151505127 -0.190869997
121 -0.151505127 -0.151505127
122 0.009262322 -0.151505127
123 -0.190869997 0.009262322
124 -0.190869997 -0.190869997
125 0.009262322 -0.190869997
126 -0.151505127 0.009262322
127 -0.190869997 -0.151505127
128 -0.151505127 -0.190869997
129 -0.190869997 -0.151505127
130 -0.151505127 -0.190869997
131 -0.190869997 -0.151505127
132 -0.151505127 -0.190869997
133 -0.151505127 -0.151505127
134 -0.151505127 -0.151505127
135 -0.151505127 -0.151505127
136 -0.190869997 -0.151505127
137 -0.030102547 -0.190869997
138 0.009262322 -0.030102547
139 -0.151505127 0.009262322
140 -0.190869997 -0.151505127
141 -0.030102547 -0.190869997
142 -0.151505127 -0.030102547
143 -0.190869997 -0.151505127
144 -0.151505127 -0.190869997
145 -0.030102547 -0.151505127
146 0.009262322 -0.030102547
147 0.009262322 0.009262322
148 -0.151505127 0.009262322
149 -0.190869997 -0.151505127
150 -0.190869997 -0.190869997
151 -0.151505127 -0.190869997
152 -0.151505127 -0.151505127
153 -0.151505127 -0.151505127
> 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/fisher/rcomp/tmp/70y0s1356034061.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/fisher/rcomp/tmp/8tsj31356034061.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/fisher/rcomp/tmp/9s0oo1356034061.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/fisher/rcomp/tmp/102a121356034061.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/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/fisher/rcomp/tmp/11ld6l1356034061.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/fisher/rcomp/tmp/12d54w1356034061.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/fisher/rcomp/tmp/132q1a1356034061.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/fisher/rcomp/tmp/14gley1356034061.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/fisher/rcomp/tmp/157vpl1356034061.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/fisher/rcomp/tmp/16cf2z1356034061.tab")
+ }
>
> try(system("convert tmp/14an21356034061.ps tmp/14an21356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/2407c1356034061.ps tmp/2407c1356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/315wk1356034061.ps tmp/315wk1356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/44q6m1356034061.ps tmp/44q6m1356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/5d7zg1356034061.ps tmp/5d7zg1356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/6eluw1356034061.ps tmp/6eluw1356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/70y0s1356034061.ps tmp/70y0s1356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/8tsj31356034061.ps tmp/8tsj31356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/9s0oo1356034061.ps tmp/9s0oo1356034061.png",intern=TRUE))
character(0)
> try(system("convert tmp/102a121356034061.ps tmp/102a121356034061.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
7.264 1.661 8.962