R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(119.3,143.7,104.1,124.1,97.1,129.2,97.3,121.9,104.5,124.8,111,129.6,113,125.2,95.4,124.8,86.2,128.3,111.7,129.4,97.5,127.6,99.7,123.7,111.5,129,91.8,118.4,86.3,104.9,88.7,101,95.1,99.5,105.1,106.7,104.5,101.6,89.1,103.2,82.6,104.6,102.7,105.7,91.8,101.1,94.1,98.8,103.1,107.6,93.2,96.9,91,106.4,94.3,102,99.4,105.7,115.7,117,116.8,116,99.8,125.5,96,120.2,115.9,124.1,109.1,111.4,117.3,120.8,109.8,120.2,112.8,124.6,110.7,125.4,100,114.2,113.3,113.6,122.4,110.5,112.5,106.4,104.2,117,92.5,121.9,117.2,114.9,109.3,117.6,106.1,117.6,118.8,125.8,105.3,114.9,106,119.4,102,117.3,112.9,115,116.5,120.9,114.8,117,100.5,117.8,85.4,114,114.6,114.4,109.9,119.6,100.7,113.1,115.5,125.1),dim=c(2,61),dimnames=list(c('TIP','IPCN'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('TIP','IPCN'),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 > 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 IPCN TIP 1 143.7 119.3 2 124.1 104.1 3 129.2 97.1 4 121.9 97.3 5 124.8 104.5 6 129.6 111.0 7 125.2 113.0 8 124.8 95.4 9 128.3 86.2 10 129.4 111.7 11 127.6 97.5 12 123.7 99.7 13 129.0 111.5 14 118.4 91.8 15 104.9 86.3 16 101.0 88.7 17 99.5 95.1 18 106.7 105.1 19 101.6 104.5 20 103.2 89.1 21 104.6 82.6 22 105.7 102.7 23 101.1 91.8 24 98.8 94.1 25 107.6 103.1 26 96.9 93.2 27 106.4 91.0 28 102.0 94.3 29 105.7 99.4 30 117.0 115.7 31 116.0 116.8 32 125.5 99.8 33 120.2 96.0 34 124.1 115.9 35 111.4 109.1 36 120.8 117.3 37 120.2 109.8 38 124.6 112.8 39 125.4 110.7 40 114.2 100.0 41 113.6 113.3 42 110.5 122.4 43 106.4 112.5 44 117.0 104.2 45 121.9 92.5 46 114.9 117.2 47 117.6 109.3 48 117.6 106.1 49 125.8 118.8 50 114.9 105.3 51 119.4 106.0 52 117.3 102.0 53 115.0 112.9 54 120.9 116.5 55 117.0 114.8 56 117.8 100.5 57 114.0 85.4 58 114.4 114.6 59 119.6 109.9 60 113.1 100.7 61 125.1 115.5 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) TIP 74.5328 0.4022 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -15.1175 -6.7703 -0.4887 6.9455 21.1851 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 74.5328 11.8903 6.268 4.62e-08 *** TIP 0.4022 0.1138 3.535 0.000801 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 8.883 on 59 degrees of freedom Multiple R-squared: 0.1748, Adjusted R-squared: 0.1608 F-statistic: 12.5 on 1 and 59 DF, p-value: 0.0008008 > 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.25821028 5.164206e-01 7.417897e-01 [2,] 0.17564651 3.512930e-01 8.243535e-01 [3,] 0.22159517 4.431903e-01 7.784048e-01 [4,] 0.15458111 3.091622e-01 8.454189e-01 [5,] 0.23829473 4.765895e-01 7.617053e-01 [6,] 0.17550487 3.510097e-01 8.244951e-01 [7,] 0.14816446 2.963289e-01 8.518355e-01 [8,] 0.12318023 2.463605e-01 8.768198e-01 [9,] 0.09715074 1.943015e-01 9.028493e-01 [10,] 0.10119953 2.023991e-01 8.988005e-01 [11,] 0.32837429 6.567486e-01 6.716257e-01 [12,] 0.62410233 7.517953e-01 3.758977e-01 [13,] 0.89328735 2.134253e-01 1.067126e-01 [14,] 0.96285736 7.428527e-02 3.714264e-02 [15,] 0.99437912 1.124177e-02 5.620885e-03 [16,] 0.99341450 1.317100e-02 6.585499e-03 [17,] 0.98902634 2.194732e-02 1.097366e-02 [18,] 0.99339996 1.320008e-02 6.600039e-03 [19,] 0.99473639 1.052722e-02 5.263609e-03 [20,] 0.99800524 3.989523e-03 1.994762e-03 [21,] 0.99830914 3.381726e-03 1.690863e-03 [22,] 0.99974982 5.003600e-04 2.501800e-04 [23,] 0.99970154 5.969298e-04 2.984649e-04 [24,] 0.99993312 1.337672e-04 6.688360e-05 [25,] 0.99998088 3.824223e-05 1.912112e-05 [26,] 0.99996976 6.047825e-05 3.023913e-05 [27,] 0.99995457 9.085475e-05 4.542737e-05 [28,] 0.99996883 6.234215e-05 3.117107e-05 [29,] 0.99994731 1.053886e-04 5.269431e-05 [30,] 0.99993036 1.392709e-04 6.963545e-05 [31,] 0.99992858 1.428382e-04 7.141908e-05 [32,] 0.99986228 2.754355e-04 1.377178e-04 [33,] 0.99972307 5.538624e-04 2.769312e-04 [34,] 0.99971895 5.620970e-04 2.810485e-04 [35,] 0.99981114 3.777296e-04 1.888648e-04 [36,] 0.99961197 7.760558e-04 3.880279e-04 [37,] 0.99938773 1.224532e-03 6.122659e-04 [38,] 0.99966424 6.715183e-04 3.357592e-04 [39,] 0.99998112 3.775499e-05 1.887750e-05 [40,] 0.99994435 1.113087e-04 5.565434e-05 [41,] 0.99996782 6.436936e-05 3.218468e-05 [42,] 0.99996530 6.939562e-05 3.469781e-05 [43,] 0.99988950 2.210011e-04 1.105005e-04 [44,] 0.99965610 6.878039e-04 3.439019e-04 [45,] 0.99969576 6.084808e-04 3.042404e-04 [46,] 0.99921146 1.577075e-03 7.885377e-04 [47,] 0.99794070 4.118609e-03 2.059305e-03 [48,] 0.99404568 1.190864e-02 5.954322e-03 [49,] 0.98918418 2.163164e-02 1.081582e-02 [50,] 0.97133053 5.733895e-02 2.866947e-02 [51,] 0.93471036 1.305793e-01 6.528964e-02 [52,] 0.84775433 3.044913e-01 1.522457e-01 > postscript(file="/var/wessaorg/rcomp/tmp/1wuz41322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/211if1322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3saci1322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4lyez1322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/55uob1322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 61 Frequency = 1 1 2 3 4 5 6 21.1851291 7.6985193 15.6138963 8.2334570 8.2376406 10.4233619 7 8 9 10 11 12 5.2189685 11.8976307 19.0978405 9.9418242 13.8530176 9.0681848 13 14 15 16 17 18 9.6222635 6.9455389 -4.3423791 -9.2076513 -13.2817103 -10.1036775 19 20 21 22 23 24 -14.9623594 -7.1685299 -3.1542513 -10.1384053 -10.3544611 -13.5795135 25 26 27 28 29 30 -8.3992840 -15.1175365 -4.7327037 -10.4599529 -8.8111561 -4.0669627 31 32 33 34 35 36 -5.5093791 10.8279652 7.0563127 2.9525980 -7.0124643 -0.9104774 37 38 39 40 41 42 1.5059980 4.6994078 6.3440209 -0.5524742 -6.5016905 -13.2616807 43 44 45 46 47 48 -13.3799332 0.5582996 10.1640012 -6.7702578 -0.8929037 0.3941258 49 50 51 52 53 54 3.4862275 -1.9841168 2.2343455 1.7431324 -4.9408119 -0.4887201 55 56 57 58 59 60 -3.7049856 2.8464275 5.1195979 -6.2245463 0.8657783 -1.9340119 61 4.1134767 > postscript(file="/var/wessaorg/rcomp/tmp/6w11b1322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 21.1851291 NA 1 7.6985193 21.1851291 2 15.6138963 7.6985193 3 8.2334570 15.6138963 4 8.2376406 8.2334570 5 10.4233619 8.2376406 6 5.2189685 10.4233619 7 11.8976307 5.2189685 8 19.0978405 11.8976307 9 9.9418242 19.0978405 10 13.8530176 9.9418242 11 9.0681848 13.8530176 12 9.6222635 9.0681848 13 6.9455389 9.6222635 14 -4.3423791 6.9455389 15 -9.2076513 -4.3423791 16 -13.2817103 -9.2076513 17 -10.1036775 -13.2817103 18 -14.9623594 -10.1036775 19 -7.1685299 -14.9623594 20 -3.1542513 -7.1685299 21 -10.1384053 -3.1542513 22 -10.3544611 -10.1384053 23 -13.5795135 -10.3544611 24 -8.3992840 -13.5795135 25 -15.1175365 -8.3992840 26 -4.7327037 -15.1175365 27 -10.4599529 -4.7327037 28 -8.8111561 -10.4599529 29 -4.0669627 -8.8111561 30 -5.5093791 -4.0669627 31 10.8279652 -5.5093791 32 7.0563127 10.8279652 33 2.9525980 7.0563127 34 -7.0124643 2.9525980 35 -0.9104774 -7.0124643 36 1.5059980 -0.9104774 37 4.6994078 1.5059980 38 6.3440209 4.6994078 39 -0.5524742 6.3440209 40 -6.5016905 -0.5524742 41 -13.2616807 -6.5016905 42 -13.3799332 -13.2616807 43 0.5582996 -13.3799332 44 10.1640012 0.5582996 45 -6.7702578 10.1640012 46 -0.8929037 -6.7702578 47 0.3941258 -0.8929037 48 3.4862275 0.3941258 49 -1.9841168 3.4862275 50 2.2343455 -1.9841168 51 1.7431324 2.2343455 52 -4.9408119 1.7431324 53 -0.4887201 -4.9408119 54 -3.7049856 -0.4887201 55 2.8464275 -3.7049856 56 5.1195979 2.8464275 57 -6.2245463 5.1195979 58 0.8657783 -6.2245463 59 -1.9340119 0.8657783 60 4.1134767 -1.9340119 61 NA 4.1134767 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 7.6985193 21.1851291 [2,] 15.6138963 7.6985193 [3,] 8.2334570 15.6138963 [4,] 8.2376406 8.2334570 [5,] 10.4233619 8.2376406 [6,] 5.2189685 10.4233619 [7,] 11.8976307 5.2189685 [8,] 19.0978405 11.8976307 [9,] 9.9418242 19.0978405 [10,] 13.8530176 9.9418242 [11,] 9.0681848 13.8530176 [12,] 9.6222635 9.0681848 [13,] 6.9455389 9.6222635 [14,] -4.3423791 6.9455389 [15,] -9.2076513 -4.3423791 [16,] -13.2817103 -9.2076513 [17,] -10.1036775 -13.2817103 [18,] -14.9623594 -10.1036775 [19,] -7.1685299 -14.9623594 [20,] -3.1542513 -7.1685299 [21,] -10.1384053 -3.1542513 [22,] -10.3544611 -10.1384053 [23,] -13.5795135 -10.3544611 [24,] -8.3992840 -13.5795135 [25,] -15.1175365 -8.3992840 [26,] -4.7327037 -15.1175365 [27,] -10.4599529 -4.7327037 [28,] -8.8111561 -10.4599529 [29,] -4.0669627 -8.8111561 [30,] -5.5093791 -4.0669627 [31,] 10.8279652 -5.5093791 [32,] 7.0563127 10.8279652 [33,] 2.9525980 7.0563127 [34,] -7.0124643 2.9525980 [35,] -0.9104774 -7.0124643 [36,] 1.5059980 -0.9104774 [37,] 4.6994078 1.5059980 [38,] 6.3440209 4.6994078 [39,] -0.5524742 6.3440209 [40,] -6.5016905 -0.5524742 [41,] -13.2616807 -6.5016905 [42,] -13.3799332 -13.2616807 [43,] 0.5582996 -13.3799332 [44,] 10.1640012 0.5582996 [45,] -6.7702578 10.1640012 [46,] -0.8929037 -6.7702578 [47,] 0.3941258 -0.8929037 [48,] 3.4862275 0.3941258 [49,] -1.9841168 3.4862275 [50,] 2.2343455 -1.9841168 [51,] 1.7431324 2.2343455 [52,] -4.9408119 1.7431324 [53,] -0.4887201 -4.9408119 [54,] -3.7049856 -0.4887201 [55,] 2.8464275 -3.7049856 [56,] 5.1195979 2.8464275 [57,] -6.2245463 5.1195979 [58,] 0.8657783 -6.2245463 [59,] -1.9340119 0.8657783 [60,] 4.1134767 -1.9340119 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 7.6985193 21.1851291 2 15.6138963 7.6985193 3 8.2334570 15.6138963 4 8.2376406 8.2334570 5 10.4233619 8.2376406 6 5.2189685 10.4233619 7 11.8976307 5.2189685 8 19.0978405 11.8976307 9 9.9418242 19.0978405 10 13.8530176 9.9418242 11 9.0681848 13.8530176 12 9.6222635 9.0681848 13 6.9455389 9.6222635 14 -4.3423791 6.9455389 15 -9.2076513 -4.3423791 16 -13.2817103 -9.2076513 17 -10.1036775 -13.2817103 18 -14.9623594 -10.1036775 19 -7.1685299 -14.9623594 20 -3.1542513 -7.1685299 21 -10.1384053 -3.1542513 22 -10.3544611 -10.1384053 23 -13.5795135 -10.3544611 24 -8.3992840 -13.5795135 25 -15.1175365 -8.3992840 26 -4.7327037 -15.1175365 27 -10.4599529 -4.7327037 28 -8.8111561 -10.4599529 29 -4.0669627 -8.8111561 30 -5.5093791 -4.0669627 31 10.8279652 -5.5093791 32 7.0563127 10.8279652 33 2.9525980 7.0563127 34 -7.0124643 2.9525980 35 -0.9104774 -7.0124643 36 1.5059980 -0.9104774 37 4.6994078 1.5059980 38 6.3440209 4.6994078 39 -0.5524742 6.3440209 40 -6.5016905 -0.5524742 41 -13.2616807 -6.5016905 42 -13.3799332 -13.2616807 43 0.5582996 -13.3799332 44 10.1640012 0.5582996 45 -6.7702578 10.1640012 46 -0.8929037 -6.7702578 47 0.3941258 -0.8929037 48 3.4862275 0.3941258 49 -1.9841168 3.4862275 50 2.2343455 -1.9841168 51 1.7431324 2.2343455 52 -4.9408119 1.7431324 53 -0.4887201 -4.9408119 54 -3.7049856 -0.4887201 55 2.8464275 -3.7049856 56 5.1195979 2.8464275 57 -6.2245463 5.1195979 58 0.8657783 -6.2245463 59 -1.9340119 0.8657783 60 4.1134767 -1.9340119 > 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/wessaorg/rcomp/tmp/7zw4q1322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/8byd81322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/9sccu1322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10ev961322156990.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/115mpr1322156990.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/wessaorg/rcomp/tmp/12k3qp1322156990.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/wessaorg/rcomp/tmp/13yf1u1322156990.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/wessaorg/rcomp/tmp/14g35g1322156990.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/wessaorg/rcomp/tmp/15za7b1322156990.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/wessaorg/rcomp/tmp/168kj01322156990.tab") + } > > try(system("convert tmp/1wuz41322156990.ps tmp/1wuz41322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/211if1322156990.ps tmp/211if1322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/3saci1322156990.ps tmp/3saci1322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/4lyez1322156990.ps tmp/4lyez1322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/55uob1322156990.ps tmp/55uob1322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/6w11b1322156990.ps tmp/6w11b1322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/7zw4q1322156990.ps tmp/7zw4q1322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/8byd81322156990.ps tmp/8byd81322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/9sccu1322156990.ps tmp/9sccu1322156990.png",intern=TRUE)) character(0) > try(system("convert tmp/10ev961322156990.ps tmp/10ev961322156990.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.550 0.521 4.160