R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1149822 + ,1 + ,1086979 + ,2 + ,1276674 + ,3 + ,1522522 + ,4 + ,1742117 + ,5 + ,1737275 + ,6 + ,1979900 + ,7 + ,2061036 + ,8 + ,1867943 + ,9 + ,1707752 + ,10 + ,1298756 + ,11 + ,1281814 + ,12 + ,1281151 + ,13 + ,1164976 + ,14 + ,1454329 + ,15 + ,1645288 + ,16 + ,1817743 + ,17 + ,1895785 + ,18 + ,2236311 + ,19 + ,2295951 + ,20 + ,2087315 + ,21 + ,1980891 + ,22 + ,1465446 + ,23 + ,1445026 + ,24 + ,1488120 + ,25 + ,1338333 + ,26 + ,1715789 + ,27 + ,1806090 + ,28 + ,2083316 + ,29 + ,2092278 + ,30 + ,2430800 + ,31 + ,2424894 + ,32 + ,2299016 + ,33 + ,2130688 + ,34 + ,1652221 + ,35 + ,1608162 + ,36 + ,1647074 + ,37 + ,1479691 + ,38 + ,1884978 + ,39 + ,2007898 + ,40 + ,2208954 + ,41 + ,2217164 + ,42 + ,2534291 + ,43 + ,2560312 + ,44 + ,2429069 + ,45 + ,2315077 + ,46 + ,1799608 + ,47 + ,1772590 + ,48 + ,1744799 + ,49 + ,1659093 + ,50 + ,2099821 + ,51 + ,2135736 + ,52 + ,2427894 + ,53 + ,2468882 + ,54 + ,2703217 + ,55 + ,2766841 + ,56 + ,2655236 + ,57 + ,2550373 + ,58 + ,2052097 + ,59 + ,1998055 + ,60 + ,1920748 + ,61 + ,1876694 + ,62 + ,2380930 + ,63 + ,2467402 + ,64 + ,2770771 + ,65 + ,2781340 + ,66 + ,3143926 + ,67 + ,3172235 + ,68 + ,2952540 + ,69 + ,2920877 + ,70 + ,2384552 + ,71 + ,2248987 + ,72 + ,2208616 + ,73 + ,2178756 + ,74 + ,2632870 + ,75 + ,2706905 + ,76 + ,3029745 + ,77 + ,3015402 + ,78 + ,3391414 + ,79 + ,3507805 + ,80 + ,3177852 + ,81 + ,3142961 + ,82 + ,2545815 + ,83 + ,2414007 + ,84 + ,2372578 + ,85 + ,2332664 + ,86 + ,2825328 + ,87 + ,2901478 + ,88 + ,3263955 + ,89 + ,3226738 + ,90 + ,3610786 + ,91 + ,3709274 + ,92 + ,3467185 + ,93 + ,3449646 + ,94 + ,2802951 + ,95 + ,2462530 + ,96 + ,2490645 + ,97 + ,2561520 + ,98 + ,3067554 + ,99 + ,3226951 + ,100 + ,3546493 + ,101 + ,3492787 + ,102 + ,3952263 + ,103 + ,3932072 + ,104 + ,3720284 + ,105 + ,3651555 + ,106 + ,2914972 + ,107 + ,2713514 + ,108 + ,2703997 + ,109 + ,2591373 + ,110 + ,3163748 + ,111 + ,3355137 + ,112 + ,3613702 + ,113 + ,3686773 + ,114 + ,4098716 + ,115 + ,4063517 + ,116 + ,3551489 + ,117 + ,3226663 + ,118 + ,2656842 + ,119 + ,2597484 + ,120 + ,2572399 + ,121 + ,2596631 + ,122 + ,3165225 + ,123 + ,3303145 + ,124 + ,3698247 + ,125 + ,3668631 + ,126 + ,4130433 + ,127 + ,4131400 + ,128 + ,3864358 + ,129 + ,3721110 + ,130 + ,2892532 + ,131 + ,2843451 + ,132 + ,2747502 + ,133 + ,2668775 + ,134 + ,3018602 + ,135 + ,3013392 + ,136 + ,3393657 + ,137 + ,3544233 + ,138 + ,4075832 + ,139 + ,4032923 + ,140 + ,3734509 + ,141 + ,3761285 + ,142 + ,2970090 + ,143 + ,2847849 + ,144 + ,2741680 + ,145 + ,2830639 + ,146 + ,3257673 + ,147 + ,3480085 + ,148 + ,3843271 + ,149 + ,3796961 + ,150 + ,4337767 + ,151 + ,4243630 + ,152 + ,3927202 + ,153 + ,3915296 + ,154 + ,3087396 + ,155 + ,2963792 + ,156 + ,2955792 + ,157 + ,2829925 + ,158 + ,3281195 + ,159 + ,3548011 + ,160 + ,4059648 + ,161 + ,3941175 + ,162 + ,4528594 + ,163 + ,4433151 + ,164 + ,4145737 + ,165 + ,4077132 + ,166 + ,3198519 + ,167 + ,3078660 + ,168 + ,3028202 + ,169 + ,2858642 + ,170 + ,3398954 + ,171 + ,3808883 + ,172 + ,4175961 + ,173 + ,4227542 + ,174 + ,4744616 + ,175 + ,4608012 + ,176 + ,4295049 + ,177 + ,4201144 + ,178 + ,3353276 + ,179 + ,3286851 + ,180 + ,3169889 + ,181 + ,3051720 + ,182 + ,3695426 + ,183 + ,3905501 + ,184 + ,4296458 + ,185 + ,4246247 + ,186 + ,4921849 + ,187 + ,4821446 + ,188 + ,4425064 + ,189 + ,4379099 + ,190 + ,3472889 + ,191 + ,3359160 + ,192 + ,3200944 + ,193 + ,3153170 + ,194 + ,3741498 + ,195 + ,3918719 + ,196 + ,4403449 + ,197 + ,4400407 + ,198 + ,4847473 + ,199 + ,4716136 + ,200 + ,4297440 + ,201 + ,4272253 + ,202 + ,3271834 + ,203 + ,3168388 + ,204 + ,2911748 + ,205 + ,2720999 + ,206 + ,3199918 + ,207 + ,3672623 + ,208 + ,3892013 + ,209 + ,3850845 + ,210 + ,4532467 + ,211 + ,4484739 + ,212 + ,4014972 + ,213 + ,3983758 + ,214 + ,3158459 + ,215 + ,3100569 + ,216 + ,2935404 + ,217 + ,2855719 + ,218 + ,3465611 + ,219 + ,3006985 + ,220 + ,4095110 + ,221 + ,4104793 + ,222 + ,4730788 + ,223 + ,4642726 + ,224 + ,4246919 + ,225 + ,4308117 + ,226) + ,dim=c(2 + ,226) + ,dimnames=list(c('Yt' + ,'t') + ,1:226)) > y <- array(NA,dim=c(2,226),dimnames=list(c('Yt','t'),1:226)) > 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 = 'Include Monthly Dummies' > par1 = '1' > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Yt t M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 1149822 1 1 0 0 0 0 0 0 0 0 0 0 2 1086979 2 0 1 0 0 0 0 0 0 0 0 0 3 1276674 3 0 0 1 0 0 0 0 0 0 0 0 4 1522522 4 0 0 0 1 0 0 0 0 0 0 0 5 1742117 5 0 0 0 0 1 0 0 0 0 0 0 6 1737275 6 0 0 0 0 0 1 0 0 0 0 0 7 1979900 7 0 0 0 0 0 0 1 0 0 0 0 8 2061036 8 0 0 0 0 0 0 0 1 0 0 0 9 1867943 9 0 0 0 0 0 0 0 0 1 0 0 10 1707752 10 0 0 0 0 0 0 0 0 0 1 0 11 1298756 11 0 0 0 0 0 0 0 0 0 0 1 12 1281814 12 0 0 0 0 0 0 0 0 0 0 0 13 1281151 13 1 0 0 0 0 0 0 0 0 0 0 14 1164976 14 0 1 0 0 0 0 0 0 0 0 0 15 1454329 15 0 0 1 0 0 0 0 0 0 0 0 16 1645288 16 0 0 0 1 0 0 0 0 0 0 0 17 1817743 17 0 0 0 0 1 0 0 0 0 0 0 18 1895785 18 0 0 0 0 0 1 0 0 0 0 0 19 2236311 19 0 0 0 0 0 0 1 0 0 0 0 20 2295951 20 0 0 0 0 0 0 0 1 0 0 0 21 2087315 21 0 0 0 0 0 0 0 0 1 0 0 22 1980891 22 0 0 0 0 0 0 0 0 0 1 0 23 1465446 23 0 0 0 0 0 0 0 0 0 0 1 24 1445026 24 0 0 0 0 0 0 0 0 0 0 0 25 1488120 25 1 0 0 0 0 0 0 0 0 0 0 26 1338333 26 0 1 0 0 0 0 0 0 0 0 0 27 1715789 27 0 0 1 0 0 0 0 0 0 0 0 28 1806090 28 0 0 0 1 0 0 0 0 0 0 0 29 2083316 29 0 0 0 0 1 0 0 0 0 0 0 30 2092278 30 0 0 0 0 0 1 0 0 0 0 0 31 2430800 31 0 0 0 0 0 0 1 0 0 0 0 32 2424894 32 0 0 0 0 0 0 0 1 0 0 0 33 2299016 33 0 0 0 0 0 0 0 0 1 0 0 34 2130688 34 0 0 0 0 0 0 0 0 0 1 0 35 1652221 35 0 0 0 0 0 0 0 0 0 0 1 36 1608162 36 0 0 0 0 0 0 0 0 0 0 0 37 1647074 37 1 0 0 0 0 0 0 0 0 0 0 38 1479691 38 0 1 0 0 0 0 0 0 0 0 0 39 1884978 39 0 0 1 0 0 0 0 0 0 0 0 40 2007898 40 0 0 0 1 0 0 0 0 0 0 0 41 2208954 41 0 0 0 0 1 0 0 0 0 0 0 42 2217164 42 0 0 0 0 0 1 0 0 0 0 0 43 2534291 43 0 0 0 0 0 0 1 0 0 0 0 44 2560312 44 0 0 0 0 0 0 0 1 0 0 0 45 2429069 45 0 0 0 0 0 0 0 0 1 0 0 46 2315077 46 0 0 0 0 0 0 0 0 0 1 0 47 1799608 47 0 0 0 0 0 0 0 0 0 0 1 48 1772590 48 0 0 0 0 0 0 0 0 0 0 0 49 1744799 49 1 0 0 0 0 0 0 0 0 0 0 50 1659093 50 0 1 0 0 0 0 0 0 0 0 0 51 2099821 51 0 0 1 0 0 0 0 0 0 0 0 52 2135736 52 0 0 0 1 0 0 0 0 0 0 0 53 2427894 53 0 0 0 0 1 0 0 0 0 0 0 54 2468882 54 0 0 0 0 0 1 0 0 0 0 0 55 2703217 55 0 0 0 0 0 0 1 0 0 0 0 56 2766841 56 0 0 0 0 0 0 0 1 0 0 0 57 2655236 57 0 0 0 0 0 0 0 0 1 0 0 58 2550373 58 0 0 0 0 0 0 0 0 0 1 0 59 2052097 59 0 0 0 0 0 0 0 0 0 0 1 60 1998055 60 0 0 0 0 0 0 0 0 0 0 0 61 1920748 61 1 0 0 0 0 0 0 0 0 0 0 62 1876694 62 0 1 0 0 0 0 0 0 0 0 0 63 2380930 63 0 0 1 0 0 0 0 0 0 0 0 64 2467402 64 0 0 0 1 0 0 0 0 0 0 0 65 2770771 65 0 0 0 0 1 0 0 0 0 0 0 66 2781340 66 0 0 0 0 0 1 0 0 0 0 0 67 3143926 67 0 0 0 0 0 0 1 0 0 0 0 68 3172235 68 0 0 0 0 0 0 0 1 0 0 0 69 2952540 69 0 0 0 0 0 0 0 0 1 0 0 70 2920877 70 0 0 0 0 0 0 0 0 0 1 0 71 2384552 71 0 0 0 0 0 0 0 0 0 0 1 72 2248987 72 0 0 0 0 0 0 0 0 0 0 0 73 2208616 73 1 0 0 0 0 0 0 0 0 0 0 74 2178756 74 0 1 0 0 0 0 0 0 0 0 0 75 2632870 75 0 0 1 0 0 0 0 0 0 0 0 76 2706905 76 0 0 0 1 0 0 0 0 0 0 0 77 3029745 77 0 0 0 0 1 0 0 0 0 0 0 78 3015402 78 0 0 0 0 0 1 0 0 0 0 0 79 3391414 79 0 0 0 0 0 0 1 0 0 0 0 80 3507805 80 0 0 0 0 0 0 0 1 0 0 0 81 3177852 81 0 0 0 0 0 0 0 0 1 0 0 82 3142961 82 0 0 0 0 0 0 0 0 0 1 0 83 2545815 83 0 0 0 0 0 0 0 0 0 0 1 84 2414007 84 0 0 0 0 0 0 0 0 0 0 0 85 2372578 85 1 0 0 0 0 0 0 0 0 0 0 86 2332664 86 0 1 0 0 0 0 0 0 0 0 0 87 2825328 87 0 0 1 0 0 0 0 0 0 0 0 88 2901478 88 0 0 0 1 0 0 0 0 0 0 0 89 3263955 89 0 0 0 0 1 0 0 0 0 0 0 90 3226738 90 0 0 0 0 0 1 0 0 0 0 0 91 3610786 91 0 0 0 0 0 0 1 0 0 0 0 92 3709274 92 0 0 0 0 0 0 0 1 0 0 0 93 3467185 93 0 0 0 0 0 0 0 0 1 0 0 94 3449646 94 0 0 0 0 0 0 0 0 0 1 0 95 2802951 95 0 0 0 0 0 0 0 0 0 0 1 96 2462530 96 0 0 0 0 0 0 0 0 0 0 0 97 2490645 97 1 0 0 0 0 0 0 0 0 0 0 98 2561520 98 0 1 0 0 0 0 0 0 0 0 0 99 3067554 99 0 0 1 0 0 0 0 0 0 0 0 100 3226951 100 0 0 0 1 0 0 0 0 0 0 0 101 3546493 101 0 0 0 0 1 0 0 0 0 0 0 102 3492787 102 0 0 0 0 0 1 0 0 0 0 0 103 3952263 103 0 0 0 0 0 0 1 0 0 0 0 104 3932072 104 0 0 0 0 0 0 0 1 0 0 0 105 3720284 105 0 0 0 0 0 0 0 0 1 0 0 106 3651555 106 0 0 0 0 0 0 0 0 0 1 0 107 2914972 107 0 0 0 0 0 0 0 0 0 0 1 108 2713514 108 0 0 0 0 0 0 0 0 0 0 0 109 2703997 109 1 0 0 0 0 0 0 0 0 0 0 110 2591373 110 0 1 0 0 0 0 0 0 0 0 0 111 3163748 111 0 0 1 0 0 0 0 0 0 0 0 112 3355137 112 0 0 0 1 0 0 0 0 0 0 0 113 3613702 113 0 0 0 0 1 0 0 0 0 0 0 114 3686773 114 0 0 0 0 0 1 0 0 0 0 0 115 4098716 115 0 0 0 0 0 0 1 0 0 0 0 116 4063517 116 0 0 0 0 0 0 0 1 0 0 0 117 3551489 117 0 0 0 0 0 0 0 0 1 0 0 118 3226663 118 0 0 0 0 0 0 0 0 0 1 0 119 2656842 119 0 0 0 0 0 0 0 0 0 0 1 120 2597484 120 0 0 0 0 0 0 0 0 0 0 0 121 2572399 121 1 0 0 0 0 0 0 0 0 0 0 122 2596631 122 0 1 0 0 0 0 0 0 0 0 0 123 3165225 123 0 0 1 0 0 0 0 0 0 0 0 124 3303145 124 0 0 0 1 0 0 0 0 0 0 0 125 3698247 125 0 0 0 0 1 0 0 0 0 0 0 126 3668631 126 0 0 0 0 0 1 0 0 0 0 0 127 4130433 127 0 0 0 0 0 0 1 0 0 0 0 128 4131400 128 0 0 0 0 0 0 0 1 0 0 0 129 3864358 129 0 0 0 0 0 0 0 0 1 0 0 130 3721110 130 0 0 0 0 0 0 0 0 0 1 0 131 2892532 131 0 0 0 0 0 0 0 0 0 0 1 132 2843451 132 0 0 0 0 0 0 0 0 0 0 0 133 2747502 133 1 0 0 0 0 0 0 0 0 0 0 134 2668775 134 0 1 0 0 0 0 0 0 0 0 0 135 3018602 135 0 0 1 0 0 0 0 0 0 0 0 136 3013392 136 0 0 0 1 0 0 0 0 0 0 0 137 3393657 137 0 0 0 0 1 0 0 0 0 0 0 138 3544233 138 0 0 0 0 0 1 0 0 0 0 0 139 4075832 139 0 0 0 0 0 0 1 0 0 0 0 140 4032923 140 0 0 0 0 0 0 0 1 0 0 0 141 3734509 141 0 0 0 0 0 0 0 0 1 0 0 142 3761285 142 0 0 0 0 0 0 0 0 0 1 0 143 2970090 143 0 0 0 0 0 0 0 0 0 0 1 144 2847849 144 0 0 0 0 0 0 0 0 0 0 0 145 2741680 145 1 0 0 0 0 0 0 0 0 0 0 146 2830639 146 0 1 0 0 0 0 0 0 0 0 0 147 3257673 147 0 0 1 0 0 0 0 0 0 0 0 148 3480085 148 0 0 0 1 0 0 0 0 0 0 0 149 3843271 149 0 0 0 0 1 0 0 0 0 0 0 150 3796961 150 0 0 0 0 0 1 0 0 0 0 0 151 4337767 151 0 0 0 0 0 0 1 0 0 0 0 152 4243630 152 0 0 0 0 0 0 0 1 0 0 0 153 3927202 153 0 0 0 0 0 0 0 0 1 0 0 154 3915296 154 0 0 0 0 0 0 0 0 0 1 0 155 3087396 155 0 0 0 0 0 0 0 0 0 0 1 156 2963792 156 0 0 0 0 0 0 0 0 0 0 0 157 2955792 157 1 0 0 0 0 0 0 0 0 0 0 158 2829925 158 0 1 0 0 0 0 0 0 0 0 0 159 3281195 159 0 0 1 0 0 0 0 0 0 0 0 160 3548011 160 0 0 0 1 0 0 0 0 0 0 0 161 4059648 161 0 0 0 0 1 0 0 0 0 0 0 162 3941175 162 0 0 0 0 0 1 0 0 0 0 0 163 4528594 163 0 0 0 0 0 0 1 0 0 0 0 164 4433151 164 0 0 0 0 0 0 0 1 0 0 0 165 4145737 165 0 0 0 0 0 0 0 0 1 0 0 166 4077132 166 0 0 0 0 0 0 0 0 0 1 0 167 3198519 167 0 0 0 0 0 0 0 0 0 0 1 168 3078660 168 0 0 0 0 0 0 0 0 0 0 0 169 3028202 169 1 0 0 0 0 0 0 0 0 0 0 170 2858642 170 0 1 0 0 0 0 0 0 0 0 0 171 3398954 171 0 0 1 0 0 0 0 0 0 0 0 172 3808883 172 0 0 0 1 0 0 0 0 0 0 0 173 4175961 173 0 0 0 0 1 0 0 0 0 0 0 174 4227542 174 0 0 0 0 0 1 0 0 0 0 0 175 4744616 175 0 0 0 0 0 0 1 0 0 0 0 176 4608012 176 0 0 0 0 0 0 0 1 0 0 0 177 4295049 177 0 0 0 0 0 0 0 0 1 0 0 178 4201144 178 0 0 0 0 0 0 0 0 0 1 0 179 3353276 179 0 0 0 0 0 0 0 0 0 0 1 180 3286851 180 0 0 0 0 0 0 0 0 0 0 0 181 3169889 181 1 0 0 0 0 0 0 0 0 0 0 182 3051720 182 0 1 0 0 0 0 0 0 0 0 0 183 3695426 183 0 0 1 0 0 0 0 0 0 0 0 184 3905501 184 0 0 0 1 0 0 0 0 0 0 0 185 4296458 185 0 0 0 0 1 0 0 0 0 0 0 186 4246247 186 0 0 0 0 0 1 0 0 0 0 0 187 4921849 187 0 0 0 0 0 0 1 0 0 0 0 188 4821446 188 0 0 0 0 0 0 0 1 0 0 0 189 4425064 189 0 0 0 0 0 0 0 0 1 0 0 190 4379099 190 0 0 0 0 0 0 0 0 0 1 0 191 3472889 191 0 0 0 0 0 0 0 0 0 0 1 192 3359160 192 0 0 0 0 0 0 0 0 0 0 0 193 3200944 193 1 0 0 0 0 0 0 0 0 0 0 194 3153170 194 0 1 0 0 0 0 0 0 0 0 0 195 3741498 195 0 0 1 0 0 0 0 0 0 0 0 196 3918719 196 0 0 0 1 0 0 0 0 0 0 0 197 4403449 197 0 0 0 0 1 0 0 0 0 0 0 198 4400407 198 0 0 0 0 0 1 0 0 0 0 0 199 4847473 199 0 0 0 0 0 0 1 0 0 0 0 200 4716136 200 0 0 0 0 0 0 0 1 0 0 0 201 4297440 201 0 0 0 0 0 0 0 0 1 0 0 202 4272253 202 0 0 0 0 0 0 0 0 0 1 0 203 3271834 203 0 0 0 0 0 0 0 0 0 0 1 204 3168388 204 0 0 0 0 0 0 0 0 0 0 0 205 2911748 205 1 0 0 0 0 0 0 0 0 0 0 206 2720999 206 0 1 0 0 0 0 0 0 0 0 0 207 3199918 207 0 0 1 0 0 0 0 0 0 0 0 208 3672623 208 0 0 0 1 0 0 0 0 0 0 0 209 3892013 209 0 0 0 0 1 0 0 0 0 0 0 210 3850845 210 0 0 0 0 0 1 0 0 0 0 0 211 4532467 211 0 0 0 0 0 0 1 0 0 0 0 212 4484739 212 0 0 0 0 0 0 0 1 0 0 0 213 4014972 213 0 0 0 0 0 0 0 0 1 0 0 214 3983758 214 0 0 0 0 0 0 0 0 0 1 0 215 3158459 215 0 0 0 0 0 0 0 0 0 0 1 216 3100569 216 0 0 0 0 0 0 0 0 0 0 0 217 2935404 217 1 0 0 0 0 0 0 0 0 0 0 218 2855719 218 0 1 0 0 0 0 0 0 0 0 0 219 3465611 219 0 0 1 0 0 0 0 0 0 0 0 220 3006985 220 0 0 0 1 0 0 0 0 0 0 0 221 4095110 221 0 0 0 0 1 0 0 0 0 0 0 222 4104793 222 0 0 0 0 0 1 0 0 0 0 0 223 4730788 223 0 0 0 0 0 0 1 0 0 0 0 224 4642726 224 0 0 0 0 0 0 0 1 0 0 0 225 4246919 225 0 0 0 0 0 0 0 0 1 0 0 226 4308117 226 0 0 0 0 0 0 0 0 0 1 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) t M1 M2 M3 M4 1239719 11148 -72174 -158839 297899 429205 M5 M6 M7 M8 M9 M10 782780 773356 1211481 1183315 885381 797207 M11 110446 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1114525 -173448 35006 201584 443215 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1239719.4 72513.6 17.096 < 2e-16 *** t 11148.1 281.5 39.600 < 2e-16 *** M1 -72174.4 90752.2 -0.795 0.4273 M2 -158838.8 90748.2 -1.750 0.0815 . M3 297898.5 90745.2 3.283 0.0012 ** M4 429204.5 90743.0 4.730 4.09e-06 *** M5 782780.2 90741.7 8.626 1.47e-15 *** M6 773356.0 90741.3 8.523 2.87e-15 *** M7 1211480.8 90741.7 13.351 < 2e-16 *** M8 1183314.6 90743.0 13.040 < 2e-16 *** M9 885381.2 90745.2 9.757 < 2e-16 *** M10 797206.6 90748.2 8.785 5.23e-16 *** M11 110446.2 91959.7 1.201 0.2311 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 275900 on 213 degrees of freedom Multiple R-squared: 0.9141, Adjusted R-squared: 0.9093 F-statistic: 188.9 on 12 and 213 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,] 1.647528e-03 3.295057e-03 0.9983524716 [2,] 2.978373e-04 5.956745e-04 0.9997021627 [3,] 4.521515e-05 9.043031e-05 0.9999547848 [4,] 9.140893e-05 1.828179e-04 0.9999085911 [5,] 3.625075e-05 7.250150e-05 0.9999637492 [6,] 9.443961e-06 1.888792e-05 0.9999905560 [7,] 5.464107e-06 1.092821e-05 0.9999945359 [8,] 9.888800e-07 1.977760e-06 0.9999990111 [9,] 1.699765e-07 3.399529e-07 0.9999998300 [10,] 2.839727e-08 5.679453e-08 0.9999999716 [11,] 6.265156e-09 1.253031e-08 0.9999999937 [12,] 3.978289e-09 7.956579e-09 0.9999999960 [13,] 9.079407e-10 1.815881e-09 0.9999999991 [14,] 2.153313e-10 4.306625e-10 0.9999999998 [15,] 3.974394e-11 7.948787e-11 1.0000000000 [16,] 1.302718e-11 2.605437e-11 1.0000000000 [17,] 2.919452e-12 5.838903e-12 1.0000000000 [18,] 8.228278e-13 1.645656e-12 1.0000000000 [19,] 1.661789e-13 3.323577e-13 1.0000000000 [20,] 2.783696e-14 5.567392e-14 1.0000000000 [21,] 5.235551e-15 1.047110e-14 1.0000000000 [22,] 8.868144e-16 1.773629e-15 1.0000000000 [23,] 4.864395e-16 9.728789e-16 1.0000000000 [24,] 1.367623e-16 2.735247e-16 1.0000000000 [25,] 2.382447e-17 4.764894e-17 1.0000000000 [26,] 5.988267e-18 1.197653e-17 1.0000000000 [27,] 2.028669e-18 4.057338e-18 1.0000000000 [28,] 7.568031e-19 1.513606e-18 1.0000000000 [29,] 3.763529e-19 7.527058e-19 1.0000000000 [30,] 8.413820e-20 1.682764e-19 1.0000000000 [31,] 2.589680e-20 5.179360e-20 1.0000000000 [32,] 5.358903e-21 1.071781e-20 1.0000000000 [33,] 1.005972e-21 2.011945e-21 1.0000000000 [34,] 7.934076e-22 1.586815e-21 1.0000000000 [35,] 1.838579e-22 3.677158e-22 1.0000000000 [36,] 2.785725e-22 5.571449e-22 1.0000000000 [37,] 9.160383e-23 1.832077e-22 1.0000000000 [38,] 3.844007e-23 7.688015e-23 1.0000000000 [39,] 2.178286e-23 4.356573e-23 1.0000000000 [40,] 1.772558e-23 3.545117e-23 1.0000000000 [41,] 1.043849e-23 2.087697e-23 1.0000000000 [42,] 6.859773e-24 1.371955e-23 1.0000000000 [43,] 1.422857e-23 2.845714e-23 1.0000000000 [44,] 7.740215e-24 1.548043e-23 1.0000000000 [45,] 2.094279e-24 4.188558e-24 1.0000000000 [46,] 1.447083e-24 2.894167e-24 1.0000000000 [47,] 3.161995e-25 6.323989e-25 1.0000000000 [48,] 2.406480e-23 4.812959e-23 1.0000000000 [49,] 5.436681e-23 1.087336e-22 1.0000000000 [50,] 2.351981e-21 4.703962e-21 1.0000000000 [51,] 2.016019e-20 4.032038e-20 1.0000000000 [52,] 2.553924e-18 5.107847e-18 1.0000000000 [53,] 4.974873e-17 9.949746e-17 1.0000000000 [54,] 8.214860e-17 1.642972e-16 1.0000000000 [55,] 1.351348e-15 2.702697e-15 1.0000000000 [56,] 2.270552e-15 4.541104e-15 1.0000000000 [57,] 9.281938e-16 1.856388e-15 1.0000000000 [58,] 3.378026e-16 6.756052e-16 1.0000000000 [59,] 1.456499e-16 2.912998e-16 1.0000000000 [60,] 2.162392e-16 4.324785e-16 1.0000000000 [61,] 1.382736e-16 2.765473e-16 1.0000000000 [62,] 3.855309e-16 7.710618e-16 1.0000000000 [63,] 5.000615e-16 1.000123e-15 1.0000000000 [64,] 3.994018e-15 7.988036e-15 1.0000000000 [65,] 7.321311e-14 1.464262e-13 1.0000000000 [66,] 6.143615e-14 1.228723e-13 1.0000000000 [67,] 1.171518e-13 2.343036e-13 1.0000000000 [68,] 5.309408e-14 1.061882e-13 1.0000000000 [69,] 2.522890e-14 5.045780e-14 1.0000000000 [70,] 1.746303e-14 3.492606e-14 1.0000000000 [71,] 7.698017e-15 1.539603e-14 1.0000000000 [72,] 4.104710e-15 8.209419e-15 1.0000000000 [73,] 1.879708e-15 3.759416e-15 1.0000000000 [74,] 2.467520e-15 4.935040e-15 1.0000000000 [75,] 1.884717e-15 3.769434e-15 1.0000000000 [76,] 5.864468e-15 1.172894e-14 1.0000000000 [77,] 1.788706e-14 3.577411e-14 1.0000000000 [78,] 1.709463e-14 3.418925e-14 1.0000000000 [79,] 5.067540e-14 1.013508e-13 1.0000000000 [80,] 2.543401e-14 5.086802e-14 1.0000000000 [81,] 1.221024e-13 2.442049e-13 1.0000000000 [82,] 2.863989e-13 5.727978e-13 1.0000000000 [83,] 1.432570e-13 2.865140e-13 1.0000000000 [84,] 8.436972e-14 1.687394e-13 1.0000000000 [85,] 6.884861e-14 1.376972e-13 1.0000000000 [86,] 9.061864e-14 1.812373e-13 1.0000000000 [87,] 6.019032e-14 1.203806e-13 1.0000000000 [88,] 2.359291e-13 4.718583e-13 1.0000000000 [89,] 2.476407e-13 4.952814e-13 1.0000000000 [90,] 1.910980e-13 3.821961e-13 1.0000000000 [91,] 1.767703e-13 3.535406e-13 1.0000000000 [92,] 1.065910e-13 2.131820e-13 1.0000000000 [93,] 1.423844e-13 2.847688e-13 1.0000000000 [94,] 2.664817e-13 5.329634e-13 1.0000000000 [95,] 7.557196e-13 1.511439e-12 1.0000000000 [96,] 4.537605e-13 9.075210e-13 1.0000000000 [97,] 2.601813e-13 5.203627e-13 1.0000000000 [98,] 1.205459e-13 2.410918e-13 1.0000000000 [99,] 6.343849e-14 1.268770e-13 1.0000000000 [100,] 5.502095e-14 1.100419e-13 1.0000000000 [101,] 2.719014e-14 5.438027e-14 1.0000000000 [102,] 1.727133e-13 3.454265e-13 1.0000000000 [103,] 3.198242e-10 6.396485e-10 0.9999999997 [104,] 3.234433e-08 6.468866e-08 0.9999999677 [105,] 4.792894e-07 9.585788e-07 0.9999995207 [106,] 4.935352e-06 9.870704e-06 0.9999950646 [107,] 1.248809e-05 2.497619e-05 0.9999875119 [108,] 1.243552e-05 2.487103e-05 0.9999875645 [109,] 1.145354e-05 2.290709e-05 0.9999885465 [110,] 7.710599e-06 1.542120e-05 0.9999922894 [111,] 5.609698e-06 1.121940e-05 0.9999943903 [112,] 4.356733e-06 8.713466e-06 0.9999956433 [113,] 2.923601e-06 5.847202e-06 0.9999970764 [114,] 1.890144e-06 3.780288e-06 0.9999981099 [115,] 1.422314e-06 2.844628e-06 0.9999985777 [116,] 3.709411e-06 7.418822e-06 0.9999962906 [117,] 5.734734e-06 1.146947e-05 0.9999942653 [118,] 1.507956e-05 3.015912e-05 0.9999849204 [119,] 3.591837e-05 7.183674e-05 0.9999640816 [120,] 1.457443e-04 2.914885e-04 0.9998542557 [121,] 1.559266e-03 3.118531e-03 0.9984407343 [122,] 9.437742e-03 1.887548e-02 0.9905622581 [123,] 1.738959e-02 3.477917e-02 0.9826104136 [124,] 2.768829e-02 5.537659e-02 0.9723117058 [125,] 4.275448e-02 8.550896e-02 0.9572455225 [126,] 6.169827e-02 1.233965e-01 0.9383017313 [127,] 6.855516e-02 1.371103e-01 0.9314448422 [128,] 8.517747e-02 1.703549e-01 0.9148225294 [129,] 1.102073e-01 2.204146e-01 0.8897926882 [130,] 1.565530e-01 3.131060e-01 0.8434470091 [131,] 1.554969e-01 3.109939e-01 0.8445030588 [132,] 1.600112e-01 3.200224e-01 0.8399888070 [133,] 1.472381e-01 2.944762e-01 0.8527619218 [134,] 1.491916e-01 2.983832e-01 0.8508083808 [135,] 1.627513e-01 3.255026e-01 0.8372486953 [136,] 1.867831e-01 3.735661e-01 0.8132169390 [137,] 2.234234e-01 4.468467e-01 0.7765766427 [138,] 2.551510e-01 5.103020e-01 0.7448489876 [139,] 2.773347e-01 5.546695e-01 0.7226652555 [140,] 3.093484e-01 6.186969e-01 0.6906515505 [141,] 3.595895e-01 7.191791e-01 0.6404104661 [142,] 3.692841e-01 7.385682e-01 0.6307158967 [143,] 3.955286e-01 7.910572e-01 0.6044714027 [144,] 4.518362e-01 9.036725e-01 0.5481637617 [145,] 4.464057e-01 8.928113e-01 0.5535943428 [146,] 4.256729e-01 8.513458e-01 0.5743270772 [147,] 4.587116e-01 9.174233e-01 0.5412883706 [148,] 4.978046e-01 9.956092e-01 0.5021954237 [149,] 5.463351e-01 9.073297e-01 0.4536648644 [150,] 5.509587e-01 8.980826e-01 0.4490413147 [151,] 5.822289e-01 8.355421e-01 0.4177710625 [152,] 6.205281e-01 7.589437e-01 0.3794718587 [153,] 6.806325e-01 6.387350e-01 0.3193675019 [154,] 6.979633e-01 6.040733e-01 0.3020366566 [155,] 7.562003e-01 4.875995e-01 0.2437997454 [156,] 8.093576e-01 3.812848e-01 0.1906423784 [157,] 7.741282e-01 4.517436e-01 0.2258717800 [158,] 7.607213e-01 4.785574e-01 0.2392787028 [159,] 7.307222e-01 5.385556e-01 0.2692777902 [160,] 7.327587e-01 5.344827e-01 0.2672413417 [161,] 7.580683e-01 4.838635e-01 0.2419317331 [162,] 7.481270e-01 5.037460e-01 0.2518729800 [163,] 7.820660e-01 4.358681e-01 0.2179340286 [164,] 7.782556e-01 4.434888e-01 0.2217444196 [165,] 7.654434e-01 4.691131e-01 0.2345565671 [166,] 7.467875e-01 5.064250e-01 0.2532124844 [167,] 7.346972e-01 5.306055e-01 0.2653027529 [168,] 6.914533e-01 6.170934e-01 0.3085467042 [169,] 6.605682e-01 6.788636e-01 0.3394318170 [170,] 6.106040e-01 7.787921e-01 0.3893960401 [171,] 5.686903e-01 8.626194e-01 0.4313096924 [172,] 5.160574e-01 9.678852e-01 0.4839426003 [173,] 4.584976e-01 9.169953e-01 0.5415023586 [174,] 3.996100e-01 7.992200e-01 0.6003900014 [175,] 3.454485e-01 6.908971e-01 0.6545514601 [176,] 3.065932e-01 6.131865e-01 0.6934067723 [177,] 2.671151e-01 5.342303e-01 0.7328848567 [178,] 2.473784e-01 4.947568e-01 0.7526216183 [179,] 2.435108e-01 4.870215e-01 0.7564892277 [180,] 2.468352e-01 4.936705e-01 0.7531647694 [181,] 3.824142e-01 7.648285e-01 0.6175857620 [182,] 4.295805e-01 8.591611e-01 0.5704194624 [183,] 5.319597e-01 9.360805e-01 0.4680402635 [184,] 5.103014e-01 9.793972e-01 0.4896985883 [185,] 4.720508e-01 9.441016e-01 0.5279492106 [186,] 4.668950e-01 9.337900e-01 0.5331050148 [187,] 4.570764e-01 9.141529e-01 0.5429235619 [188,] 4.502910e-01 9.005820e-01 0.5497090197 [189,] 4.232753e-01 8.465506e-01 0.5767246785 [190,] 3.923736e-01 7.847472e-01 0.6076264234 [191,] 3.553049e-01 7.106097e-01 0.6446951310 [192,] 3.228678e-01 6.457357e-01 0.6771321528 [193,] 9.994725e-01 1.055016e-03 0.0005275078 [194,] 9.973693e-01 5.261373e-03 0.0026306863 [195,] 9.868894e-01 2.622120e-02 0.0131106001 > postscript(file="/var/wessaorg/rcomp/tmp/1i92z1322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2ezjh1322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3f60t1322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4lu951322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5b88v1322579715.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 = 226 Frequency = 1 1 2 3 4 5 6 -28871.215 -16197.846 -294388.320 -190994.425 -336123.267 -342689.162 7 8 9 10 11 12 -549337.057 -451183.004 -357490.688 -440655.267 -174038.980 -91682.869 13 14 15 16 17 18 -31319.635 -71978.267 -250510.740 -202005.846 -394274.688 -317956.583 19 20 21 22 23 24 -426703.477 -350045.425 -271896.109 -301293.688 -141126.401 -62248.290 25 26 27 28 29 30 41871.944 -32398.687 -122828.161 -174981.266 -262479.108 -255241.003 31 32 33 34 35 36 -365991.898 -354879.845 -193972.529 -285274.108 -88128.822 -32889.711 37 38 39 40 41 42 67048.524 -24818.108 -87416.582 -106950.687 -270618.529 -264132.424 43 44 45 46 47 48 -396278.318 -353239.266 -197696.950 -234662.529 -74519.242 -2239.131 49 50 51 52 53 54 30996.103 20806.471 -6351.002 -112890.108 -185455.950 -146191.844 55 56 57 58 59 60 -361129.739 -280487.686 -105307.371 -133143.950 44192.337 89448.448 61 62 63 64 65 66 73167.682 104630.051 140980.577 84998.472 23643.630 32488.735 67 68 69 70 71 72 -54198.160 -8871.107 58219.209 103582.630 242869.917 206603.028 73 74 75 76 77 78 227258.262 272914.630 259143.157 190724.051 148840.209 132773.314 79 80 81 82 83 84 59512.420 192921.472 149753.788 191889.209 270355.496 237845.607 85 86 87 88 89 90 257442.841 293045.210 317823.736 251519.631 249272.789 210331.894 91 92 93 94 95 96 145106.999 260613.052 305309.368 364796.789 393714.075 152591.186 97 98 99 100 101 102 241732.421 388123.789 426272.315 443215.210 398033.368 342603.473 103 104 105 106 107 108 352806.578 349633.631 424630.947 432928.368 371957.655 269797.766 109 110 111 112 113 114 321307.000 284199.368 388688.895 437623.789 331464.947 402812.053 115 116 117 118 119 120 365482.158 347301.211 122058.526 -125741.053 -19949.766 19990.345 121 122 123 124 125 126 55931.579 155679.948 256388.474 251854.369 282232.527 250892.632 127 128 129 130 131 132 263421.737 281406.790 301150.106 234928.527 81962.814 132179.925 133 134 135 136 137 138 97257.159 94046.527 -24011.946 -171676.052 -156134.894 -7282.789 139 140 141 142 143 144 75043.317 49152.369 37523.685 141326.106 25743.393 2800.504 145 146 147 148 149 150 -42342.262 122133.107 81281.633 161239.528 159701.686 111667.791 151 152 153 154 155 156 203200.896 126081.949 96439.265 161559.686 9271.972 -15033.917 157 158 159 160 161 162 37992.318 -12358.314 -28973.788 95388.107 242301.265 122104.370 163 164 165 166 167 168 260250.475 181825.528 181196.844 189618.265 -13382.448 -33943.337 169 170 171 172 173 174 -23375.103 -117418.735 -44992.208 222482.686 224836.844 274693.950 175 176 177 178 179 180 342495.055 222909.108 196731.423 179852.844 7597.131 40470.242 181 182 183 184 185 186 -15465.524 -58118.155 117702.371 185323.266 211556.424 159621.529 187 188 189 190 191 192 385950.634 302565.687 192969.003 224030.424 -6567.289 -20998.178 193 194 195 196 197 198 -118187.944 -90445.576 29996.951 64763.845 184770.003 180004.108 199 200 201 202 203 204 177797.214 63478.266 -68432.418 -16592.997 -341399.710 -345547.599 205 206 207 208 209 210 -541161.365 -656393.996 -645360.470 -315109.575 -460443.417 -503335.312 211 212 213 214 215 216 -270986.207 -301696.154 -484677.839 -438865.417 -588552.131 -547144.020 217 218 219 220 221 222 -651282.785 -655451.417 -513444.891 -1114524.996 -391123.838 -383164.733 223 224 225 226 -206442.628 -277486.575 -386508.259 -248283.838 > postscript(file="/var/wessaorg/rcomp/tmp/6g1ef1322579715.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 = 226 Frequency = 1 lag(myerror, k = 1) myerror 0 -28871.215 NA 1 -16197.846 -28871.215 2 -294388.320 -16197.846 3 -190994.425 -294388.320 4 -336123.267 -190994.425 5 -342689.162 -336123.267 6 -549337.057 -342689.162 7 -451183.004 -549337.057 8 -357490.688 -451183.004 9 -440655.267 -357490.688 10 -174038.980 -440655.267 11 -91682.869 -174038.980 12 -31319.635 -91682.869 13 -71978.267 -31319.635 14 -250510.740 -71978.267 15 -202005.846 -250510.740 16 -394274.688 -202005.846 17 -317956.583 -394274.688 18 -426703.477 -317956.583 19 -350045.425 -426703.477 20 -271896.109 -350045.425 21 -301293.688 -271896.109 22 -141126.401 -301293.688 23 -62248.290 -141126.401 24 41871.944 -62248.290 25 -32398.687 41871.944 26 -122828.161 -32398.687 27 -174981.266 -122828.161 28 -262479.108 -174981.266 29 -255241.003 -262479.108 30 -365991.898 -255241.003 31 -354879.845 -365991.898 32 -193972.529 -354879.845 33 -285274.108 -193972.529 34 -88128.822 -285274.108 35 -32889.711 -88128.822 36 67048.524 -32889.711 37 -24818.108 67048.524 38 -87416.582 -24818.108 39 -106950.687 -87416.582 40 -270618.529 -106950.687 41 -264132.424 -270618.529 42 -396278.318 -264132.424 43 -353239.266 -396278.318 44 -197696.950 -353239.266 45 -234662.529 -197696.950 46 -74519.242 -234662.529 47 -2239.131 -74519.242 48 30996.103 -2239.131 49 20806.471 30996.103 50 -6351.002 20806.471 51 -112890.108 -6351.002 52 -185455.950 -112890.108 53 -146191.844 -185455.950 54 -361129.739 -146191.844 55 -280487.686 -361129.739 56 -105307.371 -280487.686 57 -133143.950 -105307.371 58 44192.337 -133143.950 59 89448.448 44192.337 60 73167.682 89448.448 61 104630.051 73167.682 62 140980.577 104630.051 63 84998.472 140980.577 64 23643.630 84998.472 65 32488.735 23643.630 66 -54198.160 32488.735 67 -8871.107 -54198.160 68 58219.209 -8871.107 69 103582.630 58219.209 70 242869.917 103582.630 71 206603.028 242869.917 72 227258.262 206603.028 73 272914.630 227258.262 74 259143.157 272914.630 75 190724.051 259143.157 76 148840.209 190724.051 77 132773.314 148840.209 78 59512.420 132773.314 79 192921.472 59512.420 80 149753.788 192921.472 81 191889.209 149753.788 82 270355.496 191889.209 83 237845.607 270355.496 84 257442.841 237845.607 85 293045.210 257442.841 86 317823.736 293045.210 87 251519.631 317823.736 88 249272.789 251519.631 89 210331.894 249272.789 90 145106.999 210331.894 91 260613.052 145106.999 92 305309.368 260613.052 93 364796.789 305309.368 94 393714.075 364796.789 95 152591.186 393714.075 96 241732.421 152591.186 97 388123.789 241732.421 98 426272.315 388123.789 99 443215.210 426272.315 100 398033.368 443215.210 101 342603.473 398033.368 102 352806.578 342603.473 103 349633.631 352806.578 104 424630.947 349633.631 105 432928.368 424630.947 106 371957.655 432928.368 107 269797.766 371957.655 108 321307.000 269797.766 109 284199.368 321307.000 110 388688.895 284199.368 111 437623.789 388688.895 112 331464.947 437623.789 113 402812.053 331464.947 114 365482.158 402812.053 115 347301.211 365482.158 116 122058.526 347301.211 117 -125741.053 122058.526 118 -19949.766 -125741.053 119 19990.345 -19949.766 120 55931.579 19990.345 121 155679.948 55931.579 122 256388.474 155679.948 123 251854.369 256388.474 124 282232.527 251854.369 125 250892.632 282232.527 126 263421.737 250892.632 127 281406.790 263421.737 128 301150.106 281406.790 129 234928.527 301150.106 130 81962.814 234928.527 131 132179.925 81962.814 132 97257.159 132179.925 133 94046.527 97257.159 134 -24011.946 94046.527 135 -171676.052 -24011.946 136 -156134.894 -171676.052 137 -7282.789 -156134.894 138 75043.317 -7282.789 139 49152.369 75043.317 140 37523.685 49152.369 141 141326.106 37523.685 142 25743.393 141326.106 143 2800.504 25743.393 144 -42342.262 2800.504 145 122133.107 -42342.262 146 81281.633 122133.107 147 161239.528 81281.633 148 159701.686 161239.528 149 111667.791 159701.686 150 203200.896 111667.791 151 126081.949 203200.896 152 96439.265 126081.949 153 161559.686 96439.265 154 9271.972 161559.686 155 -15033.917 9271.972 156 37992.318 -15033.917 157 -12358.314 37992.318 158 -28973.788 -12358.314 159 95388.107 -28973.788 160 242301.265 95388.107 161 122104.370 242301.265 162 260250.475 122104.370 163 181825.528 260250.475 164 181196.844 181825.528 165 189618.265 181196.844 166 -13382.448 189618.265 167 -33943.337 -13382.448 168 -23375.103 -33943.337 169 -117418.735 -23375.103 170 -44992.208 -117418.735 171 222482.686 -44992.208 172 224836.844 222482.686 173 274693.950 224836.844 174 342495.055 274693.950 175 222909.108 342495.055 176 196731.423 222909.108 177 179852.844 196731.423 178 7597.131 179852.844 179 40470.242 7597.131 180 -15465.524 40470.242 181 -58118.155 -15465.524 182 117702.371 -58118.155 183 185323.266 117702.371 184 211556.424 185323.266 185 159621.529 211556.424 186 385950.634 159621.529 187 302565.687 385950.634 188 192969.003 302565.687 189 224030.424 192969.003 190 -6567.289 224030.424 191 -20998.178 -6567.289 192 -118187.944 -20998.178 193 -90445.576 -118187.944 194 29996.951 -90445.576 195 64763.845 29996.951 196 184770.003 64763.845 197 180004.108 184770.003 198 177797.214 180004.108 199 63478.266 177797.214 200 -68432.418 63478.266 201 -16592.997 -68432.418 202 -341399.710 -16592.997 203 -345547.599 -341399.710 204 -541161.365 -345547.599 205 -656393.996 -541161.365 206 -645360.470 -656393.996 207 -315109.575 -645360.470 208 -460443.417 -315109.575 209 -503335.312 -460443.417 210 -270986.207 -503335.312 211 -301696.154 -270986.207 212 -484677.839 -301696.154 213 -438865.417 -484677.839 214 -588552.131 -438865.417 215 -547144.020 -588552.131 216 -651282.785 -547144.020 217 -655451.417 -651282.785 218 -513444.891 -655451.417 219 -1114524.996 -513444.891 220 -391123.838 -1114524.996 221 -383164.733 -391123.838 222 -206442.628 -383164.733 223 -277486.575 -206442.628 224 -386508.259 -277486.575 225 -248283.838 -386508.259 226 NA -248283.838 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -16197.846 -28871.215 [2,] -294388.320 -16197.846 [3,] -190994.425 -294388.320 [4,] -336123.267 -190994.425 [5,] -342689.162 -336123.267 [6,] -549337.057 -342689.162 [7,] -451183.004 -549337.057 [8,] -357490.688 -451183.004 [9,] -440655.267 -357490.688 [10,] -174038.980 -440655.267 [11,] -91682.869 -174038.980 [12,] -31319.635 -91682.869 [13,] -71978.267 -31319.635 [14,] -250510.740 -71978.267 [15,] -202005.846 -250510.740 [16,] -394274.688 -202005.846 [17,] -317956.583 -394274.688 [18,] -426703.477 -317956.583 [19,] -350045.425 -426703.477 [20,] -271896.109 -350045.425 [21,] -301293.688 -271896.109 [22,] -141126.401 -301293.688 [23,] -62248.290 -141126.401 [24,] 41871.944 -62248.290 [25,] -32398.687 41871.944 [26,] -122828.161 -32398.687 [27,] -174981.266 -122828.161 [28,] -262479.108 -174981.266 [29,] -255241.003 -262479.108 [30,] -365991.898 -255241.003 [31,] -354879.845 -365991.898 [32,] -193972.529 -354879.845 [33,] -285274.108 -193972.529 [34,] -88128.822 -285274.108 [35,] -32889.711 -88128.822 [36,] 67048.524 -32889.711 [37,] -24818.108 67048.524 [38,] -87416.582 -24818.108 [39,] -106950.687 -87416.582 [40,] -270618.529 -106950.687 [41,] -264132.424 -270618.529 [42,] -396278.318 -264132.424 [43,] -353239.266 -396278.318 [44,] -197696.950 -353239.266 [45,] -234662.529 -197696.950 [46,] -74519.242 -234662.529 [47,] -2239.131 -74519.242 [48,] 30996.103 -2239.131 [49,] 20806.471 30996.103 [50,] -6351.002 20806.471 [51,] -112890.108 -6351.002 [52,] -185455.950 -112890.108 [53,] -146191.844 -185455.950 [54,] -361129.739 -146191.844 [55,] -280487.686 -361129.739 [56,] -105307.371 -280487.686 [57,] -133143.950 -105307.371 [58,] 44192.337 -133143.950 [59,] 89448.448 44192.337 [60,] 73167.682 89448.448 [61,] 104630.051 73167.682 [62,] 140980.577 104630.051 [63,] 84998.472 140980.577 [64,] 23643.630 84998.472 [65,] 32488.735 23643.630 [66,] -54198.160 32488.735 [67,] -8871.107 -54198.160 [68,] 58219.209 -8871.107 [69,] 103582.630 58219.209 [70,] 242869.917 103582.630 [71,] 206603.028 242869.917 [72,] 227258.262 206603.028 [73,] 272914.630 227258.262 [74,] 259143.157 272914.630 [75,] 190724.051 259143.157 [76,] 148840.209 190724.051 [77,] 132773.314 148840.209 [78,] 59512.420 132773.314 [79,] 192921.472 59512.420 [80,] 149753.788 192921.472 [81,] 191889.209 149753.788 [82,] 270355.496 191889.209 [83,] 237845.607 270355.496 [84,] 257442.841 237845.607 [85,] 293045.210 257442.841 [86,] 317823.736 293045.210 [87,] 251519.631 317823.736 [88,] 249272.789 251519.631 [89,] 210331.894 249272.789 [90,] 145106.999 210331.894 [91,] 260613.052 145106.999 [92,] 305309.368 260613.052 [93,] 364796.789 305309.368 [94,] 393714.075 364796.789 [95,] 152591.186 393714.075 [96,] 241732.421 152591.186 [97,] 388123.789 241732.421 [98,] 426272.315 388123.789 [99,] 443215.210 426272.315 [100,] 398033.368 443215.210 [101,] 342603.473 398033.368 [102,] 352806.578 342603.473 [103,] 349633.631 352806.578 [104,] 424630.947 349633.631 [105,] 432928.368 424630.947 [106,] 371957.655 432928.368 [107,] 269797.766 371957.655 [108,] 321307.000 269797.766 [109,] 284199.368 321307.000 [110,] 388688.895 284199.368 [111,] 437623.789 388688.895 [112,] 331464.947 437623.789 [113,] 402812.053 331464.947 [114,] 365482.158 402812.053 [115,] 347301.211 365482.158 [116,] 122058.526 347301.211 [117,] -125741.053 122058.526 [118,] -19949.766 -125741.053 [119,] 19990.345 -19949.766 [120,] 55931.579 19990.345 [121,] 155679.948 55931.579 [122,] 256388.474 155679.948 [123,] 251854.369 256388.474 [124,] 282232.527 251854.369 [125,] 250892.632 282232.527 [126,] 263421.737 250892.632 [127,] 281406.790 263421.737 [128,] 301150.106 281406.790 [129,] 234928.527 301150.106 [130,] 81962.814 234928.527 [131,] 132179.925 81962.814 [132,] 97257.159 132179.925 [133,] 94046.527 97257.159 [134,] -24011.946 94046.527 [135,] -171676.052 -24011.946 [136,] -156134.894 -171676.052 [137,] -7282.789 -156134.894 [138,] 75043.317 -7282.789 [139,] 49152.369 75043.317 [140,] 37523.685 49152.369 [141,] 141326.106 37523.685 [142,] 25743.393 141326.106 [143,] 2800.504 25743.393 [144,] -42342.262 2800.504 [145,] 122133.107 -42342.262 [146,] 81281.633 122133.107 [147,] 161239.528 81281.633 [148,] 159701.686 161239.528 [149,] 111667.791 159701.686 [150,] 203200.896 111667.791 [151,] 126081.949 203200.896 [152,] 96439.265 126081.949 [153,] 161559.686 96439.265 [154,] 9271.972 161559.686 [155,] -15033.917 9271.972 [156,] 37992.318 -15033.917 [157,] -12358.314 37992.318 [158,] -28973.788 -12358.314 [159,] 95388.107 -28973.788 [160,] 242301.265 95388.107 [161,] 122104.370 242301.265 [162,] 260250.475 122104.370 [163,] 181825.528 260250.475 [164,] 181196.844 181825.528 [165,] 189618.265 181196.844 [166,] -13382.448 189618.265 [167,] -33943.337 -13382.448 [168,] -23375.103 -33943.337 [169,] -117418.735 -23375.103 [170,] -44992.208 -117418.735 [171,] 222482.686 -44992.208 [172,] 224836.844 222482.686 [173,] 274693.950 224836.844 [174,] 342495.055 274693.950 [175,] 222909.108 342495.055 [176,] 196731.423 222909.108 [177,] 179852.844 196731.423 [178,] 7597.131 179852.844 [179,] 40470.242 7597.131 [180,] -15465.524 40470.242 [181,] -58118.155 -15465.524 [182,] 117702.371 -58118.155 [183,] 185323.266 117702.371 [184,] 211556.424 185323.266 [185,] 159621.529 211556.424 [186,] 385950.634 159621.529 [187,] 302565.687 385950.634 [188,] 192969.003 302565.687 [189,] 224030.424 192969.003 [190,] -6567.289 224030.424 [191,] -20998.178 -6567.289 [192,] -118187.944 -20998.178 [193,] -90445.576 -118187.944 [194,] 29996.951 -90445.576 [195,] 64763.845 29996.951 [196,] 184770.003 64763.845 [197,] 180004.108 184770.003 [198,] 177797.214 180004.108 [199,] 63478.266 177797.214 [200,] -68432.418 63478.266 [201,] -16592.997 -68432.418 [202,] -341399.710 -16592.997 [203,] -345547.599 -341399.710 [204,] -541161.365 -345547.599 [205,] -656393.996 -541161.365 [206,] -645360.470 -656393.996 [207,] -315109.575 -645360.470 [208,] -460443.417 -315109.575 [209,] -503335.312 -460443.417 [210,] -270986.207 -503335.312 [211,] -301696.154 -270986.207 [212,] -484677.839 -301696.154 [213,] -438865.417 -484677.839 [214,] -588552.131 -438865.417 [215,] -547144.020 -588552.131 [216,] -651282.785 -547144.020 [217,] -655451.417 -651282.785 [218,] -513444.891 -655451.417 [219,] -1114524.996 -513444.891 [220,] -391123.838 -1114524.996 [221,] -383164.733 -391123.838 [222,] -206442.628 -383164.733 [223,] -277486.575 -206442.628 [224,] -386508.259 -277486.575 [225,] -248283.838 -386508.259 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -16197.846 -28871.215 2 -294388.320 -16197.846 3 -190994.425 -294388.320 4 -336123.267 -190994.425 5 -342689.162 -336123.267 6 -549337.057 -342689.162 7 -451183.004 -549337.057 8 -357490.688 -451183.004 9 -440655.267 -357490.688 10 -174038.980 -440655.267 11 -91682.869 -174038.980 12 -31319.635 -91682.869 13 -71978.267 -31319.635 14 -250510.740 -71978.267 15 -202005.846 -250510.740 16 -394274.688 -202005.846 17 -317956.583 -394274.688 18 -426703.477 -317956.583 19 -350045.425 -426703.477 20 -271896.109 -350045.425 21 -301293.688 -271896.109 22 -141126.401 -301293.688 23 -62248.290 -141126.401 24 41871.944 -62248.290 25 -32398.687 41871.944 26 -122828.161 -32398.687 27 -174981.266 -122828.161 28 -262479.108 -174981.266 29 -255241.003 -262479.108 30 -365991.898 -255241.003 31 -354879.845 -365991.898 32 -193972.529 -354879.845 33 -285274.108 -193972.529 34 -88128.822 -285274.108 35 -32889.711 -88128.822 36 67048.524 -32889.711 37 -24818.108 67048.524 38 -87416.582 -24818.108 39 -106950.687 -87416.582 40 -270618.529 -106950.687 41 -264132.424 -270618.529 42 -396278.318 -264132.424 43 -353239.266 -396278.318 44 -197696.950 -353239.266 45 -234662.529 -197696.950 46 -74519.242 -234662.529 47 -2239.131 -74519.242 48 30996.103 -2239.131 49 20806.471 30996.103 50 -6351.002 20806.471 51 -112890.108 -6351.002 52 -185455.950 -112890.108 53 -146191.844 -185455.950 54 -361129.739 -146191.844 55 -280487.686 -361129.739 56 -105307.371 -280487.686 57 -133143.950 -105307.371 58 44192.337 -133143.950 59 89448.448 44192.337 60 73167.682 89448.448 61 104630.051 73167.682 62 140980.577 104630.051 63 84998.472 140980.577 64 23643.630 84998.472 65 32488.735 23643.630 66 -54198.160 32488.735 67 -8871.107 -54198.160 68 58219.209 -8871.107 69 103582.630 58219.209 70 242869.917 103582.630 71 206603.028 242869.917 72 227258.262 206603.028 73 272914.630 227258.262 74 259143.157 272914.630 75 190724.051 259143.157 76 148840.209 190724.051 77 132773.314 148840.209 78 59512.420 132773.314 79 192921.472 59512.420 80 149753.788 192921.472 81 191889.209 149753.788 82 270355.496 191889.209 83 237845.607 270355.496 84 257442.841 237845.607 85 293045.210 257442.841 86 317823.736 293045.210 87 251519.631 317823.736 88 249272.789 251519.631 89 210331.894 249272.789 90 145106.999 210331.894 91 260613.052 145106.999 92 305309.368 260613.052 93 364796.789 305309.368 94 393714.075 364796.789 95 152591.186 393714.075 96 241732.421 152591.186 97 388123.789 241732.421 98 426272.315 388123.789 99 443215.210 426272.315 100 398033.368 443215.210 101 342603.473 398033.368 102 352806.578 342603.473 103 349633.631 352806.578 104 424630.947 349633.631 105 432928.368 424630.947 106 371957.655 432928.368 107 269797.766 371957.655 108 321307.000 269797.766 109 284199.368 321307.000 110 388688.895 284199.368 111 437623.789 388688.895 112 331464.947 437623.789 113 402812.053 331464.947 114 365482.158 402812.053 115 347301.211 365482.158 116 122058.526 347301.211 117 -125741.053 122058.526 118 -19949.766 -125741.053 119 19990.345 -19949.766 120 55931.579 19990.345 121 155679.948 55931.579 122 256388.474 155679.948 123 251854.369 256388.474 124 282232.527 251854.369 125 250892.632 282232.527 126 263421.737 250892.632 127 281406.790 263421.737 128 301150.106 281406.790 129 234928.527 301150.106 130 81962.814 234928.527 131 132179.925 81962.814 132 97257.159 132179.925 133 94046.527 97257.159 134 -24011.946 94046.527 135 -171676.052 -24011.946 136 -156134.894 -171676.052 137 -7282.789 -156134.894 138 75043.317 -7282.789 139 49152.369 75043.317 140 37523.685 49152.369 141 141326.106 37523.685 142 25743.393 141326.106 143 2800.504 25743.393 144 -42342.262 2800.504 145 122133.107 -42342.262 146 81281.633 122133.107 147 161239.528 81281.633 148 159701.686 161239.528 149 111667.791 159701.686 150 203200.896 111667.791 151 126081.949 203200.896 152 96439.265 126081.949 153 161559.686 96439.265 154 9271.972 161559.686 155 -15033.917 9271.972 156 37992.318 -15033.917 157 -12358.314 37992.318 158 -28973.788 -12358.314 159 95388.107 -28973.788 160 242301.265 95388.107 161 122104.370 242301.265 162 260250.475 122104.370 163 181825.528 260250.475 164 181196.844 181825.528 165 189618.265 181196.844 166 -13382.448 189618.265 167 -33943.337 -13382.448 168 -23375.103 -33943.337 169 -117418.735 -23375.103 170 -44992.208 -117418.735 171 222482.686 -44992.208 172 224836.844 222482.686 173 274693.950 224836.844 174 342495.055 274693.950 175 222909.108 342495.055 176 196731.423 222909.108 177 179852.844 196731.423 178 7597.131 179852.844 179 40470.242 7597.131 180 -15465.524 40470.242 181 -58118.155 -15465.524 182 117702.371 -58118.155 183 185323.266 117702.371 184 211556.424 185323.266 185 159621.529 211556.424 186 385950.634 159621.529 187 302565.687 385950.634 188 192969.003 302565.687 189 224030.424 192969.003 190 -6567.289 224030.424 191 -20998.178 -6567.289 192 -118187.944 -20998.178 193 -90445.576 -118187.944 194 29996.951 -90445.576 195 64763.845 29996.951 196 184770.003 64763.845 197 180004.108 184770.003 198 177797.214 180004.108 199 63478.266 177797.214 200 -68432.418 63478.266 201 -16592.997 -68432.418 202 -341399.710 -16592.997 203 -345547.599 -341399.710 204 -541161.365 -345547.599 205 -656393.996 -541161.365 206 -645360.470 -656393.996 207 -315109.575 -645360.470 208 -460443.417 -315109.575 209 -503335.312 -460443.417 210 -270986.207 -503335.312 211 -301696.154 -270986.207 212 -484677.839 -301696.154 213 -438865.417 -484677.839 214 -588552.131 -438865.417 215 -547144.020 -588552.131 216 -651282.785 -547144.020 217 -655451.417 -651282.785 218 -513444.891 -655451.417 219 -1114524.996 -513444.891 220 -391123.838 -1114524.996 221 -383164.733 -391123.838 222 -206442.628 -383164.733 223 -277486.575 -206442.628 224 -386508.259 -277486.575 225 -248283.838 -386508.259 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7xw311322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/876op1322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/9gqpu1322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10q9c51322579715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/11fdz11322579715.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12786i1322579715.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/13hedy1322579715.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/14gsed1322579715.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/15phfw1322579715.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16o3m51322579715.tab") + } > > try(system("convert tmp/1i92z1322579715.ps tmp/1i92z1322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/2ezjh1322579715.ps tmp/2ezjh1322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/3f60t1322579715.ps tmp/3f60t1322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/4lu951322579715.ps tmp/4lu951322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/5b88v1322579715.ps tmp/5b88v1322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/6g1ef1322579715.ps tmp/6g1ef1322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/7xw311322579715.ps tmp/7xw311322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/876op1322579715.ps tmp/876op1322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/9gqpu1322579715.ps tmp/9gqpu1322579715.png",intern=TRUE)) character(0) > try(system("convert tmp/10q9c51322579715.ps tmp/10q9c51322579715.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.432 0.544 7.139