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
- :
- how do I use Graph Builder to fit curve/trendline ...

Topic Options

- 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
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 23, 2016 8:35 AM
(1107 views)

Dear Friends,

I need your help in following data set.

Suppose I have temperature, defects and total parts produced at that temperature,

temperature | defect Percent | Number of parts produced |

640 | 10 | 10 |

645 | 15 | 50 |

650 | 3 | 200 |

655 | 3.2 | 1000 |

660 | 3 | 2000 |

665 | 2 | 100 |

670 | 10 | 10 |

I want a graph of temp v/s defect percentage and giving weightage to total parts produced.

If I don't consider weights(total parts produced) the trend is misleading. For instance at 640 deg, total parts produced is 10, but just one defect makes defect percentage 10%. Which affects the trendline. Is there any way to give weightage based on number of parts produced at that temperature.

In other words 650, 655. 660 actually represent the trend as number of parts produced are high and give clear picture, increase in temperature reduces defects. Also I cannot discard first two and last two points.

Thanks

5 REPLIES

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

Nov 23, 2016 1:32 PM
(1083 views)

Graph Builder has limited capabilities for fitting models. The correct analysis of this data is called a 'probit analysis.' You would use the Generalized Linear Models fitting personality through the Analyze > Fit Model dialog instead of the Graph > Graph Builder.

Here is the script that will create the JMP data table with your data and table script to launch the correct analysis.

New Table( "untitled", Add Rows( 7 ), New Script( "Model", Fit Model( Y( :Defective Parts, :Total Parts ), Effects( :Temperature, :Temperature * :Temperature ), Personality( "Generalized Linear Model" ), GLM Distribution( "Binomial" ), Link Function( "Probit" ) ) ), New Column( "Temperature", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [640, 645, 650, 655, 660, 665, 670] ) ), New Column( "Percentage Defects", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0.1, 0.15, 0.03, 0.032, 0.03, 0.02, 0.1] ) ), New Column( "Total Parts", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [10, 50, 200, 1000, 2000, 100, 10] ) ), New Column( "Defective Parts", Numeric, "Continuous", Format( "Best", 12 ), Formula( :Percentage Defects * :Total Parts ) ) );

Copy this script to a File > New > Script window and then run it. The response appears to be non-linear, with a minimum in the mid-temperature range.

Note that you can save this model and then use it in Graph Builder as a formula column.

Learn it once, use it forever!

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

Nov 29, 2016 3:32 AM
(1000 views)

Thank You for the script.

But my main concern was there should be less weightage for temperatures 640, 645 and 670 as number of parts produced at these temperatures is very low. But as can be seen from regression plot, 640, 645 and 670 are given eaqual weightage resulting in a U shaped curve.

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

Nov 29, 2016 4:23 AM
(995 views)

I am not sure what you mean by 'weightage.' The total number of parts at each covariate level is already part of the probit analysis. The total number of parts per level affects the confidence intervals of the estimates. There is no need to apply explicit weights to some observations because they occur less frequently. In fact, that additinal weighting would distort the results.

Learn it once, use it forever!

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

Dec 1, 2016 3:15 AM
(943 views)

Thanks for the script. Please please find attached actual data.

My objective is to plot defect % against temperature. But for lower temperatures number of parts produced is less and defect percentage too high, so the curve gives a wrong indication.

I want a curve of defect% and temperature giving weightage to total number of parts produced.

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

Nov 30, 2016 5:23 AM
(970 views)

Your data is very skewed in terms of sample size. Perhaps you should consider running a Definitive Screening Design with a consistent sample size of perhaps 500. Barring running a DOE, I do not see anything that excites me when I analyze your data in various platforms.

Steve