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

- JMP User Community
- :
- Discussions
- :
- Graph line of fit for all values and ellipse by group

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

Highlighted

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

Jul 2, 2019 11:51 AM
(1946 views)

I'm trying to figure out if it's possible to create a graph in JMP which draws a Line of Fit relative to all points in the graph along with 95% ellipse curves over individual groups.

For example if this is my data:

X Value | Y Value | Group |

3 | 3 | A |

2 | 6 | A |

4 | 2 | A |

1 | 6 | A |

1 | 3 | B |

2 | 2 | B |

3 | 2 | B |

4 | 1 | B |

If I do Graph Builder - X Value to X - Y Value to Y - Group to Color - Click Line of Fit. I want to keep the color for each group and the regression line fit based on points from both groups.

Then if I do this in another Graph Builder - X Value to X - Y Value to Y - Group to Overlay - Click Ellipse. I want to keep the separate ellipses over each group without removing the regression line or color from above.

I've tried various methods (copying Frame Contents, scripts, etc) for accomplishing this without any luck.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

Maybe try this without Graph Builder.

Use Fit Y by X. Put your X and Y values in the proper roles.

In the resulting graph, click the red triangle and choose Fit Line.

Now go back to the red popup and choose Group By... and specify your Group column.

One more trip to the red popup and choose Density Ellipse > 0.95.

To make things prettier you will likely want to right-click the graph and add a Row Legend with the Group column to establish the marker colors.

You will also want to click red popups associated with each density ellipse to shade them, if you like the shading.

I've included my result for your sample data.

Dan Obermiller

2 REPLIES 2

Highlighted

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

Maybe try this without Graph Builder.

Use Fit Y by X. Put your X and Y values in the proper roles.

In the resulting graph, click the red triangle and choose Fit Line.

Now go back to the red popup and choose Group By... and specify your Group column.

One more trip to the red popup and choose Density Ellipse > 0.95.

To make things prettier you will likely want to right-click the graph and add a Row Legend with the Group column to establish the marker colors.

You will also want to click red popups associated with each density ellipse to shade them, if you like the shading.

I've included my result for your sample data.

Dan Obermiller

Highlighted
##

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

Re: Graph line of fit for all values and ellipse by group

Is this what you want......overall line, but separate ellipses? If so, just specify under the variables for Line, to not Overlay

Jim

Article Labels

There are no labels assigned to this post.