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(12 + ,24 + ,14 + ,8 + ,25 + ,11 + ,8 + ,17 + ,6 + ,8 + ,18 + ,12 + ,9 + ,18 + ,8 + ,7 + ,16 + ,10 + ,4 + ,20 + ,10 + ,11 + ,16 + ,11 + ,7 + ,18 + ,16 + ,7 + ,17 + ,11 + ,12 + ,23 + ,13 + ,10 + ,30 + ,12 + ,10 + ,23 + ,8 + ,8 + ,18 + ,12 + ,8 + ,15 + ,11 + ,4 + ,12 + ,4 + ,9 + ,21 + ,9 + ,8 + ,15 + ,8 + ,7 + ,20 + ,8 + ,11 + ,31 + ,14 + ,9 + ,27 + ,15 + ,11 + ,34 + ,16 + ,13 + ,21 + ,9 + ,8 + ,31 + ,14 + ,8 + ,19 + ,11 + ,9 + ,16 + ,8 + ,6 + ,20 + ,9 + ,9 + ,21 + ,9 + ,9 + ,22 + ,9 + ,6 + ,17 + ,9 + ,6 + ,24 + ,10 + ,16 + ,25 + ,16 + ,5 + ,26 + ,11 + ,7 + ,25 + ,8 + ,9 + ,17 + ,9 + ,6 + ,32 + ,16 + ,6 + ,33 + ,11 + ,5 + ,13 + ,16 + ,12 + ,32 + ,12 + ,7 + ,25 + ,12 + ,10 + ,29 + ,14 + ,9 + ,22 + ,9 + ,8 + ,18 + ,10 + ,5 + ,17 + ,9 + ,8 + ,20 + ,10 + ,8 + ,15 + ,12 + ,10 + ,20 + ,14 + ,6 + ,33 + ,14 + ,8 + ,29 + ,10 + ,7 + ,23 + ,14 + ,4 + ,26 + ,16 + ,8 + ,18 + ,9 + ,8 + ,20 + ,10 + ,4 + ,11 + ,6 + ,20 + ,28 + ,8 + ,8 + ,26 + ,13 + ,8 + ,22 + ,10 + ,6 + ,17 + ,8 + ,4 + ,12 + ,7 + ,8 + ,14 + ,15 + ,9 + ,17 + ,9 + ,6 + ,21 + ,10 + ,7 + ,19 + ,12 + ,9 + ,18 + ,13 + ,5 + ,10 + ,10 + ,5 + ,29 + ,11 + ,8 + ,31 + ,8 + ,8 + ,19 + ,9 + ,6 + ,9 + ,13 + ,8 + ,20 + ,11 + ,7 + ,28 + ,8 + ,7 + ,19 + ,9 + ,9 + ,30 + ,9 + ,11 + ,29 + ,15 + ,6 + ,26 + ,9 + ,8 + ,23 + ,10 + ,6 + ,13 + ,14 + ,9 + ,21 + ,12 + ,8 + ,19 + ,12 + ,6 + ,28 + ,11 + ,10 + ,23 + ,14 + ,8 + ,18 + ,6 + ,8 + ,21 + ,12 + ,10 + ,20 + ,8 + ,5 + ,23 + ,14 + ,7 + ,21 + ,11 + ,5 + ,21 + ,10 + ,8 + ,15 + ,14 + ,14 + ,28 + ,12 + ,7 + ,19 + ,10 + ,8 + ,26 + ,14 + ,6 + ,10 + ,5 + ,5 + ,16 + ,11 + ,6 + ,22 + ,10 + ,10 + ,19 + ,9 + ,12 + ,31 + ,10 + ,9 + ,31 + ,16 + ,12 + ,29 + ,13 + ,7 + ,19 + ,9 + ,8 + ,22 + ,10 + ,10 + ,23 + ,10 + ,6 + ,15 + ,7 + ,10 + ,20 + ,9 + ,10 + ,18 + ,8 + ,10 + ,23 + ,14 + ,5 + ,25 + ,14 + ,7 + ,21 + ,8 + ,10 + ,24 + ,9 + ,11 + ,25 + ,14 + ,6 + ,17 + ,14 + ,7 + ,13 + ,8 + ,12 + ,28 + ,8 + ,11 + ,21 + ,8 + ,11 + ,25 + ,7 + ,11 + ,9 + ,6 + ,5 + ,16 + ,8 + ,8 + ,19 + ,6 + ,6 + ,17 + ,11 + ,9 + ,25 + ,14 + ,4 + ,20 + ,11 + ,4 + ,29 + ,11 + ,7 + ,14 + ,11 + ,11 + ,22 + ,14 + ,6 + ,15 + ,8 + ,7 + ,19 + ,20 + ,8 + ,20 + ,11 + ,4 + ,15 + ,8 + ,8 + ,20 + ,11 + ,9 + ,18 + ,10 + ,8 + ,33 + ,14 + ,11 + ,22 + ,11 + ,8 + ,16 + ,9 + ,5 + ,17 + ,9 + ,4 + ,16 + ,8 + ,8 + ,21 + ,10 + ,10 + ,26 + ,13 + ,6 + ,18 + ,13 + ,9 + ,18 + ,12 + ,9 + ,17 + ,8 + ,13 + ,22 + ,13 + ,9 + ,30 + ,14 + ,10 + ,30 + ,12 + ,20 + ,24 + ,14 + ,5 + ,21 + ,15 + ,11 + ,21 + ,13 + ,6 + ,29 + ,16 + ,9 + ,31 + ,9 + ,7 + ,20 + ,9 + ,9 + ,16 + ,9 + ,10 + ,22 + ,8 + ,9 + ,20 + ,7 + ,8 + ,28 + ,16 + ,7 + ,38 + ,11 + ,6 + ,22 + ,9 + ,13 + ,20 + ,11 + ,6 + ,17 + ,9 + ,8 + ,28 + ,14 + ,10 + ,22 + ,13 + ,16 + ,31 + ,16) + ,dim=c(3 + ,159) + ,dimnames=list(c('ParCritism' + ,'ParConcern' + ,'ParDoubt') + ,1:159)) > y <- array(NA,dim=c(3,159),dimnames=list(c('ParCritism','ParConcern','ParDoubt'),1:159)) > 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 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 ParCritism ParConcern ParDoubt 1 12 24 14 2 8 25 11 3 8 17 6 4 8 18 12 5 9 18 8 6 7 16 10 7 4 20 10 8 11 16 11 9 7 18 16 10 7 17 11 11 12 23 13 12 10 30 12 13 10 23 8 14 8 18 12 15 8 15 11 16 4 12 4 17 9 21 9 18 8 15 8 19 7 20 8 20 11 31 14 21 9 27 15 22 11 34 16 23 13 21 9 24 8 31 14 25 8 19 11 26 9 16 8 27 6 20 9 28 9 21 9 29 9 22 9 30 6 17 9 31 6 24 10 32 16 25 16 33 5 26 11 34 7 25 8 35 9 17 9 36 6 32 16 37 6 33 11 38 5 13 16 39 12 32 12 40 7 25 12 41 10 29 14 42 9 22 9 43 8 18 10 44 5 17 9 45 8 20 10 46 8 15 12 47 10 20 14 48 6 33 14 49 8 29 10 50 7 23 14 51 4 26 16 52 8 18 9 53 8 20 10 54 4 11 6 55 20 28 8 56 8 26 13 57 8 22 10 58 6 17 8 59 4 12 7 60 8 14 15 61 9 17 9 62 6 21 10 63 7 19 12 64 9 18 13 65 5 10 10 66 5 29 11 67 8 31 8 68 8 19 9 69 6 9 13 70 8 20 11 71 7 28 8 72 7 19 9 73 9 30 9 74 11 29 15 75 6 26 9 76 8 23 10 77 6 13 14 78 9 21 12 79 8 19 12 80 6 28 11 81 10 23 14 82 8 18 6 83 8 21 12 84 10 20 8 85 5 23 14 86 7 21 11 87 5 21 10 88 8 15 14 89 14 28 12 90 7 19 10 91 8 26 14 92 6 10 5 93 5 16 11 94 6 22 10 95 10 19 9 96 12 31 10 97 9 31 16 98 12 29 13 99 7 19 9 100 8 22 10 101 10 23 10 102 6 15 7 103 10 20 9 104 10 18 8 105 10 23 14 106 5 25 14 107 7 21 8 108 10 24 9 109 11 25 14 110 6 17 14 111 7 13 8 112 12 28 8 113 11 21 8 114 11 25 7 115 11 9 6 116 5 16 8 117 8 19 6 118 6 17 11 119 9 25 14 120 4 20 11 121 4 29 11 122 7 14 11 123 11 22 14 124 6 15 8 125 7 19 20 126 8 20 11 127 4 15 8 128 8 20 11 129 9 18 10 130 8 33 14 131 11 22 11 132 8 16 9 133 5 17 9 134 4 16 8 135 8 21 10 136 10 26 13 137 6 18 13 138 9 18 12 139 9 17 8 140 13 22 13 141 9 30 14 142 10 30 12 143 20 24 14 144 5 21 15 145 11 21 13 146 6 29 16 147 9 31 9 148 7 20 9 149 9 16 9 150 10 22 8 151 9 20 7 152 8 28 16 153 7 38 11 154 6 22 9 155 13 20 11 156 6 17 9 157 8 28 14 158 10 22 13 159 16 31 16 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) ParConcern ParDoubt 4.81033 0.14009 0.03602 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.2690 -1.5797 -0.1123 1.4217 11.3234 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.81033 0.96646 4.977 1.69e-06 *** ParConcern 0.14009 0.03916 3.577 0.000463 *** ParDoubt 0.03602 0.08003 0.450 0.653302 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.588 on 156 degrees of freedom Multiple R-squared: 0.09782, Adjusted R-squared: 0.08625 F-statistic: 8.457 on 2 and 156 DF, p-value: 0.0003259 > 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.2877247302 0.575449460 0.7122753 [2,] 0.6100838845 0.779832231 0.3899161 [3,] 0.6051798089 0.789640382 0.3948202 [4,] 0.5871371976 0.825725605 0.4128628 [5,] 0.4844942603 0.968988521 0.5155057 [6,] 0.5093085992 0.981382802 0.4906914 [7,] 0.4101561009 0.820312202 0.5898439 [8,] 0.3378213129 0.675642626 0.6621787 [9,] 0.2553215412 0.510643082 0.7446785 [10,] 0.1875111877 0.375022375 0.8124888 [11,] 0.1677887227 0.335577445 0.8322113 [12,] 0.1213101961 0.242620392 0.8786898 [13,] 0.0900123378 0.180024676 0.9099877 [14,] 0.0659864892 0.131972978 0.9340135 [15,] 0.0444402824 0.088880565 0.9555597 [16,] 0.0349444816 0.069888963 0.9650555 [17,] 0.0234620777 0.046924155 0.9765379 [18,] 0.0795226391 0.159045278 0.9204774 [19,] 0.0874673047 0.174934609 0.9125327 [20,] 0.0629426094 0.125885219 0.9370574 [21,] 0.0500521742 0.100104348 0.9499478 [22,] 0.0495963270 0.099192654 0.9504037 [23,] 0.0354554177 0.070910835 0.9645446 [24,] 0.0246125522 0.049225104 0.9753874 [25,] 0.0211195592 0.042239118 0.9788804 [26,] 0.0258611898 0.051722380 0.9741388 [27,] 0.1364028119 0.272805624 0.8635972 [28,] 0.2040920178 0.408184036 0.7959080 [29,] 0.1719335944 0.343867189 0.8280664 [30,] 0.1464293932 0.292858786 0.8535706 [31,] 0.2324089131 0.464817826 0.7675911 [32,] 0.2459854715 0.491970943 0.7540145 [33,] 0.3204283530 0.640856706 0.6795716 [34,] 0.3216619773 0.643323955 0.6783380 [35,] 0.2972956846 0.594591369 0.7027043 [36,] 0.2540735161 0.508147032 0.7459265 [37,] 0.2175171858 0.435034372 0.7824828 [38,] 0.1803138182 0.360627636 0.8196862 [39,] 0.1821049834 0.364209967 0.8178950 [40,] 0.1492429748 0.298485950 0.8507570 [41,] 0.1214043973 0.242808795 0.8785956 [42,] 0.1051863268 0.210372654 0.8948137 [43,] 0.1381016135 0.276203227 0.8618984 [44,] 0.1146127641 0.229225528 0.8853872 [45,] 0.1027352800 0.205470560 0.8972647 [46,] 0.1910503025 0.382100605 0.8089497 [47,] 0.1591942230 0.318388446 0.8408058 [48,] 0.1307486109 0.261497222 0.8692514 [49,] 0.1347777022 0.269555404 0.8652223 [50,] 0.8368907292 0.326218542 0.1631093 [51,] 0.8094137244 0.381172551 0.1905863 [52,] 0.7756969382 0.448606124 0.2243031 [53,] 0.7514206078 0.497158784 0.2485794 [54,] 0.7542880719 0.491423856 0.2457119 [55,] 0.7198481179 0.560303764 0.2801519 [56,] 0.6921134649 0.615773070 0.3078865 [57,] 0.6770970507 0.645805899 0.3229029 [58,] 0.6386250642 0.722749872 0.3613749 [59,] 0.6041717590 0.791656482 0.3958282 [60,] 0.5739594226 0.852081155 0.4260406 [61,] 0.6467632043 0.706473591 0.3532368 [62,] 0.6154235246 0.769152951 0.3845765 [63,] 0.5707588538 0.858482292 0.4292411 [64,] 0.5266648271 0.946670346 0.4733352 [65,] 0.4805270655 0.961054131 0.5194729 [66,] 0.4608856407 0.921771281 0.5391144 [67,] 0.4192994404 0.838598881 0.5807006 [68,] 0.3758689695 0.751737939 0.6241310 [69,] 0.3493053251 0.698610650 0.6506947 [70,] 0.3543411947 0.708682389 0.6456588 [71,] 0.3136297099 0.627259420 0.6863703 [72,] 0.2809418534 0.561883707 0.7190581 [73,] 0.2473470125 0.494694025 0.7526530 [74,] 0.2125874514 0.425174903 0.7874125 [75,] 0.2279199570 0.455839914 0.7720800 [76,] 0.2050959925 0.410191985 0.7949040 [77,] 0.1754213748 0.350842750 0.8245786 [78,] 0.1475221366 0.295044273 0.8524779 [79,] 0.1385865987 0.277173197 0.8614134 [80,] 0.1607096424 0.321419285 0.8392904 [81,] 0.1393191880 0.278638376 0.8606808 [82,] 0.1510646982 0.302129396 0.8489353 [83,] 0.1269566812 0.253913362 0.8730433 [84,] 0.1928811770 0.385762354 0.8071188 [85,] 0.1660925383 0.332185077 0.8339075 [86,] 0.1427710810 0.285542162 0.8572289 [87,] 0.1190313311 0.238062662 0.8809687 [88,] 0.1170145400 0.234029080 0.8829855 [89,] 0.1123608998 0.224721800 0.8876391 [90,] 0.1051619438 0.210323888 0.8948381 [91,] 0.1023209334 0.204641867 0.8976791 [92,] 0.0846828377 0.169365675 0.9153172 [93,] 0.0843091564 0.168618313 0.9156908 [94,] 0.0694429701 0.138885940 0.9305570 [95,] 0.0553718878 0.110743776 0.9446281 [96,] 0.0472172222 0.094434444 0.9527828 [97,] 0.0391228534 0.078245707 0.9608771 [98,] 0.0348469113 0.069693823 0.9651531 [99,] 0.0325003461 0.065000692 0.9674997 [100,] 0.0266970167 0.053394033 0.9733030 [101,] 0.0361698989 0.072339798 0.9638301 [102,] 0.0290224572 0.058044914 0.9709775 [103,] 0.0237524626 0.047504925 0.9762475 [104,] 0.0211996109 0.042399222 0.9788004 [105,] 0.0183336399 0.036667280 0.9816664 [106,] 0.0135642322 0.027128464 0.9864358 [107,] 0.0148539585 0.029707917 0.9851460 [108,] 0.0158659823 0.031731965 0.9841340 [109,] 0.0161080532 0.032216106 0.9838919 [110,] 0.0294834873 0.058966975 0.9705165 [111,] 0.0267347783 0.053469557 0.9732652 [112,] 0.0204538379 0.040907676 0.9795462 [113,] 0.0170001030 0.034000206 0.9829999 [114,] 0.0123297048 0.024659410 0.9876703 [115,] 0.0185569244 0.037113849 0.9814431 [116,] 0.0400288407 0.080057681 0.9599712 [117,] 0.0303382450 0.060676490 0.9696618 [118,] 0.0273246111 0.054649222 0.9726754 [119,] 0.0213042889 0.042608578 0.9786957 [120,] 0.0232503988 0.046500798 0.9767496 [121,] 0.0168475744 0.033695149 0.9831524 [122,] 0.0199359101 0.039871820 0.9800641 [123,] 0.0143598476 0.028719695 0.9856402 [124,] 0.0103528891 0.020705778 0.9896471 [125,] 0.0087051042 0.017410208 0.9912949 [126,] 0.0077727815 0.015545563 0.9922272 [127,] 0.0051916118 0.010383224 0.9948084 [128,] 0.0051890530 0.010378106 0.9948109 [129,] 0.0074057825 0.014811565 0.9925942 [130,] 0.0049670462 0.009934092 0.9950330 [131,] 0.0032218275 0.006443655 0.9967782 [132,] 0.0039949058 0.007989812 0.9960051 [133,] 0.0026383774 0.005276755 0.9973616 [134,] 0.0016388944 0.003277789 0.9983611 [135,] 0.0020335111 0.004067022 0.9979665 [136,] 0.0012241912 0.002448382 0.9987758 [137,] 0.0006985798 0.001397160 0.9993014 [138,] 0.1559104765 0.311820953 0.8440895 [139,] 0.2459954834 0.491990967 0.7540045 [140,] 0.2042112212 0.408422442 0.7957888 [141,] 0.3121559517 0.624311903 0.6878440 [142,] 0.2478151569 0.495630314 0.7521848 [143,] 0.1938573189 0.387714638 0.8061427 [144,] 0.1323946209 0.264789242 0.8676054 [145,] 0.1115292229 0.223058446 0.8884708 [146,] 0.0980939736 0.196187947 0.9019060 [147,] 0.2228180875 0.445636175 0.7771819 [148,] 0.1394939346 0.278987869 0.8605061 > postscript(file="/var/www/html/freestat/rcomp/tmp/1bnn01290714981.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/freestat/rcomp/tmp/2mfm31290714981.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/freestat/rcomp/tmp/3mfm31290714981.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/freestat/rcomp/tmp/4mfm31290714981.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/freestat/rcomp/tmp/5wom61290714981.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 = 159 Frequency = 1 1 2 3 4 5 6 3.323364036 -0.708675453 0.592097737 0.235916334 1.379979407 -0.411878542 7 8 9 10 11 12 -3.972225717 3.552105690 -0.908146738 -0.587981104 3.499466598 0.554874811 13 14 15 16 17 18 1.679545439 0.235916334 0.692192483 -2.635436759 0.923703258 0.800239788 19 20 21 22 23 24 -0.900194180 1.342756481 -0.132912113 0.850464564 4.923703258 -1.657243519 25 26 27 28 29 30 0.131845309 1.660152994 -1.936209948 0.923703258 0.783616464 -1.515949568 31 32 33 34 35 36 -2.532572891 7.111245707 -3.848762246 -1.600628148 1.484050432 -3.869361849 37 38 39 40 41 42 -3.829369802 -2.207712770 2.274701224 -1.744691221 0.622930068 0.783616464 43 44 45 46 47 48 0.307947871 -2.515949568 0.027774283 0.656176715 1.883711211 -3.937417106 49 50 51 52 53 54 -1.233006859 -1.536549170 -5.028841087 0.343963639 0.027774283 -2.567381501 55 56 57 58 59 60 10.979111471 -0.920793783 -0.252399304 -1.479933799 -2.743484063 0.688216205 61 62 63 64 65 66 1.484050432 -2.112312510 -0.904170459 1.199900566 -1.571357780 -4.269022627 67 68 69 70 71 72 -1.441148910 0.203876845 -0.539318291 -0.008241485 -2.020888529 -0.796123155 73 74 75 76 77 78 -0.337077885 1.586914300 -2.776730710 -0.392486097 -1.135681234 0.815655954 79 80 81 82 83 84 0.095829541 -3.128935834 1.463450830 0.452010943 -0.184344046 2.099805820 85 86 87 88 89 90 -3.536549170 -1.148328278 -3.112312510 0.584145179 4.835048398 -0.832138923 91 92 93 94 95 96 -0.956809551 -0.391278940 -2.447894310 -2.252399304 2.203876845 2.486819553 97 98 99 100 101 102 -0.729275055 2.658945836 -0.796123155 -0.252399304 1.607513903 -1.163744444 103 104 105 106 107 108 2.063790052 2.379979407 1.463450830 -3.816722757 -1.040280974 1.503442877 109 110 111 112 113 114 2.183277243 -1.696028408 0.080413375 2.979111471 2.959719026 2.435387620 115 116 117 118 119 120 4.712792086 -2.339847006 0.311924150 -1.587981104 0.183277243 -4.008241485 121 122 123 124 125 126 -5.269022627 -0.167720723 2.603537624 -1.199760212 -1.192296604 -0.008241485 127 128 129 130 131 132 -3.199760212 -0.008241485 1.307947871 -1.937417106 2.711584928 0.624137226 133 134 135 136 137 138 -2.515949568 -3.339847006 -0.112312510 1.079206217 -1.800099434 1.235916334 139 140 141 142 143 144 1.520066201 4.639553392 -0.517156725 0.554874811 11.323364036 -3.292391351 145 146 147 148 149 150 2.779640185 -3.449101468 -0.477164678 -0.936209948 1.624137226 1.819632232 151 152 153 154 155 156 1.135821588 -1.309014674 -3.529803770 -2.216383536 4.991758515 -1.515949568 157 158 159 -1.236983138 1.639553392 6.270724945 > postscript(file="/var/www/html/freestat/rcomp/tmp/6wom61290714981.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 3.323364036 NA 1 -0.708675453 3.323364036 2 0.592097737 -0.708675453 3 0.235916334 0.592097737 4 1.379979407 0.235916334 5 -0.411878542 1.379979407 6 -3.972225717 -0.411878542 7 3.552105690 -3.972225717 8 -0.908146738 3.552105690 9 -0.587981104 -0.908146738 10 3.499466598 -0.587981104 11 0.554874811 3.499466598 12 1.679545439 0.554874811 13 0.235916334 1.679545439 14 0.692192483 0.235916334 15 -2.635436759 0.692192483 16 0.923703258 -2.635436759 17 0.800239788 0.923703258 18 -0.900194180 0.800239788 19 1.342756481 -0.900194180 20 -0.132912113 1.342756481 21 0.850464564 -0.132912113 22 4.923703258 0.850464564 23 -1.657243519 4.923703258 24 0.131845309 -1.657243519 25 1.660152994 0.131845309 26 -1.936209948 1.660152994 27 0.923703258 -1.936209948 28 0.783616464 0.923703258 29 -1.515949568 0.783616464 30 -2.532572891 -1.515949568 31 7.111245707 -2.532572891 32 -3.848762246 7.111245707 33 -1.600628148 -3.848762246 34 1.484050432 -1.600628148 35 -3.869361849 1.484050432 36 -3.829369802 -3.869361849 37 -2.207712770 -3.829369802 38 2.274701224 -2.207712770 39 -1.744691221 2.274701224 40 0.622930068 -1.744691221 41 0.783616464 0.622930068 42 0.307947871 0.783616464 43 -2.515949568 0.307947871 44 0.027774283 -2.515949568 45 0.656176715 0.027774283 46 1.883711211 0.656176715 47 -3.937417106 1.883711211 48 -1.233006859 -3.937417106 49 -1.536549170 -1.233006859 50 -5.028841087 -1.536549170 51 0.343963639 -5.028841087 52 0.027774283 0.343963639 53 -2.567381501 0.027774283 54 10.979111471 -2.567381501 55 -0.920793783 10.979111471 56 -0.252399304 -0.920793783 57 -1.479933799 -0.252399304 58 -2.743484063 -1.479933799 59 0.688216205 -2.743484063 60 1.484050432 0.688216205 61 -2.112312510 1.484050432 62 -0.904170459 -2.112312510 63 1.199900566 -0.904170459 64 -1.571357780 1.199900566 65 -4.269022627 -1.571357780 66 -1.441148910 -4.269022627 67 0.203876845 -1.441148910 68 -0.539318291 0.203876845 69 -0.008241485 -0.539318291 70 -2.020888529 -0.008241485 71 -0.796123155 -2.020888529 72 -0.337077885 -0.796123155 73 1.586914300 -0.337077885 74 -2.776730710 1.586914300 75 -0.392486097 -2.776730710 76 -1.135681234 -0.392486097 77 0.815655954 -1.135681234 78 0.095829541 0.815655954 79 -3.128935834 0.095829541 80 1.463450830 -3.128935834 81 0.452010943 1.463450830 82 -0.184344046 0.452010943 83 2.099805820 -0.184344046 84 -3.536549170 2.099805820 85 -1.148328278 -3.536549170 86 -3.112312510 -1.148328278 87 0.584145179 -3.112312510 88 4.835048398 0.584145179 89 -0.832138923 4.835048398 90 -0.956809551 -0.832138923 91 -0.391278940 -0.956809551 92 -2.447894310 -0.391278940 93 -2.252399304 -2.447894310 94 2.203876845 -2.252399304 95 2.486819553 2.203876845 96 -0.729275055 2.486819553 97 2.658945836 -0.729275055 98 -0.796123155 2.658945836 99 -0.252399304 -0.796123155 100 1.607513903 -0.252399304 101 -1.163744444 1.607513903 102 2.063790052 -1.163744444 103 2.379979407 2.063790052 104 1.463450830 2.379979407 105 -3.816722757 1.463450830 106 -1.040280974 -3.816722757 107 1.503442877 -1.040280974 108 2.183277243 1.503442877 109 -1.696028408 2.183277243 110 0.080413375 -1.696028408 111 2.979111471 0.080413375 112 2.959719026 2.979111471 113 2.435387620 2.959719026 114 4.712792086 2.435387620 115 -2.339847006 4.712792086 116 0.311924150 -2.339847006 117 -1.587981104 0.311924150 118 0.183277243 -1.587981104 119 -4.008241485 0.183277243 120 -5.269022627 -4.008241485 121 -0.167720723 -5.269022627 122 2.603537624 -0.167720723 123 -1.199760212 2.603537624 124 -1.192296604 -1.199760212 125 -0.008241485 -1.192296604 126 -3.199760212 -0.008241485 127 -0.008241485 -3.199760212 128 1.307947871 -0.008241485 129 -1.937417106 1.307947871 130 2.711584928 -1.937417106 131 0.624137226 2.711584928 132 -2.515949568 0.624137226 133 -3.339847006 -2.515949568 134 -0.112312510 -3.339847006 135 1.079206217 -0.112312510 136 -1.800099434 1.079206217 137 1.235916334 -1.800099434 138 1.520066201 1.235916334 139 4.639553392 1.520066201 140 -0.517156725 4.639553392 141 0.554874811 -0.517156725 142 11.323364036 0.554874811 143 -3.292391351 11.323364036 144 2.779640185 -3.292391351 145 -3.449101468 2.779640185 146 -0.477164678 -3.449101468 147 -0.936209948 -0.477164678 148 1.624137226 -0.936209948 149 1.819632232 1.624137226 150 1.135821588 1.819632232 151 -1.309014674 1.135821588 152 -3.529803770 -1.309014674 153 -2.216383536 -3.529803770 154 4.991758515 -2.216383536 155 -1.515949568 4.991758515 156 -1.236983138 -1.515949568 157 1.639553392 -1.236983138 158 6.270724945 1.639553392 159 NA 6.270724945 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.708675453 3.323364036 [2,] 0.592097737 -0.708675453 [3,] 0.235916334 0.592097737 [4,] 1.379979407 0.235916334 [5,] -0.411878542 1.379979407 [6,] -3.972225717 -0.411878542 [7,] 3.552105690 -3.972225717 [8,] -0.908146738 3.552105690 [9,] -0.587981104 -0.908146738 [10,] 3.499466598 -0.587981104 [11,] 0.554874811 3.499466598 [12,] 1.679545439 0.554874811 [13,] 0.235916334 1.679545439 [14,] 0.692192483 0.235916334 [15,] -2.635436759 0.692192483 [16,] 0.923703258 -2.635436759 [17,] 0.800239788 0.923703258 [18,] -0.900194180 0.800239788 [19,] 1.342756481 -0.900194180 [20,] -0.132912113 1.342756481 [21,] 0.850464564 -0.132912113 [22,] 4.923703258 0.850464564 [23,] -1.657243519 4.923703258 [24,] 0.131845309 -1.657243519 [25,] 1.660152994 0.131845309 [26,] -1.936209948 1.660152994 [27,] 0.923703258 -1.936209948 [28,] 0.783616464 0.923703258 [29,] -1.515949568 0.783616464 [30,] -2.532572891 -1.515949568 [31,] 7.111245707 -2.532572891 [32,] -3.848762246 7.111245707 [33,] -1.600628148 -3.848762246 [34,] 1.484050432 -1.600628148 [35,] -3.869361849 1.484050432 [36,] -3.829369802 -3.869361849 [37,] -2.207712770 -3.829369802 [38,] 2.274701224 -2.207712770 [39,] -1.744691221 2.274701224 [40,] 0.622930068 -1.744691221 [41,] 0.783616464 0.622930068 [42,] 0.307947871 0.783616464 [43,] -2.515949568 0.307947871 [44,] 0.027774283 -2.515949568 [45,] 0.656176715 0.027774283 [46,] 1.883711211 0.656176715 [47,] -3.937417106 1.883711211 [48,] -1.233006859 -3.937417106 [49,] -1.536549170 -1.233006859 [50,] -5.028841087 -1.536549170 [51,] 0.343963639 -5.028841087 [52,] 0.027774283 0.343963639 [53,] -2.567381501 0.027774283 [54,] 10.979111471 -2.567381501 [55,] -0.920793783 10.979111471 [56,] -0.252399304 -0.920793783 [57,] -1.479933799 -0.252399304 [58,] -2.743484063 -1.479933799 [59,] 0.688216205 -2.743484063 [60,] 1.484050432 0.688216205 [61,] -2.112312510 1.484050432 [62,] -0.904170459 -2.112312510 [63,] 1.199900566 -0.904170459 [64,] -1.571357780 1.199900566 [65,] -4.269022627 -1.571357780 [66,] -1.441148910 -4.269022627 [67,] 0.203876845 -1.441148910 [68,] -0.539318291 0.203876845 [69,] -0.008241485 -0.539318291 [70,] -2.020888529 -0.008241485 [71,] -0.796123155 -2.020888529 [72,] -0.337077885 -0.796123155 [73,] 1.586914300 -0.337077885 [74,] -2.776730710 1.586914300 [75,] -0.392486097 -2.776730710 [76,] -1.135681234 -0.392486097 [77,] 0.815655954 -1.135681234 [78,] 0.095829541 0.815655954 [79,] -3.128935834 0.095829541 [80,] 1.463450830 -3.128935834 [81,] 0.452010943 1.463450830 [82,] -0.184344046 0.452010943 [83,] 2.099805820 -0.184344046 [84,] -3.536549170 2.099805820 [85,] -1.148328278 -3.536549170 [86,] -3.112312510 -1.148328278 [87,] 0.584145179 -3.112312510 [88,] 4.835048398 0.584145179 [89,] -0.832138923 4.835048398 [90,] -0.956809551 -0.832138923 [91,] -0.391278940 -0.956809551 [92,] -2.447894310 -0.391278940 [93,] -2.252399304 -2.447894310 [94,] 2.203876845 -2.252399304 [95,] 2.486819553 2.203876845 [96,] -0.729275055 2.486819553 [97,] 2.658945836 -0.729275055 [98,] -0.796123155 2.658945836 [99,] -0.252399304 -0.796123155 [100,] 1.607513903 -0.252399304 [101,] -1.163744444 1.607513903 [102,] 2.063790052 -1.163744444 [103,] 2.379979407 2.063790052 [104,] 1.463450830 2.379979407 [105,] -3.816722757 1.463450830 [106,] -1.040280974 -3.816722757 [107,] 1.503442877 -1.040280974 [108,] 2.183277243 1.503442877 [109,] -1.696028408 2.183277243 [110,] 0.080413375 -1.696028408 [111,] 2.979111471 0.080413375 [112,] 2.959719026 2.979111471 [113,] 2.435387620 2.959719026 [114,] 4.712792086 2.435387620 [115,] -2.339847006 4.712792086 [116,] 0.311924150 -2.339847006 [117,] -1.587981104 0.311924150 [118,] 0.183277243 -1.587981104 [119,] -4.008241485 0.183277243 [120,] -5.269022627 -4.008241485 [121,] -0.167720723 -5.269022627 [122,] 2.603537624 -0.167720723 [123,] -1.199760212 2.603537624 [124,] -1.192296604 -1.199760212 [125,] -0.008241485 -1.192296604 [126,] -3.199760212 -0.008241485 [127,] -0.008241485 -3.199760212 [128,] 1.307947871 -0.008241485 [129,] -1.937417106 1.307947871 [130,] 2.711584928 -1.937417106 [131,] 0.624137226 2.711584928 [132,] -2.515949568 0.624137226 [133,] -3.339847006 -2.515949568 [134,] -0.112312510 -3.339847006 [135,] 1.079206217 -0.112312510 [136,] -1.800099434 1.079206217 [137,] 1.235916334 -1.800099434 [138,] 1.520066201 1.235916334 [139,] 4.639553392 1.520066201 [140,] -0.517156725 4.639553392 [141,] 0.554874811 -0.517156725 [142,] 11.323364036 0.554874811 [143,] -3.292391351 11.323364036 [144,] 2.779640185 -3.292391351 [145,] -3.449101468 2.779640185 [146,] -0.477164678 -3.449101468 [147,] -0.936209948 -0.477164678 [148,] 1.624137226 -0.936209948 [149,] 1.819632232 1.624137226 [150,] 1.135821588 1.819632232 [151,] -1.309014674 1.135821588 [152,] -3.529803770 -1.309014674 [153,] -2.216383536 -3.529803770 [154,] 4.991758515 -2.216383536 [155,] -1.515949568 4.991758515 [156,] -1.236983138 -1.515949568 [157,] 1.639553392 -1.236983138 [158,] 6.270724945 1.639553392 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.708675453 3.323364036 2 0.592097737 -0.708675453 3 0.235916334 0.592097737 4 1.379979407 0.235916334 5 -0.411878542 1.379979407 6 -3.972225717 -0.411878542 7 3.552105690 -3.972225717 8 -0.908146738 3.552105690 9 -0.587981104 -0.908146738 10 3.499466598 -0.587981104 11 0.554874811 3.499466598 12 1.679545439 0.554874811 13 0.235916334 1.679545439 14 0.692192483 0.235916334 15 -2.635436759 0.692192483 16 0.923703258 -2.635436759 17 0.800239788 0.923703258 18 -0.900194180 0.800239788 19 1.342756481 -0.900194180 20 -0.132912113 1.342756481 21 0.850464564 -0.132912113 22 4.923703258 0.850464564 23 -1.657243519 4.923703258 24 0.131845309 -1.657243519 25 1.660152994 0.131845309 26 -1.936209948 1.660152994 27 0.923703258 -1.936209948 28 0.783616464 0.923703258 29 -1.515949568 0.783616464 30 -2.532572891 -1.515949568 31 7.111245707 -2.532572891 32 -3.848762246 7.111245707 33 -1.600628148 -3.848762246 34 1.484050432 -1.600628148 35 -3.869361849 1.484050432 36 -3.829369802 -3.869361849 37 -2.207712770 -3.829369802 38 2.274701224 -2.207712770 39 -1.744691221 2.274701224 40 0.622930068 -1.744691221 41 0.783616464 0.622930068 42 0.307947871 0.783616464 43 -2.515949568 0.307947871 44 0.027774283 -2.515949568 45 0.656176715 0.027774283 46 1.883711211 0.656176715 47 -3.937417106 1.883711211 48 -1.233006859 -3.937417106 49 -1.536549170 -1.233006859 50 -5.028841087 -1.536549170 51 0.343963639 -5.028841087 52 0.027774283 0.343963639 53 -2.567381501 0.027774283 54 10.979111471 -2.567381501 55 -0.920793783 10.979111471 56 -0.252399304 -0.920793783 57 -1.479933799 -0.252399304 58 -2.743484063 -1.479933799 59 0.688216205 -2.743484063 60 1.484050432 0.688216205 61 -2.112312510 1.484050432 62 -0.904170459 -2.112312510 63 1.199900566 -0.904170459 64 -1.571357780 1.199900566 65 -4.269022627 -1.571357780 66 -1.441148910 -4.269022627 67 0.203876845 -1.441148910 68 -0.539318291 0.203876845 69 -0.008241485 -0.539318291 70 -2.020888529 -0.008241485 71 -0.796123155 -2.020888529 72 -0.337077885 -0.796123155 73 1.586914300 -0.337077885 74 -2.776730710 1.586914300 75 -0.392486097 -2.776730710 76 -1.135681234 -0.392486097 77 0.815655954 -1.135681234 78 0.095829541 0.815655954 79 -3.128935834 0.095829541 80 1.463450830 -3.128935834 81 0.452010943 1.463450830 82 -0.184344046 0.452010943 83 2.099805820 -0.184344046 84 -3.536549170 2.099805820 85 -1.148328278 -3.536549170 86 -3.112312510 -1.148328278 87 0.584145179 -3.112312510 88 4.835048398 0.584145179 89 -0.832138923 4.835048398 90 -0.956809551 -0.832138923 91 -0.391278940 -0.956809551 92 -2.447894310 -0.391278940 93 -2.252399304 -2.447894310 94 2.203876845 -2.252399304 95 2.486819553 2.203876845 96 -0.729275055 2.486819553 97 2.658945836 -0.729275055 98 -0.796123155 2.658945836 99 -0.252399304 -0.796123155 100 1.607513903 -0.252399304 101 -1.163744444 1.607513903 102 2.063790052 -1.163744444 103 2.379979407 2.063790052 104 1.463450830 2.379979407 105 -3.816722757 1.463450830 106 -1.040280974 -3.816722757 107 1.503442877 -1.040280974 108 2.183277243 1.503442877 109 -1.696028408 2.183277243 110 0.080413375 -1.696028408 111 2.979111471 0.080413375 112 2.959719026 2.979111471 113 2.435387620 2.959719026 114 4.712792086 2.435387620 115 -2.339847006 4.712792086 116 0.311924150 -2.339847006 117 -1.587981104 0.311924150 118 0.183277243 -1.587981104 119 -4.008241485 0.183277243 120 -5.269022627 -4.008241485 121 -0.167720723 -5.269022627 122 2.603537624 -0.167720723 123 -1.199760212 2.603537624 124 -1.192296604 -1.199760212 125 -0.008241485 -1.192296604 126 -3.199760212 -0.008241485 127 -0.008241485 -3.199760212 128 1.307947871 -0.008241485 129 -1.937417106 1.307947871 130 2.711584928 -1.937417106 131 0.624137226 2.711584928 132 -2.515949568 0.624137226 133 -3.339847006 -2.515949568 134 -0.112312510 -3.339847006 135 1.079206217 -0.112312510 136 -1.800099434 1.079206217 137 1.235916334 -1.800099434 138 1.520066201 1.235916334 139 4.639553392 1.520066201 140 -0.517156725 4.639553392 141 0.554874811 -0.517156725 142 11.323364036 0.554874811 143 -3.292391351 11.323364036 144 2.779640185 -3.292391351 145 -3.449101468 2.779640185 146 -0.477164678 -3.449101468 147 -0.936209948 -0.477164678 148 1.624137226 -0.936209948 149 1.819632232 1.624137226 150 1.135821588 1.819632232 151 -1.309014674 1.135821588 152 -3.529803770 -1.309014674 153 -2.216383536 -3.529803770 154 4.991758515 -2.216383536 155 -1.515949568 4.991758515 156 -1.236983138 -1.515949568 157 1.639553392 -1.236983138 158 6.270724945 1.639553392 > 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/77x3r1290714981.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/freestat/rcomp/tmp/87x3r1290714981.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/freestat/rcomp/tmp/90p2u1290714981.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/freestat/rcomp/tmp/100p2u1290714981.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/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/11l7ii1290714981.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/126qh61290714981.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/13dqeh1290714981.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/14o0vk1290714981.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/15r0cq1290714981.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/16naaz1290714981.tab") + } > > try(system("convert tmp/1bnn01290714981.ps tmp/1bnn01290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/2mfm31290714981.ps tmp/2mfm31290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/3mfm31290714981.ps tmp/3mfm31290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/4mfm31290714981.ps tmp/4mfm31290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/5wom61290714981.ps tmp/5wom61290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/6wom61290714981.ps tmp/6wom61290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/77x3r1290714981.ps tmp/77x3r1290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/87x3r1290714981.ps tmp/87x3r1290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/90p2u1290714981.ps tmp/90p2u1290714981.png",intern=TRUE)) character(0) > try(system("convert tmp/100p2u1290714981.ps tmp/100p2u1290714981.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.350 2.643 5.814