R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(100.00
+ ,100.00
+ ,103.53
+ ,102.62
+ ,108.36
+ ,107.62
+ ,115.20
+ ,103.46
+ ,123.51
+ ,103.61
+ ,132.87
+ ,106.10
+ ,130.55
+ ,107.13
+ ,136.68
+ ,108.82
+ ,140.63
+ ,112.93
+ ,143.47
+ ,109.35
+ ,124.10
+ ,108.75
+ ,111.49
+ ,110.83
+ ,119.93
+ ,110.95
+ ,131.79
+ ,114.96
+ ,136.61
+ ,120.45
+ ,141.79
+ ,122.89
+ ,142.23
+ ,120.43
+ ,146.74
+ ,121.76
+ ,154.85
+ ,122.78
+ ,148.44
+ ,125.32
+ ,154.18
+ ,128.68
+ ,149.10
+ ,127.91
+ ,152.22
+ ,125.52
+ ,149.34
+ ,127.56
+ ,160.94
+ ,127.90
+ ,176.16
+ ,130.75
+ ,195.12
+ ,133.57
+ ,186.07
+ ,135.83
+ ,200.78
+ ,135.26
+ ,208.15
+ ,135.99
+ ,209.56
+ ,139.12
+ ,203.33
+ ,137.64
+ ,198.84
+ ,138.59
+ ,200.63
+ ,138.32
+ ,206.47
+ ,135.99
+ ,196.68
+ ,136.96
+ ,203.81
+ ,137.13
+ ,190.18
+ ,138.67
+ ,187.50
+ ,143.04
+ ,187.62
+ ,143.98
+ ,168.92
+ ,144.09
+ ,164.78
+ ,144.97
+ ,175.98
+ ,147.77
+ ,174.70
+ ,149.73
+ ,166.95
+ ,153.11
+ ,161.76
+ ,151.58
+ ,149.65
+ ,149.04
+ ,137.42
+ ,154.70
+ ,142.60
+ ,154.91
+ ,146.94
+ ,159.08
+ ,152.52
+ ,168.01
+ ,147.47
+ ,164.17
+ ,146.15
+ ,163.77
+ ,152.04
+ ,163.49
+ ,144.42
+ ,166.13
+ ,138.15
+ ,166.15
+ ,125.94
+ ,170.05
+ ,112.61
+ ,167.37
+ ,111.48
+ ,164.80
+ ,95.25
+ ,169.53
+ ,105.38
+ ,168.17
+ ,109.59
+ ,172.45
+ ,99.07
+ ,177.81
+ ,92.07
+ ,175.38
+ ,89.10
+ ,175.64
+ ,86.36
+ ,178.80
+ ,95.39
+ ,180.49
+ ,95.27
+ ,182.71
+ ,98.56
+ ,185.73
+ ,101.79
+ ,183.17
+ ,102.02
+ ,182.11
+ ,98.21
+ ,185.43
+ ,104.42
+ ,185.29
+ ,105.62
+ ,188.55
+ ,109.46
+ ,191.89
+ ,110.94
+ ,190.62
+ ,113.09
+ ,190.29
+ ,109.58
+ ,193.27
+ ,111.41
+ ,194.54
+ ,109.83
+ ,195.42
+ ,110.58
+ ,198.58
+ ,109.04
+ ,197.60
+ ,107.80
+ ,194.62
+ ,109.79
+ ,199.30
+ ,110.76
+ ,199.51
+ ,112.64
+ ,203.08
+ ,114.17
+ ,204.36
+ ,115.99
+ ,206.47
+ ,119.01
+ ,206.51
+ ,117.92
+ ,208.09
+ ,115.92
+ ,210.08
+ ,120.75
+ ,212.42
+ ,124.94
+ ,231.32
+ ,129.17
+ ,231.94
+ ,128.14
+ ,228.02
+ ,134.18
+ ,231.95
+ ,131.74
+ ,233.88
+ ,134.32
+ ,235.95
+ ,137.80
+ ,242.92
+ ,141.79
+ ,240.80
+ ,142.75
+ ,240.34
+ ,144.30
+ ,241.95
+ ,145.49
+ ,246.61
+ ,138.21
+ ,247.80
+ ,139.02
+ ,250.97
+ ,141.91
+ ,248.11
+ ,144.95
+ ,243.75
+ ,146.11
+ ,248.79
+ ,150.96
+ ,247.03
+ ,148.20
+ ,250.49
+ ,152.12
+ ,260.83
+ ,154.74
+ ,256.22
+ ,150.80
+ ,255.33
+ ,152.60
+ ,259.54
+ ,158.74
+ ,260.64
+ ,161.83
+ ,262.20
+ ,162.40
+ ,267.29
+ ,156.11
+ ,265.55
+ ,154.93
+ ,258.99
+ ,157.18
+ ,265.04
+ ,159.85
+ ,262.18
+ ,154.40
+ ,265.05
+ ,151.57
+ ,268.78
+ ,133.34
+ ,265.93
+ ,131.20
+ ,261.30
+ ,124.17
+ ,265.20
+ ,133.19
+ ,263.26
+ ,130.94
+ ,265.41
+ ,119.58
+ ,268.75
+ ,118.55
+ ,261.95
+ ,119.96
+ ,258.16
+ ,108.42
+ ,265.22
+ ,95.93
+ ,267.34
+ ,88.83
+ ,269.01
+ ,84.98
+ ,272.90
+ ,81.61
+ ,278.76
+ ,72.84
+ ,278.98
+ ,74.72
+ ,281.03
+ ,83.40
+ ,285.65
+ ,87.42
+ ,287.34
+ ,86.33
+ ,294.57
+ ,94.28
+ ,294.24
+ ,98.81
+ ,295.13
+ ,100.96
+ ,299.65
+ ,99.14
+ ,303.59)
+ ,dim=c(2
+ ,145)
+ ,dimnames=list(c('Y'
+ ,'X')
+ ,1:145))
> y <- array(NA,dim=c(2,145),dimnames=list(c('Y','X'),1:145))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from package:base :
as.Date.numeric
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Y X
1 100.00 100.00
2 103.53 102.62
3 108.36 107.62
4 115.20 103.46
5 123.51 103.61
6 132.87 106.10
7 130.55 107.13
8 136.68 108.82
9 140.63 112.93
10 143.47 109.35
11 124.10 108.75
12 111.49 110.83
13 119.93 110.95
14 131.79 114.96
15 136.61 120.45
16 141.79 122.89
17 142.23 120.43
18 146.74 121.76
19 154.85 122.78
20 148.44 125.32
21 154.18 128.68
22 149.10 127.91
23 152.22 125.52
24 149.34 127.56
25 160.94 127.90
26 176.16 130.75
27 195.12 133.57
28 186.07 135.83
29 200.78 135.26
30 208.15 135.99
31 209.56 139.12
32 203.33 137.64
33 198.84 138.59
34 200.63 138.32
35 206.47 135.99
36 196.68 136.96
37 203.81 137.13
38 190.18 138.67
39 187.50 143.04
40 187.62 143.98
41 168.92 144.09
42 164.78 144.97
43 175.98 147.77
44 174.70 149.73
45 166.95 153.11
46 161.76 151.58
47 149.65 149.04
48 137.42 154.70
49 142.60 154.91
50 146.94 159.08
51 152.52 168.01
52 147.47 164.17
53 146.15 163.77
54 152.04 163.49
55 144.42 166.13
56 138.15 166.15
57 125.94 170.05
58 112.61 167.37
59 111.48 164.80
60 95.25 169.53
61 105.38 168.17
62 109.59 172.45
63 99.07 177.81
64 92.07 175.38
65 89.10 175.64
66 86.36 178.80
67 95.39 180.49
68 95.27 182.71
69 98.56 185.73
70 101.79 183.17
71 102.02 182.11
72 98.21 185.43
73 104.42 185.29
74 105.62 188.55
75 109.46 191.89
76 110.94 190.62
77 113.09 190.29
78 109.58 193.27
79 111.41 194.54
80 109.83 195.42
81 110.58 198.58
82 109.04 197.60
83 107.80 194.62
84 109.79 199.30
85 110.76 199.51
86 112.64 203.08
87 114.17 204.36
88 115.99 206.47
89 119.01 206.51
90 117.92 208.09
91 115.92 210.08
92 120.75 212.42
93 124.94 231.32
94 129.17 231.94
95 128.14 228.02
96 134.18 231.95
97 131.74 233.88
98 134.32 235.95
99 137.80 242.92
100 141.79 240.80
101 142.75 240.34
102 144.30 241.95
103 145.49 246.61
104 138.21 247.80
105 139.02 250.97
106 141.91 248.11
107 144.95 243.75
108 146.11 248.79
109 150.96 247.03
110 148.20 250.49
111 152.12 260.83
112 154.74 256.22
113 150.80 255.33
114 152.60 259.54
115 158.74 260.64
116 161.83 262.20
117 162.40 267.29
118 156.11 265.55
119 154.93 258.99
120 157.18 265.04
121 159.85 262.18
122 154.40 265.05
123 151.57 268.78
124 133.34 265.93
125 131.20 261.30
126 124.17 265.20
127 133.19 263.26
128 130.94 265.41
129 119.58 268.75
130 118.55 261.95
131 119.96 258.16
132 108.42 265.22
133 95.93 267.34
134 88.83 269.01
135 84.98 272.90
136 81.61 278.76
137 72.84 278.98
138 74.72 281.03
139 83.40 285.65
140 87.42 287.34
141 86.33 294.57
142 94.28 294.24
143 98.81 295.13
144 100.96 299.65
145 99.14 303.59
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) X
170.0181 -0.1859
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-51.4315 -24.3988 -0.6471 21.3082 65.3995
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 170.01805 8.53386 19.923 < 2e-16 ***
X -0.18587 0.04222 -4.402 2.08e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 29.63 on 143 degrees of freedom
Multiple R-squared: 0.1193, Adjusted R-squared: 0.1132
F-statistic: 19.38 on 1 and 143 DF, p-value: 2.083e-05
> 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,] 5.433362e-02 1.086672e-01 9.456664e-01
[2,] 4.811510e-02 9.623020e-02 9.518849e-01
[3,] 2.063895e-02 4.127790e-02 9.793611e-01
[4,] 7.993781e-03 1.598756e-02 9.920062e-01
[5,] 2.735762e-03 5.471524e-03 9.972642e-01
[6,] 1.405738e-03 2.811476e-03 9.985943e-01
[7,] 5.955786e-04 1.191157e-03 9.994044e-01
[8,] 1.865859e-03 3.731718e-03 9.981341e-01
[9,] 1.184403e-03 2.368806e-03 9.988156e-01
[10,] 5.377239e-04 1.075448e-03 9.994623e-01
[11,] 2.630101e-04 5.260203e-04 9.997370e-01
[12,] 1.033582e-04 2.067164e-04 9.998966e-01
[13,] 3.730039e-05 7.460078e-05 9.999627e-01
[14,] 1.334614e-05 2.669228e-05 9.999867e-01
[15,] 5.938588e-06 1.187718e-05 9.999941e-01
[16,] 2.040756e-06 4.081512e-06 9.999980e-01
[17,] 6.650434e-07 1.330087e-06 9.999993e-01
[18,] 2.371362e-07 4.742724e-07 9.999998e-01
[19,] 7.421222e-08 1.484244e-07 9.999999e-01
[20,] 2.414986e-08 4.829971e-08 1.000000e+00
[21,] 9.291969e-09 1.858394e-08 1.000000e+00
[22,] 1.134893e-08 2.269787e-08 1.000000e+00
[23,] 1.018789e-07 2.037578e-07 9.999999e-01
[24,] 6.018996e-08 1.203799e-07 9.999999e-01
[25,] 2.020487e-07 4.040973e-07 9.999998e-01
[26,] 8.704710e-07 1.740942e-06 9.999991e-01
[27,] 1.277338e-06 2.554675e-06 9.999987e-01
[28,] 1.223099e-06 2.446198e-06 9.999988e-01
[29,] 8.081737e-07 1.616347e-06 9.999992e-01
[30,] 6.128855e-07 1.225771e-06 9.999994e-01
[31,] 1.072571e-06 2.145143e-06 9.999989e-01
[32,] 8.235995e-07 1.647199e-06 9.999992e-01
[33,] 1.021034e-06 2.042069e-06 9.999990e-01
[34,] 8.768656e-07 1.753731e-06 9.999991e-01
[35,] 1.709776e-06 3.419552e-06 9.999983e-01
[36,] 3.632998e-06 7.265996e-06 9.999964e-01
[37,] 3.150958e-05 6.301916e-05 9.999685e-01
[38,] 2.270589e-04 4.541179e-04 9.997729e-01
[39,] 6.915320e-04 1.383064e-03 9.993085e-01
[40,] 2.196798e-03 4.393596e-03 9.978032e-01
[41,] 1.023227e-02 2.046454e-02 9.897677e-01
[42,] 2.931314e-02 5.862628e-02 9.706869e-01
[43,] 7.165078e-02 1.433016e-01 9.283492e-01
[44,] 2.229954e-01 4.459907e-01 7.770046e-01
[45,] 3.640806e-01 7.281612e-01 6.359194e-01
[46,] 4.963706e-01 9.927413e-01 5.036294e-01
[47,] 6.292499e-01 7.415001e-01 3.707501e-01
[48,] 7.157476e-01 5.685048e-01 2.842524e-01
[49,] 7.773017e-01 4.453966e-01 2.226983e-01
[50,] 8.182316e-01 3.635368e-01 1.817684e-01
[51,] 8.584074e-01 2.831851e-01 1.415926e-01
[52,] 8.912058e-01 2.175883e-01 1.087942e-01
[53,] 9.263129e-01 1.473741e-01 7.368707e-02
[54,] 9.557417e-01 8.851655e-02 4.425827e-02
[55,] 9.703942e-01 5.921158e-02 2.960579e-02
[56,] 9.867122e-01 2.657559e-02 1.328779e-02
[57,] 9.906631e-01 1.867372e-02 9.336859e-03
[58,] 9.922422e-01 1.551560e-02 7.757801e-03
[59,] 9.946365e-01 1.072692e-02 5.363459e-03
[60,] 9.966629e-01 6.674239e-03 3.337120e-03
[61,] 9.979591e-01 4.081835e-03 2.040918e-03
[62,] 9.987945e-01 2.411017e-03 1.205508e-03
[63,] 9.989573e-01 2.085369e-03 1.042684e-03
[64,] 9.990604e-01 1.879262e-03 9.396310e-04
[65,] 9.990352e-01 1.929530e-03 9.647651e-04
[66,] 9.989160e-01 2.168053e-03 1.084026e-03
[67,] 9.987718e-01 2.456353e-03 1.228176e-03
[68,] 9.987214e-01 2.557127e-03 1.278563e-03
[69,] 9.984684e-01 3.063187e-03 1.531593e-03
[70,] 9.981224e-01 3.755156e-03 1.877578e-03
[71,] 9.975531e-01 4.893760e-03 2.446880e-03
[72,] 9.967965e-01 6.407076e-03 3.203538e-03
[73,] 9.957566e-01 8.486737e-03 4.243368e-03
[74,] 9.947019e-01 1.059618e-02 5.298089e-03
[75,] 9.933238e-01 1.335245e-02 6.676224e-03
[76,] 9.919381e-01 1.612387e-02 8.061933e-03
[77,] 9.903168e-01 1.936648e-02 9.683239e-03
[78,] 9.890008e-01 2.199838e-02 1.099919e-02
[79,] 9.884264e-01 2.314726e-02 1.157363e-02
[80,] 9.877100e-01 2.457997e-02 1.228999e-02
[81,] 9.874230e-01 2.515403e-02 1.257702e-02
[82,] 9.872025e-01 2.559499e-02 1.279750e-02
[83,] 9.873801e-01 2.523977e-02 1.261988e-02
[84,] 9.878833e-01 2.423345e-02 1.211673e-02
[85,] 9.887194e-01 2.256130e-02 1.128065e-02
[86,] 9.908461e-01 1.830772e-02 9.153861e-03
[87,] 9.941718e-01 1.165631e-02 5.828153e-03
[88,] 9.965728e-01 6.854325e-03 3.427163e-03
[89,] 9.968531e-01 6.293799e-03 3.146900e-03
[90,] 9.969594e-01 6.081103e-03 3.040552e-03
[91,] 9.976196e-01 4.760733e-03 2.380366e-03
[92,] 9.977759e-01 4.448298e-03 2.224149e-03
[93,] 9.980738e-01 3.852488e-03 1.926244e-03
[94,] 9.982316e-01 3.536864e-03 1.768432e-03
[95,] 9.979510e-01 4.098068e-03 2.049034e-03
[96,] 9.976347e-01 4.730606e-03 2.365303e-03
[97,] 9.972991e-01 5.401762e-03 2.700881e-03
[98,] 9.967797e-01 6.440668e-03 3.220334e-03
[99,] 9.958160e-01 8.367984e-03 4.183992e-03
[100,] 9.947767e-01 1.044669e-02 5.223347e-03
[101,] 9.930823e-01 1.383536e-02 6.917681e-03
[102,] 9.911445e-01 1.771096e-02 8.855478e-03
[103,] 9.895500e-01 2.090006e-02 1.045003e-02
[104,] 9.863958e-01 2.720849e-02 1.360424e-02
[105,] 9.824464e-01 3.510725e-02 1.755363e-02
[106,] 9.768087e-01 4.638261e-02 2.319131e-02
[107,] 9.717858e-01 5.642835e-02 2.821418e-02
[108,] 9.644217e-01 7.115654e-02 3.557827e-02
[109,] 9.531859e-01 9.362818e-02 4.681409e-02
[110,] 9.428729e-01 1.142541e-01 5.712706e-02
[111,] 9.395631e-01 1.208738e-01 6.043691e-02
[112,] 9.448651e-01 1.102698e-01 5.513489e-02
[113,] 9.625280e-01 7.494399e-02 3.747200e-02
[114,] 9.683563e-01 6.328750e-02 3.164375e-02
[115,] 9.667314e-01 6.653722e-02 3.326861e-02
[116,] 9.766734e-01 4.665311e-02 2.332656e-02
[117,] 9.864707e-01 2.705860e-02 1.352930e-02
[118,] 9.932662e-01 1.346761e-02 6.733807e-03
[119,] 9.980182e-01 3.963523e-03 1.981761e-03
[120,] 9.980095e-01 3.981069e-03 1.990534e-03
[121,] 9.975687e-01 4.862630e-03 2.431315e-03
[122,] 9.966978e-01 6.604472e-03 3.302236e-03
[123,] 9.975731e-01 4.853711e-03 2.426855e-03
[124,] 9.987296e-01 2.540798e-03 1.270399e-03
[125,] 9.988719e-01 2.256185e-03 1.128092e-03
[126,] 9.990576e-01 1.884710e-03 9.423548e-04
[127,] 9.997909e-01 4.181846e-04 2.090923e-04
[128,] 9.999632e-01 7.365304e-05 3.682652e-05
[129,] 9.999843e-01 3.132200e-05 1.566100e-05
[130,] 9.999924e-01 1.512761e-05 7.563806e-06
[131,] 9.999972e-01 5.593114e-06 2.796557e-06
[132,] 9.999934e-01 1.324768e-05 6.623842e-06
[133,] 9.999584e-01 8.322040e-05 4.161020e-05
[134,] 9.998117e-01 3.765490e-04 1.882745e-04
[135,] 9.987564e-01 2.487119e-03 1.243559e-03
[136,] 9.917269e-01 1.654627e-02 8.273134e-03
> postscript(file="/var/www/html/rcomp/tmp/14v5l1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/21cfk1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/3bio41260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/45xau1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/5pobf1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 145
Frequency = 1
1 2 3 4 5 6
-51.4315125 -47.4145452 -41.6552182 -35.5884182 -27.2505384 -17.4277336
7 8 9 10 11 12
-19.5562923 -13.1121798 -8.3982730 -6.2236711 -25.7051904 -37.9285904
13 14 15 16 17 18
-29.4662865 -16.8609663 -11.0205654 -5.3870538 -5.4042827 -0.6470817
19 20 21 22 23 24
7.6525010 1.7145991 8.0791068 2.8559904 5.5317721 3.0309375
25 26 27 28 29 30
14.6941318 30.4438481 49.9279885 41.2980443 55.9021010 63.4077827
31 32 33 34 35 36
65.3995414 58.8944606 54.5810327 56.3208491 61.7277827 52.1180721
37 38 39 40 41 42
59.2796693 45.9359020 44.0681337 44.3628471 25.6832923 21.7068539
43 44 45 46 47 48
33.4272770 32.5115731 25.3897981 19.9154241 7.3333260 -3.8446759
49 50 51 52 53 54
1.3743558 6.4894145 13.7291923 7.9654693 6.5711231 12.4090808
55 56 57 58 59 60
5.2797654 -0.9865173 -12.4716423 -26.2997615 -27.9074355 -43.2582923
61 62 63 64 65 66
-33.3810692 -28.3755653 -37.8993269 -45.3509798 -48.2726548 -50.4253202
67 68 69 70 71 72
-41.0812077 -40.7885865 -36.9372730 -34.1830884 -34.1501057 -37.3430327
73 74 75 76 77 78
-31.1590538 -29.3531327 -24.8923423 -23.6483913 -21.5597269 -24.5158480
79 80 81 82 83 84
-22.4497990 -23.8662375 -22.5289028 -24.2510509 -26.0449298 -23.1850798
85 86 87 88 89 90
-22.1760480 -19.6325086 -17.8646009 -15.6524250 -12.6249903 -13.4213230
91 92 93 94 95 96
-15.0514509 -9.7865259 -2.0836701 2.2615664 0.5029741 7.2734250
97 98 99 100 101 102
5.1921452 8.1568866 12.9323683 16.5283337 17.4028356 19.2520789
103 104 105 106 107 108
21.3082116 14.2493914 15.6485847 18.0070097 20.2366366 22.3333981
109 110 111 112 113 114
26.8562750 24.7393693 30.5812174 32.3443779 28.2389577 30.8214510
115 116 117 118 119 120
37.1659029 40.5458529 42.0619077 35.4485020 33.0492250 36.4237106
121 122 123 124 125 126
38.5621356 33.6455693 31.5088472 12.7491308 9.7485741 3.4434491
127 128 129 130 131 132
12.1028702 10.2524808 -0.4867288 -2.7806134 -2.0750432 -12.3028336
133 134 135 136 137 138
-24.3987990 -31.1884038 -34.3153875 -36.5962163 -45.3253259 -43.0643019
139 140 141 142 143 144
-33.5256038 -29.1914913 -28.9376846 -21.0490201 -16.3535999 -13.3634884
145
-14.4511788
> postscript(file="/var/www/html/rcomp/tmp/6nvte1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 145
Frequency = 1
lag(myerror, k = 1) myerror
0 -51.4315125 NA
1 -47.4145452 -51.4315125
2 -41.6552182 -47.4145452
3 -35.5884182 -41.6552182
4 -27.2505384 -35.5884182
5 -17.4277336 -27.2505384
6 -19.5562923 -17.4277336
7 -13.1121798 -19.5562923
8 -8.3982730 -13.1121798
9 -6.2236711 -8.3982730
10 -25.7051904 -6.2236711
11 -37.9285904 -25.7051904
12 -29.4662865 -37.9285904
13 -16.8609663 -29.4662865
14 -11.0205654 -16.8609663
15 -5.3870538 -11.0205654
16 -5.4042827 -5.3870538
17 -0.6470817 -5.4042827
18 7.6525010 -0.6470817
19 1.7145991 7.6525010
20 8.0791068 1.7145991
21 2.8559904 8.0791068
22 5.5317721 2.8559904
23 3.0309375 5.5317721
24 14.6941318 3.0309375
25 30.4438481 14.6941318
26 49.9279885 30.4438481
27 41.2980443 49.9279885
28 55.9021010 41.2980443
29 63.4077827 55.9021010
30 65.3995414 63.4077827
31 58.8944606 65.3995414
32 54.5810327 58.8944606
33 56.3208491 54.5810327
34 61.7277827 56.3208491
35 52.1180721 61.7277827
36 59.2796693 52.1180721
37 45.9359020 59.2796693
38 44.0681337 45.9359020
39 44.3628471 44.0681337
40 25.6832923 44.3628471
41 21.7068539 25.6832923
42 33.4272770 21.7068539
43 32.5115731 33.4272770
44 25.3897981 32.5115731
45 19.9154241 25.3897981
46 7.3333260 19.9154241
47 -3.8446759 7.3333260
48 1.3743558 -3.8446759
49 6.4894145 1.3743558
50 13.7291923 6.4894145
51 7.9654693 13.7291923
52 6.5711231 7.9654693
53 12.4090808 6.5711231
54 5.2797654 12.4090808
55 -0.9865173 5.2797654
56 -12.4716423 -0.9865173
57 -26.2997615 -12.4716423
58 -27.9074355 -26.2997615
59 -43.2582923 -27.9074355
60 -33.3810692 -43.2582923
61 -28.3755653 -33.3810692
62 -37.8993269 -28.3755653
63 -45.3509798 -37.8993269
64 -48.2726548 -45.3509798
65 -50.4253202 -48.2726548
66 -41.0812077 -50.4253202
67 -40.7885865 -41.0812077
68 -36.9372730 -40.7885865
69 -34.1830884 -36.9372730
70 -34.1501057 -34.1830884
71 -37.3430327 -34.1501057
72 -31.1590538 -37.3430327
73 -29.3531327 -31.1590538
74 -24.8923423 -29.3531327
75 -23.6483913 -24.8923423
76 -21.5597269 -23.6483913
77 -24.5158480 -21.5597269
78 -22.4497990 -24.5158480
79 -23.8662375 -22.4497990
80 -22.5289028 -23.8662375
81 -24.2510509 -22.5289028
82 -26.0449298 -24.2510509
83 -23.1850798 -26.0449298
84 -22.1760480 -23.1850798
85 -19.6325086 -22.1760480
86 -17.8646009 -19.6325086
87 -15.6524250 -17.8646009
88 -12.6249903 -15.6524250
89 -13.4213230 -12.6249903
90 -15.0514509 -13.4213230
91 -9.7865259 -15.0514509
92 -2.0836701 -9.7865259
93 2.2615664 -2.0836701
94 0.5029741 2.2615664
95 7.2734250 0.5029741
96 5.1921452 7.2734250
97 8.1568866 5.1921452
98 12.9323683 8.1568866
99 16.5283337 12.9323683
100 17.4028356 16.5283337
101 19.2520789 17.4028356
102 21.3082116 19.2520789
103 14.2493914 21.3082116
104 15.6485847 14.2493914
105 18.0070097 15.6485847
106 20.2366366 18.0070097
107 22.3333981 20.2366366
108 26.8562750 22.3333981
109 24.7393693 26.8562750
110 30.5812174 24.7393693
111 32.3443779 30.5812174
112 28.2389577 32.3443779
113 30.8214510 28.2389577
114 37.1659029 30.8214510
115 40.5458529 37.1659029
116 42.0619077 40.5458529
117 35.4485020 42.0619077
118 33.0492250 35.4485020
119 36.4237106 33.0492250
120 38.5621356 36.4237106
121 33.6455693 38.5621356
122 31.5088472 33.6455693
123 12.7491308 31.5088472
124 9.7485741 12.7491308
125 3.4434491 9.7485741
126 12.1028702 3.4434491
127 10.2524808 12.1028702
128 -0.4867288 10.2524808
129 -2.7806134 -0.4867288
130 -2.0750432 -2.7806134
131 -12.3028336 -2.0750432
132 -24.3987990 -12.3028336
133 -31.1884038 -24.3987990
134 -34.3153875 -31.1884038
135 -36.5962163 -34.3153875
136 -45.3253259 -36.5962163
137 -43.0643019 -45.3253259
138 -33.5256038 -43.0643019
139 -29.1914913 -33.5256038
140 -28.9376846 -29.1914913
141 -21.0490201 -28.9376846
142 -16.3535999 -21.0490201
143 -13.3634884 -16.3535999
144 -14.4511788 -13.3634884
145 NA -14.4511788
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -47.4145452 -51.4315125
[2,] -41.6552182 -47.4145452
[3,] -35.5884182 -41.6552182
[4,] -27.2505384 -35.5884182
[5,] -17.4277336 -27.2505384
[6,] -19.5562923 -17.4277336
[7,] -13.1121798 -19.5562923
[8,] -8.3982730 -13.1121798
[9,] -6.2236711 -8.3982730
[10,] -25.7051904 -6.2236711
[11,] -37.9285904 -25.7051904
[12,] -29.4662865 -37.9285904
[13,] -16.8609663 -29.4662865
[14,] -11.0205654 -16.8609663
[15,] -5.3870538 -11.0205654
[16,] -5.4042827 -5.3870538
[17,] -0.6470817 -5.4042827
[18,] 7.6525010 -0.6470817
[19,] 1.7145991 7.6525010
[20,] 8.0791068 1.7145991
[21,] 2.8559904 8.0791068
[22,] 5.5317721 2.8559904
[23,] 3.0309375 5.5317721
[24,] 14.6941318 3.0309375
[25,] 30.4438481 14.6941318
[26,] 49.9279885 30.4438481
[27,] 41.2980443 49.9279885
[28,] 55.9021010 41.2980443
[29,] 63.4077827 55.9021010
[30,] 65.3995414 63.4077827
[31,] 58.8944606 65.3995414
[32,] 54.5810327 58.8944606
[33,] 56.3208491 54.5810327
[34,] 61.7277827 56.3208491
[35,] 52.1180721 61.7277827
[36,] 59.2796693 52.1180721
[37,] 45.9359020 59.2796693
[38,] 44.0681337 45.9359020
[39,] 44.3628471 44.0681337
[40,] 25.6832923 44.3628471
[41,] 21.7068539 25.6832923
[42,] 33.4272770 21.7068539
[43,] 32.5115731 33.4272770
[44,] 25.3897981 32.5115731
[45,] 19.9154241 25.3897981
[46,] 7.3333260 19.9154241
[47,] -3.8446759 7.3333260
[48,] 1.3743558 -3.8446759
[49,] 6.4894145 1.3743558
[50,] 13.7291923 6.4894145
[51,] 7.9654693 13.7291923
[52,] 6.5711231 7.9654693
[53,] 12.4090808 6.5711231
[54,] 5.2797654 12.4090808
[55,] -0.9865173 5.2797654
[56,] -12.4716423 -0.9865173
[57,] -26.2997615 -12.4716423
[58,] -27.9074355 -26.2997615
[59,] -43.2582923 -27.9074355
[60,] -33.3810692 -43.2582923
[61,] -28.3755653 -33.3810692
[62,] -37.8993269 -28.3755653
[63,] -45.3509798 -37.8993269
[64,] -48.2726548 -45.3509798
[65,] -50.4253202 -48.2726548
[66,] -41.0812077 -50.4253202
[67,] -40.7885865 -41.0812077
[68,] -36.9372730 -40.7885865
[69,] -34.1830884 -36.9372730
[70,] -34.1501057 -34.1830884
[71,] -37.3430327 -34.1501057
[72,] -31.1590538 -37.3430327
[73,] -29.3531327 -31.1590538
[74,] -24.8923423 -29.3531327
[75,] -23.6483913 -24.8923423
[76,] -21.5597269 -23.6483913
[77,] -24.5158480 -21.5597269
[78,] -22.4497990 -24.5158480
[79,] -23.8662375 -22.4497990
[80,] -22.5289028 -23.8662375
[81,] -24.2510509 -22.5289028
[82,] -26.0449298 -24.2510509
[83,] -23.1850798 -26.0449298
[84,] -22.1760480 -23.1850798
[85,] -19.6325086 -22.1760480
[86,] -17.8646009 -19.6325086
[87,] -15.6524250 -17.8646009
[88,] -12.6249903 -15.6524250
[89,] -13.4213230 -12.6249903
[90,] -15.0514509 -13.4213230
[91,] -9.7865259 -15.0514509
[92,] -2.0836701 -9.7865259
[93,] 2.2615664 -2.0836701
[94,] 0.5029741 2.2615664
[95,] 7.2734250 0.5029741
[96,] 5.1921452 7.2734250
[97,] 8.1568866 5.1921452
[98,] 12.9323683 8.1568866
[99,] 16.5283337 12.9323683
[100,] 17.4028356 16.5283337
[101,] 19.2520789 17.4028356
[102,] 21.3082116 19.2520789
[103,] 14.2493914 21.3082116
[104,] 15.6485847 14.2493914
[105,] 18.0070097 15.6485847
[106,] 20.2366366 18.0070097
[107,] 22.3333981 20.2366366
[108,] 26.8562750 22.3333981
[109,] 24.7393693 26.8562750
[110,] 30.5812174 24.7393693
[111,] 32.3443779 30.5812174
[112,] 28.2389577 32.3443779
[113,] 30.8214510 28.2389577
[114,] 37.1659029 30.8214510
[115,] 40.5458529 37.1659029
[116,] 42.0619077 40.5458529
[117,] 35.4485020 42.0619077
[118,] 33.0492250 35.4485020
[119,] 36.4237106 33.0492250
[120,] 38.5621356 36.4237106
[121,] 33.6455693 38.5621356
[122,] 31.5088472 33.6455693
[123,] 12.7491308 31.5088472
[124,] 9.7485741 12.7491308
[125,] 3.4434491 9.7485741
[126,] 12.1028702 3.4434491
[127,] 10.2524808 12.1028702
[128,] -0.4867288 10.2524808
[129,] -2.7806134 -0.4867288
[130,] -2.0750432 -2.7806134
[131,] -12.3028336 -2.0750432
[132,] -24.3987990 -12.3028336
[133,] -31.1884038 -24.3987990
[134,] -34.3153875 -31.1884038
[135,] -36.5962163 -34.3153875
[136,] -45.3253259 -36.5962163
[137,] -43.0643019 -45.3253259
[138,] -33.5256038 -43.0643019
[139,] -29.1914913 -33.5256038
[140,] -28.9376846 -29.1914913
[141,] -21.0490201 -28.9376846
[142,] -16.3535999 -21.0490201
[143,] -13.3634884 -16.3535999
[144,] -14.4511788 -13.3634884
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -47.4145452 -51.4315125
2 -41.6552182 -47.4145452
3 -35.5884182 -41.6552182
4 -27.2505384 -35.5884182
5 -17.4277336 -27.2505384
6 -19.5562923 -17.4277336
7 -13.1121798 -19.5562923
8 -8.3982730 -13.1121798
9 -6.2236711 -8.3982730
10 -25.7051904 -6.2236711
11 -37.9285904 -25.7051904
12 -29.4662865 -37.9285904
13 -16.8609663 -29.4662865
14 -11.0205654 -16.8609663
15 -5.3870538 -11.0205654
16 -5.4042827 -5.3870538
17 -0.6470817 -5.4042827
18 7.6525010 -0.6470817
19 1.7145991 7.6525010
20 8.0791068 1.7145991
21 2.8559904 8.0791068
22 5.5317721 2.8559904
23 3.0309375 5.5317721
24 14.6941318 3.0309375
25 30.4438481 14.6941318
26 49.9279885 30.4438481
27 41.2980443 49.9279885
28 55.9021010 41.2980443
29 63.4077827 55.9021010
30 65.3995414 63.4077827
31 58.8944606 65.3995414
32 54.5810327 58.8944606
33 56.3208491 54.5810327
34 61.7277827 56.3208491
35 52.1180721 61.7277827
36 59.2796693 52.1180721
37 45.9359020 59.2796693
38 44.0681337 45.9359020
39 44.3628471 44.0681337
40 25.6832923 44.3628471
41 21.7068539 25.6832923
42 33.4272770 21.7068539
43 32.5115731 33.4272770
44 25.3897981 32.5115731
45 19.9154241 25.3897981
46 7.3333260 19.9154241
47 -3.8446759 7.3333260
48 1.3743558 -3.8446759
49 6.4894145 1.3743558
50 13.7291923 6.4894145
51 7.9654693 13.7291923
52 6.5711231 7.9654693
53 12.4090808 6.5711231
54 5.2797654 12.4090808
55 -0.9865173 5.2797654
56 -12.4716423 -0.9865173
57 -26.2997615 -12.4716423
58 -27.9074355 -26.2997615
59 -43.2582923 -27.9074355
60 -33.3810692 -43.2582923
61 -28.3755653 -33.3810692
62 -37.8993269 -28.3755653
63 -45.3509798 -37.8993269
64 -48.2726548 -45.3509798
65 -50.4253202 -48.2726548
66 -41.0812077 -50.4253202
67 -40.7885865 -41.0812077
68 -36.9372730 -40.7885865
69 -34.1830884 -36.9372730
70 -34.1501057 -34.1830884
71 -37.3430327 -34.1501057
72 -31.1590538 -37.3430327
73 -29.3531327 -31.1590538
74 -24.8923423 -29.3531327
75 -23.6483913 -24.8923423
76 -21.5597269 -23.6483913
77 -24.5158480 -21.5597269
78 -22.4497990 -24.5158480
79 -23.8662375 -22.4497990
80 -22.5289028 -23.8662375
81 -24.2510509 -22.5289028
82 -26.0449298 -24.2510509
83 -23.1850798 -26.0449298
84 -22.1760480 -23.1850798
85 -19.6325086 -22.1760480
86 -17.8646009 -19.6325086
87 -15.6524250 -17.8646009
88 -12.6249903 -15.6524250
89 -13.4213230 -12.6249903
90 -15.0514509 -13.4213230
91 -9.7865259 -15.0514509
92 -2.0836701 -9.7865259
93 2.2615664 -2.0836701
94 0.5029741 2.2615664
95 7.2734250 0.5029741
96 5.1921452 7.2734250
97 8.1568866 5.1921452
98 12.9323683 8.1568866
99 16.5283337 12.9323683
100 17.4028356 16.5283337
101 19.2520789 17.4028356
102 21.3082116 19.2520789
103 14.2493914 21.3082116
104 15.6485847 14.2493914
105 18.0070097 15.6485847
106 20.2366366 18.0070097
107 22.3333981 20.2366366
108 26.8562750 22.3333981
109 24.7393693 26.8562750
110 30.5812174 24.7393693
111 32.3443779 30.5812174
112 28.2389577 32.3443779
113 30.8214510 28.2389577
114 37.1659029 30.8214510
115 40.5458529 37.1659029
116 42.0619077 40.5458529
117 35.4485020 42.0619077
118 33.0492250 35.4485020
119 36.4237106 33.0492250
120 38.5621356 36.4237106
121 33.6455693 38.5621356
122 31.5088472 33.6455693
123 12.7491308 31.5088472
124 9.7485741 12.7491308
125 3.4434491 9.7485741
126 12.1028702 3.4434491
127 10.2524808 12.1028702
128 -0.4867288 10.2524808
129 -2.7806134 -0.4867288
130 -2.0750432 -2.7806134
131 -12.3028336 -2.0750432
132 -24.3987990 -12.3028336
133 -31.1884038 -24.3987990
134 -34.3153875 -31.1884038
135 -36.5962163 -34.3153875
136 -45.3253259 -36.5962163
137 -43.0643019 -45.3253259
138 -33.5256038 -43.0643019
139 -29.1914913 -33.5256038
140 -28.9376846 -29.1914913
141 -21.0490201 -28.9376846
142 -16.3535999 -21.0490201
143 -13.3634884 -16.3535999
144 -14.4511788 -13.3634884
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/7s6jj1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/8fdz51260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/9wh6u1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/html/rcomp/tmp/10243f1260702245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/1119p01260702245.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/12j0pz1260702245.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/13q6s81260702246.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/rcomp/tmp/14rnnr1260702246.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/rcomp/tmp/15gqsa1260702246.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/rcomp/tmp/16syz71260702246.tab")
+ }
>
> try(system("convert tmp/14v5l1260702245.ps tmp/14v5l1260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/21cfk1260702245.ps tmp/21cfk1260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/3bio41260702245.ps tmp/3bio41260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/45xau1260702245.ps tmp/45xau1260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/5pobf1260702245.ps tmp/5pobf1260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/6nvte1260702245.ps tmp/6nvte1260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/7s6jj1260702245.ps tmp/7s6jj1260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/8fdz51260702245.ps tmp/8fdz51260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/9wh6u1260702245.ps tmp/9wh6u1260702245.png",intern=TRUE))
character(0)
> try(system("convert tmp/10243f1260702245.ps tmp/10243f1260702245.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
3.466 1.675 4.123