- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Rapport des données de LSMeans Differences Student's t
Salut 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" );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( 17 )][Number Col Box( 1 )] << Get as Matrix;
meandiff = sumfit[1];
lowerCL = sumfit[3];
upperCL = sumfit[4];term = reportFitmod[Outline Box( 13 )][String Col Box( 1 )] << Get();est = reportFitmod[Outline Box( 13 )][Number Col Box( 1 )] << Get as Matrix;dvalues = [];dvalues = meandiff |/ lowerCL |/ upperCL ;sfactor = term[2];dlg = New Window( "Custom Report",Outline Box( "Selected Values",Lineup Box( N Col( 2 ),Text Box( "Factor of Interest: " ),Text Box( sfactor ), ),tb = Table Box(String Col Box( " ",{"Mean difference: ", "Upper limit: ", "Lower limit: "}),Spacer Box( Size( 30, 30 ) ),,Spacer Box( Size( 0, 30 ) ),,Table Box(CloneTerm,Spacer Box( Size( 10, 0 ) ),,Number Col Box( "Estimate", est ),Spacer Box( Size( 10, 0 ) ),,Number Col Box( "Mean difference", meandiff))));tb << Set Shade Headings( 0 ); // Turn off shaded table headings.tb << Set Heading Column Borders( 0 ); // Turn off table column borders.
Comment rapporter les données du tableau plus grand ?
Cordialement
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Cela 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 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Voici 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 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Bienvenue 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.
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Cher Jim,
Je m'excuse pour la confusion. Merci de m'avoir prévenu. J'ai joint le bon script maintenant.
Julie
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Cela 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 );
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Salut 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
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
J'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.
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Merci 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.
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Quelle 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.
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
J'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 ?
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Ré: Rapport des données de LSMeans Differences Student's t
Voici 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 );
Ce message écrit à l'origine en English (US) a été traduit pour votre commodité. Lorsque vous répondez, il sera également traduit en English (US).