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(14 + ,12 + ,41 + ,18 + ,11 + ,39 + ,11 + ,14 + ,30 + ,12 + ,12 + ,31 + ,16 + ,21 + ,34 + ,18 + ,12 + ,35 + ,14 + ,22 + ,39 + ,14 + ,11 + ,34 + ,15 + ,10 + ,36 + ,15 + ,13 + ,37 + ,17 + ,10 + ,38 + ,19 + ,8 + ,36 + ,10 + ,15 + ,38 + ,16 + ,14 + ,39 + ,18 + ,10 + ,33 + ,14 + ,14 + ,32 + ,14 + ,14 + ,36 + ,17 + ,11 + ,38 + ,14 + ,10 + ,39 + ,16 + ,13 + ,32 + ,18 + ,7 + ,32 + ,11 + ,14 + ,31 + ,14 + ,12 + ,39 + ,12 + ,14 + ,37 + ,17 + ,11 + ,39 + ,9 + ,9 + ,41 + ,16 + ,11 + ,36 + ,14 + ,15 + ,33 + ,15 + ,14 + ,33 + ,11 + ,13 + ,34 + ,16 + ,9 + ,31 + ,13 + ,15 + ,27 + ,17 + ,10 + ,37 + ,15 + ,11 + ,34 + ,14 + ,13 + ,34 + ,16 + ,8 + ,32 + ,9 + ,20 + ,29 + ,15 + ,12 + ,36 + ,17 + ,10 + ,29 + ,13 + ,10 + ,35 + ,15 + ,9 + ,37 + ,16 + ,14 + ,34 + ,16 + ,8 + ,38 + ,12 + ,14 + ,35 + ,12 + ,11 + ,38 + ,11 + ,13 + ,37 + ,15 + ,9 + ,38 + ,15 + ,11 + ,33 + ,17 + ,15 + ,36 + ,13 + ,11 + ,38 + ,16 + ,10 + ,32 + ,14 + ,14 + ,32 + ,11 + ,18 + ,32 + ,12 + ,14 + ,34 + ,12 + ,11 + ,32 + ,15 + ,12 + ,37 + ,16 + ,13 + ,39 + ,15 + ,9 + ,29 + ,12 + ,10 + ,37 + ,12 + ,15 + ,35 + ,8 + ,20 + ,30 + ,13 + ,12 + ,38 + ,11 + ,12 + ,34 + ,14 + ,14 + ,31 + ,15 + ,13 + ,34 + ,10 + ,11 + ,35 + ,11 + ,17 + ,36 + ,12 + ,12 + ,30 + ,15 + ,13 + ,39 + ,15 + ,14 + ,35 + ,14 + ,13 + ,38 + ,16 + ,15 + ,31 + ,15 + ,13 + ,34 + ,15 + ,10 + ,38 + ,13 + ,11 + ,34 + ,12 + ,19 + ,39 + ,17 + ,13 + ,37 + ,13 + ,17 + ,34 + ,15 + ,13 + ,28 + ,13 + ,9 + ,37 + ,15 + ,11 + ,33 + ,16 + ,10 + ,37 + ,15 + ,9 + ,35 + ,16 + ,12 + ,37 + ,15 + ,12 + ,32 + ,14 + ,13 + ,33 + ,15 + ,13 + ,38 + ,14 + ,12 + ,33 + ,13 + ,15 + ,29 + ,7 + ,22 + ,33 + ,17 + ,13 + ,31 + ,13 + ,15 + ,36 + ,15 + ,13 + ,35 + ,14 + ,15 + ,32 + ,13 + ,10 + ,29 + ,16 + ,11 + ,39 + ,12 + ,16 + ,37 + ,14 + ,11 + ,35 + ,17 + ,11 + ,37 + ,15 + ,10 + ,32 + ,17 + ,10 + ,38 + ,12 + ,16 + ,37 + ,16 + ,12 + ,36 + ,11 + ,11 + ,32 + ,15 + ,16 + ,33 + ,9 + ,19 + ,40 + ,16 + ,11 + ,38 + ,15 + ,16 + ,41 + ,10 + ,15 + ,36 + ,10 + ,24 + ,43 + ,15 + ,14 + ,30 + ,11 + ,15 + ,31 + ,13 + ,11 + ,32 + ,14 + ,15 + ,32 + ,18 + ,12 + ,37 + ,16 + ,10 + ,37 + ,14 + ,14 + ,33 + ,14 + ,13 + ,34 + ,14 + ,9 + ,33 + ,14 + ,15 + ,38 + ,12 + ,15 + ,33 + ,14 + ,14 + ,31 + ,15 + ,11 + ,38 + ,15 + ,8 + ,37 + ,15 + ,11 + ,33 + ,13 + ,11 + ,31 + ,17 + ,8 + ,39 + ,17 + ,10 + ,44 + ,19 + ,11 + ,33 + ,15 + ,13 + ,35 + ,13 + ,11 + ,32 + ,9 + ,20 + ,28 + ,15 + ,10 + ,40 + ,15 + ,15 + ,27 + ,15 + ,12 + ,37 + ,16 + ,14 + ,32 + ,11 + ,23 + ,28 + ,14 + ,14 + ,34 + ,11 + ,16 + ,30 + ,15 + ,11 + ,35 + ,13 + ,12 + ,31 + ,15 + ,10 + ,32 + ,16 + ,14 + ,30 + ,14 + ,12 + ,30 + ,15 + ,12 + ,31 + ,16 + ,11 + ,40 + ,16 + ,12 + ,32 + ,11 + ,13 + ,36 + ,12 + ,11 + ,32 + ,9 + ,19 + ,35 + ,16 + ,12 + ,38 + ,13 + ,17 + ,42 + ,16 + ,9 + ,34 + ,12 + ,12 + ,35 + ,9 + ,19 + ,35 + ,13 + ,18 + ,33 + ,13 + ,15 + ,36 + ,14 + ,14 + ,32 + ,19 + ,11 + ,33 + ,13 + ,9 + ,34 + ,12 + ,18 + ,32 + ,13 + ,16 + ,34) + ,dim=c(3 + ,162) + ,dimnames=list(c('Happ' + ,'Depr' + ,'Conn') + ,1:162)) > y <- array(NA,dim=c(3,162),dimnames=list(c('Happ','Depr','Conn'),1:162)) > 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 = '3' > #'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 Conn Happ Depr 1 41 14 12 2 39 18 11 3 30 11 14 4 31 12 12 5 34 16 21 6 35 18 12 7 39 14 22 8 34 14 11 9 36 15 10 10 37 15 13 11 38 17 10 12 36 19 8 13 38 10 15 14 39 16 14 15 33 18 10 16 32 14 14 17 36 14 14 18 38 17 11 19 39 14 10 20 32 16 13 21 32 18 7 22 31 11 14 23 39 14 12 24 37 12 14 25 39 17 11 26 41 9 9 27 36 16 11 28 33 14 15 29 33 15 14 30 34 11 13 31 31 16 9 32 27 13 15 33 37 17 10 34 34 15 11 35 34 14 13 36 32 16 8 37 29 9 20 38 36 15 12 39 29 17 10 40 35 13 10 41 37 15 9 42 34 16 14 43 38 16 8 44 35 12 14 45 38 12 11 46 37 11 13 47 38 15 9 48 33 15 11 49 36 17 15 50 38 13 11 51 32 16 10 52 32 14 14 53 32 11 18 54 34 12 14 55 32 12 11 56 37 15 12 57 39 16 13 58 29 15 9 59 37 12 10 60 35 12 15 61 30 8 20 62 38 13 12 63 34 11 12 64 31 14 14 65 34 15 13 66 35 10 11 67 36 11 17 68 30 12 12 69 39 15 13 70 35 15 14 71 38 14 13 72 31 16 15 73 34 15 13 74 38 15 10 75 34 13 11 76 39 12 19 77 37 17 13 78 34 13 17 79 28 15 13 80 37 13 9 81 33 15 11 82 37 16 10 83 35 15 9 84 37 16 12 85 32 15 12 86 33 14 13 87 38 15 13 88 33 14 12 89 29 13 15 90 33 7 22 91 31 17 13 92 36 13 15 93 35 15 13 94 32 14 15 95 29 13 10 96 39 16 11 97 37 12 16 98 35 14 11 99 37 17 11 100 32 15 10 101 38 17 10 102 37 12 16 103 36 16 12 104 32 11 11 105 33 15 16 106 40 9 19 107 38 16 11 108 41 15 16 109 36 10 15 110 43 10 24 111 30 15 14 112 31 11 15 113 32 13 11 114 32 14 15 115 37 18 12 116 37 16 10 117 33 14 14 118 34 14 13 119 33 14 9 120 38 14 15 121 33 12 15 122 31 14 14 123 38 15 11 124 37 15 8 125 33 15 11 126 31 13 11 127 39 17 8 128 44 17 10 129 33 19 11 130 35 15 13 131 32 13 11 132 28 9 20 133 40 15 10 134 27 15 15 135 37 15 12 136 32 16 14 137 28 11 23 138 34 14 14 139 30 11 16 140 35 15 11 141 31 13 12 142 32 15 10 143 30 16 14 144 30 14 12 145 31 15 12 146 40 16 11 147 32 16 12 148 36 11 13 149 32 12 11 150 35 9 19 151 38 16 12 152 42 13 17 153 34 16 9 154 35 12 12 155 35 9 19 156 33 13 18 157 36 13 15 158 32 14 14 159 33 19 11 160 34 13 9 161 32 12 18 162 34 13 16 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Happ Depr 33.23247 0.15847 -0.06451 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.6419 -2.5479 -0.1664 2.4552 9.7311 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 33.23247 2.82221 11.775 <2e-16 *** Happ 0.15847 0.13491 1.175 0.242 Depr -0.06451 0.09961 -0.648 0.518 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.357 on 159 degrees of freedom Multiple R-squared: 0.02294, Adjusted R-squared: 0.01065 F-statistic: 1.867 on 2 and 159 DF, p-value: 0.1580 > 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.82444859 0.35110283 0.17555141 [2,] 0.87515296 0.24969408 0.12484704 [3,] 0.79597186 0.40805628 0.20402814 [4,] 0.70173252 0.59653497 0.29826748 [5,] 0.61101754 0.77796493 0.38898246 [6,] 0.51174928 0.97650144 0.48825072 [7,] 0.45441591 0.90883182 0.54558409 [8,] 0.53093559 0.93812882 0.46906441 [9,] 0.49124288 0.98248575 0.50875712 [10,] 0.51058527 0.97882946 0.48941473 [11,] 0.51955047 0.96089906 0.48044953 [12,] 0.44016430 0.88032861 0.55983570 [13,] 0.38694470 0.77388939 0.61305530 [14,] 0.40759155 0.81518311 0.59240845 [15,] 0.44622934 0.89245868 0.55377066 [16,] 0.47104527 0.94209055 0.52895473 [17,] 0.47944207 0.95888415 0.52055793 [18,] 0.50478375 0.99043249 0.49521625 [19,] 0.46386908 0.92773815 0.53613092 [20,] 0.45351137 0.90702273 0.54648863 [21,] 0.60165989 0.79668022 0.39834011 [22,] 0.54026714 0.91946572 0.45973286 [23,] 0.51559542 0.96880916 0.48440458 [24,] 0.49006960 0.98013919 0.50993040 [25,] 0.44174461 0.88348922 0.55825539 [26,] 0.50054267 0.99891466 0.49945733 [27,] 0.74574885 0.50850230 0.25425115 [28,] 0.70601865 0.58796270 0.29398135 [29,] 0.66325974 0.67348053 0.33674026 [30,] 0.61572946 0.76854108 0.38427054 [31,] 0.61751862 0.76496275 0.38248138 [32,] 0.66354596 0.67290809 0.33645404 [33,] 0.61648233 0.76703534 0.38351767 [34,] 0.73646055 0.52707890 0.26353945 [35,] 0.69142569 0.61714861 0.30857431 [36,] 0.65699168 0.68601665 0.34300832 [37,] 0.61092687 0.77814625 0.38907313 [38,] 0.58816741 0.82366519 0.41183259 [39,] 0.53874021 0.92251957 0.46125979 [40,] 0.53397292 0.93205417 0.46602708 [41,] 0.51049886 0.97900227 0.48950114 [42,] 0.49060833 0.98121666 0.50939167 [43,] 0.46136780 0.92273559 0.53863220 [44,] 0.41757146 0.83514293 0.58242854 [45,] 0.40910397 0.81820794 0.59089603 [46,] 0.40909394 0.81818788 0.59090606 [47,] 0.39236873 0.78473746 0.60763127 [48,] 0.36109868 0.72219736 0.63890132 [49,] 0.31741792 0.63483584 0.68258208 [50,] 0.30462583 0.60925167 0.69537417 [51,] 0.27875907 0.55751814 0.72124093 [52,] 0.29687197 0.59374394 0.70312803 [53,] 0.40477384 0.80954768 0.59522616 [54,] 0.38115914 0.76231829 0.61884086 [55,] 0.33879011 0.67758021 0.66120989 [56,] 0.33552889 0.67105777 0.66447111 [57,] 0.33597641 0.67195281 0.66402359 [58,] 0.29531462 0.59062924 0.70468538 [59,] 0.30054954 0.60109907 0.69945046 [60,] 0.26326633 0.52653266 0.73673367 [61,] 0.22973667 0.45947333 0.77026333 [62,] 0.20984817 0.41969634 0.79015183 [63,] 0.23549917 0.47099833 0.76450083 [64,] 0.25576972 0.51153945 0.74423028 [65,] 0.22024447 0.44048893 0.77975553 [66,] 0.22000371 0.44000743 0.77999629 [67,] 0.23033649 0.46067299 0.76966351 [68,] 0.19874040 0.39748081 0.80125960 [69,] 0.19224731 0.38449462 0.80775269 [70,] 0.16404405 0.32808810 0.83595595 [71,] 0.20369016 0.40738032 0.79630984 [72,] 0.18169328 0.36338655 0.81830672 [73,] 0.15328038 0.30656077 0.84671962 [74,] 0.25105641 0.50211282 0.74894359 [75,] 0.23403558 0.46807116 0.76596442 [76,] 0.21101164 0.42202328 0.78898836 [77,] 0.18928592 0.37857184 0.81071408 [78,] 0.16067608 0.32135216 0.83932392 [79,] 0.14323900 0.28647799 0.85676100 [80,] 0.13572689 0.27145379 0.86427311 [81,] 0.11740366 0.23480731 0.88259634 [82,] 0.11546866 0.23093731 0.88453134 [83,] 0.09944869 0.19889738 0.90055131 [84,] 0.13129550 0.26259101 0.86870450 [85,] 0.10861578 0.21723156 0.89138422 [86,] 0.11966406 0.23932811 0.88033594 [87,] 0.10341309 0.20682618 0.89658691 [88,] 0.08436290 0.16872580 0.91563710 [89,] 0.07655539 0.15311078 0.92344461 [90,] 0.10665713 0.21331427 0.89334287 [91,] 0.11399269 0.22798538 0.88600731 [92,] 0.10818844 0.21637687 0.89181156 [93,] 0.08857807 0.17715615 0.91142193 [94,] 0.07583573 0.15167146 0.92416427 [95,] 0.07094623 0.14189247 0.92905377 [96,] 0.06565441 0.13130881 0.93434559 [97,] 0.06175740 0.12351480 0.93824260 [98,] 0.04992604 0.09985208 0.95007396 [99,] 0.04276386 0.08552772 0.95723614 [100,] 0.03500166 0.07000331 0.96499834 [101,] 0.06838490 0.13676979 0.93161510 [102,] 0.06477096 0.12954191 0.93522904 [103,] 0.11219124 0.22438248 0.88780876 [104,] 0.10206459 0.20412918 0.89793541 [105,] 0.42620890 0.85241780 0.57379110 [106,] 0.45882322 0.91764645 0.54117678 [107,] 0.43725064 0.87450128 0.56274936 [108,] 0.41544931 0.83089861 0.58455069 [109,] 0.38503327 0.77006654 0.61496673 [110,] 0.35246572 0.70493145 0.64753428 [111,] 0.32009855 0.64019709 0.67990145 [112,] 0.28151631 0.56303261 0.71848369 [113,] 0.24087937 0.48175875 0.75912063 [114,] 0.21745654 0.43491308 0.78254346 [115,] 0.23951891 0.47903782 0.76048109 [116,] 0.20341782 0.40683564 0.79658218 [117,] 0.19581009 0.39162017 0.80418991 [118,] 0.19077758 0.38155515 0.80922242 [119,] 0.16355271 0.32710543 0.83644729 [120,] 0.14016008 0.28032016 0.85983992 [121,] 0.14368526 0.28737051 0.85631474 [122,] 0.14064991 0.28129983 0.85935009 [123,] 0.41476847 0.82953694 0.58523153 [124,] 0.37055965 0.74111930 0.62944035 [125,] 0.32450777 0.64901554 0.67549223 [126,] 0.30053488 0.60106977 0.69946512 [127,] 0.34802352 0.69604703 0.65197648 [128,] 0.44612666 0.89225331 0.55387334 [129,] 0.61305220 0.77389561 0.38694780 [130,] 0.60477079 0.79045842 0.39522921 [131,] 0.55826980 0.88346039 0.44173020 [132,] 0.67572558 0.64854884 0.32427442 [133,] 0.61298329 0.77403342 0.38701671 [134,] 0.65252256 0.69495488 0.34747744 [135,] 0.59636386 0.80727227 0.40363614 [136,] 0.58160938 0.83678124 0.41839062 [137,] 0.53234702 0.93530596 0.46765298 [138,] 0.58551805 0.82896389 0.41448195 [139,] 0.64173182 0.71653636 0.35826818 [140,] 0.66314726 0.67370548 0.33685274 [141,] 0.79802485 0.40395029 0.20197515 [142,] 0.77275050 0.45449899 0.22724950 [143,] 0.71997514 0.56004971 0.28002486 [144,] 0.67631981 0.64736038 0.32368019 [145,] 0.58302805 0.83394390 0.41697195 [146,] 0.60508699 0.78982602 0.39491301 [147,] 0.99474922 0.01050156 0.00525078 [148,] 0.98544015 0.02911970 0.01455985 [149,] 0.96390308 0.07219383 0.03609692 [150,] 0.92383269 0.15233461 0.07616731 [151,] 0.82389023 0.35221955 0.17610977 > postscript(file="/var/www/html/freestat/rcomp/tmp/18z0r1290505458.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/2j9zc1290505458.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/3j9zc1290505458.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/4j9zc1290505458.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/5j9zc1290505458.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 = 162 Frequency = 1 1 2 3 4 5 6 6.32307579 3.62467074 -4.07247815 -3.35997859 -0.41324548 -0.31081544 7 8 9 10 11 12 4.96821395 -0.74143802 1.03557535 2.22911680 2.71862974 0.27265649 13 14 15 16 17 18 4.15050847 4.13515781 -2.43984307 -2.54789658 1.45210342 2.78314355 19 20 21 22 23 24 4.19404816 -2.92935601 -3.63338452 -3.07247815 4.32307579 2.76904904 25 26 27 28 29 30 3.78314355 6.92189839 0.94161636 -1.48338276 -1.70636938 -0.13699197 31 32 33 34 35 36 -4.18741127 -7.32490995 1.71862974 -0.89991083 -0.61241039 -3.25192509 37 38 39 40 41 42 -4.36844964 1.16460298 -6.28137026 0.35252097 1.97106154 -0.86484219 43 44 45 46 47 48 2.74807491 0.76904904 3.57550759 2.86300803 2.97106154 -1.89991083 49 50 51 52 53 54 1.04119881 3.41703478 -3.12289746 -2.54789658 -1.81442289 -0.23095096 55 56 57 58 59 60 -2.42449241 2.16460298 4.07064399 -6.02893846 2.51099378 0.83356286 61 62 63 64 65 66 -3.20997683 3.48154860 -0.20150578 -3.54789658 -0.77088320 0.89245321 67 68 69 70 71 72 2.12106330 -4.35997859 4.22911680 0.29363062 3.38758961 -3.80032838 73 74 75 76 77 78 -0.77088320 3.03557535 -0.58296522 5.09161812 1.91217118 -0.19588232 79 80 81 82 83 84 -6.77088320 2.28800715 -1.89991083 1.87710254 -0.02893846 2.00613018 85 86 87 88 89 90 -2.83539702 -1.61241039 3.22911680 -1.67692421 -5.32490995 0.07752361 91 92 93 94 95 96 -4.08782882 1.67509005 0.22911680 -2.48338276 -5.64747903 3.94161636 97 98 99 100 101 102 2.89807667 0.25856198 1.78314355 -2.96442465 2.71862974 2.89807667 103 104 105 106 107 108 1.00613018 -2.26601960 -1.57734175 6.56703654 2.94161636 6.42265825 109 110 111 112 113 114 2.15050847 9.73113281 -4.70636938 -3.00796434 -2.58296522 -2.48338276 115 116 117 118 119 120 1.68918456 1.87710254 -1.54789658 -0.61241039 -1.87046566 3.51661724 121 122 123 124 125 126 -1.16643714 -3.54789658 3.10008917 1.90654772 -1.89991083 -3.58296522 127 128 129 130 131 132 3.58960210 8.71862974 -2.53380206 0.22911680 -2.58296522 -5.36844964 133 134 135 136 137 138 5.03557535 -7.64185557 2.16460298 -2.86484219 -5.49185381 -0.54789658 139 140 141 142 143 144 -3.94345052 0.10008917 -3.51845140 -2.96442465 -4.86484219 -4.67692421 145 146 147 148 149 150 -3.83539702 4.94161636 -2.99386982 1.86300803 -2.42449241 1.56703654 151 152 153 154 155 156 3.00613018 7.80411768 -1.18741127 0.64002141 1.56703654 -1.13136851 157 158 159 160 161 162 1.67509005 -2.54789658 -2.53380206 -0.71199285 -1.97289570 -0.26039614 > postscript(file="/var/www/html/freestat/rcomp/tmp/6uihf1290505458.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 6.32307579 NA 1 3.62467074 6.32307579 2 -4.07247815 3.62467074 3 -3.35997859 -4.07247815 4 -0.41324548 -3.35997859 5 -0.31081544 -0.41324548 6 4.96821395 -0.31081544 7 -0.74143802 4.96821395 8 1.03557535 -0.74143802 9 2.22911680 1.03557535 10 2.71862974 2.22911680 11 0.27265649 2.71862974 12 4.15050847 0.27265649 13 4.13515781 4.15050847 14 -2.43984307 4.13515781 15 -2.54789658 -2.43984307 16 1.45210342 -2.54789658 17 2.78314355 1.45210342 18 4.19404816 2.78314355 19 -2.92935601 4.19404816 20 -3.63338452 -2.92935601 21 -3.07247815 -3.63338452 22 4.32307579 -3.07247815 23 2.76904904 4.32307579 24 3.78314355 2.76904904 25 6.92189839 3.78314355 26 0.94161636 6.92189839 27 -1.48338276 0.94161636 28 -1.70636938 -1.48338276 29 -0.13699197 -1.70636938 30 -4.18741127 -0.13699197 31 -7.32490995 -4.18741127 32 1.71862974 -7.32490995 33 -0.89991083 1.71862974 34 -0.61241039 -0.89991083 35 -3.25192509 -0.61241039 36 -4.36844964 -3.25192509 37 1.16460298 -4.36844964 38 -6.28137026 1.16460298 39 0.35252097 -6.28137026 40 1.97106154 0.35252097 41 -0.86484219 1.97106154 42 2.74807491 -0.86484219 43 0.76904904 2.74807491 44 3.57550759 0.76904904 45 2.86300803 3.57550759 46 2.97106154 2.86300803 47 -1.89991083 2.97106154 48 1.04119881 -1.89991083 49 3.41703478 1.04119881 50 -3.12289746 3.41703478 51 -2.54789658 -3.12289746 52 -1.81442289 -2.54789658 53 -0.23095096 -1.81442289 54 -2.42449241 -0.23095096 55 2.16460298 -2.42449241 56 4.07064399 2.16460298 57 -6.02893846 4.07064399 58 2.51099378 -6.02893846 59 0.83356286 2.51099378 60 -3.20997683 0.83356286 61 3.48154860 -3.20997683 62 -0.20150578 3.48154860 63 -3.54789658 -0.20150578 64 -0.77088320 -3.54789658 65 0.89245321 -0.77088320 66 2.12106330 0.89245321 67 -4.35997859 2.12106330 68 4.22911680 -4.35997859 69 0.29363062 4.22911680 70 3.38758961 0.29363062 71 -3.80032838 3.38758961 72 -0.77088320 -3.80032838 73 3.03557535 -0.77088320 74 -0.58296522 3.03557535 75 5.09161812 -0.58296522 76 1.91217118 5.09161812 77 -0.19588232 1.91217118 78 -6.77088320 -0.19588232 79 2.28800715 -6.77088320 80 -1.89991083 2.28800715 81 1.87710254 -1.89991083 82 -0.02893846 1.87710254 83 2.00613018 -0.02893846 84 -2.83539702 2.00613018 85 -1.61241039 -2.83539702 86 3.22911680 -1.61241039 87 -1.67692421 3.22911680 88 -5.32490995 -1.67692421 89 0.07752361 -5.32490995 90 -4.08782882 0.07752361 91 1.67509005 -4.08782882 92 0.22911680 1.67509005 93 -2.48338276 0.22911680 94 -5.64747903 -2.48338276 95 3.94161636 -5.64747903 96 2.89807667 3.94161636 97 0.25856198 2.89807667 98 1.78314355 0.25856198 99 -2.96442465 1.78314355 100 2.71862974 -2.96442465 101 2.89807667 2.71862974 102 1.00613018 2.89807667 103 -2.26601960 1.00613018 104 -1.57734175 -2.26601960 105 6.56703654 -1.57734175 106 2.94161636 6.56703654 107 6.42265825 2.94161636 108 2.15050847 6.42265825 109 9.73113281 2.15050847 110 -4.70636938 9.73113281 111 -3.00796434 -4.70636938 112 -2.58296522 -3.00796434 113 -2.48338276 -2.58296522 114 1.68918456 -2.48338276 115 1.87710254 1.68918456 116 -1.54789658 1.87710254 117 -0.61241039 -1.54789658 118 -1.87046566 -0.61241039 119 3.51661724 -1.87046566 120 -1.16643714 3.51661724 121 -3.54789658 -1.16643714 122 3.10008917 -3.54789658 123 1.90654772 3.10008917 124 -1.89991083 1.90654772 125 -3.58296522 -1.89991083 126 3.58960210 -3.58296522 127 8.71862974 3.58960210 128 -2.53380206 8.71862974 129 0.22911680 -2.53380206 130 -2.58296522 0.22911680 131 -5.36844964 -2.58296522 132 5.03557535 -5.36844964 133 -7.64185557 5.03557535 134 2.16460298 -7.64185557 135 -2.86484219 2.16460298 136 -5.49185381 -2.86484219 137 -0.54789658 -5.49185381 138 -3.94345052 -0.54789658 139 0.10008917 -3.94345052 140 -3.51845140 0.10008917 141 -2.96442465 -3.51845140 142 -4.86484219 -2.96442465 143 -4.67692421 -4.86484219 144 -3.83539702 -4.67692421 145 4.94161636 -3.83539702 146 -2.99386982 4.94161636 147 1.86300803 -2.99386982 148 -2.42449241 1.86300803 149 1.56703654 -2.42449241 150 3.00613018 1.56703654 151 7.80411768 3.00613018 152 -1.18741127 7.80411768 153 0.64002141 -1.18741127 154 1.56703654 0.64002141 155 -1.13136851 1.56703654 156 1.67509005 -1.13136851 157 -2.54789658 1.67509005 158 -2.53380206 -2.54789658 159 -0.71199285 -2.53380206 160 -1.97289570 -0.71199285 161 -0.26039614 -1.97289570 162 NA -0.26039614 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.62467074 6.32307579 [2,] -4.07247815 3.62467074 [3,] -3.35997859 -4.07247815 [4,] -0.41324548 -3.35997859 [5,] -0.31081544 -0.41324548 [6,] 4.96821395 -0.31081544 [7,] -0.74143802 4.96821395 [8,] 1.03557535 -0.74143802 [9,] 2.22911680 1.03557535 [10,] 2.71862974 2.22911680 [11,] 0.27265649 2.71862974 [12,] 4.15050847 0.27265649 [13,] 4.13515781 4.15050847 [14,] -2.43984307 4.13515781 [15,] -2.54789658 -2.43984307 [16,] 1.45210342 -2.54789658 [17,] 2.78314355 1.45210342 [18,] 4.19404816 2.78314355 [19,] -2.92935601 4.19404816 [20,] -3.63338452 -2.92935601 [21,] -3.07247815 -3.63338452 [22,] 4.32307579 -3.07247815 [23,] 2.76904904 4.32307579 [24,] 3.78314355 2.76904904 [25,] 6.92189839 3.78314355 [26,] 0.94161636 6.92189839 [27,] -1.48338276 0.94161636 [28,] -1.70636938 -1.48338276 [29,] -0.13699197 -1.70636938 [30,] -4.18741127 -0.13699197 [31,] -7.32490995 -4.18741127 [32,] 1.71862974 -7.32490995 [33,] -0.89991083 1.71862974 [34,] -0.61241039 -0.89991083 [35,] -3.25192509 -0.61241039 [36,] -4.36844964 -3.25192509 [37,] 1.16460298 -4.36844964 [38,] -6.28137026 1.16460298 [39,] 0.35252097 -6.28137026 [40,] 1.97106154 0.35252097 [41,] -0.86484219 1.97106154 [42,] 2.74807491 -0.86484219 [43,] 0.76904904 2.74807491 [44,] 3.57550759 0.76904904 [45,] 2.86300803 3.57550759 [46,] 2.97106154 2.86300803 [47,] -1.89991083 2.97106154 [48,] 1.04119881 -1.89991083 [49,] 3.41703478 1.04119881 [50,] -3.12289746 3.41703478 [51,] -2.54789658 -3.12289746 [52,] -1.81442289 -2.54789658 [53,] -0.23095096 -1.81442289 [54,] -2.42449241 -0.23095096 [55,] 2.16460298 -2.42449241 [56,] 4.07064399 2.16460298 [57,] -6.02893846 4.07064399 [58,] 2.51099378 -6.02893846 [59,] 0.83356286 2.51099378 [60,] -3.20997683 0.83356286 [61,] 3.48154860 -3.20997683 [62,] -0.20150578 3.48154860 [63,] -3.54789658 -0.20150578 [64,] -0.77088320 -3.54789658 [65,] 0.89245321 -0.77088320 [66,] 2.12106330 0.89245321 [67,] -4.35997859 2.12106330 [68,] 4.22911680 -4.35997859 [69,] 0.29363062 4.22911680 [70,] 3.38758961 0.29363062 [71,] -3.80032838 3.38758961 [72,] -0.77088320 -3.80032838 [73,] 3.03557535 -0.77088320 [74,] -0.58296522 3.03557535 [75,] 5.09161812 -0.58296522 [76,] 1.91217118 5.09161812 [77,] -0.19588232 1.91217118 [78,] -6.77088320 -0.19588232 [79,] 2.28800715 -6.77088320 [80,] -1.89991083 2.28800715 [81,] 1.87710254 -1.89991083 [82,] -0.02893846 1.87710254 [83,] 2.00613018 -0.02893846 [84,] -2.83539702 2.00613018 [85,] -1.61241039 -2.83539702 [86,] 3.22911680 -1.61241039 [87,] -1.67692421 3.22911680 [88,] -5.32490995 -1.67692421 [89,] 0.07752361 -5.32490995 [90,] -4.08782882 0.07752361 [91,] 1.67509005 -4.08782882 [92,] 0.22911680 1.67509005 [93,] -2.48338276 0.22911680 [94,] -5.64747903 -2.48338276 [95,] 3.94161636 -5.64747903 [96,] 2.89807667 3.94161636 [97,] 0.25856198 2.89807667 [98,] 1.78314355 0.25856198 [99,] -2.96442465 1.78314355 [100,] 2.71862974 -2.96442465 [101,] 2.89807667 2.71862974 [102,] 1.00613018 2.89807667 [103,] -2.26601960 1.00613018 [104,] -1.57734175 -2.26601960 [105,] 6.56703654 -1.57734175 [106,] 2.94161636 6.56703654 [107,] 6.42265825 2.94161636 [108,] 2.15050847 6.42265825 [109,] 9.73113281 2.15050847 [110,] -4.70636938 9.73113281 [111,] -3.00796434 -4.70636938 [112,] -2.58296522 -3.00796434 [113,] -2.48338276 -2.58296522 [114,] 1.68918456 -2.48338276 [115,] 1.87710254 1.68918456 [116,] -1.54789658 1.87710254 [117,] -0.61241039 -1.54789658 [118,] -1.87046566 -0.61241039 [119,] 3.51661724 -1.87046566 [120,] -1.16643714 3.51661724 [121,] -3.54789658 -1.16643714 [122,] 3.10008917 -3.54789658 [123,] 1.90654772 3.10008917 [124,] -1.89991083 1.90654772 [125,] -3.58296522 -1.89991083 [126,] 3.58960210 -3.58296522 [127,] 8.71862974 3.58960210 [128,] -2.53380206 8.71862974 [129,] 0.22911680 -2.53380206 [130,] -2.58296522 0.22911680 [131,] -5.36844964 -2.58296522 [132,] 5.03557535 -5.36844964 [133,] -7.64185557 5.03557535 [134,] 2.16460298 -7.64185557 [135,] -2.86484219 2.16460298 [136,] -5.49185381 -2.86484219 [137,] -0.54789658 -5.49185381 [138,] -3.94345052 -0.54789658 [139,] 0.10008917 -3.94345052 [140,] -3.51845140 0.10008917 [141,] -2.96442465 -3.51845140 [142,] -4.86484219 -2.96442465 [143,] -4.67692421 -4.86484219 [144,] -3.83539702 -4.67692421 [145,] 4.94161636 -3.83539702 [146,] -2.99386982 4.94161636 [147,] 1.86300803 -2.99386982 [148,] -2.42449241 1.86300803 [149,] 1.56703654 -2.42449241 [150,] 3.00613018 1.56703654 [151,] 7.80411768 3.00613018 [152,] -1.18741127 7.80411768 [153,] 0.64002141 -1.18741127 [154,] 1.56703654 0.64002141 [155,] -1.13136851 1.56703654 [156,] 1.67509005 -1.13136851 [157,] -2.54789658 1.67509005 [158,] -2.53380206 -2.54789658 [159,] -0.71199285 -2.53380206 [160,] -1.97289570 -0.71199285 [161,] -0.26039614 -1.97289570 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.62467074 6.32307579 2 -4.07247815 3.62467074 3 -3.35997859 -4.07247815 4 -0.41324548 -3.35997859 5 -0.31081544 -0.41324548 6 4.96821395 -0.31081544 7 -0.74143802 4.96821395 8 1.03557535 -0.74143802 9 2.22911680 1.03557535 10 2.71862974 2.22911680 11 0.27265649 2.71862974 12 4.15050847 0.27265649 13 4.13515781 4.15050847 14 -2.43984307 4.13515781 15 -2.54789658 -2.43984307 16 1.45210342 -2.54789658 17 2.78314355 1.45210342 18 4.19404816 2.78314355 19 -2.92935601 4.19404816 20 -3.63338452 -2.92935601 21 -3.07247815 -3.63338452 22 4.32307579 -3.07247815 23 2.76904904 4.32307579 24 3.78314355 2.76904904 25 6.92189839 3.78314355 26 0.94161636 6.92189839 27 -1.48338276 0.94161636 28 -1.70636938 -1.48338276 29 -0.13699197 -1.70636938 30 -4.18741127 -0.13699197 31 -7.32490995 -4.18741127 32 1.71862974 -7.32490995 33 -0.89991083 1.71862974 34 -0.61241039 -0.89991083 35 -3.25192509 -0.61241039 36 -4.36844964 -3.25192509 37 1.16460298 -4.36844964 38 -6.28137026 1.16460298 39 0.35252097 -6.28137026 40 1.97106154 0.35252097 41 -0.86484219 1.97106154 42 2.74807491 -0.86484219 43 0.76904904 2.74807491 44 3.57550759 0.76904904 45 2.86300803 3.57550759 46 2.97106154 2.86300803 47 -1.89991083 2.97106154 48 1.04119881 -1.89991083 49 3.41703478 1.04119881 50 -3.12289746 3.41703478 51 -2.54789658 -3.12289746 52 -1.81442289 -2.54789658 53 -0.23095096 -1.81442289 54 -2.42449241 -0.23095096 55 2.16460298 -2.42449241 56 4.07064399 2.16460298 57 -6.02893846 4.07064399 58 2.51099378 -6.02893846 59 0.83356286 2.51099378 60 -3.20997683 0.83356286 61 3.48154860 -3.20997683 62 -0.20150578 3.48154860 63 -3.54789658 -0.20150578 64 -0.77088320 -3.54789658 65 0.89245321 -0.77088320 66 2.12106330 0.89245321 67 -4.35997859 2.12106330 68 4.22911680 -4.35997859 69 0.29363062 4.22911680 70 3.38758961 0.29363062 71 -3.80032838 3.38758961 72 -0.77088320 -3.80032838 73 3.03557535 -0.77088320 74 -0.58296522 3.03557535 75 5.09161812 -0.58296522 76 1.91217118 5.09161812 77 -0.19588232 1.91217118 78 -6.77088320 -0.19588232 79 2.28800715 -6.77088320 80 -1.89991083 2.28800715 81 1.87710254 -1.89991083 82 -0.02893846 1.87710254 83 2.00613018 -0.02893846 84 -2.83539702 2.00613018 85 -1.61241039 -2.83539702 86 3.22911680 -1.61241039 87 -1.67692421 3.22911680 88 -5.32490995 -1.67692421 89 0.07752361 -5.32490995 90 -4.08782882 0.07752361 91 1.67509005 -4.08782882 92 0.22911680 1.67509005 93 -2.48338276 0.22911680 94 -5.64747903 -2.48338276 95 3.94161636 -5.64747903 96 2.89807667 3.94161636 97 0.25856198 2.89807667 98 1.78314355 0.25856198 99 -2.96442465 1.78314355 100 2.71862974 -2.96442465 101 2.89807667 2.71862974 102 1.00613018 2.89807667 103 -2.26601960 1.00613018 104 -1.57734175 -2.26601960 105 6.56703654 -1.57734175 106 2.94161636 6.56703654 107 6.42265825 2.94161636 108 2.15050847 6.42265825 109 9.73113281 2.15050847 110 -4.70636938 9.73113281 111 -3.00796434 -4.70636938 112 -2.58296522 -3.00796434 113 -2.48338276 -2.58296522 114 1.68918456 -2.48338276 115 1.87710254 1.68918456 116 -1.54789658 1.87710254 117 -0.61241039 -1.54789658 118 -1.87046566 -0.61241039 119 3.51661724 -1.87046566 120 -1.16643714 3.51661724 121 -3.54789658 -1.16643714 122 3.10008917 -3.54789658 123 1.90654772 3.10008917 124 -1.89991083 1.90654772 125 -3.58296522 -1.89991083 126 3.58960210 -3.58296522 127 8.71862974 3.58960210 128 -2.53380206 8.71862974 129 0.22911680 -2.53380206 130 -2.58296522 0.22911680 131 -5.36844964 -2.58296522 132 5.03557535 -5.36844964 133 -7.64185557 5.03557535 134 2.16460298 -7.64185557 135 -2.86484219 2.16460298 136 -5.49185381 -2.86484219 137 -0.54789658 -5.49185381 138 -3.94345052 -0.54789658 139 0.10008917 -3.94345052 140 -3.51845140 0.10008917 141 -2.96442465 -3.51845140 142 -4.86484219 -2.96442465 143 -4.67692421 -4.86484219 144 -3.83539702 -4.67692421 145 4.94161636 -3.83539702 146 -2.99386982 4.94161636 147 1.86300803 -2.99386982 148 -2.42449241 1.86300803 149 1.56703654 -2.42449241 150 3.00613018 1.56703654 151 7.80411768 3.00613018 152 -1.18741127 7.80411768 153 0.64002141 -1.18741127 154 1.56703654 0.64002141 155 -1.13136851 1.56703654 156 1.67509005 -1.13136851 157 -2.54789658 1.67509005 158 -2.53380206 -2.54789658 159 -0.71199285 -2.53380206 160 -1.97289570 -0.71199285 161 -0.26039614 -1.97289570 > 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/74ry01290505458.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/84ry01290505458.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/9f1xl1290505458.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/10f1xl1290505458.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/110jv91290505458.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/12mkuw1290505458.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/13alr81290505458.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/143uqb1290505458.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/15pc7z1290505458.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/16lm4q1290505458.tab") + } > > try(system("convert tmp/18z0r1290505458.ps tmp/18z0r1290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/2j9zc1290505458.ps tmp/2j9zc1290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/3j9zc1290505458.ps tmp/3j9zc1290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/4j9zc1290505458.ps tmp/4j9zc1290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/5j9zc1290505458.ps tmp/5j9zc1290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/6uihf1290505458.ps tmp/6uihf1290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/74ry01290505458.ps tmp/74ry01290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/84ry01290505458.ps tmp/84ry01290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/9f1xl1290505458.ps tmp/9f1xl1290505458.png",intern=TRUE)) character(0) > try(system("convert tmp/10f1xl1290505458.ps tmp/10f1xl1290505458.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.567 2.705 7.461