R version 2.6.1 (2007-11-26) Copyright (C) 2007 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(102.7 + ,0 + ,0 + ,103.2 + ,0 + ,0 + ,105.6 + ,0 + ,0 + ,103.9 + ,0 + ,0 + ,107.2 + ,0 + ,0 + ,100.7 + ,0 + ,0 + ,92.1 + ,0 + ,0 + ,90.3 + ,0 + ,0 + ,93.4 + ,0 + ,0 + ,98.5 + ,0 + ,0 + ,100.8 + ,0 + ,0 + ,102.3 + ,0 + ,0 + ,104.7 + ,0 + ,0 + ,101.1 + ,0 + ,0 + ,101.4 + ,0 + ,0 + ,99.5 + ,0 + ,0 + ,98.4 + ,0 + ,0 + ,96.3 + ,0 + ,0 + ,100.7 + ,0 + ,0 + ,101.2 + ,0 + ,0 + ,100.3 + ,0 + ,0 + ,97.8 + ,0 + ,0 + ,97.4 + ,0 + ,0 + ,98.6 + ,0 + ,0 + ,99.7 + ,0 + ,0 + ,99.0 + ,0 + ,0 + ,98.1 + ,0 + ,0 + ,97.0 + ,0 + ,0 + ,98.5 + ,0 + ,0 + ,103.8 + ,0 + ,0 + ,114.4 + ,0 + ,0 + ,124.5 + ,0 + ,0 + ,134.2 + ,0 + ,0 + ,131.8 + ,0 + ,0 + ,125.6 + ,0 + ,0 + ,119.9 + ,0 + ,0 + ,114.9 + ,0 + ,0 + ,115.5 + ,0 + ,0 + ,112.5 + ,0 + ,0 + ,111.4 + ,0 + ,0 + ,115.3 + ,0 + ,0 + ,110.8 + ,0 + ,0 + ,103.7 + ,0 + ,0 + ,111.1 + ,0 + ,1 + ,113.0 + ,0 + ,1 + ,111.2 + ,0 + ,1 + ,117.6 + ,0 + ,1 + ,121.7 + ,0 + ,1 + ,127.3 + ,0 + ,1 + ,129.8 + ,0 + ,1 + ,137.1 + ,0 + ,1 + ,141.4 + ,0 + ,1 + ,137.4 + ,0 + ,1 + ,130.7 + ,0 + ,1 + ,117.2 + ,0 + ,1 + ,110.8 + ,0 + ,-1 + ,111.4 + ,0 + ,-1 + ,108.2 + ,0 + ,-1 + ,108.8 + ,0 + ,-1 + ,110.2 + ,0 + ,-1 + ,109.5 + ,0 + ,-1 + ,109.5 + ,0 + ,-1 + ,116.0 + ,0 + ,-1 + ,111.2 + ,0 + ,-1 + ,112.1 + ,0 + ,-1 + ,114.0 + ,0 + ,-1 + ,119.1 + ,0 + ,-1 + ,114.1 + ,1 + ,-1 + ,115.1 + ,1 + ,-1 + ,115.4 + ,1 + ,-1 + ,110.8 + ,1 + ,0 + ,116.0 + ,1 + ,0 + ,119.2 + ,1 + ,0 + ,126.5 + ,1 + ,0 + ,127.8 + ,1 + ,0 + ,131.3 + ,1 + ,0 + ,140.3 + ,1 + ,0 + ,137.3 + ,1 + ,0 + ,143.0 + ,1 + ,0 + ,134.5 + ,1 + ,0 + ,139.9 + ,1 + ,0 + ,159.3 + ,1 + ,0 + ,170.4 + ,1 + ,0 + ,175.0 + ,1 + ,0 + ,175.8 + ,1 + ,0 + ,180.9 + ,1 + ,0 + ,180.3 + ,1 + ,0 + ,169.6 + ,1 + ,0 + ,172.3 + ,1 + ,0 + ,184.8 + ,1 + ,0 + ,177.7 + ,1 + ,0 + ,184.6 + ,1 + ,0 + ,211.4 + ,1 + ,0 + ,215.3 + ,1 + ,0 + ,215.9 + ,1 + ,0) + ,dim=c(3 + ,95) + ,dimnames=list(c('prijsindex' + ,'ontkoppelde_bedrijfstoeslag' + ,'oogstomvang') + ,1:95)) > y <- array(NA,dim=c(3,95),dimnames=list(c('prijsindex','ontkoppelde_bedrijfstoeslag','oogstomvang'),1:95)) > 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) > 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 prijsindex ontkoppelde_bedrijfstoeslag oogstomvang 1 102.7 0 0 2 103.2 0 0 3 105.6 0 0 4 103.9 0 0 5 107.2 0 0 6 100.7 0 0 7 92.1 0 0 8 90.3 0 0 9 93.4 0 0 10 98.5 0 0 11 100.8 0 0 12 102.3 0 0 13 104.7 0 0 14 101.1 0 0 15 101.4 0 0 16 99.5 0 0 17 98.4 0 0 18 96.3 0 0 19 100.7 0 0 20 101.2 0 0 21 100.3 0 0 22 97.8 0 0 23 97.4 0 0 24 98.6 0 0 25 99.7 0 0 26 99.0 0 0 27 98.1 0 0 28 97.0 0 0 29 98.5 0 0 30 103.8 0 0 31 114.4 0 0 32 124.5 0 0 33 134.2 0 0 34 131.8 0 0 35 125.6 0 0 36 119.9 0 0 37 114.9 0 0 38 115.5 0 0 39 112.5 0 0 40 111.4 0 0 41 115.3 0 0 42 110.8 0 0 43 103.7 0 0 44 111.1 0 1 45 113.0 0 1 46 111.2 0 1 47 117.6 0 1 48 121.7 0 1 49 127.3 0 1 50 129.8 0 1 51 137.1 0 1 52 141.4 0 1 53 137.4 0 1 54 130.7 0 1 55 117.2 0 1 56 110.8 0 -1 57 111.4 0 -1 58 108.2 0 -1 59 108.8 0 -1 60 110.2 0 -1 61 109.5 0 -1 62 109.5 0 -1 63 116.0 0 -1 64 111.2 0 -1 65 112.1 0 -1 66 114.0 0 -1 67 119.1 0 -1 68 114.1 1 -1 69 115.1 1 -1 70 115.4 1 -1 71 110.8 1 0 72 116.0 1 0 73 119.2 1 0 74 126.5 1 0 75 127.8 1 0 76 131.3 1 0 77 140.3 1 0 78 137.3 1 0 79 143.0 1 0 80 134.5 1 0 81 139.9 1 0 82 159.3 1 0 83 170.4 1 0 84 175.0 1 0 85 175.8 1 0 86 180.9 1 0 87 180.3 1 0 88 169.6 1 0 89 172.3 1 0 90 184.8 1 0 91 177.7 1 0 92 184.6 1 0 93 211.4 1 0 94 215.3 1 0 95 215.9 1 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ontkoppelde_bedrijfstoeslag 109.93 46.34 oogstomvang 10.33 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -45.467 -11.425 -3.055 12.154 59.633 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 109.925 2.389 46.011 < 2e-16 *** ontkoppelde_bedrijfstoeslag 46.342 4.419 10.486 < 2e-16 *** oogstomvang 10.330 3.786 2.728 0.00762 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 19.56 on 92 degrees of freedom Multiple R-Squared: 0.5515, Adjusted R-squared: 0.5417 F-statistic: 56.55 on 2 and 92 DF, p-value: < 2.2e-16 > postscript(file="/var/www/html/rcomp/tmp/1b99m1199885127.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/2tmc31199885127.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/37nr81199885127.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/4qtek1199885127.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/548yr1199885127.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 95 Frequency = 1 1 2 3 4 5 6 -7.2253731 -6.7253731 -4.3253731 -6.0253731 -2.7253731 -9.2253731 7 8 9 10 11 12 -17.8253731 -19.6253731 -16.5253731 -11.4253731 -9.1253731 -7.6253731 13 14 15 16 17 18 -5.2253731 -8.8253731 -8.5253731 -10.4253731 -11.5253731 -13.6253731 19 20 21 22 23 24 -9.2253731 -8.7253731 -9.6253731 -12.1253731 -12.5253731 -11.3253731 25 26 27 28 29 30 -10.2253731 -10.9253731 -11.8253731 -12.9253731 -11.4253731 -6.1253731 31 32 33 34 35 36 4.4746269 14.5746269 24.2746269 21.8746269 15.6746269 9.9746269 37 38 39 40 41 42 4.9746269 5.5746269 2.5746269 1.4746269 5.3746269 0.8746269 43 44 45 46 47 48 -6.2253731 -9.1550920 -7.2550920 -9.0550920 -2.6550920 1.4449080 49 50 51 52 53 54 7.0449080 9.5449080 16.8449080 21.1449080 17.1449080 10.4449080 55 56 57 58 59 60 -3.0550920 11.2043457 11.8043457 8.6043457 9.2043457 10.6043457 61 62 63 64 65 66 9.9043457 9.9043457 16.4043457 11.6043457 12.5043457 14.4043457 67 68 69 70 71 72 19.5043457 -31.8377510 -30.8377510 -30.5377510 -45.4674699 -40.2674699 73 74 75 76 77 78 -37.0674699 -29.7674699 -28.4674699 -24.9674699 -15.9674699 -18.9674699 79 80 81 82 83 84 -13.2674699 -21.7674699 -16.3674699 3.0325301 14.1325301 18.7325301 85 86 87 88 89 90 19.5325301 24.6325301 24.0325301 13.3325301 16.0325301 28.5325301 91 92 93 94 95 21.4325301 28.3325301 55.1325301 59.0325301 59.6325301 > postscript(file="/var/www/html/rcomp/tmp/6lz0w1199885128.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 = 95 Frequency = 1 lag(myerror, k = 1) myerror 0 -7.2253731 NA 1 -6.7253731 -7.2253731 2 -4.3253731 -6.7253731 3 -6.0253731 -4.3253731 4 -2.7253731 -6.0253731 5 -9.2253731 -2.7253731 6 -17.8253731 -9.2253731 7 -19.6253731 -17.8253731 8 -16.5253731 -19.6253731 9 -11.4253731 -16.5253731 10 -9.1253731 -11.4253731 11 -7.6253731 -9.1253731 12 -5.2253731 -7.6253731 13 -8.8253731 -5.2253731 14 -8.5253731 -8.8253731 15 -10.4253731 -8.5253731 16 -11.5253731 -10.4253731 17 -13.6253731 -11.5253731 18 -9.2253731 -13.6253731 19 -8.7253731 -9.2253731 20 -9.6253731 -8.7253731 21 -12.1253731 -9.6253731 22 -12.5253731 -12.1253731 23 -11.3253731 -12.5253731 24 -10.2253731 -11.3253731 25 -10.9253731 -10.2253731 26 -11.8253731 -10.9253731 27 -12.9253731 -11.8253731 28 -11.4253731 -12.9253731 29 -6.1253731 -11.4253731 30 4.4746269 -6.1253731 31 14.5746269 4.4746269 32 24.2746269 14.5746269 33 21.8746269 24.2746269 34 15.6746269 21.8746269 35 9.9746269 15.6746269 36 4.9746269 9.9746269 37 5.5746269 4.9746269 38 2.5746269 5.5746269 39 1.4746269 2.5746269 40 5.3746269 1.4746269 41 0.8746269 5.3746269 42 -6.2253731 0.8746269 43 -9.1550920 -6.2253731 44 -7.2550920 -9.1550920 45 -9.0550920 -7.2550920 46 -2.6550920 -9.0550920 47 1.4449080 -2.6550920 48 7.0449080 1.4449080 49 9.5449080 7.0449080 50 16.8449080 9.5449080 51 21.1449080 16.8449080 52 17.1449080 21.1449080 53 10.4449080 17.1449080 54 -3.0550920 10.4449080 55 11.2043457 -3.0550920 56 11.8043457 11.2043457 57 8.6043457 11.8043457 58 9.2043457 8.6043457 59 10.6043457 9.2043457 60 9.9043457 10.6043457 61 9.9043457 9.9043457 62 16.4043457 9.9043457 63 11.6043457 16.4043457 64 12.5043457 11.6043457 65 14.4043457 12.5043457 66 19.5043457 14.4043457 67 -31.8377510 19.5043457 68 -30.8377510 -31.8377510 69 -30.5377510 -30.8377510 70 -45.4674699 -30.5377510 71 -40.2674699 -45.4674699 72 -37.0674699 -40.2674699 73 -29.7674699 -37.0674699 74 -28.4674699 -29.7674699 75 -24.9674699 -28.4674699 76 -15.9674699 -24.9674699 77 -18.9674699 -15.9674699 78 -13.2674699 -18.9674699 79 -21.7674699 -13.2674699 80 -16.3674699 -21.7674699 81 3.0325301 -16.3674699 82 14.1325301 3.0325301 83 18.7325301 14.1325301 84 19.5325301 18.7325301 85 24.6325301 19.5325301 86 24.0325301 24.6325301 87 13.3325301 24.0325301 88 16.0325301 13.3325301 89 28.5325301 16.0325301 90 21.4325301 28.5325301 91 28.3325301 21.4325301 92 55.1325301 28.3325301 93 59.0325301 55.1325301 94 59.6325301 59.0325301 95 NA 59.6325301 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -6.7253731 -7.2253731 [2,] -4.3253731 -6.7253731 [3,] -6.0253731 -4.3253731 [4,] -2.7253731 -6.0253731 [5,] -9.2253731 -2.7253731 [6,] -17.8253731 -9.2253731 [7,] -19.6253731 -17.8253731 [8,] -16.5253731 -19.6253731 [9,] -11.4253731 -16.5253731 [10,] -9.1253731 -11.4253731 [11,] -7.6253731 -9.1253731 [12,] -5.2253731 -7.6253731 [13,] -8.8253731 -5.2253731 [14,] -8.5253731 -8.8253731 [15,] -10.4253731 -8.5253731 [16,] -11.5253731 -10.4253731 [17,] -13.6253731 -11.5253731 [18,] -9.2253731 -13.6253731 [19,] -8.7253731 -9.2253731 [20,] -9.6253731 -8.7253731 [21,] -12.1253731 -9.6253731 [22,] -12.5253731 -12.1253731 [23,] -11.3253731 -12.5253731 [24,] -10.2253731 -11.3253731 [25,] -10.9253731 -10.2253731 [26,] -11.8253731 -10.9253731 [27,] -12.9253731 -11.8253731 [28,] -11.4253731 -12.9253731 [29,] -6.1253731 -11.4253731 [30,] 4.4746269 -6.1253731 [31,] 14.5746269 4.4746269 [32,] 24.2746269 14.5746269 [33,] 21.8746269 24.2746269 [34,] 15.6746269 21.8746269 [35,] 9.9746269 15.6746269 [36,] 4.9746269 9.9746269 [37,] 5.5746269 4.9746269 [38,] 2.5746269 5.5746269 [39,] 1.4746269 2.5746269 [40,] 5.3746269 1.4746269 [41,] 0.8746269 5.3746269 [42,] -6.2253731 0.8746269 [43,] -9.1550920 -6.2253731 [44,] -7.2550920 -9.1550920 [45,] -9.0550920 -7.2550920 [46,] -2.6550920 -9.0550920 [47,] 1.4449080 -2.6550920 [48,] 7.0449080 1.4449080 [49,] 9.5449080 7.0449080 [50,] 16.8449080 9.5449080 [51,] 21.1449080 16.8449080 [52,] 17.1449080 21.1449080 [53,] 10.4449080 17.1449080 [54,] -3.0550920 10.4449080 [55,] 11.2043457 -3.0550920 [56,] 11.8043457 11.2043457 [57,] 8.6043457 11.8043457 [58,] 9.2043457 8.6043457 [59,] 10.6043457 9.2043457 [60,] 9.9043457 10.6043457 [61,] 9.9043457 9.9043457 [62,] 16.4043457 9.9043457 [63,] 11.6043457 16.4043457 [64,] 12.5043457 11.6043457 [65,] 14.4043457 12.5043457 [66,] 19.5043457 14.4043457 [67,] -31.8377510 19.5043457 [68,] -30.8377510 -31.8377510 [69,] -30.5377510 -30.8377510 [70,] -45.4674699 -30.5377510 [71,] -40.2674699 -45.4674699 [72,] -37.0674699 -40.2674699 [73,] -29.7674699 -37.0674699 [74,] -28.4674699 -29.7674699 [75,] -24.9674699 -28.4674699 [76,] -15.9674699 -24.9674699 [77,] -18.9674699 -15.9674699 [78,] -13.2674699 -18.9674699 [79,] -21.7674699 -13.2674699 [80,] -16.3674699 -21.7674699 [81,] 3.0325301 -16.3674699 [82,] 14.1325301 3.0325301 [83,] 18.7325301 14.1325301 [84,] 19.5325301 18.7325301 [85,] 24.6325301 19.5325301 [86,] 24.0325301 24.6325301 [87,] 13.3325301 24.0325301 [88,] 16.0325301 13.3325301 [89,] 28.5325301 16.0325301 [90,] 21.4325301 28.5325301 [91,] 28.3325301 21.4325301 [92,] 55.1325301 28.3325301 [93,] 59.0325301 55.1325301 [94,] 59.6325301 59.0325301 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -6.7253731 -7.2253731 2 -4.3253731 -6.7253731 3 -6.0253731 -4.3253731 4 -2.7253731 -6.0253731 5 -9.2253731 -2.7253731 6 -17.8253731 -9.2253731 7 -19.6253731 -17.8253731 8 -16.5253731 -19.6253731 9 -11.4253731 -16.5253731 10 -9.1253731 -11.4253731 11 -7.6253731 -9.1253731 12 -5.2253731 -7.6253731 13 -8.8253731 -5.2253731 14 -8.5253731 -8.8253731 15 -10.4253731 -8.5253731 16 -11.5253731 -10.4253731 17 -13.6253731 -11.5253731 18 -9.2253731 -13.6253731 19 -8.7253731 -9.2253731 20 -9.6253731 -8.7253731 21 -12.1253731 -9.6253731 22 -12.5253731 -12.1253731 23 -11.3253731 -12.5253731 24 -10.2253731 -11.3253731 25 -10.9253731 -10.2253731 26 -11.8253731 -10.9253731 27 -12.9253731 -11.8253731 28 -11.4253731 -12.9253731 29 -6.1253731 -11.4253731 30 4.4746269 -6.1253731 31 14.5746269 4.4746269 32 24.2746269 14.5746269 33 21.8746269 24.2746269 34 15.6746269 21.8746269 35 9.9746269 15.6746269 36 4.9746269 9.9746269 37 5.5746269 4.9746269 38 2.5746269 5.5746269 39 1.4746269 2.5746269 40 5.3746269 1.4746269 41 0.8746269 5.3746269 42 -6.2253731 0.8746269 43 -9.1550920 -6.2253731 44 -7.2550920 -9.1550920 45 -9.0550920 -7.2550920 46 -2.6550920 -9.0550920 47 1.4449080 -2.6550920 48 7.0449080 1.4449080 49 9.5449080 7.0449080 50 16.8449080 9.5449080 51 21.1449080 16.8449080 52 17.1449080 21.1449080 53 10.4449080 17.1449080 54 -3.0550920 10.4449080 55 11.2043457 -3.0550920 56 11.8043457 11.2043457 57 8.6043457 11.8043457 58 9.2043457 8.6043457 59 10.6043457 9.2043457 60 9.9043457 10.6043457 61 9.9043457 9.9043457 62 16.4043457 9.9043457 63 11.6043457 16.4043457 64 12.5043457 11.6043457 65 14.4043457 12.5043457 66 19.5043457 14.4043457 67 -31.8377510 19.5043457 68 -30.8377510 -31.8377510 69 -30.5377510 -30.8377510 70 -45.4674699 -30.5377510 71 -40.2674699 -45.4674699 72 -37.0674699 -40.2674699 73 -29.7674699 -37.0674699 74 -28.4674699 -29.7674699 75 -24.9674699 -28.4674699 76 -15.9674699 -24.9674699 77 -18.9674699 -15.9674699 78 -13.2674699 -18.9674699 79 -21.7674699 -13.2674699 80 -16.3674699 -21.7674699 81 3.0325301 -16.3674699 82 14.1325301 3.0325301 83 18.7325301 14.1325301 84 19.5325301 18.7325301 85 24.6325301 19.5325301 86 24.0325301 24.6325301 87 13.3325301 24.0325301 88 16.0325301 13.3325301 89 28.5325301 16.0325301 90 21.4325301 28.5325301 91 28.3325301 21.4325301 92 55.1325301 28.3325301 93 59.0325301 55.1325301 94 59.6325301 59.0325301 > 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/7skib1199885128.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/833ao1199885128.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/957bo1199885128.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 > 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/109lvz1199885128.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/11bckl1199885128.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/12gmjq1199885128.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/13ahoh1199885128.tab") > > system("convert tmp/1b99m1199885127.ps tmp/1b99m1199885127.png") > system("convert tmp/2tmc31199885127.ps tmp/2tmc31199885127.png") > system("convert tmp/37nr81199885127.ps tmp/37nr81199885127.png") > system("convert tmp/4qtek1199885127.ps tmp/4qtek1199885127.png") > system("convert tmp/548yr1199885127.ps tmp/548yr1199885127.png") > system("convert tmp/6lz0w1199885128.ps tmp/6lz0w1199885128.png") > system("convert tmp/7skib1199885128.ps tmp/7skib1199885128.png") > system("convert tmp/833ao1199885128.ps tmp/833ao1199885128.png") > system("convert tmp/957bo1199885128.ps tmp/957bo1199885128.png") > > > proc.time() user system elapsed 2.437 1.559 2.884