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
- :
- Discussions
- :
- How to calculate regression slopes by subject in table with many subjects each m...

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
(3931 views)

Renal function is measured as Glomerular Filtration rate (GFR) and loss of function in renal disease is estimated as the (negative) slope of GFR by advancing age. In studies of kidney disease, it is often the objective to test for baseline predictors of the slope of GFR by age or time. The attached table shows typical data for 10 subjects with each having GFR measured at two or more ages. Can anyone suggest a method (using JMP10) to calculate the slope for each subject to produce a new table with SubjectID in column one and Slope in column two? Subsequent columns optionally may contain additional information about the fit.

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

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

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