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(4223.4,401,4627.3,394,5175.3,372,4550.7,334,4639.3,320,5498.7,334,5031.0,400,4033.3,427,4643.5,423,4873.2,395,4608.7,373,4733.5,377,3955.6,391,4590.9,398,5127.5,393,5257.3,375,5416.9,371,5813.3,364,5261.9,400,4669.2,406,5855.8,407,5274.6,397,5516.7,389,5819.5,394,5156.0,399,5377.3,401,6386.8,396,5144.0,392,6138.5,384,5567.8,370,5822.6,380,5145.5,376,5706.6,378,6078.5,376,6074.5,373,5577.6,374,5727.5,379,6067.0,376,7069.9,371,5490.0,375,5948.3,360,6177.5,338,6890.1,352,5756.2,344,6528.8,330,6792.0,334,6657.4,333,5753.7,343,5750.9,350,5968.4,341,5871.7,320,7004.9,302,6363.4,287,6694.7,304,7101.6,370,5364.0,385,6958.6,365,6503.3,333,5316.0,313,5312.7,330,4478.0,367),dim=c(2,61),dimnames=list(c('Export','Werkloosheid'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Export','Werkloosheid'),1:61)) > 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 = '2' > #'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 Werkloosheid Export 1 401 4223.4 2 394 4627.3 3 372 5175.3 4 334 4550.7 5 320 4639.3 6 334 5498.7 7 400 5031.0 8 427 4033.3 9 423 4643.5 10 395 4873.2 11 373 4608.7 12 377 4733.5 13 391 3955.6 14 398 4590.9 15 393 5127.5 16 375 5257.3 17 371 5416.9 18 364 5813.3 19 400 5261.9 20 406 4669.2 21 407 5855.8 22 397 5274.6 23 389 5516.7 24 394 5819.5 25 399 5156.0 26 401 5377.3 27 396 6386.8 28 392 5144.0 29 384 6138.5 30 370 5567.8 31 380 5822.6 32 376 5145.5 33 378 5706.6 34 376 6078.5 35 373 6074.5 36 374 5577.6 37 379 5727.5 38 376 6067.0 39 371 7069.9 40 375 5490.0 41 360 5948.3 42 338 6177.5 43 352 6890.1 44 344 5756.2 45 330 6528.8 46 334 6792.0 47 333 6657.4 48 343 5753.7 49 350 5750.9 50 341 5968.4 51 320 5871.7 52 302 7004.9 53 287 6363.4 54 304 6694.7 55 370 7101.6 56 385 5364.0 57 365 6958.6 58 333 6503.3 59 313 5316.0 60 330 5312.7 61 367 4478.0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Export 476.46428 -0.01944 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -66.265 -17.024 5.978 19.794 44.387 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 476.464276 25.368791 18.782 < 2e-16 *** Export -0.019442 0.004496 -4.324 5.98e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 27.27 on 59 degrees of freedom Multiple R-squared: 0.2407, Adjusted R-squared: 0.2278 F-statistic: 18.7 on 1 and 59 DF, p-value: 5.976e-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.93186132 0.13627735 0.06813868 [2,] 0.88550999 0.22898002 0.11449001 [3,] 0.92208937 0.15582127 0.07791063 [4,] 0.92867325 0.14265350 0.07132675 [5,] 0.95442231 0.09115538 0.04557769 [6,] 0.93719004 0.12561992 0.06280996 [7,] 0.90666821 0.18666357 0.09333179 [8,] 0.86069936 0.27860129 0.13930064 [9,] 0.81628783 0.36742434 0.18371217 [10,] 0.76353594 0.47292811 0.23646406 [11,] 0.73543802 0.52912396 0.26456198 [12,] 0.66306094 0.67387812 0.33693906 [13,] 0.58419359 0.83161281 0.41580641 [14,] 0.50384771 0.99230458 0.49615229 [15,] 0.49943577 0.99887155 0.50056423 [16,] 0.46051231 0.92102463 0.53948769 [17,] 0.56076061 0.87847878 0.43923939 [18,] 0.52460767 0.95078466 0.47539233 [19,] 0.47270996 0.94541993 0.52729004 [20,] 0.45741490 0.91482980 0.54258510 [21,] 0.42975093 0.85950186 0.57024907 [22,] 0.43079836 0.86159671 0.56920164 [23,] 0.47256763 0.94513526 0.52743237 [24,] 0.43576329 0.87152657 0.56423671 [25,] 0.41840636 0.83681273 0.58159364 [26,] 0.36708613 0.73417225 0.63291387 [27,] 0.33479597 0.66959194 0.66520403 [28,] 0.28669579 0.57339158 0.71330421 [29,] 0.25752758 0.51505515 0.74247242 [30,] 0.23790925 0.47581849 0.76209075 [31,] 0.21681725 0.43363451 0.78318275 [32,] 0.19344423 0.38688846 0.80655577 [33,] 0.19062513 0.38125025 0.80937487 [34,] 0.19431738 0.38863475 0.80568262 [35,] 0.22127629 0.44255257 0.77872371 [36,] 0.22451072 0.44902143 0.77548928 [37,] 0.21031923 0.42063846 0.78968077 [38,] 0.20850881 0.41701761 0.79149119 [39,] 0.18965737 0.37931474 0.81034263 [40,] 0.17135447 0.34270893 0.82864553 [41,] 0.15754140 0.31508280 0.84245860 [42,] 0.12678638 0.25357276 0.87321362 [43,] 0.09908172 0.19816344 0.90091828 [44,] 0.07722430 0.15444861 0.92277570 [45,] 0.05703458 0.11406916 0.94296542 [46,] 0.04024809 0.08049617 0.95975191 [47,] 0.04124692 0.08249384 0.95875308 [48,] 0.04757542 0.09515084 0.95242458 [49,] 0.18114986 0.36229972 0.81885014 [50,] 0.31935257 0.63870514 0.68064743 [51,] 0.25647485 0.51294970 0.74352515 [52,] 0.36373878 0.72747755 0.63626122 > postscript(file="/var/www/html/rcomp/tmp/1wgfk1262189305.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/2s8tc1262189305.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/3opzt1262189305.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/4ur231262189305.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/50sw91262189305.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 = 61 Frequency = 1 1 2 3 4 5 6 6.6491215 7.5019418 -3.8435756 -53.9873526 -66.2647483 -35.5558754 7 8 9 10 11 12 21.3508736 28.9531048 36.8169101 13.2828493 -13.8596884 -7.4332661 13 14 15 16 17 18 -8.5575764 10.7942353 16.2270736 0.7507083 -0.1462708 0.5607308 19 20 21 22 23 24 25.8401438 20.3165820 44.3870365 23.0870634 19.7940893 30.6812743 25 26 27 28 29 30 22.7811844 29.0838067 43.7109969 15.5478746 26.8834275 1.7876004 31 32 33 34 35 36 16.7415460 -0.4229617 12.4862175 17.7168783 14.6391083 5.9781368 37 38 39 40 41 42 13.8925655 17.4932897 31.9921594 5.2749749 -0.8145335 -18.3583156 43 44 45 46 47 48 9.4964003 -20.5494351 -19.5281701 -10.4109076 -14.0278663 -21.5980414 49 50 51 52 53 54 -14.6524803 -19.4237395 -42.3038279 -38.2716022 -65.7439573 -42.3026615 55 56 57 58 59 60 31.6084862 12.8252216 23.8282107 -17.0239535 -60.1080177 -43.1721779 61 -22.4008214 > postscript(file="/var/www/html/rcomp/tmp/6iser1262189305.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 6.6491215 NA 1 7.5019418 6.6491215 2 -3.8435756 7.5019418 3 -53.9873526 -3.8435756 4 -66.2647483 -53.9873526 5 -35.5558754 -66.2647483 6 21.3508736 -35.5558754 7 28.9531048 21.3508736 8 36.8169101 28.9531048 9 13.2828493 36.8169101 10 -13.8596884 13.2828493 11 -7.4332661 -13.8596884 12 -8.5575764 -7.4332661 13 10.7942353 -8.5575764 14 16.2270736 10.7942353 15 0.7507083 16.2270736 16 -0.1462708 0.7507083 17 0.5607308 -0.1462708 18 25.8401438 0.5607308 19 20.3165820 25.8401438 20 44.3870365 20.3165820 21 23.0870634 44.3870365 22 19.7940893 23.0870634 23 30.6812743 19.7940893 24 22.7811844 30.6812743 25 29.0838067 22.7811844 26 43.7109969 29.0838067 27 15.5478746 43.7109969 28 26.8834275 15.5478746 29 1.7876004 26.8834275 30 16.7415460 1.7876004 31 -0.4229617 16.7415460 32 12.4862175 -0.4229617 33 17.7168783 12.4862175 34 14.6391083 17.7168783 35 5.9781368 14.6391083 36 13.8925655 5.9781368 37 17.4932897 13.8925655 38 31.9921594 17.4932897 39 5.2749749 31.9921594 40 -0.8145335 5.2749749 41 -18.3583156 -0.8145335 42 9.4964003 -18.3583156 43 -20.5494351 9.4964003 44 -19.5281701 -20.5494351 45 -10.4109076 -19.5281701 46 -14.0278663 -10.4109076 47 -21.5980414 -14.0278663 48 -14.6524803 -21.5980414 49 -19.4237395 -14.6524803 50 -42.3038279 -19.4237395 51 -38.2716022 -42.3038279 52 -65.7439573 -38.2716022 53 -42.3026615 -65.7439573 54 31.6084862 -42.3026615 55 12.8252216 31.6084862 56 23.8282107 12.8252216 57 -17.0239535 23.8282107 58 -60.1080177 -17.0239535 59 -43.1721779 -60.1080177 60 -22.4008214 -43.1721779 61 NA -22.4008214 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 7.5019418 6.6491215 [2,] -3.8435756 7.5019418 [3,] -53.9873526 -3.8435756 [4,] -66.2647483 -53.9873526 [5,] -35.5558754 -66.2647483 [6,] 21.3508736 -35.5558754 [7,] 28.9531048 21.3508736 [8,] 36.8169101 28.9531048 [9,] 13.2828493 36.8169101 [10,] -13.8596884 13.2828493 [11,] -7.4332661 -13.8596884 [12,] -8.5575764 -7.4332661 [13,] 10.7942353 -8.5575764 [14,] 16.2270736 10.7942353 [15,] 0.7507083 16.2270736 [16,] -0.1462708 0.7507083 [17,] 0.5607308 -0.1462708 [18,] 25.8401438 0.5607308 [19,] 20.3165820 25.8401438 [20,] 44.3870365 20.3165820 [21,] 23.0870634 44.3870365 [22,] 19.7940893 23.0870634 [23,] 30.6812743 19.7940893 [24,] 22.7811844 30.6812743 [25,] 29.0838067 22.7811844 [26,] 43.7109969 29.0838067 [27,] 15.5478746 43.7109969 [28,] 26.8834275 15.5478746 [29,] 1.7876004 26.8834275 [30,] 16.7415460 1.7876004 [31,] -0.4229617 16.7415460 [32,] 12.4862175 -0.4229617 [33,] 17.7168783 12.4862175 [34,] 14.6391083 17.7168783 [35,] 5.9781368 14.6391083 [36,] 13.8925655 5.9781368 [37,] 17.4932897 13.8925655 [38,] 31.9921594 17.4932897 [39,] 5.2749749 31.9921594 [40,] -0.8145335 5.2749749 [41,] -18.3583156 -0.8145335 [42,] 9.4964003 -18.3583156 [43,] -20.5494351 9.4964003 [44,] -19.5281701 -20.5494351 [45,] -10.4109076 -19.5281701 [46,] -14.0278663 -10.4109076 [47,] -21.5980414 -14.0278663 [48,] -14.6524803 -21.5980414 [49,] -19.4237395 -14.6524803 [50,] -42.3038279 -19.4237395 [51,] -38.2716022 -42.3038279 [52,] -65.7439573 -38.2716022 [53,] -42.3026615 -65.7439573 [54,] 31.6084862 -42.3026615 [55,] 12.8252216 31.6084862 [56,] 23.8282107 12.8252216 [57,] -17.0239535 23.8282107 [58,] -60.1080177 -17.0239535 [59,] -43.1721779 -60.1080177 [60,] -22.4008214 -43.1721779 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 7.5019418 6.6491215 2 -3.8435756 7.5019418 3 -53.9873526 -3.8435756 4 -66.2647483 -53.9873526 5 -35.5558754 -66.2647483 6 21.3508736 -35.5558754 7 28.9531048 21.3508736 8 36.8169101 28.9531048 9 13.2828493 36.8169101 10 -13.8596884 13.2828493 11 -7.4332661 -13.8596884 12 -8.5575764 -7.4332661 13 10.7942353 -8.5575764 14 16.2270736 10.7942353 15 0.7507083 16.2270736 16 -0.1462708 0.7507083 17 0.5607308 -0.1462708 18 25.8401438 0.5607308 19 20.3165820 25.8401438 20 44.3870365 20.3165820 21 23.0870634 44.3870365 22 19.7940893 23.0870634 23 30.6812743 19.7940893 24 22.7811844 30.6812743 25 29.0838067 22.7811844 26 43.7109969 29.0838067 27 15.5478746 43.7109969 28 26.8834275 15.5478746 29 1.7876004 26.8834275 30 16.7415460 1.7876004 31 -0.4229617 16.7415460 32 12.4862175 -0.4229617 33 17.7168783 12.4862175 34 14.6391083 17.7168783 35 5.9781368 14.6391083 36 13.8925655 5.9781368 37 17.4932897 13.8925655 38 31.9921594 17.4932897 39 5.2749749 31.9921594 40 -0.8145335 5.2749749 41 -18.3583156 -0.8145335 42 9.4964003 -18.3583156 43 -20.5494351 9.4964003 44 -19.5281701 -20.5494351 45 -10.4109076 -19.5281701 46 -14.0278663 -10.4109076 47 -21.5980414 -14.0278663 48 -14.6524803 -21.5980414 49 -19.4237395 -14.6524803 50 -42.3038279 -19.4237395 51 -38.2716022 -42.3038279 52 -65.7439573 -38.2716022 53 -42.3026615 -65.7439573 54 31.6084862 -42.3026615 55 12.8252216 31.6084862 56 23.8282107 12.8252216 57 -17.0239535 23.8282107 58 -60.1080177 -17.0239535 59 -43.1721779 -60.1080177 60 -22.4008214 -43.1721779 > 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/7jyii1262189305.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/87kuf1262189305.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/9liri1262189305.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/10tfru1262189305.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/11l2ms1262189305.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/12x0331262189305.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/13xhhx1262189306.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/14r0t31262189306.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/154hm91262189306.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/1613lu1262189306.tab") + } > > try(system("convert tmp/1wgfk1262189305.ps tmp/1wgfk1262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/2s8tc1262189305.ps tmp/2s8tc1262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/3opzt1262189305.ps tmp/3opzt1262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/4ur231262189305.ps tmp/4ur231262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/50sw91262189305.ps tmp/50sw91262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/6iser1262189305.ps tmp/6iser1262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/7jyii1262189305.ps tmp/7jyii1262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/87kuf1262189305.ps tmp/87kuf1262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/9liri1262189305.ps tmp/9liri1262189305.png",intern=TRUE)) character(0) > try(system("convert tmp/10tfru1262189305.ps tmp/10tfru1262189305.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.573 1.613 3.817