Subscribe Bookmark RSS Feed

JSL code for model simulation

fidaleom

Community Trekker

Joined:

Oct 20, 2014

Hello! I created a model for a system and I am interested in simulating this system by using the developed model through JMP simulator (under the profiler menu). I need the JSL code for this action, that is the code that allows me to simulate the process starting from the independent variables and the prediction formula. I need the simulation to consider also the noise associated to the model. I would appreciate any help on this.issue.

Many thanks,

Marcello.


2 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

One of the nice things about JMP is that it generates code for you. So, when in doubt, try doing things 'by hand' and inspect the resulting code (use 'Script > Save Script to Script Window'). Bear in mind that code generated this way tends to be verbose.

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt <<

// JMP generated code follows . . .

Fit Model(

  Y( :height ),

  Effects( :weight ),

  Personality( "Standard Least Squares" ),

  Emphasis( "Effect Leverage" ),

  Run(

  Profiler(

  1,

  Confidence Intervals( 1 ),

  height << Response Limits(

  {Lower( 50, 0.066 ), Middle( 61.25, 0.5 ), Upper( 72.5, 0.9819 ),

  Goal( "Maximize" ), Importance( 1 )}

  ),

  Term Value( weight( 134.8, Lock( 0 ), Show( 1 ) ) ),

  Simulator(

  1,

  Factors( weight << Random( Normal( 134.8, 9 ) ) ),

  Responses( height << No Noise ),

  Resimulate

  )

  ),

  :height << {Plot Actual by Predicted( 1 ), Plot Residual by Predicted( 1 ),

  Plot Effect Leverage( 1 )}

  ),

  SendToReport(

  Dispatch( {"Response height"}, "Whole Model", OutlineBox, {Close( 1 )} ),

  Dispatch( {"Response height"}, "weight", OutlineBox, {Close( 1 )} ),

  Dispatch(

  {"Response height", "Prediction Profiler"},

  "Profile Simulator Histogram",

  FrameBox,

  {DispatchSeg( Hist Seg( 1 ), {Histogram Color( 4 ), Bin Span( 2, 0 )} )}

  ),

  Dispatch(

  {"Response height", "Prediction Profiler"},

  "Simulator",

  OutlineBox,

  {Close( 1 )}

  )

  )

);


fidaleom

Community Trekker

Joined:

Oct 20, 2014

Thanks Ian. I had never tried the ‘save script to script window’, I found it useful.

Da: Ian@JMP

Inviato: giovedì 10 settembre 2015 20.41

A: Marcello Fidaleo

Oggetto: Re: - JSL code for model simulation

<https://community.jmp.com/?utm_source=JIVE&utm_medium=email&utm_campaign=System%20Email%20Tracking> JMP User Community

JSL code for model simulation

reply from Ian@JMP <https://community.jmp.com/people/Ian%40JMP?et=watches.email.thread> in Discussions - View the full discussion <https://community.jmp.com/message/223276?et=watches.email.thread#223276>