Getting Parameter Estimates from Tree StructureI have the following code (in JMP 14.2) that extracts parameter estimates from a logistic regression's tree structure.
fm = trend_count_dt << Fit Model(
Y( :Name( "<COLUMN name="">" ), :Total Cases ),
Effects( :Interval ),
Personality( Generalized Linear Model ),
GLM Distribution( Binomial ),
Link Function( Logit ),
Overdispersion Tests and Intervals( 0 ),
Name( "Firth Bias-adjusted Estimates" )(0),
Run, invisible
);
fmrep = fm << report;
parameter_estimates = fmrep[numbercolbox(14)] << get;
prob_chisq = fmrep[numbercolbox(17)] << get;
</COLUMN>
This has worked reliably until a user got an error. For their conditions the parameter estimates are in Number Col Box(15), not (14). Is there an easy way to figure out the correct number col box to use? 99.99% of the time the parameter estimates are in (14). Here's a portion of the tree structure:

AnalyticsScriptingRe: Getting Parameter Estimates from Tree StructureThanks Jim - exactly what I needed!
Re: Getting Parameter Estimates from Tree StructureI would do a relative reference after pointing to the Outline Box
parameter_estimates = fmrep["Parameter Estimates"][numbercolbox(1)] << get;
Re: Getting Parameter Estimates from Tree StructureThis should work but returns a list of strings instead of the objects (I had a support ticket in for it at one time, need to check into it);
fm << XPath( "//NumberColBoxHeader[text()='Estimate']/following-sibling::NumberColBoxItem")
Instead you could do this:
(fm << XPath( "//NumberColBox[NumberColBoxHeader[text()='Estimate']]"))[1][1::2]
Here is the full script I used to make those examples:
View more...Names default to here(1);
dt = Open( "$Sample_data/big class.jmp" );
fm = dt << Fit Model(
Y( :height, :weight ),
Effects( :sex ),
Personality( Generalized Linear Model ),
GLM Distribution( Binomial ),
Link Function( Logit ),
Overdispersion Tests and Intervals( 0 ),
Name( "Firth Bias-adjusted Estimates" )(0),
Run
);
//find nodes of interest here:
new window( "XML Script", << Script, fm << get xml);
//This SHOULD work but returns a string instead of the object (I had a support ticket in for it at one time, need to check into it);
fm << XPath( "//NumberColBoxHeader[text()='Estimate']/following-sibling::NumberColBoxItem")
//Instead you could do this:
(fm << XPath( "//NumberColBox[NumberColBoxHeader[text()='Estimate']]"))[1][1::2]