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(4.3,96.2,4.1,96.8,3.9,109.9,3.8,88,3.7,91.1,3.7,106.4,4.1,68.6,4.1,100.1,3.8,108,3.7,106,3.5,108.6,3.6,91.5,4.1,99.2,3.8,98,3.7,96.6,3.6,102.8,3.3,96.9,3.4,110,3.7,70.5,3.7,101.9,3.4,109.6,3.3,107.8,3,113,3,93.8,3.3,108,3,102.8,2.9,116.3,2.8,89.2,2.5,106.7,2.6,112.1,2.8,74.2,2.7,108.8,2.4,111.5,2.2,118.8,2.1,118.9,2.1,97.6,2.3,116.4,2.1,107.9,2,121.2,1.9,97.9,1.7,113.4,1.8,117.6,2.1,79.6,2,115.9,1.8,115.7,1.7,129.1,1.6,123.3,1.6,96.7,1.8,121.2,1.7,118.2,1.7,102.1,1.5,125.4,1.5,116.7,1.5,121.3,1.8,85.3,1.8,114.2,1.7,124.4,1.7,131,1.8,118.3,2,99.6),dim=c(2,60),dimnames=list(c('unempl','proman'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('unempl','proman'),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 unempl proman 1 4.3 96.2 2 4.1 96.8 3 3.9 109.9 4 3.8 88.0 5 3.7 91.1 6 3.7 106.4 7 4.1 68.6 8 4.1 100.1 9 3.8 108.0 10 3.7 106.0 11 3.5 108.6 12 3.6 91.5 13 4.1 99.2 14 3.8 98.0 15 3.7 96.6 16 3.6 102.8 17 3.3 96.9 18 3.4 110.0 19 3.7 70.5 20 3.7 101.9 21 3.4 109.6 22 3.3 107.8 23 3.0 113.0 24 3.0 93.8 25 3.3 108.0 26 3.0 102.8 27 2.9 116.3 28 2.8 89.2 29 2.5 106.7 30 2.6 112.1 31 2.8 74.2 32 2.7 108.8 33 2.4 111.5 34 2.2 118.8 35 2.1 118.9 36 2.1 97.6 37 2.3 116.4 38 2.1 107.9 39 2.0 121.2 40 1.9 97.9 41 1.7 113.4 42 1.8 117.6 43 2.1 79.6 44 2.0 115.9 45 1.8 115.7 46 1.7 129.1 47 1.6 123.3 48 1.6 96.7 49 1.8 121.2 50 1.7 118.2 51 1.7 102.1 52 1.5 125.4 53 1.5 116.7 54 1.5 121.3 55 1.8 85.3 56 1.8 114.2 57 1.7 124.4 58 1.7 131.0 59 1.8 118.3 60 2.0 99.6 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) proman 6.34499 -0.03432 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.6173 -0.5411 -0.1218 0.6640 1.3270 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.344986 0.775903 8.178 3.09e-11 *** proman -0.034322 0.007272 -4.720 1.54e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.7717 on 58 degrees of freedom Multiple R-squared: 0.2775, Adjusted R-squared: 0.265 F-statistic: 22.27 on 1 and 58 DF, p-value: 1.535e-05 > 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.0601185455 1.202371e-01 9.398815e-01 [2,] 0.0310502255 6.210045e-02 9.689498e-01 [3,] 0.0100946008 2.018920e-02 9.899054e-01 [4,] 0.0044411913 8.882383e-03 9.955588e-01 [5,] 0.0017225122 3.445024e-03 9.982775e-01 [6,] 0.0008344661 1.668932e-03 9.991655e-01 [7,] 0.0007915510 1.583102e-03 9.992084e-01 [8,] 0.0006363366 1.272673e-03 9.993637e-01 [9,] 0.0005449909 1.089982e-03 9.994550e-01 [10,] 0.0002825907 5.651813e-04 9.997174e-01 [11,] 0.0001788931 3.577861e-04 9.998211e-01 [12,] 0.0001501686 3.003373e-04 9.998498e-01 [13,] 0.0005308193 1.061639e-03 9.994692e-01 [14,] 0.0006800999 1.360200e-03 9.993199e-01 [15,] 0.0005846063 1.169213e-03 9.994154e-01 [16,] 0.0007450583 1.490117e-03 9.992549e-01 [17,] 0.0014980540 2.996108e-03 9.985019e-01 [18,] 0.0039010703 7.802141e-03 9.960989e-01 [19,] 0.0161524113 3.230482e-02 9.838476e-01 [20,] 0.0612735137 1.225470e-01 9.387265e-01 [21,] 0.1451282146 2.902564e-01 8.548718e-01 [22,] 0.3154334959 6.308670e-01 6.845665e-01 [23,] 0.5730151762 8.539696e-01 4.269848e-01 [24,] 0.8186835046 3.626330e-01 1.813165e-01 [25,] 0.9343819428 1.312361e-01 6.561806e-02 [26,] 0.9795116399 4.097672e-02 2.048836e-02 [27,] 0.9959715149 8.056970e-03 4.028485e-03 [28,] 0.9997558750 4.882500e-04 2.441250e-04 [29,] 0.9999736208 5.275845e-05 2.637923e-05 [30,] 0.9999940176 1.196487e-05 5.982436e-06 [31,] 0.9999976767 4.646614e-06 2.323307e-06 [32,] 0.9999990731 1.853771e-06 9.268855e-07 [33,] 0.9999999541 9.175112e-08 4.587556e-08 [34,] 0.9999999850 3.000704e-08 1.500352e-08 [35,] 0.9999999934 1.329062e-08 6.645309e-09 [36,] 0.9999999918 1.643960e-08 8.219802e-09 [37,] 0.9999999823 3.538618e-08 1.769309e-08 [38,] 0.9999999522 9.555647e-08 4.777824e-08 [39,] 0.9999999629 7.414291e-08 3.707145e-08 [40,] 0.9999999801 3.971823e-08 1.985912e-08 [41,] 0.9999999367 1.265098e-07 6.325490e-08 [42,] 0.9999997189 5.621391e-07 2.810696e-07 [43,] 0.9999988218 2.356374e-06 1.178187e-06 [44,] 0.9999983738 3.252444e-06 1.626222e-06 [45,] 0.9999945336 1.093284e-05 5.466421e-06 [46,] 0.9999727279 5.454429e-05 2.727215e-05 [47,] 0.9998965094 2.069813e-04 1.034906e-04 [48,] 0.9996550815 6.898369e-04 3.449185e-04 [49,] 0.9994129476 1.174105e-03 5.870524e-04 [50,] 0.9994520145 1.095971e-03 5.479855e-04 [51,] 0.9998711541 2.576918e-04 1.288459e-04 > postscript(file="/var/www/html/rcomp/tmp/1qj5i1258664730.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/2h5nm1258664730.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/3liy51258664730.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/4xgte1258664730.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/5ni9a1258664730.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 1.25682846 1.07742190 1.32704526 0.47538483 0.48178425 1.00691688 7 8 9 10 11 12 0.10953039 1.19068580 1.16183271 0.99318792 0.88242615 0.39551321 13 14 15 16 17 18 1.15979564 0.81860877 0.67055742 0.78335626 0.28085414 0.83047750 19 20 21 22 23 24 -0.22525706 0.85246611 0.81674854 0.65496823 0.53344468 -0.12554528 25 26 27 28 29 30 0.66183271 0.18335626 0.54670858 -0.48342829 -0.18278640 0.10255452 31 32 33 34 35 36 -0.99826420 0.08929062 -0.11803891 -0.06748544 -0.16405320 -0.89512019 37 38 39 40 41 42 -0.04985918 -0.54159953 -0.18511169 -1.08482347 -0.75282636 -0.50867231 43 44 45 46 47 48 -1.51292328 -0.36702038 -0.57388486 -0.21396478 -0.51303467 -1.42601034 49 50 51 52 53 54 -0.38511169 -0.58807887 -1.14066941 -0.54095764 -0.83956246 -0.68167945 55 56 57 58 59 60 -1.61728563 -0.62536845 -0.37528003 -0.14875223 -0.48464663 -0.92647540 > postscript(file="/var/www/html/rcomp/tmp/67lgf1258664730.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 1.25682846 NA 1 1.07742190 1.25682846 2 1.32704526 1.07742190 3 0.47538483 1.32704526 4 0.48178425 0.47538483 5 1.00691688 0.48178425 6 0.10953039 1.00691688 7 1.19068580 0.10953039 8 1.16183271 1.19068580 9 0.99318792 1.16183271 10 0.88242615 0.99318792 11 0.39551321 0.88242615 12 1.15979564 0.39551321 13 0.81860877 1.15979564 14 0.67055742 0.81860877 15 0.78335626 0.67055742 16 0.28085414 0.78335626 17 0.83047750 0.28085414 18 -0.22525706 0.83047750 19 0.85246611 -0.22525706 20 0.81674854 0.85246611 21 0.65496823 0.81674854 22 0.53344468 0.65496823 23 -0.12554528 0.53344468 24 0.66183271 -0.12554528 25 0.18335626 0.66183271 26 0.54670858 0.18335626 27 -0.48342829 0.54670858 28 -0.18278640 -0.48342829 29 0.10255452 -0.18278640 30 -0.99826420 0.10255452 31 0.08929062 -0.99826420 32 -0.11803891 0.08929062 33 -0.06748544 -0.11803891 34 -0.16405320 -0.06748544 35 -0.89512019 -0.16405320 36 -0.04985918 -0.89512019 37 -0.54159953 -0.04985918 38 -0.18511169 -0.54159953 39 -1.08482347 -0.18511169 40 -0.75282636 -1.08482347 41 -0.50867231 -0.75282636 42 -1.51292328 -0.50867231 43 -0.36702038 -1.51292328 44 -0.57388486 -0.36702038 45 -0.21396478 -0.57388486 46 -0.51303467 -0.21396478 47 -1.42601034 -0.51303467 48 -0.38511169 -1.42601034 49 -0.58807887 -0.38511169 50 -1.14066941 -0.58807887 51 -0.54095764 -1.14066941 52 -0.83956246 -0.54095764 53 -0.68167945 -0.83956246 54 -1.61728563 -0.68167945 55 -0.62536845 -1.61728563 56 -0.37528003 -0.62536845 57 -0.14875223 -0.37528003 58 -0.48464663 -0.14875223 59 -0.92647540 -0.48464663 60 NA -0.92647540 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.07742190 1.25682846 [2,] 1.32704526 1.07742190 [3,] 0.47538483 1.32704526 [4,] 0.48178425 0.47538483 [5,] 1.00691688 0.48178425 [6,] 0.10953039 1.00691688 [7,] 1.19068580 0.10953039 [8,] 1.16183271 1.19068580 [9,] 0.99318792 1.16183271 [10,] 0.88242615 0.99318792 [11,] 0.39551321 0.88242615 [12,] 1.15979564 0.39551321 [13,] 0.81860877 1.15979564 [14,] 0.67055742 0.81860877 [15,] 0.78335626 0.67055742 [16,] 0.28085414 0.78335626 [17,] 0.83047750 0.28085414 [18,] -0.22525706 0.83047750 [19,] 0.85246611 -0.22525706 [20,] 0.81674854 0.85246611 [21,] 0.65496823 0.81674854 [22,] 0.53344468 0.65496823 [23,] -0.12554528 0.53344468 [24,] 0.66183271 -0.12554528 [25,] 0.18335626 0.66183271 [26,] 0.54670858 0.18335626 [27,] -0.48342829 0.54670858 [28,] -0.18278640 -0.48342829 [29,] 0.10255452 -0.18278640 [30,] -0.99826420 0.10255452 [31,] 0.08929062 -0.99826420 [32,] -0.11803891 0.08929062 [33,] -0.06748544 -0.11803891 [34,] -0.16405320 -0.06748544 [35,] -0.89512019 -0.16405320 [36,] -0.04985918 -0.89512019 [37,] -0.54159953 -0.04985918 [38,] -0.18511169 -0.54159953 [39,] -1.08482347 -0.18511169 [40,] -0.75282636 -1.08482347 [41,] -0.50867231 -0.75282636 [42,] -1.51292328 -0.50867231 [43,] -0.36702038 -1.51292328 [44,] -0.57388486 -0.36702038 [45,] -0.21396478 -0.57388486 [46,] -0.51303467 -0.21396478 [47,] -1.42601034 -0.51303467 [48,] -0.38511169 -1.42601034 [49,] -0.58807887 -0.38511169 [50,] -1.14066941 -0.58807887 [51,] -0.54095764 -1.14066941 [52,] -0.83956246 -0.54095764 [53,] -0.68167945 -0.83956246 [54,] -1.61728563 -0.68167945 [55,] -0.62536845 -1.61728563 [56,] -0.37528003 -0.62536845 [57,] -0.14875223 -0.37528003 [58,] -0.48464663 -0.14875223 [59,] -0.92647540 -0.48464663 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.07742190 1.25682846 2 1.32704526 1.07742190 3 0.47538483 1.32704526 4 0.48178425 0.47538483 5 1.00691688 0.48178425 6 0.10953039 1.00691688 7 1.19068580 0.10953039 8 1.16183271 1.19068580 9 0.99318792 1.16183271 10 0.88242615 0.99318792 11 0.39551321 0.88242615 12 1.15979564 0.39551321 13 0.81860877 1.15979564 14 0.67055742 0.81860877 15 0.78335626 0.67055742 16 0.28085414 0.78335626 17 0.83047750 0.28085414 18 -0.22525706 0.83047750 19 0.85246611 -0.22525706 20 0.81674854 0.85246611 21 0.65496823 0.81674854 22 0.53344468 0.65496823 23 -0.12554528 0.53344468 24 0.66183271 -0.12554528 25 0.18335626 0.66183271 26 0.54670858 0.18335626 27 -0.48342829 0.54670858 28 -0.18278640 -0.48342829 29 0.10255452 -0.18278640 30 -0.99826420 0.10255452 31 0.08929062 -0.99826420 32 -0.11803891 0.08929062 33 -0.06748544 -0.11803891 34 -0.16405320 -0.06748544 35 -0.89512019 -0.16405320 36 -0.04985918 -0.89512019 37 -0.54159953 -0.04985918 38 -0.18511169 -0.54159953 39 -1.08482347 -0.18511169 40 -0.75282636 -1.08482347 41 -0.50867231 -0.75282636 42 -1.51292328 -0.50867231 43 -0.36702038 -1.51292328 44 -0.57388486 -0.36702038 45 -0.21396478 -0.57388486 46 -0.51303467 -0.21396478 47 -1.42601034 -0.51303467 48 -0.38511169 -1.42601034 49 -0.58807887 -0.38511169 50 -1.14066941 -0.58807887 51 -0.54095764 -1.14066941 52 -0.83956246 -0.54095764 53 -0.68167945 -0.83956246 54 -1.61728563 -0.68167945 55 -0.62536845 -1.61728563 56 -0.37528003 -0.62536845 57 -0.14875223 -0.37528003 58 -0.48464663 -0.14875223 59 -0.92647540 -0.48464663 > 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/7prth1258664730.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/8n60m1258664730.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/9dv4z1258664730.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/10q17p1258664730.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/11stbv1258664730.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/123l701258664730.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/132m9z1258664730.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/146b171258664730.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/15xd1l1258664730.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/16fqz51258664730.tab") + } > > system("convert tmp/1qj5i1258664730.ps tmp/1qj5i1258664730.png") > system("convert tmp/2h5nm1258664730.ps tmp/2h5nm1258664730.png") > system("convert tmp/3liy51258664730.ps tmp/3liy51258664730.png") > system("convert tmp/4xgte1258664730.ps tmp/4xgte1258664730.png") > system("convert tmp/5ni9a1258664730.ps tmp/5ni9a1258664730.png") > system("convert tmp/67lgf1258664730.ps tmp/67lgf1258664730.png") > system("convert tmp/7prth1258664730.ps tmp/7prth1258664730.png") > system("convert tmp/8n60m1258664730.ps tmp/8n60m1258664730.png") > system("convert tmp/9dv4z1258664730.ps tmp/9dv4z1258664730.png") > system("convert tmp/10q17p1258664730.ps tmp/10q17p1258664730.png") > > > proc.time() user system elapsed 2.501 1.592 3.579