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(1713 + ,269966 + ,66 + ,473 + ,90 + ,96 + ,38 + ,144 + ,140824 + ,32033 + ,186099 + ,165 + ,165 + ,1028 + ,146082 + ,61 + ,352 + ,63 + ,64 + ,34 + ,133 + ,110459 + ,20654 + ,113854 + ,135 + ,132 + ,1807 + ,214542 + ,67 + ,660 + ,59 + ,69 + ,42 + ,162 + ,105079 + ,16346 + ,99776 + ,121 + ,121 + ,2613 + ,212452 + ,100 + ,1126 + ,135 + ,126 + ,38 + ,148 + ,112098 + ,35926 + ,106194 + ,148 + ,145 + ,1117 + ,157206 + ,49 + ,333 + ,48 + ,59 + ,27 + ,88 + ,43929 + ,10621 + ,100792 + ,73 + ,71 + ,631 + ,70849 + ,28 + ,179 + ,46 + ,8 + ,35 + ,129 + ,76173 + ,10024 + ,47552 + ,49 + ,47 + ,4294 + ,476347 + ,111 + ,2091 + ,109 + ,145 + ,33 + ,128 + ,187326 + ,43068 + ,250931 + ,185 + ,177 + ,381 + ,33186 + ,19 + ,111 + ,46 + ,1 + ,18 + ,67 + ,22807 + ,1271 + ,6853 + ,5 + ,5 + ,1937 + ,201983 + ,56 + ,726 + ,75 + ,69 + ,34 + ,132 + ,144408 + ,34416 + ,115466 + ,125 + ,124 + ,1734 + ,211698 + ,43 + ,585 + ,72 + ,82 + ,33 + ,120 + ,66485 + ,20318 + ,110896 + ,93 + ,92 + ,2010 + ,292874 + ,102 + ,754 + ,78 + ,92 + ,42 + ,155 + ,79089 + ,24409 + ,169351 + ,154 + ,149 + ,1988 + ,223814 + ,107 + ,619 + ,61 + ,106 + ,55 + ,210 + ,81625 + ,20648 + ,94853 + ,98 + ,93 + ,1600 + ,156623 + ,65 + ,615 + ,58 + ,50 + ,35 + ,115 + ,68788 + ,12347 + ,72591 + ,70 + ,70 + ,2664 + ,327332 + ,73 + ,1060 + ,109 + ,113 + ,51 + ,175 + ,103297 + ,21857 + ,101345 + ,148 + ,148 + ,1812 + ,205898 + ,78 + ,588 + ,45 + ,70 + ,42 + ,158 + ,69446 + ,11034 + ,113713 + ,100 + ,100 + ,4698 + ,369527 + ,172 + ,1626 + ,127 + ,168 + ,59 + ,223 + ,114948 + ,33433 + ,165354 + ,150 + ,142 + ,2043 + ,290571 + ,66 + ,717 + ,58 + ,111 + ,36 + ,140 + ,167949 + ,35902 + ,164263 + ,197 + ,194 + ,2690 + ,292903 + ,146 + ,1053 + ,90 + ,92 + ,39 + ,144 + ,125081 + ,22355 + ,135213 + ,114 + ,113 + ,1381 + ,168639 + ,52 + ,491 + ,41 + ,102 + ,29 + ,111 + ,125818 + ,31219 + ,111669 + ,169 + ,162 + ,2249 + ,253641 + ,79 + ,669 + ,54 + ,135 + ,46 + ,179 + ,136588 + ,21983 + ,134163 + ,200 + ,186 + ,2446 + ,269240 + ,68 + ,819 + ,99 + ,122 + ,45 + ,171 + ,112431 + ,40085 + ,140303 + ,148 + ,147 + ,2681 + ,414808 + ,101 + ,1150 + ,101 + ,86 + ,39 + ,144 + ,103037 + ,18507 + ,150773 + ,140 + ,137 + ,1306 + ,161910 + ,38 + ,421 + ,62 + ,50 + ,25 + ,89 + ,82317 + ,16278 + ,111848 + ,74 + ,71 + ,1649 + ,178722 + ,53 + ,583 + ,65 + ,94 + ,52 + ,208 + ,118906 + ,24662 + ,102509 + ,128 + ,123 + ,2975 + ,200181 + ,109 + ,1146 + ,150 + ,127 + ,41 + ,153 + ,83515 + ,31452 + ,96785 + ,140 + ,134 + ,2507 + ,203700 + ,111 + ,922 + ,71 + ,86 + ,38 + ,146 + ,104581 + ,32580 + ,116136 + ,116 + ,115 + ,2817 + ,267099 + ,126 + ,1058 + ,91 + ,99 + ,41 + ,158 + ,103129 + ,22883 + ,158376 + ,147 + ,138 + ,1879 + ,262716 + ,83 + ,593 + ,59 + ,117 + ,39 + ,142 + ,83243 + ,27652 + ,153990 + ,132 + ,125 + ,1495 + ,155915 + ,51 + ,559 + ,53 + ,57 + ,32 + ,117 + ,37110 + ,9845 + ,64057 + ,70 + ,66 + ,2661 + ,324641 + ,59 + ,1001 + ,140 + ,125 + ,41 + ,158 + ,113344 + ,20190 + ,230054 + ,144 + ,137 + ,2154 + ,261785 + ,72 + ,848 + ,49 + ,120 + ,45 + ,175 + ,139165 + ,46201 + ,184531 + ,155 + ,152 + ,1741 + ,192626 + ,71 + ,590 + ,77 + ,44 + ,46 + ,170 + ,86652 + ,10971 + ,114198 + ,165 + ,159 + ,2090 + ,318563 + ,83 + ,779 + ,53 + ,133 + ,48 + ,185 + ,112302 + ,34811 + ,198299 + ,161 + ,159 + ,940 + ,97615 + ,35 + ,308 + ,40 + ,43 + ,37 + ,141 + ,69652 + ,3029 + ,33750 + ,31 + ,31 + ,2804 + ,343613 + ,88 + ,1108 + ,72 + ,117 + ,39 + ,151 + ,119442 + ,38941 + ,189723 + ,199 + ,185 + ,2751 + ,272026 + ,55 + ,1183 + ,87 + ,83 + ,42 + ,159 + ,69867 + ,4958 + ,100826 + ,78 + ,78 + ,3509 + ,408580 + ,115 + ,1261 + ,71 + ,105 + ,41 + ,151 + ,101629 + ,32344 + ,188355 + ,121 + ,117 + ,1771 + ,206904 + ,78 + ,581 + ,67 + ,79 + ,36 + ,139 + ,70168 + ,19433 + ,104470 + ,112 + ,109 + ,934 + ,115469 + ,32 + ,276 + ,36 + ,33 + ,17 + ,55 + ,31081 + ,12558 + ,58391 + ,41 + ,41 + ,3000 + ,310587 + ,176 + ,1061 + ,45 + ,111 + ,39 + ,151 + ,103925 + ,36524 + ,164808 + ,158 + ,149 + ,3178 + ,315746 + ,76 + ,1471 + ,38 + ,121 + ,37 + ,139 + ,92622 + ,26041 + ,134097 + ,123 + ,123 + ,1489 + ,157897 + ,62 + ,590 + ,70 + ,67 + ,38 + ,138 + ,79011 + ,16637 + ,80238 + ,104 + ,103 + ,1723 + ,192883 + ,72 + ,632 + ,82 + ,73 + ,36 + ,115 + ,93487 + ,28395 + ,133252 + ,94 + ,87 + ,1655 + ,165876 + ,56 + ,450 + ,83 + ,68 + ,42 + ,157 + ,64520 + ,16747 + ,54518 + ,73 + ,71 + ,2496 + ,153778 + ,82 + ,1022 + ,82 + ,50 + ,45 + ,73 + ,93473 + ,9105 + ,121850 + ,52 + ,51 + ,4948 + ,414493 + ,139 + ,1864 + ,780 + ,98 + ,38 + ,138 + ,114360 + ,11941 + ,79367 + ,71 + ,70 + ,918 + ,78800 + ,42 + ,330 + ,57 + ,20 + ,26 + ,82 + ,33032 + ,7935 + ,56968 + ,21 + ,21 + ,2219 + ,207958 + ,74 + ,648 + ,79 + ,101 + ,52 + ,201 + ,96125 + ,19499 + ,106314 + ,155 + ,155 + ,3832 + ,323118 + ,113 + ,1303 + ,116 + ,137 + ,47 + ,181 + ,151911 + ,22938 + ,191889 + ,174 + ,172 + ,2081 + ,175523 + ,54 + ,868 + ,68 + ,99 + ,45 + ,164 + ,89256 + ,25314 + ,104864 + ,136 + ,133 + ,1805 + ,213050 + ,72 + ,554 + ,48 + ,94 + ,40 + ,158 + ,95671 + ,28524 + ,160791 + ,128 + ,125 + ,496 + ,24188 + ,24 + ,218 + ,20 + ,8 + ,4 + ,12 + ,5950 + ,2694 + ,15049 + ,7 + ,7 + ,2464 + ,364968 + ,300 + ,816 + ,76 + ,83 + ,44 + ,163 + ,149695 + ,20867 + ,191179 + ,165 + ,158 + ,744 + ,65029 + ,17 + ,255 + ,21 + ,21 + ,18 + ,67 + ,32551 + ,3597 + ,25109 + ,21 + ,21 + ,1161 + ,101097 + ,64 + ,454 + ,70 + ,30 + ,14 + ,52 + ,31701 + ,5296 + ,45824 + ,35 + ,35 + ,2803 + ,263096 + ,54 + ,1009 + ,124 + ,96 + ,37 + ,134 + ,100087 + ,32982 + ,129711 + ,137 + ,133 + ,2421 + ,302012 + ,81 + ,639 + ,80 + ,122 + ,56 + ,210 + ,169707 + ,38975 + ,210012 + ,174 + ,169 + ,3449 + ,315753 + ,170 + ,1048 + ,206 + ,115 + ,36 + ,134 + ,150491 + ,42721 + ,194679 + ,257 + ,256 + ,2323 + ,300531 + ,130 + ,934 + ,62 + ,139 + ,41 + ,150 + ,120192 + ,41455 + ,197680 + ,207 + ,190 + ,2084 + ,240445 + ,79 + ,784 + ,77 + ,89 + ,36 + ,139 + ,95893 + ,23923 + ,81180 + ,103 + ,100 + ,3866 + ,360325 + ,135 + ,1282 + ,65 + ,147 + ,46 + ,178 + ,151715 + ,26719 + ,197765 + ,171 + ,171 + ,3104 + ,296186 + ,113 + ,1128 + ,146 + ,135 + ,28 + ,101 + ,176225 + ,53405 + ,214738 + ,279 + ,267 + ,2372 + ,210104 + ,97 + ,958 + ,71 + ,63 + ,42 + ,165 + ,59900 + ,12526 + ,96252 + ,83 + ,80 + ,2331 + ,247076 + ,85 + ,847 + ,48 + ,72 + ,38 + ,147 + ,104767 + ,26584 + ,124527 + ,130 + ,126 + ,1363 + ,220722 + ,64 + ,540 + ,58 + ,47 + ,37 + ,139 + ,114799 + ,37062 + ,153242 + ,131 + ,132 + ,1646 + ,216027 + ,65 + ,436 + ,58 + ,96 + ,30 + ,116 + ,72128 + ,25696 + ,145707 + ,126 + ,121 + ,1841 + ,187773 + ,124 + ,557 + ,54 + ,79 + ,35 + ,137 + ,143592 + ,24634 + ,113963 + ,158 + ,156 + ,2587 + ,227055 + ,137 + ,794 + ,89 + ,85 + ,44 + ,167 + ,89626 + ,27269 + ,134904 + ,138 + ,133 + ,2254 + ,229181 + ,76 + ,826 + ,78 + ,135 + ,36 + ,135 + ,131072 + ,25270 + ,114268 + ,200 + ,199 + ,1580 + ,159082 + ,63 + ,580 + ,62 + ,142 + ,28 + ,102 + ,126817 + ,24634 + ,94333 + ,104 + ,98 + ,2449 + ,232624 + ,65 + ,838 + ,59 + ,97 + ,45 + ,173 + ,81351 + ,17828 + ,102204 + ,111 + ,109 + ,893 + ,73566 + ,32 + ,385 + ,39 + ,22 + ,23 + ,88 + ,22618 + ,3007 + ,23824 + ,26 + ,25 + ,2113 + ,231827 + ,76 + ,698 + ,55 + ,75 + ,45 + ,175 + ,88977 + ,20065 + ,111563 + ,115 + ,113 + ,1593 + ,181728 + ,50 + ,667 + ,94 + ,77 + ,38 + ,133 + ,92059 + ,24648 + ,91313 + ,127 + ,126 + ,1644 + ,162366 + ,57 + ,548 + ,61 + ,110 + ,38 + ,148 + ,81897 + ,21588 + ,89770 + ,140 + ,137 + ,2153 + ,329583 + ,75 + ,932 + ,87 + ,132 + ,42 + ,157 + ,108146 + ,25217 + ,100125 + ,121 + ,121 + ,2350 + ,303317 + ,87 + ,941 + ,48 + ,111 + ,36 + ,140 + ,126372 + ,30927 + ,165278 + ,183 + ,178 + ,1770 + ,205630 + ,104 + ,512 + ,50 + ,78 + ,41 + ,154 + ,249771 + ,18487 + ,181712 + ,68 + ,63 + ,2110 + ,184970 + ,60 + ,648 + ,58 + ,126 + ,38 + ,148 + ,71154 + ,18050 + ,80906 + ,112 + ,109 + ,1601 + ,168990 + ,60 + ,588 + ,67 + ,73 + ,37 + ,134 + ,71571 + ,17696 + ,75881 + ,103 + ,101 + ,1643 + ,151231 + ,45 + ,608 + ,41 + ,62 + ,28 + ,109 + ,55918 + ,17326 + ,83963 + ,63 + ,61 + ,3559 + ,421615 + ,108 + ,1165 + ,114 + ,141 + ,45 + ,175 + ,160141 + ,39361 + ,175721 + ,166 + ,157 + ,1358 + ,145916 + ,67 + ,649 + ,45 + ,30 + ,26 + ,99 + ,38692 + ,9648 + ,68580 + ,38 + ,38 + ,2204 + ,270487 + ,99 + ,623 + ,57 + ,116 + ,44 + ,122 + ,102812 + ,26759 + ,136323 + ,163 + ,159 + ,870 + ,80953 + ,25 + ,437 + ,31 + ,49 + ,8 + ,28 + ,56622 + ,7905 + ,55792 + ,59 + ,58 + ,1773 + ,139193 + ,53 + ,752 + ,175 + ,26 + ,27 + ,101 + ,15986 + ,4527 + ,25157 + ,27 + ,27 + ,1202 + ,146777 + ,53 + ,342 + ,63 + ,71 + ,35 + ,129 + ,123534 + ,41517 + ,100922 + ,108 + ,108 + ,3422 + ,335969 + ,174 + ,1351 + ,276 + ,59 + ,37 + ,143 + ,108535 + ,21261 + ,118845 + ,88 + ,83 + ,2417 + ,297676 + ,105 + ,835 + ,91 + ,114 + ,57 + ,206 + ,93879 + ,36099 + ,170492 + ,92 + ,88 + ,3016 + ,175232 + ,101 + ,1027 + ,67 + ,161 + ,41 + ,155 + ,144551 + ,39039 + ,81716 + ,170 + ,164 + ,2233 + ,238938 + ,87 + ,770 + ,58 + ,74 + ,37 + ,138 + ,56750 + ,13841 + ,115750 + ,98 + ,96 + ,1992 + ,228459 + ,71 + ,614 + ,71 + ,151 + ,38 + ,141 + ,127654 + ,23841 + ,105590 + ,205 + ,192 + ,1689 + ,175244 + ,61 + ,545 + ,86 + ,41 + ,31 + ,114 + ,65594 + ,8589 + ,92795 + ,96 + ,94 + ,2916 + ,256299 + ,71 + ,1046 + ,89 + ,121 + ,36 + ,140 + ,59938 + ,15049 + ,82390 + ,107 + ,107 + ,2342 + ,288728 + ,75 + ,907 + ,134 + ,66 + ,36 + ,140 + ,146975 + ,39038 + ,135599 + ,150 + ,144 + ,1624 + ,189252 + ,36 + ,555 + ,64 + ,83 + ,36 + ,140 + ,143372 + ,30391 + ,111542 + ,123 + ,123 + ,1579 + ,222324 + ,49 + ,540 + ,72 + ,94 + ,35 + ,127 + ,168553 + ,39932 + ,162519 + ,176 + ,170 + ,1997 + ,277755 + ,74 + ,736 + ,61 + ,154 + ,39 + ,141 + ,183500 + ,43840 + ,211381 + ,213 + ,210 + ,3760 + ,364710 + ,141 + ,1247 + ,121 + ,151 + ,58 + ,223 + ,165986 + ,43146 + ,189944 + ,208 + ,193 + ,3611 + ,392346 + ,105 + ,1389 + ,73 + ,164 + ,30 + ,114 + ,184923 + ,50099 + ,226168 + ,307 + ,297 + ,2355 + ,260478 + ,112 + ,777 + ,60 + ,115 + ,45 + ,174 + ,140358 + ,40312 + ,117495 + ,125 + ,125 + ,2192 + ,273240 + ,62 + ,802 + ,85 + ,140 + ,41 + ,155 + ,149959 + ,32616 + ,195894 + ,208 + ,204 + ,1984 + ,186310 + ,173 + ,636 + ,116 + ,73 + ,36 + ,138 + ,57224 + ,11338 + ,80684 + ,73 + ,70 + ,602 + ,43287 + ,14 + ,214 + ,43 + ,13 + ,19 + ,71 + ,43750 + ,7409 + ,19630 + ,49 + ,49 + ,2133 + ,185181 + ,78 + ,711 + ,85 + ,89 + ,23 + ,84 + ,48029 + ,18213 + ,88634 + ,82 + ,82 + ,1927 + ,202989 + ,130 + ,685 + ,72 + ,90 + ,40 + ,151 + ,104978 + ,45873 + ,139292 + ,206 + ,205 + ,2535 + ,259498 + ,46 + ,1135 + ,110 + ,128 + ,40 + ,155 + ,100046 + ,39844 + ,128602 + ,112 + ,111 + ,2586 + ,295230 + ,86 + ,999 + ,54 + ,169 + ,40 + ,150 + ,101047 + ,28317 + ,135848 + ,139 + ,135 + ,1072 + ,114156 + ,61 + ,343 + ,44 + ,28 + ,30 + ,112 + ,197426 + ,24797 + ,178377 + ,60 + ,59 + ,3031 + ,151624 + ,82 + ,880 + ,79 + ,116 + ,41 + ,161 + ,160902 + ,7471 + ,106330 + ,70 + ,70 + ,1855 + ,306941 + ,66 + ,604 + ,58 + ,76 + ,40 + ,149 + ,147172 + ,27259 + ,178303 + ,112 + ,108 + ,2237 + ,289398 + ,84 + ,660 + ,70 + ,145 + ,45 + ,164 + ,109432 + ,23201 + ,116938 + ,142 + ,141 + ,398 + ,23623 + ,11 + ,156 + ,9 + ,12 + ,1 + ,0 + ,1168 + ,238 + ,5841 + ,11 + ,11 + ,1821 + ,174970 + ,69 + ,648 + ,49 + ,120 + ,36 + ,139 + ,83248 + ,28830 + ,106020 + ,130 + ,130 + ,530 + ,61857 + ,25 + ,192 + ,25 + ,23 + ,11 + ,32 + ,25162 + ,3913 + ,24610 + ,31 + ,28 + ,1596 + ,163766 + ,48 + ,457 + ,107 + ,83 + ,45 + ,169 + ,45724 + ,9935 + ,74151 + ,132 + ,101 + ,2796 + ,364027 + ,108 + ,1110 + ,63 + ,130 + ,38 + ,140 + ,110529 + ,27738 + ,232241 + ,219 + ,216 + ,387 + ,21054 + ,16 + ,146 + ,2 + ,4 + ,0 + ,0 + ,855 + ,338 + ,6622 + ,4 + ,4 + ,2137 + ,252805 + ,52 + ,866 + ,67 + ,81 + ,30 + ,111 + ,101382 + ,13326 + ,127097 + ,102 + ,97 + ,484 + ,31929 + ,22 + ,200 + ,22 + ,18 + ,8 + ,25 + ,14116 + ,3988 + ,13155 + ,39 + ,39 + ,3223 + ,294609 + ,110 + ,1163 + ,152 + ,103 + ,39 + ,146 + ,89506 + ,24347 + ,160501 + ,125 + ,119 + ,1878 + ,217893 + ,59 + ,639 + ,70 + ,75 + ,44 + ,167 + ,135356 + ,27111 + ,91502 + ,121 + ,118 + ,1521 + ,167612 + ,81 + ,463 + ,95 + ,55 + ,44 + ,165 + ,116066 + ,3938 + ,24469 + ,42 + ,41 + ,1652 + ,149905 + ,51 + ,654 + ,47 + ,43 + ,29 + ,107 + ,144244 + ,17416 + ,88229 + ,111 + ,107 + ,568 + ,38214 + ,34 + ,276 + ,52 + ,16 + ,8 + ,27 + ,8773 + ,1888 + ,13983 + ,16 + ,16 + ,1853 + ,189451 + ,39 + ,646 + ,108 + ,66 + ,39 + ,147 + ,102153 + ,18700 + ,80716 + ,70 + ,69 + ,2627 + ,339683 + ,78 + ,976 + ,105 + ,137 + ,47 + ,178 + ,117440 + ,36809 + ,157384 + ,162 + ,160 + ,1239 + ,186627 + ,57 + ,434 + ,58 + ,50 + ,48 + ,185 + ,104128 + ,24959 + ,122975 + ,173 + ,158 + ,3411 + ,386918 + ,77 + ,1517 + ,131 + ,134 + ,46 + ,179 + ,134238 + ,37343 + ,191469 + ,171 + ,161 + ,2311 + ,302392 + ,95 + ,795 + ,120 + ,152 + ,48 + ,187 + ,134047 + ,21849 + ,231257 + ,172 + ,165 + ,3200 + ,384345 + ,118 + ,1108 + ,107 + ,136 + ,50 + ,186 + ,279488 + ,49809 + ,258287 + ,254 + ,246 + ,1250 + ,187992 + ,35 + ,473 + ,49 + ,71 + ,40 + ,151 + ,79756 + ,21654 + ,122531 + ,90 + ,89 + ,1121 + ,102424 + ,42 + ,401 + ,55 + ,42 + ,36 + ,131 + ,66089 + ,8728 + ,61394 + ,50 + ,49 + ,2793 + ,281117 + ,310 + ,922 + ,149 + ,83 + ,40 + ,155 + ,102070 + ,20920 + ,86480 + ,113 + ,107 + ,4014 + ,399991 + ,163 + ,1426 + ,155 + ,103 + ,46 + ,172 + ,146760 + ,27195 + ,195791 + ,187 + ,182 + ,1628 + ,131692 + ,48 + ,509 + ,100 + ,55 + ,39 + ,148 + ,154771 + ,1037 + ,18284 + ,16 + ,16 + ,3921 + ,371090 + ,127 + ,1652 + ,139 + ,127 + ,42 + ,156 + ,165933 + ,42570 + ,147581 + ,175 + ,173 + ,1830 + ,157429 + ,76 + ,689 + ,76 + ,55 + ,39 + ,143 + ,64593 + ,17672 + ,72558 + ,90 + ,90 + ,1627 + ,236370 + ,46 + ,528 + ,83 + ,104 + ,41 + ,151 + ,92280 + ,34245 + ,147341 + ,140 + ,140 + ,2209 + ,227299 + ,84 + ,775 + ,185 + ,92 + ,42 + ,145 + ,67150 + ,16786 + ,114651 + ,145 + ,142 + ,1738 + ,209904 + ,110 + ,585 + ,69 + ,35 + ,32 + ,125 + ,128692 + ,20954 + ,100187 + ,141 + ,126 + ,3748 + ,355457 + ,111 + ,1516 + ,106 + ,95 + ,39 + ,145 + ,124089 + ,16378 + ,130332 + ,125 + ,123 + ,2103 + ,230883 + ,83 + ,743 + ,61 + ,121 + ,35 + ,129 + ,125386 + ,31852 + ,134218 + ,241 + ,239 + ,2035 + ,173260 + ,63 + ,716 + ,37 + ,41 + ,21 + ,79 + ,37238 + ,2805 + ,10901 + ,16 + ,15 + ,2763 + ,306577 + ,96 + ,891 + ,56 + ,136 + ,45 + ,174 + ,140015 + ,38086 + ,145758 + ,175 + ,170 + ,1705 + ,141789 + ,54 + ,611 + ,122 + ,147 + ,50 + ,192 + ,150047 + ,21166 + ,75767 + ,132 + ,123 + ,2319 + ,210565 + ,78 + ,901 + ,52 + ,88 + ,36 + ,132 + ,154451 + ,34672 + ,134969 + ,154 + ,151 + ,2393 + ,273544 + ,99 + ,750 + ,60 + ,170 + ,44 + ,159 + ,156349 + ,36171 + ,169216 + ,198 + ,194 + ,2 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,207 + ,14688 + ,10 + ,85 + ,0 + ,4 + ,0 + ,0 + ,6023 + ,2065 + ,7953 + ,5 + ,5 + ,5 + ,98 + ,1 + ,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 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1931 + ,216803 + ,82 + ,662 + ,58 + ,61 + ,37 + ,133 + ,84601 + ,19354 + ,105406 + ,125 + ,122 + ,2965 + ,347930 + ,136 + ,981 + ,108 + ,125 + ,47 + ,185 + ,68946 + ,22124 + ,174586 + ,174 + ,173 + ,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 + ,151 + ,7199 + ,5 + ,74 + ,0 + ,7 + ,0 + ,0 + ,1644 + ,556 + ,4245 + ,6 + ,6 + ,474 + ,46660 + ,20 + ,259 + ,7 + ,12 + ,5 + ,15 + ,6179 + ,2089 + ,21509 + ,13 + ,13 + ,141 + ,17547 + ,5 + ,69 + ,3 + ,0 + ,1 + ,4 + ,3926 + ,2658 + ,7670 + ,3 + ,3 + ,1031 + ,112892 + ,42 + ,277 + ,88 + ,37 + ,43 + ,152 + ,52789 + ,1813 + ,15673 + ,35 + ,35 + ,29 + ,969 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1650 + ,189334 + ,62 + ,544 + ,46 + ,47 + ,31 + ,113 + ,100350 + ,17372 + ,75882 + ,80 + ,72) + ,dim=c(13 + ,164) + ,dimnames=list(c('Pageviews' + ,'Total_Time_spent_in_rfc' + ,'Logins' + ,'Course_Compendium_Views' + ,'Compendium_Views_pr_only' + ,'Blogged_Computations' + ,'Reviewed_Compendiums' + ,'submitted_Feedback_Messages_in_Peer_Reviews' + ,'Number_of_characters' + ,'Total_number_of_revisions' + ,'Total_Time' + ,'Hyperlinks' + ,'Blogs') + ,1:164)) > y <- array(NA,dim=c(13,164),dimnames=list(c('Pageviews','Total_Time_spent_in_rfc','Logins','Course_Compendium_Views','Compendium_Views_pr_only','Blogged_Computations','Reviewed_Compendiums','submitted_Feedback_Messages_in_Peer_Reviews','Number_of_characters','Total_number_of_revisions','Total_Time','Hyperlinks','Blogs'),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' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > 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] "Total_Time_spent_in_rfc" > x[,par1] [1] 269966 146082 214542 212452 157206 70849 476347 33186 201983 211698 [11] 292874 223814 156623 327332 205898 369527 290571 292903 168639 253641 [21] 269240 414808 161910 178722 200181 203700 267099 262716 155915 324641 [31] 261785 192626 318563 97615 343613 272026 408580 206904 115469 310587 [41] 315746 157897 192883 165876 153778 414493 78800 207958 323118 175523 [51] 213050 24188 364968 65029 101097 263096 302012 315753 300531 240445 [61] 360325 296186 210104 247076 220722 216027 187773 227055 229181 159082 [71] 232624 73566 231827 181728 162366 329583 303317 205630 184970 168990 [81] 151231 421615 145916 270487 80953 139193 146777 335969 297676 175232 [91] 238938 228459 175244 256299 288728 189252 222324 277755 364710 392346 [101] 260478 273240 186310 43287 185181 202989 259498 295230 114156 151624 [111] 306941 289398 23623 174970 61857 163766 364027 21054 252805 31929 [121] 294609 217893 167612 149905 38214 189451 339683 186627 386918 302392 [131] 384345 187992 102424 281117 399991 131692 371090 157429 236370 227299 [141] 209904 355457 230883 173260 306577 141789 210565 273544 1 14688 [151] 98 455 0 0 216803 347930 0 203 7199 46660 [161] 17547 112892 969 189334 > 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 31929 33186 38214 43287 46660 61857 65029 70849 73566 78800 1 1 1 1 1 1 1 1 1 1 1 80953 97615 101097 102424 112892 114156 115469 131692 139193 141789 145916 1 1 1 1 1 1 1 1 1 1 1 146082 146777 149905 151231 151624 153778 155915 156623 157206 157429 157897 1 1 1 1 1 1 1 1 1 1 1 159082 161910 162366 163766 165876 167612 168639 168990 173260 174970 175232 1 1 1 1 1 1 1 1 1 1 1 175244 175523 178722 181728 184970 185181 186310 186627 187773 187992 189252 1 1 1 1 1 1 1 1 1 1 1 189334 189451 192626 192883 200181 201983 202989 203700 205630 205898 206904 1 1 1 1 1 1 1 1 1 1 1 207958 209904 210104 210565 211698 212452 213050 214542 216027 216803 217893 1 1 1 1 1 1 1 1 1 1 1 220722 222324 223814 227055 227299 228459 229181 230883 231827 232624 236370 1 1 1 1 1 1 1 1 1 1 1 238938 240445 247076 252805 253641 256299 259498 260478 261785 262716 263096 1 1 1 1 1 1 1 1 1 1 1 267099 269240 269966 270487 272026 273240 273544 277755 281117 288728 289398 1 1 1 1 1 1 1 1 1 1 1 290571 292874 292903 294609 295230 296186 297676 300531 302012 302392 303317 1 1 1 1 1 1 1 1 1 1 1 306577 306941 310587 315746 315753 318563 323118 324641 327332 329583 335969 1 1 1 1 1 1 1 1 1 1 1 339683 343613 347930 355457 360325 364027 364710 364968 369527 371090 384345 1 1 1 1 1 1 1 1 1 1 1 386918 392346 399991 408580 414493 414808 421615 476347 1 1 1 1 1 1 1 1 > colnames(x) [1] "Pageviews" [2] "Total_Time_spent_in_rfc" [3] "Logins" [4] "Course_Compendium_Views" [5] "Compendium_Views_pr_only" [6] "Blogged_Computations" [7] "Reviewed_Compendiums" [8] "submitted_Feedback_Messages_in_Peer_Reviews" [9] "Number_of_characters" [10] "Total_number_of_revisions" [11] "Total_Time" [12] "Hyperlinks" [13] "Blogs" > colnames(x)[par1] [1] "Total_Time_spent_in_rfc" > x[,par1] [1] 269966 146082 214542 212452 157206 70849 476347 33186 201983 211698 [11] 292874 223814 156623 327332 205898 369527 290571 292903 168639 253641 [21] 269240 414808 161910 178722 200181 203700 267099 262716 155915 324641 [31] 261785 192626 318563 97615 343613 272026 408580 206904 115469 310587 [41] 315746 157897 192883 165876 153778 414493 78800 207958 323118 175523 [51] 213050 24188 364968 65029 101097 263096 302012 315753 300531 240445 [61] 360325 296186 210104 247076 220722 216027 187773 227055 229181 159082 [71] 232624 73566 231827 181728 162366 329583 303317 205630 184970 168990 [81] 151231 421615 145916 270487 80953 139193 146777 335969 297676 175232 [91] 238938 228459 175244 256299 288728 189252 222324 277755 364710 392346 [101] 260478 273240 186310 43287 185181 202989 259498 295230 114156 151624 [111] 306941 289398 23623 174970 61857 163766 364027 21054 252805 31929 [121] 294609 217893 167612 149905 38214 189451 339683 186627 386918 302392 [131] 384345 187992 102424 281117 399991 131692 371090 157429 236370 227299 [141] 209904 355457 230883 173260 306577 141789 210565 273544 1 14688 [151] 98 455 0 0 216803 347930 0 203 7199 46660 [161] 17547 112892 969 189334 > 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/1el2e1323875187.tab") + } + } > m Conditional inference tree with 10 terminal nodes Response: Total_Time_spent_in_rfc Inputs: Pageviews, Logins, Course_Compendium_Views, Compendium_Views_pr_only, Blogged_Computations, Reviewed_Compendiums, submitted_Feedback_Messages_in_Peer_Reviews, Number_of_characters, Total_number_of_revisions, Total_Time, Hyperlinks, Blogs Number of observations: 164 1) Pageviews <= 1202; criterion = 1, statistic = 135.031 2) Pageviews <= 602; criterion = 1, statistic = 29.784 3) Total_Time <= 4245; criterion = 1, statistic = 17.328 4)* weights = 9 3) Total_Time > 4245 5)* weights = 11 2) Pageviews > 602 6)* weights = 14 1) Pageviews > 1202 7) Pageviews <= 2613; criterion = 1, statistic = 80.548 8) Total_Time <= 122975; criterion = 1, statistic = 53.577 9) Pageviews <= 1853; criterion = 1, statistic = 18.416 10) Total_Time <= 94333; criterion = 0.998, statistic = 13.818 11)* weights = 20 10) Total_Time > 94333 12)* weights = 14 9) Pageviews > 1853 13)* weights = 24 8) Total_Time > 122975 14) Total_Time <= 162519; criterion = 0.977, statistic = 9.646 15)* weights = 19 14) Total_Time > 162519 16)* weights = 16 7) Pageviews > 2613 17) Course_Compendium_Views <= 1146; criterion = 0.998, statistic = 13.964 18)* weights = 19 17) Course_Compendium_Views > 1146 19)* weights = 18 > postscript(file="/var/wessaorg/rcomp/tmp/2udi41323875187.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/3k7ce1323875187.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 269966 290110.3125 -20144.31250 2 146082 104493.9286 41588.07143 3 214542 191246.9286 23295.07143 4 212452 219248.3750 -6796.37500 5 157206 104493.9286 52712.07143 6 70849 104493.9286 -33644.92857 7 476347 370981.9444 105365.05556 8 33186 32384.8182 801.18182 9 201983 219248.3750 -17265.37500 10 211698 191246.9286 20451.07143 11 292874 290110.3125 2763.68750 12 223814 219248.3750 4565.62500 13 156623 160551.9500 -3928.95000 14 327332 292011.8421 35320.15789 15 205898 191246.9286 14651.07143 16 369527 370981.9444 -1454.94444 17 290571 290110.3125 460.68750 18 292903 292011.8421 891.15789 19 168639 191246.9286 -22607.92857 20 253641 240646.7895 12994.21053 21 269240 240646.7895 28593.21053 22 414808 370981.9444 43826.05556 23 161910 191246.9286 -29336.92857 24 178722 191246.9286 -12524.92857 25 200181 292011.8421 -91830.84211 26 203700 219248.3750 -15548.37500 27 267099 292011.8421 -24912.84211 28 262716 240646.7895 22069.21053 29 155915 160551.9500 -4636.95000 30 324641 292011.8421 32629.15789 31 261785 290110.3125 -28325.31250 32 192626 191246.9286 1379.07143 33 318563 290110.3125 28452.68750 34 97615 104493.9286 -6878.92857 35 343613 292011.8421 51601.15789 36 272026 370981.9444 -98955.94444 37 408580 370981.9444 37598.05556 38 206904 191246.9286 15657.07143 39 115469 104493.9286 10975.07143 40 310587 292011.8421 18575.15789 41 315746 370981.9444 -55235.94444 42 157897 160551.9500 -2654.95000 43 192883 240646.7895 -47763.78947 44 165876 160551.9500 5324.05000 45 153778 219248.3750 -65470.37500 46 414493 370981.9444 43511.05556 47 78800 104493.9286 -25693.92857 48 207958 219248.3750 -11290.37500 49 323118 370981.9444 -47863.94444 50 175523 219248.3750 -43725.37500 51 213050 240646.7895 -27596.78947 52 24188 32384.8182 -8196.81818 53 364968 290110.3125 74857.68750 54 65029 104493.9286 -39464.92857 55 101097 104493.9286 -3396.92857 56 263096 292011.8421 -28915.84211 57 302012 290110.3125 11901.68750 58 315753 292011.8421 23741.15789 59 300531 290110.3125 10420.68750 60 240445 219248.3750 21196.62500 61 360325 370981.9444 -10656.94444 62 296186 292011.8421 4174.15789 63 210104 219248.3750 -9144.37500 64 247076 240646.7895 6429.21053 65 220722 240646.7895 -19924.78947 66 216027 240646.7895 -24619.78947 67 187773 191246.9286 -3473.92857 68 227055 240646.7895 -13591.78947 69 229181 219248.3750 9932.62500 70 159082 160551.9500 -1469.95000 71 232624 219248.3750 13375.62500 72 73566 104493.9286 -30927.92857 73 231827 219248.3750 12578.62500 74 181728 160551.9500 21176.05000 75 162366 160551.9500 1814.05000 76 329583 219248.3750 110334.62500 77 303317 290110.3125 13206.68750 78 205630 290110.3125 -84480.31250 79 184970 219248.3750 -34278.37500 80 168990 160551.9500 8438.05000 81 151231 160551.9500 -9320.95000 82 421615 370981.9444 50633.05556 83 145916 160551.9500 -14635.95000 84 270487 240646.7895 29840.21053 85 80953 104493.9286 -23540.92857 86 139193 160551.9500 -21358.95000 87 146777 104493.9286 42283.07143 88 335969 370981.9444 -35012.94444 89 297676 290110.3125 7565.68750 90 175232 292011.8421 -116779.84211 91 238938 219248.3750 19689.62500 92 228459 219248.3750 9210.62500 93 175244 160551.9500 14692.05000 94 256299 292011.8421 -35712.84211 95 288728 240646.7895 48081.21053 96 189252 191246.9286 -1994.92857 97 222324 240646.7895 -18322.78947 98 277755 290110.3125 -12355.31250 99 364710 370981.9444 -6271.94444 100 392346 370981.9444 21364.05556 101 260478 219248.3750 41229.62500 102 273240 290110.3125 -16870.31250 103 186310 219248.3750 -32938.37500 104 43287 32384.8182 10902.18182 105 185181 219248.3750 -34067.37500 106 202989 240646.7895 -37657.78947 107 259498 240646.7895 18851.21053 108 295230 240646.7895 54583.21053 109 114156 104493.9286 9662.07143 110 151624 292011.8421 -140387.84211 111 306941 290110.3125 16830.68750 112 289398 219248.3750 70149.62500 113 23623 32384.8182 -8761.81818 114 174970 191246.9286 -16276.92857 115 61857 32384.8182 29472.18182 116 163766 160551.9500 3214.05000 117 364027 292011.8421 72015.15789 118 21054 32384.8182 -11330.81818 119 252805 240646.7895 12158.21053 120 31929 32384.8182 -455.81818 121 294609 370981.9444 -76372.94444 122 217893 219248.3750 -1355.37500 123 167612 160551.9500 7060.05000 124 149905 160551.9500 -10646.95000 125 38214 32384.8182 5829.18182 126 189451 160551.9500 28899.05000 127 339683 292011.8421 47671.15789 128 186627 191246.9286 -4619.92857 129 386918 370981.9444 15936.05556 130 302392 290110.3125 12281.68750 131 384345 292011.8421 92333.15789 132 187992 191246.9286 -3254.92857 133 102424 104493.9286 -2069.92857 134 281117 292011.8421 -10894.84211 135 399991 370981.9444 29009.05556 136 131692 160551.9500 -28859.95000 137 371090 370981.9444 108.05556 138 157429 160551.9500 -3122.95000 139 236370 240646.7895 -4276.78947 140 227299 219248.3750 8050.62500 141 209904 191246.9286 18657.07143 142 355457 370981.9444 -15524.94444 143 230883 240646.7895 -9763.78947 144 173260 219248.3750 -45988.37500 145 306577 292011.8421 14565.15789 146 141789 160551.9500 -18762.95000 147 210565 240646.7895 -30081.78947 148 273544 290110.3125 -16566.31250 149 1 991.6667 -990.66667 150 14688 32384.8182 -17696.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 216803 219248.3750 -2445.37500 156 347930 292011.8421 55918.15789 157 0 991.6667 -991.66667 158 203 991.6667 -788.66667 159 7199 991.6667 6207.33333 160 46660 32384.8182 14275.18182 161 17547 32384.8182 -14837.81818 162 112892 104493.9286 8398.07143 163 969 991.6667 -22.66667 164 189334 160551.9500 28782.05000 > 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/4g7vx1323875187.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/5g1p81323875187.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/6bb2i1323875187.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/7i35y1323875187.tab") + } > > try(system("convert tmp/2udi41323875187.ps tmp/2udi41323875187.png",intern=TRUE)) character(0) > try(system("convert tmp/3k7ce1323875187.ps tmp/3k7ce1323875187.png",intern=TRUE)) character(0) > try(system("convert tmp/4g7vx1323875187.ps tmp/4g7vx1323875187.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.579 0.254 4.831