Función resumirNecesito ayuda para utilizar la función de resumen y usaré la clase grande como un conjunto de datos de ejemplo.El siguiente ejemplo funciona perfectamente, pero necesito resumir los datos por sexo.Cuando utilizo el operador BY(:Sex) me sigue apareciendo un error.El propósito de hacer esto es generar los resultados y usarlos en un número de referencia calculado por múltiples variables para fines gráficos..
DTData= Open( "$SAMPLE_DATA/Big Class.jmp" );
summarize(
(
Sigma=StdDev(:height),
Avg= mean(:height),
);
show(sigma,avg);
secuencias de comandosRe: función resumirEso funciona, pero no puedo usarlo en forma de matriz para lo que estoy tratando de hacer.Mi objetivo es generar la desviación media y estándar de una altura por parte de la población femenina en una variable.Luego uso esas variables para una línea de referencia calculada.Por la población cambia constantemente y tener una línea de referencia que sea dinámica es útil.Aquí está mi ejemplo.
DTData = Open( "$SAMPLE_DATA/Big Class.jmp" );
Summarize( sigma = Std Dev( :height ), avg = Mean( :height ) );
siglow = avg - sigma;
sighigh = avg + sigma;
Variability Chart(
Y( xx ),
X( :yyy, :zzz ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),
Connect Cell Means( 1 ),
Show Group Means( 1 ),
Std Dev Chart( 0 ),
Points Jittered( 1 ),
AIAG Labels( 0 ),
Dispatch(
{},
"2",
ScaleBox,
{Format( "Best" ), Add Ref Line(
Eval( siglow ),
dotted,
{178, 0, 0},
"Height Female -1 sigma"
), Add Ref Line( Eval( sighigh ), dotted, {178, 0, 0}, "Height Female +1 sigma" ),
Add Ref Line( Eval( avg ), solid, {255, 0, 0}, "mean height female" ),
Show Major Grid( 1 ), Show Minor Grid( 1 )}
),
Where( :what == "why" )
);
Re: función resumirAquí hay un par de ejemplos
///example from the scripting index for Summarize
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Summarize( exg = By( :sex ), exm = Mean( :height ) );
Eval List( {exg, exm} );
/// I like to put the stats into a data table instead of variables when I'm going to graph the results
Data Table( "Big Class" ) << Summary( Group( :sex ), Mean( :height ), Std Dev( :weight ) );
///Graph Builder summarizes and makes a graph automatically
dt << Graph Builder(
Size( 249, 298 ),
Show Control Panel( 0 ),
Variables( X( :sex ), Y( :height ), Y( :weight ) ),
Elements(
Position( 1, 1 ),
Bar( X, Y, Legend( 3 ), Bar Style( "Side by side" ), Summary Statistic( "Mean" ) )
),
Elements(
Position( 1, 2 ),
Bar( X, Y, Legend( 4 ), Bar Style( "Side by side" ), Summary Statistic( "Std Dev" ) )
)
);