Ho condotto un'analisi LCA sulle domande del sondaggio. Nella sezione "stime dei parametri" del report generato è presente una tabella. Quando lo esporto, non esporta le celle unite in alto. Per esempio:
Cluster 1: [Colonna superiore: Stato]
[AZ] [VA], [DC], [TX]
Esporta solo il cluster e le stime dei parametri per [AZ] [VA], [DC], [TX]. Voglio esportare ogni cosa visibile, inclusa la colonna superiore con celle unite.
Spero che qualcuno nella community abbia una soluzione migliore di quella che ho trovato. Non sono a conoscenza di un modo diretto per aggiungere le intestazioni spanning alle intestazioni di colonna in una tabella di dati di output. Tuttavia ho scritto uno script di esempio che può fare quello che vuoi.
Richiede l'output di un'analisi LCA

e genera la tabella delle stime dei parametri con le intestazioni spanning come prefisso per ciascuna colonna

Ecco lo script di esempio
Names Default To Here( 1 );
// Run a LCA
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
dt << Latent Class Analysis(
Y( :sex, :marital status, :country, :size, :type ),
Set Random Seed( 12345 ),
Number of Clusters( 3 ),
);
// Create an output table will all header names in each column's name
obj = current report()[OutlineBox(1)];
// Get the number of tiles that span across columns
numSpans = Length( (obj << xpath( "//ColSpanBox" )) );
// Loop across the spanning titles and add the title as a prefix to the column name
For( span = 1, span <= numSpans, span++,
// Get the header
theHeading = obj["Parameter Estimates"][Col Span Box( span )] << get heading;
// Get the column names for the current spanning header
theCols = obj["Parameter Estimates"][Col Span Box( span )] << get text;
// Loop across each column name in the span
subColNum = 1;
While( Try( Word( subColNum, theCols, "\!n\!t\!r" ), "" ) != "",
targetCol = Word( subColNum, theCols, "\!n\!t\!r" );
// Loop across all numeric column and when a match is found change the column name
numCol = 2;
While(
Try( obj["Parameter Estimates"][Number Col Box( numCol )] << get heading, "" )
!= "",
theNumberColBoxHeader = obj["Parameter Estimates"][Number Col Box( numCol )]
<< get heading;
If( targetCol == theNumberColBoxHeader,
obj["Parameter Estimates"][Number Col Box( numCol )] <<
set heading( theHeading || " " || targetCol )
);
numCol++;
);
subColNum++;
);
);
// Create the output data table
obj["Parameter Estimates", Table Box( 1 )] << Make into data table;
È impressionante @txnelson, non hai idea di quanto tempo mi hai aiutato a risparmiare. Complimenti a lei, signore!