Rapport des données de LSMeans Differences Student's tSalut tout le monde,
J'essaie de faire un rapport avec des données spécifiques du tableau des différences LSMeans Student's t :

Je voudrais un tableau avec l'un des formats ci-dessous :


Malheureusement, je ne parviens pas à l'imprimer correctement pour la moyenne et il ne peut pas récupérer les données de la table la plus grande. J'obtiens le résultat ci-dessous

J'ai essayé le code suivant, où j'ai modifié le « 17 » en chiffres de 1 à 30 et rien ne fonctionne - 17 est pour une zone de contour différente :
sd = Open( "test_table.jmp" );<BR /><BR />Fitmod = Fit Model(<BR />Y( :"Test value"n ),<BR />Effects( :Person ),<BR />Random Effects( :Day[:Person] ),<BR />NoBounds( 0 ),<BR />Personality( "Standard Least Squares" ),<BR />Method( "REML" ),<BR />Emphasis( "Effect Leverage" ),<BR />Run(<BR />:"Test value"n << {Summary of Fit( 1 ),<BR />Analysis of Variance( 0 ), Parameter Estimates( 1 ), Scaled Estimates( 0 ),<BR />Plot Actual by Predicted( 1 ), Plot Regression( 0 ),<BR />Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),<BR />Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),<BR />{:Person << {LSMeans Student's t( 0.05 )}}}<BR />),<BR />Where( :ID == "A1" ),<BR />SendToReport(<BR />Dispatch(<BR />{"Test value ID=A1"},<BR />"Whole Model",<BR />OutlineBox,<BR />{Close( 1 )}<BR />),<BR />Dispatch(<BR />{"Test value ID=A1", "Person"},<BR />"Leverage Plot",<BR />OutlineBox,<BR />{Close( 1 )}<BR />)<BR />)<BR />);<BR /><BR />report(Fitmod) [Outline Box( 2 )] << Close( 0 );<BR />reportFitmod = Fitmod << Report;<BR /><BR /><STRONG>sumfit = reportFitmod[Outline Box( 17 )][Number Col Box( 1 )] << Get as Matrix;
meandiff = sumfit[1];
lowerCL = sumfit[3];
upperCL = sumfit[4];</STRONG><BR /><BR />term = reportFitmod[Outline Box( 13 )][String Col Box( 1 )] << Get();<BR /><BR />est = reportFitmod[Outline Box( 13 )][Number Col Box( 1 )] << Get as Matrix;<BR /><BR />dvalues = [];<BR />dvalues = meandiff |/ lowerCL |/ upperCL ;<BR />sfactor = term[2];<BR /><BR />dlg = New Window( "Custom Report",<BR />Outline Box( "Selected Values",<BR />Lineup Box( N Col( 2 ),<BR />Text Box( "Factor of Interest: " ),<BR />Text Box( sfactor ), ),<BR />tb = Table Box(<BR /><BR />String Col Box( " ",<BR />{"Mean difference: ", "Upper limit: ", "Lower limit: "}<BR />),<BR />Spacer Box( Size( 30, 30 ) ),<BR />,<BR />Spacer Box( Size( 0, 30 ) ),<BR />,<BR />Table Box(<BR />CloneTerm,<BR />Spacer Box( Size( 10, 0 ) ),<BR />,<BR />Number Col Box( "Estimate", est ),<BR />Spacer Box( Size( 10, 0 ) ),<BR />,<BR />Number Col Box( "Mean difference", meandiff)<BR />)<BR />)<BR />);<BR /><BR />tb << Set Shade Headings( 0 ); // Turn off shaded table headings.<BR />tb << Set Heading Column Borders( 0 ); // Turn off table column borders.<BR />
Comment rapporter les données du tableau plus grand ?
Cordialement
Automatisation et scriptsRé: Rapport des données de LSMeans Differences Student's tBienvenue dans la communauté JMP.
Je pense qu'il y a une confusion entre le tableau de données que vous avez joint et le script que vous avez joint. Les références dans le script aux colonnes à analyser ne correspondent pas aux colonnes du tableau de données joint.
Si vous pouvez fournir les pièces jointes correctes, je suis sûr que la Communauté pourra vous aider dans vos efforts.
Ré: Rapport des données de LSMeans Differences Student's tCher Jim,
Je m'excuse pour la confusion. Merci de m'avoir prévenu. J'ai joint le bon script maintenant.
Julie
Ré: Rapport des données de LSMeans Differences Student's tCela peut vous donner une longueur d'avance pour obtenir votre produit final. Cela produit

Names Default To Here( 1 );
sd = //Open( "test_table.jmp" );
Data Table( "test_table" );
Fitmod = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ), Parameter Estimates( 1 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 1 ), Plot Regression( 0 ), Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == "A1" ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch( {"Test value ID=A1", "Person"}, "Leverage Plot", OutlineBox, {Close( 1 )} )
)
);
Report( Fitmod )[Outline Box( 2 )] << Close( 0 );
reportFitmod = Fitmod << Report;
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] << get as matrix;
// Get Where clause variable
whereCol = Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, ":=)" );
whereVal = {};
Eval( Parse( "insert into(whereVal," || Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, "=)" ) || ");" ) );
meandiff = Round( Abs( crossTab[1, 2] ), 4 );
lowerCL = Round( Abs( crossTab[3, 2] ), 3 );
upperCL = Round( Abs( crossTab[4, 2] ), 3 );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
est = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
testValue = {};
Insert Into( testValue, (Substr( reportFitmod[Outline Box( 1 )] << get title, 10 )) );
dif = {};
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || ";" || Char( upperCL ) || "]" );
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( sfactor ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Test Value", testvalue ),
String Col Box( whereCol, whereVal ),
Number Col Box( "Mean, " || term[1], sumfit[1] ),
Number Col Box( "Mean, " || term[2], sumfit[2] ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );
Ré: Rapport des données de LSMeans Differences Student's tSalut Jim,
Comment le script doit-il être modifié s'il existe plusieurs identifiants pour générer un tableau avec tous les différents éléments ? Une boucle peut-elle être implémentée pour cela ?
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tJ'ai modifié le JSL pour pouvoir gérer plusieurs niveaux d'ID.

Names Default To Here( 1 );
sd = //Open( "test_table.jmp" );
Data Table( "test_table " );
Fitmod = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
by( :ID ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch( {"Test value ID=A1", "Person"}, "Leverage Plot", OutlineBox, {Close( 1 )} )
)
);
// Set the lists for the storage of the data from the by groups
whereVal = testValue = dif = sumfit1 = sumfit2 = {};
// Loop across each by group and gather the data
For Each( {rpt, group}, Fitmod,
// Point to the current report
reportFitmod = Fitmod[group] << Report;
// Get the means for the 2 levels
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
Insert Into( sumfit1, sumfit[1] );
Insert Into( sumfit2, sumfit[2] );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
// Get By Group column
whereCol = Word( 1, (reportFitmod[Outline Box( 1 )] << get title), "=)" );
Insert Into( whereVal, Word( 2, (reportFitmod[Outline Box( 1 )] << get title), "=)" ) );
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] <<
get as matrix;
meandiff = Round( Abs( crossTab[1, 2] ), 4 );
lowerCL = Round( Abs( crossTab[3, 2] ), 3 );
upperCL = Round( Abs( crossTab[4, 2] ), 3 );
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
// Create the Differeence in mean and CL string
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || ";" || Char( upperCL ) || "]" );
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Test Value", testvalue ),
String Col Box( whereCol, whereVal ),
Number Col Box( "Mean, " || term[1], sumfit1 ),
Number Col Box( "Mean, " || term[2], sumfit2 ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );
Votre tâche consiste maintenant à étudier le script et à comprendre ce qu'il fait. Le script fonctionne pour la table de données d'exemple et le modèle d'ajustement que vous avez spécifiés. Cependant, différentes tables de données avec différentes colonnes et différentes exécutions de modèle d'ajustement peuvent ne pas fonctionner avec le JSL qui génère la sortie du rapport. Vous devrez acquérir suffisamment de connaissances pour modifier le script en fonction de vos besoins.
De bonnes références pour cela sont le Guide de script et l'Index de script, disponibles dans le menu déroulant Aide de JMP.
Bien entendu, la communauté de discussion JMP sera là pour vous aider dans votre apprentissage du script.
Ré: Rapport des données de LSMeans Differences Student's tMerci pour votre travail impressionnant !
J'ai essayé d'exécuter le script, mais j'obtiens une erreur. J'ai essayé de parcourir les anciens cas et de rechercher sur Google la fonction For Each et l'erreur, ainsi que d'essayer de modifier le script, mais en vain. J'ai la version 16, cela pourrait-il poser un problème au script ?
Je pense que l'erreur provient de {rpt, group} car j'ai essayé de tout supprimer dans For Each et j'obtiens toujours cette erreur.

Je peux comprendre la plupart de ces éléments, mais d'où vient ce rpt et comment est-il utilisé ? Il n'est mentionné que dans For Each( {rpt, group} ...) donc je ne peux pas rationaliser comment il s'intègre.
Ré: Rapport des données de LSMeans Differences Student's tQuelle version de JMP utilisez-vous ? For Each() a été ajouté à JMP dans la version 16. La fonctionnalité By() dans Fit Mod n'a été ajoutée qu'à partir de JMP 18.
Le script devra être modifié pour gérer ces deux changements.
Ré: Rapport des données de LSMeans Differences Student's tJ'utilise la version 16.1.0 de JMP, donc cela doit être la raison.
La fonction FitMod doit-elle être remplacée par une autre fonction ou FitMod peut-il toujours être utilisé différemment ?
Ré: Rapport des données de LSMeans Differences Student's tVoici une version modifiée du script. Je l'ai testé dans JMP 16. J'ai supprimé la clause By et remplacé la fonctionnalité par une boucle For Each() qui exécute le modèle d'ajustement pour chaque niveau d'ID séparément. Le script rassemble ensuite la sortie de chacune des sorties distinctes du modèle d'ajustement et génère l'affichage de sortie final

Names Default To Here( 1 );
sd = //Open( "test_table.jmp" );
Data Table( "test_table" );
Fitmod = {};
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :ID ) );
// Loop across each levle of ID
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == ByGroups[group] ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"Test value ID=A1", "Person"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
);
// Set the lists for the storage of the data from the by groups
testValue = dif = sumfit1 = sumfit2 = {};
// Loop across each by group and gather the data
For Each( {rpt, group}, Fitmod,
// Point to the current report
reportFitmod = Fitmod[group] << Report;
// Get the means for the 2 levels
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
Insert Into( sumfit1, sumfit[1] );
Insert Into( sumfit2, sumfit[2] );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
// Get By Group column
whereCol = Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, ":=)" );
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] <<
get as matrix;
meandiff = Round( Abs( crossTab[1, 2] ), 4 );
lowerCL = Round( Abs( crossTab[3, 2] ), 3 );
upperCL = Round( Abs( crossTab[4, 2] ), 3 );
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
// Create the Differeence in mean and CL string
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || ";" || Char( upperCL ) || "]" );
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Test Value", testvalue ),
String Col Box( whereCol, ByGroups ),
Number Col Box( "Mean, " || term[1], sumfit1 ),
Number Col Box( "Mean, " || term[2], sumfit2 ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );Ré: Rapport des données de LSMeans Differences Student's tSalut Jim,
Merci beaucoup!
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tSalut Jim,
J'ai une question supplémentaire. Si je souhaite exécuter l'analyse avec de nombreuses valeurs de test, puis-je :
1. Faites une boucle avec FitModel puis continuez comme dans le script ci-dessus ?
2. Effectuer l'analyse séparément où j'obtiens le rapport dans un seul rapport, puis exécuter un script qui enregistre les données comme le script ci-dessus ?
Ou existe-t-il une autre voie que je devrais essayer d'examiner ?
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tJulie,
L’une ou l’autre approche fonctionnerait probablement.
Prendre cette décision me semble être une décision extrêmement importante à prendre au début. Je commencerais par déterminer à quoi vous voulez que le produit final ressemble, puis je prendrais le script et le modifierais pour obtenir ce résultat sur seulement 2 valeurs de test. Cela vous donnera à la fois un peu plus d'informations sur ce que devrait être l'approche et vous exposera également les domaines de JSL sur lesquels vous devez en savoir plus, afin d'étendre le script à votre produit final.
Ré: Rapport des données de LSMeans Differences Student's tSalut Jim,
Il est bon de savoir que les deux approches sont possibles en JSL.
Serait-il possible de modifier le code pour avoir également Y( :"Test value"n ) pour parcourir toutes les colonnes continues ?
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :ID ) );
// Loop across each level of ID
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == ByGroups[group] ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"Test value ID=A1", "Person"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
);J'ai examiné de nombreuses autres boucles et essayé de les modifier comme suit :
Names Default To Here( 1 );
sd = Open( "test_table_002.jmp" );
Data Table( "test_table_002" );
Fitmod = {};
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :ID ) );
colList = sd << Get Column Names( Continuous, String );
// Loop across each level of ID
For Each( i = 1, i <= Nitems( colList ), i++,
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( colList ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
colList << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == ByGroups[group] ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"Test value ID=A1", "Person"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
);
);Cependant, j'obtiens un code d'erreur que je ne comprends pas entièrement.
J'ai joint une table de test et j'ai vérifié que j'avais joint la bonne.
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tQuel est le message d'erreur ?
Ré: Rapport des données de LSMeans Differences Student's tVoici le message d'erreur :

Je n'ai que 43 lignes dans le script pour l'instant
Ré: Rapport des données de LSMeans Differences Student's tVotre modification de script est sur le point de fonctionner. À la ligne 11, vous spécifiez
For Each( i = 1, i <= Nitems( colList ), i++,
Cela devrait être
For( i = 1, i <= Nitems( colList ), i++,
Il existe une grande différence entre la fonction For Each() et For(). La définition et les exemples des deux fonctions différentes peuvent être trouvés dans l'index des scripts.
Vous devrez également modifier vos références pour
Liste des cols
aux lignes 15 et 23 pour spécifier à quels éléments de colList vous faites référence.
Puisque vous utilisez la variable « i » comme valeur d’index de recherche, vous devrez spécifier
colList[i]
Dans le tableau de données d'exemple que vous avez fourni, vous n'avez que la colonne Test Value comme colonnes numériques (continues), vous n'effectuerez donc qu'une seule boucle avec votre fonction For(). Cependant, si vous ajoutez d'autres colonnes numériques (continues), votre code avec les modifications de syntaxe que j'ai mentionnées s'exécutera pour chacune des colonnes numériques (continues)
Ré: Rapport des données de LSMeans Differences Student's tMerci. Cela a beaucoup de sens !
Une dernière question, si je souhaite modifier le texte du message envoyé au rapport, comment cela se fera-t-il ?
Il s'agit actuellement de « Test value ID=A1 » et ce qui est imprimé est fx Test value 1 ou Test value 2. Lorsque j'ai essayé de passer à « Test value ID=colList », le même message a été imprimé, donc je ne comprends pas comment cela fonctionne.
Je voudrais qu'il imprime le texte suivant pour la valeur de test fx 1 avec l'ID A1 : « Valeur de test 1, ID = A1 ». J'ai essayé avec différentes chaînes et fonctions, mais soit j'obtiens une erreur, soit il imprime simplement la même chose que précédemment.
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tJe ne comprends pas ce que vous dites. Je vais aborder la question sous un angle différent. Voici le résultat de votre tableau de données pour la colonne Valeur de test 1

que voulez-vous changer dans cette sortie ?
Ré: Rapport des données de LSMeans Differences Student's tCher Jim,
Je l'ai écrit sur l'image où je veux le changer et à quoi :

S'il ne précise pas l'ID, alors je ne sais pas comment différencier les différentes fenêtres qui s'affichent lorsqu'il y a plusieurs ID.
J'espère que cela a plus de sens:)
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tVous pouvez modifier la valeur de la sortie du rapport en ajustant les objets de l'arborescence d'affichage.

En ajoutant
report(fm)[OutlineBox(1)]<<SET title=""></SET>
prior to
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
cela changera le titre à la valeur que vous souhaitez
Ré: Rapport des données de LSMeans Differences Student's tCher Jim,
Merci beaucoup pour toute votre aide ! Je l'apprécie vraiment et cela a été un immense apprentissage pour moi aussi. Le script est maintenant entièrement fonctionnel et peut être utilisé avec de nombreux ensembles de données.
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tCher Jim,
J'ai utilisé le script et j'ai remarqué que lorsque j'imprime les données, la liste des paramètres ne me donne pas tous les différents paramètres de valeur de test, mais uniquement la valeur de test 1 :

Je me rends compte que cela vient de la partie suivante du script :
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
J'ai essayé de le modifier, mais soit il imprime toujours le seul paramètre, soit il donne une erreur, soit il imprime quelque chose dont je n'ai aucune idée d'où cela vient.
Cordialement,
Julie
Ré: Rapport des données de LSMeans Differences Student's tJe ne peux plus reconstituer le script complet que vous utilisez. Veuillez joindre le script complet que vous utilisez.
Ré: Rapport des données de LSMeans Differences Student's tSalut Jim,
J'ai joint un tableau de données fonctionnel et le script.
FR/
Julie
Ré: Rapport des données de LSMeans Differences Student's tJ'ai pris un raccourci pour résoudre le problème. J'ai ajouté une liste JMP appelée « titres » qui est renseignée après chaque exécution et immédiatement après la définition du titre de la boîte de contour (). J'utilise ensuite simplement la liste des titres dans la boîte de tableau () de votre section dlg.

Names Default To Here( 1 ); // will ignore normal JSL naming
sd = currentdatatable(); // call upon open data table
// Define that Fitmod is empty. We will fill this with our information in the loop
Fitmod = {};
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :Batch ) );
// Determine the result columns
colList = sd << Get Column Names( Continuous, String );
sum = 0; // Prepare getting the total number of result columns. Will be updated in the loop
titles = {};
// Loop across each level of Batch
nw_means = New Window("My Report",
For( i = 1, i <= Nitems( colList ), i++,
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( colList[i] ),
Effects( :Laboratory ),
Random Effects( :Day[:Laboratory] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
colList[i] << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :Batch == ByGroups[group] ),
SendToReport(
Dispatch( {"" }, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"", "Laboratory"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
report(fm)[OutlineBox(1)] << set title(report(fm)[OutlineBox(1)] << get title || ", ID=" || BG);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
insert into(titles, report(fm)[OutlineBox(1)] << get title);
);
sum = sum + 1
);
);
// Set the lists for the storage of the data from the by groups
testValue = dif = sumfit1 = sumfit2 = {};
// Loop across each by group and gather the data
For Each( {rpt, group}, Fitmod,
// Point to the current report
reportFitmod = Fitmod[group] << Report;
// Get the means for the 2 levels
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
Insert Into( sumfit1, sumfit[1] );
Insert Into( sumfit2, sumfit[2] );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
// Get By Group column
whereCol = Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, ":=)" );
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] << get as matrix;
meandiff = Round( crossTab[1, 2] , 4 );
lowerCL = Round( crossTab[3, 2] , 3 );
upperCL = Round( crossTab[4, 2] , 3 );
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
// Create the Difference in mean and CL string
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || " ; " || Char( upperCL ) || "]" );
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Paramenter", titles ),
String Col Box( whereCol, repeat(ByGroups, sum) ),
Number Col Box( "Mean, " || term[1], sumfit1 ),
Number Col Box( "Mean, " || term[2], sumfit2 ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );
Ré: Rapport des données de LSMeans Differences Student's tParfait ! Merci