R version 2.8.0 (2008-10-20)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(2
+ ,9
+ ,2
+ ,1
+ ,4
+ ,3
+ ,3
+ ,3
+ ,3
+ ,3
+ ,9
+ ,2
+ ,3
+ ,4
+ ,3
+ ,3
+ ,4
+ ,3
+ ,3
+ ,9
+ ,4
+ ,2
+ ,3
+ ,4
+ ,4
+ ,4
+ ,3
+ ,3
+ ,9
+ ,3
+ ,3
+ ,2
+ ,3
+ ,3
+ ,3
+ ,3
+ ,3
+ ,9
+ ,3
+ ,2
+ ,3
+ ,3
+ ,2
+ ,2
+ ,2
+ ,3
+ ,9
+ ,1
+ ,2
+ ,4
+ ,3
+ ,3
+ ,2
+ ,2
+ ,2
+ ,9
+ ,4
+ ,4
+ ,5
+ ,4
+ ,4
+ ,5
+ ,4
+ ,3
+ ,9
+ ,2
+ ,2
+ ,4
+ ,2
+ ,2
+ ,3
+ ,2
+ ,3
+ ,9
+ ,2
+ ,2
+ ,4
+ ,4
+ ,3
+ ,2
+ ,3
+ ,4
+ ,9
+ ,2
+ ,2
+ ,2
+ ,2
+ ,2
+ ,2
+ ,2
+ ,3
+ ,9
+ ,4
+ ,2
+ ,2
+ ,3
+ ,2
+ ,4
+ ,4
+ ,3
+ ,9
+ ,3
+ ,3
+ ,4
+ ,3
+ ,2
+ ,3
+ ,3
+ ,2
+ ,9
+ ,3
+ ,2
+ ,4
+ ,4
+ ,4
+ ,3
+ ,3
+ ,3
+ ,9
+ ,2
+ ,2
+ ,5
+ ,3
+ ,4
+ ,2
+ ,3
+ ,9
+ ,3
+ ,3
+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
+ ,5
+ ,5
+ ,4
+ ,2
+ ,10
+ ,3
+ ,3
+ ,4
+ ,3
+ ,4
+ ,4
+ ,4
+ ,2
+ ,10
+ ,4
+ ,4
+ ,4
+ ,4
+ ,4
+ ,4
+ ,3
+ ,3
+ ,10
+ ,4
+ ,3
+ ,4
+ ,3
+ ,3
+ ,3
+ ,3
+ ,2
+ ,10
+ ,4
+ ,3
+ ,4
+ ,4
+ ,4
+ ,4
+ ,4
+ ,3
+ ,10
+ ,2
+ ,2
+ ,3
+ ,3
+ ,2
+ ,3
+ ,2
+ ,3
+ ,10
+ ,3
+ ,3
+ ,3
+ ,4
+ ,4
+ ,4
+ ,3
+ ,3
+ ,10
+ ,3
+ ,3
+ ,4
+ ,3
+ ,4
+ ,4
+ ,4
+ ,3
+ ,10
+ ,1
+ ,1
+ ,3
+ ,3
+ ,3
+ ,4
+ ,2)
+ ,dim=c(9
+ ,156)
+ ,dimnames=list(c('Y'
+ ,'month'
+ ,'X1t'
+ ,'X2t'
+ ,'X3t'
+ ,'X4t'
+ ,'X5t'
+ ,'X6t'
+ ,'X7t')
+ ,1:156))
> y <- array(NA,dim=c(9,156),dimnames=list(c('Y','month','X1t','X2t','X3t','X4t','X5t','X6t','X7t'),1:156))
> 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 month X1t X2t X3t X4t X5t X6t X7t
1 2 9 2 1 4 3 3 3 3
2 3 9 2 3 4 3 3 4 3
3 3 9 4 2 3 4 4 4 3
4 3 9 3 3 2 3 3 3 3
5 3 9 3 2 3 3 2 2 2
6 3 9 1 2 4 3 3 2 2
7 2 9 4 4 5 4 4 5 4
8 3 9 2 2 4 2 2 3 2
9 3 9 2 2 4 4 3 2 3
10 4 9 2 2 2 2 2 2 2
11 3 9 4 2 2 3 2 4 4
12 3 9 3 3 4 3 2 3 3
13 2 9 3 2 4 4 4 3 3
14 3 9 2 2 5 3 4 2 3
15 9 3 3 5 3 3 4 3 3
16 9 2 2 4 3 2 2 2 3
17 9 3 3 3 3 3 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10
69 3 3 4 3 4 4 4 4 10
70 1 1 5 2 1 1 1 2 10
71 3 2 3 3 4 4 4 3 10
72 3 2 4 3 3 4 4 4 10
73 3 2 3 4 3 3 3 2 10
74 4 2 2 4 2 5 2 3 10
75 3 3 4 3 3 3 3 3 10
76 4 2 4 3 3 3 3 3 10
77 3 2 5 3 3 3 3 3 10
78 3 2 2 3 4 4 3 2 10
79 2 2 4 4 3 4 4 4 10
80 1 1 4 2 1 3 2 4 10
81 2 2 4 3 3 3 2 10 3
82 3 3 3 3 3 2 10 3 3
83 4 4 4 4 3 4 10 2 3
84 3 3 3 2 2 3 10 2 1
85 4 3 4 4 2 3 10 3 3
86 5 3 3 3 3 3 10 2 2
87 2 3 2 2 2 3 10 3 2
88 2 4 3 4 3 2 10 4 4
89 4 4 4 4 3 4 10 2 2
90 4 3 3 3 3 3 10 3 3
91 3 4 4 4 3 4 10 3 3
92 4 4 3 4 4 2 10 4 3
93 4 4 4 4 4 2 10 3 3
94 4 3 4 3 4 3 10 2 3
95 4 3 3 3 3 3 10 2 2
96 4 2 2 4 2 3 10 3 3
97 2 3 1 5 3 4 10 2 1
98 4 3 2 3 2 2 10 3 2
99 4 4 2 4 3 3 10 3 3
100 4 3 3 4 3 2 10 4 3
101 4 4 4 4 4 2 10 4 3
102 4 3 4 4 3 3 10 3 3
103 5 3 5 5 3 3 10 1 2
104 4 3 2 4 2 5 10 1 1
105 4 3 1 3 1 2 10 4 4
106 4 4 3 4 3 4 10 2 1
107 3 3 3 4 3 3 10 4 4
108 4 4 4 4 4 4 10 2 1
109 4 3 2 4 2 4 10 2 2
110 4 3 2 4 3 10 3 2 4
111 3 2 4 3 3 10 4 3 3
112 3 3 3 4 3 10 3 3 4
113 3 3 4 3 3 10 3 3 4
114 3 4 4 4 2 10 4 3 4
115 4 4 4 4 2 10 2 4 5
116 3 4 4 3 2 10 3 3 4
117 3 4 4 3 2 10 3 3 4
118 4 2 4 3 1 10 3 3 4
119 3 3 4 3 2 10 2 2 4
120 3 3 3 3 3 10 2 2 4
121 3 3 4 3 3 10 2 3 4
122 3 4 3 3 4 10 2 2 4
123 3 3 3 3 3 10 4 2 4
124 3 4 4 4 2 10 3 3 4
125 4 4 4 3 3 10 2 3 4
126 3 3 4 2 2 10 4 4 4
127 4 4 4 4 3 10 3 3 4
128 3 3 3 3 3 10 2 3 3
129 4 3 3 3 5 10 1 3 1
130 1 1 1 1 2 10 4 4 4
131 4 4 4 4 2 10 3 3 4
132 3 4 3 3 3 10 2 2 4
133 4 2 4 2 1 10 2 4 4
134 4 2 4 2 3 10 3 3 4
135 4 4 3 4 3 10 2 2 4
136 3 3 4 3 3 10 3 3 4
137 3 4 4 4 4 10 2 1 4
138 3 2 2 2 1 10 3 3 4
139 4 5 4 4 2 10 3 2 3
140 3 3 3 4 4 10 2 2 4
141 3 4 3 3 2 10 3 3 4
142 3 3 4 3 2 10 2 2 4
143 4 4 4 3 4 10 2 2 4
144 2 2 2 2 3 10 2 2 4
145 3 3 3 3 3 10 3 3 4
146 3 1 3 3 4 10 2 3 4
147 3 2 3 3 1 10 3 3 5
148 3 5 5 4 2 10 3 3 4
149 3 4 4 4 2 10 4 4 4
150 4 4 4 3 3 10 4 3 4
151 3 3 3 3 2 10 4 3 4
152 4 4 4 4 3 10 2 2 3
153 3 2 3 2 3 10 3 3 3
154 4 4 4 3 3 10 3 3 4
155 3 4 4 4 3 10 1 1 3
156 3 3 4 2 2 9 2 1 4
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) month X1t X2t X3t X4t
9.44285 -0.47492 -0.15118 1.09641 0.19319 -0.41887
X5t X6t X7t
-0.49951 -0.05971 -0.59600
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.116335 -0.669034 -0.006143 0.685510 5.686900
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.44285 0.89761 10.520 < 2e-16 ***
month -0.47492 0.06702 -7.086 5.33e-11 ***
X1t -0.15118 0.14058 -1.075 0.284
X2t 1.09641 0.15341 7.147 3.83e-11 ***
X3t 0.19319 0.12783 1.511 0.133
X4t -0.41887 0.04244 -9.871 < 2e-16 ***
X5t -0.49951 0.04729 -10.562 < 2e-16 ***
X6t -0.05971 0.11195 -0.533 0.595
X7t -0.59600 0.05143 -11.588 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.336 on 147 degrees of freedom
Multiple R-squared: 0.6936, Adjusted R-squared: 0.677
F-statistic: 41.6 on 8 and 147 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.0533434299 1.066869e-01 9.466566e-01
[2,] 0.0174393670 3.487873e-02 9.825606e-01
[3,] 0.0248581712 4.971634e-02 9.751418e-01
[4,] 0.0087271420 1.745428e-02 9.912729e-01
[5,] 0.0055637814 1.112756e-02 9.944362e-01
[6,] 0.0062622124 1.252442e-02 9.937378e-01
[7,] 0.0027755631 5.551126e-03 9.972244e-01
[8,] 0.0012287968 2.457594e-03 9.987712e-01
[9,] 0.0004640898 9.281796e-04 9.995359e-01
[10,] 0.0020415213 4.083043e-03 9.979585e-01
[11,] 0.0103638980 2.072780e-02 9.896361e-01
[12,] 0.0086356724 1.727134e-02 9.913643e-01
[13,] 0.0061092350 1.221847e-02 9.938908e-01
[14,] 0.0033820740 6.764148e-03 9.966179e-01
[15,] 0.0030573899 6.114780e-03 9.969426e-01
[16,] 0.0023841218 4.768244e-03 9.976159e-01
[17,] 0.0020550450 4.110090e-03 9.979450e-01
[18,] 0.0011767710 2.353542e-03 9.988232e-01
[19,] 0.0008223644 1.644729e-03 9.991776e-01
[20,] 0.0005492792 1.098558e-03 9.994507e-01
[21,] 0.0005087985 1.017597e-03 9.994912e-01
[22,] 0.0006137396 1.227479e-03 9.993863e-01
[23,] 0.0005829679 1.165936e-03 9.994170e-01
[24,] 0.0007642253 1.528451e-03 9.992358e-01
[25,] 0.0007904625 1.580925e-03 9.992095e-01
[26,] 0.0008621940 1.724388e-03 9.991378e-01
[27,] 0.0013691359 2.738272e-03 9.986309e-01
[28,] 0.0030758770 6.151754e-03 9.969241e-01
[29,] 0.0326589731 6.531795e-02 9.673410e-01
[30,] 0.4008681663 8.017363e-01 5.991318e-01
[31,] 0.9997538086 4.923827e-04 2.461914e-04
[32,] 0.9999831517 3.369658e-05 1.684829e-05
[33,] 0.9999960992 7.801612e-06 3.900806e-06
[34,] 0.9999948056 1.038881e-05 5.194407e-06
[35,] 0.9999935073 1.298547e-05 6.492734e-06
[36,] 0.9999959869 8.026192e-06 4.013096e-06
[37,] 0.9999929005 1.419903e-05 7.099517e-06
[38,] 0.9999930205 1.395908e-05 6.979539e-06
[39,] 0.9999886452 2.270970e-05 1.135485e-05
[40,] 0.9999844733 3.105348e-05 1.552674e-05
[41,] 0.9999936196 1.276090e-05 6.380448e-06
[42,] 0.9999914881 1.702378e-05 8.511891e-06
[43,] 0.9999896296 2.074078e-05 1.037039e-05
[44,] 0.9999894399 2.112030e-05 1.056015e-05
[45,] 0.9999858644 2.827121e-05 1.413561e-05
[46,] 0.9999824322 3.513564e-05 1.756782e-05
[47,] 0.9999716215 5.675699e-05 2.837850e-05
[48,] 0.9999895298 2.094030e-05 1.047015e-05
[49,] 0.9999984492 3.101625e-06 1.550812e-06
[50,] 0.9999984465 3.107022e-06 1.553511e-06
[51,] 0.9999976191 4.761792e-06 2.380896e-06
[52,] 0.9999985123 2.975349e-06 1.487675e-06
[53,] 0.9999983561 3.287829e-06 1.643914e-06
[54,] 0.9999978598 4.280335e-06 2.140167e-06
[55,] 0.9999961863 7.627328e-06 3.813664e-06
[56,] 0.9999965706 6.858851e-06 3.429426e-06
[57,] 0.9999950155 9.968953e-06 4.984476e-06
[58,] 0.9999919536 1.609289e-05 8.046445e-06
[59,] 0.9999964326 7.134733e-06 3.567366e-06
[60,] 0.9999941496 1.170082e-05 5.850409e-06
[61,] 0.9999901387 1.972255e-05 9.861276e-06
[62,] 0.9999856577 2.868460e-05 1.434230e-05
[63,] 0.9999917267 1.654656e-05 8.273278e-06
[64,] 0.9999888144 2.237123e-05 1.118561e-05
[65,] 0.9999956074 8.785142e-06 4.392571e-06
[66,] 0.9999933591 1.328187e-05 6.640936e-06
[67,] 0.9999950081 9.983786e-06 4.991893e-06
[68,] 0.9999964493 7.101437e-06 3.550719e-06
[69,] 0.9999981957 3.608585e-06 1.804292e-06
[70,] 0.9999998607 2.786971e-07 1.393486e-07
[71,] 0.9999999989 2.116066e-09 1.058033e-09
[72,] 0.9999999993 1.396384e-09 6.981920e-10
[73,] 0.9999999995 1.012494e-09 5.062470e-10
[74,] 0.9999999991 1.887697e-09 9.438485e-10
[75,] 0.9999999995 9.130064e-10 4.565032e-10
[76,] 0.9999999999 2.518299e-10 1.259150e-10
[77,] 1.0000000000 1.011533e-11 5.057663e-12
[78,] 1.0000000000 1.873757e-11 9.368785e-12
[79,] 1.0000000000 4.012819e-11 2.006409e-11
[80,] 1.0000000000 2.689173e-11 1.344587e-11
[81,] 1.0000000000 6.783645e-11 3.391822e-11
[82,] 0.9999999999 1.491018e-10 7.455092e-11
[83,] 0.9999999998 3.628428e-10 1.814214e-10
[84,] 0.9999999996 8.235705e-10 4.117853e-10
[85,] 0.9999999993 1.336753e-09 6.683766e-10
[86,] 1.0000000000 1.663347e-12 8.316733e-13
[87,] 1.0000000000 4.426590e-12 2.213295e-12
[88,] 1.0000000000 1.085707e-11 5.428533e-12
[89,] 1.0000000000 2.945051e-11 1.472526e-11
[90,] 1.0000000000 7.070242e-11 3.535121e-11
[91,] 0.9999999999 1.821710e-10 9.108549e-11
[92,] 0.9999999998 3.141391e-10 1.570695e-10
[93,] 0.9999999998 4.741477e-10 2.370738e-10
[94,] 0.9999999998 3.837676e-10 1.918838e-10
[95,] 0.9999999996 8.947652e-10 4.473826e-10
[96,] 0.9999999995 1.046964e-09 5.234819e-10
[97,] 0.9999999991 1.842178e-09 9.210888e-10
[98,] 0.9999999978 4.302308e-09 2.151154e-09
[99,] 0.9999999997 5.376000e-10 2.688000e-10
[100,] 0.9999999994 1.144710e-09 5.723552e-10
[101,] 0.9999999987 2.626130e-09 1.313065e-09
[102,] 0.9999999972 5.524126e-09 2.762063e-09
[103,] 0.9999999941 1.181182e-08 5.905912e-09
[104,] 0.9999999876 2.484352e-08 1.242176e-08
[105,] 0.9999999752 4.965036e-08 2.482518e-08
[106,] 0.9999999528 9.446447e-08 4.723223e-08
[107,] 0.9999999418 1.164191e-07 5.820957e-08
[108,] 0.9999998744 2.511507e-07 1.255753e-07
[109,] 0.9999996941 6.117711e-07 3.058856e-07
[110,] 0.9999995319 9.361664e-07 4.680832e-07
[111,] 0.9999988955 2.209079e-06 1.104539e-06
[112,] 0.9999975651 4.869783e-06 2.434892e-06
[113,] 0.9999959294 8.141234e-06 4.070617e-06
[114,] 0.9999905357 1.892863e-05 9.464317e-06
[115,] 0.9999846194 3.076123e-05 1.538062e-05
[116,] 0.9999685250 6.295010e-05 3.147505e-05
[117,] 0.9999388867 1.222267e-04 6.111335e-05
[118,] 0.9998956453 2.087094e-04 1.043547e-04
[119,] 0.9999530670 9.386609e-05 4.693304e-05
[120,] 0.9999209310 1.581379e-04 7.906895e-05
[121,] 0.9998173163 3.653674e-04 1.826837e-04
[122,] 0.9997210449 5.579101e-04 2.789551e-04
[123,] 0.9997193688 5.612623e-04 2.806312e-04
[124,] 0.9997328289 5.343422e-04 2.671711e-04
[125,] 0.9994082663 1.183467e-03 5.917337e-04
[126,] 0.9989731955 2.053609e-03 1.026804e-03
[127,] 0.9986928651 2.614270e-03 1.307135e-03
[128,] 0.9975923134 4.815373e-03 2.407687e-03
[129,] 0.9942141465 1.157171e-02 5.785853e-03
[130,] 0.9875011152 2.499777e-02 1.249888e-02
[131,] 0.9683165192 6.336696e-02 3.168348e-02
[132,] 0.9244682364 1.510635e-01 7.553176e-02
[133,] 0.8800283608 2.399433e-01 1.199716e-01
> postscript(file="/var/www/html/freestat/rcomp/tmp/142fh1291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/242fh1291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/3wbe21291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/4wbe21291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/5wbe21291333157.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 = 156
Frequency = 1
1 2 3 4 5
-0.0130813809 -1.1461845772 1.3641538494 -0.6683362218 -0.9203330478
6 7 8 9 10
-0.9163788160 -1.5593284428 -1.6238661131 0.2496744592 -0.2971993944
11 12 13 14 15
0.7354550333 -1.5542197515 -0.0399270931 0.1371185796 0.5956299861
16 17 18 19 20
-0.4116640243 2.2889376334 1.3217233559 0.3775229044 1.8408604340
21 22 23 24 25
-0.7153872617 2.3926445213 0.5418429031 -0.5887888934 1.0154058507
26 27 28 29 30
2.5137198635 1.0186101290 1.9445673219 1.4997507048 1.8279046841
31 32 33 34 35
1.7156783337 1.1311660086 2.0334817675 0.1475527867 -1.5439499009
36 37 38 39 40
1.9774322406 1.6920368998 1.3528544759 0.5965324660 2.4523551523
41 42 43 44 45
5.6868998073 -1.2009789049 -0.3206932946 -1.7651316239 0.1495868368
46 47 48 49 50
0.1663087534 -1.2489035273 -0.8767058273 -0.6247284533 -0.6614247360
51 52 53 54 55
1.2838797373 0.4540002834 -0.4000059676 -0.6696271901 0.0696061885
56 57 58 59 60
-0.3281823223 -1.6857701922 0.1494200172 -3.1707770577 2.3006016539
61 62 63 64 65
-1.5105782378 -0.2586151571 0.7331031925 0.1152802946 -0.1526972402
66 67 68 69 70
0.4435016402 0.1126008667 -0.4220326759 1.3970085676 -2.6002426370
71 72 73 74 75
0.7111933883 1.1152743308 -1.1701150463 0.2698432124 0.6121070467
76 77 78 79 80
1.1371841351 0.2883657718 0.0007949406 -0.9811325829 -1.2947500622
81 82 83 84 85
-5.1163354046 -0.6333924913 0.6743412819 -0.1766306566 0.0334442914
86 87 88 89 90
1.1297720087 -0.6721034085 -1.5991676085 0.0783430281 0.7854808935
91 92 93 94 95
-0.2659480871 -0.3883545372 -0.2968835315 0.6837632243 0.1297720087
96 97 98 99 100
-0.7438418937 -4.5425299611 -0.1873837069 0.0128152548 -0.6700887740
101 102 103 104 105
-0.2371729005 -0.1597443835 -0.8203891763 -0.7425899821 1.1063304699
106 107 108 109 110
-0.6688368624 -0.6552171354 -0.7108439006 -0.5057544821 -0.4902496008
111 112 113 114 115
-0.6031837682 -1.2793573332 -0.0317687828 0.0394420701 0.6961385948
116 117 118 119 120
0.6363428037 0.6363428037 0.8796856553 -0.3977969189 -0.7421672305
121 122 123 124 125
-0.5312749628 -0.4604329937 0.2568451295 -0.4600641099 0.9436479488
126 127 128 129 130
1.8170436167 0.3467472152 -1.2784548533 -2.3563348906 -0.4899402030
131 132 133 134 135
0.5399358901 -0.2672443188 1.5362970199 1.5897152192 -0.3636512325
136 137 138 139 140
-0.0317687828 -1.4653689017 0.6737292956 0.3591499169 -2.0317628190
141 142 143 144 145
0.4851611670 -0.3977969189 0.6907486430 -1.2718648652 -0.1829504195
146 147 148 149 150
-1.8254910977 0.3245022724 0.1660404384 0.0991527010 1.9426603089
151 152 153 154 155
0.5097444354 -0.8084678496 -0.1574646713 1.4431541288 -2.3676846606
156
0.2200259790
> postscript(file="/var/www/html/freestat/rcomp/tmp/67kvn1291333157.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 = 156
Frequency = 1
lag(myerror, k = 1) myerror
0 -0.0130813809 NA
1 -1.1461845772 -0.0130813809
2 1.3641538494 -1.1461845772
3 -0.6683362218 1.3641538494
4 -0.9203330478 -0.6683362218
5 -0.9163788160 -0.9203330478
6 -1.5593284428 -0.9163788160
7 -1.6238661131 -1.5593284428
8 0.2496744592 -1.6238661131
9 -0.2971993944 0.2496744592
10 0.7354550333 -0.2971993944
11 -1.5542197515 0.7354550333
12 -0.0399270931 -1.5542197515
13 0.1371185796 -0.0399270931
14 0.5956299861 0.1371185796
15 -0.4116640243 0.5956299861
16 2.2889376334 -0.4116640243
17 1.3217233559 2.2889376334
18 0.3775229044 1.3217233559
19 1.8408604340 0.3775229044
20 -0.7153872617 1.8408604340
21 2.3926445213 -0.7153872617
22 0.5418429031 2.3926445213
23 -0.5887888934 0.5418429031
24 1.0154058507 -0.5887888934
25 2.5137198635 1.0154058507
26 1.0186101290 2.5137198635
27 1.9445673219 1.0186101290
28 1.4997507048 1.9445673219
29 1.8279046841 1.4997507048
30 1.7156783337 1.8279046841
31 1.1311660086 1.7156783337
32 2.0334817675 1.1311660086
33 0.1475527867 2.0334817675
34 -1.5439499009 0.1475527867
35 1.9774322406 -1.5439499009
36 1.6920368998 1.9774322406
37 1.3528544759 1.6920368998
38 0.5965324660 1.3528544759
39 2.4523551523 0.5965324660
40 5.6868998073 2.4523551523
41 -1.2009789049 5.6868998073
42 -0.3206932946 -1.2009789049
43 -1.7651316239 -0.3206932946
44 0.1495868368 -1.7651316239
45 0.1663087534 0.1495868368
46 -1.2489035273 0.1663087534
47 -0.8767058273 -1.2489035273
48 -0.6247284533 -0.8767058273
49 -0.6614247360 -0.6247284533
50 1.2838797373 -0.6614247360
51 0.4540002834 1.2838797373
52 -0.4000059676 0.4540002834
53 -0.6696271901 -0.4000059676
54 0.0696061885 -0.6696271901
55 -0.3281823223 0.0696061885
56 -1.6857701922 -0.3281823223
57 0.1494200172 -1.6857701922
58 -3.1707770577 0.1494200172
59 2.3006016539 -3.1707770577
60 -1.5105782378 2.3006016539
61 -0.2586151571 -1.5105782378
62 0.7331031925 -0.2586151571
63 0.1152802946 0.7331031925
64 -0.1526972402 0.1152802946
65 0.4435016402 -0.1526972402
66 0.1126008667 0.4435016402
67 -0.4220326759 0.1126008667
68 1.3970085676 -0.4220326759
69 -2.6002426370 1.3970085676
70 0.7111933883 -2.6002426370
71 1.1152743308 0.7111933883
72 -1.1701150463 1.1152743308
73 0.2698432124 -1.1701150463
74 0.6121070467 0.2698432124
75 1.1371841351 0.6121070467
76 0.2883657718 1.1371841351
77 0.0007949406 0.2883657718
78 -0.9811325829 0.0007949406
79 -1.2947500622 -0.9811325829
80 -5.1163354046 -1.2947500622
81 -0.6333924913 -5.1163354046
82 0.6743412819 -0.6333924913
83 -0.1766306566 0.6743412819
84 0.0334442914 -0.1766306566
85 1.1297720087 0.0334442914
86 -0.6721034085 1.1297720087
87 -1.5991676085 -0.6721034085
88 0.0783430281 -1.5991676085
89 0.7854808935 0.0783430281
90 -0.2659480871 0.7854808935
91 -0.3883545372 -0.2659480871
92 -0.2968835315 -0.3883545372
93 0.6837632243 -0.2968835315
94 0.1297720087 0.6837632243
95 -0.7438418937 0.1297720087
96 -4.5425299611 -0.7438418937
97 -0.1873837069 -4.5425299611
98 0.0128152548 -0.1873837069
99 -0.6700887740 0.0128152548
100 -0.2371729005 -0.6700887740
101 -0.1597443835 -0.2371729005
102 -0.8203891763 -0.1597443835
103 -0.7425899821 -0.8203891763
104 1.1063304699 -0.7425899821
105 -0.6688368624 1.1063304699
106 -0.6552171354 -0.6688368624
107 -0.7108439006 -0.6552171354
108 -0.5057544821 -0.7108439006
109 -0.4902496008 -0.5057544821
110 -0.6031837682 -0.4902496008
111 -1.2793573332 -0.6031837682
112 -0.0317687828 -1.2793573332
113 0.0394420701 -0.0317687828
114 0.6961385948 0.0394420701
115 0.6363428037 0.6961385948
116 0.6363428037 0.6363428037
117 0.8796856553 0.6363428037
118 -0.3977969189 0.8796856553
119 -0.7421672305 -0.3977969189
120 -0.5312749628 -0.7421672305
121 -0.4604329937 -0.5312749628
122 0.2568451295 -0.4604329937
123 -0.4600641099 0.2568451295
124 0.9436479488 -0.4600641099
125 1.8170436167 0.9436479488
126 0.3467472152 1.8170436167
127 -1.2784548533 0.3467472152
128 -2.3563348906 -1.2784548533
129 -0.4899402030 -2.3563348906
130 0.5399358901 -0.4899402030
131 -0.2672443188 0.5399358901
132 1.5362970199 -0.2672443188
133 1.5897152192 1.5362970199
134 -0.3636512325 1.5897152192
135 -0.0317687828 -0.3636512325
136 -1.4653689017 -0.0317687828
137 0.6737292956 -1.4653689017
138 0.3591499169 0.6737292956
139 -2.0317628190 0.3591499169
140 0.4851611670 -2.0317628190
141 -0.3977969189 0.4851611670
142 0.6907486430 -0.3977969189
143 -1.2718648652 0.6907486430
144 -0.1829504195 -1.2718648652
145 -1.8254910977 -0.1829504195
146 0.3245022724 -1.8254910977
147 0.1660404384 0.3245022724
148 0.0991527010 0.1660404384
149 1.9426603089 0.0991527010
150 0.5097444354 1.9426603089
151 -0.8084678496 0.5097444354
152 -0.1574646713 -0.8084678496
153 1.4431541288 -0.1574646713
154 -2.3676846606 1.4431541288
155 0.2200259790 -2.3676846606
156 NA 0.2200259790
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1.1461845772 -0.0130813809
[2,] 1.3641538494 -1.1461845772
[3,] -0.6683362218 1.3641538494
[4,] -0.9203330478 -0.6683362218
[5,] -0.9163788160 -0.9203330478
[6,] -1.5593284428 -0.9163788160
[7,] -1.6238661131 -1.5593284428
[8,] 0.2496744592 -1.6238661131
[9,] -0.2971993944 0.2496744592
[10,] 0.7354550333 -0.2971993944
[11,] -1.5542197515 0.7354550333
[12,] -0.0399270931 -1.5542197515
[13,] 0.1371185796 -0.0399270931
[14,] 0.5956299861 0.1371185796
[15,] -0.4116640243 0.5956299861
[16,] 2.2889376334 -0.4116640243
[17,] 1.3217233559 2.2889376334
[18,] 0.3775229044 1.3217233559
[19,] 1.8408604340 0.3775229044
[20,] -0.7153872617 1.8408604340
[21,] 2.3926445213 -0.7153872617
[22,] 0.5418429031 2.3926445213
[23,] -0.5887888934 0.5418429031
[24,] 1.0154058507 -0.5887888934
[25,] 2.5137198635 1.0154058507
[26,] 1.0186101290 2.5137198635
[27,] 1.9445673219 1.0186101290
[28,] 1.4997507048 1.9445673219
[29,] 1.8279046841 1.4997507048
[30,] 1.7156783337 1.8279046841
[31,] 1.1311660086 1.7156783337
[32,] 2.0334817675 1.1311660086
[33,] 0.1475527867 2.0334817675
[34,] -1.5439499009 0.1475527867
[35,] 1.9774322406 -1.5439499009
[36,] 1.6920368998 1.9774322406
[37,] 1.3528544759 1.6920368998
[38,] 0.5965324660 1.3528544759
[39,] 2.4523551523 0.5965324660
[40,] 5.6868998073 2.4523551523
[41,] -1.2009789049 5.6868998073
[42,] -0.3206932946 -1.2009789049
[43,] -1.7651316239 -0.3206932946
[44,] 0.1495868368 -1.7651316239
[45,] 0.1663087534 0.1495868368
[46,] -1.2489035273 0.1663087534
[47,] -0.8767058273 -1.2489035273
[48,] -0.6247284533 -0.8767058273
[49,] -0.6614247360 -0.6247284533
[50,] 1.2838797373 -0.6614247360
[51,] 0.4540002834 1.2838797373
[52,] -0.4000059676 0.4540002834
[53,] -0.6696271901 -0.4000059676
[54,] 0.0696061885 -0.6696271901
[55,] -0.3281823223 0.0696061885
[56,] -1.6857701922 -0.3281823223
[57,] 0.1494200172 -1.6857701922
[58,] -3.1707770577 0.1494200172
[59,] 2.3006016539 -3.1707770577
[60,] -1.5105782378 2.3006016539
[61,] -0.2586151571 -1.5105782378
[62,] 0.7331031925 -0.2586151571
[63,] 0.1152802946 0.7331031925
[64,] -0.1526972402 0.1152802946
[65,] 0.4435016402 -0.1526972402
[66,] 0.1126008667 0.4435016402
[67,] -0.4220326759 0.1126008667
[68,] 1.3970085676 -0.4220326759
[69,] -2.6002426370 1.3970085676
[70,] 0.7111933883 -2.6002426370
[71,] 1.1152743308 0.7111933883
[72,] -1.1701150463 1.1152743308
[73,] 0.2698432124 -1.1701150463
[74,] 0.6121070467 0.2698432124
[75,] 1.1371841351 0.6121070467
[76,] 0.2883657718 1.1371841351
[77,] 0.0007949406 0.2883657718
[78,] -0.9811325829 0.0007949406
[79,] -1.2947500622 -0.9811325829
[80,] -5.1163354046 -1.2947500622
[81,] -0.6333924913 -5.1163354046
[82,] 0.6743412819 -0.6333924913
[83,] -0.1766306566 0.6743412819
[84,] 0.0334442914 -0.1766306566
[85,] 1.1297720087 0.0334442914
[86,] -0.6721034085 1.1297720087
[87,] -1.5991676085 -0.6721034085
[88,] 0.0783430281 -1.5991676085
[89,] 0.7854808935 0.0783430281
[90,] -0.2659480871 0.7854808935
[91,] -0.3883545372 -0.2659480871
[92,] -0.2968835315 -0.3883545372
[93,] 0.6837632243 -0.2968835315
[94,] 0.1297720087 0.6837632243
[95,] -0.7438418937 0.1297720087
[96,] -4.5425299611 -0.7438418937
[97,] -0.1873837069 -4.5425299611
[98,] 0.0128152548 -0.1873837069
[99,] -0.6700887740 0.0128152548
[100,] -0.2371729005 -0.6700887740
[101,] -0.1597443835 -0.2371729005
[102,] -0.8203891763 -0.1597443835
[103,] -0.7425899821 -0.8203891763
[104,] 1.1063304699 -0.7425899821
[105,] -0.6688368624 1.1063304699
[106,] -0.6552171354 -0.6688368624
[107,] -0.7108439006 -0.6552171354
[108,] -0.5057544821 -0.7108439006
[109,] -0.4902496008 -0.5057544821
[110,] -0.6031837682 -0.4902496008
[111,] -1.2793573332 -0.6031837682
[112,] -0.0317687828 -1.2793573332
[113,] 0.0394420701 -0.0317687828
[114,] 0.6961385948 0.0394420701
[115,] 0.6363428037 0.6961385948
[116,] 0.6363428037 0.6363428037
[117,] 0.8796856553 0.6363428037
[118,] -0.3977969189 0.8796856553
[119,] -0.7421672305 -0.3977969189
[120,] -0.5312749628 -0.7421672305
[121,] -0.4604329937 -0.5312749628
[122,] 0.2568451295 -0.4604329937
[123,] -0.4600641099 0.2568451295
[124,] 0.9436479488 -0.4600641099
[125,] 1.8170436167 0.9436479488
[126,] 0.3467472152 1.8170436167
[127,] -1.2784548533 0.3467472152
[128,] -2.3563348906 -1.2784548533
[129,] -0.4899402030 -2.3563348906
[130,] 0.5399358901 -0.4899402030
[131,] -0.2672443188 0.5399358901
[132,] 1.5362970199 -0.2672443188
[133,] 1.5897152192 1.5362970199
[134,] -0.3636512325 1.5897152192
[135,] -0.0317687828 -0.3636512325
[136,] -1.4653689017 -0.0317687828
[137,] 0.6737292956 -1.4653689017
[138,] 0.3591499169 0.6737292956
[139,] -2.0317628190 0.3591499169
[140,] 0.4851611670 -2.0317628190
[141,] -0.3977969189 0.4851611670
[142,] 0.6907486430 -0.3977969189
[143,] -1.2718648652 0.6907486430
[144,] -0.1829504195 -1.2718648652
[145,] -1.8254910977 -0.1829504195
[146,] 0.3245022724 -1.8254910977
[147,] 0.1660404384 0.3245022724
[148,] 0.0991527010 0.1660404384
[149,] 1.9426603089 0.0991527010
[150,] 0.5097444354 1.9426603089
[151,] -0.8084678496 0.5097444354
[152,] -0.1574646713 -0.8084678496
[153,] 1.4431541288 -0.1574646713
[154,] -2.3676846606 1.4431541288
[155,] 0.2200259790 -2.3676846606
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1.1461845772 -0.0130813809
2 1.3641538494 -1.1461845772
3 -0.6683362218 1.3641538494
4 -0.9203330478 -0.6683362218
5 -0.9163788160 -0.9203330478
6 -1.5593284428 -0.9163788160
7 -1.6238661131 -1.5593284428
8 0.2496744592 -1.6238661131
9 -0.2971993944 0.2496744592
10 0.7354550333 -0.2971993944
11 -1.5542197515 0.7354550333
12 -0.0399270931 -1.5542197515
13 0.1371185796 -0.0399270931
14 0.5956299861 0.1371185796
15 -0.4116640243 0.5956299861
16 2.2889376334 -0.4116640243
17 1.3217233559 2.2889376334
18 0.3775229044 1.3217233559
19 1.8408604340 0.3775229044
20 -0.7153872617 1.8408604340
21 2.3926445213 -0.7153872617
22 0.5418429031 2.3926445213
23 -0.5887888934 0.5418429031
24 1.0154058507 -0.5887888934
25 2.5137198635 1.0154058507
26 1.0186101290 2.5137198635
27 1.9445673219 1.0186101290
28 1.4997507048 1.9445673219
29 1.8279046841 1.4997507048
30 1.7156783337 1.8279046841
31 1.1311660086 1.7156783337
32 2.0334817675 1.1311660086
33 0.1475527867 2.0334817675
34 -1.5439499009 0.1475527867
35 1.9774322406 -1.5439499009
36 1.6920368998 1.9774322406
37 1.3528544759 1.6920368998
38 0.5965324660 1.3528544759
39 2.4523551523 0.5965324660
40 5.6868998073 2.4523551523
41 -1.2009789049 5.6868998073
42 -0.3206932946 -1.2009789049
43 -1.7651316239 -0.3206932946
44 0.1495868368 -1.7651316239
45 0.1663087534 0.1495868368
46 -1.2489035273 0.1663087534
47 -0.8767058273 -1.2489035273
48 -0.6247284533 -0.8767058273
49 -0.6614247360 -0.6247284533
50 1.2838797373 -0.6614247360
51 0.4540002834 1.2838797373
52 -0.4000059676 0.4540002834
53 -0.6696271901 -0.4000059676
54 0.0696061885 -0.6696271901
55 -0.3281823223 0.0696061885
56 -1.6857701922 -0.3281823223
57 0.1494200172 -1.6857701922
58 -3.1707770577 0.1494200172
59 2.3006016539 -3.1707770577
60 -1.5105782378 2.3006016539
61 -0.2586151571 -1.5105782378
62 0.7331031925 -0.2586151571
63 0.1152802946 0.7331031925
64 -0.1526972402 0.1152802946
65 0.4435016402 -0.1526972402
66 0.1126008667 0.4435016402
67 -0.4220326759 0.1126008667
68 1.3970085676 -0.4220326759
69 -2.6002426370 1.3970085676
70 0.7111933883 -2.6002426370
71 1.1152743308 0.7111933883
72 -1.1701150463 1.1152743308
73 0.2698432124 -1.1701150463
74 0.6121070467 0.2698432124
75 1.1371841351 0.6121070467
76 0.2883657718 1.1371841351
77 0.0007949406 0.2883657718
78 -0.9811325829 0.0007949406
79 -1.2947500622 -0.9811325829
80 -5.1163354046 -1.2947500622
81 -0.6333924913 -5.1163354046
82 0.6743412819 -0.6333924913
83 -0.1766306566 0.6743412819
84 0.0334442914 -0.1766306566
85 1.1297720087 0.0334442914
86 -0.6721034085 1.1297720087
87 -1.5991676085 -0.6721034085
88 0.0783430281 -1.5991676085
89 0.7854808935 0.0783430281
90 -0.2659480871 0.7854808935
91 -0.3883545372 -0.2659480871
92 -0.2968835315 -0.3883545372
93 0.6837632243 -0.2968835315
94 0.1297720087 0.6837632243
95 -0.7438418937 0.1297720087
96 -4.5425299611 -0.7438418937
97 -0.1873837069 -4.5425299611
98 0.0128152548 -0.1873837069
99 -0.6700887740 0.0128152548
100 -0.2371729005 -0.6700887740
101 -0.1597443835 -0.2371729005
102 -0.8203891763 -0.1597443835
103 -0.7425899821 -0.8203891763
104 1.1063304699 -0.7425899821
105 -0.6688368624 1.1063304699
106 -0.6552171354 -0.6688368624
107 -0.7108439006 -0.6552171354
108 -0.5057544821 -0.7108439006
109 -0.4902496008 -0.5057544821
110 -0.6031837682 -0.4902496008
111 -1.2793573332 -0.6031837682
112 -0.0317687828 -1.2793573332
113 0.0394420701 -0.0317687828
114 0.6961385948 0.0394420701
115 0.6363428037 0.6961385948
116 0.6363428037 0.6363428037
117 0.8796856553 0.6363428037
118 -0.3977969189 0.8796856553
119 -0.7421672305 -0.3977969189
120 -0.5312749628 -0.7421672305
121 -0.4604329937 -0.5312749628
122 0.2568451295 -0.4604329937
123 -0.4600641099 0.2568451295
124 0.9436479488 -0.4600641099
125 1.8170436167 0.9436479488
126 0.3467472152 1.8170436167
127 -1.2784548533 0.3467472152
128 -2.3563348906 -1.2784548533
129 -0.4899402030 -2.3563348906
130 0.5399358901 -0.4899402030
131 -0.2672443188 0.5399358901
132 1.5362970199 -0.2672443188
133 1.5897152192 1.5362970199
134 -0.3636512325 1.5897152192
135 -0.0317687828 -0.3636512325
136 -1.4653689017 -0.0317687828
137 0.6737292956 -1.4653689017
138 0.3591499169 0.6737292956
139 -2.0317628190 0.3591499169
140 0.4851611670 -2.0317628190
141 -0.3977969189 0.4851611670
142 0.6907486430 -0.3977969189
143 -1.2718648652 0.6907486430
144 -0.1829504195 -1.2718648652
145 -1.8254910977 -0.1829504195
146 0.3245022724 -1.8254910977
147 0.1660404384 0.3245022724
148 0.0991527010 0.1660404384
149 1.9426603089 0.0991527010
150 0.5097444354 1.9426603089
151 -0.8084678496 0.5097444354
152 -0.1574646713 -0.8084678496
153 1.4431541288 -0.1574646713
154 -2.3676846606 1.4431541288
155 0.2200259790 -2.3676846606
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/7icvq1291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/8icvq1291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/freestat/rcomp/tmp/9icvq1291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/html/freestat/rcomp/tmp/10b3cb1291333157.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/freestat/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/freestat/rcomp/tmp/11w4az1291333157.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/freestat/rcomp/tmp/12zm941291333157.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/html/freestat/rcomp/tmp/13vw7v1291333157.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/html/freestat/rcomp/tmp/14henj1291333157.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/freestat/rcomp/tmp/15dpp21291333158.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/html/freestat/rcomp/tmp/16yq5q1291333158.tab")
+ }
>
> try(system("convert tmp/142fh1291333157.ps tmp/142fh1291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/242fh1291333157.ps tmp/242fh1291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/3wbe21291333157.ps tmp/3wbe21291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/4wbe21291333157.ps tmp/4wbe21291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/5wbe21291333157.ps tmp/5wbe21291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/67kvn1291333157.ps tmp/67kvn1291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/7icvq1291333157.ps tmp/7icvq1291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/8icvq1291333157.ps tmp/8icvq1291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/9icvq1291333157.ps tmp/9icvq1291333157.png",intern=TRUE))
character(0)
> try(system("convert tmp/10b3cb1291333157.ps tmp/10b3cb1291333157.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.961 2.634 6.351