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(15
+ ,2.1
+ ,14.4
+ ,2.1
+ ,13.5
+ ,2.6
+ ,12.8
+ ,2.6
+ ,12.3
+ ,2.7
+ ,12.2
+ ,2.5
+ ,14.5
+ ,2.4
+ ,17.2
+ ,1.9
+ ,18
+ ,2.2
+ ,18.1
+ ,1.9
+ ,18
+ ,2
+ ,18.3
+ ,2.2
+ ,18.7
+ ,2.5
+ ,18.6
+ ,2.5
+ ,18.3
+ ,2.7
+ ,17.9
+ ,2.6
+ ,17.4
+ ,2.3
+ ,17.4
+ ,2
+ ,20.1
+ ,2.3
+ ,23.2
+ ,2.9
+ ,24.2
+ ,2.5
+ ,24.2
+ ,2.5
+ ,23.9
+ ,2.3
+ ,23.8
+ ,2.5
+ ,23.8
+ ,2.3
+ ,23.3
+ ,2.4
+ ,22.4
+ ,2.2
+ ,21.5
+ ,2.4
+ ,20.5
+ ,2.6
+ ,19.9
+ ,2.8
+ ,22
+ ,2.8
+ ,24.9
+ ,2.5
+ ,25.7
+ ,2.5
+ ,25.3
+ ,2.2
+ ,24.4
+ ,2.1
+ ,23.8
+ ,1.9
+ ,23.5
+ ,1.9
+ ,23
+ ,1.7
+ ,22.2
+ ,1.7
+ ,21.4
+ ,1.6
+ ,20.3
+ ,1.4
+ ,19.5
+ ,1.1
+ ,21.7
+ ,0.8
+ ,24.7
+ ,0.9
+ ,25.3
+ ,1
+ ,24.9
+ ,1
+ ,24.1
+ ,1.1
+ ,23.4
+ ,1.3
+ ,23.1
+ ,1.4
+ ,22.4
+ ,1.4
+ ,21.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,18.6
+ ,1.8
+ ,19.9
+ ,1.8
+ ,19.2
+ ,1.3
+ ,18.4
+ ,1.3
+ ,21.1
+ ,1.3
+ ,20.5
+ ,1.2
+ ,19.1
+ ,1.4
+ ,18.1
+ ,2.2
+ ,17
+ ,2.9
+ ,17.1
+ ,3.1
+ ,17.4
+ ,3.5
+ ,16.8
+ ,3.6
+ ,15.3
+ ,4.4
+ ,14.3
+ ,4.1
+ ,13.4
+ ,5.1
+ ,15.3
+ ,5.8
+ ,22.1
+ ,5.9
+ ,23.7
+ ,5.4
+ ,22.2
+ ,5.5
+ ,19.5
+ ,4.8
+ ,16.6
+ ,3.2
+ ,17.3
+ ,2.7
+ ,19.8
+ ,2.1
+ ,21.2
+ ,1.9
+ ,21.5
+ ,0.6
+ ,20.6
+ ,0.7
+ ,19.1
+ ,-0.2
+ ,19.6
+ ,-1
+ ,23.5
+ ,-1.7
+ ,24
+ ,-0.7
+ ,23.2
+ ,-1
+ ,21.2
+ ,-0.9)
+ ,dim=c(2
+ ,214)
+ ,dimnames=list(c('Y(Werkloosheid)'
+ ,'X(inflatie)')
+ ,1:214))
> y <- array(NA,dim=c(2,214),dimnames=list(c('Y(Werkloosheid)','X(inflatie)'),1:214))
> 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 = 'Include Monthly 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(Werkloosheid) X(inflatie) M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 15.0 2.1 1 0 0 0 0 0 0 0 0 0 0
2 14.4 2.1 0 1 0 0 0 0 0 0 0 0 0
3 13.5 2.6 0 0 1 0 0 0 0 0 0 0 0
4 12.8 2.6 0 0 0 1 0 0 0 0 0 0 0
5 12.3 2.7 0 0 0 0 1 0 0 0 0 0 0
6 12.2 2.5 0 0 0 0 0 1 0 0 0 0 0
7 14.5 2.4 0 0 0 0 0 0 1 0 0 0 0
8 17.2 1.9 0 0 0 0 0 0 0 1 0 0 0
9 18.0 2.2 0 0 0 0 0 0 0 0 1 0 0
10 18.1 1.9 0 0 0 0 0 0 0 0 0 1 0
11 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16.6 3.2 0 0 0 0 0 0 0 0 0 0 1
204 17.3 2.7 0 0 0 0 0 0 0 0 0 0 0
205 19.8 2.1 1 0 0 0 0 0 0 0 0 0 0
206 21.2 1.9 0 1 0 0 0 0 0 0 0 0 0
207 21.5 0.6 0 0 1 0 0 0 0 0 0 0 0
208 20.6 0.7 0 0 0 1 0 0 0 0 0 0 0
209 19.1 -0.2 0 0 0 0 1 0 0 0 0 0 0
210 19.6 -1.0 0 0 0 0 0 1 0 0 0 0 0
211 23.5 -1.7 0 0 0 0 0 0 1 0 0 0 0
212 24.0 -0.7 0 0 0 0 0 0 0 1 0 0 0
213 23.2 -1.0 0 0 0 0 0 0 0 0 1 0 0
214 21.2 -0.9 0 0 0 0 0 0 0 0 0 1 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `X(inflatie)` M1 M2 M3
22.0044 -0.8593 -0.4542 -0.6643 -1.2310
M4 M5 M6 M7 M8
-1.6548 -2.4199 -2.6366 0.5465 2.4054
M9 M10 M11
2.4125 1.3958 0.3538
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.9885 -1.7729 0.5434 1.9016 4.6191
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 22.0044 0.7169 30.692 < 2e-16 ***
`X(inflatie)` -0.8593 0.1689 -5.087 8.32e-07 ***
M1 -0.4542 0.8798 -0.516 0.60621
M2 -0.6643 0.8795 -0.755 0.45096
M3 -1.2310 0.8795 -1.400 0.16318
M4 -1.6548 0.8795 -1.881 0.06136 .
M5 -2.4199 0.8795 -2.751 0.00648 **
M6 -2.6366 0.8796 -2.998 0.00306 **
M7 0.5465 0.8800 0.621 0.53531
M8 2.4054 0.8796 2.735 0.00680 **
M9 2.4125 0.8797 2.743 0.00665 **
M10 1.3958 0.8798 1.586 0.11420
M11 0.3538 0.8920 0.397 0.69209
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.601 on 201 degrees of freedom
Multiple R-squared: 0.3573, Adjusted R-squared: 0.3189
F-statistic: 9.311 on 12 and 201 DF, p-value: 3.205e-14
> 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.6707809 6.584381e-01 3.292191e-01
[2,] 0.9251196 1.497607e-01 7.488036e-02
[3,] 0.9485143 1.029713e-01 5.148567e-02
[4,] 0.9619661 7.606784e-02 3.803392e-02
[5,] 0.9700745 5.985093e-02 2.992547e-02
[6,] 0.9764553 4.708933e-02 2.354467e-02
[7,] 0.9734076 5.318480e-02 2.659240e-02
[8,] 0.9753436 4.931284e-02 2.465642e-02
[9,] 0.9750859 4.982827e-02 2.491414e-02
[10,] 0.9926947 1.461055e-02 7.305275e-03
[11,] 0.9970268 5.946349e-03 2.973174e-03
[12,] 0.9996473 7.054018e-04 3.527009e-04
[13,] 0.9998822 2.355100e-04 1.177550e-04
[14,] 0.9999237 1.525678e-04 7.628389e-05
[15,] 0.9999038 1.923234e-04 9.616169e-05
[16,] 0.9998644 2.711663e-04 1.355831e-04
[17,] 0.9998723 2.553214e-04 1.276607e-04
[18,] 0.9998791 2.417430e-04 1.208715e-04
[19,] 0.9999005 1.990182e-04 9.950908e-05
[20,] 0.9999119 1.762515e-04 8.812573e-05
[21,] 0.9999396 1.207623e-04 6.038114e-05
[22,] 0.9999736 5.285655e-05 2.642828e-05
[23,] 0.9999879 2.428431e-05 1.214216e-05
[24,] 0.9999925 1.501860e-05 7.509301e-06
[25,] 0.9999933 1.347297e-05 6.736483e-06
[26,] 0.9999915 1.708937e-05 8.544684e-06
[27,] 0.9999863 2.743201e-05 1.371601e-05
[28,] 0.9999765 4.697496e-05 2.348748e-05
[29,] 0.9999614 7.726131e-05 3.863066e-05
[30,] 0.9999402 1.196450e-04 5.982252e-05
[31,] 0.9999150 1.699613e-04 8.498067e-05
[32,] 0.9998872 2.256908e-04 1.128454e-04
[33,] 0.9998490 3.020068e-04 1.510034e-04
[34,] 0.9998143 3.714259e-04 1.857129e-04
[35,] 0.9997530 4.939098e-04 2.469549e-04
[36,] 0.9996564 6.872126e-04 3.436063e-04
[37,] 0.9995264 9.472080e-04 4.736040e-04
[38,] 0.9993482 1.303521e-03 6.517607e-04
[39,] 0.9990660 1.867979e-03 9.339896e-04
[40,] 0.9986313 2.737419e-03 1.368710e-03
[41,] 0.9980162 3.967564e-03 1.983782e-03
[42,] 0.9973424 5.315153e-03 2.657576e-03
[43,] 0.9970023 5.995342e-03 2.997671e-03
[44,] 0.9966376 6.724780e-03 3.362390e-03
[45,] 0.9960877 7.824506e-03 3.912253e-03
[46,] 0.9956155 8.768945e-03 4.384472e-03
[47,] 0.9947181 1.056381e-02 5.281907e-03
[48,] 0.9931607 1.367858e-02 6.839288e-03
[49,] 0.9909709 1.805816e-02 9.029079e-03
[50,] 0.9883064 2.338723e-02 1.169361e-02
[51,] 0.9850224 2.995517e-02 1.497759e-02
[52,] 0.9808475 3.830491e-02 1.915245e-02
[53,] 0.9756777 4.864455e-02 2.432227e-02
[54,] 0.9708745 5.825092e-02 2.912546e-02
[55,] 0.9662581 6.748371e-02 3.374186e-02
[56,] 0.9619579 7.608423e-02 3.804211e-02
[57,] 0.9578879 8.422424e-02 4.211212e-02
[58,] 0.9513921 9.721575e-02 4.860787e-02
[59,] 0.9419945 1.160110e-01 5.800548e-02
[60,] 0.9302275 1.395450e-01 6.977251e-02
[61,] 0.9155139 1.689723e-01 8.448613e-02
[62,] 0.8986463 2.027074e-01 1.013537e-01
[63,] 0.8787895 2.424211e-01 1.212105e-01
[64,] 0.8582086 2.835828e-01 1.417914e-01
[65,] 0.8353587 3.292827e-01 1.646413e-01
[66,] 0.8250995 3.498010e-01 1.749005e-01
[67,] 0.8201279 3.597443e-01 1.798721e-01
[68,] 0.8191619 3.616761e-01 1.808381e-01
[69,] 0.8190764 3.618473e-01 1.809236e-01
[70,] 0.8245464 3.509073e-01 1.754536e-01
[71,] 0.8264464 3.471071e-01 1.735536e-01
[72,] 0.8377195 3.245609e-01 1.622805e-01
[73,] 0.8494206 3.011587e-01 1.505794e-01
[74,] 0.8547477 2.905045e-01 1.452523e-01
[75,] 0.8422820 3.154361e-01 1.577180e-01
[76,] 0.8157953 3.684095e-01 1.842047e-01
[77,] 0.7931669 4.136662e-01 2.068331e-01
[78,] 0.7907083 4.185834e-01 2.092917e-01
[79,] 0.8291557 3.416886e-01 1.708443e-01
[80,] 0.8807866 2.384267e-01 1.192134e-01
[81,] 0.9170755 1.658489e-01 8.292447e-02
[82,] 0.9657095 6.858090e-02 3.429045e-02
[83,] 0.9744049 5.119019e-02 2.559510e-02
[84,] 0.9791311 4.173771e-02 2.086885e-02
[85,] 0.9833095 3.338100e-02 1.669050e-02
[86,] 0.9853214 2.935719e-02 1.467860e-02
[87,] 0.9841525 3.169509e-02 1.584755e-02
[88,] 0.9835542 3.289160e-02 1.644580e-02
[89,] 0.9793404 4.131923e-02 2.065961e-02
[90,] 0.9737843 5.243132e-02 2.621566e-02
[91,] 0.9713506 5.729884e-02 2.864942e-02
[92,] 0.9740487 5.190254e-02 2.595127e-02
[93,] 0.9852407 2.951851e-02 1.475925e-02
[94,] 0.9932624 1.347517e-02 6.737584e-03
[95,] 0.9974352 5.129570e-03 2.564785e-03
[96,] 0.9987169 2.566103e-03 1.283051e-03
[97,] 0.9985356 2.928735e-03 1.464368e-03
[98,] 0.9981195 3.760954e-03 1.880477e-03
[99,] 0.9979978 4.004418e-03 2.002209e-03
[100,] 0.9989994 2.001201e-03 1.000600e-03
[101,] 0.9995901 8.197810e-04 4.098905e-04
[102,] 0.9997942 4.115241e-04 2.057621e-04
[103,] 0.9997356 5.287001e-04 2.643500e-04
[104,] 0.9996399 7.202163e-04 3.601081e-04
[105,] 0.9994855 1.028921e-03 5.144605e-04
[106,] 0.9992822 1.435556e-03 7.177779e-04
[107,] 0.9990971 1.805737e-03 9.028684e-04
[108,] 0.9988990 2.202085e-03 1.101043e-03
[109,] 0.9989372 2.125641e-03 1.062821e-03
[110,] 0.9991078 1.784489e-03 8.922446e-04
[111,] 0.9995608 8.783934e-04 4.391967e-04
[112,] 0.9998011 3.977339e-04 1.988670e-04
[113,] 0.9999440 1.119725e-04 5.598627e-05
[114,] 0.9999871 2.585594e-05 1.292797e-05
[115,] 0.9999949 1.013804e-05 5.069021e-06
[116,] 0.9999965 7.041318e-06 3.520659e-06
[117,] 0.9999953 9.454812e-06 4.727406e-06
[118,] 0.9999922 1.560279e-05 7.801397e-06
[119,] 0.9999890 2.208875e-05 1.104438e-05
[120,] 0.9999850 2.993613e-05 1.496806e-05
[121,] 0.9999760 4.809574e-05 2.404787e-05
[122,] 0.9999613 7.746831e-05 3.873415e-05
[123,] 0.9999380 1.240364e-04 6.201821e-05
[124,] 0.9999194 1.612460e-04 8.062300e-05
[125,] 0.9998913 2.173026e-04 1.086513e-04
[126,] 0.9998686 2.628800e-04 1.314400e-04
[127,] 0.9998558 2.883187e-04 1.441594e-04
[128,] 0.9998489 3.022061e-04 1.511030e-04
[129,] 0.9998226 3.548406e-04 1.774203e-04
[130,] 0.9997325 5.350858e-04 2.675429e-04
[131,] 0.9995919 8.161578e-04 4.080789e-04
[132,] 0.9994628 1.074386e-03 5.371931e-04
[133,] 0.9993353 1.329480e-03 6.647401e-04
[134,] 0.9990425 1.915076e-03 9.575379e-04
[135,] 0.9985825 2.835074e-03 1.417537e-03
[136,] 0.9984220 3.156001e-03 1.578000e-03
[137,] 0.9984736 3.052775e-03 1.526388e-03
[138,] 0.9988336 2.332793e-03 1.166397e-03
[139,] 0.9992098 1.580358e-03 7.901792e-04
[140,] 0.9993229 1.354235e-03 6.771174e-04
[141,] 0.9992400 1.519910e-03 7.599549e-04
[142,] 0.9989595 2.080977e-03 1.040489e-03
[143,] 0.9985431 2.913782e-03 1.456891e-03
[144,] 0.9983043 3.391336e-03 1.695668e-03
[145,] 0.9980623 3.875496e-03 1.937748e-03
[146,] 0.9979186 4.162742e-03 2.081371e-03
[147,] 0.9975858 4.828388e-03 2.414194e-03
[148,] 0.9970209 5.958101e-03 2.979050e-03
[149,] 0.9959231 8.153703e-03 4.076852e-03
[150,] 0.9954337 9.132632e-03 4.566316e-03
[151,] 0.9959579 8.084199e-03 4.042099e-03
[152,] 0.9975388 4.922499e-03 2.461249e-03
[153,] 0.9986411 2.717833e-03 1.358916e-03
[154,] 0.9984267 3.146692e-03 1.573346e-03
[155,] 0.9979077 4.184644e-03 2.092322e-03
[156,] 0.9968079 6.384183e-03 3.192092e-03
[157,] 0.9953930 9.214069e-03 4.607035e-03
[158,] 0.9944805 1.103896e-02 5.519479e-03
[159,] 0.9923699 1.526013e-02 7.630066e-03
[160,] 0.9889484 2.210322e-02 1.105161e-02
[161,] 0.9837028 3.259443e-02 1.629722e-02
[162,] 0.9782369 4.352624e-02 2.176312e-02
[163,] 0.9720950 5.580992e-02 2.790496e-02
[164,] 0.9701760 5.964799e-02 2.982400e-02
[165,] 0.9593006 8.139876e-02 4.069938e-02
[166,] 0.9421398 1.157204e-01 5.786022e-02
[167,] 0.9218635 1.562729e-01 7.813646e-02
[168,] 0.8907974 2.184052e-01 1.092026e-01
[169,] 0.8730978 2.538043e-01 1.269022e-01
[170,] 0.8579808 2.840384e-01 1.420192e-01
[171,] 0.8085867 3.828265e-01 1.914133e-01
[172,] 0.7775068 4.449864e-01 2.224932e-01
[173,] 0.8253811 3.492378e-01 1.746189e-01
[174,] 0.8818630 2.362740e-01 1.181370e-01
[175,] 0.8637064 2.725871e-01 1.362936e-01
[176,] 0.8052603 3.894794e-01 1.947397e-01
[177,] 0.7282594 5.434812e-01 2.717406e-01
[178,] 0.6547554 6.904891e-01 3.452446e-01
[179,] 0.6539676 6.920647e-01 3.460324e-01
[180,] 0.7260378 5.479244e-01 2.739622e-01
[181,] 0.8698319 2.603361e-01 1.301681e-01
[182,] 0.9562724 8.745528e-02 4.372764e-02
[183,] 0.9939833 1.203348e-02 6.016742e-03
> postscript(file="/var/www/html/rcomp/tmp/12ano1262195920.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/24oi61262195920.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/3ph4q1262195920.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/41il81262195920.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/5yj2s1262195920.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 = 214
Frequency = 1
1 2 3 4 5 6
-4.74558536 -5.13550919 -5.03918529 -5.31539989 -4.96436495 -5.01947673
7 8 9 10 11 12
-5.98848815 -5.57708064 -4.52640503 -3.66744825 -2.63952135 -1.81388971
13 14 15 16 17 18
-0.70185957 -0.59178340 -0.15325384 -0.21539989 -0.20809074 -0.24913396
19 20 21 22 23 24
-0.47441960 1.28223383 1.93138931 2.94814043 3.51827299 3.94390463
25 26 27 28 29 30
4.22627754 4.02228515 3.51708892 3.21273721 3.14970360 2.93831761
31 32 33 34 35 36
1.85523764 2.63850804 3.43138931 3.79034609 3.84641010 3.42831594
37 38 39 40 41 42
3.58255175 3.12076502 2.88743169 2.42528564 1.91852624 1.07748301
43 44 45 46 47 48
-0.16339131 1.06360489 1.74241761 2.35916872 2.68709563 2.51272726
49 50 51 52 53 54
2.75289451 2.26297068 1.90150024 1.66901143 1.52004637 0.96493459
55 56 57 58 59 60
-0.26187118 0.62139923 1.67207484 2.69034609 2.74641010 2.50017884
61 62 63 64 65 66
2.55441464 2.09262792 1.54370590 1.09562840 1.31852624 1.20714025
67 68 69 70 71 72
0.28185461 0.95105646 1.75800629 1.83103162 1.75895852 0.96900147
73 74 75 76 77 78
0.67951149 0.54738200 0.58591156 0.46749130 0.53259479 0.06341446
79 80 81 82 83 84
-0.81966552 0.94953633 2.27055471 2.40137438 2.25743839 2.29713858
85 86 87 88 89 90
2.80916872 2.61924489 3.04370590 3.09562840 2.80293755 1.73375723
91 92 93 94 95 96
-0.04932275 -0.73639511 -1.79978805 -3.19710549 -3.98324713 -4.09982116
97 98 99 100 101 102
-5.39235141 -3.83550919 -3.52511673 -3.57319423 -3.22215929 -2.28981949
103 104 105 106 107 108
-2.19000828 0.19782251 -0.57963898 -2.32068221 -3.47868675 -4.92643814
109 110 111 112 113 114
-5.22999668 -5.29178340 -4.48291108 -2.05760555 -1.32063916 -2.08981949
115 116 117 118 119 120
-3.44476236 -4.36149196 -4.08419937 -1.66744825 -1.31138424 -0.88575261
121 122 123 124 125 126
-0.71592812 -1.39178340 -1.52511673 -2.47471436 -2.88147376 -3.78031133
127 128 129 130 131 132
-3.00559696 -4.19266933 -4.58571950 -4.08303694 -3.41290437 -1.88727274
133 134 135 136 137 138
0.18103162 1.23483358 1.38743169 0.53935419 -0.21113100 0.62120880
139 140 141 142 143 144
2.45219738 1.86512502 1.84393773 1.60289451 1.48861576 1.15645305
145 146 147 148 149 150
0.35289451 -0.60889221 -1.51408844 -1.48878292 -0.52215929 0.35086604
151 152 153 154 155 156
3.05371751 2.80885080 2.72986918 2.62000332 1.61827299 0.92831594
157 158 159 160 161 162
0.86848319 1.03635371 1.93267761 2.11273721 2.19190926 2.45238617
163 164 165 166 167 168
2.86930619 1.58223383 1.66104655 1.39034609 1.51827299 1.90169897
169 170 171 172 173 174
1.35593477 1.26601094 0.51708892 1.08460011 1.62156650 1.58052327
175 176 177 178 179 180
2.11151185 0.86664515 0.21580063 -0.53931115 -0.73952135 -1.39982116
181 182 183 184 185 186
-1.48931115 -1.39330353 -0.62663686 1.09714853 0.73259479 0.14934591
187 188 189 190 191 192
-0.33373407 -2.87860077 -4.11385661 -3.40965391 -2.86613832 -2.24050669
193 194 195 196 197 198
-1.14254510 -1.44653748 -1.69241924 -2.52642819 -1.80201022 0.91626103
199 200 201 202 203 204
4.61911249 3.93052000 2.50933272 0.22456371 -3.00834398 -2.38423248
205 206 207 208 209 210
0.05441464 1.49262792 1.24218577 0.85190261 -0.65637692 -0.62707737
211 212 213 214
-0.51167748 -1.01129827 -2.07621134 -2.97352877
> postscript(file="/var/www/html/rcomp/tmp/6vikx1262195920.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 = 214
Frequency = 1
lag(myerror, k = 1) myerror
0 -4.74558536 NA
1 -5.13550919 -4.74558536
2 -5.03918529 -5.13550919
3 -5.31539989 -5.03918529
4 -4.96436495 -5.31539989
5 -5.01947673 -4.96436495
6 -5.98848815 -5.01947673
7 -5.57708064 -5.98848815
8 -4.52640503 -5.57708064
9 -3.66744825 -4.52640503
10 -2.63952135 -3.66744825
11 -1.81388971 -2.63952135
12 -0.70185957 -1.81388971
13 -0.59178340 -0.70185957
14 -0.15325384 -0.59178340
15 -0.21539989 -0.15325384
16 -0.20809074 -0.21539989
17 -0.24913396 -0.20809074
18 -0.47441960 -0.24913396
19 1.28223383 -0.47441960
20 1.93138931 1.28223383
21 2.94814043 1.93138931
22 3.51827299 2.94814043
23 3.94390463 3.51827299
24 4.22627754 3.94390463
25 4.02228515 4.22627754
26 3.51708892 4.02228515
27 3.21273721 3.51708892
28 3.14970360 3.21273721
29 2.93831761 3.14970360
30 1.85523764 2.93831761
31 2.63850804 1.85523764
32 3.43138931 2.63850804
33 3.79034609 3.43138931
34 3.84641010 3.79034609
35 3.42831594 3.84641010
36 3.58255175 3.42831594
37 3.12076502 3.58255175
38 2.88743169 3.12076502
39 2.42528564 2.88743169
40 1.91852624 2.42528564
41 1.07748301 1.91852624
42 -0.16339131 1.07748301
43 1.06360489 -0.16339131
44 1.74241761 1.06360489
45 2.35916872 1.74241761
46 2.68709563 2.35916872
47 2.51272726 2.68709563
48 2.75289451 2.51272726
49 2.26297068 2.75289451
50 1.90150024 2.26297068
51 1.66901143 1.90150024
52 1.52004637 1.66901143
53 0.96493459 1.52004637
54 -0.26187118 0.96493459
55 0.62139923 -0.26187118
56 1.67207484 0.62139923
57 2.69034609 1.67207484
58 2.74641010 2.69034609
59 2.50017884 2.74641010
60 2.55441464 2.50017884
61 2.09262792 2.55441464
62 1.54370590 2.09262792
63 1.09562840 1.54370590
64 1.31852624 1.09562840
65 1.20714025 1.31852624
66 0.28185461 1.20714025
67 0.95105646 0.28185461
68 1.75800629 0.95105646
69 1.83103162 1.75800629
70 1.75895852 1.83103162
71 0.96900147 1.75895852
72 0.67951149 0.96900147
73 0.54738200 0.67951149
74 0.58591156 0.54738200
75 0.46749130 0.58591156
76 0.53259479 0.46749130
77 0.06341446 0.53259479
78 -0.81966552 0.06341446
79 0.94953633 -0.81966552
80 2.27055471 0.94953633
81 2.40137438 2.27055471
82 2.25743839 2.40137438
83 2.29713858 2.25743839
84 2.80916872 2.29713858
85 2.61924489 2.80916872
86 3.04370590 2.61924489
87 3.09562840 3.04370590
88 2.80293755 3.09562840
89 1.73375723 2.80293755
90 -0.04932275 1.73375723
91 -0.73639511 -0.04932275
92 -1.79978805 -0.73639511
93 -3.19710549 -1.79978805
94 -3.98324713 -3.19710549
95 -4.09982116 -3.98324713
96 -5.39235141 -4.09982116
97 -3.83550919 -5.39235141
98 -3.52511673 -3.83550919
99 -3.57319423 -3.52511673
100 -3.22215929 -3.57319423
101 -2.28981949 -3.22215929
102 -2.19000828 -2.28981949
103 0.19782251 -2.19000828
104 -0.57963898 0.19782251
105 -2.32068221 -0.57963898
106 -3.47868675 -2.32068221
107 -4.92643814 -3.47868675
108 -5.22999668 -4.92643814
109 -5.29178340 -5.22999668
110 -4.48291108 -5.29178340
111 -2.05760555 -4.48291108
112 -1.32063916 -2.05760555
113 -2.08981949 -1.32063916
114 -3.44476236 -2.08981949
115 -4.36149196 -3.44476236
116 -4.08419937 -4.36149196
117 -1.66744825 -4.08419937
118 -1.31138424 -1.66744825
119 -0.88575261 -1.31138424
120 -0.71592812 -0.88575261
121 -1.39178340 -0.71592812
122 -1.52511673 -1.39178340
123 -2.47471436 -1.52511673
124 -2.88147376 -2.47471436
125 -3.78031133 -2.88147376
126 -3.00559696 -3.78031133
127 -4.19266933 -3.00559696
128 -4.58571950 -4.19266933
129 -4.08303694 -4.58571950
130 -3.41290437 -4.08303694
131 -1.88727274 -3.41290437
132 0.18103162 -1.88727274
133 1.23483358 0.18103162
134 1.38743169 1.23483358
135 0.53935419 1.38743169
136 -0.21113100 0.53935419
137 0.62120880 -0.21113100
138 2.45219738 0.62120880
139 1.86512502 2.45219738
140 1.84393773 1.86512502
141 1.60289451 1.84393773
142 1.48861576 1.60289451
143 1.15645305 1.48861576
144 0.35289451 1.15645305
145 -0.60889221 0.35289451
146 -1.51408844 -0.60889221
147 -1.48878292 -1.51408844
148 -0.52215929 -1.48878292
149 0.35086604 -0.52215929
150 3.05371751 0.35086604
151 2.80885080 3.05371751
152 2.72986918 2.80885080
153 2.62000332 2.72986918
154 1.61827299 2.62000332
155 0.92831594 1.61827299
156 0.86848319 0.92831594
157 1.03635371 0.86848319
158 1.93267761 1.03635371
159 2.11273721 1.93267761
160 2.19190926 2.11273721
161 2.45238617 2.19190926
162 2.86930619 2.45238617
163 1.58223383 2.86930619
164 1.66104655 1.58223383
165 1.39034609 1.66104655
166 1.51827299 1.39034609
167 1.90169897 1.51827299
168 1.35593477 1.90169897
169 1.26601094 1.35593477
170 0.51708892 1.26601094
171 1.08460011 0.51708892
172 1.62156650 1.08460011
173 1.58052327 1.62156650
174 2.11151185 1.58052327
175 0.86664515 2.11151185
176 0.21580063 0.86664515
177 -0.53931115 0.21580063
178 -0.73952135 -0.53931115
179 -1.39982116 -0.73952135
180 -1.48931115 -1.39982116
181 -1.39330353 -1.48931115
182 -0.62663686 -1.39330353
183 1.09714853 -0.62663686
184 0.73259479 1.09714853
185 0.14934591 0.73259479
186 -0.33373407 0.14934591
187 -2.87860077 -0.33373407
188 -4.11385661 -2.87860077
189 -3.40965391 -4.11385661
190 -2.86613832 -3.40965391
191 -2.24050669 -2.86613832
192 -1.14254510 -2.24050669
193 -1.44653748 -1.14254510
194 -1.69241924 -1.44653748
195 -2.52642819 -1.69241924
196 -1.80201022 -2.52642819
197 0.91626103 -1.80201022
198 4.61911249 0.91626103
199 3.93052000 4.61911249
200 2.50933272 3.93052000
201 0.22456371 2.50933272
202 -3.00834398 0.22456371
203 -2.38423248 -3.00834398
204 0.05441464 -2.38423248
205 1.49262792 0.05441464
206 1.24218577 1.49262792
207 0.85190261 1.24218577
208 -0.65637692 0.85190261
209 -0.62707737 -0.65637692
210 -0.51167748 -0.62707737
211 -1.01129827 -0.51167748
212 -2.07621134 -1.01129827
213 -2.97352877 -2.07621134
214 NA -2.97352877
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -5.13550919 -4.74558536
[2,] -5.03918529 -5.13550919
[3,] -5.31539989 -5.03918529
[4,] -4.96436495 -5.31539989
[5,] -5.01947673 -4.96436495
[6,] -5.98848815 -5.01947673
[7,] -5.57708064 -5.98848815
[8,] -4.52640503 -5.57708064
[9,] -3.66744825 -4.52640503
[10,] -2.63952135 -3.66744825
[11,] -1.81388971 -2.63952135
[12,] -0.70185957 -1.81388971
[13,] -0.59178340 -0.70185957
[14,] -0.15325384 -0.59178340
[15,] -0.21539989 -0.15325384
[16,] -0.20809074 -0.21539989
[17,] -0.24913396 -0.20809074
[18,] -0.47441960 -0.24913396
[19,] 1.28223383 -0.47441960
[20,] 1.93138931 1.28223383
[21,] 2.94814043 1.93138931
[22,] 3.51827299 2.94814043
[23,] 3.94390463 3.51827299
[24,] 4.22627754 3.94390463
[25,] 4.02228515 4.22627754
[26,] 3.51708892 4.02228515
[27,] 3.21273721 3.51708892
[28,] 3.14970360 3.21273721
[29,] 2.93831761 3.14970360
[30,] 1.85523764 2.93831761
[31,] 2.63850804 1.85523764
[32,] 3.43138931 2.63850804
[33,] 3.79034609 3.43138931
[34,] 3.84641010 3.79034609
[35,] 3.42831594 3.84641010
[36,] 3.58255175 3.42831594
[37,] 3.12076502 3.58255175
[38,] 2.88743169 3.12076502
[39,] 2.42528564 2.88743169
[40,] 1.91852624 2.42528564
[41,] 1.07748301 1.91852624
[42,] -0.16339131 1.07748301
[43,] 1.06360489 -0.16339131
[44,] 1.74241761 1.06360489
[45,] 2.35916872 1.74241761
[46,] 2.68709563 2.35916872
[47,] 2.51272726 2.68709563
[48,] 2.75289451 2.51272726
[49,] 2.26297068 2.75289451
[50,] 1.90150024 2.26297068
[51,] 1.66901143 1.90150024
[52,] 1.52004637 1.66901143
[53,] 0.96493459 1.52004637
[54,] -0.26187118 0.96493459
[55,] 0.62139923 -0.26187118
[56,] 1.67207484 0.62139923
[57,] 2.69034609 1.67207484
[58,] 2.74641010 2.69034609
[59,] 2.50017884 2.74641010
[60,] 2.55441464 2.50017884
[61,] 2.09262792 2.55441464
[62,] 1.54370590 2.09262792
[63,] 1.09562840 1.54370590
[64,] 1.31852624 1.09562840
[65,] 1.20714025 1.31852624
[66,] 0.28185461 1.20714025
[67,] 0.95105646 0.28185461
[68,] 1.75800629 0.95105646
[69,] 1.83103162 1.75800629
[70,] 1.75895852 1.83103162
[71,] 0.96900147 1.75895852
[72,] 0.67951149 0.96900147
[73,] 0.54738200 0.67951149
[74,] 0.58591156 0.54738200
[75,] 0.46749130 0.58591156
[76,] 0.53259479 0.46749130
[77,] 0.06341446 0.53259479
[78,] -0.81966552 0.06341446
[79,] 0.94953633 -0.81966552
[80,] 2.27055471 0.94953633
[81,] 2.40137438 2.27055471
[82,] 2.25743839 2.40137438
[83,] 2.29713858 2.25743839
[84,] 2.80916872 2.29713858
[85,] 2.61924489 2.80916872
[86,] 3.04370590 2.61924489
[87,] 3.09562840 3.04370590
[88,] 2.80293755 3.09562840
[89,] 1.73375723 2.80293755
[90,] -0.04932275 1.73375723
[91,] -0.73639511 -0.04932275
[92,] -1.79978805 -0.73639511
[93,] -3.19710549 -1.79978805
[94,] -3.98324713 -3.19710549
[95,] -4.09982116 -3.98324713
[96,] -5.39235141 -4.09982116
[97,] -3.83550919 -5.39235141
[98,] -3.52511673 -3.83550919
[99,] -3.57319423 -3.52511673
[100,] -3.22215929 -3.57319423
[101,] -2.28981949 -3.22215929
[102,] -2.19000828 -2.28981949
[103,] 0.19782251 -2.19000828
[104,] -0.57963898 0.19782251
[105,] -2.32068221 -0.57963898
[106,] -3.47868675 -2.32068221
[107,] -4.92643814 -3.47868675
[108,] -5.22999668 -4.92643814
[109,] -5.29178340 -5.22999668
[110,] -4.48291108 -5.29178340
[111,] -2.05760555 -4.48291108
[112,] -1.32063916 -2.05760555
[113,] -2.08981949 -1.32063916
[114,] -3.44476236 -2.08981949
[115,] -4.36149196 -3.44476236
[116,] -4.08419937 -4.36149196
[117,] -1.66744825 -4.08419937
[118,] -1.31138424 -1.66744825
[119,] -0.88575261 -1.31138424
[120,] -0.71592812 -0.88575261
[121,] -1.39178340 -0.71592812
[122,] -1.52511673 -1.39178340
[123,] -2.47471436 -1.52511673
[124,] -2.88147376 -2.47471436
[125,] -3.78031133 -2.88147376
[126,] -3.00559696 -3.78031133
[127,] -4.19266933 -3.00559696
[128,] -4.58571950 -4.19266933
[129,] -4.08303694 -4.58571950
[130,] -3.41290437 -4.08303694
[131,] -1.88727274 -3.41290437
[132,] 0.18103162 -1.88727274
[133,] 1.23483358 0.18103162
[134,] 1.38743169 1.23483358
[135,] 0.53935419 1.38743169
[136,] -0.21113100 0.53935419
[137,] 0.62120880 -0.21113100
[138,] 2.45219738 0.62120880
[139,] 1.86512502 2.45219738
[140,] 1.84393773 1.86512502
[141,] 1.60289451 1.84393773
[142,] 1.48861576 1.60289451
[143,] 1.15645305 1.48861576
[144,] 0.35289451 1.15645305
[145,] -0.60889221 0.35289451
[146,] -1.51408844 -0.60889221
[147,] -1.48878292 -1.51408844
[148,] -0.52215929 -1.48878292
[149,] 0.35086604 -0.52215929
[150,] 3.05371751 0.35086604
[151,] 2.80885080 3.05371751
[152,] 2.72986918 2.80885080
[153,] 2.62000332 2.72986918
[154,] 1.61827299 2.62000332
[155,] 0.92831594 1.61827299
[156,] 0.86848319 0.92831594
[157,] 1.03635371 0.86848319
[158,] 1.93267761 1.03635371
[159,] 2.11273721 1.93267761
[160,] 2.19190926 2.11273721
[161,] 2.45238617 2.19190926
[162,] 2.86930619 2.45238617
[163,] 1.58223383 2.86930619
[164,] 1.66104655 1.58223383
[165,] 1.39034609 1.66104655
[166,] 1.51827299 1.39034609
[167,] 1.90169897 1.51827299
[168,] 1.35593477 1.90169897
[169,] 1.26601094 1.35593477
[170,] 0.51708892 1.26601094
[171,] 1.08460011 0.51708892
[172,] 1.62156650 1.08460011
[173,] 1.58052327 1.62156650
[174,] 2.11151185 1.58052327
[175,] 0.86664515 2.11151185
[176,] 0.21580063 0.86664515
[177,] -0.53931115 0.21580063
[178,] -0.73952135 -0.53931115
[179,] -1.39982116 -0.73952135
[180,] -1.48931115 -1.39982116
[181,] -1.39330353 -1.48931115
[182,] -0.62663686 -1.39330353
[183,] 1.09714853 -0.62663686
[184,] 0.73259479 1.09714853
[185,] 0.14934591 0.73259479
[186,] -0.33373407 0.14934591
[187,] -2.87860077 -0.33373407
[188,] -4.11385661 -2.87860077
[189,] -3.40965391 -4.11385661
[190,] -2.86613832 -3.40965391
[191,] -2.24050669 -2.86613832
[192,] -1.14254510 -2.24050669
[193,] -1.44653748 -1.14254510
[194,] -1.69241924 -1.44653748
[195,] -2.52642819 -1.69241924
[196,] -1.80201022 -2.52642819
[197,] 0.91626103 -1.80201022
[198,] 4.61911249 0.91626103
[199,] 3.93052000 4.61911249
[200,] 2.50933272 3.93052000
[201,] 0.22456371 2.50933272
[202,] -3.00834398 0.22456371
[203,] -2.38423248 -3.00834398
[204,] 0.05441464 -2.38423248
[205,] 1.49262792 0.05441464
[206,] 1.24218577 1.49262792
[207,] 0.85190261 1.24218577
[208,] -0.65637692 0.85190261
[209,] -0.62707737 -0.65637692
[210,] -0.51167748 -0.62707737
[211,] -1.01129827 -0.51167748
[212,] -2.07621134 -1.01129827
[213,] -2.97352877 -2.07621134
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -5.13550919 -4.74558536
2 -5.03918529 -5.13550919
3 -5.31539989 -5.03918529
4 -4.96436495 -5.31539989
5 -5.01947673 -4.96436495
6 -5.98848815 -5.01947673
7 -5.57708064 -5.98848815
8 -4.52640503 -5.57708064
9 -3.66744825 -4.52640503
10 -2.63952135 -3.66744825
11 -1.81388971 -2.63952135
12 -0.70185957 -1.81388971
13 -0.59178340 -0.70185957
14 -0.15325384 -0.59178340
15 -0.21539989 -0.15325384
16 -0.20809074 -0.21539989
17 -0.24913396 -0.20809074
18 -0.47441960 -0.24913396
19 1.28223383 -0.47441960
20 1.93138931 1.28223383
21 2.94814043 1.93138931
22 3.51827299 2.94814043
23 3.94390463 3.51827299
24 4.22627754 3.94390463
25 4.02228515 4.22627754
26 3.51708892 4.02228515
27 3.21273721 3.51708892
28 3.14970360 3.21273721
29 2.93831761 3.14970360
30 1.85523764 2.93831761
31 2.63850804 1.85523764
32 3.43138931 2.63850804
33 3.79034609 3.43138931
34 3.84641010 3.79034609
35 3.42831594 3.84641010
36 3.58255175 3.42831594
37 3.12076502 3.58255175
38 2.88743169 3.12076502
39 2.42528564 2.88743169
40 1.91852624 2.42528564
41 1.07748301 1.91852624
42 -0.16339131 1.07748301
43 1.06360489 -0.16339131
44 1.74241761 1.06360489
45 2.35916872 1.74241761
46 2.68709563 2.35916872
47 2.51272726 2.68709563
48 2.75289451 2.51272726
49 2.26297068 2.75289451
50 1.90150024 2.26297068
51 1.66901143 1.90150024
52 1.52004637 1.66901143
53 0.96493459 1.52004637
54 -0.26187118 0.96493459
55 0.62139923 -0.26187118
56 1.67207484 0.62139923
57 2.69034609 1.67207484
58 2.74641010 2.69034609
59 2.50017884 2.74641010
60 2.55441464 2.50017884
61 2.09262792 2.55441464
62 1.54370590 2.09262792
63 1.09562840 1.54370590
64 1.31852624 1.09562840
65 1.20714025 1.31852624
66 0.28185461 1.20714025
67 0.95105646 0.28185461
68 1.75800629 0.95105646
69 1.83103162 1.75800629
70 1.75895852 1.83103162
71 0.96900147 1.75895852
72 0.67951149 0.96900147
73 0.54738200 0.67951149
74 0.58591156 0.54738200
75 0.46749130 0.58591156
76 0.53259479 0.46749130
77 0.06341446 0.53259479
78 -0.81966552 0.06341446
79 0.94953633 -0.81966552
80 2.27055471 0.94953633
81 2.40137438 2.27055471
82 2.25743839 2.40137438
83 2.29713858 2.25743839
84 2.80916872 2.29713858
85 2.61924489 2.80916872
86 3.04370590 2.61924489
87 3.09562840 3.04370590
88 2.80293755 3.09562840
89 1.73375723 2.80293755
90 -0.04932275 1.73375723
91 -0.73639511 -0.04932275
92 -1.79978805 -0.73639511
93 -3.19710549 -1.79978805
94 -3.98324713 -3.19710549
95 -4.09982116 -3.98324713
96 -5.39235141 -4.09982116
97 -3.83550919 -5.39235141
98 -3.52511673 -3.83550919
99 -3.57319423 -3.52511673
100 -3.22215929 -3.57319423
101 -2.28981949 -3.22215929
102 -2.19000828 -2.28981949
103 0.19782251 -2.19000828
104 -0.57963898 0.19782251
105 -2.32068221 -0.57963898
106 -3.47868675 -2.32068221
107 -4.92643814 -3.47868675
108 -5.22999668 -4.92643814
109 -5.29178340 -5.22999668
110 -4.48291108 -5.29178340
111 -2.05760555 -4.48291108
112 -1.32063916 -2.05760555
113 -2.08981949 -1.32063916
114 -3.44476236 -2.08981949
115 -4.36149196 -3.44476236
116 -4.08419937 -4.36149196
117 -1.66744825 -4.08419937
118 -1.31138424 -1.66744825
119 -0.88575261 -1.31138424
120 -0.71592812 -0.88575261
121 -1.39178340 -0.71592812
122 -1.52511673 -1.39178340
123 -2.47471436 -1.52511673
124 -2.88147376 -2.47471436
125 -3.78031133 -2.88147376
126 -3.00559696 -3.78031133
127 -4.19266933 -3.00559696
128 -4.58571950 -4.19266933
129 -4.08303694 -4.58571950
130 -3.41290437 -4.08303694
131 -1.88727274 -3.41290437
132 0.18103162 -1.88727274
133 1.23483358 0.18103162
134 1.38743169 1.23483358
135 0.53935419 1.38743169
136 -0.21113100 0.53935419
137 0.62120880 -0.21113100
138 2.45219738 0.62120880
139 1.86512502 2.45219738
140 1.84393773 1.86512502
141 1.60289451 1.84393773
142 1.48861576 1.60289451
143 1.15645305 1.48861576
144 0.35289451 1.15645305
145 -0.60889221 0.35289451
146 -1.51408844 -0.60889221
147 -1.48878292 -1.51408844
148 -0.52215929 -1.48878292
149 0.35086604 -0.52215929
150 3.05371751 0.35086604
151 2.80885080 3.05371751
152 2.72986918 2.80885080
153 2.62000332 2.72986918
154 1.61827299 2.62000332
155 0.92831594 1.61827299
156 0.86848319 0.92831594
157 1.03635371 0.86848319
158 1.93267761 1.03635371
159 2.11273721 1.93267761
160 2.19190926 2.11273721
161 2.45238617 2.19190926
162 2.86930619 2.45238617
163 1.58223383 2.86930619
164 1.66104655 1.58223383
165 1.39034609 1.66104655
166 1.51827299 1.39034609
167 1.90169897 1.51827299
168 1.35593477 1.90169897
169 1.26601094 1.35593477
170 0.51708892 1.26601094
171 1.08460011 0.51708892
172 1.62156650 1.08460011
173 1.58052327 1.62156650
174 2.11151185 1.58052327
175 0.86664515 2.11151185
176 0.21580063 0.86664515
177 -0.53931115 0.21580063
178 -0.73952135 -0.53931115
179 -1.39982116 -0.73952135
180 -1.48931115 -1.39982116
181 -1.39330353 -1.48931115
182 -0.62663686 -1.39330353
183 1.09714853 -0.62663686
184 0.73259479 1.09714853
185 0.14934591 0.73259479
186 -0.33373407 0.14934591
187 -2.87860077 -0.33373407
188 -4.11385661 -2.87860077
189 -3.40965391 -4.11385661
190 -2.86613832 -3.40965391
191 -2.24050669 -2.86613832
192 -1.14254510 -2.24050669
193 -1.44653748 -1.14254510
194 -1.69241924 -1.44653748
195 -2.52642819 -1.69241924
196 -1.80201022 -2.52642819
197 0.91626103 -1.80201022
198 4.61911249 0.91626103
199 3.93052000 4.61911249
200 2.50933272 3.93052000
201 0.22456371 2.50933272
202 -3.00834398 0.22456371
203 -2.38423248 -3.00834398
204 0.05441464 -2.38423248
205 1.49262792 0.05441464
206 1.24218577 1.49262792
207 0.85190261 1.24218577
208 -0.65637692 0.85190261
209 -0.62707737 -0.65637692
210 -0.51167748 -0.62707737
211 -1.01129827 -0.51167748
212 -2.07621134 -1.01129827
213 -2.97352877 -2.07621134
> 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/7fkkf1262195920.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/8vvyu1262195920.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/9u3ir1262195920.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/102n3r1262195920.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/11l8kx1262195920.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/1287we1262195920.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/13v8sx1262195920.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/14uhjw1262195920.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/15b8jo1262195920.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/16il8q1262195920.tab")
+ }
> try(system("convert tmp/12ano1262195920.ps tmp/12ano1262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/24oi61262195920.ps tmp/24oi61262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/3ph4q1262195920.ps tmp/3ph4q1262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/41il81262195920.ps tmp/41il81262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/5yj2s1262195920.ps tmp/5yj2s1262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/6vikx1262195920.ps tmp/6vikx1262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/7fkkf1262195920.ps tmp/7fkkf1262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/8vvyu1262195920.ps tmp/8vvyu1262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/9u3ir1262195920.ps tmp/9u3ir1262195920.png",intern=TRUE))
character(0)
> try(system("convert tmp/102n3r1262195920.ps tmp/102n3r1262195920.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.247 1.762 6.064