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 calculate regression slopes by subject in t...

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

Apr 2, 2013 12:14 PM
(2143 views)

1 ACCEPTED SOLUTION

Accepted Solutions

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

Apr 3, 2013 10:15 AM
(3606 views)

Solution

You can use the Fit Y by X platform. Add GFR as Y, Age as X. Then in the bivariate report, select "Group By..." under the red triangle and select Patient before choosing "Fit Line" (also under the red triangle). Finally, right-click on any of the tables named "Parameter Estimates" and select "make combined data table" to make a table with all the slopes (the intercepts will be there too but are easy to sort out and delete).

The JSL version would be something like this:

dt = Data Table**(** "Sample_GFRbyAgebyPt.jmp" **)**;

biv = dt << Bivariate**(** Y**(** :GFR **)**, X**(** :Age **)**, Group by**(** :Patient **)**, Fit Line**(** **1** **)** **)**;

slopes = Report**(** biv **)[**"Parameter Estimates"**][****1****]** << make combined data table;

slopes << select where**(** :Term == "Intercept" **)** << delete rows;

2 REPLIES

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

Apr 3, 2013 10:15 AM
(3607 views)

You can use the Fit Y by X platform. Add GFR as Y, Age as X. Then in the bivariate report, select "Group By..." under the red triangle and select Patient before choosing "Fit Line" (also under the red triangle). Finally, right-click on any of the tables named "Parameter Estimates" and select "make combined data table" to make a table with all the slopes (the intercepts will be there too but are easy to sort out and delete).

The JSL version would be something like this:

dt = Data Table**(** "Sample_GFRbyAgebyPt.jmp" **)**;

biv = dt << Bivariate**(** Y**(** :GFR **)**, X**(** :Age **)**, Group by**(** :Patient **)**, Fit Line**(** **1** **)** **)**;

slopes = Report**(** biv **)[**"Parameter Estimates"**][****1****]** << make combined data table;

slopes << select where**(** :Term == "Intercept" **)** << delete rows;

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

Apr 3, 2013 11:03 AM
(1803 views)

Thanks MS: The script worked immediately and removed the intercept rows. After a couple of stumbles, I was able to get the same results using the JMP menus. The slopes agree with independent regression runs. Very Good.

TSP