cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Domix
Level II

Non-linear modeling, plotting issue

Hi all, 

I performed the nonlinear modeling on a data set which is divided in 2 groups by a label. 

The modeling works just fine, but is it possible to have the 2 fit curves of the dataset on the same graph? 

I've tried with the option Group but it doesn't work... 

What can I do?

 

Thank you!

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Non-linear modeling, plotting issue

You should be able to use Graph Builder, specifying the predictor(formula) column as the Y column, your X column as specified, and then use your grouping column as the overlay column.

If I am still not getting you where you need to go, could you provide some sample data?  I am not a Nonlinear expert, so if I am missing the finer points..........

nonlin2.PNG

 

Jim

View solution in original post

Re: Non-linear modeling, plotting issue

Remember to right-click in the Graph Builder plot and select Smoother > Change to > Formula. (Assuming that you save the fitted nonlinear model as a column formula.)

View solution in original post

8 REPLIES 8
txnelson
Super User

Re: Non-linear modeling, plotting issue

Can you provide more specifics, 

     The version of JMP

     The Nlin method you are using

Below is a run of the Nonlinear platform, of age by height, grouped by sex, and it is showing the fit for both sexes on the same graph, in 2 different formats.

nonlin.PNG

Jim
Domix
Level II

Re: Non-linear modeling, plotting issue

I'm using the Nonlinear fitting on JMP14.

To fit the data I created a new column where to store as formula the model, because it's not in the default fitting type. I'm using this to perform the fitting and obtained the parameters. 

 

 

 

txnelson
Super User

Re: Non-linear modeling, plotting issue

You should be able to use Graph Builder, specifying the predictor(formula) column as the Y column, your X column as specified, and then use your grouping column as the overlay column.

If I am still not getting you where you need to go, could you provide some sample data?  I am not a Nonlinear expert, so if I am missing the finer points..........

nonlin2.PNG

 

Jim

Re: Non-linear modeling, plotting issue

Remember to right-click in the Graph Builder plot and select Smoother > Change to > Formula. (Assuming that you save the fitted nonlinear model as a column formula.)

wendy1123
Level II

Re: Non-linear modeling, plotting issue

I am having a similar problem to OP, but I'm having trouble adapting it to my equation. I'm doing nonlinear regression using the script below to prepare the data and then using the Analyze option with Normalized Fluorescence as the Y value, and the Model (formula) column as the X value (reversing the axis), and By Well Position, but this only does one at a time. If I use the GraphBuilder, I can't get the Smoother to use the formula . I would like to have all the plots on one graph OR in an absolutely ideal  unicorn world, graph 3 well positions at a time (eg. B2-B4), somehow average the lines, and then have all 10-20 averages on one graph but that seems unrealistic :P.

 

Also, is there a way to use a script with the Analyze button or GraphBuilder?  I found this script here but I'm not sure how to adapt it.

 

 

Data Table( "Melt Curve Raw Data" ) << New Column( "Normalized Fluorescence",
	formula(
		(:Fluorescence - Col Min( :Fluorescence, :Well Position )) / (
		Col Max( :Fluorescence, :Well Position )
		-Col Min( :Fluorescence, :Well Position ))
	)
);
	
Data Table( "Melt Curve Raw Data" ) << New Column( "Model", Numeric, 
	"Continuous", Format( "Best", 12 ), 
	Formula(Parameter({m1 = -60, m2 = 0.2, m3 = -50, m4 = -0.3, m5 = 100000, m6 = 320}, 
	((m1 + m2 * (:Temperature + 273)) + (m3 + m4 * (:Temperature + 273)) * Exp((-m5 / (1.987 * 
	(:Temperature + 273))) * (1 - (:Temperature + 273) / m6))) / 
	(1 + Exp((-m5 / (1.987 * (:Temperature + 273))) * (1 - (:Temperature + 273) / m6))))));

  (the above script was developed with the help of user txnelson)

haozh
Level I

Re: Non-linear modeling, plotting issue

Hi Mark, 

 

Thanks for your information. I got a question regarding  the : Smoother > Change to > Formula. it works with the first equation, however it didn't work when the formula is the second one. Can you help to check what is the wrong with the definition of the second formula? 

Formula 1.png

Formula 2.png

  

 

Domix
Level II

Re: Non-linear modeling, plotting issue

Thank you! very much this combined with the advice from @Mark_Bailey below helped me to solve this!
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Non-linear modeling, plotting issue

For using a grouping variable, parameters for each level has to be defined in the formula editor (use checkbox "Expand Into Categories..."). However, the plot option will be greyed out, even if the formula is properly defined for a grouping variable.

 

So within the nonlinear platform report it appears not to be possible to plot more than one curve (JMP 14.2). Jim's suggestion to use Graphbuilder is a good alternative and could probably be automated with JSL.