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
Electron
Level I

Fitting multiple normal mixture to data

Hello,

I would like to get multiple normal mixture fitting to my data similar to what is presented here 

arXiv:1306.5856 Electron_1-1617139876211.png

Any thought on how this can done in JMP or JSL? Can I set a lower/upper limit on each peak locations in exchange for, likely, worse fits?

2 REPLIES 2
txnelson
Super User

Re: Fitting multiple normal mixture to data

There is a similar capability in the Distribution Platform if you use a Shadowgram option and then you can place 2 and 3 mixture distributions on the Shadowgram

shadow.PNG 

Jim
Georg
Level VII

Re: Fitting multiple normal mixture to data

I think this can be done in the distribution platform -> fit normal 3 mixture, see screenshot.

Probably you have to transform your target column to integers, so that frequency role in distribution platform works, see example script below. The script will generate a table, and you can execute the graph builder and distribution platform.

If you need to fit more complex curves, you may have a look at reliability platform or for custom defined fitting nonlinear platform, the latter one is very powerful, but tricky to fit.

There are also other posts dealing with this issue:

Solved: How to plot individual peak fit curves on histogram (fitted 2 normal mixture) - JMP User Com...

BR

 

Georg_0-1617179132564.png

 

New Table( "20210331_NormalMixture",
	Add Rows( 100 ),
	New Script(
		"density vs. x",
		Graph Builder(
			Variables( X( :x ), Y( :density ) ),
			Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
		)
	),
	New Script(
		"Distribution of x",
		Distribution(
			Freq( :density ),
			Continuous Distribution( Column( :x ), Fit Normal 3 Mixture ),
			SendToReport(
				Dispatch( {"x"}, "Compare Distributions", OutlineBox, {Close( 1 )} ),
				Dispatch( {"x"}, "Quantiles", OutlineBox, {Close( 1 )} ),
				Dispatch( {"x"}, "Summary Statistics", OutlineBox, {Close( 1 )} )
			)
		)
	),
	New Column( "x",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Row() ),
		Set Display Width( 53 )
	),
	New Column( "density",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula(
			Round(
				1000000000 * Normal Mixture Density(
					:x,
					[20, 40, 70],
					[10, 10, 10],
					[0.2, 0.6, 0.2]
				)
			)
		),
		Set Selected,
		Set Display Width( 91 )
	)
);
Georg