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(1724 + ,270018 + ,69 + ,476 + ,90 + ,3 + ,96 + ,38 + ,144 + ,116 + ,140824 + ,32033 + ,186099 + ,165 + ,165 + ,1209 + ,179444 + ,64 + ,429 + ,63 + ,4 + ,71 + ,34 + ,133 + ,127 + ,110459 + ,20654 + ,113854 + ,135 + ,132 + ,1844 + ,222373 + ,69 + ,673 + ,59 + ,16 + ,70 + ,42 + ,162 + ,106 + ,105079 + ,16346 + ,99776 + ,121 + ,121 + ,2683 + ,218443 + ,104 + ,1137 + ,135 + ,2 + ,134 + ,38 + ,148 + ,133 + ,112098 + ,35926 + ,106194 + ,148 + ,145 + ,1149 + ,162874 + ,51 + ,348 + ,48 + ,1 + ,61 + ,27 + ,88 + ,64 + ,43929 + ,10621 + ,100792 + ,73 + ,71 + ,631 + ,70849 + ,28 + ,179 + ,46 + ,3 + ,8 + ,35 + ,129 + ,89 + ,76173 + ,10024 + ,47552 + ,49 + ,47 + ,4513 + ,498732 + ,117 + ,2201 + ,109 + ,0 + ,149 + ,33 + ,128 + ,122 + ,187326 + ,43068 + ,250931 + ,185 + ,177 + ,381 + ,33186 + ,19 + ,111 + ,46 + ,0 + ,1 + ,18 + ,67 + ,22 + ,22807 + ,1271 + ,6853 + ,5 + ,5 + ,1997 + ,207822 + ,57 + ,735 + ,75 + ,7 + ,74 + ,34 + ,132 + ,117 + ,144408 + ,34416 + ,115466 + ,125 + ,124 + ,1758 + ,213274 + ,44 + ,595 + ,72 + ,0 + ,82 + ,33 + ,120 + ,82 + ,66485 + ,20318 + ,110896 + ,93 + ,92 + ,2064 + ,296074 + ,107 + ,776 + ,79 + ,0 + ,92 + ,43 + ,158 + ,139 + ,79089 + ,24409 + ,169351 + ,154 + ,149 + ,2128 + ,237633 + ,114 + ,660 + ,61 + ,7 + ,117 + ,55 + ,210 + ,184 + ,81625 + ,20648 + ,94853 + ,98 + ,93 + ,1659 + ,164107 + ,67 + ,633 + ,60 + ,8 + ,50 + ,37 + ,122 + ,113 + ,68788 + ,12347 + ,72591 + ,70 + ,70 + ,2934 + ,358752 + ,77 + ,1163 + ,114 + ,4 + ,139 + ,52 + ,179 + ,162 + ,103297 + ,21857 + ,101345 + ,148 + ,148 + ,1944 + ,222781 + ,83 + ,622 + ,46 + ,10 + ,73 + ,43 + ,162 + ,87 + ,69446 + ,11034 + ,113713 + ,100 + ,100 + ,4763 + ,369889 + ,176 + ,1650 + ,127 + ,0 + ,168 + ,59 + ,223 + ,199 + ,114948 + ,33433 + ,165354 + ,150 + ,142 + ,2122 + ,305704 + ,68 + ,746 + ,58 + ,6 + ,113 + ,36 + ,140 + ,139 + ,167949 + ,35902 + ,164263 + ,197 + ,194 + ,2956 + ,322896 + ,157 + ,1157 + ,90 + ,4 + ,98 + ,39 + ,144 + ,92 + ,125081 + ,22355 + ,135213 + ,114 + ,113 + ,1438 + ,176082 + ,55 + ,507 + ,41 + ,3 + ,103 + ,29 + ,111 + ,85 + ,125818 + ,31219 + ,111669 + ,169 + ,162 + ,2320 + ,263411 + ,85 + ,683 + ,62 + ,8 + ,135 + ,49 + ,191 + ,185 + ,136588 + ,21983 + ,134163 + ,200 + ,186 + ,2471 + ,271965 + ,69 + ,828 + ,99 + ,0 + ,123 + ,45 + ,171 + ,148 + ,112431 + ,40085 + ,140303 + ,148 + ,147 + ,2769 + ,425544 + ,103 + ,1203 + ,101 + ,1 + ,86 + ,39 + ,144 + ,144 + ,103037 + ,18507 + ,150773 + ,140 + ,137 + ,1442 + ,179306 + ,41 + ,461 + ,62 + ,5 + ,66 + ,25 + ,89 + ,84 + ,82317 + ,16278 + ,111848 + ,74 + ,71 + ,1717 + ,189897 + ,54 + ,601 + ,65 + ,9 + ,103 + ,52 + ,208 + ,208 + ,118906 + ,24662 + ,102509 + ,128 + ,123 + ,3202 + ,219420 + ,114 + ,1196 + ,150 + ,1 + ,138 + ,41 + ,153 + ,144 + ,83515 + ,31452 + ,96785 + ,140 + ,134 + ,2592 + ,207280 + ,115 + ,960 + ,72 + ,0 + ,86 + ,38 + ,146 + ,139 + ,104581 + ,32580 + ,116136 + ,116 + ,115 + ,2824 + ,267198 + ,126 + ,1061 + ,91 + ,5 + ,99 + ,41 + ,158 + ,127 + ,103129 + ,22883 + ,158376 + ,147 + ,138 + ,1968 + ,270750 + ,85 + ,617 + ,73 + ,0 + ,117 + ,43 + ,154 + ,148 + ,83243 + ,27652 + ,153990 + ,132 + ,125 + ,1495 + ,155915 + ,51 + ,559 + ,53 + ,0 + ,57 + ,32 + ,117 + ,99 + ,37110 + ,9845 + ,64057 + ,70 + ,66 + ,2733 + ,327474 + ,64 + ,1026 + ,140 + ,0 + ,125 + ,41 + ,158 + ,135 + ,113344 + ,20190 + ,230054 + ,144 + ,137 + ,2272 + ,278019 + ,74 + ,908 + ,49 + ,3 + ,123 + ,45 + ,175 + ,165 + ,139165 + ,46201 + ,184531 + ,155 + ,152 + ,1830 + ,204039 + ,76 + ,615 + ,83 + ,6 + ,44 + ,49 + ,182 + ,146 + ,86652 + ,10971 + ,114198 + ,165 + ,159 + ,2090 + ,318563 + ,83 + ,779 + ,53 + ,1 + ,133 + ,48 + ,185 + ,178 + ,112302 + ,34811 + ,198299 + ,161 + ,159 + ,945 + ,97717 + ,36 + ,310 + ,40 + ,4 + ,43 + ,37 + ,141 + ,137 + ,69652 + ,3029 + ,33750 + ,31 + ,31 + ,3092 + ,369331 + ,93 + ,1198 + ,72 + ,4 + ,132 + ,39 + ,151 + ,148 + ,119442 + ,38941 + ,189723 + ,199 + ,185 + ,2764 + ,273950 + ,56 + ,1186 + ,87 + ,0 + ,83 + ,42 + ,159 + ,127 + ,69867 + ,4958 + ,100826 + ,78 + ,78 + ,3657 + ,422946 + ,119 + ,1317 + ,74 + ,0 + ,112 + ,43 + ,158 + ,148 + ,101629 + ,32344 + ,188355 + ,121 + ,117 + ,1842 + ,215710 + ,82 + ,611 + ,67 + ,2 + ,79 + ,36 + ,139 + ,89 + ,70168 + ,19433 + ,104470 + ,112 + ,109 + ,934 + ,115469 + ,32 + ,276 + ,36 + ,1 + ,33 + ,17 + ,55 + ,46 + ,31081 + ,12558 + ,58391 + ,41 + ,41 + ,3315 + ,336047 + ,190 + ,1174 + ,45 + ,2 + ,124 + ,39 + ,151 + ,143 + ,103925 + ,36524 + ,164808 + ,158 + ,149 + ,3246 + ,324178 + ,79 + ,1490 + ,42 + ,10 + ,123 + ,39 + ,145 + ,122 + ,92622 + ,26041 + ,134097 + ,123 + ,123 + ,1578 + ,166266 + ,65 + ,623 + ,75 + ,9 + ,67 + ,41 + ,148 + ,111 + ,79011 + ,16637 + ,80238 + ,104 + ,103 + ,1735 + ,195153 + ,73 + ,635 + ,82 + ,5 + ,75 + ,36 + ,115 + ,108 + ,93487 + ,28395 + ,133252 + ,94 + ,87 + ,1714 + ,173510 + ,60 + ,470 + ,85 + ,6 + ,68 + ,42 + ,157 + ,126 + ,64520 + ,16747 + ,54518 + ,73 + ,71 + ,2496 + ,153778 + ,82 + ,1022 + ,82 + ,1 + ,50 + ,45 + ,73 + ,45 + ,93473 + ,9105 + ,121850 + ,52 + ,51 + ,5501 + ,455168 + ,151 + ,2068 + ,848 + ,2 + ,101 + ,41 + ,147 + ,131 + ,114360 + ,11941 + ,79367 + ,71 + ,70 + ,918 + ,78800 + ,42 + ,330 + ,57 + ,2 + ,20 + ,26 + ,82 + ,66 + ,33032 + ,7935 + ,56968 + ,21 + ,21 + ,2228 + ,208051 + ,76 + ,648 + ,80 + ,0 + ,101 + ,52 + ,201 + ,180 + ,96125 + ,19499 + ,106314 + ,155 + ,155 + ,3942 + ,334657 + ,116 + ,1342 + ,116 + ,10 + ,142 + ,47 + ,181 + ,165 + ,151911 + ,22938 + ,191889 + ,174 + ,172 + ,2081 + ,175523 + ,54 + ,868 + ,68 + ,3 + ,99 + ,45 + ,164 + ,146 + ,89256 + ,25314 + ,104864 + ,136 + ,133 + ,1816 + ,213060 + ,73 + ,559 + ,48 + ,0 + ,94 + ,40 + ,158 + ,137 + ,95671 + ,28524 + ,160791 + ,128 + ,125 + ,496 + ,24188 + ,24 + ,218 + ,20 + ,0 + ,8 + ,4 + ,12 + ,7 + ,5950 + ,2694 + ,15049 + ,7 + ,7 + ,2531 + ,372238 + ,308 + ,833 + ,81 + ,8 + ,85 + ,44 + ,163 + ,157 + ,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 + ,3027 + ,279012 + ,58 + ,1108 + ,125 + ,1 + ,97 + ,37 + ,134 + ,120 + ,100087 + ,32982 + ,129711 + ,137 + ,133 + ,2433 + ,302218 + ,84 + ,642 + ,80 + ,5 + ,122 + ,56 + ,210 + ,208 + ,169707 + ,38975 + ,210012 + ,174 + ,169 + ,3574 + ,323485 + ,179 + ,1079 + ,220 + ,5 + ,115 + ,39 + ,145 + ,137 + ,150491 + ,42721 + ,194679 + ,257 + ,256 + ,2606 + ,339837 + ,138 + ,1046 + ,63 + ,0 + ,148 + ,42 + ,153 + ,150 + ,120192 + ,41455 + ,197680 + ,207 + ,190 + ,2175 + ,252529 + ,83 + ,822 + ,77 + ,12 + ,89 + ,36 + ,139 + ,127 + ,95893 + ,23923 + ,81180 + ,103 + ,100 + ,3937 + ,370483 + ,139 + ,1298 + ,65 + ,10 + ,154 + ,46 + ,178 + ,161 + ,151715 + ,26719 + ,197765 + ,171 + ,171 + ,3161 + ,303406 + ,117 + ,1143 + ,146 + ,12 + ,139 + ,28 + ,101 + ,73 + ,176225 + ,53405 + ,214738 + ,279 + ,267 + ,2670 + ,233632 + ,106 + ,1073 + ,72 + ,11 + ,77 + ,43 + ,169 + ,97 + ,59900 + ,12526 + ,96252 + ,83 + ,80 + ,2610 + ,264889 + ,88 + ,931 + ,59 + ,8 + ,92 + ,42 + ,163 + ,142 + ,104767 + ,26584 + ,124527 + ,130 + ,126 + ,1426 + ,228595 + ,66 + ,557 + ,58 + ,2 + ,52 + ,37 + ,139 + ,125 + ,114799 + ,37062 + ,153242 + ,131 + ,132 + ,1646 + ,216027 + ,65 + ,436 + ,58 + ,0 + ,96 + ,30 + ,116 + ,87 + ,72128 + ,25696 + ,145707 + ,126 + ,121 + ,1855 + ,187965 + ,127 + ,562 + ,54 + ,6 + ,79 + ,35 + ,137 + ,128 + ,143592 + ,24634 + ,113963 + ,158 + ,156 + ,2712 + ,237323 + ,144 + ,824 + ,89 + ,9 + ,85 + ,44 + ,167 + ,148 + ,89626 + ,27269 + ,134904 + ,138 + ,133 + ,2277 + ,232765 + ,78 + ,834 + ,78 + ,2 + ,135 + ,36 + ,135 + ,116 + ,131072 + ,25270 + ,114268 + ,200 + ,199 + ,1675 + ,175699 + ,68 + ,621 + ,62 + ,5 + ,143 + ,28 + ,102 + ,89 + ,126817 + ,24634 + ,94333 + ,104 + ,98 + ,2537 + ,239314 + ,68 + ,865 + ,64 + ,13 + ,99 + ,45 + ,173 + ,154 + ,81351 + ,17828 + ,102204 + ,111 + ,109 + ,893 + ,73566 + ,32 + ,385 + ,39 + ,6 + ,22 + ,23 + ,88 + ,67 + ,22618 + ,3007 + ,23824 + ,26 + ,25 + ,2189 + ,242585 + ,83 + ,716 + ,58 + ,7 + ,78 + ,45 + ,175 + ,171 + ,88977 + ,20065 + ,111563 + ,115 + ,113 + ,1694 + ,187167 + ,52 + ,705 + ,94 + ,2 + ,79 + ,38 + ,133 + ,90 + ,92059 + ,24648 + ,91313 + ,127 + ,126 + ,1948 + ,191920 + ,62 + ,683 + ,61 + ,1 + ,127 + ,38 + ,148 + ,133 + ,81897 + ,21588 + ,89770 + ,140 + ,137 + ,2314 + ,359644 + ,84 + ,982 + ,95 + ,4 + ,140 + ,45 + ,166 + ,143 + ,108146 + ,25217 + ,100125 + ,121 + ,121 + ,2645 + ,341637 + ,90 + ,1056 + ,48 + ,3 + ,130 + ,36 + ,140 + ,133 + ,126372 + ,30927 + ,165278 + ,183 + ,178 + ,1804 + ,206059 + ,106 + ,522 + ,50 + ,6 + ,78 + ,41 + ,154 + ,125 + ,249771 + ,18487 + ,181712 + ,68 + ,63 + ,2250 + ,201783 + ,61 + ,690 + ,58 + ,2 + ,133 + ,38 + ,148 + ,134 + ,71154 + ,18050 + ,80906 + ,112 + ,109 + ,1787 + ,182231 + ,64 + ,644 + ,67 + ,0 + ,83 + ,37 + ,134 + ,110 + ,71571 + ,17696 + ,75881 + ,103 + ,101 + ,1678 + ,153613 + ,46 + ,622 + ,41 + ,1 + ,62 + ,28 + ,109 + ,89 + ,55918 + ,17326 + ,83963 + ,63 + ,61 + ,3843 + ,447353 + ,115 + ,1216 + ,114 + ,0 + ,147 + ,45 + ,175 + ,138 + ,160141 + ,39361 + ,175721 + ,166 + ,157 + ,1369 + ,145943 + ,69 + ,653 + ,45 + ,5 + ,30 + ,26 + ,99 + ,99 + ,38692 + ,9648 + ,68580 + ,38 + ,38 + ,2306 + ,280343 + ,103 + ,656 + ,57 + ,2 + ,117 + ,44 + ,122 + ,92 + ,102812 + ,26759 + ,136323 + ,163 + ,159 + ,870 + ,80953 + ,25 + ,437 + ,31 + ,0 + ,49 + ,8 + ,28 + ,27 + ,56622 + ,7905 + ,55792 + ,59 + ,58 + ,1966 + ,150216 + ,54 + ,822 + ,175 + ,0 + ,52 + ,27 + ,101 + ,77 + ,15986 + ,4527 + ,25157 + ,27 + ,27 + ,1337 + ,156923 + ,57 + ,390 + ,68 + ,6 + ,71 + ,36 + ,132 + ,130 + ,123534 + ,41517 + ,100922 + ,108 + ,108 + ,3727 + ,365370 + ,195 + ,1467 + ,278 + ,1 + ,72 + ,37 + ,143 + ,137 + ,108535 + ,21261 + ,118845 + ,88 + ,83 + ,2616 + ,318651 + ,112 + ,907 + ,91 + ,0 + ,130 + ,57 + ,206 + ,122 + ,93879 + ,36099 + ,170492 + ,92 + ,88 + ,3085 + ,179797 + ,104 + ,1044 + ,72 + ,1 + ,165 + ,45 + ,171 + ,159 + ,144551 + ,39039 + ,81716 + ,170 + ,164 + ,2312 + ,251466 + ,89 + ,786 + ,58 + ,1 + ,76 + ,37 + ,138 + ,85 + ,56750 + ,13841 + ,115750 + ,98 + ,96 + ,2136 + ,254506 + ,75 + ,655 + ,71 + ,3 + ,160 + ,38 + ,141 + ,131 + ,127654 + ,23841 + ,105590 + ,205 + ,192 + ,1808 + ,185890 + ,62 + ,590 + ,86 + ,9 + ,48 + ,31 + ,114 + ,90 + ,65594 + ,8589 + ,92795 + ,96 + ,94 + ,2992 + ,263577 + ,74 + ,1072 + ,89 + ,1 + ,132 + ,36 + ,140 + ,135 + ,59938 + ,15049 + ,82390 + ,107 + ,107 + ,2474 + ,314255 + ,80 + ,947 + ,134 + ,4 + ,73 + ,36 + ,140 + ,132 + ,146975 + ,39038 + ,135599 + ,150 + ,144 + ,1624 + ,189252 + ,36 + ,555 + ,64 + ,3 + ,83 + ,36 + ,140 + ,139 + ,143372 + ,30391 + ,111542 + ,123 + ,123 + ,1606 + ,222504 + ,50 + ,552 + ,72 + ,5 + ,94 + ,35 + ,127 + ,127 + ,168553 + ,39932 + ,162519 + ,176 + ,170 + ,2091 + ,285198 + ,78 + ,771 + ,61 + ,0 + ,158 + ,39 + ,141 + ,104 + ,183500 + ,43840 + ,211381 + ,213 + ,210 + ,3845 + ,368878 + ,147 + ,1263 + ,126 + ,12 + ,151 + ,60 + ,231 + ,229 + ,165986 + ,43146 + ,189944 + ,208 + ,193 + ,3705 + ,397681 + ,108 + ,1415 + ,73 + ,13 + ,165 + ,30 + ,114 + ,106 + ,184923 + ,50099 + ,226168 + ,307 + ,297 + ,2676 + ,287015 + ,134 + ,846 + ,83 + ,8 + ,117 + ,51 + ,198 + ,176 + ,140358 + ,40312 + ,117495 + ,125 + ,125 + ,2295 + ,285330 + ,64 + ,838 + ,85 + ,0 + ,145 + ,41 + ,155 + ,130 + ,149959 + ,32616 + ,195894 + ,208 + ,204 + ,1997 + ,186856 + ,177 + ,640 + ,116 + ,0 + ,73 + ,36 + ,138 + ,59 + ,57224 + ,11338 + ,80684 + ,73 + ,70 + ,602 + ,43287 + ,14 + ,214 + ,43 + ,4 + ,13 + ,19 + ,71 + ,64 + ,43750 + ,7409 + ,19630 + ,49 + ,49 + ,2146 + ,185468 + ,80 + ,716 + ,85 + ,4 + ,89 + ,23 + ,84 + ,36 + ,48029 + ,18213 + ,88634 + ,82 + ,82 + ,2131 + ,219475 + ,139 + ,749 + ,72 + ,0 + ,92 + ,40 + ,151 + ,88 + ,104978 + ,45873 + ,139292 + ,206 + ,205 + ,2549 + ,259692 + ,47 + ,1140 + ,110 + ,0 + ,128 + ,40 + ,155 + ,125 + ,100046 + ,39844 + ,128602 + ,112 + ,111 + ,2649 + ,301614 + ,88 + ,1030 + ,55 + ,0 + ,169 + ,40 + ,150 + ,124 + ,101047 + ,28317 + ,135848 + ,139 + ,135 + ,1110 + ,121726 + ,67 + ,356 + ,44 + ,0 + ,28 + ,30 + ,112 + ,83 + ,197426 + ,24797 + ,178377 + ,60 + ,59 + ,3102 + ,154165 + ,88 + ,906 + ,79 + ,0 + ,116 + ,41 + ,161 + ,127 + ,160902 + ,7471 + ,106330 + ,70 + ,70 + ,1860 + ,306952 + ,67 + ,606 + ,58 + ,4 + ,76 + ,40 + ,149 + ,143 + ,147172 + ,27259 + ,178303 + ,112 + ,108 + ,2295 + ,297982 + ,87 + ,684 + ,70 + ,0 + ,147 + ,45 + ,164 + ,115 + ,109432 + ,23201 + ,116938 + ,142 + ,141 + ,398 + ,23623 + ,11 + ,156 + ,9 + ,0 + ,12 + ,1 + ,0 + ,0 + ,1168 + ,238 + ,5841 + ,11 + ,11 + ,2205 + ,195817 + ,73 + ,779 + ,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 + ,1596 + ,163766 + ,48 + ,457 + ,107 + ,0 + ,83 + ,45 + ,169 + ,119 + ,45724 + ,9935 + ,74151 + ,132 + ,101 + ,2949 + ,384053 + ,114 + ,1162 + ,63 + ,1 + ,135 + ,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 + ,3397 + ,311281 + ,113 + ,1211 + ,153 + ,3 + ,106 + ,39 + ,146 + ,137 + ,89506 + ,24347 + ,160501 + ,125 + ,119 + ,2089 + ,240153 + ,65 + ,696 + ,79 + ,7 + ,76 + ,48 + ,183 + ,163 + ,135356 + ,27111 + ,91502 + ,121 + ,118 + ,1638 + ,174892 + ,88 + ,485 + ,112 + ,13 + ,55 + ,48 + ,181 + ,146 + ,116066 + ,3938 + ,24469 + ,42 + ,41 + ,1685 + ,152043 + ,53 + ,670 + ,47 + ,3 + ,44 + ,29 + ,107 + ,84 + ,144244 + ,17416 + ,88229 + ,111 + ,107 + ,568 + ,38214 + ,34 + ,276 + ,52 + ,0 + ,16 + ,8 + ,27 + ,21 + ,8773 + ,1888 + ,13983 + ,16 + ,16 + ,1907 + ,198094 + ,40 + ,659 + ,113 + ,2 + ,66 + ,43 + ,163 + ,151 + ,102153 + ,18700 + ,80716 + ,70 + ,69 + ,2758 + ,353021 + ,81 + ,1010 + ,115 + ,0 + ,137 + ,52 + ,198 + ,187 + ,117440 + ,36809 + ,157384 + ,162 + ,160 + ,1288 + ,196269 + ,58 + ,445 + ,64 + ,0 + ,50 + ,53 + ,205 + ,171 + ,104128 + ,24959 + ,122975 + ,173 + ,158 + ,3554 + ,403932 + ,80 + ,1564 + ,134 + ,4 + ,137 + ,48 + ,187 + ,167 + ,134238 + ,37343 + ,191469 + ,171 + ,161 + ,2387 + ,316105 + ,97 + ,820 + ,120 + ,0 + ,154 + ,48 + ,187 + ,145 + ,134047 + ,21849 + ,231257 + ,172 + ,165 + ,3328 + ,396725 + ,123 + ,1151 + ,111 + ,3 + ,137 + ,50 + ,186 + ,175 + ,279488 + ,49809 + ,258287 + ,254 + ,246 + ,1250 + ,187992 + ,35 + ,473 + ,49 + ,0 + ,71 + ,40 + ,151 + ,137 + ,79756 + ,21654 + ,122531 + ,90 + ,89 + ,1121 + ,102424 + ,42 + ,401 + ,55 + ,0 + ,42 + ,36 + ,131 + ,100 + ,66089 + ,8728 + ,61394 + ,50 + ,49 + ,2862 + ,283950 + ,329 + ,947 + ,149 + ,4 + ,84 + ,40 + ,155 + ,150 + ,102070 + ,20920 + ,86480 + ,113 + ,107 + ,4023 + ,401260 + ,164 + ,1429 + ,155 + ,4 + ,103 + ,46 + ,172 + ,163 + ,146760 + ,27195 + ,195791 + ,187 + ,182 + ,1721 + ,137843 + ,52 + ,534 + ,104 + ,15 + ,63 + ,40 + ,152 + ,141 + ,154771 + ,1037 + ,18284 + ,16 + ,16 + ,4060 + ,383703 + ,130 + ,1698 + ,146 + ,0 + ,127 + ,46 + ,172 + ,161 + ,165933 + ,42570 + ,147581 + ,175 + ,173 + ,1830 + ,157429 + ,76 + ,689 + ,76 + ,4 + ,55 + ,39 + ,143 + ,112 + ,64593 + ,17672 + ,72558 + ,90 + ,90 + ,1627 + ,236370 + ,46 + ,528 + ,83 + ,1 + ,104 + ,41 + ,151 + ,135 + ,92280 + ,34245 + ,147341 + ,140 + ,140 + ,2535 + ,282399 + ,94 + ,897 + ,192 + ,1 + ,110 + ,46 + ,158 + ,124 + ,67150 + ,16786 + ,114651 + ,145 + ,142 + ,1807 + ,217478 + ,112 + ,610 + ,69 + ,0 + ,38 + ,32 + ,125 + ,45 + ,128692 + ,20954 + ,100187 + ,141 + ,126 + ,3873 + ,366774 + ,116 + ,1548 + ,117 + ,9 + ,95 + ,39 + ,145 + ,120 + ,124089 + ,16378 + ,130332 + ,125 + ,123 + ,2181 + ,236660 + ,88 + ,759 + ,67 + ,1 + ,121 + ,39 + ,145 + ,126 + ,125386 + ,31852 + ,134218 + ,241 + ,239 + ,2035 + ,173260 + ,63 + ,716 + ,37 + ,3 + ,41 + ,21 + ,79 + ,78 + ,37238 + ,2805 + ,10901 + ,16 + ,15 + ,2960 + ,323545 + ,99 + ,955 + ,56 + ,11 + ,145 + ,45 + ,174 + ,136 + ,140015 + ,38086 + ,145758 + ,175 + ,170 + ,1915 + ,168994 + ,57 + ,720 + ,122 + ,5 + ,147 + ,50 + ,192 + ,179 + ,150047 + ,21166 + ,75767 + ,132 + ,123 + ,2604 + ,246745 + ,86 + ,1011 + ,52 + ,2 + ,116 + ,36 + ,132 + ,118 + ,154451 + ,34672 + ,134969 + ,154 + ,151 + ,2633 + ,301703 + ,105 + ,818 + ,64 + ,1 + ,185 + ,44 + ,159 + ,147 + ,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 + ,2030 + ,233143 + ,83 + ,699 + ,58 + ,2 + ,65 + ,37 + ,133 + ,88 + ,84601 + ,19354 + ,105406 + ,125 + ,122 + ,3161 + ,368328 + ,145 + ,1049 + ,115 + ,3 + ,130 + ,47 + ,185 + ,115 + ,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 + ,474 + ,46660 + ,20 + ,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 + ,1047 + ,116678 + ,42 + ,285 + ,89 + ,0 + ,37 + ,43 + ,152 + ,76 + ,52789 + ,1813 + ,15673 + ,35 + ,35 + ,29 + ,969 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1757 + ,199726 + ,65 + ,580 + ,47 + ,2 + ,48 + ,32 + ,117 + ,66 + ,100350 + ,17372 + ,75882 + ,80 + ,72) + ,dim=c(15 + ,164) + ,dimnames=list(c('pageviews' + ,'timeinrfc' + ,'logins' + ,'compendiumviewsinfo' + ,'compendiumviewspr' + ,'sharedcompendiums' + ,'bloggedcomputations' + ,'compendiumsreviewed' + ,'feedbackmessagesp1' + ,'feedbackmessagesp120' + ,'totsize' + ,'totrevisions' + ,'totseconds' + ,'tothyperlinks' + ,'totblogs') + ,1:164)) > y <- array(NA,dim=c(15,164),dimnames=list(c('pageviews','timeinrfc','logins','compendiumviewsinfo','compendiumviewspr','sharedcompendiums','bloggedcomputations','compendiumsreviewed','feedbackmessagesp1','feedbackmessagesp120','totsize','totrevisions','totseconds','tothyperlinks','totblogs'),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 = '3' > par2 = 'none' > par1 = '11' > 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] "totsize" > x[,par1] [1] 140824 110459 105079 112098 43929 76173 187326 22807 144408 66485 [11] 79089 81625 68788 103297 69446 114948 167949 125081 125818 136588 [21] 112431 103037 82317 118906 83515 104581 103129 83243 37110 113344 [31] 139165 86652 112302 69652 119442 69867 101629 70168 31081 103925 [41] 92622 79011 93487 64520 93473 114360 33032 96125 151911 89256 [51] 95671 5950 149695 32551 31701 100087 169707 150491 120192 95893 [61] 151715 176225 59900 104767 114799 72128 143592 89626 131072 126817 [71] 81351 22618 88977 92059 81897 108146 126372 249771 71154 71571 [81] 55918 160141 38692 102812 56622 15986 123534 108535 93879 144551 [91] 56750 127654 65594 59938 146975 143372 168553 183500 165986 184923 [101] 140358 149959 57224 43750 48029 104978 100046 101047 197426 160902 [111] 147172 109432 1168 83248 25162 45724 110529 855 101382 14116 [121] 89506 135356 116066 144244 8773 102153 117440 104128 134238 134047 [131] 279488 79756 66089 102070 146760 154771 165933 64593 92280 67150 [141] 128692 124089 125386 37238 140015 150047 154451 156349 0 6023 [151] 0 0 0 0 84601 68946 0 0 1644 6179 [161] 3926 52789 0 100350 > 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 855 1168 1644 3926 5950 6023 6179 8773 14116 15986 8 1 1 1 1 1 1 1 1 1 1 22618 22807 25162 31081 31701 32551 33032 37110 37238 38692 43750 1 1 1 1 1 1 1 1 1 1 1 43929 45724 48029 52789 55918 56622 56750 57224 59900 59938 64520 1 1 1 1 1 1 1 1 1 1 1 64593 65594 66089 66485 67150 68788 68946 69446 69652 69867 70168 1 1 1 1 1 1 1 1 1 1 1 71154 71571 72128 76173 79011 79089 79756 81351 81625 81897 82317 1 1 1 1 1 1 1 1 1 1 1 83243 83248 83515 84601 86652 88977 89256 89506 89626 92059 92280 1 1 1 1 1 1 1 1 1 1 1 92622 93473 93487 93879 95671 95893 96125 100046 100087 100350 101047 1 1 1 1 1 1 1 1 1 1 1 101382 101629 102070 102153 102812 103037 103129 103297 103925 104128 104581 1 1 1 1 1 1 1 1 1 1 1 104767 104978 105079 108146 108535 109432 110459 110529 112098 112302 112431 1 1 1 1 1 1 1 1 1 1 1 113344 114360 114799 114948 116066 117440 118906 119442 120192 123534 124089 1 1 1 1 1 1 1 1 1 1 1 125081 125386 125818 126372 126817 127654 128692 131072 134047 134238 135356 1 1 1 1 1 1 1 1 1 1 1 136588 139165 140015 140358 140824 143372 143592 144244 144408 144551 146760 1 1 1 1 1 1 1 1 1 1 1 146975 147172 149695 149959 150047 150491 151715 151911 154451 154771 156349 1 1 1 1 1 1 1 1 1 1 1 160141 160902 165933 165986 167949 168553 169707 176225 183500 184923 187326 1 1 1 1 1 1 1 1 1 1 1 197426 249771 279488 1 1 1 > colnames(x) [1] "pageviews" "timeinrfc" "logins" [4] "compendiumviewsinfo" "compendiumviewspr" "sharedcompendiums" [7] "bloggedcomputations" "compendiumsreviewed" "feedbackmessagesp1" [10] "feedbackmessagesp120" "totsize" "totrevisions" [13] "totseconds" "tothyperlinks" "totblogs" > colnames(x)[par1] [1] "totsize" > x[,par1] [1] 140824 110459 105079 112098 43929 76173 187326 22807 144408 66485 [11] 79089 81625 68788 103297 69446 114948 167949 125081 125818 136588 [21] 112431 103037 82317 118906 83515 104581 103129 83243 37110 113344 [31] 139165 86652 112302 69652 119442 69867 101629 70168 31081 103925 [41] 92622 79011 93487 64520 93473 114360 33032 96125 151911 89256 [51] 95671 5950 149695 32551 31701 100087 169707 150491 120192 95893 [61] 151715 176225 59900 104767 114799 72128 143592 89626 131072 126817 [71] 81351 22618 88977 92059 81897 108146 126372 249771 71154 71571 [81] 55918 160141 38692 102812 56622 15986 123534 108535 93879 144551 [91] 56750 127654 65594 59938 146975 143372 168553 183500 165986 184923 [101] 140358 149959 57224 43750 48029 104978 100046 101047 197426 160902 [111] 147172 109432 1168 83248 25162 45724 110529 855 101382 14116 [121] 89506 135356 116066 144244 8773 102153 117440 104128 134238 134047 [131] 279488 79756 66089 102070 146760 154771 165933 64593 92280 67150 [141] 128692 124089 125386 37238 140015 150047 154451 156349 0 6023 [151] 0 0 0 0 84601 68946 0 0 1644 6179 [161] 3926 52789 0 100350 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/1uhxm1324146230.tab") + } + } > m Conditional inference tree with 7 terminal nodes Response: totsize Inputs: pageviews, timeinrfc, logins, compendiumviewsinfo, compendiumviewspr, sharedcompendiums, bloggedcomputations, compendiumsreviewed, feedbackmessagesp1, feedbackmessagesp120, totrevisions, totseconds, tothyperlinks, totblogs Number of observations: 164 1) totseconds <= 74151; criterion = 1, statistic = 102.666 2) feedbackmessagesp120 <= 78; criterion = 1, statistic = 29.419 3) tothyperlinks <= 13; criterion = 1, statistic = 20.262 4)* weights = 16 3) tothyperlinks > 13 5)* weights = 13 2) feedbackmessagesp120 > 78 6)* weights = 11 1) totseconds > 74151 7) totseconds <= 174586; criterion = 1, statistic = 41.371 8) totrevisions <= 20648; criterion = 1, statistic = 27.52 9)* weights = 33 8) totrevisions > 20648 10) tothyperlinks <= 174; criterion = 0.979, statistic = 10.025 11)* weights = 53 10) tothyperlinks > 174 12)* weights = 11 7) totseconds > 174586 13)* weights = 27 > postscript(file="/var/wessaorg/rcomp/tmp/2vzoy1324146230.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/wessaorg/rcomp/tmp/3boo71324146230.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 140824 156589.19 -15765.1852 2 110459 108419.55 2039.4528 3 105079 83722.76 21356.2424 4 112098 108419.55 3678.4528 5 43929 83722.76 -39793.7576 6 76173 72925.27 3247.7273 7 187326 156589.19 30736.8148 8 22807 3034.50 19772.5000 9 144408 108419.55 35988.4528 10 66485 83722.76 -17237.7576 11 79089 108419.55 -29330.5472 12 81625 83722.76 -2097.7576 13 68788 72925.27 -4137.2727 14 103297 108419.55 -5122.5472 15 69446 83722.76 -14276.7576 16 114948 108419.55 6528.4528 17 167949 140986.27 26962.7273 18 125081 108419.55 16661.4528 19 125818 108419.55 17398.4528 20 136588 140986.27 -4398.2727 21 112431 108419.55 4011.4528 22 103037 83722.76 19314.2424 23 82317 83722.76 -1405.7576 24 118906 108419.55 10486.4528 25 83515 108419.55 -24904.5472 26 104581 108419.55 -3838.5472 27 103129 108419.55 -5290.5472 28 83243 108419.55 -25176.5472 29 37110 72925.27 -35815.2727 30 113344 156589.19 -43245.1852 31 139165 156589.19 -17424.1852 32 86652 83722.76 2929.2424 33 112302 156589.19 -44287.1852 34 69652 72925.27 -3273.2727 35 119442 156589.19 -37147.1852 36 69867 83722.76 -13855.7576 37 101629 156589.19 -54960.1852 38 70168 83722.76 -13554.7576 39 31081 31186.08 -105.0769 40 103925 108419.55 -4494.5472 41 92622 108419.55 -15797.5472 42 79011 83722.76 -4711.7576 43 93487 108419.55 -14932.5472 44 64520 72925.27 -8405.2727 45 93473 83722.76 9750.2424 46 114360 83722.76 30637.2424 47 33032 31186.08 1845.9231 48 96125 83722.76 12402.2424 49 151911 156589.19 -4678.1852 50 89256 108419.55 -19163.5472 51 95671 108419.55 -12748.5472 52 5950 3034.50 2915.5000 53 149695 156589.19 -6894.1852 54 32551 31186.08 1364.9231 55 31701 31186.08 514.9231 56 100087 108419.55 -8332.5472 57 169707 156589.19 13117.8148 58 150491 156589.19 -6098.1852 59 120192 156589.19 -36397.1852 60 95893 108419.55 -12526.5472 61 151715 156589.19 -4874.1852 62 176225 156589.19 19635.8148 63 59900 83722.76 -23822.7576 64 104767 108419.55 -3652.5472 65 114799 108419.55 6379.4528 66 72128 108419.55 -36291.5472 67 143592 108419.55 35172.4528 68 89626 108419.55 -18793.5472 69 131072 140986.27 -9914.2727 70 126817 108419.55 18397.4528 71 81351 83722.76 -2371.7576 72 22618 31186.08 -8568.0769 73 88977 83722.76 5254.2424 74 92059 108419.55 -16360.5472 75 81897 108419.55 -26522.5472 76 108146 108419.55 -273.5472 77 126372 140986.27 -14614.2727 78 249771 156589.19 93181.8148 79 71154 83722.76 -12568.7576 80 71571 83722.76 -12151.7576 81 55918 83722.76 -27804.7576 82 160141 156589.19 3551.8148 83 38692 72925.27 -34233.2727 84 102812 108419.55 -5607.5472 85 56622 31186.08 25435.9231 86 15986 31186.08 -15200.0769 87 123534 108419.55 15114.4528 88 108535 108419.55 115.4528 89 93879 108419.55 -14540.5472 90 144551 108419.55 36131.4528 91 56750 83722.76 -26972.7576 92 127654 140986.27 -13332.2727 93 65594 83722.76 -18128.7576 94 59938 83722.76 -23784.7576 95 146975 108419.55 38555.4528 96 143372 108419.55 34952.4528 97 168553 140986.27 27566.7273 98 183500 156589.19 26910.8148 99 165986 156589.19 9396.8148 100 184923 156589.19 28333.8148 101 140358 108419.55 31938.4528 102 149959 156589.19 -6630.1852 103 57224 83722.76 -26498.7576 104 43750 31186.08 12563.9231 105 48029 83722.76 -35693.7576 106 104978 140986.27 -36008.2727 107 100046 108419.55 -8373.5472 108 101047 108419.55 -7372.5472 109 197426 156589.19 40836.8148 110 160902 83722.76 77179.2424 111 147172 156589.19 -9417.1852 112 109432 108419.55 1012.4528 113 1168 3034.50 -1866.5000 114 83248 108419.55 -25171.5472 115 25162 31186.08 -6024.0769 116 45724 72925.27 -27201.2727 117 110529 156589.19 -46060.1852 118 855 3034.50 -2179.5000 119 101382 83722.76 17659.2424 120 14116 31186.08 -17070.0769 121 89506 108419.55 -18913.5472 122 135356 108419.55 26936.4528 123 116066 72925.27 43140.7273 124 144244 83722.76 60521.2424 125 8773 31186.08 -22413.0769 126 102153 83722.76 18430.2424 127 117440 108419.55 9020.4528 128 104128 108419.55 -4291.5472 129 134238 156589.19 -22351.1852 130 134047 156589.19 -22542.1852 131 279488 156589.19 122898.8148 132 79756 108419.55 -28663.5472 133 66089 72925.27 -6836.2727 134 102070 108419.55 -6349.5472 135 146760 156589.19 -9829.1852 136 154771 72925.27 81845.7273 137 165933 140986.27 24946.7273 138 64593 72925.27 -8332.2727 139 92280 108419.55 -16139.5472 140 67150 83722.76 -16572.7576 141 128692 108419.55 20272.4528 142 124089 83722.76 40366.2424 143 125386 140986.27 -15600.2727 144 37238 31186.08 6051.9231 145 140015 140986.27 -971.2727 146 150047 108419.55 41627.4528 147 154451 108419.55 46031.4528 148 156349 140986.27 15362.7273 149 0 3034.50 -3034.5000 150 6023 3034.50 2988.5000 151 0 3034.50 -3034.5000 152 0 3034.50 -3034.5000 153 0 3034.50 -3034.5000 154 0 3034.50 -3034.5000 155 84601 83722.76 878.2424 156 68946 108419.55 -39473.5472 157 0 3034.50 -3034.5000 158 0 3034.50 -3034.5000 159 1644 3034.50 -1390.5000 160 6179 3034.50 3144.5000 161 3926 3034.50 891.5000 162 52789 31186.08 21602.9231 163 0 3034.50 -3034.5000 164 100350 83722.76 16627.2424 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/wessaorg/rcomp/tmp/4cou51324146230.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/wessaorg/rcomp/tmp/57kmk1324146230.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/wessaorg/rcomp/tmp/6n3x41324146230.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/wessaorg/rcomp/tmp/7ltz71324146230.tab") + } > > try(system("convert tmp/2vzoy1324146230.ps tmp/2vzoy1324146230.png",intern=TRUE)) character(0) > try(system("convert tmp/3boo71324146230.ps tmp/3boo71324146230.png",intern=TRUE)) character(0) > try(system("convert tmp/4cou51324146230.ps tmp/4cou51324146230.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.914 0.307 5.325