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(1587 + ,252101 + ,62 + ,438 + ,85 + ,3 + ,92 + ,34 + ,131 + ,104 + ,124252 + ,25695 + ,165119 + ,147 + ,148 + ,951 + ,134577 + ,59 + ,330 + ,58 + ,4 + ,58 + ,30 + ,117 + ,111 + ,98956 + ,19967 + ,107269 + ,126 + ,124 + ,1669 + ,198520 + ,62 + ,609 + ,51 + ,14 + ,62 + ,38 + ,146 + ,93 + ,98073 + ,14338 + ,93497 + ,108 + ,108 + ,2283 + ,189326 + ,94 + ,1015 + ,131 + ,2 + ,108 + ,34 + ,132 + ,119 + ,106816 + ,34117 + ,100269 + ,145 + ,142 + ,992 + ,137449 + ,43 + ,294 + ,44 + ,1 + ,55 + ,25 + ,80 + ,57 + ,41449 + ,9713 + ,91627 + ,68 + ,66 + ,577 + ,65295 + ,27 + ,164 + ,42 + ,3 + ,8 + ,31 + ,117 + ,80 + ,76173 + ,10024 + ,47552 + ,49 + ,47 + ,3916 + ,439387 + ,103 + ,1912 + ,94 + ,0 + ,134 + ,29 + ,112 + ,107 + ,177551 + ,39981 + ,233933 + ,171 + ,163 + ,381 + ,33186 + ,19 + ,111 + ,46 + ,0 + ,1 + ,18 + ,67 + ,22 + ,22807 + ,1271 + ,6853 + ,5 + ,5 + ,1790 + ,178368 + ,51 + ,698 + ,71 + ,5 + ,64 + ,30 + ,116 + ,103 + ,126938 + ,30207 + ,104380 + ,106 + ,106 + ,1606 + ,186657 + ,38 + ,556 + ,65 + ,0 + ,77 + ,29 + ,107 + ,72 + ,61680 + ,18035 + ,98431 + ,88 + ,87 + ,1886 + ,261949 + ,96 + ,711 + ,74 + ,0 + ,86 + ,38 + ,140 + ,123 + ,72117 + ,21609 + ,156949 + ,145 + ,141 + ,1645 + ,191051 + ,95 + ,495 + ,55 + ,7 + ,93 + ,49 + ,186 + ,164 + ,79738 + ,19836 + ,81817 + ,93 + ,88 + ,1433 + ,138866 + ,57 + ,544 + ,55 + ,7 + ,44 + ,33 + ,109 + ,100 + ,57793 + ,9028 + ,59238 + ,60 + ,60 + ,2370 + ,296878 + ,66 + ,959 + ,98 + ,3 + ,106 + ,46 + ,159 + ,143 + ,91677 + ,21750 + ,101138 + ,145 + ,145 + ,1645 + ,192648 + ,72 + ,540 + ,41 + ,9 + ,63 + ,38 + ,146 + ,79 + ,64631 + ,10038 + ,107158 + ,95 + ,95 + ,4206 + ,333462 + ,162 + ,1486 + ,115 + ,0 + ,160 + ,52 + ,201 + ,183 + ,106385 + ,30276 + ,155499 + ,144 + ,137 + ,1780 + ,243571 + ,58 + ,635 + ,45 + ,4 + ,104 + ,32 + ,124 + ,123 + ,161961 + ,34972 + ,156274 + ,179 + ,177 + ,2352 + ,263451 + ,130 + ,940 + ,80 + ,3 + ,86 + ,35 + ,131 + ,81 + ,112669 + ,19954 + ,121777 + ,102 + ,102 + ,1262 + ,155679 + ,48 + ,452 + ,37 + ,3 + ,93 + ,25 + ,96 + ,74 + ,114029 + ,28113 + ,105037 + ,157 + ,151 + ,2026 + ,227053 + ,70 + ,617 + ,50 + ,7 + ,119 + ,42 + ,163 + ,158 + ,124550 + ,18830 + ,118661 + ,170 + ,156 + ,2109 + ,240028 + ,63 + ,695 + ,93 + ,0 + ,107 + ,40 + ,151 + ,133 + ,105416 + ,37144 + ,131187 + ,140 + ,140 + ,2451 + ,388549 + ,90 + ,1046 + ,93 + ,1 + ,86 + ,35 + ,128 + ,128 + ,72875 + ,17916 + ,145026 + ,133 + ,130 + ,1253 + ,156540 + ,34 + ,405 + ,56 + ,5 + ,50 + ,25 + ,89 + ,84 + ,81964 + ,16186 + ,107016 + ,74 + ,71 + ,1431 + ,148421 + ,43 + ,477 + ,57 + ,9 + ,92 + ,46 + ,184 + ,184 + ,104880 + ,19195 + ,87242 + ,120 + ,116 + ,2631 + ,177732 + ,97 + ,1012 + ,138 + ,0 + ,123 + ,36 + ,136 + ,127 + ,76302 + ,29124 + ,91699 + ,134 + ,129 + ,2293 + ,191441 + ,105 + ,842 + ,67 + ,0 + ,81 + ,35 + ,134 + ,128 + ,96740 + ,29813 + ,110087 + ,108 + ,107 + ,2653 + ,249893 + ,122 + ,994 + ,88 + ,5 + ,93 + ,38 + ,146 + ,118 + ,93071 + ,20270 + ,145447 + ,132 + ,128 + ,1709 + ,236812 + ,76 + ,530 + ,54 + ,0 + ,113 + ,35 + ,130 + ,125 + ,78912 + ,26105 + ,143307 + ,125 + ,119 + ,1360 + ,142329 + ,45 + ,515 + ,47 + ,0 + ,52 + ,28 + ,105 + ,89 + ,35224 + ,9155 + ,61678 + ,66 + ,62 + ,2051 + ,259667 + ,53 + ,766 + ,121 + ,0 + ,113 + ,37 + ,142 + ,122 + ,90694 + ,18113 + ,210080 + ,130 + ,124 + ,1921 + ,231625 + ,65 + ,734 + ,44 + ,3 + ,112 + ,40 + ,155 + ,151 + ,125369 + ,40546 + ,165005 + ,143 + ,140 + ,1623 + ,176062 + ,67 + ,551 + ,73 + ,4 + ,44 + ,42 + ,154 + ,122 + ,80849 + ,10096 + ,97806 + ,150 + ,144 + ,1933 + ,286683 + ,79 + ,718 + ,49 + ,1 + ,123 + ,44 + ,169 + ,162 + ,104434 + ,32338 + ,184471 + ,152 + ,150 + ,849 + ,87485 + ,33 + ,280 + ,36 + ,4 + ,38 + ,33 + ,125 + ,121 + ,65702 + ,2871 + ,27786 + ,28 + ,28 + ,2641 + ,322865 + ,83 + ,1055 + ,61 + ,2 + ,111 + ,35 + ,135 + ,132 + ,108179 + ,36592 + ,184458 + ,190 + ,177 + ,2235 + ,247082 + ,51 + ,950 + ,77 + ,0 + ,77 + ,37 + ,139 + ,110 + ,63583 + ,4914 + ,98765 + ,73 + ,73 + ,2951 + ,346011 + ,106 + ,1038 + ,69 + ,0 + ,92 + ,39 + ,145 + ,135 + ,95066 + ,30190 + ,178441 + ,115 + ,111 + ,1666 + ,191653 + ,74 + ,552 + ,63 + ,2 + ,74 + ,32 + ,124 + ,80 + ,62486 + ,18153 + ,100619 + ,101 + ,98 + ,917 + ,114673 + ,31 + ,275 + ,36 + ,1 + ,33 + ,17 + ,55 + ,46 + ,31081 + ,12558 + ,58391 + ,41 + ,41 + ,2745 + ,284224 + ,161 + ,986 + ,39 + ,2 + ,105 + ,34 + ,131 + ,127 + ,94584 + ,32894 + ,151672 + ,147 + ,139 + ,2897 + ,284195 + ,72 + ,1336 + ,34 + ,10 + ,108 + ,33 + ,125 + ,103 + ,87408 + ,24138 + ,124437 + ,107 + ,107 + ,1413 + ,155363 + ,59 + ,565 + ,65 + ,6 + ,66 + ,35 + ,128 + ,95 + ,68966 + ,16628 + ,79929 + ,103 + ,102 + ,1535 + ,177306 + ,67 + ,571 + ,78 + ,5 + ,69 + ,32 + ,107 + ,100 + ,88766 + ,26369 + ,123064 + ,84 + ,80 + ,1452 + ,144571 + ,49 + ,404 + ,67 + ,5 + ,62 + ,35 + ,130 + ,102 + ,57139 + ,14171 + ,50466 + ,68 + ,66 + ,2369 + ,140319 + ,73 + ,985 + ,82 + ,1 + ,50 + ,45 + ,73 + ,45 + ,90586 + ,8500 + ,100991 + ,52 + ,51 + ,4908 + ,405267 + ,135 + ,1851 + ,780 + ,2 + ,91 + ,38 + ,138 + ,122 + ,109249 + ,11940 + ,79367 + ,70 + ,69 + ,918 + ,78800 + ,42 + ,330 + ,57 + ,2 + ,20 + ,26 + ,82 + ,66 + ,33032 + ,7935 + ,56968 + ,21 + ,21 + ,2085 + ,201970 + ,69 + ,611 + ,72 + ,0 + ,101 + ,45 + ,173 + ,159 + ,96056 + ,19456 + ,106257 + ,155 + ,155 + ,3655 + ,302674 + ,99 + ,1249 + ,112 + ,9 + ,129 + ,44 + ,169 + ,153 + ,146648 + ,21347 + ,178412 + ,165 + ,163 + ,1923 + ,164733 + ,50 + ,812 + ,61 + ,3 + ,93 + ,40 + ,145 + ,131 + ,80613 + ,24095 + ,98520 + ,124 + ,121 + ,1616 + ,194221 + ,68 + ,501 + ,39 + ,0 + ,89 + ,33 + ,134 + ,113 + ,87026 + ,26204 + ,153670 + ,121 + ,118 + ,496 + ,24188 + ,24 + ,218 + ,20 + ,0 + ,8 + ,4 + ,12 + ,7 + ,5950 + ,2694 + ,15049 + ,7 + ,7 + ,2328 + ,342263 + ,279 + ,785 + ,73 + ,8 + ,79 + ,41 + ,151 + ,147 + ,131106 + ,20366 + ,174478 + ,161 + ,154 + ,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 + ,2598 + ,246088 + ,46 + ,944 + ,118 + ,1 + ,86 + ,33 + ,121 + ,108 + ,91072 + ,29463 + ,116772 + ,125 + ,122 + ,2276 + ,273108 + ,75 + ,600 + ,72 + ,5 + ,116 + ,49 + ,186 + ,184 + ,159803 + ,35838 + ,189150 + ,157 + ,152 + ,3185 + ,282220 + ,160 + ,977 + ,196 + ,5 + ,106 + ,32 + ,120 + ,115 + ,143950 + ,42590 + ,194404 + ,256 + ,255 + ,2135 + ,273495 + ,119 + ,863 + ,58 + ,0 + ,127 + ,37 + ,135 + ,132 + ,112368 + ,38665 + ,185881 + ,192 + ,177 + ,1863 + ,214872 + ,74 + ,690 + ,67 + ,12 + ,75 + ,32 + ,123 + ,113 + ,82124 + ,19442 + ,67508 + ,86 + ,83 + ,3524 + ,335121 + ,124 + ,1176 + ,60 + ,9 + ,138 + ,41 + ,158 + ,141 + ,144068 + ,25515 + ,188597 + ,164 + ,164 + ,2760 + ,267171 + ,106 + ,1013 + ,138 + ,11 + ,114 + ,25 + ,90 + ,65 + ,162627 + ,51318 + ,203618 + ,213 + ,202 + ,2187 + ,187938 + ,88 + ,890 + ,69 + ,9 + ,55 + ,40 + ,157 + ,87 + ,55062 + ,11807 + ,87232 + ,80 + ,77 + ,2161 + ,229512 + ,78 + ,777 + ,45 + ,8 + ,67 + ,35 + ,135 + ,121 + ,95329 + ,24130 + ,110875 + ,122 + ,118 + ,1302 + ,209798 + ,61 + ,521 + ,54 + ,2 + ,45 + ,33 + ,125 + ,112 + ,105612 + ,34053 + ,144756 + ,122 + ,123 + ,1540 + ,201345 + ,60 + ,409 + ,55 + ,0 + ,88 + ,28 + ,110 + ,81 + ,62853 + ,22641 + ,129825 + ,113 + ,109 + ,1618 + ,163833 + ,114 + ,493 + ,46 + ,6 + ,67 + ,31 + ,121 + ,116 + ,125976 + ,18898 + ,92189 + ,128 + ,126 + ,2403 + ,204250 + ,129 + ,757 + ,84 + ,8 + ,75 + ,40 + ,151 + ,132 + ,79146 + ,24539 + ,121158 + ,117 + ,114 + ,1961 + ,197813 + ,67 + ,736 + ,71 + ,2 + ,114 + ,32 + ,123 + ,104 + ,108461 + ,21664 + ,96219 + ,162 + ,161 + ,1402 + ,132955 + ,60 + ,511 + ,56 + ,5 + ,123 + ,25 + ,92 + ,80 + ,99971 + ,21577 + ,84128 + ,87 + ,85 + ,2292 + ,216092 + ,59 + ,789 + ,55 + ,13 + ,86 + ,42 + ,162 + ,145 + ,77826 + ,16643 + ,97960 + ,103 + ,101 + ,893 + ,73566 + ,32 + ,385 + ,39 + ,6 + ,22 + ,23 + ,88 + ,67 + ,22618 + ,3007 + ,23824 + ,26 + ,25 + ,1935 + ,213198 + ,67 + ,644 + ,52 + ,7 + ,67 + ,42 + ,163 + ,159 + ,84892 + ,18798 + ,103515 + ,104 + ,102 + ,1586 + ,181713 + ,49 + ,664 + ,94 + ,2 + ,77 + ,38 + ,133 + ,90 + ,92059 + ,24648 + ,91313 + ,127 + ,126 + ,1494 + ,148698 + ,49 + ,505 + ,57 + ,0 + ,105 + ,34 + ,132 + ,120 + ,77993 + ,20286 + ,85407 + ,132 + ,130 + ,1995 + ,300103 + ,70 + ,878 + ,82 + ,4 + ,119 + ,38 + ,144 + ,126 + ,104155 + ,23999 + ,95871 + ,112 + ,112 + ,1904 + ,251437 + ,78 + ,769 + ,42 + ,3 + ,88 + ,32 + ,124 + ,118 + ,109840 + ,26813 + ,143846 + ,155 + ,150 + ,1711 + ,197295 + ,101 + ,499 + ,45 + ,6 + ,78 + ,37 + ,140 + ,112 + ,238712 + ,14718 + ,155387 + ,57 + ,54 + ,1746 + ,158163 + ,55 + ,546 + ,52 + ,2 + ,112 + ,34 + ,132 + ,123 + ,67486 + ,16963 + ,74429 + ,109 + ,106 + ,1473 + ,155529 + ,57 + ,551 + ,63 + ,0 + ,66 + ,33 + ,122 + ,98 + ,68007 + ,16673 + ,74004 + ,92 + ,90 + ,1538 + ,132672 + ,41 + ,565 + ,38 + ,1 + ,58 + ,25 + ,97 + ,78 + ,48194 + ,14646 + ,71987 + ,57 + ,55 + ,3324 + ,377205 + ,100 + ,1086 + ,108 + ,0 + ,132 + ,40 + ,155 + ,119 + ,134796 + ,31772 + ,150629 + ,145 + ,139 + ,1356 + ,145905 + ,66 + ,649 + ,45 + ,5 + ,30 + ,26 + ,99 + ,99 + ,38692 + ,9648 + ,68580 + ,38 + ,38 + ,1931 + ,223701 + ,86 + ,540 + ,53 + ,2 + ,100 + ,40 + ,106 + ,81 + ,93587 + ,23096 + ,119855 + ,152 + ,148 + ,870 + ,80953 + ,25 + ,437 + ,31 + ,0 + ,49 + ,8 + ,28 + ,27 + ,56622 + ,7905 + ,55792 + ,59 + ,58 + ,1716 + ,130805 + ,47 + ,732 + ,169 + ,0 + ,26 + ,27 + ,101 + ,77 + ,15986 + ,4527 + ,25157 + ,27 + ,27 + ,1091 + ,135082 + ,48 + ,308 + ,60 + ,5 + ,67 + ,32 + ,120 + ,118 + ,113402 + ,37432 + ,90895 + ,104 + ,104 + ,3187 + ,300805 + ,156 + ,1237 + ,271 + ,1 + ,57 + ,33 + ,127 + ,122 + ,97967 + ,21082 + ,117510 + ,80 + ,75 + ,2240 + ,271806 + ,95 + ,783 + ,84 + ,0 + ,95 + ,50 + ,178 + ,103 + ,74844 + ,30437 + ,144774 + ,76 + ,73 + ,2677 + ,150949 + ,96 + ,933 + ,63 + ,1 + ,139 + ,37 + ,141 + ,129 + ,136051 + ,36288 + ,77529 + ,163 + ,157 + ,2038 + ,225805 + ,79 + ,710 + ,54 + ,1 + ,73 + ,33 + ,122 + ,69 + ,50548 + ,12369 + ,103123 + ,89 + ,87 + ,1783 + ,197389 + ,68 + ,563 + ,65 + ,2 + ,134 + ,34 + ,127 + ,121 + ,112215 + ,23774 + ,104669 + ,199 + ,186 + ,1560 + ,156583 + ,56 + ,508 + ,80 + ,6 + ,37 + ,28 + ,102 + ,81 + ,59591 + ,8108 + ,82414 + ,89 + ,88 + ,2540 + ,222599 + ,66 + ,936 + ,84 + ,1 + ,98 + ,32 + ,124 + ,119 + ,59938 + ,15049 + ,82390 + ,107 + ,107 + ,2118 + ,261601 + ,70 + ,838 + ,115 + ,4 + ,58 + ,32 + ,124 + ,116 + ,137639 + ,36021 + ,128446 + ,137 + ,131 + ,1521 + ,178489 + ,35 + ,523 + ,60 + ,3 + ,78 + ,32 + ,124 + ,123 + ,143372 + ,30391 + ,111542 + ,123 + ,123 + ,1460 + ,200657 + ,43 + ,500 + ,62 + ,3 + ,88 + ,31 + ,111 + ,111 + ,138599 + ,30910 + ,136048 + ,152 + ,149 + ,1866 + ,259084 + ,68 + ,691 + ,57 + ,0 + ,142 + ,35 + ,129 + ,100 + ,174110 + ,40656 + ,197257 + ,202 + ,201 + ,3312 + ,313075 + ,130 + ,1060 + ,121 + ,11 + ,127 + ,58 + ,223 + ,221 + ,135062 + ,35070 + ,162079 + ,159 + ,145 + ,3135 + ,346933 + ,100 + ,1232 + ,69 + ,12 + ,139 + ,27 + ,102 + ,95 + ,175681 + ,47250 + ,206286 + ,282 + ,273 + ,2232 + ,246440 + ,104 + ,735 + ,60 + ,8 + ,108 + ,45 + ,174 + ,153 + ,130307 + ,36236 + ,109858 + ,111 + ,111 + ,2061 + ,252444 + ,58 + ,757 + ,81 + ,0 + ,128 + ,37 + ,141 + ,118 + ,139141 + ,29601 + ,182125 + ,197 + ,195 + ,1787 + ,159965 + ,159 + ,574 + ,100 + ,0 + ,62 + ,32 + ,122 + ,50 + ,44244 + ,10443 + ,74168 + ,72 + ,69 + ,602 + ,43287 + ,14 + ,214 + ,43 + ,4 + ,13 + ,19 + ,71 + ,64 + ,43750 + ,7409 + ,19630 + ,49 + ,49 + ,1973 + ,172239 + ,68 + ,661 + ,72 + ,4 + ,89 + ,22 + ,81 + ,34 + ,48029 + ,18213 + ,88634 + ,82 + ,82 + ,1739 + ,183738 + ,120 + ,631 + ,61 + ,0 + ,83 + ,35 + ,131 + ,76 + ,95216 + ,40856 + ,128321 + ,192 + ,193 + ,2282 + ,227681 + ,43 + ,1015 + ,101 + ,0 + ,116 + ,36 + ,139 + ,112 + ,92288 + ,36471 + ,118936 + ,102 + ,102 + ,2339 + ,260464 + ,81 + ,893 + ,50 + ,0 + ,157 + ,36 + ,137 + ,115 + ,94588 + ,26077 + ,127044 + ,127 + ,124 + ,923 + ,106288 + ,54 + ,293 + ,32 + ,0 + ,28 + ,23 + ,91 + ,69 + ,197426 + ,24797 + ,178377 + ,60 + ,59 + ,1389 + ,109632 + ,77 + ,446 + ,74 + ,0 + ,83 + ,36 + ,142 + ,108 + ,151244 + ,6816 + ,69581 + ,61 + ,61 + ,1673 + ,268905 + ,58 + ,538 + ,54 + ,4 + ,72 + ,36 + ,133 + ,130 + ,139206 + ,25527 + ,168019 + ,106 + ,102 + ,2082 + ,266805 + ,78 + ,627 + ,65 + ,0 + ,134 + ,42 + ,155 + ,110 + ,106271 + ,22139 + ,113598 + ,139 + ,138 + ,398 + ,23623 + ,11 + ,156 + ,9 + ,0 + ,12 + ,1 + ,0 + ,0 + ,1168 + ,238 + ,5841 + ,11 + ,11 + ,1605 + ,152474 + ,65 + ,577 + ,45 + ,0 + ,106 + ,32 + ,123 + ,83 + ,71764 + ,24459 + ,93116 + ,114 + ,114 + ,530 + ,61857 + ,25 + ,192 + ,25 + ,4 + ,23 + ,11 + ,32 + ,30 + ,25162 + ,3913 + ,24610 + ,31 + ,28 + ,1503 + ,144889 + ,43 + ,437 + ,102 + ,0 + ,83 + ,40 + ,149 + ,106 + ,45635 + ,9895 + ,60611 + ,132 + ,101 + ,2636 + ,346600 + ,99 + ,1054 + ,59 + ,1 + ,126 + ,34 + ,128 + ,91 + ,101817 + ,25902 + ,226620 + ,210 + ,208 + ,387 + ,21054 + ,16 + ,146 + ,2 + ,0 + ,4 + ,0 + ,0 + ,0 + ,855 + ,338 + ,6622 + ,4 + ,4 + ,1849 + ,224051 + ,45 + ,751 + ,56 + ,5 + ,71 + ,27 + ,99 + ,69 + ,100174 + ,12937 + ,121996 + ,98 + ,93 + ,449 + ,31414 + ,19 + ,200 + ,22 + ,0 + ,18 + ,8 + ,25 + ,9 + ,14116 + ,3988 + ,13155 + ,39 + ,39 + ,2912 + ,261043 + ,105 + ,1050 + ,146 + ,2 + ,98 + ,35 + ,132 + ,123 + ,85008 + ,23370 + ,154158 + ,119 + ,114 + ,1740 + ,197819 + ,57 + ,590 + ,63 + ,7 + ,66 + ,41 + ,155 + ,143 + ,124254 + ,24015 + ,78489 + ,107 + ,104 + ,1401 + ,154984 + ,73 + ,430 + ,91 + ,12 + ,44 + ,40 + ,151 + ,125 + ,105793 + ,3870 + ,22007 + ,41 + ,40 + ,1257 + ,112933 + ,45 + ,467 + ,46 + ,2 + ,29 + ,28 + ,103 + ,81 + ,117129 + ,14648 + ,72530 + ,97 + ,94 + ,568 + ,38214 + ,34 + ,276 + ,52 + ,0 + ,16 + ,8 + ,27 + ,21 + ,8773 + ,1888 + ,13983 + ,16 + ,16 + ,1512 + ,158671 + ,33 + ,528 + ,98 + ,2 + ,56 + ,35 + ,131 + ,124 + ,94747 + ,16768 + ,73397 + ,65 + ,64 + ,2379 + ,302148 + ,70 + ,898 + ,105 + ,0 + ,112 + ,47 + ,178 + ,168 + ,107549 + ,33400 + ,143878 + ,156 + ,154 + ,1180 + ,177918 + ,55 + ,411 + ,57 + ,0 + ,46 + ,46 + ,177 + ,149 + ,97392 + ,23770 + ,119956 + ,158 + ,145 + ,3071 + ,350552 + ,70 + ,1362 + ,126 + ,3 + ,129 + ,42 + ,163 + ,147 + ,126893 + ,34762 + ,181558 + ,160 + ,150 + ,2186 + ,275578 + ,91 + ,743 + ,120 + ,0 + ,139 + ,48 + ,187 + ,145 + ,118850 + ,18793 + ,208236 + ,161 + ,156 + ,3065 + ,368746 + ,106 + ,1069 + ,104 + ,3 + ,136 + ,49 + ,182 + ,172 + ,234853 + ,48186 + ,237085 + ,238 + ,229 + ,1127 + ,172464 + ,31 + ,431 + ,44 + ,0 + ,66 + ,35 + ,135 + ,126 + ,74783 + ,20140 + ,110297 + ,85 + ,84 + ,1045 + ,94381 + ,35 + ,380 + ,48 + ,0 + ,42 + ,32 + ,118 + ,89 + ,66089 + ,8728 + ,61394 + ,50 + ,49 + ,2419 + ,243875 + ,279 + ,788 + ,143 + ,4 + ,70 + ,36 + ,140 + ,137 + ,95684 + ,19060 + ,81420 + ,106 + ,101 + ,3839 + ,382487 + ,153 + ,1367 + ,146 + ,4 + ,97 + ,42 + ,158 + ,149 + ,139537 + ,26880 + ,191154 + ,184 + ,179 + ,1427 + ,114525 + ,40 + ,449 + ,91 + ,14 + ,49 + ,35 + ,132 + ,121 + ,144253 + ,415 + ,11798 + ,15 + ,15 + ,3406 + ,335681 + ,119 + ,1461 + ,129 + ,0 + ,113 + ,37 + ,136 + ,133 + ,153824 + ,38902 + ,135724 + ,155 + ,154 + ,1730 + ,147989 + ,72 + ,651 + ,67 + ,4 + ,55 + ,34 + ,123 + ,93 + ,63995 + ,17375 + ,68614 + ,90 + ,90 + ,1507 + ,216638 + ,45 + ,494 + ,74 + ,0 + ,100 + ,36 + ,134 + ,119 + ,84891 + ,31360 + ,139926 + ,133 + ,133 + ,1907 + ,192862 + ,72 + ,667 + ,168 + ,1 + ,80 + ,36 + ,129 + ,102 + ,61263 + ,15051 + ,105203 + ,136 + ,133 + ,1552 + ,184818 + ,107 + ,510 + ,69 + ,0 + ,29 + ,32 + ,125 + ,45 + ,106221 + ,16785 + ,80338 + ,109 + ,97 + ,3611 + ,336707 + ,105 + ,1472 + ,99 + ,9 + ,95 + ,33 + ,128 + ,104 + ,113587 + ,15886 + ,121376 + ,118 + ,116 + ,1925 + ,215836 + ,76 + ,675 + ,61 + ,1 + ,114 + ,35 + ,129 + ,111 + ,113864 + ,28548 + ,124922 + ,222 + ,221 + ,2035 + ,173260 + ,63 + ,716 + ,37 + ,3 + ,41 + ,21 + ,79 + ,78 + ,37238 + ,2805 + ,10901 + ,16 + ,15 + ,2503 + ,271773 + ,89 + ,814 + ,51 + ,10 + ,128 + ,40 + ,154 + ,120 + ,119906 + ,34012 + ,135471 + ,162 + ,157 + ,1603 + ,130908 + ,52 + ,556 + ,121 + ,5 + ,142 + ,49 + ,188 + ,176 + ,135096 + ,19215 + ,66395 + ,108 + ,105 + ,2272 + ,204009 + ,75 + ,887 + ,48 + ,2 + ,88 + ,33 + ,122 + ,109 + ,151611 + ,34177 + ,134041 + ,153 + ,150 + ,2086 + ,245514 + ,92 + ,663 + ,52 + ,1 + ,147 + ,39 + ,144 + ,132 + ,144645 + ,32990 + ,153554 + ,181 + ,177 + ,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 + ,1777 + ,195765 + ,75 + ,607 + ,51 + ,2 + ,56 + ,33 + ,120 + ,78 + ,77457 + ,17428 + ,98922 + ,113 + ,111 + ,2781 + ,326038 + ,121 + ,934 + ,98 + ,1 + ,121 + ,42 + ,168 + ,104 + ,62464 + ,19912 + ,165395 + ,165 + ,165 + ,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 + ,976 + ,107465 + ,38 + ,267 + ,80 + ,0 + ,37 + ,38 + ,133 + ,65 + ,42087 + ,1801 + ,15167 + ,33 + ,33 + ,29 + ,969 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1542 + ,173102 + ,58 + ,517 + ,43 + ,2 + ,47 + ,28 + ,101 + ,55 + ,87656 + ,16541 + ,63891 + ,67 + ,63) + ,dim=c(15 + ,164) + ,dimnames=list(c('#Pageviews' + ,'TimeRFC' + ,'#Logins' + ,'#CourseCompendiumViews' + ,'#CourseCompendiumViews(onlyPR)' + ,'#SharedCompendiums' + ,'#BloggedComputations' + ,'#ReviewedCompendiums' + ,'#FeedbackMessagesInPR' + ,'#FBMIPR+120' + ,'#CompendiumCharacters' + ,'#Revisions' + ,'CompendiumWrintingTime' + ,'#IncludedHyperlinks' + ,'#IncludedBlogs') + ,1:164)) > y <- array(NA,dim=c(15,164),dimnames=list(c('#Pageviews','TimeRFC','#Logins','#CourseCompendiumViews','#CourseCompendiumViews(onlyPR)','#SharedCompendiums','#BloggedComputations','#ReviewedCompendiums','#FeedbackMessagesInPR','#FBMIPR+120','#CompendiumCharacters','#Revisions','CompendiumWrintingTime','#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 = '' > 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] 252101 134577 198520 189326 137449 65295 439387 33186 178368 186657 [11] 261949 191051 138866 296878 192648 333462 243571 263451 155679 227053 [21] 240028 388549 156540 148421 177732 191441 249893 236812 142329 259667 [31] 231625 176062 286683 87485 322865 247082 346011 191653 114673 284224 [41] 284195 155363 177306 144571 140319 405267 78800 201970 302674 164733 [51] 194221 24188 342263 65029 101097 246088 273108 282220 273495 214872 [61] 335121 267171 187938 229512 209798 201345 163833 204250 197813 132955 [71] 216092 73566 213198 181713 148698 300103 251437 197295 158163 155529 [81] 132672 377205 145905 223701 80953 130805 135082 300805 271806 150949 [91] 225805 197389 156583 222599 261601 178489 200657 259084 313075 346933 [101] 246440 252444 159965 43287 172239 183738 227681 260464 106288 109632 [111] 268905 266805 23623 152474 61857 144889 346600 21054 224051 31414 [121] 261043 197819 154984 112933 38214 158671 302148 177918 350552 275578 [131] 368746 172464 94381 243875 382487 114525 335681 147989 216638 192862 [141] 184818 336707 215836 173260 271773 130908 204009 245514 1 14688 [151] 98 455 0 0 195765 326038 0 203 7199 46660 [161] 17547 107465 969 173102 > 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 23623 3 1 1 1 1 1 1 1 1 1 1 24188 31414 33186 38214 43287 46660 61857 65029 65295 73566 78800 1 1 1 1 1 1 1 1 1 1 1 80953 87485 94381 101097 106288 107465 109632 112933 114525 114673 130805 1 1 1 1 1 1 1 1 1 1 1 130908 132672 132955 134577 135082 137449 138866 140319 142329 144571 144889 1 1 1 1 1 1 1 1 1 1 1 145905 147989 148421 148698 150949 152474 154984 155363 155529 155679 156540 1 1 1 1 1 1 1 1 1 1 1 156583 158163 158671 159965 163833 164733 172239 172464 173102 173260 176062 1 1 1 1 1 1 1 1 1 1 1 177306 177732 177918 178368 178489 181713 183738 184818 186657 187938 189326 1 1 1 1 1 1 1 1 1 1 1 191051 191441 191653 192648 192862 194221 195765 197295 197389 197813 197819 1 1 1 1 1 1 1 1 1 1 1 198520 200657 201345 201970 204009 204250 209798 213198 214872 215836 216092 1 1 1 1 1 1 1 1 1 1 1 216638 222599 223701 224051 225805 227053 227681 229512 231625 236812 240028 1 1 1 1 1 1 1 1 1 1 1 243571 243875 245514 246088 246440 247082 249893 251437 252101 252444 259084 1 1 1 1 1 1 1 1 1 1 1 259667 260464 261043 261601 261949 263451 266805 267171 268905 271773 271806 1 1 1 1 1 1 1 1 1 1 1 273108 273495 275578 282220 284195 284224 286683 296878 300103 300805 302148 1 1 1 1 1 1 1 1 1 1 1 302674 313075 322865 326038 333462 335121 335681 336707 342263 346011 346600 1 1 1 1 1 1 1 1 1 1 1 346933 350552 368746 377205 382487 388549 405267 439387 1 1 1 1 1 1 1 1 > colnames(x) [1] "X.Pageviews" "TimeRFC" [3] "X.Logins" "X.CourseCompendiumViews" [5] "X.CourseCompendiumViews.onlyPR." "X.SharedCompendiums" [7] "X.BloggedComputations" "X.ReviewedCompendiums" [9] "X.FeedbackMessagesInPR" "X.FBMIPR.120" [11] "X.CompendiumCharacters" "X.Revisions" [13] "CompendiumWrintingTime" "X.IncludedHyperlinks" [15] "X.IncludedBlogs" > colnames(x)[par1] [1] "TimeRFC" > x[,par1] [1] 252101 134577 198520 189326 137449 65295 439387 33186 178368 186657 [11] 261949 191051 138866 296878 192648 333462 243571 263451 155679 227053 [21] 240028 388549 156540 148421 177732 191441 249893 236812 142329 259667 [31] 231625 176062 286683 87485 322865 247082 346011 191653 114673 284224 [41] 284195 155363 177306 144571 140319 405267 78800 201970 302674 164733 [51] 194221 24188 342263 65029 101097 246088 273108 282220 273495 214872 [61] 335121 267171 187938 229512 209798 201345 163833 204250 197813 132955 [71] 216092 73566 213198 181713 148698 300103 251437 197295 158163 155529 [81] 132672 377205 145905 223701 80953 130805 135082 300805 271806 150949 [91] 225805 197389 156583 222599 261601 178489 200657 259084 313075 346933 [101] 246440 252444 159965 43287 172239 183738 227681 260464 106288 109632 [111] 268905 266805 23623 152474 61857 144889 346600 21054 224051 31414 [121] 261043 197819 154984 112933 38214 158671 302148 177918 350552 275578 [131] 368746 172464 94381 243875 382487 114525 335681 147989 216638 192862 [141] 184818 336707 215836 173260 271773 130908 204009 245514 1 14688 [151] 98 455 0 0 195765 326038 0 203 7199 46660 [161] 17547 107465 969 173102 > 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/1dvjk1323612724.tab") + } + } > m Conditional inference tree with 10 terminal nodes Response: TimeRFC Inputs: X.Pageviews, X.Logins, X.CourseCompendiumViews, X.CourseCompendiumViews.onlyPR., X.SharedCompendiums, X.BloggedComputations, X.ReviewedCompendiums, X.FeedbackMessagesInPR, X.FBMIPR.120, X.CompendiumCharacters, X.Revisions, CompendiumWrintingTime, X.IncludedHyperlinks, X.IncludedBlogs Number of observations: 164 1) X.Pageviews <= 1503; criterion = 1, statistic = 136.613 2) X.Pageviews <= 893; criterion = 1, statistic = 46.529 3) X.Pageviews <= 496; criterion = 1, statistic = 21.988 4)* weights = 17 3) X.Pageviews > 496 5)* weights = 8 2) X.Pageviews > 893 6) X.IncludedBlogs <= 61; criterion = 0.996, statistic = 13.25 7)* weights = 11 6) X.IncludedBlogs > 61 8)* weights = 18 1) X.Pageviews > 1503 9) X.Pageviews <= 2760; criterion = 1, statistic = 65.282 10) CompendiumWrintingTime <= 134041; criterion = 1, statistic = 45.438 11) CompendiumWrintingTime <= 93116; criterion = 0.999, statistic = 16.79 12)* weights = 23 11) CompendiumWrintingTime > 93116 13) X.BloggedComputations <= 101; criterion = 0.959, statistic = 8.812 14)* weights = 28 13) X.BloggedComputations > 101 15)* weights = 12 10) CompendiumWrintingTime > 134041 16) X.CourseCompendiumViews <= 783; criterion = 0.996, statistic = 13.203 17)* weights = 18 16) X.CourseCompendiumViews > 783 18)* weights = 10 9) X.Pageviews > 2760 19)* weights = 19 > postscript(file="/var/wessaorg/rcomp/tmp/2i63z1323612724.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/3oyr81323612724.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 252101 248802.11 3298.88889 2 134577 153658.44 -19081.44444 3 198520 203954.14 -5434.14286 4 189326 238818.00 -49492.00000 5 137449 153658.44 -16209.44444 6 65295 64460.75 834.25000 7 439387 338295.21 101091.78947 8 33186 13016.76 20169.23529 9 178368 203954.14 -25586.14286 10 186657 203954.14 -17297.14286 11 261949 248802.11 13146.88889 12 191051 172349.13 18701.86957 13 138866 115146.91 23719.09091 14 296878 238818.00 58060.00000 15 192648 203954.14 -11306.14286 16 333462 338295.21 -4833.21053 17 243571 248802.11 -5231.11111 18 263451 203954.14 59496.85714 19 155679 153658.44 2020.55556 20 227053 238818.00 -11765.00000 21 240028 238818.00 1210.00000 22 388549 304898.10 83650.90000 23 156540 153658.44 2881.55556 24 148421 153658.44 -5237.44444 25 177732 172349.13 5382.86957 26 191441 203954.14 -12513.14286 27 249893 304898.10 -55005.10000 28 236812 248802.11 -11990.11111 29 142329 153658.44 -11329.44444 30 259667 248802.11 10864.88889 31 231625 248802.11 -17177.11111 32 176062 203954.14 -27892.14286 33 286683 248802.11 37880.88889 34 87485 64460.75 23024.25000 35 322865 304898.10 17966.90000 36 247082 203954.14 43127.85714 37 346011 338295.21 7715.78947 38 191653 203954.14 -12301.14286 39 114673 115146.91 -473.90909 40 284224 304898.10 -20674.10000 41 284195 338295.21 -54100.21053 42 155363 153658.44 1704.55556 43 177306 203954.14 -26648.14286 44 144571 153658.44 -9087.44444 45 140319 203954.14 -63635.14286 46 405267 338295.21 66971.78947 47 78800 115146.91 -36346.90909 48 201970 203954.14 -1984.14286 49 302674 338295.21 -35621.21053 50 164733 203954.14 -39221.14286 51 194221 248802.11 -54581.11111 52 24188 13016.76 11171.23529 53 342263 304898.10 37364.90000 54 65029 64460.75 568.25000 55 101097 115146.91 -14049.90909 56 246088 203954.14 42133.85714 57 273108 248802.11 24305.88889 58 282220 338295.21 -56075.21053 59 273495 304898.10 -31403.10000 60 214872 172349.13 42522.86957 61 335121 338295.21 -3174.21053 62 267171 304898.10 -37727.10000 63 187938 172349.13 15588.86957 64 229512 203954.14 25557.85714 65 209798 153658.44 56139.55556 66 201345 203954.14 -2609.14286 67 163833 172349.13 -8516.13043 68 204250 203954.14 295.85714 69 197813 238818.00 -41005.00000 70 132955 153658.44 -20703.44444 71 216092 203954.14 12137.85714 72 73566 64460.75 9105.25000 73 213198 203954.14 9243.85714 74 181713 172349.13 9363.86957 75 148698 153658.44 -4960.44444 76 300103 238818.00 61285.00000 77 251437 248802.11 2634.88889 78 197295 248802.11 -51507.11111 79 158163 172349.13 -14186.13043 80 155529 153658.44 1870.55556 81 132672 172349.13 -39677.13043 82 377205 338295.21 38909.78947 83 145905 115146.91 30758.09091 84 223701 203954.14 19746.85714 85 80953 64460.75 16492.25000 86 130805 172349.13 -41544.13043 87 135082 153658.44 -18576.44444 88 300805 338295.21 -37490.21053 89 271806 248802.11 23003.88889 90 150949 172349.13 -21400.13043 91 225805 203954.14 21850.85714 92 197389 238818.00 -41429.00000 93 156583 172349.13 -15766.13043 94 222599 172349.13 50249.86957 95 261601 203954.14 57646.85714 96 178489 203954.14 -25465.14286 97 200657 153658.44 46998.55556 98 259084 248802.11 10281.88889 99 313075 338295.21 -25220.21053 100 346933 338295.21 8637.78947 101 246440 238818.00 7622.00000 102 252444 248802.11 3641.88889 103 159965 172349.13 -12384.13043 104 43287 64460.75 -21173.75000 105 172239 172349.13 -110.13043 106 183738 203954.14 -20216.14286 107 227681 238818.00 -11137.00000 108 260464 238818.00 21646.00000 109 106288 115146.91 -8858.90909 110 109632 115146.91 -5514.90909 111 268905 248802.11 20102.88889 112 266805 238818.00 27987.00000 113 23623 13016.76 10606.23529 114 152474 172349.13 -19875.13043 115 61857 64460.75 -2603.75000 116 144889 153658.44 -8769.44444 117 346600 304898.10 41701.90000 118 21054 13016.76 8037.23529 119 224051 203954.14 20096.85714 120 31414 13016.76 18397.23529 121 261043 338295.21 -77252.21053 122 197819 172349.13 25469.86957 123 154984 115146.91 39837.09091 124 112933 153658.44 -40725.44444 125 38214 64460.75 -26246.75000 126 158671 172349.13 -13678.13043 127 302148 304898.10 -2750.10000 128 177918 153658.44 24259.55556 129 350552 338295.21 12256.78947 130 275578 248802.11 26775.88889 131 368746 338295.21 30450.78947 132 172464 153658.44 18805.55556 133 94381 115146.91 -20765.90909 134 243875 172349.13 71525.86957 135 382487 338295.21 44191.78947 136 114525 115146.91 -621.90909 137 335681 338295.21 -2614.21053 138 147989 172349.13 -24360.13043 139 216638 248802.11 -32164.11111 140 192862 203954.14 -11092.14286 141 184818 172349.13 12468.86957 142 336707 338295.21 -1588.21053 143 215836 238818.00 -22982.00000 144 173260 172349.13 910.86957 145 271773 304898.10 -33125.10000 146 130908 172349.13 -41441.13043 147 204009 203954.14 54.85714 148 245514 248802.11 -3288.11111 149 1 13016.76 -13015.76471 150 14688 13016.76 1671.23529 151 98 13016.76 -12918.76471 152 455 13016.76 -12561.76471 153 0 13016.76 -13016.76471 154 0 13016.76 -13016.76471 155 195765 203954.14 -8189.14286 156 326038 338295.21 -12257.21053 157 0 13016.76 -13016.76471 158 203 13016.76 -12813.76471 159 7199 13016.76 -5817.76471 160 46660 13016.76 33643.23529 161 17547 13016.76 4530.23529 162 107465 115146.91 -7681.90909 163 969 13016.76 -12047.76471 164 173102 172349.13 752.86957 > 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/4d6071323612724.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/5g0491323612724.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/63w451323612724.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/7a2jj1323612724.tab") + } > > try(system("convert tmp/2i63z1323612724.ps tmp/2i63z1323612724.png",intern=TRUE)) character(0) > try(system("convert tmp/3oyr81323612724.ps tmp/3oyr81323612724.png",intern=TRUE)) character(0) > try(system("convert tmp/4d6071323612724.ps tmp/4d6071323612724.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.227 0.246 5.504