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(210907 + ,79 + ,81 + ,94 + ,56 + ,3 + ,120982 + ,58 + ,55 + ,103 + ,56 + ,4 + ,176508 + ,60 + ,50 + ,93 + ,54 + ,12 + ,179321 + ,108 + ,125 + ,103 + ,89 + ,2 + ,123185 + ,49 + ,40 + ,51 + ,40 + ,1 + ,52746 + ,0 + ,37 + ,70 + ,25 + ,3 + ,385534 + ,121 + ,63 + ,91 + ,92 + ,0 + ,33170 + ,1 + ,44 + ,22 + ,18 + ,0 + ,101645 + ,20 + ,88 + ,38 + ,63 + ,0 + ,149061 + ,43 + ,66 + ,93 + ,44 + ,5 + ,165446 + ,69 + ,57 + ,60 + ,33 + ,0 + ,237213 + ,78 + ,74 + ,123 + ,84 + ,0 + ,173326 + ,86 + ,49 + ,148 + ,88 + ,7 + ,133131 + ,44 + ,52 + ,90 + ,55 + ,7 + ,258873 + ,104 + ,88 + ,124 + ,60 + ,3 + ,180083 + ,63 + ,36 + ,70 + ,66 + ,9 + ,324799 + ,158 + ,108 + ,168 + ,154 + ,0 + ,230964 + ,102 + ,43 + ,115 + ,53 + ,4 + ,236785 + ,77 + ,75 + ,71 + ,119 + ,3 + ,135473 + ,82 + ,32 + ,66 + ,41 + ,0 + ,202925 + ,115 + ,44 + ,134 + ,61 + ,7 + ,215147 + ,101 + ,85 + ,117 + ,58 + ,0 + ,344297 + ,80 + ,86 + ,108 + ,75 + ,1 + ,153935 + ,50 + ,56 + ,84 + ,33 + ,5 + ,132943 + ,83 + ,50 + ,156 + ,40 + ,7 + ,174724 + ,123 + ,135 + ,120 + ,92 + ,0 + ,174415 + ,73 + ,63 + ,114 + ,100 + ,0 + ,225548 + ,81 + ,81 + ,94 + ,112 + ,5 + ,223632 + ,105 + ,52 + ,120 + ,73 + ,0 + ,124817 + ,47 + ,44 + ,81 + ,40 + ,0 + ,221698 + ,105 + ,113 + ,110 + ,45 + ,0 + ,210767 + ,94 + ,39 + ,133 + ,60 + ,3 + ,170266 + ,44 + ,73 + ,122 + ,62 + ,4 + ,260561 + ,114 + ,48 + ,158 + ,75 + ,1 + ,84853 + ,38 + ,33 + ,109 + ,31 + ,4 + ,294424 + ,107 + ,59 + ,124 + ,77 + ,2 + ,101011 + ,30 + ,41 + ,39 + ,34 + ,0 + ,215641 + ,71 + ,69 + ,92 + ,46 + ,0 + ,325107 + ,84 + ,64 + ,126 + ,99 + ,0 + ,7176 + ,0 + ,1 + ,0 + ,17 + ,0 + ,167542 + ,59 + ,59 + ,70 + ,66 + ,2 + ,106408 + ,33 + ,32 + ,37 + ,30 + ,1 + ,96560 + ,42 + ,129 + ,38 + ,76 + ,0 + ,265769 + ,96 + ,37 + ,120 + ,146 + ,2 + ,269651 + ,106 + ,31 + ,93 + ,67 + ,10 + ,149112 + ,56 + ,65 + ,95 + ,56 + ,6 + ,175824 + ,57 + ,107 + ,77 + ,107 + ,0 + ,152871 + ,59 + ,74 + ,90 + ,58 + ,5 + ,111665 + ,39 + ,54 + ,80 + ,34 + ,4 + ,116408 + ,34 + ,76 + ,31 + ,61 + ,1 + ,362301 + ,76 + ,715 + ,110 + ,119 + ,2 + ,78800 + ,20 + ,57 + ,66 + ,42 + ,2 + ,183167 + ,91 + ,66 + ,138 + ,66 + ,0 + ,277965 + ,115 + ,106 + ,133 + ,89 + ,8 + ,150629 + ,85 + ,54 + ,113 + ,44 + ,3 + ,168809 + ,76 + ,32 + ,100 + ,66 + ,0 + ,24188 + ,8 + ,20 + ,7 + ,24 + ,0 + ,329267 + ,79 + ,71 + ,140 + ,259 + ,8 + ,65029 + ,21 + ,21 + ,61 + ,17 + ,5 + ,101097 + ,30 + ,70 + ,41 + ,64 + ,3 + ,218946 + ,76 + ,112 + ,96 + ,41 + ,1 + ,244052 + ,101 + ,66 + ,164 + ,68 + ,5 + ,341570 + ,94 + ,190 + ,78 + ,168 + ,1 + ,103597 + ,27 + ,66 + ,49 + ,43 + ,1 + ,233328 + ,92 + ,165 + ,102 + ,132 + ,5 + ,256462 + ,123 + ,56 + ,124 + ,105 + ,0 + ,206161 + ,75 + ,61 + ,99 + ,71 + ,12 + ,311473 + ,128 + ,53 + ,129 + ,112 + ,8 + ,235800 + ,105 + ,127 + ,62 + ,94 + ,8 + ,177939 + ,55 + ,63 + ,73 + ,82 + ,8 + ,207176 + ,56 + ,38 + ,114 + ,70 + ,8 + ,196553 + ,41 + ,50 + ,99 + ,57 + ,2 + ,174184 + ,72 + ,52 + ,70 + ,53 + ,0 + ,143246 + ,67 + ,42 + ,104 + ,103 + ,5 + ,187559 + ,75 + ,76 + ,116 + ,121 + ,8 + ,187681 + ,114 + ,67 + ,91 + ,62 + ,2 + ,119016 + ,118 + ,50 + ,74 + ,52 + ,5 + ,182192 + ,77 + ,53 + ,138 + ,52 + ,12 + ,73566 + ,22 + ,39 + ,67 + ,32 + ,6 + ,194979 + ,66 + ,50 + ,151 + ,62 + ,7 + ,167488 + ,69 + ,77 + ,72 + ,45 + ,2 + ,143756 + ,105 + ,57 + ,120 + ,46 + ,0 + ,275541 + ,116 + ,73 + ,115 + ,63 + ,4 + ,243199 + ,88 + ,34 + ,105 + ,75 + ,3 + ,182999 + ,73 + ,39 + ,104 + ,88 + ,6 + ,135649 + ,99 + ,46 + ,108 + ,46 + ,2 + ,152299 + ,62 + ,63 + ,98 + ,53 + ,0 + ,120221 + ,53 + ,35 + ,69 + ,37 + ,1 + ,346485 + ,118 + ,106 + ,111 + ,90 + ,0 + ,145790 + ,30 + ,43 + ,99 + ,63 + ,5 + ,193339 + ,100 + ,47 + ,71 + ,78 + ,2 + ,80953 + ,49 + ,31 + ,27 + ,25 + ,0 + ,122774 + ,24 + ,162 + ,69 + ,45 + ,0 + ,130585 + ,67 + ,57 + ,107 + ,46 + ,5 + ,112611 + ,46 + ,36 + ,73 + ,41 + ,0 + ,286468 + ,57 + ,263 + ,107 + ,144 + ,1 + ,241066 + ,75 + ,78 + ,93 + ,82 + ,0 + ,148446 + ,135 + ,63 + ,129 + ,91 + ,1 + ,204713 + ,68 + ,54 + ,69 + ,71 + ,1 + ,182079 + ,124 + ,63 + ,118 + ,63 + ,2 + ,140344 + ,33 + ,77 + ,73 + ,53 + ,6 + ,220516 + ,98 + ,79 + ,119 + ,62 + ,1 + ,243060 + ,58 + ,110 + ,104 + ,63 + ,4 + ,162765 + ,68 + ,56 + ,107 + ,32 + ,2 + ,182613 + ,81 + ,56 + ,99 + ,39 + ,3 + ,232138 + ,131 + ,43 + ,90 + ,62 + ,0 + ,265318 + ,110 + ,111 + ,197 + ,117 + ,10 + ,85574 + ,37 + ,71 + ,36 + ,34 + ,0 + ,310839 + ,130 + ,62 + ,85 + ,92 + ,9 + ,225060 + ,93 + ,56 + ,139 + ,93 + ,7 + ,232317 + ,118 + ,74 + ,106 + ,54 + ,0 + ,144966 + ,39 + ,60 + ,50 + ,144 + ,0 + ,43287 + ,13 + ,43 + ,64 + ,14 + ,4 + ,155754 + ,74 + ,68 + ,31 + ,61 + ,4 + ,164709 + ,81 + ,53 + ,63 + ,109 + ,0 + ,201940 + ,109 + ,87 + ,92 + ,38 + ,0 + ,235454 + ,151 + ,46 + ,106 + ,73 + ,0 + ,220801 + ,51 + ,105 + ,63 + ,75 + ,1 + ,99466 + ,28 + ,32 + ,69 + ,50 + ,0 + ,92661 + ,40 + ,133 + ,41 + ,61 + ,1 + ,133328 + ,56 + ,79 + ,56 + ,55 + ,0 + ,61361 + ,27 + ,51 + ,25 + ,77 + ,0 + ,125930 + ,37 + ,207 + ,65 + ,75 + ,4 + ,100750 + ,83 + ,67 + ,93 + ,72 + ,0 + ,224549 + ,54 + ,47 + ,114 + ,50 + ,4 + ,82316 + ,27 + ,34 + ,38 + ,32 + ,4 + ,102010 + ,28 + ,66 + ,44 + ,53 + ,3 + ,101523 + ,59 + ,76 + ,87 + ,42 + ,0 + ,243511 + ,133 + ,65 + ,110 + ,71 + ,0 + ,22938 + ,12 + ,9 + ,0 + ,10 + ,0 + ,41566 + ,0 + ,42 + ,27 + ,35 + ,5 + ,152474 + ,106 + ,45 + ,83 + ,65 + ,0 + ,61857 + ,23 + ,25 + ,30 + ,25 + ,4 + ,99923 + ,44 + ,115 + ,80 + ,66 + ,0 + ,132487 + ,71 + ,97 + ,98 + ,41 + ,0 + ,317394 + ,116 + ,53 + ,82 + ,86 + ,1 + ,21054 + ,4 + ,2 + ,0 + ,16 + ,0 + ,209641 + ,62 + ,52 + ,60 + ,42 + ,5 + ,22648 + ,12 + ,44 + ,28 + ,19 + ,0 + ,31414 + ,18 + ,22 + ,9 + ,19 + ,0 + ,46698 + ,14 + ,35 + ,33 + ,45 + ,0 + ,131698 + ,60 + ,74 + ,59 + ,65 + ,0 + ,91735 + ,7 + ,103 + ,49 + ,35 + ,0 + ,244749 + ,98 + ,144 + ,115 + ,95 + ,2 + ,184510 + ,64 + ,60 + ,140 + ,49 + ,7 + ,79863 + ,29 + ,134 + ,49 + ,37 + ,1 + ,128423 + ,32 + ,89 + ,120 + ,64 + ,8 + ,97839 + ,25 + ,42 + ,66 + ,38 + ,2 + ,38214 + ,16 + ,52 + ,21 + ,34 + ,0 + ,151101 + ,48 + ,98 + ,124 + ,32 + ,2 + ,272458 + ,100 + ,99 + ,152 + ,65 + ,0 + ,172494 + ,46 + ,52 + ,139 + ,52 + ,0 + ,108043 + ,45 + ,29 + ,38 + ,62 + ,1 + ,328107 + ,129 + ,125 + ,144 + ,65 + ,3 + ,250579 + ,130 + ,106 + ,120 + ,83 + ,0 + ,351067 + ,136 + ,95 + ,160 + ,95 + ,3 + ,158015 + ,59 + ,40 + ,114 + ,29 + ,0 + ,98866 + ,25 + ,140 + ,39 + ,18 + ,0 + ,85439 + ,32 + ,43 + ,78 + ,33 + ,0 + ,229242 + ,63 + ,128 + ,119 + ,247 + ,4 + ,351619 + ,95 + ,142 + ,141 + ,139 + ,4 + ,84207 + ,14 + ,73 + ,101 + ,29 + ,11 + ,120445 + ,36 + ,72 + ,56 + ,118 + ,0 + ,324598 + ,113 + ,128 + ,133 + ,110 + ,0 + ,131069 + ,47 + ,61 + ,83 + ,67 + ,4 + ,204271 + ,92 + ,73 + ,116 + ,42 + ,0 + ,165543 + ,70 + ,148 + ,90 + ,65 + ,1 + ,141722 + ,19 + ,64 + ,36 + ,94 + ,0 + ,116048 + ,50 + ,45 + ,50 + ,64 + ,0 + ,250047 + ,41 + ,58 + ,61 + ,81 + ,0 + ,299775 + ,91 + ,97 + ,97 + ,95 + ,9 + ,195838 + ,111 + ,50 + ,98 + ,67 + ,1 + ,173260 + ,41 + ,37 + ,78 + ,63 + ,3 + ,254488 + ,120 + ,50 + ,117 + ,83 + ,10 + ,104389 + ,135 + ,105 + ,148 + ,45 + ,5 + ,136084 + ,27 + ,69 + ,41 + ,30 + ,0 + ,199476 + ,87 + ,46 + ,105 + ,70 + ,2 + ,92499 + ,25 + ,57 + ,55 + ,32 + ,0 + ,224330 + ,131 + ,52 + ,132 + ,83 + ,1 + ,135781 + ,45 + ,98 + ,44 + ,31 + ,2 + ,74408 + ,29 + ,61 + ,21 + ,67 + ,4 + ,81240 + ,58 + ,89 + ,50 + ,66 + ,0 + ,14688 + ,4 + ,0 + ,0 + ,10 + ,0 + ,181633 + ,47 + ,48 + ,73 + ,70 + ,2 + ,271856 + ,109 + ,91 + ,86 + ,103 + ,1 + ,7199 + ,7 + ,0 + ,0 + ,5 + ,0 + ,46660 + ,12 + ,7 + ,13 + ,20 + ,0 + ,17547 + ,0 + ,3 + ,4 + ,5 + ,0 + ,133368 + ,37 + ,54 + ,57 + ,36 + ,1 + ,95227 + ,37 + ,70 + ,48 + ,34 + ,0 + ,152601 + ,46 + ,36 + ,46 + ,48 + ,2 + ,98146 + ,15 + ,37 + ,48 + ,40 + ,0 + ,79619 + ,42 + ,123 + ,32 + ,43 + ,3 + ,59194 + ,7 + ,247 + ,68 + ,31 + ,6 + ,139942 + ,54 + ,46 + ,87 + ,42 + ,0 + ,118612 + ,54 + ,72 + ,43 + ,46 + ,2 + ,72880 + ,14 + ,41 + ,67 + ,33 + ,0 + ,65475 + ,16 + ,24 + ,46 + ,18 + ,2 + ,99643 + ,33 + ,45 + ,46 + ,55 + ,1 + ,71965 + ,32 + ,33 + ,56 + ,35 + ,1 + ,77272 + ,21 + ,27 + ,48 + ,59 + ,2 + ,49289 + ,15 + ,36 + ,44 + ,19 + ,1 + ,135131 + ,38 + ,87 + ,60 + ,66 + ,0 + ,108446 + ,22 + ,90 + ,65 + ,60 + ,1 + ,89746 + ,28 + ,114 + ,55 + ,36 + ,3 + ,44296 + ,10 + ,31 + ,38 + ,25 + ,0 + ,77648 + ,31 + ,45 + ,52 + ,47 + ,0 + ,181528 + ,32 + ,69 + ,60 + ,54 + ,0 + ,134019 + ,32 + ,51 + ,54 + ,53 + ,0 + ,124064 + ,43 + ,34 + ,86 + ,40 + ,1 + ,92630 + ,27 + ,60 + ,24 + ,40 + ,4 + ,121848 + ,37 + ,45 + ,52 + ,39 + ,0 + ,52915 + ,20 + ,54 + ,49 + ,14 + ,0 + ,81872 + ,32 + ,25 + ,61 + ,45 + ,0 + ,58981 + ,0 + ,38 + ,61 + ,36 + ,7 + ,53515 + ,5 + ,52 + ,81 + ,28 + ,2 + ,60812 + ,26 + ,67 + ,43 + ,44 + ,0 + ,56375 + ,10 + ,74 + ,40 + ,30 + ,7 + ,65490 + ,27 + ,38 + ,40 + ,22 + ,3 + ,80949 + ,11 + ,30 + ,56 + ,17 + ,0 + ,76302 + ,29 + ,26 + ,68 + ,31 + ,0 + ,104011 + ,25 + ,67 + ,79 + ,55 + ,6 + ,98104 + ,55 + ,132 + ,47 + ,54 + ,2 + ,67989 + ,23 + ,42 + ,57 + ,21 + ,0 + ,30989 + ,5 + ,35 + ,41 + ,14 + ,0 + ,135458 + ,43 + ,118 + ,29 + ,81 + ,3 + ,73504 + ,23 + ,68 + ,3 + ,35 + ,0 + ,63123 + ,34 + ,43 + ,60 + ,43 + ,1 + ,61254 + ,36 + ,76 + ,30 + ,46 + ,1 + ,74914 + ,35 + ,64 + ,79 + ,30 + ,0 + ,31774 + ,0 + ,48 + ,47 + ,23 + ,1 + ,81437 + ,37 + ,64 + ,40 + ,38 + ,0 + ,87186 + ,28 + ,56 + ,48 + ,54 + ,0 + ,50090 + ,16 + ,71 + ,36 + ,20 + ,0 + ,65745 + ,26 + ,75 + ,42 + ,53 + ,0 + ,56653 + ,38 + ,39 + ,49 + ,45 + ,0 + ,158399 + ,23 + ,42 + ,57 + ,39 + ,0 + ,46455 + ,22 + ,39 + ,12 + ,20 + ,0 + ,73624 + ,30 + ,93 + ,40 + ,24 + ,0 + ,38395 + ,16 + ,38 + ,43 + ,31 + ,0 + ,91899 + ,18 + ,60 + ,33 + ,35 + ,0 + ,139526 + ,28 + ,71 + ,77 + ,151 + ,0 + ,52164 + ,32 + ,52 + ,43 + ,52 + ,0 + ,51567 + ,21 + ,27 + ,45 + ,30 + ,2 + ,70551 + ,23 + ,59 + ,47 + ,31 + ,0 + ,84856 + ,29 + ,40 + ,43 + ,29 + ,1 + ,102538 + ,50 + ,79 + ,45 + ,57 + ,1 + ,86678 + ,12 + ,44 + ,50 + ,40 + ,0 + ,85709 + ,21 + ,65 + ,35 + ,44 + ,0 + ,34662 + ,18 + ,10 + ,7 + ,25 + ,0 + ,150580 + ,27 + ,124 + ,71 + ,77 + ,0 + ,99611 + ,41 + ,81 + ,67 + ,35 + ,0 + ,19349 + ,13 + ,15 + ,0 + ,11 + ,0 + ,99373 + ,12 + ,92 + ,62 + ,63 + ,1 + ,86230 + ,21 + ,42 + ,54 + ,44 + ,0 + ,30837 + ,8 + ,10 + ,4 + ,19 + ,0 + ,31706 + ,26 + ,24 + ,25 + ,13 + ,0 + ,89806 + ,27 + ,64 + ,40 + ,42 + ,0 + ,62088 + ,13 + ,45 + ,38 + ,38 + ,1 + ,40151 + ,16 + ,22 + ,19 + ,29 + ,0 + ,27634 + ,2 + ,56 + ,17 + ,20 + ,0 + ,76990 + ,42 + ,94 + ,67 + ,27 + ,0 + ,37460 + ,5 + ,19 + ,14 + ,20 + ,0 + ,54157 + ,37 + ,35 + ,30 + ,19 + ,0 + ,49862 + ,17 + ,32 + ,54 + ,37 + ,0 + ,84337 + ,38 + ,35 + ,35 + ,26 + ,0 + ,64175 + ,37 + ,48 + ,59 + ,42 + ,0 + ,59382 + ,29 + ,49 + ,24 + ,49 + ,0 + ,119308 + ,32 + ,48 + ,58 + ,30 + ,0 + ,76702 + ,35 + ,62 + ,42 + ,49 + ,0 + ,103425 + ,17 + ,96 + ,46 + ,67 + ,1 + ,70344 + ,20 + ,45 + ,61 + ,28 + ,0 + ,43410 + ,7 + ,63 + ,3 + ,19 + ,0 + ,104838 + ,46 + ,71 + ,52 + ,49 + ,1 + ,62215 + ,24 + ,26 + ,25 + ,27 + ,0 + ,69304 + ,40 + ,48 + ,40 + ,30 + ,6 + ,53117 + ,3 + ,29 + ,32 + ,22 + ,3 + ,19764 + ,10 + ,19 + ,4 + ,12 + ,1 + ,86680 + ,37 + ,45 + ,49 + ,31 + ,2 + ,84105 + ,17 + ,45 + ,63 + ,20 + ,0 + ,77945 + ,28 + ,67 + ,67 + ,20 + ,0 + ,89113 + ,19 + ,30 + ,32 + ,39 + ,0 + ,91005 + ,29 + ,36 + ,23 + ,29 + ,3 + ,40248 + ,8 + ,34 + ,7 + ,16 + ,1 + ,64187 + ,10 + ,36 + ,54 + ,27 + ,0 + ,50857 + ,15 + ,34 + ,37 + ,21 + ,0 + ,56613 + ,15 + ,37 + ,35 + ,19 + ,1 + ,62792 + ,28 + ,46 + ,51 + ,35 + ,0 + ,72535 + ,17 + ,44 + ,39 + ,14 + ,0) + ,dim=c(6 + ,289) + ,dimnames=list(c('time_in_rfc' + ,'blogged_computations' + ,'compendium_views_pr' + ,'feedback' + ,'logins' + ,'shared ') + ,1:289)) > y <- array(NA,dim=c(6,289),dimnames=list(c('time_in_rfc','blogged_computations','compendium_views_pr','feedback','logins','shared '),1:289)) > 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 = '1' > #'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] "time_in_rfc" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > 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]) 7176 7199 14688 17547 19349 19764 21054 22648 22938 24188 27634 1 1 1 1 1 1 1 1 1 1 1 30837 30989 31414 31706 31774 33170 34662 37460 38214 38395 40151 1 1 1 1 1 1 1 1 1 1 1 40248 41566 43287 43410 44296 46455 46660 46698 49289 49862 50090 1 1 1 1 1 1 1 1 1 1 1 50857 51567 52164 52746 52915 53117 53515 54157 56375 56613 56653 1 1 1 1 1 1 1 1 1 1 1 58981 59194 59382 60812 61254 61361 61857 62088 62215 62792 63123 1 1 1 1 1 1 1 1 1 1 1 64175 64187 65029 65475 65490 65745 67989 69304 70344 70551 71965 1 1 1 1 1 1 1 1 1 1 1 72535 72880 73504 73566 73624 74408 74914 76302 76702 76990 77272 1 1 1 1 1 1 1 1 1 1 1 77648 77945 78800 79619 79863 80949 80953 81240 81437 81872 82316 1 1 1 1 1 1 1 1 1 1 1 84105 84207 84337 84853 84856 85439 85574 85709 86230 86678 86680 1 1 1 1 1 1 1 1 1 1 1 87186 89113 89746 89806 91005 91735 91899 92499 92630 92661 95227 1 1 1 1 1 1 1 1 1 1 1 96560 97839 98104 98146 98866 99373 99466 99611 99643 99923 100750 1 1 1 1 1 1 1 1 1 1 1 101011 101097 101523 101645 102010 102538 103425 103597 104011 104389 104838 1 1 1 1 1 1 1 1 1 1 1 106408 108043 108446 111665 112611 116048 116408 118612 119016 119308 120221 1 1 1 1 1 1 1 1 1 1 1 120445 120982 121848 122774 123185 124064 124817 125930 128423 130585 131069 1 1 1 1 1 1 1 1 1 1 1 131698 132487 132943 133131 133328 133368 134019 135131 135458 135473 135649 1 1 1 1 1 1 1 1 1 1 1 135781 136084 139526 139942 140344 141722 143246 143756 144966 145790 148446 1 1 1 1 1 1 1 1 1 1 1 149061 149112 150580 150629 151101 152299 152474 152601 152871 153935 155754 1 1 1 1 1 1 1 1 1 1 1 158015 158399 162765 164709 165446 165543 167488 167542 168809 170266 172494 1 1 1 1 1 1 1 1 1 1 1 173260 173326 174184 174415 174724 175824 176508 177939 179321 180083 181528 1 1 1 1 1 1 1 1 1 1 1 181633 182079 182192 182613 182999 183167 184510 187559 187681 193339 194979 1 1 1 1 1 1 1 1 1 1 1 195838 196553 199476 201940 202925 204271 204713 206161 207176 209641 210767 1 1 1 1 1 1 1 1 1 1 1 210907 215147 215641 218946 220516 220801 221698 223632 224330 224549 225060 1 1 1 1 1 1 1 1 1 1 1 225548 229242 230964 232138 232317 233328 235454 235800 236785 237213 241066 1 1 1 1 1 1 1 1 1 1 1 243060 243199 243511 244052 244749 250047 250579 254488 256462 258873 260561 1 1 1 1 1 1 1 1 1 1 1 265318 265769 269651 271856 272458 275541 277965 286468 294424 299775 310839 1 1 1 1 1 1 1 1 1 1 1 311473 317394 324598 324799 325107 328107 329267 341570 344297 346485 351067 1 1 1 1 1 1 1 1 1 1 1 351619 362301 385534 1 1 1 > colnames(x) [1] "time_in_rfc" "blogged_computations" "compendium_views_pr" [4] "feedback" "logins" "shared..." > colnames(x)[par1] [1] "time_in_rfc" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > 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/17cwr1324462364.tab") + } + } > m Conditional inference tree with 10 terminal nodes Response: time_in_rfc Inputs: blogged_computations, compendium_views_pr, feedback, logins, shared... Number of observations: 289 1) blogged_computations <= 50; criterion = 1, statistic = 198.82 2) blogged_computations <= 18; criterion = 1, statistic = 79.237 3) feedback <= 28; criterion = 1, statistic = 26.086 4) logins <= 17; criterion = 0.99, statistic = 9.619 5)* weights = 9 4) logins > 17 6)* weights = 13 3) feedback > 28 7) logins <= 31; criterion = 0.988, statistic = 9.195 8)* weights = 20 7) logins > 31 9)* weights = 11 2) blogged_computations > 18 10) feedback <= 69; criterion = 1, statistic = 31.331 11) logins <= 52; criterion = 1, statistic = 21.434 12)* weights = 67 11) logins > 52 13)* weights = 25 10) feedback > 69 14)* weights = 24 1) blogged_computations > 50 15) logins <= 72; criterion = 1, statistic = 33.05 16) blogged_computations <= 85; criterion = 0.999, statistic = 14.207 17)* weights = 42 16) blogged_computations > 85 18)* weights = 27 15) logins > 72 19)* weights = 51 > postscript(file="/var/wessaorg/rcomp/tmp/2ktyk1324462364.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/32p7m1324462364.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 210907 162143.43 48763.5714 2 120982 162143.43 -41161.4286 3 176508 162143.43 14364.5714 4 179321 255726.84 -76405.8431 5 123185 84499.04 38685.9552 6 52746 56099.75 -3353.7500 7 385534 255726.84 129807.1569 8 33170 34770.31 -1600.3077 9 101645 115212.68 -13567.6800 10 149061 134977.62 14083.3750 11 165446 162143.43 3302.5714 12 237213 255726.84 -18513.8431 13 173326 255726.84 -82400.8431 14 133131 134977.62 -1846.6250 15 258873 209940.78 48932.2222 16 180083 162143.43 17939.5714 17 324799 255726.84 69072.1569 18 230964 209940.78 21023.2222 19 236785 255726.84 -18941.8431 20 135473 162143.43 -26670.4286 21 202925 209940.78 -7015.7778 22 215147 209940.78 5206.2222 23 344297 255726.84 88570.1569 24 153935 134977.62 18957.3750 25 132943 162143.43 -29200.4286 26 174724 255726.84 -81002.8431 27 174415 255726.84 -81311.8431 28 225548 255726.84 -30178.8431 29 223632 255726.84 -32094.8431 30 124817 134977.62 -10160.6250 31 221698 209940.78 11757.2222 32 210767 209940.78 826.2222 33 170266 134977.62 35288.3750 34 260561 255726.84 4834.1569 35 84853 134977.62 -50124.6250 36 294424 255726.84 38697.1569 37 101011 84499.04 16511.9552 38 215641 162143.43 53497.5714 39 325107 255726.84 69380.1569 40 7176 18884.78 -11708.7778 41 167542 162143.43 5398.5714 42 106408 84499.04 21908.9552 43 96560 115212.68 -18652.6800 44 265769 255726.84 10042.1569 45 269651 209940.78 59710.2222 46 149112 162143.43 -13031.4286 47 175824 255726.84 -79902.8431 48 152871 162143.43 -9272.4286 49 111665 134977.62 -23312.6250 50 116408 115212.68 1195.3200 51 362301 255726.84 106574.1569 52 78800 84499.04 -5699.0448 53 183167 209940.78 -26773.7778 54 277965 255726.84 22238.1569 55 150629 162143.43 -11514.4286 56 168809 162143.43 6665.5714 57 24188 34770.31 -10582.3077 58 329267 255726.84 73540.1569 59 65029 84499.04 -19470.0448 60 101097 115212.68 -14115.6800 61 218946 162143.43 56802.5714 62 244052 209940.78 34111.2222 63 341570 255726.84 85843.1569 64 103597 84499.04 19097.9552 65 233328 255726.84 -22398.8431 66 256462 255726.84 735.1569 67 206161 162143.43 44017.5714 68 311473 255726.84 55746.1569 69 235800 255726.84 -19926.8431 70 177939 255726.84 -77787.8431 71 207176 162143.43 45032.5714 72 196553 134977.62 61575.3750 73 174184 162143.43 12040.5714 74 143246 255726.84 -112480.8431 75 187559 255726.84 -68167.8431 76 187681 209940.78 -22259.7778 77 119016 209940.78 -90924.7778 78 182192 162143.43 20048.5714 79 73566 84499.04 -10933.0448 80 194979 162143.43 32835.5714 81 167488 162143.43 5344.5714 82 143756 209940.78 -66184.7778 83 275541 209940.78 65600.2222 84 243199 255726.84 -12527.8431 85 182999 255726.84 -72727.8431 86 135649 209940.78 -74291.7778 87 152299 162143.43 -9844.4286 88 120221 162143.43 -41922.4286 89 346485 255726.84 90758.1569 90 145790 134977.62 10812.3750 91 193339 255726.84 -62387.8431 92 80953 84499.04 -3546.0448 93 122774 84499.04 38274.9552 94 130585 162143.43 -31558.4286 95 112611 134977.62 -22366.6250 96 286468 255726.84 30741.1569 97 241066 255726.84 -14660.8431 98 148446 255726.84 -107280.8431 99 204713 162143.43 42569.5714 100 182079 209940.78 -27861.7778 101 140344 134977.62 5366.3750 102 220516 209940.78 10575.2222 103 243060 162143.43 80916.5714 104 162765 162143.43 621.5714 105 182613 162143.43 20469.5714 106 232138 209940.78 22197.2222 107 265318 255726.84 9591.1569 108 85574 84499.04 1074.9552 109 310839 255726.84 55112.1569 110 225060 255726.84 -30666.8431 111 232317 209940.78 22376.2222 112 144966 115212.68 29753.3200 113 43287 56099.75 -12812.7500 114 155754 162143.43 -6389.4286 115 164709 255726.84 -91017.8431 116 201940 209940.78 -8000.7778 117 235454 255726.84 -20272.8431 118 220801 255726.84 -34925.8431 119 99466 84499.04 14966.9552 120 92661 115212.68 -22551.6800 121 133328 162143.43 -28815.4286 122 61361 115212.68 -53851.6800 123 125930 115212.68 10717.3200 124 100750 162143.43 -61393.4286 125 224549 162143.43 62405.5714 126 82316 84499.04 -2183.0448 127 102010 115212.68 -13202.6800 128 101523 162143.43 -60620.4286 129 243511 209940.78 33570.2222 130 22938 18884.78 4053.2222 131 41566 34770.31 6795.6923 132 152474 209940.78 -57466.7778 133 61857 84499.04 -22642.0448 134 99923 134977.62 -35054.6250 135 132487 162143.43 -29656.4286 136 317394 255726.84 61667.1569 137 21054 18884.78 2169.2222 138 209641 162143.43 47497.5714 139 22648 34770.31 -12122.3077 140 31414 34770.31 -3356.3077 141 46698 78342.27 -31644.2727 142 131698 162143.43 -30445.4286 143 91735 78342.27 13392.7273 144 244749 255726.84 -10977.8431 145 184510 162143.43 22366.5714 146 79863 84499.04 -4636.0448 147 128423 134977.62 -6554.6250 148 97839 84499.04 13339.9552 149 38214 34770.31 3443.6923 150 151101 134977.62 16123.3750 151 272458 209940.78 62517.2222 152 172494 134977.62 37516.3750 153 108043 115212.68 -7169.6800 154 328107 209940.78 118166.2222 155 250579 255726.84 -5147.8431 156 351067 255726.84 95340.1569 157 158015 162143.43 -4128.4286 158 98866 84499.04 14366.9552 159 85439 134977.62 -49538.6250 160 229242 255726.84 -26484.8431 161 351619 255726.84 95892.1569 162 84207 56099.75 28107.2500 163 120445 115212.68 5232.3200 164 324598 255726.84 68871.1569 165 131069 134977.62 -3908.6250 166 204271 209940.78 -5669.7778 167 165543 162143.43 3399.5714 168 141722 115212.68 26509.3200 169 116048 115212.68 835.3200 170 250047 115212.68 134834.3200 171 299775 255726.84 44048.1569 172 195838 209940.78 -14102.7778 173 173260 134977.62 38282.3750 174 254488 255726.84 -1238.8431 175 104389 209940.78 -105551.7778 176 136084 84499.04 51584.9552 177 199476 209940.78 -10464.7778 178 92499 84499.04 7999.9552 179 224330 255726.84 -31396.8431 180 135781 84499.04 51281.9552 181 74408 115212.68 -40804.6800 182 81240 162143.43 -80903.4286 183 14688 18884.78 -4196.7778 184 181633 134977.62 46655.3750 185 271856 255726.84 16129.1569 186 7199 18884.78 -11685.7778 187 46660 34770.31 11889.6923 188 17547 18884.78 -1337.7778 189 133368 84499.04 48868.9552 190 95227 84499.04 10727.9552 191 152601 84499.04 68101.9552 192 98146 78342.27 19803.7273 193 79619 84499.04 -4880.0448 194 59194 56099.75 3094.2500 195 139942 162143.43 -22201.4286 196 118612 162143.43 -43531.4286 197 72880 78342.27 -5462.2727 198 65475 56099.75 9375.2500 199 99643 115212.68 -15569.6800 200 71965 84499.04 -12534.0448 201 77272 115212.68 -37940.6800 202 49289 56099.75 -6810.7500 203 135131 115212.68 19918.3200 204 108446 115212.68 -6766.6800 205 89746 84499.04 5246.9552 206 44296 56099.75 -11803.7500 207 77648 84499.04 -6851.0448 208 181528 115212.68 66315.3200 209 134019 115212.68 18806.3200 210 124064 134977.62 -10913.6250 211 92630 84499.04 8130.9552 212 121848 84499.04 37348.9552 213 52915 84499.04 -31584.0448 214 81872 84499.04 -2627.0448 215 58981 78342.27 -19361.2727 216 53515 56099.75 -2584.7500 217 60812 84499.04 -23687.0448 218 56375 56099.75 275.2500 219 65490 84499.04 -19009.0448 220 80949 56099.75 24849.2500 221 76302 84499.04 -8197.0448 222 104011 134977.62 -30966.6250 223 98104 162143.43 -64039.4286 224 67989 84499.04 -16510.0448 225 30989 56099.75 -25110.7500 226 135458 115212.68 20245.3200 227 73504 84499.04 -10995.0448 228 63123 84499.04 -21376.0448 229 61254 84499.04 -23245.0448 230 74914 134977.62 -60063.6250 231 31774 56099.75 -24325.7500 232 81437 84499.04 -3062.0448 233 87186 115212.68 -28026.6800 234 50090 56099.75 -6009.7500 235 65745 115212.68 -49467.6800 236 56653 84499.04 -27846.0448 237 158399 84499.04 73899.9552 238 46455 84499.04 -38044.0448 239 73624 84499.04 -10875.0448 240 38395 56099.75 -17704.7500 241 91899 78342.27 13556.7273 242 139526 134977.62 4548.3750 243 52164 84499.04 -32335.0448 244 51567 84499.04 -32932.0448 245 70551 84499.04 -13948.0448 246 84856 84499.04 356.9552 247 102538 115212.68 -12674.6800 248 86678 78342.27 8335.7273 249 85709 84499.04 1209.9552 250 34662 34770.31 -108.3077 251 150580 134977.62 15602.3750 252 99611 84499.04 15111.9552 253 19349 18884.78 464.2222 254 99373 78342.27 21030.7273 255 86230 84499.04 1730.9552 256 30837 34770.31 -3933.3077 257 31706 84499.04 -52793.0448 258 89806 84499.04 5306.9552 259 62088 78342.27 -16254.2727 260 40151 34770.31 5380.6923 261 27634 34770.31 -7136.3077 262 76990 84499.04 -7509.0448 263 37460 34770.31 2689.6923 264 54157 84499.04 -30342.0448 265 49862 78342.27 -28480.2727 266 84337 84499.04 -162.0448 267 64175 84499.04 -20324.0448 268 59382 84499.04 -25117.0448 269 119308 84499.04 34808.9552 270 76702 84499.04 -7797.0448 271 103425 78342.27 25082.7273 272 70344 84499.04 -14155.0448 273 43410 34770.31 8639.6923 274 104838 84499.04 20338.9552 275 62215 84499.04 -22284.0448 276 69304 84499.04 -15195.0448 277 53117 56099.75 -2982.7500 278 19764 18884.78 879.2222 279 86680 84499.04 2180.9552 280 84105 56099.75 28005.2500 281 77945 84499.04 -6554.0448 282 89113 84499.04 4613.9552 283 91005 84499.04 6505.9552 284 40248 18884.78 21363.2222 285 64187 56099.75 8087.2500 286 50857 56099.75 -5242.7500 287 56613 56099.75 513.2500 288 62792 84499.04 -21707.0448 289 72535 56099.75 16435.2500 > 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/4jmdp1324462364.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/5eirj1324462364.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/63sp91324462364.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/7any31324462364.tab") + } > > try(system("convert tmp/2ktyk1324462364.ps tmp/2ktyk1324462364.png",intern=TRUE)) character(0) > try(system("convert tmp/32p7m1324462364.ps tmp/32p7m1324462364.png",intern=TRUE)) character(0) > try(system("convert tmp/4jmdp1324462364.ps tmp/4jmdp1324462364.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.016 0.270 6.285