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(19,2407.6,21,25,2454.62,19,21,2448.05,25,23,2497.84,21,23,2645.64,23,19,2756.76,23,18,2849.27,19,19,2921.44,18,19,2981.85,19,22,3080.58,19,23,3106.22,22,20,3119.31,23,14,3061.26,20,14,3097.31,14,14,3161.69,14,15,3257.16,14,11,3277.01,15,17,3295.32,11,16,3363.99,17,20,3494.17,16,24,3667.03,20,23,3813.06,24,20,3917.96,23,21,3895.51,20,19,3801.06,21,23,3570.12,19,23,3701.61,23,23,3862.27,23,23,3970.1,23,27,4138.52,23,26,4199.75,27,17,4290.89,26,24,4443.91,17,26,4502.64,24,24,4356.98,26,27,4591.27,24,27,4696.96,27,26,4621.4,27,24,4562.84,26,23,4202.52,24,23,4296.49,23,24,4435.23,23,17,4105.18,24,21,4116.68,17,19,3844.49,21,22,3720.98,19,22,3674.4,22,18,3857.62,22,16,3801.06,18,14,3504.37,16,12,3032.6,14,14,3047.03,12,16,2962.34,14,8,2197.82,16,3,2014.45,8,0,1862.83,3,5,1905.41,0,1,1810.99,5,1,1670.07,1,3,1864.44,1),dim=c(3,60),dimnames=list(c('Consvertr','Aand','Y1'),1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('Consvertr','Aand','Y1'),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 = '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 Consvertr Aand Y1 t 1 19 2407.60 21 1 2 25 2454.62 19 2 3 21 2448.05 25 3 4 23 2497.84 21 4 5 23 2645.64 23 5 6 19 2756.76 23 6 7 18 2849.27 19 7 8 19 2921.44 18 8 9 19 2981.85 19 9 10 22 3080.58 19 10 11 23 3106.22 22 11 12 20 3119.31 23 12 13 14 3061.26 20 13 14 14 3097.31 14 14 15 14 3161.69 14 15 16 15 3257.16 14 16 17 11 3277.01 15 17 18 17 3295.32 11 18 19 16 3363.99 17 19 20 20 3494.17 16 20 21 24 3667.03 20 21 22 23 3813.06 24 22 23 20 3917.96 23 23 24 21 3895.51 20 24 25 19 3801.06 21 25 26 23 3570.12 19 26 27 23 3701.61 23 27 28 23 3862.27 23 28 29 23 3970.10 23 29 30 27 4138.52 23 30 31 26 4199.75 27 31 32 17 4290.89 26 32 33 24 4443.91 17 33 34 26 4502.64 24 34 35 24 4356.98 26 35 36 27 4591.27 24 36 37 27 4696.96 27 37 38 26 4621.40 27 38 39 24 4562.84 26 39 40 23 4202.52 24 40 41 23 4296.49 23 41 42 24 4435.23 23 42 43 17 4105.18 24 43 44 21 4116.68 17 44 45 19 3844.49 21 45 46 22 3720.98 19 46 47 22 3674.40 22 47 48 18 3857.62 22 48 49 16 3801.06 18 49 50 14 3504.37 16 50 51 12 3032.60 14 51 52 14 3047.03 12 52 53 16 2962.34 14 53 54 8 2197.82 16 54 55 3 2014.45 8 55 56 0 1862.83 3 56 57 5 1905.41 0 57 58 1 1810.99 5 58 59 1 1670.07 1 59 60 3 1864.44 1 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Aand Y1 t 0.705596 0.003665 0.459254 -0.110442 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.8363 -1.6604 0.1894 2.0822 6.7943 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.7055962 1.7399581 0.406 0.686637 Aand 0.0036646 0.0007951 4.609 2.38e-05 *** Y1 0.4592542 0.1080159 4.252 8.12e-05 *** t -0.1104421 0.0276279 -3.997 0.000189 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.849 on 56 degrees of freedom Multiple R-squared: 0.8383, Adjusted R-squared: 0.8296 F-statistic: 96.74 on 3 and 56 DF, p-value: < 2.2e-16 > 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.6125067 0.77498668 0.38749334 [2,] 0.4509645 0.90192905 0.54903547 [3,] 0.3065537 0.61310732 0.69344634 [4,] 0.4275999 0.85519983 0.57240008 [5,] 0.4913528 0.98270565 0.50864717 [6,] 0.4382730 0.87654602 0.56172699 [7,] 0.6821093 0.63578133 0.31789066 [8,] 0.5906134 0.81877312 0.40938656 [9,] 0.5034059 0.99318819 0.49659409 [10,] 0.4265005 0.85300094 0.57349953 [11,] 0.5382079 0.92358419 0.46179210 [12,] 0.6959069 0.60818623 0.30409311 [13,] 0.6980262 0.60394757 0.30197379 [14,] 0.7968282 0.40634358 0.20317179 [15,] 0.8794940 0.24101191 0.12050596 [16,] 0.8344459 0.33110830 0.16555415 [17,] 0.8283097 0.34338062 0.17169031 [18,] 0.7898198 0.42036031 0.21018016 [19,] 0.7811466 0.43770689 0.21885344 [20,] 0.8575223 0.28495542 0.14247771 [21,] 0.8197524 0.36049528 0.18024764 [22,] 0.7692483 0.46150334 0.23075167 [23,] 0.7084233 0.58315343 0.29157672 [24,] 0.8033490 0.39330194 0.19665097 [25,] 0.8217609 0.35647824 0.17823912 [26,] 0.9758943 0.04821146 0.02410573 [27,] 0.9762357 0.04752867 0.02376433 [28,] 0.9661640 0.06767197 0.03383598 [29,] 0.9477198 0.10456048 0.05228024 [30,] 0.9372252 0.12554955 0.06277478 [31,] 0.9097676 0.18046485 0.09023242 [32,] 0.8709070 0.25818606 0.12909303 [33,] 0.8267809 0.34643823 0.17321912 [34,] 0.7705010 0.45899802 0.22949901 [35,] 0.7006649 0.59867026 0.29933513 [36,] 0.6232539 0.75349215 0.37674607 [37,] 0.7796407 0.44071851 0.22035926 [38,] 0.7272644 0.54547119 0.27273559 [39,] 0.6624420 0.67511606 0.33755803 [40,] 0.6966241 0.60675182 0.30337591 [41,] 0.8055938 0.38881244 0.19440622 [42,] 0.7398896 0.52022071 0.26011036 [43,] 0.7452110 0.50957802 0.25478901 [44,] 0.8466963 0.30660743 0.15330372 [45,] 0.8324508 0.33509847 0.16754923 [46,] 0.7911151 0.41776980 0.20888490 [47,] 0.6951658 0.60966837 0.30483419 > postscript(file="/var/www/html/rcomp/tmp/1xc5a1258648328.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/29ixy1258648328.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/3rp0t1258648328.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/46bve1258648328.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/5kik91258648328.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.06230179 6.79434073 0.17333401 3.93833402 2.58864485 -1.70811967 7 8 9 10 11 12 -1.09966994 0.20555457 -0.36463397 2.38400548 2.02272558 -1.37405567 13 14 15 16 17 18 -5.67312298 -2.93926349 -3.06474618 -2.30416024 -6.72571396 1.15464660 19 20 21 22 23 24 -2.74208211 1.35056090 2.99052936 -0.27118186 -3.08589862 -0.51542450 25 26 27 28 29 30 -2.51811827 3.35712713 1.14869870 0.67039156 0.38568345 3.87893927 31 32 33 34 35 36 0.92798328 -7.83630904 2.84666863 1.52711154 -0.74717396 2.42320521 37 38 39 40 41 42 0.76857677 0.15591350 -1.05979323 0.28957378 0.51491074 1.11693089 43 44 45 46 47 48 -5.02239104 2.26068773 -0.46842852 4.01313252 2.91650760 -1.64447216 49 50 51 52 53 54 -1.48974551 -1.37355486 -0.61577192 2.36029882 3.86258470 -2.14384722 55 56 57 58 59 60 -2.68740022 -2.72506571 3.60710166 -2.23271874 0.23115074 1.62931106 > postscript(file="/var/www/html/rcomp/tmp/6gbpn1258648328.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.06230179 NA 1 6.79434073 -0.06230179 2 0.17333401 6.79434073 3 3.93833402 0.17333401 4 2.58864485 3.93833402 5 -1.70811967 2.58864485 6 -1.09966994 -1.70811967 7 0.20555457 -1.09966994 8 -0.36463397 0.20555457 9 2.38400548 -0.36463397 10 2.02272558 2.38400548 11 -1.37405567 2.02272558 12 -5.67312298 -1.37405567 13 -2.93926349 -5.67312298 14 -3.06474618 -2.93926349 15 -2.30416024 -3.06474618 16 -6.72571396 -2.30416024 17 1.15464660 -6.72571396 18 -2.74208211 1.15464660 19 1.35056090 -2.74208211 20 2.99052936 1.35056090 21 -0.27118186 2.99052936 22 -3.08589862 -0.27118186 23 -0.51542450 -3.08589862 24 -2.51811827 -0.51542450 25 3.35712713 -2.51811827 26 1.14869870 3.35712713 27 0.67039156 1.14869870 28 0.38568345 0.67039156 29 3.87893927 0.38568345 30 0.92798328 3.87893927 31 -7.83630904 0.92798328 32 2.84666863 -7.83630904 33 1.52711154 2.84666863 34 -0.74717396 1.52711154 35 2.42320521 -0.74717396 36 0.76857677 2.42320521 37 0.15591350 0.76857677 38 -1.05979323 0.15591350 39 0.28957378 -1.05979323 40 0.51491074 0.28957378 41 1.11693089 0.51491074 42 -5.02239104 1.11693089 43 2.26068773 -5.02239104 44 -0.46842852 2.26068773 45 4.01313252 -0.46842852 46 2.91650760 4.01313252 47 -1.64447216 2.91650760 48 -1.48974551 -1.64447216 49 -1.37355486 -1.48974551 50 -0.61577192 -1.37355486 51 2.36029882 -0.61577192 52 3.86258470 2.36029882 53 -2.14384722 3.86258470 54 -2.68740022 -2.14384722 55 -2.72506571 -2.68740022 56 3.60710166 -2.72506571 57 -2.23271874 3.60710166 58 0.23115074 -2.23271874 59 1.62931106 0.23115074 60 NA 1.62931106 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 6.7943407 -0.06230179 [2,] 0.1733340 6.79434073 [3,] 3.9383340 0.17333401 [4,] 2.5886449 3.93833402 [5,] -1.7081197 2.58864485 [6,] -1.0996699 -1.70811967 [7,] 0.2055546 -1.09966994 [8,] -0.3646340 0.20555457 [9,] 2.3840055 -0.36463397 [10,] 2.0227256 2.38400548 [11,] -1.3740557 2.02272558 [12,] -5.6731230 -1.37405567 [13,] -2.9392635 -5.67312298 [14,] -3.0647462 -2.93926349 [15,] -2.3041602 -3.06474618 [16,] -6.7257140 -2.30416024 [17,] 1.1546466 -6.72571396 [18,] -2.7420821 1.15464660 [19,] 1.3505609 -2.74208211 [20,] 2.9905294 1.35056090 [21,] -0.2711819 2.99052936 [22,] -3.0858986 -0.27118186 [23,] -0.5154245 -3.08589862 [24,] -2.5181183 -0.51542450 [25,] 3.3571271 -2.51811827 [26,] 1.1486987 3.35712713 [27,] 0.6703916 1.14869870 [28,] 0.3856835 0.67039156 [29,] 3.8789393 0.38568345 [30,] 0.9279833 3.87893927 [31,] -7.8363090 0.92798328 [32,] 2.8466686 -7.83630904 [33,] 1.5271115 2.84666863 [34,] -0.7471740 1.52711154 [35,] 2.4232052 -0.74717396 [36,] 0.7685768 2.42320521 [37,] 0.1559135 0.76857677 [38,] -1.0597932 0.15591350 [39,] 0.2895738 -1.05979323 [40,] 0.5149107 0.28957378 [41,] 1.1169309 0.51491074 [42,] -5.0223910 1.11693089 [43,] 2.2606877 -5.02239104 [44,] -0.4684285 2.26068773 [45,] 4.0131325 -0.46842852 [46,] 2.9165076 4.01313252 [47,] -1.6444722 2.91650760 [48,] -1.4897455 -1.64447216 [49,] -1.3735549 -1.48974551 [50,] -0.6157719 -1.37355486 [51,] 2.3602988 -0.61577192 [52,] 3.8625847 2.36029882 [53,] -2.1438472 3.86258470 [54,] -2.6874002 -2.14384722 [55,] -2.7250657 -2.68740022 [56,] 3.6071017 -2.72506571 [57,] -2.2327187 3.60710166 [58,] 0.2311507 -2.23271874 [59,] 1.6293111 0.23115074 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 6.7943407 -0.06230179 2 0.1733340 6.79434073 3 3.9383340 0.17333401 4 2.5886449 3.93833402 5 -1.7081197 2.58864485 6 -1.0996699 -1.70811967 7 0.2055546 -1.09966994 8 -0.3646340 0.20555457 9 2.3840055 -0.36463397 10 2.0227256 2.38400548 11 -1.3740557 2.02272558 12 -5.6731230 -1.37405567 13 -2.9392635 -5.67312298 14 -3.0647462 -2.93926349 15 -2.3041602 -3.06474618 16 -6.7257140 -2.30416024 17 1.1546466 -6.72571396 18 -2.7420821 1.15464660 19 1.3505609 -2.74208211 20 2.9905294 1.35056090 21 -0.2711819 2.99052936 22 -3.0858986 -0.27118186 23 -0.5154245 -3.08589862 24 -2.5181183 -0.51542450 25 3.3571271 -2.51811827 26 1.1486987 3.35712713 27 0.6703916 1.14869870 28 0.3856835 0.67039156 29 3.8789393 0.38568345 30 0.9279833 3.87893927 31 -7.8363090 0.92798328 32 2.8466686 -7.83630904 33 1.5271115 2.84666863 34 -0.7471740 1.52711154 35 2.4232052 -0.74717396 36 0.7685768 2.42320521 37 0.1559135 0.76857677 38 -1.0597932 0.15591350 39 0.2895738 -1.05979323 40 0.5149107 0.28957378 41 1.1169309 0.51491074 42 -5.0223910 1.11693089 43 2.2606877 -5.02239104 44 -0.4684285 2.26068773 45 4.0131325 -0.46842852 46 2.9165076 4.01313252 47 -1.6444722 2.91650760 48 -1.4897455 -1.64447216 49 -1.3735549 -1.48974551 50 -0.6157719 -1.37355486 51 2.3602988 -0.61577192 52 3.8625847 2.36029882 53 -2.1438472 3.86258470 54 -2.6874002 -2.14384722 55 -2.7250657 -2.68740022 56 3.6071017 -2.72506571 57 -2.2327187 3.60710166 58 0.2311507 -2.23271874 59 1.6293111 0.23115074 > 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/7nawg1258648328.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/8u6jm1258648328.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/91o2l1258648328.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/10fozx1258648328.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/11tchq1258648328.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/12ybx81258648328.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/13mxy21258648328.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/14w6gu1258648328.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/15iecd1258648328.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/16imom1258648328.tab") + } > > system("convert tmp/1xc5a1258648328.ps tmp/1xc5a1258648328.png") > system("convert tmp/29ixy1258648328.ps tmp/29ixy1258648328.png") > system("convert tmp/3rp0t1258648328.ps tmp/3rp0t1258648328.png") > system("convert tmp/46bve1258648328.ps tmp/46bve1258648328.png") > system("convert tmp/5kik91258648328.ps tmp/5kik91258648328.png") > system("convert tmp/6gbpn1258648328.ps tmp/6gbpn1258648328.png") > system("convert tmp/7nawg1258648328.ps tmp/7nawg1258648328.png") > system("convert tmp/8u6jm1258648328.ps tmp/8u6jm1258648328.png") > system("convert tmp/91o2l1258648328.ps tmp/91o2l1258648328.png") > system("convert tmp/10fozx1258648328.ps tmp/10fozx1258648328.png") > > > proc.time() user system elapsed 2.428 1.538 2.855