How to join 2 analyses in the same outlineboxe using “by” command
Feb 16, 2010 8:05 AM(1330 views)
I just beggun in scripting so this may be a quite simple question.
I use the same “by” in 2 different analyses. As I need both analyses to compare results and make decision, I would like to have them side by side in the same outlineboxe. I think the easiest way would be to have one common “By” command for both analysis but I cannot figure out how to do that. I cannot use the command “where” because the data in my table are susceptible to change very often. All I succeed in is putting them side by side (using Hlistbox and Vlistbox). Anyone has an idea? (I hope I was clear, English is not my first language...)
here is another way (via scripting). It uses the big class example and aims to plot a distribution and one-way plot (appended side by side) for each sex M and F.
*calculates the number of unique items and build up the list of unique items Current datatable(Datatable("Big Class")); Summary(Group(:sex), N(:sex), output table name("Summary by sex")); Current datatable(Datatable("Summary by sex")); listofGroups=column(1)<groupnumber=N Items(listofGroups); Datatable("Summary by sex") << close window; Current datatable(Datatable("Big Class"));
*append each analysis via looping combined=NewWindow("Height Analysis",Outlinebox("Height Analysis for sex", hb = VListBox())); for(i=1,i<=groupnumber,i++, hb << append(Outlinebox("Height Analysis for "||eval(listofGroups), HListbox( VListBox( Distribution( Stack( 1 ), Continuous Distribution( Column( :height ), Horizontal Layout( 1 ), Vertical( 0 ), Normal Quantile Plot( 1 ) ), Where( :sex == eval(listofGroups) ) )), VListBox( Oneway( Y( :height ), X( :age ), Means and Std Dev( 1 ), t Test( 1 ), Box Plots( 1 ), Mean Diamonds( 0 ), Mean Error Bars( 1 ), Std Dev Lines( 1 ), Connect Means( 1 ), Where( :sex == eval(listofGroups) ) )) ))); ) *****
Thanks a lot Wei Jian ! This script seems really interesting, but something is not working with the "Eval" command. I don't know what, but I keep on searching. I am using JMP 8.0.1 , so maybe I can also try with the data filter...