R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(0.01244 + ,0.00149 + ,0.01848 + ,0.00338 + ,0.00099 + ,-0.01826 + ,-0.01025 + ,0.04860 + ,0.04399 + ,-0.03429 + ,0.00779 + ,0.01150 + ,0.01244 + ,0.00149 + ,0.01848 + ,0.00338 + ,0.00099 + ,-0.03086 + ,-0.01025 + ,0.04860 + ,0.04399 + ,-0.03429 + ,-0.00793 + ,0.01150 + ,0.01244 + ,0.00149 + ,0.01848 + ,0.00338 + ,0.04033 + ,-0.03086 + ,-0.01025 + ,0.04860 + ,0.04399 + ,-0.01514 + ,-0.00793 + ,0.01150 + ,0.01244 + ,0.00149 + ,0.01848 + ,-0.02352 + ,0.04033 + ,-0.03086 + ,-0.01025 + ,0.04860 + ,0.01778 + ,-0.01514 + ,-0.00793 + ,0.01150 + ,0.01244 + ,0.00149 + ,0.00573 + ,-0.02352 + ,0.04033 + ,-0.03086 + ,-0.01025 + ,0.00634 + ,0.01778 + ,-0.01514 + ,-0.00793 + ,0.01150 + ,0.01244 + ,0.01805 + ,0.00573 + ,-0.02352 + ,0.04033 + ,-0.03086 + ,0.00770 + ,0.00634 + ,0.01778 + ,-0.01514 + ,-0.00793 + ,0.01150 + ,-0.01887 + ,0.01805 + ,0.00573 + ,-0.02352 + ,0.04033 + ,0.00692 + ,0.00770 + ,0.00634 + ,0.01778 + ,-0.01514 + ,-0.00793 + ,0.04363 + ,-0.01887 + ,0.01805 + ,0.00573 + ,-0.02352 + ,0.00029 + ,0.00692 + ,0.00770 + ,0.00634 + ,0.01778 + ,-0.01514 + ,0.02875 + ,0.04363 + ,-0.01887 + ,0.01805 + ,0.00573 + ,0.02487 + ,0.00029 + ,0.00692 + ,0.00770 + ,0.00634 + ,0.01778 + ,-0.00393 + ,0.02875 + ,0.04363 + ,-0.01887 + ,0.01805 + ,0.01708 + ,0.02487 + ,0.00029 + ,0.00692 + ,0.00770 + ,0.00634 + ,0.05280 + ,-0.00393 + ,0.02875 + ,0.04363 + ,-0.01887 + ,0.02540 + ,0.01708 + ,0.02487 + ,0.00029 + ,0.00692 + ,0.00770 + ,-0.00351 + ,0.05280 + ,-0.00393 + ,0.02875 + ,0.04363 + ,0.02935 + ,0.02540 + ,0.01708 + ,0.02487 + ,0.00029 + ,0.00692 + ,0.05407 + ,-0.00351 + ,0.05280 + ,-0.00393 + ,0.02875 + ,0.02615 + ,0.02935 + ,0.02540 + ,0.01708 + ,0.02487 + ,0.00029 + ,-0.01299 + ,0.05407 + ,-0.00351 + ,0.05280 + ,-0.00393 + ,0.00424 + ,0.02615 + ,0.02935 + ,0.02540 + ,0.01708 + ,0.02487 + ,0.00747 + ,-0.01299 + ,0.05407 + ,-0.00351 + ,0.05280 + ,-0.00032 + ,0.00424 + ,0.02615 + ,0.02935 + ,0.02540 + ,0.01708 + ,-0.03288 + ,0.00747 + ,-0.01299 + ,0.05407 + ,-0.00351 + ,-0.02353 + ,-0.00032 + ,0.00424 + ,0.02615 + ,0.02935 + ,0.02540 + ,-0.05013 + ,-0.03288 + ,0.00747 + ,-0.01299 + ,0.05407 + ,0.01387 + ,-0.02353 + ,-0.00032 + ,0.00424 + ,0.02615 + ,0.02935 + ,0.03715 + ,-0.05013 + ,-0.03288 + ,0.00747 + ,-0.01299 + ,0.01286 + ,0.01387 + ,-0.02353 + ,-0.00032 + ,0.00424 + ,0.02615 + ,0.00205 + ,0.03715 + ,-0.05013 + ,-0.03288 + ,0.00747 + ,-0.00609 + ,0.01286 + ,0.01387 + ,-0.02353 + ,-0.00032 + ,0.00424 + ,0.02912 + ,0.00205 + ,0.03715 + ,-0.05013 + ,-0.03288 + ,0.00635 + ,-0.00609 + ,0.01286 + ,0.01387 + ,-0.02353 + ,-0.00032 + ,-0.00832 + ,0.02912 + ,0.00205 + ,0.03715 + ,-0.05013 + ,0.02049 + ,0.00635 + ,-0.00609 + ,0.01286 + ,0.01387 + ,-0.02353 + ,0.02908 + ,-0.00832 + ,0.02912 + ,0.00205 + ,0.03715 + ,0.00332 + ,0.02049 + ,0.00635 + ,-0.00609 + ,0.01286 + ,0.01387 + ,-0.00942 + ,0.02908 + ,-0.00832 + ,0.02912 + ,0.00205 + ,0.00409 + ,0.00332 + ,0.02049 + ,0.00635 + ,-0.00609 + ,0.01286 + ,0.04381 + ,-0.00942 + ,0.02908 + ,-0.00832 + ,0.02912 + ,0.02753 + ,0.00409 + ,0.00332 + ,0.02049 + ,0.00635 + ,-0.00609 + ,0.00603 + ,0.04381 + ,-0.00942 + ,0.02908 + ,-0.00832 + ,0.01205 + ,0.02753 + ,0.00409 + ,0.00332 + ,0.02049 + ,0.00635 + ,0.02253 + ,0.00603 + ,0.04381 + ,-0.00942 + ,0.02908 + ,0.01773 + ,0.01205 + ,0.02753 + ,0.00409 + ,0.00332 + ,0.02049 + ,0.05789 + ,0.02253 + ,0.00603 + ,0.04381 + ,-0.00942 + ,-0.00897 + ,0.01773 + ,0.01205 + ,0.02753 + ,0.00409 + ,0.00332 + ,-0.03783 + ,0.05789 + ,0.02253 + ,0.00603 + ,0.04381 + ,-0.01226 + ,-0.00897 + ,0.01773 + ,0.01205 + ,0.02753 + ,0.00409 + ,-0.03176 + ,-0.03783 + ,0.05789 + ,0.02253 + ,0.00603 + ,0.00644 + ,-0.01226 + ,-0.00897 + ,0.01773 + ,0.01205 + ,0.02753 + ,-0.00572 + ,-0.03176 + ,-0.03783 + ,0.05789 + ,0.02253 + ,-0.00059 + ,0.00644 + ,-0.01226 + ,-0.00897 + ,0.01773 + ,0.01205 + ,0.01040 + ,-0.00572 + ,-0.03176 + ,-0.03783 + ,0.05789 + ,0.01707 + ,-0.00059 + ,0.00644 + ,-0.01226 + ,-0.00897 + ,0.01773 + ,0.03662 + ,0.01040 + ,-0.00572 + ,-0.03176 + ,-0.03783 + ,-0.00104 + ,0.01707 + ,-0.00059 + ,0.00644 + ,-0.01226 + ,-0.00897 + ,0.03771 + ,0.03662 + ,0.01040 + ,-0.00572 + ,-0.03176 + ,0.01272 + ,-0.00104 + ,0.01707 + ,-0.00059 + ,0.00644 + ,-0.01226 + ,0.05981 + ,0.03771 + ,0.03662 + ,0.01040 + ,-0.00572 + ,0.01859 + ,0.01272 + ,-0.00104 + ,0.01707 + ,-0.00059 + ,0.00644 + ,-0.03204 + ,0.05981 + ,0.03771 + ,0.03662 + ,0.01040 + ,0.03238 + ,0.01859 + ,0.01272 + ,-0.00104 + ,0.01707 + ,-0.00059 + ,0.02837 + ,-0.03204 + ,0.05981 + ,0.03771 + ,0.03662 + ,0.03132 + ,0.03238 + ,0.01859 + ,0.01272 + ,-0.00104 + ,0.01707 + ,0.05003 + ,0.02837 + ,-0.03204 + ,0.05981 + ,0.03771 + ,0.01412 + ,0.03132 + ,0.03238 + ,0.01859 + ,0.01272 + ,-0.00104 + ,0.04980 + ,0.05003 + ,0.02837 + ,-0.03204 + ,0.05981 + ,0.00588 + ,0.01412 + ,0.03132 + ,0.03238 + ,0.01859 + ,0.01272 + ,-0.02299 + ,0.04980 + ,0.05003 + ,0.02837 + ,-0.03204 + ,0.05686 + ,0.00588 + ,0.01412 + ,0.03132 + ,0.03238 + ,0.01859 + ,0.04030 + ,-0.02299 + ,0.04980 + ,0.05003 + ,0.02837 + ,0.05681 + ,0.05686 + ,0.00588 + ,0.01412 + ,0.03132 + ,0.03238 + ,0.03176 + ,0.04030 + ,-0.02299 + ,0.04980 + ,0.05003 + ,-0.04078 + ,0.05681 + ,0.05686 + ,0.00588 + ,0.01412 + ,0.03132 + ,-0.00135 + ,0.03176 + ,0.04030 + ,-0.02299 + ,0.04980 + ,0.02507 + ,-0.04078 + ,0.05681 + ,0.05686 + ,0.00588 + ,0.01412 + ,-0.02473 + ,-0.00135 + ,0.03176 + ,0.04030 + ,-0.02299 + ,0.00600 + ,0.02507 + ,-0.04078 + ,0.05681 + ,0.05686 + ,0.00588 + ,-0.00171 + ,-0.02473 + ,-0.00135 + ,0.03176 + ,0.04030 + ,0.00249 + ,0.00600 + ,0.02507 + ,-0.04078 + ,0.05681 + ,0.05686 + ,-0.01575 + ,-0.00171 + ,-0.02473 + ,-0.00135 + ,0.03176 + ,0.01885 + ,0.00249 + ,0.00600 + ,0.02507 + ,-0.04078 + ,0.05681 + ,-0.02624 + ,-0.01575 + ,-0.00171 + ,-0.02473 + ,-0.00135 + ,0.00125 + ,0.01885 + ,0.00249 + ,0.00600 + ,0.02507 + ,-0.04078 + ,0.06724 + ,-0.02624 + ,-0.01575 + ,-0.00171 + ,-0.02473 + ,0.00695 + ,0.00125 + ,0.01885 + ,0.00249 + ,0.00600 + ,0.02507 + ,-0.01362 + ,0.06724 + ,-0.02624 + ,-0.01575 + ,-0.00171 + ,-0.01563 + ,0.00695 + ,0.00125 + ,0.01885 + ,0.00249 + ,0.00600 + ,-0.00422 + ,-0.01362 + ,0.06724 + ,-0.02624 + ,-0.01575 + ,0.00814 + ,-0.01563 + ,0.00695 + ,0.00125 + ,0.01885 + ,0.00249 + ,0.00754 + ,-0.00422 + ,-0.01362 + ,0.06724 + ,-0.02624 + ,0.02368 + ,0.00814 + ,-0.01563 + ,0.00695 + ,0.00125 + ,0.01885 + ,0.00087 + ,0.00754 + ,-0.00422 + ,-0.01362 + ,0.06724 + ,0.04099 + ,0.02368 + ,0.00814 + ,-0.01563 + ,0.00695 + ,0.00125 + ,0.02715 + ,0.00087 + ,0.00754 + ,-0.00422 + ,-0.01362 + ,0.00731 + ,0.04099 + ,0.02368 + ,0.00814 + ,-0.01563 + ,0.00695 + ,0.02976 + ,0.02715 + ,0.00087 + ,0.00754 + ,-0.00422 + ,-0.01730 + ,0.00731 + ,0.04099 + ,0.02368 + ,0.00814 + ,-0.01563 + ,0.07946 + ,0.02976 + ,0.02715 + ,0.00087 + ,0.00754 + ,-0.00183 + ,-0.01730 + ,0.00731 + ,0.04099 + ,0.02368 + ,0.00814 + ,0.01909 + ,0.07946 + ,0.02976 + ,0.02715 + ,0.00087 + ,-0.03830 + ,-0.00183 + ,-0.01730 + ,0.00731 + ,0.04099 + ,0.02368 + ,-0.02483 + ,0.01909 + ,0.07946 + ,0.02976 + ,0.02715 + ,-0.01249 + ,-0.03830 + ,-0.00183 + ,-0.01730 + ,0.00731 + ,0.04099 + ,-0.01870 + ,-0.02483 + ,0.01909 + ,0.07946 + ,0.02976 + ,0.01229 + ,-0.01249 + ,-0.03830 + ,-0.00183 + ,-0.01730 + ,0.00731 + ,0.09682 + ,-0.01870 + ,-0.02483 + ,0.01909 + ,0.07946 + ,-0.01747 + ,0.01229 + ,-0.01249 + ,-0.03830 + ,-0.00183 + ,-0.01730 + ,0.03823 + ,0.09682 + ,-0.01870 + ,-0.02483 + ,0.01909 + ,-0.02645 + ,-0.01747 + ,0.01229 + ,-0.01249 + ,-0.03830 + ,-0.00183 + ,0.09571 + ,0.03823 + ,0.09682 + ,-0.01870 + ,-0.02483 + ,0.04038 + ,-0.02645 + ,-0.01747 + ,0.01229 + ,-0.01249 + ,-0.03830 + ,-0.04663 + ,0.09571 + ,0.03823 + ,0.09682 + ,-0.01870 + ,0.02925 + ,0.04038 + ,-0.02645 + ,-0.01747 + ,0.01229 + ,-0.01249 + ,-0.01359 + ,-0.04663 + ,0.09571 + ,0.03823 + ,0.09682 + ,0.02270 + ,0.02925 + ,0.04038 + ,-0.02645 + ,-0.01747 + ,0.01229 + ,0.05114 + ,-0.01359 + ,-0.04663 + ,0.09571 + ,0.03823 + ,-0.00460 + ,0.02270 + ,0.02925 + ,0.04038 + ,-0.02645 + ,-0.01747 + ,-0.04275 + ,0.05114 + ,-0.01359 + ,-0.04663 + ,0.09571 + ,-0.01894 + ,-0.00460 + ,0.02270 + ,0.02925 + ,0.04038 + ,-0.02645 + ,0.05739 + ,-0.04275 + ,0.05114 + ,-0.01359 + ,-0.04663 + ,-0.00966 + ,-0.01894 + ,-0.00460 + ,0.02270 + ,0.02925 + ,0.04038 + ,0.01186 + ,0.05739 + ,-0.04275 + ,0.05114 + ,-0.01359 + ,0.00392 + ,-0.00966 + ,-0.01894 + ,-0.00460 + ,0.02270 + ,0.02925 + ,0.01066 + ,0.01186 + ,0.05739 + ,-0.04275 + ,0.05114 + ,-0.03105 + ,0.00392 + ,-0.00966 + ,-0.01894 + ,-0.00460 + ,0.02270 + ,-0.07387 + ,0.01066 + ,0.01186 + ,0.05739 + ,-0.04275 + ,-0.02790 + ,-0.03105 + ,0.00392 + ,-0.00966 + ,-0.01894 + ,-0.00460 + ,-0.04131 + ,-0.07387 + ,0.01066 + ,0.01186 + ,0.05739 + ,-0.09625 + ,-0.02790 + ,-0.03105 + ,0.00392 + ,-0.00966 + ,-0.01894 + ,-0.17889 + ,-0.04131 + ,-0.07387 + ,0.01066 + ,0.01186 + ,-0.05388 + ,-0.09625 + ,-0.02790 + ,-0.03105 + ,0.00392 + ,-0.00966 + ,-0.12781 + ,-0.17889 + ,-0.04131 + ,-0.07387 + ,0.01066 + ,-0.05034 + ,-0.05388 + ,-0.09625 + ,-0.02790 + ,-0.03105 + ,0.00392 + ,-0.26933 + ,-0.12781 + ,-0.17889 + ,-0.04131 + ,-0.07387 + ,-0.02846 + ,-0.05034 + ,-0.05388 + ,-0.09625 + ,-0.02790 + ,-0.03105 + ,-0.05095 + ,-0.26933 + ,-0.12781 + ,-0.17889 + ,-0.04131 + ,-0.01454 + ,-0.02846 + ,-0.05034 + ,-0.05388 + ,-0.09625 + ,-0.02790 + ,-0.01074 + ,-0.05095 + ,-0.26933 + ,-0.12781 + ,-0.17889 + ,0.01284 + ,-0.01454 + ,-0.02846 + ,-0.05034 + ,-0.05388 + ,-0.09625 + ,0.08172 + ,-0.01074 + ,-0.05095 + ,-0.26933 + ,-0.12781 + ,0.03762 + ,0.01284 + ,-0.01454 + ,-0.02846 + ,-0.05034 + ,-0.05388 + ,0.11870 + ,0.08172 + ,-0.01074 + ,-0.05095 + ,-0.26933 + ,0.01973 + ,0.03762 + ,0.01284 + ,-0.01454 + ,-0.02846 + ,-0.05034 + ,0.08475 + ,0.11870 + ,0.08172 + ,-0.01074 + ,-0.05095 + ,0.03178 + ,0.01973 + ,0.03762 + ,0.01284 + ,-0.01454 + ,-0.02846 + ,0.04663 + ,0.08475 + ,0.11870 + ,0.08172 + ,-0.01074 + ,0.01329 + ,0.03178 + ,0.01973 + ,0.03762 + ,0.01284 + ,-0.01454 + ,-0.04415 + ,0.04663 + ,0.08475 + ,0.11870 + ,0.08172 + ,0.05094 + ,0.01329 + ,0.03178 + ,0.01973 + ,0.03762 + ,0.01284 + ,0.00970 + ,-0.04415 + ,0.04663 + ,0.08475 + ,0.11870 + ,-0.00804 + ,0.05094 + ,0.01329 + ,0.03178 + ,0.01973 + ,0.03762 + ,-0.03341 + ,0.00970 + ,-0.04415 + ,0.04663 + ,0.08475 + ,0.01116 + ,-0.00804 + ,0.05094 + ,0.01329 + ,0.03178 + ,0.01973 + ,0.04031 + ,-0.03341 + ,0.00970 + ,-0.04415 + ,0.04663 + ,0.01128 + ,0.01116 + ,-0.00804 + ,0.05094 + ,0.01329 + ,0.03178 + ,0.01938 + ,0.04031 + ,-0.03341 + ,0.00970 + ,-0.04415 + ,0.02227 + ,0.01128 + ,0.01116 + ,-0.00804 + ,0.05094 + ,0.01329 + ,0.05928 + ,0.01938 + ,0.04031 + ,-0.03341 + ,0.00970 + ,0.01494 + ,0.02227 + ,0.01128 + ,0.01116 + ,-0.00804 + ,0.05094 + ,0.02343 + ,0.05928 + ,0.01938 + ,0.04031 + ,-0.03341 + ,-0.02514 + ,0.01494 + ,0.02227 + ,0.01128 + ,0.01116 + ,-0.00804 + ,-0.04536 + ,0.02343 + ,0.05928 + ,0.01938 + ,0.04031 + ,0.02975 + ,-0.02514 + ,0.01494 + ,0.02227 + ,0.01128 + ,0.01116 + ,0.03355 + ,-0.04536 + ,0.02343 + ,0.05928 + ,0.01938 + ,0.05216 + ,0.02975 + ,-0.02514 + ,0.01494 + ,0.02227 + ,0.01128 + ,0.05659 + ,0.03355 + ,-0.04536 + ,0.02343 + ,0.05928 + ,-0.04459 + ,0.05216 + ,0.02975 + ,-0.02514 + ,0.01494 + ,0.02227 + ,-0.06579 + ,0.05659 + ,0.03355 + ,-0.04536 + ,0.02343 + ,-0.02212 + ,-0.04459 + ,0.05216 + ,0.02975 + ,-0.02514 + ,0.01494 + ,-0.04267 + ,-0.06579 + ,0.05659 + ,0.03355 + ,-0.04536 + ,0.03171 + ,-0.02212 + ,-0.04459 + ,0.05216 + ,0.02975 + ,-0.02514 + ,-0.02422 + ,-0.04267 + ,-0.06579 + ,0.05659 + ,0.03355 + ,0.02985 + ,0.03171 + ,-0.02212 + ,-0.04459 + ,0.05216 + ,0.02975 + ,0.07584 + ,-0.02422 + ,-0.04267 + ,-0.06579 + ,0.05659 + ,0.01545 + ,0.02985 + ,0.03171 + ,-0.02212 + ,-0.04459 + ,0.05216 + ,-0.00903 + ,0.07584 + ,-0.02422 + ,-0.04267 + ,-0.06579 + ,0.01140 + ,0.01545 + ,0.02985 + ,0.03171 + ,-0.02212 + ,-0.04459 + ,0.06617 + ,-0.00903 + ,0.07584 + ,-0.02422 + ,-0.04267 + ,0.00238 + ,0.01140 + ,0.01545 + ,0.02985 + ,0.03171 + ,-0.02212 + ,0.04485 + ,0.06617 + ,-0.00903 + ,0.07584 + ,-0.02422) + ,dim=c(11 + ,95) + ,dimnames=list(c('PCYt' + ,'PCYt1' + ,'PCYt2' + ,'PCYt3' + ,'PCYt4' + ,'PCYt5' + ,'PCXt1' + ,'PCXt2' + ,'PCXt3' + ,'PCXt4' + ,'PCXt5') + ,1:95)) > y <- array(NA,dim=c(11,95),dimnames=list(c('PCYt','PCYt1','PCYt2','PCYt3','PCYt4','PCYt5','PCXt1','PCXt2','PCXt3','PCXt4','PCXt5'),1:95)) > 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] "PCYt" > x[,par1] [1] 0.01244 0.01150 -0.00793 -0.01514 0.01778 0.00634 0.00770 0.00692 [9] 0.00029 0.02487 0.01708 0.02540 0.02935 0.02615 0.00424 -0.00032 [17] -0.02353 0.01387 0.01286 -0.00609 0.00635 0.02049 0.00332 0.00409 [25] 0.02753 0.01205 0.01773 -0.00897 -0.01226 0.00644 -0.00059 0.01707 [33] -0.00104 0.01272 0.01859 0.03238 0.03132 0.01412 0.00588 0.05686 [41] 0.05681 -0.04078 0.02507 0.00600 0.00249 0.01885 0.00125 0.00695 [49] -0.01563 0.00814 0.02368 0.04099 0.00731 -0.01730 -0.00183 -0.03830 [57] -0.01249 0.01229 -0.01747 -0.02645 0.04038 0.02925 0.02270 -0.00460 [65] -0.01894 -0.00966 0.00392 -0.03105 -0.02790 -0.09625 -0.05388 -0.05034 [73] -0.02846 -0.01454 0.01284 0.03762 0.01973 0.03178 0.01329 0.05094 [81] -0.00804 0.01116 0.01128 0.02227 0.01494 -0.02514 0.02975 0.05216 [89] -0.04459 -0.02212 0.03171 0.02985 0.01545 0.01140 0.00238 > 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.09625 -0.05388 -0.05034 -0.04459 -0.04078 -0.0383 -0.03105 -0.02846 1 1 1 1 1 1 1 1 -0.0279 -0.02645 -0.02514 -0.02353 -0.02212 -0.01894 -0.01747 -0.0173 1 1 1 1 1 1 1 1 -0.01563 -0.01514 -0.01454 -0.01249 -0.01226 -0.00966 -0.00897 -0.00804 1 1 1 1 1 1 1 1 -0.00793 -0.00609 -0.0046 -0.00183 -0.00104 -0.00059 -0.00032 0.00029 1 1 1 1 1 1 1 1 0.00125 0.00238 0.00249 0.00332 0.00392 0.00409 0.00424 0.00588 1 1 1 1 1 1 1 1 0.006 0.00634 0.00635 0.00644 0.00692 0.00695 0.00731 0.0077 1 1 1 1 1 1 1 1 0.00814 0.01116 0.01128 0.0114 0.0115 0.01205 0.01229 0.01244 1 1 1 1 1 1 1 1 0.01272 0.01284 0.01286 0.01329 0.01387 0.01412 0.01494 0.01545 1 1 1 1 1 1 1 1 0.01707 0.01708 0.01773 0.01778 0.01859 0.01885 0.01973 0.02049 1 1 1 1 1 1 1 1 0.02227 0.0227 0.02368 0.02487 0.02507 0.0254 0.02615 0.02753 1 1 1 1 1 1 1 1 0.02925 0.02935 0.02975 0.02985 0.03132 0.03171 0.03178 0.03238 1 1 1 1 1 1 1 1 0.03762 0.04038 0.04099 0.05094 0.05216 0.05681 0.05686 1 1 1 1 1 1 1 > colnames(x) [1] "PCYt" "PCYt1" "PCYt2" "PCYt3" "PCYt4" "PCYt5" "PCXt1" "PCXt2" "PCXt3" [10] "PCXt4" "PCXt5" > colnames(x)[par1] [1] "PCYt" > x[,par1] [1] 0.01244 0.01150 -0.00793 -0.01514 0.01778 0.00634 0.00770 0.00692 [9] 0.00029 0.02487 0.01708 0.02540 0.02935 0.02615 0.00424 -0.00032 [17] -0.02353 0.01387 0.01286 -0.00609 0.00635 0.02049 0.00332 0.00409 [25] 0.02753 0.01205 0.01773 -0.00897 -0.01226 0.00644 -0.00059 0.01707 [33] -0.00104 0.01272 0.01859 0.03238 0.03132 0.01412 0.00588 0.05686 [41] 0.05681 -0.04078 0.02507 0.00600 0.00249 0.01885 0.00125 0.00695 [49] -0.01563 0.00814 0.02368 0.04099 0.00731 -0.01730 -0.00183 -0.03830 [57] -0.01249 0.01229 -0.01747 -0.02645 0.04038 0.02925 0.02270 -0.00460 [65] -0.01894 -0.00966 0.00392 -0.03105 -0.02790 -0.09625 -0.05388 -0.05034 [73] -0.02846 -0.01454 0.01284 0.03762 0.01973 0.03178 0.01329 0.05094 [81] -0.00804 0.01116 0.01128 0.02227 0.01494 -0.02514 0.02975 0.05216 [89] -0.04459 -0.02212 0.03171 0.02985 0.01545 0.01140 0.00238 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > if (par2 != 'none') { + m <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data = x) + if (par4=='yes') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'10-Fold Cross Validation',3+2*par3,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + a<-table.element(a,'Prediction (training)',par3+1,TRUE) + a<-table.element(a,'Prediction (testing)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Actual',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + a<-table.row.end(a) + for (i in 1:10) { + ind <- sample(2, nrow(x), replace=T, prob=c(0.9,0.1)) + m.ct <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data =x[ind==1,]) + if (i==1) { + m.ct.i.pred <- predict(m.ct, newdata=x[ind==1,]) + m.ct.i.actu <- x[ind==1,par1] + m.ct.x.pred <- predict(m.ct, newdata=x[ind==2,]) + m.ct.x.actu <- x[ind==2,par1] + } else { + m.ct.i.pred <- c(m.ct.i.pred,predict(m.ct, newdata=x[ind==1,])) + m.ct.i.actu <- c(m.ct.i.actu,x[ind==1,par1]) + m.ct.x.pred <- c(m.ct.x.pred,predict(m.ct, newdata=x[ind==2,])) + m.ct.x.actu <- c(m.ct.x.actu,x[ind==2,par1]) + } + } + print(m.ct.i.tab <- table(m.ct.i.actu,m.ct.i.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.i.tab[i,i] / sum(m.ct.i.tab[i,])) + numer <- numer + m.ct.i.tab[i,i] + } + print(m.ct.i.cp <- numer / sum(m.ct.i.tab)) + print(m.ct.x.tab <- table(m.ct.x.actu,m.ct.x.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.x.tab[i,i] / sum(m.ct.x.tab[i,])) + numer <- numer + m.ct.x.tab[i,i] + } + print(m.ct.x.cp <- numer / sum(m.ct.x.tab)) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (jjj in 1:par3) a<-table.element(a,m.ct.i.tab[i,jjj]) + a<-table.element(a,round(m.ct.i.tab[i,i]/sum(m.ct.i.tab[i,]),4)) + for (jjj in 1:par3) a<-table.element(a,m.ct.x.tab[i,jjj]) + a<-table.element(a,round(m.ct.x.tab[i,i]/sum(m.ct.x.tab[i,]),4)) + a<-table.row.end(a) + } + a<-table.row.start(a) + a<-table.element(a,'Overall',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.i.cp,4)) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.x.cp,4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/12mst1293049346.tab") + } + } > m Conditional inference tree with 2 terminal nodes Response: PCYt Inputs: PCYt1, PCYt2, PCYt3, PCYt4, PCYt5, PCXt1, PCXt2, PCXt3, PCXt4, PCXt5 Number of observations: 95 1) PCXt1 <= -0.05013; criterion = 1, statistic = 29.437 2)* weights = 7 1) PCXt1 > -0.05013 3)* weights = 88 > postscript(file="/var/www/rcomp/tmp/22mst1293049346.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(m) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/32mst1293049346.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 0.01244 0.009713977 0.002726023 2 0.01150 0.009713977 0.001786023 3 -0.00793 0.009713977 -0.017643977 4 -0.01514 0.009713977 -0.024853977 5 0.01778 0.009713977 0.008066023 6 0.00634 0.009713977 -0.003373977 7 0.00770 0.009713977 -0.002013977 8 0.00692 0.009713977 -0.002793977 9 0.00029 0.009713977 -0.009423977 10 0.02487 0.009713977 0.015156023 11 0.01708 0.009713977 0.007366023 12 0.02540 0.009713977 0.015686023 13 0.02935 0.009713977 0.019636023 14 0.02615 0.009713977 0.016436023 15 0.00424 0.009713977 -0.005473977 16 -0.00032 0.009713977 -0.010033977 17 -0.02353 -0.046871429 0.023341429 18 0.01387 0.009713977 0.004156023 19 0.01286 0.009713977 0.003146023 20 -0.00609 0.009713977 -0.015803977 21 0.00635 0.009713977 -0.003363977 22 0.02049 0.009713977 0.010776023 23 0.00332 0.009713977 -0.006393977 24 0.00409 0.009713977 -0.005623977 25 0.02753 0.009713977 0.017816023 26 0.01205 0.009713977 0.002336023 27 0.01773 0.009713977 0.008016023 28 -0.00897 0.009713977 -0.018683977 29 -0.01226 0.009713977 -0.021973977 30 0.00644 0.009713977 -0.003273977 31 -0.00059 0.009713977 -0.010303977 32 0.01707 0.009713977 0.007356023 33 -0.00104 0.009713977 -0.010753977 34 0.01272 0.009713977 0.003006023 35 0.01859 0.009713977 0.008876023 36 0.03238 0.009713977 0.022666023 37 0.03132 0.009713977 0.021606023 38 0.01412 0.009713977 0.004406023 39 0.00588 0.009713977 -0.003833977 40 0.05686 0.009713977 0.047146023 41 0.05681 0.009713977 0.047096023 42 -0.04078 0.009713977 -0.050493977 43 0.02507 0.009713977 0.015356023 44 0.00600 0.009713977 -0.003713977 45 0.00249 0.009713977 -0.007223977 46 0.01885 0.009713977 0.009136023 47 0.00125 0.009713977 -0.008463977 48 0.00695 0.009713977 -0.002763977 49 -0.01563 0.009713977 -0.025343977 50 0.00814 0.009713977 -0.001573977 51 0.02368 0.009713977 0.013966023 52 0.04099 0.009713977 0.031276023 53 0.00731 0.009713977 -0.002403977 54 -0.01730 0.009713977 -0.027013977 55 -0.00183 0.009713977 -0.011543977 56 -0.03830 0.009713977 -0.048013977 57 -0.01249 0.009713977 -0.022203977 58 0.01229 0.009713977 0.002576023 59 -0.01747 0.009713977 -0.027183977 60 -0.02645 0.009713977 -0.036163977 61 0.04038 0.009713977 0.030666023 62 0.02925 0.009713977 0.019536023 63 0.02270 0.009713977 0.012986023 64 -0.00460 0.009713977 -0.014313977 65 -0.01894 0.009713977 -0.028653977 66 -0.00966 0.009713977 -0.019373977 67 0.00392 0.009713977 -0.005793977 68 -0.03105 -0.046871429 0.015821429 69 -0.02790 0.009713977 -0.037613977 70 -0.09625 -0.046871429 -0.049378571 71 -0.05388 -0.046871429 -0.007008571 72 -0.05034 -0.046871429 -0.003468571 73 -0.02846 -0.046871429 0.018411429 74 -0.01454 0.009713977 -0.024253977 75 0.01284 0.009713977 0.003126023 76 0.03762 0.009713977 0.027906023 77 0.01973 0.009713977 0.010016023 78 0.03178 0.009713977 0.022066023 79 0.01329 0.009713977 0.003576023 80 0.05094 0.009713977 0.041226023 81 -0.00804 0.009713977 -0.017753977 82 0.01116 0.009713977 0.001446023 83 0.01128 0.009713977 0.001566023 84 0.02227 0.009713977 0.012556023 85 0.01494 0.009713977 0.005226023 86 -0.02514 0.009713977 -0.034853977 87 0.02975 0.009713977 0.020036023 88 0.05216 0.009713977 0.042446023 89 -0.04459 -0.046871429 0.002281429 90 -0.02212 0.009713977 -0.031833977 91 0.03171 0.009713977 0.021996023 92 0.02985 0.009713977 0.020136023 93 0.01545 0.009713977 0.005736023 94 0.01140 0.009713977 0.001686023 95 0.00238 0.009713977 -0.007333977 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/www/rcomp/tmp/4cvrw1293049346.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if(par2=='none') { + op <- par(mfrow=c(2,2)) + plot(density(result$Actuals),main='Kernel Density Plot of Actuals') + plot(density(result$Residuals),main='Kernel Density Plot of Residuals') + plot(result$Forecasts,result$Actuals,main='Actuals versus Predictions',xlab='Predictions',ylab='Actuals') + plot(density(result$Forecasts),main='Kernel Density Plot of Predictions') + par(op) + } > if(par2!='none') { + plot(myt,main='Confusion Matrix',xlab='Actual',ylab='Predicted') + } > dev.off() null device 1 > if (par2 == 'none') { + detcoef <- cor(result$Forecasts,result$Actuals) + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goodness of Fit',2,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Correlation',1,TRUE) + a<-table.element(a,round(detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'R-squared',1,TRUE) + a<-table.element(a,round(detcoef*detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'RMSE',1,TRUE) + a<-table.element(a,round(sqrt(mean((result$Residuals)^2)),4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/5w8wu1293049346.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Actuals, Predictions, and Residuals',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'#',header=TRUE) + a<-table.element(a,'Actuals',header=TRUE) + a<-table.element(a,'Forecasts',header=TRUE) + a<-table.element(a,'Residuals',header=TRUE) + a<-table.row.end(a) + for (i in 1:length(result$Actuals)) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,result$Actuals[i]) + a<-table.element(a,result$Forecasts[i]) + a<-table.element(a,result$Residuals[i]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/61eoq1293049346.tab") + } > if (par2 != 'none') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Confusion Matrix (predicted in columns / actuals in rows)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + for (i in 1:par3) { + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + } + a<-table.row.end(a) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (j in 1:par3) { + a<-table.element(a,myt[i,j]) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/rcomp/tmp/7nxmw1293049346.tab") + } > > try(system("convert tmp/22mst1293049346.ps tmp/22mst1293049346.png",intern=TRUE)) character(0) > try(system("convert tmp/32mst1293049346.ps tmp/32mst1293049346.png",intern=TRUE)) character(0) > try(system("convert tmp/4cvrw1293049346.ps tmp/4cvrw1293049346.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.570 0.390 2.942