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,2,6.2,1.8,6.1,2.7,6.3,2.3,6.5,1.9,6.6,2,6.5,2.3,6.2,2.8,6.2,2.4,5.9,2.3,6.1,2.7,6.1,2.7,6.1,2.9,6.1,3,6.1,2.2,6.4,2.3,6.7,2.8,6.9,2.8,7,2.8,7,2.2,6.8,2.6,6.4,2.8,5.9,2.5,5.5,2.4,5.5,2.3,5.6,1.9,5.8,1.7,5.9,2,6.1,2.1,6.1,1.7,6,1.8,6,1.8,5.9,1.8,5.5,1.3,5.6,1.3,5.4,1.3,5.2,1.2,5.2,1.4,5.2,2.2,5.5,2.9,5.8,3.1,5.8,3.5,5.5,3.6,5.3,4.4,5.1,4.1,5.2,5.1,5.8,5.8,5.8,5.9,5.5,5.4,5,5.5,4.9,4.8,5.3,3.2,6.1,2.7,6.5,2.1,6.8,1.9,6.6,0.6,6.4,0.7,6.4,-0.2,6.6,-1,6.7,-1.7),dim=c(2,60),dimnames=list(c('WMan>25','Infl'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('WMan>25','Infl'),1:60)) > 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 WMan>25 Infl 1 6.3 2.0 2 6.2 1.8 3 6.1 2.7 4 6.3 2.3 5 6.5 1.9 6 6.6 2.0 7 6.5 2.3 8 6.2 2.8 9 6.2 2.4 10 5.9 2.3 11 6.1 2.7 12 6.1 2.7 13 6.1 2.9 14 6.1 3.0 15 6.1 2.2 16 6.4 2.3 17 6.7 2.8 18 6.9 2.8 19 7.0 2.8 20 7.0 2.2 21 6.8 2.6 22 6.4 2.8 23 5.9 2.5 24 5.5 2.4 25 5.5 2.3 26 5.6 1.9 27 5.8 1.7 28 5.9 2.0 29 6.1 2.1 30 6.1 1.7 31 6.0 1.8 32 6.0 1.8 33 5.9 1.8 34 5.5 1.3 35 5.6 1.3 36 5.4 1.3 37 5.2 1.2 38 5.2 1.4 39 5.2 2.2 40 5.5 2.9 41 5.8 3.1 42 5.8 3.5 43 5.5 3.6 44 5.3 4.4 45 5.1 4.1 46 5.2 5.1 47 5.8 5.8 48 5.8 5.9 49 5.5 5.4 50 5.0 5.5 51 4.9 4.8 52 5.3 3.2 53 6.1 2.7 54 6.5 2.1 55 6.8 1.9 56 6.6 0.6 57 6.4 0.7 58 6.4 -0.2 59 6.6 -1.0 60 6.7 -1.7 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Infl 6.3859 -0.1605 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.99332 -0.37057 0.04621 0.28999 1.06343 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.3859 0.1266 50.43 < 2e-16 *** Infl -0.1605 0.0447 -3.59 0.000682 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.4884 on 58 degrees of freedom Multiple R-squared: 0.1818, Adjusted R-squared: 0.1677 F-statistic: 12.89 on 1 and 58 DF, p-value: 0.0006817 > 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,] 2.749808e-02 5.499616e-02 0.972501918 [2,] 2.652796e-02 5.305592e-02 0.973472040 [3,] 1.525265e-02 3.050530e-02 0.984747352 [4,] 4.784753e-03 9.569506e-03 0.995215247 [5,] 1.613789e-03 3.227579e-03 0.998386211 [6,] 4.148491e-03 8.296983e-03 0.995851509 [7,] 1.502208e-03 3.004417e-03 0.998497792 [8,] 5.121215e-04 1.024243e-03 0.999487878 [9,] 1.650699e-04 3.301399e-04 0.999834930 [10,] 5.220670e-05 1.044134e-04 0.999947793 [11,] 2.622171e-05 5.244342e-05 0.999973778 [12,] 1.210962e-05 2.421923e-05 0.999987890 [13,] 2.043705e-04 4.087411e-04 0.999795629 [14,] 3.296052e-03 6.592103e-03 0.996703948 [15,] 2.565855e-02 5.131710e-02 0.974341452 [16,] 9.426790e-02 1.885358e-01 0.905732102 [17,] 1.629260e-01 3.258520e-01 0.837073981 [18,] 1.555467e-01 3.110935e-01 0.844453257 [19,] 1.653525e-01 3.307051e-01 0.834647469 [20,] 3.075060e-01 6.150120e-01 0.692494000 [21,] 4.263207e-01 8.526414e-01 0.573679279 [22,] 4.582096e-01 9.164192e-01 0.541790421 [23,] 4.062623e-01 8.125246e-01 0.593737699 [24,] 3.464102e-01 6.928204e-01 0.653589778 [25,] 2.893742e-01 5.787484e-01 0.710625807 [26,] 2.335841e-01 4.671682e-01 0.766415899 [27,] 1.817166e-01 3.634332e-01 0.818283380 [28,] 1.377458e-01 2.754915e-01 0.862254247 [29,] 1.024892e-01 2.049784e-01 0.897510796 [30,] 9.939228e-02 1.987846e-01 0.900607724 [31,] 8.342542e-02 1.668508e-01 0.916574584 [32,] 9.496714e-02 1.899343e-01 0.905032865 [33,] 1.711961e-01 3.423922e-01 0.828803876 [34,] 3.215667e-01 6.431334e-01 0.678433295 [35,] 5.814748e-01 8.370503e-01 0.418525157 [36,] 6.722023e-01 6.555954e-01 0.327797705 [37,] 6.484051e-01 7.031898e-01 0.351594895 [38,] 6.311899e-01 7.376202e-01 0.368810119 [39,] 6.560701e-01 6.878597e-01 0.343929863 [40,] 7.000703e-01 5.998594e-01 0.299929695 [41,] 7.871815e-01 4.256369e-01 0.212818472 [42,] 7.714537e-01 4.570926e-01 0.228546324 [43,] 7.549472e-01 4.901056e-01 0.245052778 [44,] 7.923006e-01 4.153989e-01 0.207699432 [45,] 7.461193e-01 5.077614e-01 0.253880680 [46,] 6.842346e-01 6.315308e-01 0.315765419 [47,] 7.811639e-01 4.376723e-01 0.218836134 [48,] 9.825313e-01 3.493741e-02 0.017468706 [49,] 9.904194e-01 1.916123e-02 0.009580616 [50,] 9.725846e-01 5.483079e-02 0.027415394 [51,] 9.839967e-01 3.200657e-02 0.016003284 > postscript(file="/var/www/html/rcomp/tmp/1hcv51258810796.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/23cir1258810796.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/35sfb1258810796.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/4iruh1258810796.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/5n4ue1258810796.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 = 60 Frequency = 1 1 2 3 4 5 6 0.23505203 0.10295803 0.14738103 0.28319303 0.41900503 0.53505203 7 8 9 10 11 12 0.48319303 0.26342803 0.19924003 -0.11680697 0.14738103 0.14738103 13 14 15 16 17 18 0.17947503 0.19552203 0.06714603 0.38319303 0.76342803 0.96342803 19 20 21 22 23 24 1.06342803 0.96714603 0.83133403 0.46342803 -0.08471297 -0.50075997 25 26 27 28 29 30 -0.51680697 -0.48099497 -0.31308897 -0.16494797 0.05109903 -0.01308897 31 32 33 34 35 36 -0.09704197 -0.09704197 -0.19704197 -0.67727697 -0.57727697 -0.77727697 37 38 39 40 41 42 -0.99332397 -0.96122997 -0.83285397 -0.42052497 -0.08843097 -0.02424297 43 44 45 46 47 48 -0.30819597 -0.37981997 -0.62796097 -0.36749096 0.34483804 0.36088504 49 50 51 52 53 54 -0.01934996 -0.50330296 -0.71563196 -0.57238397 0.14738103 0.45109903 55 56 57 58 59 60 0.71900503 0.31039403 0.12644103 -0.01798197 0.05364203 0.04131303 > postscript(file="/var/www/html/rcomp/tmp/6munp1258810796.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 0.23505203 NA 1 0.10295803 0.23505203 2 0.14738103 0.10295803 3 0.28319303 0.14738103 4 0.41900503 0.28319303 5 0.53505203 0.41900503 6 0.48319303 0.53505203 7 0.26342803 0.48319303 8 0.19924003 0.26342803 9 -0.11680697 0.19924003 10 0.14738103 -0.11680697 11 0.14738103 0.14738103 12 0.17947503 0.14738103 13 0.19552203 0.17947503 14 0.06714603 0.19552203 15 0.38319303 0.06714603 16 0.76342803 0.38319303 17 0.96342803 0.76342803 18 1.06342803 0.96342803 19 0.96714603 1.06342803 20 0.83133403 0.96714603 21 0.46342803 0.83133403 22 -0.08471297 0.46342803 23 -0.50075997 -0.08471297 24 -0.51680697 -0.50075997 25 -0.48099497 -0.51680697 26 -0.31308897 -0.48099497 27 -0.16494797 -0.31308897 28 0.05109903 -0.16494797 29 -0.01308897 0.05109903 30 -0.09704197 -0.01308897 31 -0.09704197 -0.09704197 32 -0.19704197 -0.09704197 33 -0.67727697 -0.19704197 34 -0.57727697 -0.67727697 35 -0.77727697 -0.57727697 36 -0.99332397 -0.77727697 37 -0.96122997 -0.99332397 38 -0.83285397 -0.96122997 39 -0.42052497 -0.83285397 40 -0.08843097 -0.42052497 41 -0.02424297 -0.08843097 42 -0.30819597 -0.02424297 43 -0.37981997 -0.30819597 44 -0.62796097 -0.37981997 45 -0.36749096 -0.62796097 46 0.34483804 -0.36749096 47 0.36088504 0.34483804 48 -0.01934996 0.36088504 49 -0.50330296 -0.01934996 50 -0.71563196 -0.50330296 51 -0.57238397 -0.71563196 52 0.14738103 -0.57238397 53 0.45109903 0.14738103 54 0.71900503 0.45109903 55 0.31039403 0.71900503 56 0.12644103 0.31039403 57 -0.01798197 0.12644103 58 0.05364203 -0.01798197 59 0.04131303 0.05364203 60 NA 0.04131303 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.10295803 0.23505203 [2,] 0.14738103 0.10295803 [3,] 0.28319303 0.14738103 [4,] 0.41900503 0.28319303 [5,] 0.53505203 0.41900503 [6,] 0.48319303 0.53505203 [7,] 0.26342803 0.48319303 [8,] 0.19924003 0.26342803 [9,] -0.11680697 0.19924003 [10,] 0.14738103 -0.11680697 [11,] 0.14738103 0.14738103 [12,] 0.17947503 0.14738103 [13,] 0.19552203 0.17947503 [14,] 0.06714603 0.19552203 [15,] 0.38319303 0.06714603 [16,] 0.76342803 0.38319303 [17,] 0.96342803 0.76342803 [18,] 1.06342803 0.96342803 [19,] 0.96714603 1.06342803 [20,] 0.83133403 0.96714603 [21,] 0.46342803 0.83133403 [22,] -0.08471297 0.46342803 [23,] -0.50075997 -0.08471297 [24,] -0.51680697 -0.50075997 [25,] -0.48099497 -0.51680697 [26,] -0.31308897 -0.48099497 [27,] -0.16494797 -0.31308897 [28,] 0.05109903 -0.16494797 [29,] -0.01308897 0.05109903 [30,] -0.09704197 -0.01308897 [31,] -0.09704197 -0.09704197 [32,] -0.19704197 -0.09704197 [33,] -0.67727697 -0.19704197 [34,] -0.57727697 -0.67727697 [35,] -0.77727697 -0.57727697 [36,] -0.99332397 -0.77727697 [37,] -0.96122997 -0.99332397 [38,] -0.83285397 -0.96122997 [39,] -0.42052497 -0.83285397 [40,] -0.08843097 -0.42052497 [41,] -0.02424297 -0.08843097 [42,] -0.30819597 -0.02424297 [43,] -0.37981997 -0.30819597 [44,] -0.62796097 -0.37981997 [45,] -0.36749096 -0.62796097 [46,] 0.34483804 -0.36749096 [47,] 0.36088504 0.34483804 [48,] -0.01934996 0.36088504 [49,] -0.50330296 -0.01934996 [50,] -0.71563196 -0.50330296 [51,] -0.57238397 -0.71563196 [52,] 0.14738103 -0.57238397 [53,] 0.45109903 0.14738103 [54,] 0.71900503 0.45109903 [55,] 0.31039403 0.71900503 [56,] 0.12644103 0.31039403 [57,] -0.01798197 0.12644103 [58,] 0.05364203 -0.01798197 [59,] 0.04131303 0.05364203 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.10295803 0.23505203 2 0.14738103 0.10295803 3 0.28319303 0.14738103 4 0.41900503 0.28319303 5 0.53505203 0.41900503 6 0.48319303 0.53505203 7 0.26342803 0.48319303 8 0.19924003 0.26342803 9 -0.11680697 0.19924003 10 0.14738103 -0.11680697 11 0.14738103 0.14738103 12 0.17947503 0.14738103 13 0.19552203 0.17947503 14 0.06714603 0.19552203 15 0.38319303 0.06714603 16 0.76342803 0.38319303 17 0.96342803 0.76342803 18 1.06342803 0.96342803 19 0.96714603 1.06342803 20 0.83133403 0.96714603 21 0.46342803 0.83133403 22 -0.08471297 0.46342803 23 -0.50075997 -0.08471297 24 -0.51680697 -0.50075997 25 -0.48099497 -0.51680697 26 -0.31308897 -0.48099497 27 -0.16494797 -0.31308897 28 0.05109903 -0.16494797 29 -0.01308897 0.05109903 30 -0.09704197 -0.01308897 31 -0.09704197 -0.09704197 32 -0.19704197 -0.09704197 33 -0.67727697 -0.19704197 34 -0.57727697 -0.67727697 35 -0.77727697 -0.57727697 36 -0.99332397 -0.77727697 37 -0.96122997 -0.99332397 38 -0.83285397 -0.96122997 39 -0.42052497 -0.83285397 40 -0.08843097 -0.42052497 41 -0.02424297 -0.08843097 42 -0.30819597 -0.02424297 43 -0.37981997 -0.30819597 44 -0.62796097 -0.37981997 45 -0.36749096 -0.62796097 46 0.34483804 -0.36749096 47 0.36088504 0.34483804 48 -0.01934996 0.36088504 49 -0.50330296 -0.01934996 50 -0.71563196 -0.50330296 51 -0.57238397 -0.71563196 52 0.14738103 -0.57238397 53 0.45109903 0.14738103 54 0.71900503 0.45109903 55 0.31039403 0.71900503 56 0.12644103 0.31039403 57 -0.01798197 0.12644103 58 0.05364203 -0.01798197 59 0.04131303 0.05364203 > 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/7ay7c1258810796.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/8kbo21258810796.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/9v68k1258810796.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/107uex1258810796.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/11fqfm1258810796.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/12whdh1258810796.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/13xyqi1258810796.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/14tbkn1258810796.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/15zamq1258810796.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/16pqu61258810796.tab") + } > > system("convert tmp/1hcv51258810796.ps tmp/1hcv51258810796.png") > system("convert tmp/23cir1258810796.ps tmp/23cir1258810796.png") > system("convert tmp/35sfb1258810796.ps tmp/35sfb1258810796.png") > system("convert tmp/4iruh1258810796.ps tmp/4iruh1258810796.png") > system("convert tmp/5n4ue1258810796.ps tmp/5n4ue1258810796.png") > system("convert tmp/6munp1258810796.ps tmp/6munp1258810796.png") > system("convert tmp/7ay7c1258810796.ps tmp/7ay7c1258810796.png") > system("convert tmp/8kbo21258810796.ps tmp/8kbo21258810796.png") > system("convert tmp/9v68k1258810796.ps tmp/9v68k1258810796.png") > system("convert tmp/107uex1258810796.ps tmp/107uex1258810796.png") > > > proc.time() user system elapsed 2.446 1.557 3.476