Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Automating a DoE and fitting the Model

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Automating a DoE and fitting the Model

Feb 17, 2012 2:46 AM
(1986 views)

Hi

I'm working on a bit of software attempting to automate JMP 9 in C#, what I'm attempting to do is create a DoE, fill the data table with my results and then fit the model. I can get as far as generating the DoE and filling the datatable but I'm getting stuck at the final stage of fitting the model. My code looks a little like this (part of a larger class with Response, Factor and Term properties) :

JMP.Application jmp = new JMP.Application();

jmp.Visible = true;

JMP.DOECustom doe = jmp.CreateDOECustom();

foreach (JMPResponse response in this.Responses)

{

doe.AddResponse(response.ResponseType, response.Name, response.Minimum, response.Maximum, 1);

}

foreach (JMPContinuousFactor factor in this.Factors)

{

doe.AddContinuousFactorWithName(factor.Name, factor.Minimum, factor.Maximum);

}

foreach (JMPTerm term in this.Terms)

{

doe.AddTerms(term.AsIntArray());

}

doe.MakeDesign();

JMP.DataTable dt = doe.MakeTable();

// Do bit's and pieces to fill the table

What I'd like to do next is Fit the model and then (hopefully) extract the various coefficients, t statistics and so on from each of the terms. I can't really find anything obvious in the documentation or the code samples that lets me do this.

Any help appreciated.

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Automating a DoE and fitting the Model

The following pure JSL example may help. This kind of thing is discussed in the Scripting PDF doc under the heading Platform Scripting Notes.

Open( "$SAMPLE_DATA/fitness.jmp" );

fit_model_object = Fit Model(

Y( :Oxy ),

Effects( :Age, :Weight, :Runtime, :RunPulse, :RstPulse ),

Personality( Standard Least Squares ),

Emphasis( Effect Leverage ),

Run(

:Oxy << {Lack of Fit( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),

Plot Residual by Predicted( 1 ), Plot Effect Leverage( 1 )}

)

);

vc = fit_model_object << Get Variance Components();

effnames = fit_model_object << Get Effect Names();

effpvals = fit_model_object << Get Effect PValues();

ests = fit_model_object << Get Estimates();

parmnames = fit_model_object << Get Parameter Names();

randeffnames = fit_model_object << Get Random Effect Names();

stderr = fit_model_object << Get Std Errors();

fit_model_object << Get X Matrix();

fit_model_object << Get XPX Inverse();

Show( effnames, effpvals, ests, parmnames, stderr );

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Automating a DoE and fitting the Model