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(6.3,1000.00,3,2.1,2547000.00,4,9.1,10550.00,4,15.8,0.02,1,5.2,160000.00,4,10.9,3300.00,1,8.3,52160.00,1,11,0.43,4,3.2,465000.00,5,7.6,0.55,2,6.3,0.08,1,8.6,3000.00,2,6.6,0.79,2,9.5,0.20,2,4.8,1410.00,1,12,60000.00,1,3.3,27660.00,5,11,0.12,2,4.7,85000.00,1,10.4,0.10,3,7.4,1040.00,4,2.1,521000.00,5,7.7,0.01,4,17.9,0.01,1,6.1,62000.00,1,8.2,0.12,1,8.4,1350.00,3,11.9,0.02,3,10.8,0.05,3,13.8,1700.00,1,14.3,3500.00,1,15.2,0.48,2,10,10000.00,4,11.9,1620.00,2,6.5,192000.00,4,7.5,2500.00,5,10.6,0.28,3,7.4,4235.00,1,8.4,6800.00,2,5.7,0.75,2,4.9,3600.00,3,3.2,55500.00,5,8.1,0.06,2,11,0.90,2,4.9,2000.00,3,13.2,0.10,2,9.7,4190.00,4,12.8,3500.00,1),dim=c(3,48),dimnames=list(c('SWS','Body-Weight','Overall-danger '),1:48)) > y <- array(NA,dim=c(3,48),dimnames=list(c('SWS','Body-Weight','Overall-danger '),1:48)) > 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 SWS Body-Weight Overall-danger\r 1 6.3 1.000e+03 3 2 2.1 2.547e+06 4 3 9.1 1.055e+04 4 4 15.8 2.000e-02 1 5 5.2 1.600e+05 4 6 10.9 3.300e+03 1 7 8.3 5.216e+04 1 8 11.0 4.300e-01 4 9 3.2 4.650e+05 5 10 7.6 5.500e-01 2 11 6.3 8.000e-02 1 12 8.6 3.000e+03 2 13 6.6 7.900e-01 2 14 9.5 2.000e-01 2 15 4.8 1.410e+03 1 16 12.0 6.000e+04 1 17 3.3 2.766e+04 5 18 11.0 1.200e-01 2 19 4.7 8.500e+04 1 20 10.4 1.000e-01 3 21 7.4 1.040e+03 4 22 2.1 5.210e+05 5 23 7.7 1.000e-02 4 24 17.9 1.000e-02 1 25 6.1 6.200e+04 1 26 8.2 1.200e-01 1 27 8.4 1.350e+03 3 28 11.9 2.000e-02 3 29 10.8 5.000e-02 3 30 13.8 1.700e+03 1 31 14.3 3.500e+03 1 32 15.2 4.800e-01 2 33 10.0 1.000e+04 4 34 11.9 1.620e+03 2 35 6.5 1.920e+05 4 36 7.5 2.500e+03 5 37 10.6 2.800e-01 3 38 7.4 4.235e+03 1 39 8.4 6.800e+03 2 40 5.7 7.500e-01 2 41 4.9 3.600e+03 3 42 3.2 5.550e+04 5 43 8.1 6.000e-02 2 44 11.0 9.000e-01 2 45 4.9 2.000e+03 3 46 13.2 1.000e-01 2 47 9.7 4.190e+03 4 48 12.8 3.500e+03 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `Body-Weight` `Overall-danger\r` 1.175e+01 -2.598e-06 -1.109e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.83453 -2.51575 0.03767 2.22879 7.26181 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.175e+01 9.767e-01 12.028 1.18e-15 *** `Body-Weight` -2.598e-06 1.257e-06 -2.066 0.04464 * `Overall-danger\r` -1.109e+00 3.467e-01 -3.199 0.00253 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.134 on 45 degrees of freedom Multiple R-squared: 0.3004, Adjusted R-squared: 0.2694 F-statistic: 9.663 on 2 and 45 DF, p-value: 0.0003224 > 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.5480660 0.9038681 0.4519340 [2,] 0.5899462 0.8201076 0.4100538 [3,] 0.6110782 0.7778437 0.3889218 [4,] 0.5283314 0.9433372 0.4716686 [5,] 0.4703084 0.9406168 0.5296916 [6,] 0.5631377 0.8737245 0.4368623 [7,] 0.4558859 0.9117718 0.5441141 [8,] 0.4200069 0.8400138 0.5799931 [9,] 0.3238553 0.6477106 0.6761447 [10,] 0.4918485 0.9836971 0.5081515 [11,] 0.4573982 0.9147965 0.5426018 [12,] 0.4397488 0.8794976 0.5602512 [13,] 0.3853910 0.7707819 0.6146090 [14,] 0.5353891 0.9292218 0.4646109 [15,] 0.4926936 0.9853873 0.5073064 [16,] 0.4053555 0.8107110 0.5946445 [17,] 0.3732643 0.7465286 0.6267357 [18,] 0.2972627 0.5945254 0.7027373 [19,] 0.6724812 0.6550375 0.3275188 [20,] 0.7154081 0.5691839 0.2845919 [21,] 0.7020343 0.5959314 0.2979657 [22,] 0.6246755 0.7506490 0.3753245 [23,] 0.6299765 0.7400469 0.3700235 [24,] 0.5825957 0.8348087 0.4174043 [25,] 0.5605232 0.8789536 0.4394768 [26,] 0.5695783 0.8608435 0.4304217 [27,] 0.7487594 0.5024811 0.2512406 [28,] 0.7264208 0.5471584 0.2735792 [29,] 0.6992656 0.6014688 0.3007344 [30,] 0.6826758 0.6346484 0.3173242 [31,] 0.5843510 0.8312980 0.4156490 [32,] 0.5328191 0.9343617 0.4671809 [33,] 0.5140202 0.9719597 0.4859798 [34,] 0.3989117 0.7978233 0.6010883 [35,] 0.4640904 0.9281808 0.5359096 [36,] 0.4889896 0.9779792 0.5110104 [37,] 0.3568482 0.7136963 0.6431518 > postscript(file="/var/www/html/rcomp/tmp/1seko1292365156.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/rcomp/tmp/2seko1292365156.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/rcomp/tmp/3l6js1292365156.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/rcomp/tmp/4l6js1292365156.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/rcomp/tmp/5l6js1292365156.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 = 48 Frequency = 1 1 2 3 4 5 6 -2.11738811 1.40520533 1.81652347 5.16180533 -1.69526525 0.27037736 7 8 9 10 11 12 -2.20270392 3.68911991 -1.79389283 -1.92908879 -4.33819451 -0.92129742 13 14 15 16 17 18 -2.92908816 -0.02908970 -5.83453210 1.51766126 -2.82992710 1.47091010 19 20 21 22 23 24 -5.71739874 1.98001455 0.09182030 -2.74842724 0.38911882 7.26180531 25 26 27 28 29 30 -4.37714354 -2.43819441 -0.01647895 3.48001434 2.38001442 3.16622120 31 32 33 34 35 36 3.67089688 5.67091103 2.71509479 2.37511790 -0.31214206 1.30471730 37 38 39 40 41 42 2.18001502 -3.22719389 -1.11142654 -3.82908827 -3.51063435 -2.85760992 43 44 45 46 47 48 -1.42909006 1.47091212 -3.51479051 3.67091004 2.40000273 2.17089688 > postscript(file="/var/www/html/rcomp/tmp/6wx1v1292365156.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 = 48 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.11738811 NA 1 1.40520533 -2.11738811 2 1.81652347 1.40520533 3 5.16180533 1.81652347 4 -1.69526525 5.16180533 5 0.27037736 -1.69526525 6 -2.20270392 0.27037736 7 3.68911991 -2.20270392 8 -1.79389283 3.68911991 9 -1.92908879 -1.79389283 10 -4.33819451 -1.92908879 11 -0.92129742 -4.33819451 12 -2.92908816 -0.92129742 13 -0.02908970 -2.92908816 14 -5.83453210 -0.02908970 15 1.51766126 -5.83453210 16 -2.82992710 1.51766126 17 1.47091010 -2.82992710 18 -5.71739874 1.47091010 19 1.98001455 -5.71739874 20 0.09182030 1.98001455 21 -2.74842724 0.09182030 22 0.38911882 -2.74842724 23 7.26180531 0.38911882 24 -4.37714354 7.26180531 25 -2.43819441 -4.37714354 26 -0.01647895 -2.43819441 27 3.48001434 -0.01647895 28 2.38001442 3.48001434 29 3.16622120 2.38001442 30 3.67089688 3.16622120 31 5.67091103 3.67089688 32 2.71509479 5.67091103 33 2.37511790 2.71509479 34 -0.31214206 2.37511790 35 1.30471730 -0.31214206 36 2.18001502 1.30471730 37 -3.22719389 2.18001502 38 -1.11142654 -3.22719389 39 -3.82908827 -1.11142654 40 -3.51063435 -3.82908827 41 -2.85760992 -3.51063435 42 -1.42909006 -2.85760992 43 1.47091212 -1.42909006 44 -3.51479051 1.47091212 45 3.67091004 -3.51479051 46 2.40000273 3.67091004 47 2.17089688 2.40000273 48 NA 2.17089688 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.40520533 -2.11738811 [2,] 1.81652347 1.40520533 [3,] 5.16180533 1.81652347 [4,] -1.69526525 5.16180533 [5,] 0.27037736 -1.69526525 [6,] -2.20270392 0.27037736 [7,] 3.68911991 -2.20270392 [8,] -1.79389283 3.68911991 [9,] -1.92908879 -1.79389283 [10,] -4.33819451 -1.92908879 [11,] -0.92129742 -4.33819451 [12,] -2.92908816 -0.92129742 [13,] -0.02908970 -2.92908816 [14,] -5.83453210 -0.02908970 [15,] 1.51766126 -5.83453210 [16,] -2.82992710 1.51766126 [17,] 1.47091010 -2.82992710 [18,] -5.71739874 1.47091010 [19,] 1.98001455 -5.71739874 [20,] 0.09182030 1.98001455 [21,] -2.74842724 0.09182030 [22,] 0.38911882 -2.74842724 [23,] 7.26180531 0.38911882 [24,] -4.37714354 7.26180531 [25,] -2.43819441 -4.37714354 [26,] -0.01647895 -2.43819441 [27,] 3.48001434 -0.01647895 [28,] 2.38001442 3.48001434 [29,] 3.16622120 2.38001442 [30,] 3.67089688 3.16622120 [31,] 5.67091103 3.67089688 [32,] 2.71509479 5.67091103 [33,] 2.37511790 2.71509479 [34,] -0.31214206 2.37511790 [35,] 1.30471730 -0.31214206 [36,] 2.18001502 1.30471730 [37,] -3.22719389 2.18001502 [38,] -1.11142654 -3.22719389 [39,] -3.82908827 -1.11142654 [40,] -3.51063435 -3.82908827 [41,] -2.85760992 -3.51063435 [42,] -1.42909006 -2.85760992 [43,] 1.47091212 -1.42909006 [44,] -3.51479051 1.47091212 [45,] 3.67091004 -3.51479051 [46,] 2.40000273 3.67091004 [47,] 2.17089688 2.40000273 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.40520533 -2.11738811 2 1.81652347 1.40520533 3 5.16180533 1.81652347 4 -1.69526525 5.16180533 5 0.27037736 -1.69526525 6 -2.20270392 0.27037736 7 3.68911991 -2.20270392 8 -1.79389283 3.68911991 9 -1.92908879 -1.79389283 10 -4.33819451 -1.92908879 11 -0.92129742 -4.33819451 12 -2.92908816 -0.92129742 13 -0.02908970 -2.92908816 14 -5.83453210 -0.02908970 15 1.51766126 -5.83453210 16 -2.82992710 1.51766126 17 1.47091010 -2.82992710 18 -5.71739874 1.47091010 19 1.98001455 -5.71739874 20 0.09182030 1.98001455 21 -2.74842724 0.09182030 22 0.38911882 -2.74842724 23 7.26180531 0.38911882 24 -4.37714354 7.26180531 25 -2.43819441 -4.37714354 26 -0.01647895 -2.43819441 27 3.48001434 -0.01647895 28 2.38001442 3.48001434 29 3.16622120 2.38001442 30 3.67089688 3.16622120 31 5.67091103 3.67089688 32 2.71509479 5.67091103 33 2.37511790 2.71509479 34 -0.31214206 2.37511790 35 1.30471730 -0.31214206 36 2.18001502 1.30471730 37 -3.22719389 2.18001502 38 -1.11142654 -3.22719389 39 -3.82908827 -1.11142654 40 -3.51063435 -3.82908827 41 -2.85760992 -3.51063435 42 -1.42909006 -2.85760992 43 1.47091212 -1.42909006 44 -3.51479051 1.47091212 45 3.67091004 -3.51479051 46 2.40000273 3.67091004 47 2.17089688 2.40000273 > 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/7o6if1292365156.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/rcomp/tmp/8o6if1292365156.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/rcomp/tmp/9o6if1292365156.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/rcomp/tmp/10hghj1292365156.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/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/11kgyo1292365156.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/12ozwu1292365156.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/13kqc31292365156.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/1459sr1292365156.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/1599rf1292365156.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/16caq31292365156.tab") + } > > try(system("convert tmp/1seko1292365156.ps tmp/1seko1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/2seko1292365156.ps tmp/2seko1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/3l6js1292365156.ps tmp/3l6js1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/4l6js1292365156.ps tmp/4l6js1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/5l6js1292365156.ps tmp/5l6js1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/6wx1v1292365156.ps tmp/6wx1v1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/7o6if1292365156.ps tmp/7o6if1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/8o6if1292365156.ps tmp/8o6if1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/9o6if1292365156.ps tmp/9o6if1292365156.png",intern=TRUE)) character(0) > try(system("convert tmp/10hghj1292365156.ps tmp/10hghj1292365156.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.394 1.698 6.194