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 to extract fitted line equations?

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

Aug 27, 2010 7:42 AM
(3539 views)

For example, the fitted line is y=ax+b, how can i get a and b and save them into variables. When i try to use tree structure, it only shows the tree for first plot, and the command to grab values from boxes doesn't work.

Anyone knows how to do that? thanks in advance!

Message was edited by: Schweini

1 ACCEPTED SOLUTION

Accepted Solutions

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

Sep 7, 2010 11:42 PM
(5745 views)

Solution

This is a somewhat shorter method that uses the built in "make combined data table" command to produce a table containing all the parameters which you can slice and dice as required.

```
//Opendatatable and make report
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
Y( :weight ),
X( :height ),
Fit Line( {Line Color( "Red" )} ),
By( :age )
);
rbiv = biv << report;
//Combine parameter estimates in new table
dtparms = rbiv[1][tablebox(4)] << make combined data table;
dtparms << Set Name("Parameter Table");
```

3 REPLIES

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

Sep 1, 2010 2:17 AM
(3295 views)

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

Sep 1, 2010 5:58 AM
(3295 views)

Here is an example script generating a table with the parameter estimates. The script assumes that the different plots are generated using the "by" command/box in the Bivariate platform.

```
//Open datatable and make report
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
Y( :weight ),
X( :height ),
Fit Line( {Line Color( "Red" )} ),
By( :age )
);
rbiv = biv << report;
Summarize( groups = by( age ) ); // A list of all by-groups
n = N Items( groups );
//Create output table and fill with estimates
dtOut = New Table( "Regression parameters",
New Column( "Group", Character ),
New Column( "Intercept", numeric ),
New Column( "Slope", numeric ),
addrows( n ));
For( j = 1, j <= n, j++,
Estimates = rbiv[j]["Linear Fit"]["Parameter Estimates"][1][3] << get as matrix;
:Group[j] = groups[j];
:Intercept[j] = Estimates[1];
:Slope[j] = Estimates[2]);
```

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

Sep 7, 2010 11:42 PM
(5746 views)

This is a somewhat shorter method that uses the built in "make combined data table" command to produce a table containing all the parameters which you can slice and dice as required.

```
//Opendatatable and make report
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
Y( :weight ),
X( :height ),
Fit Line( {Line Color( "Red" )} ),
By( :age )
);
rbiv = biv << report;
//Combine parameter estimates in new table
dtparms = rbiv[1][tablebox(4)] << make combined data table;
dtparms << Set Name("Parameter Table");
```