cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Juli
Level II

Reporting of data from LSMeans Differences Student's t

Hi all,

I am trying to make a report with specific data from the table of LSMeans Differences Student's t:

Juli_0-1731921303275.png

I would like a table with one of the formats as below: 

Juli_1-1731921761984.png

Juli_0-1731923239812.png

 

 

Sadly, I cannot get it to print correctly for the mean and it cannot take data from the bigger table. I get the below

Juli_3-1731922050015.png

 

I have tried the following code, where I have altered the '17' to numbers from 1-30 and nothing works - 17 is for a different outline box:

 

 

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.

 

 

How do you report the data from the bigger table?

 

Best regards

 

 

 

 

21 REPLIES 21
txnelson
Super User

Re: Reporting of data from LSMeans Differences Student's t

You can change the value of the report output by adjusting the Display Tree objects.

txnelson_0-1736512595784.png

By adding

		report(fm)[OutlineBox(1)]<<set title(
			report(fm)[OutlineBox(1)]<<get title || ", ID=" || BG);

prior to 

// Save the pointer to the results in the Fitmod list
		Insert Into( Fitmod, Fm );

it will change the title to the value you want it to be

Jim
Juli
Level II

Re: Reporting of data from LSMeans Differences Student's t

Dear Jim,

 

Thank you so much for all your help! I truly appreciate it and it has been an immense learning for me as well. The script is now fully functional and can be used with lots of datasets. 

 

Best regards,

Julie