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(1217 + ,1210 + ,0 + ,31.00 + ,48 + ,961.00 + ,2304 + ,1202 + ,1209 + ,0 + ,34.40 + ,38 + ,1183.36 + ,1444 + ,1180 + ,1207 + ,0 + ,35.60 + ,37 + ,1267.36 + ,1369 + ,1167 + ,1206 + ,0 + ,32.80 + ,48 + ,1075.84 + ,2304 + ,1186 + ,1204 + ,1 + ,23.30 + ,81 + ,542.89 + ,6561 + ,1168 + ,1201 + ,1 + ,20.00 + ,58 + ,400.00 + ,3364 + ,1142 + ,1199 + ,1 + ,16.70 + ,93 + ,278.89 + ,8649 + ,1147 + ,1198 + ,0 + ,17.80 + ,86 + ,316.84 + ,7396 + ,1183 + ,1196 + ,0 + ,21.20 + ,68 + ,449.44 + ,4624 + ,1149 + ,1195 + ,0 + ,23.90 + ,68 + ,571.21 + ,4624 + ,1197 + ,1193 + ,0 + ,28.80 + ,68 + ,829.44 + ,4624 + ,1210 + ,1191 + ,0 + ,25.60 + ,59 + ,655.36 + ,3481 + ,1206 + ,1190 + ,0 + ,29.40 + ,43 + ,864.36 + ,1849 + ,1196 + ,1188 + ,0 + ,22.80 + ,59 + ,519.84 + ,3481 + ,1190 + ,1187 + ,0 + ,16.10 + ,31 + ,259.21 + ,961 + ,1175 + ,1185 + ,0 + ,16.10 + ,49 + ,259.21 + ,2401 + ,1186 + ,1183 + ,0 + ,20.00 + ,52 + ,400.00 + ,2704 + ,1172 + ,1182 + ,0 + ,20.60 + ,75 + ,424.36 + ,5625 + ,1152 + ,1185 + ,1 + ,18.30 + ,90 + ,334.89 + ,8100 + ,1154 + ,1179 + ,1 + ,21.60 + ,86 + ,466.56 + ,7396 + ,1168 + ,1177 + ,0 + ,22.80 + ,87 + ,519.84 + ,7569 + ,1180 + ,1175 + ,0 + ,22.80 + ,47 + ,519.84 + ,2209 + ,1169 + ,1174 + ,0 + ,17.20 + ,70 + ,295.84 + ,4900 + ,1166 + ,1170 + ,0 + ,22.20 + ,61 + ,492.84 + ,3721 + ,1177 + ,1169 + ,0 + ,20.60 + ,48 + ,424.36 + ,2304 + ,1168 + ,1167 + ,0 + ,18.30 + ,67 + ,334.89 + ,4489 + ,1160 + ,1166 + ,0 + ,16.70 + ,74 + ,278.89 + ,5476 + ,1147 + ,1164 + ,1 + ,22.80 + ,55 + ,519.84 + ,3025 + ,1161 + ,1162 + ,0 + ,13.90 + ,47 + ,193.21 + ,2209 + ,1143 + ,1161 + ,0 + ,10.00 + ,65 + ,100.00 + ,4225 + ,1161 + ,1159 + ,0 + ,16.10 + ,28 + ,259.21 + ,784 + ,1161 + ,1158 + ,0 + ,20.60 + ,30 + ,424.36 + ,900 + ,1168 + ,1156 + ,0 + ,19.40 + ,67 + ,376.36 + ,4489 + ,1172 + ,1155 + ,0 + ,25.60 + ,32 + ,655.36 + ,1024) + ,dim=c(7 + ,34) + ,dimnames=list(c('Time' + ,'Sunset' + ,'Rain' + ,'T' + ,'H' + ,'T^2' + ,'H^2') + ,1:34)) > y <- array(NA,dim=c(7,34),dimnames=list(c('Time','Sunset','Rain','T','H','T^2','H^2'),1:34)) > 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 > 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 Time Sunset Rain T H T^2 H^2 1 1217 1210 0 31.0 48 961.00 2304 2 1202 1209 0 34.4 38 1183.36 1444 3 1180 1207 0 35.6 37 1267.36 1369 4 1167 1206 0 32.8 48 1075.84 2304 5 1186 1204 1 23.3 81 542.89 6561 6 1168 1201 1 20.0 58 400.00 3364 7 1142 1199 1 16.7 93 278.89 8649 8 1147 1198 0 17.8 86 316.84 7396 9 1183 1196 0 21.2 68 449.44 4624 10 1149 1195 0 23.9 68 571.21 4624 11 1197 1193 0 28.8 68 829.44 4624 12 1210 1191 0 25.6 59 655.36 3481 13 1206 1190 0 29.4 43 864.36 1849 14 1196 1188 0 22.8 59 519.84 3481 15 1190 1187 0 16.1 31 259.21 961 16 1175 1185 0 16.1 49 259.21 2401 17 1186 1183 0 20.0 52 400.00 2704 18 1172 1182 0 20.6 75 424.36 5625 19 1152 1185 1 18.3 90 334.89 8100 20 1154 1179 1 21.6 86 466.56 7396 21 1168 1177 0 22.8 87 519.84 7569 22 1180 1175 0 22.8 47 519.84 2209 23 1169 1174 0 17.2 70 295.84 4900 24 1166 1170 0 22.2 61 492.84 3721 25 1177 1169 0 20.6 48 424.36 2304 26 1168 1167 0 18.3 67 334.89 4489 27 1160 1166 0 16.7 74 278.89 5476 28 1147 1164 1 22.8 55 519.84 3025 29 1161 1162 0 13.9 47 193.21 2209 30 1143 1161 0 10.0 65 100.00 4225 31 1161 1159 0 16.1 28 259.21 784 32 1161 1158 0 20.6 30 424.36 900 33 1168 1156 0 19.4 67 376.36 4489 34 1172 1155 0 25.6 32 655.36 1024 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Sunset Rain T H `T^2` 471.725413 0.524500 -13.466945 6.334415 0.710215 -0.121688 `H^2` -0.009109 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -37.562 -3.797 2.096 6.719 20.988 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 471.725413 235.339505 2.004 0.0551 . Sunset 0.524500 0.199890 2.624 0.0141 * Rain -13.466945 7.495860 -1.797 0.0836 . T 6.334415 2.735829 2.315 0.0284 * H 0.710215 0.869048 0.817 0.4209 `T^2` -0.121688 0.059559 -2.043 0.0509 . `H^2` -0.009109 0.007281 -1.251 0.2216 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.77 on 27 degrees of freedom Multiple R-squared: 0.5931, Adjusted R-squared: 0.5027 F-statistic: 6.56 on 6 and 27 DF, p-value: 0.0002321 > 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.9979120 4.175970e-03 2.087985e-03 [2,] 0.9999732 5.362586e-05 2.681293e-05 [3,] 0.9999844 3.122885e-05 1.561443e-05 [4,] 0.9999747 5.051504e-05 2.525752e-05 [5,] 0.9999688 6.231351e-05 3.115675e-05 [6,] 0.9999665 6.691456e-05 3.345728e-05 [7,] 0.9999295 1.410622e-04 7.053111e-05 [8,] 0.9998570 2.859532e-04 1.429766e-04 [9,] 0.9995198 9.604210e-04 4.802105e-04 [10,] 0.9984708 3.058380e-03 1.529190e-03 [11,] 0.9981555 3.689000e-03 1.844500e-03 [12,] 0.9942359 1.152812e-02 5.764059e-03 [13,] 0.9866378 2.672444e-02 1.336222e-02 [14,] 0.9741710 5.165804e-02 2.582902e-02 [15,] 0.9746170 5.076608e-02 2.538304e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1x8dp1331157295.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/2c5q71331157295.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/32ico1331157295.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/435nc1331157295.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/5n1it1331157295.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 = 34 Frequency = 1 1 2 3 4 5 6 18.1012211 8.4160626 -9.8873387 -27.2280228 16.9494537 -8.7469694 7 8 9 10 11 12 -4.2503658 -20.9842315 -1.8016777 -37.5620942 11.8718837 20.9882259 13 14 15 16 17 18 15.3729513 9.8068680 11.9884935 -1.6299130 3.4766648 -0.5637139 19 20 21 22 23 24 6.9021182 3.5966348 4.9265359 -2.4382606 3.4771961 -9.4714221 25 26 27 28 29 30 0.1807460 2.3197621 2.1835110 -14.4508716 2.0094320 3.4747490 31 32 33 34 -1.8070902 -10.0544343 6.1678273 -1.3339314 > postscript(file="/var/wessaorg/rcomp/tmp/62dop1331157295.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 = 34 Frequency = 1 lag(myerror, k = 1) myerror 0 18.1012211 NA 1 8.4160626 18.1012211 2 -9.8873387 8.4160626 3 -27.2280228 -9.8873387 4 16.9494537 -27.2280228 5 -8.7469694 16.9494537 6 -4.2503658 -8.7469694 7 -20.9842315 -4.2503658 8 -1.8016777 -20.9842315 9 -37.5620942 -1.8016777 10 11.8718837 -37.5620942 11 20.9882259 11.8718837 12 15.3729513 20.9882259 13 9.8068680 15.3729513 14 11.9884935 9.8068680 15 -1.6299130 11.9884935 16 3.4766648 -1.6299130 17 -0.5637139 3.4766648 18 6.9021182 -0.5637139 19 3.5966348 6.9021182 20 4.9265359 3.5966348 21 -2.4382606 4.9265359 22 3.4771961 -2.4382606 23 -9.4714221 3.4771961 24 0.1807460 -9.4714221 25 2.3197621 0.1807460 26 2.1835110 2.3197621 27 -14.4508716 2.1835110 28 2.0094320 -14.4508716 29 3.4747490 2.0094320 30 -1.8070902 3.4747490 31 -10.0544343 -1.8070902 32 6.1678273 -10.0544343 33 -1.3339314 6.1678273 34 NA -1.3339314 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 8.4160626 18.1012211 [2,] -9.8873387 8.4160626 [3,] -27.2280228 -9.8873387 [4,] 16.9494537 -27.2280228 [5,] -8.7469694 16.9494537 [6,] -4.2503658 -8.7469694 [7,] -20.9842315 -4.2503658 [8,] -1.8016777 -20.9842315 [9,] -37.5620942 -1.8016777 [10,] 11.8718837 -37.5620942 [11,] 20.9882259 11.8718837 [12,] 15.3729513 20.9882259 [13,] 9.8068680 15.3729513 [14,] 11.9884935 9.8068680 [15,] -1.6299130 11.9884935 [16,] 3.4766648 -1.6299130 [17,] -0.5637139 3.4766648 [18,] 6.9021182 -0.5637139 [19,] 3.5966348 6.9021182 [20,] 4.9265359 3.5966348 [21,] -2.4382606 4.9265359 [22,] 3.4771961 -2.4382606 [23,] -9.4714221 3.4771961 [24,] 0.1807460 -9.4714221 [25,] 2.3197621 0.1807460 [26,] 2.1835110 2.3197621 [27,] -14.4508716 2.1835110 [28,] 2.0094320 -14.4508716 [29,] 3.4747490 2.0094320 [30,] -1.8070902 3.4747490 [31,] -10.0544343 -1.8070902 [32,] 6.1678273 -10.0544343 [33,] -1.3339314 6.1678273 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 8.4160626 18.1012211 2 -9.8873387 8.4160626 3 -27.2280228 -9.8873387 4 16.9494537 -27.2280228 5 -8.7469694 16.9494537 6 -4.2503658 -8.7469694 7 -20.9842315 -4.2503658 8 -1.8016777 -20.9842315 9 -37.5620942 -1.8016777 10 11.8718837 -37.5620942 11 20.9882259 11.8718837 12 15.3729513 20.9882259 13 9.8068680 15.3729513 14 11.9884935 9.8068680 15 -1.6299130 11.9884935 16 3.4766648 -1.6299130 17 -0.5637139 3.4766648 18 6.9021182 -0.5637139 19 3.5966348 6.9021182 20 4.9265359 3.5966348 21 -2.4382606 4.9265359 22 3.4771961 -2.4382606 23 -9.4714221 3.4771961 24 0.1807460 -9.4714221 25 2.3197621 0.1807460 26 2.1835110 2.3197621 27 -14.4508716 2.1835110 28 2.0094320 -14.4508716 29 3.4747490 2.0094320 30 -1.8070902 3.4747490 31 -10.0544343 -1.8070902 32 6.1678273 -10.0544343 33 -1.3339314 6.1678273 > 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/70qhd1331157295.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/8o4pl1331157295.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/9c3bp1331157295.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/1091wb1331157295.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/11k80n1331157295.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/12dnz11331157295.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/13pivs1331157295.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/14vjhv1331157295.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/159z9x1331157295.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/163yjg1331157295.tab") + } > > try(system("convert tmp/1x8dp1331157295.ps tmp/1x8dp1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/2c5q71331157295.ps tmp/2c5q71331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/32ico1331157295.ps tmp/32ico1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/435nc1331157295.ps tmp/435nc1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/5n1it1331157295.ps tmp/5n1it1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/62dop1331157295.ps tmp/62dop1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/70qhd1331157295.ps tmp/70qhd1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/8o4pl1331157295.ps tmp/8o4pl1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/9c3bp1331157295.ps tmp/9c3bp1331157295.png",intern=TRUE)) character(0) > try(system("convert tmp/1091wb1331157295.ps tmp/1091wb1331157295.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.319 0.676 3.999