R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(1818 + ,279055 + ,73 + ,504 + ,95 + ,3 + ,96 + ,42 + ,159 + ,130 + ,140824 + ,32033 + ,186099 + ,165 + ,165 + ,1439 + ,212450 + ,76 + ,513 + ,68 + ,4 + ,75 + ,38 + ,149 + ,143 + ,110459 + ,20654 + ,113854 + ,135 + ,132 + ,2059 + ,233939 + ,83 + ,710 + ,64 + ,16 + ,70 + ,46 + ,178 + ,118 + ,105079 + ,16346 + ,99776 + ,121 + ,121 + ,2733 + ,222117 + ,106 + ,1154 + ,139 + ,2 + ,134 + ,42 + ,164 + ,146 + ,112098 + ,35926 + ,106194 + ,148 + ,145 + ,1399 + ,189911 + ,56 + ,415 + ,51 + ,1 + ,83 + ,30 + ,100 + ,73 + ,43929 + ,10621 + ,100792 + ,73 + ,71 + ,631 + ,70849 + ,28 + ,179 + ,46 + ,3 + ,8 + ,35 + ,129 + ,89 + ,76173 + ,10024 + ,47552 + ,49 + ,47 + ,5460 + ,605767 + ,135 + ,2563 + ,118 + ,0 + ,173 + ,40 + ,156 + ,146 + ,187326 + ,43068 + ,250931 + ,185 + ,177 + ,381 + ,33186 + ,19 + ,111 + ,46 + ,0 + ,1 + ,18 + ,67 + ,22 + ,22807 + ,1271 + ,6853 + ,5 + ,5 + ,2150 + ,227332 + ,62 + ,763 + ,79 + ,7 + ,88 + ,38 + ,148 + ,132 + ,144408 + ,34416 + ,115466 + ,125 + ,124 + ,2042 + ,267925 + ,49 + ,661 + ,76 + ,0 + ,104 + ,37 + ,132 + ,92 + ,66485 + ,20318 + ,110896 + ,93 + ,92 + ,2541 + ,372083 + ,123 + ,983 + ,82 + ,0 + ,114 + ,46 + ,169 + ,147 + ,79089 + ,24409 + ,169351 + ,154 + ,149 + ,2449 + ,279589 + ,133 + ,754 + ,66 + ,7 + ,132 + ,60 + ,230 + ,203 + ,81625 + ,20648 + ,94853 + ,98 + ,93 + ,2100 + ,212638 + ,87 + ,785 + ,60 + ,10 + ,57 + ,37 + ,122 + ,113 + ,68788 + ,12347 + ,72591 + ,70 + ,70 + ,3020 + ,368577 + ,85 + ,1186 + ,117 + ,4 + ,139 + ,55 + ,191 + ,171 + ,103297 + ,21857 + ,101345 + ,148 + ,148 + ,2265 + ,269455 + ,88 + ,724 + ,50 + ,10 + ,87 + ,44 + ,162 + ,87 + ,69446 + ,11034 + ,113713 + ,100 + ,100 + ,5169 + ,402600 + ,197 + ,1783 + ,133 + ,0 + ,176 + ,63 + ,237 + ,208 + ,114948 + ,33433 + ,165354 + ,150 + ,142 + ,2375 + ,335735 + ,78 + ,850 + ,63 + ,8 + ,114 + ,40 + ,156 + ,153 + ,167949 + ,35902 + ,164263 + ,197 + ,194 + ,3564 + ,432711 + ,173 + ,1390 + ,100 + ,4 + ,121 + ,43 + ,157 + ,97 + ,125081 + ,22355 + ,135213 + ,114 + ,113 + ,1516 + ,185822 + ,59 + ,527 + ,44 + ,3 + ,103 + ,32 + ,123 + ,95 + ,125818 + ,31219 + ,111669 + ,169 + ,162 + ,2398 + ,267365 + ,89 + ,692 + ,65 + ,8 + ,135 + ,52 + ,203 + ,197 + ,136588 + ,21983 + ,134163 + ,200 + ,186 + ,2551 + ,279452 + ,74 + ,849 + ,103 + ,0 + ,123 + ,49 + ,187 + ,160 + ,112431 + ,40085 + ,140303 + ,148 + ,147 + ,3253 + ,527853 + ,112 + ,1443 + ,103 + ,1 + ,110 + ,41 + ,152 + ,148 + ,103037 + ,18507 + ,150773 + ,140 + ,137 + ,1761 + ,227252 + ,50 + ,587 + ,62 + ,5 + ,84 + ,25 + ,89 + ,84 + ,82317 + ,16278 + ,111848 + ,74 + ,71 + ,1787 + ,200004 + ,58 + ,636 + ,70 + ,9 + ,103 + ,57 + ,227 + ,227 + ,118906 + ,24662 + ,102509 + ,128 + ,123 + ,3796 + ,257239 + ,134 + ,1371 + ,159 + ,1 + ,158 + ,45 + ,165 + ,154 + ,83515 + ,31452 + ,96785 + ,140 + ,134 + ,3113 + ,271341 + ,139 + ,1094 + ,78 + ,0 + ,116 + ,42 + ,162 + ,151 + ,104581 + ,32580 + ,116136 + ,116 + ,115 + ,3230 + ,324969 + ,134 + ,1201 + ,101 + ,5 + ,114 + ,45 + ,174 + ,142 + ,103129 + ,22883 + ,158376 + ,147 + ,138 + ,2494 + ,349753 + ,93 + ,795 + ,73 + ,0 + ,181 + ,43 + ,154 + ,148 + ,83243 + ,27652 + ,153990 + ,132 + ,125 + ,1856 + ,200723 + ,63 + ,674 + ,58 + ,0 + ,76 + ,36 + ,129 + ,110 + ,37110 + ,9845 + ,64057 + ,70 + ,66 + ,3257 + ,399591 + ,80 + ,1230 + ,147 + ,0 + ,155 + ,45 + ,174 + ,149 + ,113344 + ,20190 + ,230054 + ,144 + ,137 + ,2692 + ,327660 + ,89 + ,1111 + ,54 + ,3 + ,143 + ,50 + ,195 + ,179 + ,139165 + ,46201 + ,184531 + ,155 + ,152 + ,2187 + ,269239 + ,83 + ,758 + ,84 + ,6 + ,50 + ,50 + ,186 + ,149 + ,86652 + ,10971 + ,114198 + ,165 + ,159 + ,2593 + ,397689 + ,107 + ,911 + ,56 + ,1 + ,145 + ,51 + ,197 + ,187 + ,112302 + ,34811 + ,198299 + ,161 + ,159 + ,1293 + ,130446 + ,49 + ,456 + ,45 + ,4 + ,56 + ,42 + ,157 + ,153 + ,69652 + ,3029 + ,33750 + ,31 + ,31 + ,3567 + ,430118 + ,104 + ,1293 + ,87 + ,4 + ,141 + ,44 + ,168 + ,163 + ,119442 + ,38941 + ,189723 + ,199 + ,185 + ,2764 + ,273950 + ,56 + ,1186 + ,87 + ,0 + ,83 + ,42 + ,159 + ,127 + ,69867 + ,4958 + ,100826 + ,78 + ,78 + ,3766 + ,429837 + ,129 + ,1353 + ,77 + ,0 + ,112 + ,44 + ,161 + ,151 + ,101629 + ,32344 + ,188355 + ,121 + ,117 + ,2075 + ,254312 + ,93 + ,695 + ,72 + ,2 + ,79 + ,40 + ,153 + ,100 + ,70168 + ,19433 + ,104470 + ,112 + ,109 + ,995 + ,120351 + ,35 + ,306 + ,36 + ,1 + ,33 + ,17 + ,55 + ,46 + ,31081 + ,12558 + ,58391 + ,41 + ,41 + ,3750 + ,395658 + ,212 + ,1319 + ,51 + ,2 + ,152 + ,43 + ,166 + ,156 + ,103925 + ,36524 + ,164808 + ,158 + ,149 + ,3437 + ,349119 + ,87 + ,1582 + ,44 + ,10 + ,126 + ,41 + ,151 + ,128 + ,92622 + ,26041 + ,134097 + ,123 + ,123 + ,2071 + ,220517 + ,86 + ,788 + ,75 + ,10 + ,97 + ,41 + ,148 + ,111 + ,79011 + ,16637 + ,80238 + ,104 + ,103 + ,2038 + ,234780 + ,85 + ,768 + ,87 + ,5 + ,84 + ,40 + ,129 + ,119 + ,93487 + ,28395 + ,133252 + ,94 + ,87 + ,1841 + ,191784 + ,71 + ,491 + ,97 + ,6 + ,68 + ,49 + ,181 + ,148 + ,64520 + ,16747 + ,54518 + ,73 + ,71 + ,2964 + ,186112 + ,94 + ,1211 + ,90 + ,1 + ,64 + ,52 + ,93 + ,65 + ,93473 + ,9105 + ,121850 + ,52 + ,51 + ,5578 + ,459665 + ,158 + ,2091 + ,860 + ,2 + ,101 + ,42 + ,150 + ,134 + ,114360 + ,11941 + ,79367 + ,71 + ,70 + ,918 + ,78800 + ,42 + ,330 + ,57 + ,2 + ,20 + ,26 + ,82 + ,66 + ,33032 + ,7935 + ,56968 + ,21 + ,21 + ,2704 + ,259887 + ,87 + ,770 + ,99 + ,1 + ,107 + ,59 + ,229 + ,201 + ,96125 + ,19499 + ,106314 + ,155 + ,155 + ,4145 + ,368086 + ,123 + ,1410 + ,120 + ,10 + ,150 + ,50 + ,193 + ,177 + ,151911 + ,22938 + ,191889 + ,174 + ,172 + ,2841 + ,230299 + ,70 + ,1187 + ,76 + ,3 + ,129 + ,50 + ,176 + ,156 + ,89256 + ,25314 + ,104864 + ,136 + ,133 + ,2222 + ,256033 + ,82 + ,706 + ,56 + ,0 + ,102 + ,47 + ,179 + ,158 + ,95676 + ,28527 + ,160792 + ,128 + ,125 + ,496 + ,24188 + ,24 + ,218 + ,20 + ,0 + ,8 + ,4 + ,12 + ,7 + ,5950 + ,2694 + ,15049 + ,7 + ,7 + ,2699 + ,400109 + ,334 + ,865 + ,94 + ,8 + ,88 + ,51 + ,181 + ,175 + ,149695 + ,20867 + ,191179 + ,165 + ,158 + ,744 + ,65029 + ,17 + ,255 + ,21 + ,5 + ,21 + ,18 + ,67 + ,61 + ,32551 + ,3597 + ,25109 + ,21 + ,21 + ,1161 + ,101097 + ,64 + ,454 + ,70 + ,3 + ,30 + ,14 + ,52 + ,41 + ,31701 + ,5296 + ,45824 + ,35 + ,35 + ,3405 + ,319020 + ,68 + ,1245 + ,133 + ,1 + ,106 + ,41 + ,148 + ,133 + ,100087 + ,32982 + ,129711 + ,137 + ,133 + ,2970 + ,375638 + ,91 + ,790 + ,86 + ,5 + ,166 + ,61 + ,230 + ,228 + ,169707 + ,38975 + ,210012 + ,174 + ,169 + ,4002 + ,375011 + ,207 + ,1233 + ,224 + ,6 + ,132 + ,40 + ,148 + ,140 + ,150491 + ,42721 + ,194679 + ,257 + ,256 + ,2919 + ,387748 + ,156 + ,1118 + ,65 + ,0 + ,161 + ,44 + ,160 + ,155 + ,120192 + ,41455 + ,197680 + ,207 + ,190 + ,2399 + ,280106 + ,90 + ,919 + ,86 + ,12 + ,90 + ,40 + ,155 + ,141 + ,95893 + ,23923 + ,81180 + ,103 + ,100 + ,4121 + ,400971 + ,153 + ,1352 + ,70 + ,10 + ,160 + ,51 + ,198 + ,181 + ,151715 + ,26719 + ,197765 + ,171 + ,171 + ,3330 + ,322780 + ,124 + ,1212 + ,148 + ,12 + ,139 + ,29 + ,104 + ,75 + ,176225 + ,53405 + ,214738 + ,279 + ,267 + ,3132 + ,291391 + ,124 + ,1257 + ,72 + ,11 + ,104 + ,43 + ,169 + ,97 + ,59900 + ,12526 + ,96252 + ,83 + ,80 + ,2868 + ,295075 + ,93 + ,1030 + ,59 + ,8 + ,103 + ,42 + ,163 + ,142 + ,104767 + ,26584 + ,124527 + ,130 + ,126 + ,1778 + ,280018 + ,81 + ,669 + ,67 + ,3 + ,66 + ,41 + ,151 + ,136 + ,114799 + ,37062 + ,153242 + ,131 + ,132 + ,2109 + ,267432 + ,71 + ,542 + ,58 + ,0 + ,163 + ,30 + ,116 + ,87 + ,72128 + ,25696 + ,145707 + ,126 + ,121 + ,2148 + ,217181 + ,141 + ,652 + ,60 + ,6 + ,93 + ,39 + ,153 + ,140 + ,143592 + ,24634 + ,113963 + ,158 + ,156 + ,3009 + ,258166 + ,159 + ,894 + ,105 + ,10 + ,85 + ,51 + ,195 + ,169 + ,89626 + ,27269 + ,134904 + ,138 + ,133 + ,2624 + ,277891 + ,90 + ,935 + ,84 + ,2 + ,159 + ,40 + ,149 + ,129 + ,131072 + ,25270 + ,114268 + ,200 + ,199 + ,1781 + ,192894 + ,74 + ,659 + ,63 + ,5 + ,146 + ,29 + ,106 + ,92 + ,126817 + ,24634 + ,94333 + ,104 + ,98 + ,2735 + ,271853 + ,75 + ,917 + ,67 + ,13 + ,122 + ,47 + ,179 + ,160 + ,81351 + ,17828 + ,102204 + ,111 + ,109 + ,893 + ,73566 + ,32 + ,385 + ,39 + ,6 + ,22 + ,23 + ,88 + ,67 + ,22618 + ,3007 + ,23824 + ,26 + ,25 + ,2411 + ,276269 + ,96 + ,789 + ,60 + ,7 + ,85 + ,48 + ,185 + ,179 + ,88977 + ,20065 + ,111563 + ,115 + ,113 + ,2291 + ,242619 + ,64 + ,949 + ,94 + ,2 + ,105 + ,38 + ,133 + ,90 + ,92059 + ,24648 + ,91313 + ,127 + ,126 + ,2235 + ,230030 + ,71 + ,784 + ,67 + ,5 + ,131 + ,42 + ,164 + ,144 + ,81897 + ,21588 + ,89770 + ,140 + ,137 + ,2370 + ,371391 + ,91 + ,1001 + ,96 + ,4 + ,140 + ,46 + ,169 + ,144 + ,108146 + ,25217 + ,100125 + ,121 + ,121 + ,3242 + ,398698 + ,107 + ,1268 + ,54 + ,3 + ,156 + ,40 + ,153 + ,144 + ,126372 + ,30927 + ,165278 + ,183 + ,178 + ,2080 + ,243355 + ,114 + ,616 + ,54 + ,6 + ,89 + ,45 + ,166 + ,134 + ,249771 + ,18487 + ,181712 + ,68 + ,63 + ,2537 + ,233519 + ,73 + ,775 + ,62 + ,2 + ,137 + ,42 + ,164 + ,146 + ,71154 + ,18050 + ,80906 + ,112 + ,109 + ,2149 + ,219936 + ,74 + ,746 + ,71 + ,0 + ,102 + ,41 + ,146 + ,121 + ,71571 + ,17696 + ,75881 + ,103 + ,101 + ,2150 + ,206169 + ,54 + ,795 + ,50 + ,1 + ,74 + ,37 + ,141 + ,112 + ,55918 + ,17326 + ,83963 + ,63 + ,61 + ,4232 + ,483429 + ,133 + ,1273 + ,117 + ,3 + ,161 + ,47 + ,183 + ,145 + ,160141 + ,39361 + ,175721 + ,166 + ,157 + ,1380 + ,146100 + ,72 + ,657 + ,45 + ,5 + ,30 + ,26 + ,99 + ,99 + ,38692 + ,9648 + ,68580 + ,38 + ,38 + ,2449 + ,295224 + ,109 + ,703 + ,61 + ,2 + ,120 + ,48 + ,134 + ,96 + ,102812 + ,26759 + ,136323 + ,163 + ,159 + ,870 + ,80953 + ,25 + ,437 + ,31 + ,0 + ,49 + ,8 + ,28 + ,27 + ,56622 + ,7905 + ,55792 + ,59 + ,58 + ,2700 + ,217384 + ,63 + ,1060 + ,175 + ,0 + ,121 + ,27 + ,101 + ,77 + ,15986 + ,4527 + ,25157 + ,27 + ,27 + ,1574 + ,179344 + ,62 + ,459 + ,70 + ,6 + ,76 + ,38 + ,139 + ,137 + ,123534 + ,41517 + ,100922 + ,108 + ,108 + ,4055 + ,416097 + ,223 + ,1591 + ,284 + ,1 + ,85 + ,41 + ,159 + ,151 + ,108535 + ,21261 + ,118845 + ,88 + ,83 + ,3327 + ,395041 + ,131 + ,1102 + ,95 + ,4 + ,152 + ,61 + ,222 + ,126 + ,93879 + ,36099 + ,170492 + ,92 + ,88 + ,3098 + ,180679 + ,106 + ,1051 + ,72 + ,1 + ,165 + ,45 + ,171 + ,159 + ,144551 + ,39039 + ,81716 + ,170 + ,164 + ,2673 + ,311447 + ,105 + ,850 + ,63 + ,1 + ,89 + ,41 + ,154 + ,101 + ,56750 + ,13841 + ,115750 + ,98 + ,96 + ,2404 + ,292260 + ,84 + ,732 + ,75 + ,3 + ,168 + ,42 + ,154 + ,144 + ,127654 + ,23841 + ,105590 + ,205 + ,192 + ,1932 + ,199481 + ,68 + ,632 + ,90 + ,10 + ,48 + ,35 + ,129 + ,102 + ,65594 + ,8589 + ,92795 + ,96 + ,94 + ,3147 + ,282361 + ,78 + ,1128 + ,89 + ,1 + ,149 + ,36 + ,140 + ,135 + ,59938 + ,15049 + ,82390 + ,107 + ,107 + ,2598 + ,329281 + ,89 + ,971 + ,138 + ,4 + ,75 + ,40 + ,156 + ,147 + ,146975 + ,39038 + ,135599 + ,150 + ,144 + ,2108 + ,234577 + ,48 + ,711 + ,68 + ,5 + ,107 + ,40 + ,156 + ,155 + ,165904 + ,36774 + ,127667 + ,138 + ,136 + ,2240 + ,310685 + ,68 + ,750 + ,80 + ,7 + ,121 + ,38 + ,138 + ,138 + ,169265 + ,40076 + ,163073 + ,177 + ,171 + ,2506 + ,352078 + ,91 + ,904 + ,65 + ,0 + ,184 + ,43 + ,153 + ,113 + ,183500 + ,43840 + ,211381 + ,213 + ,210 + ,4198 + ,416463 + ,163 + ,1369 + ,130 + ,12 + ,155 + ,65 + ,251 + ,248 + ,165986 + ,43146 + ,189944 + ,208 + ,193 + ,4165 + ,429565 + ,120 + ,1538 + ,85 + ,13 + ,165 + ,33 + ,126 + ,116 + ,184923 + ,50099 + ,226168 + ,307 + ,297 + ,2842 + ,297080 + ,142 + ,893 + ,83 + ,9 + ,121 + ,51 + ,198 + ,176 + ,140358 + ,40312 + ,117495 + ,125 + ,125 + ,2562 + ,331792 + ,71 + ,926 + ,89 + ,0 + ,176 + ,45 + ,168 + ,140 + ,149959 + ,32616 + ,195894 + ,208 + ,204 + ,2564 + ,242507 + ,205 + ,833 + ,116 + ,0 + ,92 + ,36 + ,138 + ,59 + ,57224 + ,11338 + ,80684 + ,73 + ,70 + ,602 + ,43287 + ,14 + ,214 + ,43 + ,4 + ,13 + ,19 + ,71 + ,64 + ,43750 + ,7409 + ,19630 + ,49 + ,49 + ,2579 + ,238089 + ,87 + ,833 + ,87 + ,4 + ,120 + ,25 + ,90 + ,40 + ,48029 + ,18213 + ,88634 + ,82 + ,82 + ,2665 + ,285479 + ,164 + ,931 + ,80 + ,0 + ,124 + ,44 + ,167 + ,98 + ,104978 + ,45873 + ,139292 + ,206 + ,205 + ,3004 + ,310383 + ,63 + ,1304 + ,132 + ,0 + ,133 + ,45 + ,172 + ,139 + ,100046 + ,39844 + ,128602 + ,112 + ,111 + ,2786 + ,321797 + ,95 + ,1079 + ,59 + ,0 + ,169 + ,44 + ,162 + ,135 + ,101047 + ,28317 + ,135848 + ,139 + ,135 + ,1477 + ,193926 + ,96 + ,490 + ,50 + ,0 + ,39 + ,35 + ,129 + ,97 + ,197426 + ,24797 + ,178377 + ,60 + ,59 + ,3358 + ,175737 + ,106 + ,992 + ,87 + ,0 + ,126 + ,46 + ,179 + ,142 + ,160902 + ,7471 + ,106330 + ,70 + ,70 + ,2107 + ,354041 + ,78 + ,677 + ,62 + ,5 + ,82 + ,44 + ,163 + ,155 + ,147172 + ,27259 + ,178303 + ,112 + ,108 + ,2338 + ,303566 + ,92 + ,698 + ,70 + ,1 + ,148 + ,45 + ,164 + ,115 + ,109432 + ,23201 + ,116938 + ,142 + ,141 + ,400 + ,23668 + ,13 + ,156 + ,9 + ,0 + ,12 + ,1 + ,0 + ,0 + ,1168 + ,238 + ,5841 + ,11 + ,11 + ,2233 + ,196743 + ,79 + ,785 + ,54 + ,0 + ,146 + ,40 + ,155 + ,103 + ,83248 + ,28830 + ,106020 + ,130 + ,130 + ,530 + ,61857 + ,25 + ,192 + ,25 + ,4 + ,23 + ,11 + ,32 + ,30 + ,25162 + ,3913 + ,24610 + ,31 + ,28 + ,2033 + ,217543 + ,54 + ,641 + ,113 + ,0 + ,87 + ,51 + ,189 + ,130 + ,45724 + ,9935 + ,74151 + ,132 + ,101 + ,3246 + ,440711 + ,128 + ,1251 + ,63 + ,1 + ,164 + ,38 + ,140 + ,102 + ,110529 + ,27738 + ,232241 + ,219 + ,216 + ,387 + ,21054 + ,16 + ,146 + ,2 + ,0 + ,4 + ,0 + ,0 + ,0 + ,855 + ,338 + ,6622 + ,4 + ,4 + ,2137 + ,252805 + ,52 + ,866 + ,67 + ,5 + ,81 + ,30 + ,111 + ,77 + ,101382 + ,13326 + ,127097 + ,102 + ,97 + ,492 + ,31961 + ,22 + ,200 + ,22 + ,0 + ,18 + ,8 + ,25 + ,9 + ,14116 + ,3988 + ,13155 + ,39 + ,39 + ,3838 + ,360436 + ,125 + ,1351 + ,157 + ,3 + ,118 + ,43 + ,159 + ,150 + ,89506 + ,24347 + ,160501 + ,125 + ,119 + ,2193 + ,251948 + ,77 + ,740 + ,79 + ,7 + ,76 + ,48 + ,183 + ,163 + ,135356 + ,27111 + ,91502 + ,121 + ,118 + ,1796 + ,187320 + ,97 + ,524 + ,113 + ,14 + ,55 + ,49 + ,184 + ,148 + ,116066 + ,3938 + ,24469 + ,42 + ,41 + ,1907 + ,180842 + ,58 + ,724 + ,50 + ,3 + ,62 + ,32 + ,119 + ,94 + ,144244 + ,17416 + ,88229 + ,111 + ,107 + ,568 + ,38214 + ,34 + ,276 + ,52 + ,0 + ,16 + ,8 + ,27 + ,21 + ,8773 + ,1888 + ,13983 + ,16 + ,16 + ,2647 + ,289296 + ,58 + ,869 + ,113 + ,3 + ,98 + ,43 + ,163 + ,151 + ,102153 + ,18700 + ,80716 + ,70 + ,69 + ,2819 + ,358276 + ,84 + ,1031 + ,115 + ,0 + ,137 + ,52 + ,198 + ,187 + ,117440 + ,36809 + ,157384 + ,162 + ,160 + ,1464 + ,211775 + ,67 + ,511 + ,78 + ,0 + ,50 + ,53 + ,205 + ,171 + ,104128 + ,24959 + ,122975 + ,173 + ,158 + ,3946 + ,447335 + ,90 + ,1716 + ,135 + ,4 + ,152 + ,49 + ,191 + ,170 + ,134238 + ,37343 + ,191469 + ,171 + ,161 + ,2554 + ,348017 + ,99 + ,884 + ,120 + ,0 + ,163 + ,48 + ,187 + ,145 + ,134047 + ,21849 + ,231257 + ,172 + ,165 + ,3506 + ,441946 + ,133 + ,1201 + ,122 + ,3 + ,142 + ,56 + ,210 + ,198 + ,279488 + ,49809 + ,258287 + ,254 + ,246 + ,1552 + ,215177 + ,43 + ,575 + ,54 + ,0 + ,80 + ,45 + ,166 + ,152 + ,79756 + ,21654 + ,122531 + ,90 + ,89 + ,1476 + ,140328 + ,48 + ,507 + ,63 + ,0 + ,65 + ,40 + ,145 + ,112 + ,66089 + ,8728 + ,61394 + ,50 + ,49 + ,3105 + ,318092 + ,366 + ,1033 + ,162 + ,4 + ,94 + ,48 + ,187 + ,173 + ,102070 + ,20920 + ,86480 + ,113 + ,107 + ,4541 + ,466139 + ,198 + ,1574 + ,162 + ,5 + ,128 + ,50 + ,186 + ,177 + ,146760 + ,27195 + ,195791 + ,187 + ,182 + ,1876 + ,162406 + ,63 + ,576 + ,107 + ,16 + ,63 + ,43 + ,164 + ,153 + ,154771 + ,1037 + ,18284 + ,16 + ,16 + ,4469 + ,417354 + ,142 + ,1834 + ,146 + ,6 + ,127 + ,46 + ,172 + ,161 + ,165933 + ,42570 + ,147581 + ,175 + ,173 + ,2113 + ,178322 + ,86 + ,790 + ,77 + ,5 + ,60 + ,40 + ,147 + ,115 + ,64593 + ,17672 + ,72558 + ,90 + ,90 + ,2046 + ,292443 + ,54 + ,668 + ,87 + ,2 + ,118 + ,45 + ,167 + ,147 + ,92280 + ,34245 + ,147341 + ,140 + ,140 + ,2564 + ,283913 + ,100 + ,905 + ,192 + ,1 + ,110 + ,46 + ,158 + ,124 + ,67150 + ,16786 + ,114651 + ,145 + ,142 + ,2209 + ,253950 + ,131 + ,723 + ,75 + ,2 + ,48 + ,37 + ,144 + ,57 + ,128692 + ,20954 + ,100187 + ,141 + ,126 + ,4123 + ,389698 + ,126 + ,1619 + ,131 + ,9 + ,96 + ,45 + ,169 + ,144 + ,124089 + ,16378 + ,130332 + ,125 + ,123 + ,2340 + ,246963 + ,93 + ,811 + ,67 + ,1 + ,128 + ,39 + ,145 + ,126 + ,125386 + ,31852 + ,134218 + ,241 + ,239 + ,2035 + ,173260 + ,63 + ,716 + ,37 + ,3 + ,41 + ,21 + ,79 + ,78 + ,37238 + ,2805 + ,10901 + ,16 + ,15 + ,3241 + ,346748 + ,108 + ,1034 + ,61 + ,11 + ,146 + ,50 + ,194 + ,153 + ,140015 + ,38086 + ,145758 + ,175 + ,170 + ,2056 + ,188437 + ,62 + ,782 + ,127 + ,5 + ,147 + ,55 + ,212 + ,196 + ,150047 + ,21166 + ,75767 + ,132 + ,123 + ,2872 + ,279125 + ,98 + ,1103 + ,58 + ,2 + ,121 + ,40 + ,148 + ,130 + ,154451 + ,34672 + ,134969 + ,154 + ,151 + ,2749 + ,314070 + ,113 + ,852 + ,71 + ,1 + ,185 + ,48 + ,171 + ,159 + ,156349 + ,36171 + ,169216 + ,198 + ,194 + ,2 + ,1 + ,0 + ,0 + ,0 + ,9 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,207 + ,14688 + ,10 + ,85 + ,0 + ,0 + ,4 + ,0 + ,0 + ,0 + ,6023 + ,2065 + ,7953 + ,5 + ,5 + ,5 + ,98 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,8 + ,455 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,2449 + ,291847 + ,95 + ,816 + ,72 + ,2 + ,85 + ,46 + ,141 + ,94 + ,84601 + ,19354 + ,105406 + ,125 + ,122 + ,3497 + ,415839 + ,170 + ,1145 + ,123 + ,3 + ,164 + ,52 + ,204 + ,129 + ,68946 + ,22124 + ,174586 + ,174 + ,173 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,203 + ,4 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,151 + ,7199 + ,5 + ,74 + ,0 + ,0 + ,7 + ,0 + ,0 + ,0 + ,1644 + ,556 + ,4245 + ,6 + ,6 + ,475 + ,46660 + ,21 + ,259 + ,7 + ,0 + ,12 + ,5 + ,15 + ,13 + ,6179 + ,2089 + ,21509 + ,13 + ,13 + ,141 + ,17547 + ,5 + ,69 + ,3 + ,0 + ,0 + ,1 + ,4 + ,4 + ,3926 + ,2658 + ,7670 + ,3 + ,3 + ,1145 + ,121550 + ,46 + ,309 + ,106 + ,0 + ,37 + ,48 + ,172 + ,89 + ,52789 + ,1813 + ,15673 + ,35 + ,35 + ,29 + ,969 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,2080 + ,242774 + ,75 + ,695 + ,53 + ,2 + ,62 + ,34 + ,125 + ,71 + ,100350 + ,17372 + ,75882 + ,80 + ,72) + ,dim=c(15 + ,164) + ,dimnames=list(c('#Pageviews' + ,'TimeRFC' + ,'#Logins' + ,'#CCviews' + ,'#Creviews' + ,'#Shared' + ,'#BloggedComputations' + ,'#ReviewedCompendiums' + ,'#submittedFBmessages' + ,'#Peerreviews+120' + ,'#Compendiumcharacters' + ,'#Compendiumrevisions' + ,'#secondscompendium' + ,'#includedhyperlinks' + ,'#includedblogs') + ,1:164)) > y <- array(NA,dim=c(15,164),dimnames=list(c('#Pageviews','TimeRFC','#Logins','#CCviews','#Creviews','#Shared','#BloggedComputations','#ReviewedCompendiums','#submittedFBmessages','#Peerreviews+120','#Compendiumcharacters','#Compendiumrevisions','#secondscompendium','#includedhyperlinks','#includedblogs'),1:164)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par4 = 'no' > par3 = '0' > par2 = 'none' > par1 = '2' > library(party) Loading required package: survival Loading required package: splines Loading required package: grid Loading required package: modeltools Loading required package: stats4 Loading required package: coin Loading required package: mvtnorm Loading required package: zoo Loading required package: sandwich Loading required package: strucchange Loading required package: vcd Loading required package: MASS Loading required package: colorspace > library(Hmisc) Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > par1 <- as.numeric(par1) > par3 <- as.numeric(par3) > x <- data.frame(t(y)) > is.data.frame(x) [1] TRUE > x <- x[!is.na(x[,par1]),] > k <- length(x[1,]) > n <- length(x[,1]) > colnames(x)[par1] [1] "TimeRFC" > x[,par1] [1] 279055 212450 233939 222117 189911 70849 605767 33186 227332 267925 [11] 372083 279589 212638 368577 269455 402600 335735 432711 185822 267365 [21] 279452 527853 227252 200004 257239 271341 324969 349753 200723 399591 [31] 327660 269239 397689 130446 430118 273950 429837 254312 120351 395658 [41] 349119 220517 234780 191784 186112 459665 78800 259887 368086 230299 [51] 256033 24188 400109 65029 101097 319020 375638 375011 387748 280106 [61] 400971 322780 291391 295075 280018 267432 217181 258166 277891 192894 [71] 271853 73566 276269 242619 230030 371391 398698 243355 233519 219936 [81] 206169 483429 146100 295224 80953 217384 179344 416097 395041 180679 [91] 311447 292260 199481 282361 329281 234577 310685 352078 416463 429565 [101] 297080 331792 242507 43287 238089 285479 310383 321797 193926 175737 [111] 354041 303566 23668 196743 61857 217543 440711 21054 252805 31961 [121] 360436 251948 187320 180842 38214 289296 358276 211775 447335 348017 [131] 441946 215177 140328 318092 466139 162406 417354 178322 292443 283913 [141] 253950 389698 246963 173260 346748 188437 279125 314070 1 14688 [151] 98 455 0 0 291847 415839 0 203 7199 46660 [161] 17547 121550 969 242774 > if (par2 == 'kmeans') { + cl <- kmeans(x[,par1], par3) + print(cl) + clm <- matrix(cbind(cl$centers,1:par3),ncol=2) + clm <- clm[sort.list(clm[,1]),] + for (i in 1:par3) { + cl$cluster[cl$cluster==clm[i,2]] <- paste('C',i,sep='') + } + cl$cluster <- as.factor(cl$cluster) + print(cl$cluster) + x[,par1] <- cl$cluster + } > if (par2 == 'quantiles') { + x[,par1] <- cut2(x[,par1],g=par3) + } > if (par2 == 'hclust') { + hc <- hclust(dist(x[,par1])^2, 'cen') + print(hc) + memb <- cutree(hc, k = par3) + dum <- c(mean(x[memb==1,par1])) + for (i in 2:par3) { + dum <- c(dum, mean(x[memb==i,par1])) + } + hcm <- matrix(cbind(dum,1:par3),ncol=2) + hcm <- hcm[sort.list(hcm[,1]),] + for (i in 1:par3) { + memb[memb==hcm[i,2]] <- paste('C',i,sep='') + } + memb <- as.factor(memb) + print(memb) + x[,par1] <- memb + } > if (par2=='equal') { + ed <- cut(as.numeric(x[,par1]),par3,labels=paste('C',1:par3,sep='')) + x[,par1] <- as.factor(ed) + } > table(x[,par1]) 0 1 98 203 455 969 7199 14688 17547 21054 23668 3 1 1 1 1 1 1 1 1 1 1 24188 31961 33186 38214 43287 46660 61857 65029 70849 73566 78800 1 1 1 1 1 1 1 1 1 1 1 80953 101097 120351 121550 130446 140328 146100 162406 173260 175737 178322 1 1 1 1 1 1 1 1 1 1 1 179344 180679 180842 185822 186112 187320 188437 189911 191784 192894 193926 1 1 1 1 1 1 1 1 1 1 1 196743 199481 200004 200723 206169 211775 212450 212638 215177 217181 217384 1 1 1 1 1 1 1 1 1 1 1 217543 219936 220517 222117 227252 227332 230030 230299 233519 233939 234577 1 1 1 1 1 1 1 1 1 1 1 234780 238089 242507 242619 242774 243355 246963 251948 252805 253950 254312 1 1 1 1 1 1 1 1 1 1 1 256033 257239 258166 259887 267365 267432 267925 269239 269455 271341 271853 1 1 1 1 1 1 1 1 1 1 1 273950 276269 277891 279055 279125 279452 279589 280018 280106 282361 283913 1 1 1 1 1 1 1 1 1 1 1 285479 289296 291391 291847 292260 292443 295075 295224 297080 303566 310383 1 1 1 1 1 1 1 1 1 1 1 310685 311447 314070 318092 319020 321797 322780 324969 327660 329281 331792 1 1 1 1 1 1 1 1 1 1 1 335735 346748 348017 349119 349753 352078 354041 358276 360436 368086 368577 1 1 1 1 1 1 1 1 1 1 1 371391 372083 375011 375638 387748 389698 395041 395658 397689 398698 399591 1 1 1 1 1 1 1 1 1 1 1 400109 400971 402600 415839 416097 416463 417354 429565 429837 430118 432711 1 1 1 1 1 1 1 1 1 1 1 440711 441946 447335 459665 466139 483429 527853 605767 1 1 1 1 1 1 1 1 > colnames(x) [1] "X.Pageviews" "TimeRFC" "X.Logins" [4] "X.CCviews" "X.Creviews" "X.Shared" [7] "X.BloggedComputations" "X.ReviewedCompendiums" "X.submittedFBmessages" [10] "X.Peerreviews.120" "X.Compendiumcharacters" "X.Compendiumrevisions" [13] "X.secondscompendium" "X.includedhyperlinks" "X.includedblogs" > colnames(x)[par1] [1] "TimeRFC" > x[,par1] [1] 279055 212450 233939 222117 189911 70849 605767 33186 227332 267925 [11] 372083 279589 212638 368577 269455 402600 335735 432711 185822 267365 [21] 279452 527853 227252 200004 257239 271341 324969 349753 200723 399591 [31] 327660 269239 397689 130446 430118 273950 429837 254312 120351 395658 [41] 349119 220517 234780 191784 186112 459665 78800 259887 368086 230299 [51] 256033 24188 400109 65029 101097 319020 375638 375011 387748 280106 [61] 400971 322780 291391 295075 280018 267432 217181 258166 277891 192894 [71] 271853 73566 276269 242619 230030 371391 398698 243355 233519 219936 [81] 206169 483429 146100 295224 80953 217384 179344 416097 395041 180679 [91] 311447 292260 199481 282361 329281 234577 310685 352078 416463 429565 [101] 297080 331792 242507 43287 238089 285479 310383 321797 193926 175737 [111] 354041 303566 23668 196743 61857 217543 440711 21054 252805 31961 [121] 360436 251948 187320 180842 38214 289296 358276 211775 447335 348017 [131] 441946 215177 140328 318092 466139 162406 417354 178322 292443 283913 [141] 253950 389698 246963 173260 346748 188437 279125 314070 1 14688 [151] 98 455 0 0 291847 415839 0 203 7199 46660 [161] 17547 121550 969 242774 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > if (par2 != 'none') { + m <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data = x) + if (par4=='yes') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'10-Fold Cross Validation',3+2*par3,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + a<-table.element(a,'Prediction (training)',par3+1,TRUE) + a<-table.element(a,'Prediction (testing)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Actual',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + a<-table.row.end(a) + for (i in 1:10) { + ind <- sample(2, nrow(x), replace=T, prob=c(0.9,0.1)) + m.ct <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data =x[ind==1,]) + if (i==1) { + m.ct.i.pred <- predict(m.ct, newdata=x[ind==1,]) + m.ct.i.actu <- x[ind==1,par1] + m.ct.x.pred <- predict(m.ct, newdata=x[ind==2,]) + m.ct.x.actu <- x[ind==2,par1] + } else { + m.ct.i.pred <- c(m.ct.i.pred,predict(m.ct, newdata=x[ind==1,])) + m.ct.i.actu <- c(m.ct.i.actu,x[ind==1,par1]) + m.ct.x.pred <- c(m.ct.x.pred,predict(m.ct, newdata=x[ind==2,])) + m.ct.x.actu <- c(m.ct.x.actu,x[ind==2,par1]) + } + } + print(m.ct.i.tab <- table(m.ct.i.actu,m.ct.i.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.i.tab[i,i] / sum(m.ct.i.tab[i,])) + numer <- numer + m.ct.i.tab[i,i] + } + print(m.ct.i.cp <- numer / sum(m.ct.i.tab)) + print(m.ct.x.tab <- table(m.ct.x.actu,m.ct.x.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.x.tab[i,i] / sum(m.ct.x.tab[i,])) + numer <- numer + m.ct.x.tab[i,i] + } + print(m.ct.x.cp <- numer / sum(m.ct.x.tab)) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (jjj in 1:par3) a<-table.element(a,m.ct.i.tab[i,jjj]) + a<-table.element(a,round(m.ct.i.tab[i,i]/sum(m.ct.i.tab[i,]),4)) + for (jjj in 1:par3) a<-table.element(a,m.ct.x.tab[i,jjj]) + a<-table.element(a,round(m.ct.x.tab[i,i]/sum(m.ct.x.tab[i,]),4)) + a<-table.row.end(a) + } + a<-table.row.start(a) + a<-table.element(a,'Overall',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.i.cp,4)) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.x.cp,4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/1ga4y1324679700.tab") + } + } > m Conditional inference tree with 10 terminal nodes Response: TimeRFC Inputs: X.Pageviews, X.Logins, X.CCviews, X.Creviews, X.Shared, X.BloggedComputations, X.ReviewedCompendiums, X.submittedFBmessages, X.Peerreviews.120, X.Compendiumcharacters, X.Compendiumrevisions, X.secondscompendium, X.includedhyperlinks, X.includedblogs Number of observations: 164 1) X.Pageviews <= 1380; criterion = 1, statistic = 135.728 2) X.Pageviews <= 602; criterion = 1, statistic = 27.434 3) X.secondscompendium <= 4245; criterion = 1, statistic = 17.326 4)* weights = 9 3) X.secondscompendium > 4245 5)* weights = 11 2) X.Pageviews > 602 6)* weights = 10 1) X.Pageviews > 1380 7) X.Pageviews <= 3230; criterion = 1, statistic = 82.032 8) X.secondscompendium <= 134969; criterion = 1, statistic = 47.273 9) X.Pageviews <= 2150; criterion = 1, statistic = 28.27 10) X.secondscompendium <= 72558; criterion = 0.988, statistic = 11.11 11)* weights = 7 10) X.secondscompendium > 72558 12)* weights = 26 9) X.Pageviews > 2150 13)* weights = 41 8) X.secondscompendium > 134969 14) X.Pageviews <= 2222; criterion = 0.994, statistic = 12.261 15)* weights = 8 14) X.Pageviews > 2222 16)* weights = 20 7) X.Pageviews > 3230 17) X.CCviews <= 1410; criterion = 0.983, statistic = 10.47 18)* weights = 21 17) X.CCviews > 1410 19)* weights = 11 > postscript(file="/var/www/rcomp/tmp/2wuz91324679700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(m) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3g3ko1324679700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,par1] ~ as.factor(where(m)),main='Response by Terminal Node',xlab='Terminal Node',ylab='Response') > dev.off() null device 1 > if (par2 == 'none') { + forec <- predict(m) + result <- as.data.frame(cbind(x[,par1],forec,x[,par1]-forec)) + colnames(result) <- c('Actuals','Forecasts','Residuals') + print(result) + } Actuals Forecasts Residuals 1 279055 270787.8750 8267.12500 2 212450 216377.5769 -3927.57692 3 233939 216377.5769 17561.42308 4 222117 268631.0732 -46514.07317 5 189911 216377.5769 -26466.57692 6 70849 98874.1000 -28025.10000 7 605767 446472.0000 159295.00000 8 33186 32391.8182 794.18182 9 227332 216377.5769 10954.42308 10 267925 216377.5769 51547.42308 11 372083 339876.7500 32206.25000 12 279589 268631.0732 10957.92683 13 212638 216377.5769 -3739.57692 14 368577 268631.0732 99945.92683 15 269455 268631.0732 823.92683 16 402600 446472.0000 -43872.00000 17 335735 339876.7500 -4141.75000 18 432711 381241.4286 51469.57143 19 185822 216377.5769 -30555.57692 20 267365 268631.0732 -1266.07317 21 279452 339876.7500 -60424.75000 22 527853 446472.0000 81381.00000 23 227252 216377.5769 10874.42308 24 200004 216377.5769 -16373.57692 25 257239 381241.4286 -124002.42857 26 271341 268631.0732 2709.92683 27 324969 339876.7500 -14907.75000 28 349753 339876.7500 9876.25000 29 200723 176306.1429 24416.85714 30 399591 381241.4286 18349.57143 31 327660 339876.7500 -12216.75000 32 269239 268631.0732 607.92683 33 397689 339876.7500 57812.25000 34 130446 98874.1000 31571.90000 35 430118 381241.4286 48876.57143 36 273950 268631.0732 5318.92683 37 429837 381241.4286 48595.57143 38 254312 216377.5769 37934.42308 39 120351 98874.1000 21476.90000 40 395658 381241.4286 14416.57143 41 349119 446472.0000 -97353.00000 42 220517 216377.5769 4139.42308 43 234780 216377.5769 18402.42308 44 191784 176306.1429 15477.85714 45 186112 268631.0732 -82519.07317 46 459665 446472.0000 13193.00000 47 78800 98874.1000 -20074.10000 48 259887 268631.0732 -8744.07317 49 368086 381241.4286 -13155.42857 50 230299 268631.0732 -38332.07317 51 256033 270787.8750 -14754.87500 52 24188 32391.8182 -8203.81818 53 400109 339876.7500 60232.25000 54 65029 98874.1000 -33845.10000 55 101097 98874.1000 2222.90000 56 319020 381241.4286 -62221.42857 57 375638 339876.7500 35761.25000 58 375011 381241.4286 -6230.42857 59 387748 339876.7500 47871.25000 60 280106 268631.0732 11474.92683 61 400971 381241.4286 19729.57143 62 322780 381241.4286 -58461.42857 63 291391 268631.0732 22759.92683 64 295075 268631.0732 26443.92683 65 280018 270787.8750 9230.12500 66 267432 270787.8750 -3355.87500 67 217181 216377.5769 803.42308 68 258166 268631.0732 -10465.07317 69 277891 268631.0732 9259.92683 70 192894 216377.5769 -23483.57692 71 271853 268631.0732 3221.92683 72 73566 98874.1000 -25308.10000 73 276269 268631.0732 7637.92683 74 242619 268631.0732 -26012.07317 75 230030 268631.0732 -38601.07317 76 371391 268631.0732 102759.92683 77 398698 381241.4286 17456.57143 78 243355 270787.8750 -27432.87500 79 233519 268631.0732 -35112.07317 80 219936 216377.5769 3558.42308 81 206169 216377.5769 -10208.57692 82 483429 381241.4286 102187.57143 83 146100 98874.1000 47225.90000 84 295224 339876.7500 -44652.75000 85 80953 98874.1000 -17921.10000 86 217384 268631.0732 -51247.07317 87 179344 216377.5769 -37033.57692 88 416097 446472.0000 -30375.00000 89 395041 381241.4286 13799.57143 90 180679 268631.0732 -87952.07317 91 311447 268631.0732 42815.92683 92 292260 268631.0732 23628.92683 93 199481 216377.5769 -16896.57692 94 282361 268631.0732 13729.92683 95 329281 339876.7500 -10595.75000 96 234577 216377.5769 18199.42308 97 310685 339876.7500 -29191.75000 98 352078 339876.7500 12201.25000 99 416463 381241.4286 35221.57143 100 429565 446472.0000 -16907.00000 101 297080 268631.0732 28448.92683 102 331792 339876.7500 -8084.75000 103 242507 268631.0732 -26124.07317 104 43287 32391.8182 10895.18182 105 238089 268631.0732 -30542.07317 106 285479 339876.7500 -54397.75000 107 310383 268631.0732 41751.92683 108 321797 339876.7500 -18079.75000 109 193926 270787.8750 -76861.87500 110 175737 381241.4286 -205504.42857 111 354041 270787.8750 83253.12500 112 303566 268631.0732 34934.92683 113 23668 32391.8182 -8723.81818 114 196743 268631.0732 -71888.07317 115 61857 32391.8182 29465.18182 116 217543 216377.5769 1165.42308 117 440711 381241.4286 59469.57143 118 21054 32391.8182 -11337.81818 119 252805 216377.5769 36427.42308 120 31961 32391.8182 -430.81818 121 360436 381241.4286 -20805.42857 122 251948 268631.0732 -16683.07317 123 187320 176306.1429 11013.85714 124 180842 216377.5769 -35535.57692 125 38214 32391.8182 5822.18182 126 289296 268631.0732 20664.92683 127 358276 339876.7500 18399.25000 128 211775 216377.5769 -4602.57692 129 447335 446472.0000 863.00000 130 348017 339876.7500 8140.25000 131 441946 381241.4286 60704.57143 132 215177 216377.5769 -1200.57692 133 140328 176306.1429 -35978.14286 134 318092 268631.0732 49460.92683 135 466139 446472.0000 19667.00000 136 162406 176306.1429 -13900.14286 137 417354 446472.0000 -29118.00000 138 178322 176306.1429 2015.85714 139 292443 270787.8750 21655.12500 140 283913 268631.0732 15281.92683 141 253950 268631.0732 -14681.07317 142 389698 446472.0000 -56774.00000 143 246963 268631.0732 -21668.07317 144 173260 176306.1429 -3046.14286 145 346748 381241.4286 -34493.42857 146 188437 216377.5769 -27940.57692 147 279125 268631.0732 10493.92683 148 314070 339876.7500 -25806.75000 149 1 991.6667 -990.66667 150 14688 32391.8182 -17703.81818 151 98 991.6667 -893.66667 152 455 991.6667 -536.66667 153 0 991.6667 -991.66667 154 0 991.6667 -991.66667 155 291847 268631.0732 23215.92683 156 415839 381241.4286 34597.57143 157 0 991.6667 -991.66667 158 203 991.6667 -788.66667 159 7199 991.6667 6207.33333 160 46660 32391.8182 14268.18182 161 17547 32391.8182 -14844.81818 162 121550 98874.1000 22675.90000 163 969 991.6667 -22.66667 164 242774 216377.5769 26396.42308 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/www/rcomp/tmp/4heed1324679700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if(par2=='none') { + op <- par(mfrow=c(2,2)) + plot(density(result$Actuals),main='Kernel Density Plot of Actuals') + plot(density(result$Residuals),main='Kernel Density Plot of Residuals') + plot(result$Forecasts,result$Actuals,main='Actuals versus Predictions',xlab='Predictions',ylab='Actuals') + plot(density(result$Forecasts),main='Kernel Density Plot of Predictions') + par(op) + } > if(par2!='none') { + plot(myt,main='Confusion Matrix',xlab='Actual',ylab='Predicted') + } > dev.off() null device 1 > if (par2 == 'none') { + detcoef <- cor(result$Forecasts,result$Actuals) + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goodness of Fit',2,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Correlation',1,TRUE) + a<-table.element(a,round(detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'R-squared',1,TRUE) + a<-table.element(a,round(detcoef*detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'RMSE',1,TRUE) + a<-table.element(a,round(sqrt(mean((result$Residuals)^2)),4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/56id61324679700.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Actuals, Predictions, and Residuals',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'#',header=TRUE) + a<-table.element(a,'Actuals',header=TRUE) + a<-table.element(a,'Forecasts',header=TRUE) + a<-table.element(a,'Residuals',header=TRUE) + a<-table.row.end(a) + for (i in 1:length(result$Actuals)) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,result$Actuals[i]) + a<-table.element(a,result$Forecasts[i]) + a<-table.element(a,result$Residuals[i]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/685fh1324679700.tab") + } > if (par2 != 'none') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Confusion Matrix (predicted in columns / actuals in rows)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + for (i in 1:par3) { + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + } + a<-table.row.end(a) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (j in 1:par3) { + a<-table.element(a,myt[i,j]) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/7cud01324679700.tab") + } > > try(system("convert tmp/2wuz91324679700.ps tmp/2wuz91324679700.png",intern=TRUE)) character(0) > try(system("convert tmp/3g3ko1324679700.ps tmp/3g3ko1324679700.png",intern=TRUE)) character(0) > try(system("convert tmp/4heed1324679700.ps tmp/4heed1324679700.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.370 0.140 4.534