J'ai effectué une analyse ACV sur des questions d'enquête. Dans la section « Estimations des paramètres » du rapport généré, il y a un tableau. Lorsque je l'exporte, il n'exporte pas les cellules fusionnées par-dessus. Par exemple:
Cluster 1 : [Colonne supérieure : État]
[AZ] [VA], [DC], [TX]
Il exporte uniquement le cluster et les estimations de paramètres pour [AZ] [VA], [DC], [TX]. Je souhaite exporter tout ce qui est visible, y compris la colonne supérieure avec les cellules fusionnées.
J'espère que quelqu'un dans la Communauté aura une meilleure solution que celle que j'ai proposée. Je ne connais pas de moyen direct d'ajouter les en-têtes étendus aux en-têtes de colonnes dans une table de données de sortie. Cependant, j'ai écrit un exemple de script qui peut faire ce que vous voulez.
Il faut une sortie d'analyse LCA

et affichez le tableau Estimations des paramètres avec les en-têtes étendus préfixés à chaque colonne.

Voici l'exemple de script
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;
C'est impressionnant @txnelson, vous n'avez aucune idée du temps que vous m'avez aidé à gagner. Bravo à vous, monsieur !