cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
shoffmeister
Level V

Send a Message to All By-Groups in a Plattform

Hi JMPers,

in the multivariate plattform I would like to save all T2 values in my datatable via script.

Sadly I cannot figure out the command to save the T2-values in JSL. Further the report is using a by-variable so that I need to do something like "Hold CTRL pressed and left-click on T2-hotspot => Save T2" just in JSL.

Is that possible?

bc = Open("$SAMPLE_DATA/Big Class.jmp");

mlt = Multivariate(

  SendToByGroup( {:age == 12} ),

  Y( :height, :weight ),

  Estimation Method( "Row-wise" ),

  Matrix Format( "Square" ),

       Scatterplot Matrix(

            Density Ellipses( 1 ),

            Shaded Ellipses( 0 ),

            Ellipse Color( 3 )

       ),

  T²( 1 ),

  By( :age ),

  SendToByGroup(

  {:age == 12},

  SendToReport(

  Dispatch(

  {"Multivariate  age=12"},

  "Scatterplot Matrix",

  OutlineBox,

  {Close( 1 )}

  )

  )

  ),

  SendToByGroup(

  {:age == 13},

  SendToReport(

  Dispatch(

  {"Multivariate  age=13"},

  "Scatterplot Matrix",

  OutlineBox,

  {Close( 1 )}

  )

  )

  ),

  SendToByGroup(

  {:age == 14},

  SendToReport(

  Dispatch(

  {"Multivariate  age=14"},

  "Scatterplot Matrix",

  OutlineBox,

  {Close( 1 )}

  )

  )

  ),

  SendToByGroup(

  {:age == 15},

  SendToReport(

  Dispatch(

  {"Multivariate  age=15"},

  "Scatterplot Matrix",

  OutlineBox,

  {Close( 1 )}

  )

  )

  ),

  SendToByGroup(

  {:age == 16},

  SendToReport(

  Dispatch(

  {"Multivariate  age=16"},

  "Scatterplot Matrix",

  OutlineBox,

  {Close( 1 )}

  )

  )

  ),

  SendToByGroup(

  {:age == 17},

  SendToReport(

  Dispatch(

  {"Multivariate  age=17"},

  "Scatterplot Matrix",

  OutlineBox,

  {Close( 1 )}

  )

  )

  )

)

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: Send a Message to All By-Groups in a Plattform

Alternatively:

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Body Measurements.jmp");

dt << NewColumn("By", Numeric, Nominal, Formula(RandomInteger(1, 2)));

mv = dt << Multivariate(

Y(

:Mass,

:Fore,

:Bicep,

:Chest,

:Neck,

:Shoulder

),

By(:By),

Estimation Method( "Row-wise" ),

Matrix Format( "Square" ),

Scatterplot Matrix(

Density Ellipses( 1 ),

Shaded Ellipses( 0 ),

Ellipse Color( 3 )

),

T Square(Save T Square)

);

View solution in original post

3 REPLIES 3
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Send a Message to All By-Groups in a Plattform

It's a little tricky. Try this:

//Make a list of all T2 objects in the compound multivariate report "mlt"

T2_all = Repeat(

    i = 0;

    {i++ ; Report(mlt[i])[Outline Box("T" || "\!U00B2")] << get scriptable object};,

    N Items(mlt)

);

//Send the save message to all T2 in one move

T2_all << Save T Square;

ian_jmp
Level X

Re: Send a Message to All By-Groups in a Plattform

Alternatively:

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Body Measurements.jmp");

dt << NewColumn("By", Numeric, Nominal, Formula(RandomInteger(1, 2)));

mv = dt << Multivariate(

Y(

:Mass,

:Fore,

:Bicep,

:Chest,

:Neck,

:Shoulder

),

By(:By),

Estimation Method( "Row-wise" ),

Matrix Format( "Square" ),

Scatterplot Matrix(

Density Ellipses( 1 ),

Shaded Ellipses( 0 ),

Ellipse Color( 3 )

),

T Square(Save T Square)

);

ms
Super User (Alumni) ms
Super User (Alumni)

Re: Send a Message to All By-Groups in a Plattform

Of course! I started at the wrong end without looking back (although I had a feeling I was missing the obvious... )