R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(0.81,0,0.81,0,0.81,0,0.79,0,0.78,0,0.78,0,0.77,0,0.78,0,0.77,0,0.78,0,0.79,0,0.79,0,0.79,0,0.79,0,0.79,0,0.8,0,0.8,0,0.8,1,0.8,1,0.81,1,0.8,1,0.82,1,0.85,1,0.85,1,0.86,1,0.85,1,0.83,1,0.81,1,0.82,1,0.82,1,0.78,1,0.78,1,0.73,1,0.68,1,0.65,1,0.62,1,0.6,1,0.6,1,0.59,1,0.6,1,0.6,1,0.6,1,0.59,1,0.58,1,0.56,1,0.55,1,0.54,1,0.55,1,0.55,1,0.54,1,0.54,1,0.54,1,0.53,1,0.53,1,0.53,1,0.53,1),dim=c(2,56),dimnames=list(c('Bakmeel','Dummy'),1:56)) > y <- array(NA,dim=c(2,56),dimnames=list(c('Bakmeel','Dummy'),1:56)) > 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 Bakmeel Dummy t 1 0.81 0 1 2 0.81 0 2 3 0.81 0 3 4 0.79 0 4 5 0.78 0 5 6 0.78 0 6 7 0.77 0 7 8 0.78 0 8 9 0.77 0 9 10 0.78 0 10 11 0.79 0 11 12 0.79 0 12 13 0.79 0 13 14 0.79 0 14 15 0.79 0 15 16 0.80 0 16 17 0.80 0 17 18 0.80 1 18 19 0.80 1 19 20 0.81 1 20 21 0.80 1 21 22 0.82 1 22 23 0.85 1 23 24 0.85 1 24 25 0.86 1 25 26 0.85 1 26 27 0.83 1 27 28 0.81 1 28 29 0.82 1 29 30 0.82 1 30 31 0.78 1 31 32 0.78 1 32 33 0.73 1 33 34 0.68 1 34 35 0.65 1 35 36 0.62 1 36 37 0.60 1 37 38 0.60 1 38 39 0.59 1 39 40 0.60 1 40 41 0.60 1 41 42 0.60 1 42 43 0.59 1 43 44 0.58 1 44 45 0.56 1 45 46 0.55 1 46 47 0.54 1 47 48 0.55 1 48 49 0.55 1 49 50 0.54 1 50 51 0.54 1 51 52 0.54 1 52 53 0.53 1 53 54 0.53 1 54 55 0.53 1 55 56 0.53 1 56 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummy t 0.875423 0.147810 -0.009491 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.07205 -0.03747 -0.01315 0.03998 0.08593 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.8754226 0.0126387 69.266 < 2e-16 *** Dummy 0.1478104 0.0223377 6.617 1.86e-08 *** t -0.0094914 0.0006354 -14.937 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.04647 on 53 degrees of freedom Multiple R-squared: 0.8496, Adjusted R-squared: 0.8439 F-statistic: 149.7 on 2 and 53 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,] 6.394678e-03 1.278936e-02 9.936053e-01 [2,] 9.506020e-04 1.901204e-03 9.990494e-01 [3,] 7.163298e-04 1.432660e-03 9.992837e-01 [4,] 1.610575e-04 3.221149e-04 9.998389e-01 [5,] 1.644618e-04 3.289237e-04 9.998355e-01 [6,] 3.371018e-04 6.742036e-04 9.996629e-01 [7,] 2.647953e-04 5.295906e-04 9.997352e-01 [8,] 1.456156e-04 2.912312e-04 9.998544e-01 [9,] 6.549683e-05 1.309937e-04 9.999345e-01 [10,] 2.570189e-05 5.140378e-05 9.999743e-01 [11,] 1.708104e-05 3.416208e-05 9.999829e-01 [12,] 8.260733e-06 1.652147e-05 9.999917e-01 [13,] 3.550818e-06 7.101636e-06 9.999964e-01 [14,] 1.532833e-06 3.065665e-06 9.999985e-01 [15,] 7.050743e-07 1.410149e-06 9.999993e-01 [16,] 2.924794e-07 5.849588e-07 9.999997e-01 [17,] 2.012506e-07 4.025011e-07 9.999998e-01 [18,] 2.714905e-06 5.429809e-06 9.999973e-01 [19,] 6.400926e-06 1.280185e-05 9.999936e-01 [20,] 2.104913e-05 4.209826e-05 9.999790e-01 [21,] 2.305155e-05 4.610309e-05 9.999769e-01 [22,] 1.441824e-05 2.883647e-05 9.999856e-01 [23,] 1.407558e-05 2.815116e-05 9.999859e-01 [24,] 2.261189e-05 4.522378e-05 9.999774e-01 [25,] 1.451361e-04 2.902723e-04 9.998549e-01 [26,] 3.477554e-03 6.955107e-03 9.965224e-01 [27,] 1.952214e-01 3.904428e-01 8.047786e-01 [28,] 9.739815e-01 5.203697e-02 2.601848e-02 [29,] 9.999735e-01 5.304369e-05 2.652185e-05 [30,] 9.999999e-01 2.647318e-07 1.323659e-07 [31,] 1.000000e+00 6.137826e-08 3.068913e-08 [32,] 1.000000e+00 4.080843e-08 2.040421e-08 [33,] 1.000000e+00 7.626989e-08 3.813495e-08 [34,] 9.999999e-01 1.415672e-07 7.078359e-08 [35,] 9.999997e-01 5.054721e-07 2.527360e-07 [36,] 9.999993e-01 1.302359e-06 6.511795e-07 [37,] 9.999995e-01 9.741614e-07 4.870807e-07 [38,] 9.999998e-01 4.161804e-07 2.080902e-07 [39,] 1.000000e+00 2.789451e-08 1.394726e-08 [40,] 9.999999e-01 1.179999e-07 5.899996e-08 [41,] 9.999993e-01 1.322288e-06 6.611438e-07 [42,] 9.999994e-01 1.221338e-06 6.106690e-07 [43,] 9.999913e-01 1.745150e-05 8.725748e-06 [44,] 9.999582e-01 8.361945e-05 4.180972e-05 [45,] 9.993545e-01 1.291014e-03 6.455072e-04 > postscript(file="/var/www/html/freestat/rcomp/tmp/11ux01292502559.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/www/html/freestat/rcomp/tmp/21ux01292502559.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/www/html/freestat/rcomp/tmp/3u4wk1292502559.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/www/html/freestat/rcomp/tmp/4u4wk1292502559.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/www/html/freestat/rcomp/tmp/5u4wk1292502559.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 = 56 Frequency = 1 1 2 3 4 5 -0.0559311892 -0.0464397906 -0.0369483919 -0.0474569933 -0.0479655946 6 7 8 9 10 -0.0384741960 -0.0389827973 -0.0194913987 -0.0200000000 -0.0005086013 11 12 13 14 15 0.0189827973 0.0284741960 0.0379655946 0.0474569933 0.0569483919 16 17 18 19 20 0.0764397906 0.0859311892 -0.0523878565 -0.0428964578 -0.0234050592 21 22 23 24 25 -0.0239136605 0.0055777381 0.0450691368 0.0545605355 0.0740519341 26 27 28 29 30 0.0735433328 0.0630347314 0.0525261301 0.0720175287 0.0815089274 31 32 33 34 35 0.0510003260 0.0604917247 0.0199831233 -0.0205254780 -0.0410340794 36 37 38 39 40 -0.0615426807 -0.0720512821 -0.0625598834 -0.0630684847 -0.0435770861 41 42 43 44 45 -0.0340856874 -0.0245942888 -0.0251028901 -0.0256114915 -0.0361200928 46 47 48 49 50 -0.0366286942 -0.0371372955 -0.0176458969 -0.0081544982 -0.0086630996 51 52 53 54 55 0.0008282991 0.0103196978 0.0098110964 0.0193024951 0.0287938937 56 0.0382852924 > postscript(file="/var/www/html/freestat/rcomp/tmp/65dw51292502559.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 = 56 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.0559311892 NA 1 -0.0464397906 -0.0559311892 2 -0.0369483919 -0.0464397906 3 -0.0474569933 -0.0369483919 4 -0.0479655946 -0.0474569933 5 -0.0384741960 -0.0479655946 6 -0.0389827973 -0.0384741960 7 -0.0194913987 -0.0389827973 8 -0.0200000000 -0.0194913987 9 -0.0005086013 -0.0200000000 10 0.0189827973 -0.0005086013 11 0.0284741960 0.0189827973 12 0.0379655946 0.0284741960 13 0.0474569933 0.0379655946 14 0.0569483919 0.0474569933 15 0.0764397906 0.0569483919 16 0.0859311892 0.0764397906 17 -0.0523878565 0.0859311892 18 -0.0428964578 -0.0523878565 19 -0.0234050592 -0.0428964578 20 -0.0239136605 -0.0234050592 21 0.0055777381 -0.0239136605 22 0.0450691368 0.0055777381 23 0.0545605355 0.0450691368 24 0.0740519341 0.0545605355 25 0.0735433328 0.0740519341 26 0.0630347314 0.0735433328 27 0.0525261301 0.0630347314 28 0.0720175287 0.0525261301 29 0.0815089274 0.0720175287 30 0.0510003260 0.0815089274 31 0.0604917247 0.0510003260 32 0.0199831233 0.0604917247 33 -0.0205254780 0.0199831233 34 -0.0410340794 -0.0205254780 35 -0.0615426807 -0.0410340794 36 -0.0720512821 -0.0615426807 37 -0.0625598834 -0.0720512821 38 -0.0630684847 -0.0625598834 39 -0.0435770861 -0.0630684847 40 -0.0340856874 -0.0435770861 41 -0.0245942888 -0.0340856874 42 -0.0251028901 -0.0245942888 43 -0.0256114915 -0.0251028901 44 -0.0361200928 -0.0256114915 45 -0.0366286942 -0.0361200928 46 -0.0371372955 -0.0366286942 47 -0.0176458969 -0.0371372955 48 -0.0081544982 -0.0176458969 49 -0.0086630996 -0.0081544982 50 0.0008282991 -0.0086630996 51 0.0103196978 0.0008282991 52 0.0098110964 0.0103196978 53 0.0193024951 0.0098110964 54 0.0287938937 0.0193024951 55 0.0382852924 0.0287938937 56 NA 0.0382852924 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.0464397906 -0.0559311892 [2,] -0.0369483919 -0.0464397906 [3,] -0.0474569933 -0.0369483919 [4,] -0.0479655946 -0.0474569933 [5,] -0.0384741960 -0.0479655946 [6,] -0.0389827973 -0.0384741960 [7,] -0.0194913987 -0.0389827973 [8,] -0.0200000000 -0.0194913987 [9,] -0.0005086013 -0.0200000000 [10,] 0.0189827973 -0.0005086013 [11,] 0.0284741960 0.0189827973 [12,] 0.0379655946 0.0284741960 [13,] 0.0474569933 0.0379655946 [14,] 0.0569483919 0.0474569933 [15,] 0.0764397906 0.0569483919 [16,] 0.0859311892 0.0764397906 [17,] -0.0523878565 0.0859311892 [18,] -0.0428964578 -0.0523878565 [19,] -0.0234050592 -0.0428964578 [20,] -0.0239136605 -0.0234050592 [21,] 0.0055777381 -0.0239136605 [22,] 0.0450691368 0.0055777381 [23,] 0.0545605355 0.0450691368 [24,] 0.0740519341 0.0545605355 [25,] 0.0735433328 0.0740519341 [26,] 0.0630347314 0.0735433328 [27,] 0.0525261301 0.0630347314 [28,] 0.0720175287 0.0525261301 [29,] 0.0815089274 0.0720175287 [30,] 0.0510003260 0.0815089274 [31,] 0.0604917247 0.0510003260 [32,] 0.0199831233 0.0604917247 [33,] -0.0205254780 0.0199831233 [34,] -0.0410340794 -0.0205254780 [35,] -0.0615426807 -0.0410340794 [36,] -0.0720512821 -0.0615426807 [37,] -0.0625598834 -0.0720512821 [38,] -0.0630684847 -0.0625598834 [39,] -0.0435770861 -0.0630684847 [40,] -0.0340856874 -0.0435770861 [41,] -0.0245942888 -0.0340856874 [42,] -0.0251028901 -0.0245942888 [43,] -0.0256114915 -0.0251028901 [44,] -0.0361200928 -0.0256114915 [45,] -0.0366286942 -0.0361200928 [46,] -0.0371372955 -0.0366286942 [47,] -0.0176458969 -0.0371372955 [48,] -0.0081544982 -0.0176458969 [49,] -0.0086630996 -0.0081544982 [50,] 0.0008282991 -0.0086630996 [51,] 0.0103196978 0.0008282991 [52,] 0.0098110964 0.0103196978 [53,] 0.0193024951 0.0098110964 [54,] 0.0287938937 0.0193024951 [55,] 0.0382852924 0.0287938937 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.0464397906 -0.0559311892 2 -0.0369483919 -0.0464397906 3 -0.0474569933 -0.0369483919 4 -0.0479655946 -0.0474569933 5 -0.0384741960 -0.0479655946 6 -0.0389827973 -0.0384741960 7 -0.0194913987 -0.0389827973 8 -0.0200000000 -0.0194913987 9 -0.0005086013 -0.0200000000 10 0.0189827973 -0.0005086013 11 0.0284741960 0.0189827973 12 0.0379655946 0.0284741960 13 0.0474569933 0.0379655946 14 0.0569483919 0.0474569933 15 0.0764397906 0.0569483919 16 0.0859311892 0.0764397906 17 -0.0523878565 0.0859311892 18 -0.0428964578 -0.0523878565 19 -0.0234050592 -0.0428964578 20 -0.0239136605 -0.0234050592 21 0.0055777381 -0.0239136605 22 0.0450691368 0.0055777381 23 0.0545605355 0.0450691368 24 0.0740519341 0.0545605355 25 0.0735433328 0.0740519341 26 0.0630347314 0.0735433328 27 0.0525261301 0.0630347314 28 0.0720175287 0.0525261301 29 0.0815089274 0.0720175287 30 0.0510003260 0.0815089274 31 0.0604917247 0.0510003260 32 0.0199831233 0.0604917247 33 -0.0205254780 0.0199831233 34 -0.0410340794 -0.0205254780 35 -0.0615426807 -0.0410340794 36 -0.0720512821 -0.0615426807 37 -0.0625598834 -0.0720512821 38 -0.0630684847 -0.0625598834 39 -0.0435770861 -0.0630684847 40 -0.0340856874 -0.0435770861 41 -0.0245942888 -0.0340856874 42 -0.0251028901 -0.0245942888 43 -0.0256114915 -0.0251028901 44 -0.0361200928 -0.0256114915 45 -0.0366286942 -0.0361200928 46 -0.0371372955 -0.0366286942 47 -0.0176458969 -0.0371372955 48 -0.0081544982 -0.0176458969 49 -0.0086630996 -0.0081544982 50 0.0008282991 -0.0086630996 51 0.0103196978 0.0008282991 52 0.0098110964 0.0103196978 53 0.0193024951 0.0098110964 54 0.0287938937 0.0193024951 55 0.0382852924 0.0287938937 > 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/freestat/rcomp/tmp/75dw51292502559.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/www/html/freestat/rcomp/tmp/8x4d81292502559.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/www/html/freestat/rcomp/tmp/9x4d81292502559.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/www/html/freestat/rcomp/tmp/108dut1292502559.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/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11cetz1292502559.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/freestat/rcomp/tmp/12fx951292502559.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/freestat/rcomp/tmp/13b6pw1292502559.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/freestat/rcomp/tmp/14wp521292502559.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/freestat/rcomp/tmp/157ynn1292502559.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/freestat/rcomp/tmp/16l8le1292502559.tab") + } > > try(system("convert tmp/11ux01292502559.ps tmp/11ux01292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/21ux01292502559.ps tmp/21ux01292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/3u4wk1292502559.ps tmp/3u4wk1292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/4u4wk1292502559.ps tmp/4u4wk1292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/5u4wk1292502559.ps tmp/5u4wk1292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/65dw51292502559.ps tmp/65dw51292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/75dw51292502559.ps tmp/75dw51292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/8x4d81292502559.ps tmp/8x4d81292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/9x4d81292502559.ps tmp/9x4d81292502559.png",intern=TRUE)) character(0) > try(system("convert tmp/108dut1292502559.ps tmp/108dut1292502559.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.731 2.439 4.106