<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Ciao a tutti.
Sto provando a scrivere un report bivariato, con gruppi adatti disposti in righe di 2.
Di seguito è riportato l'aspetto del rapporto dopo averlo creato manualmente, utilizzando i dati di esempio del calcio.

Ecco lo script ottenuto facendo clic sulla freccia rossa per un gruppo adatto e selezionando "salva script per tutti gli oggetti"
New Window( "Football - Bivariate", V List Box( Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "db" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "db" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "db" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "dl" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "dl" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "dl" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "fb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "fb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "fb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "hb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "hb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "hb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ib" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ib" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ib" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ki" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ki" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ki" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ob" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ob" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ob" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ol" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ol" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ol" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "qb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "qb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "qb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "te" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "te" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "te" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "wr" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "wr" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "wr" ) ) ));E infine, ecco come appare il risultato:

Non sono sicuro del motivo per cui questo sta accadendo. Perché lo script salvato non è preciso rispetto a quello da cui è stato salvato?
Perché il raggruppamento della "posizione" viene visualizzato al di fuori della casella "gruppo adatto"?
Perché il prossimo gruppo di misure è posizionato adiacente a quella casella di testo, anziché al di sotto?
Come si potrebbe risolvere questo problema o scrivere uno script vero e proprio per replicare la prima immagine?
Grazie
Cambia lo script in:
Nuova finestra ("Calcio - Bivariata",
V List Box (
Fit Group (
Bivariata (Y (: altezza), X (: grasso), di (: posizione)),
Bivariata (Y (: peso), X (: grasso), di (: posizione))
<< {Disponi in righe (2)}
)));
Dopo 3 anni, mi sono finalmente imbattuto nella soluzione generale che stavo cercando. Fino a questo punto avevo creato dinamicamente l'elenco dei gruppi di adattamento che JMP avrebbe generato, e quindi usando xpath per eliminare le stupide caselle di testo e aggiornare i titoli del gruppo di adattamento. Tuttavia, il risultato non sarebbe del tutto identico al risultato della GUI di JMP, poiché la creazione di tabelle di dati combinate non creerebbe colonne per le categorie nella clausola "where".
Se qualcuno sta ascoltando, sarebbe molto più semplice se la documentazione fosse migliore. Nulla di ciò che avrei potuto trovare da nessuna parte mi avrebbe portato a credere che fosse così. Non si dovrebbe imparare cose come questa attraverso la sperimentazione casuale e la sperimentazione di errori.
Vedi sotto:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
//the dynamic script to do this analysis
//using the same inputs as the GUI window, with no other knowledge of the DT's contents
//The result is identical to the result generated from the GUI
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
//A lot of this was generated due to preferences I had set.
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 )
),
<<{Arrange in Rows( 2 )},
by(:age)
);
/*
The result JMP returns from "Save Script" > "To Script Window (All Objects)"
Returns a huge mess with fit groups and text boxes containing the "where" clauses
When making a combined data table of any of the resulting tables (such as means/std),
This report will *NOT* create columns with info from the "where" clauses
*/
New Window( "Big Class - Oneway",
V List Box(
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 12 ),
Where( :age == 12 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 13 ),
Where( :age == 13 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 14 ),
Where( :age == 14 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 15 ),
Where( :age == 15 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 16 ),
Where( :age == 16 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 17 ),
Where( :age == 17 )
)
)
);