<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hola a todos.
Estoy tratando de escribir un informe bivariado, con grupos de ajuste ordenados en filas de 2.
A continuación se muestra el aspecto del informe después de crearlo manualmente, utilizando los datos de muestra de fútbol.

Aquí está la secuencia de comandos obtenida al hacer clic en la flecha roja para un grupo de ajuste y seleccionando "guardar secuencia de comandos para todos los objetos"
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" ) ) ));Y finalmente, aquí está el resultado:

No estoy seguro de por qué sucede esto. ¿Por qué el script guardado no es exacto con el que se guardó?
¿Por qué aparece la agrupación de "posición" fuera del cuadro "grupo de ajuste"?
¿Por qué se coloca el siguiente grupo de ajuste adyacente a ese cuadro de texto, en lugar de debajo de él?
¿Cómo se solucionaría esto o se escribiría un guión real para replicar la primera imagen?
Gracias
Cambie el script a:
Ventana nueva ("Fútbol - Bivariada",
Cuadro de lista V (
Grupo de ajuste (
Bivariada (Y (: Altura), X (: Grasa), por (: Posición)),
Bivariada (Y (: Peso), X (: Grasa), por (: Posición))
<< {Organizar en filas (2)}
)));
Después de 3 años, finalmente me topé con la solución general que estaba buscando. Hasta este punto, había estado creando dinámicamente la lista de grupos de ajuste que JMP generaría, y luego usando xpath para eliminar los estúpidos cuadros de texto y actualizar los títulos del grupo de ajuste. Aún así, el resultado no sería completamente idéntico al resultado de la GUI de JMP, ya que hacer tablas de datos combinadas no crearía columnas para las categorías en la cláusula "where".
Si alguien está escuchando, esto habría sido mucho más fácil si la documentación fuera mejor. Nada de lo que pude encontrar en ninguna parte me habría llevado a creer que así es como se podría hacer. Uno no debería tener que aprender cosas como esta a través de la experimentación aleatoria de prueba y error.
Vea abajo:
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 )
)
)
);