Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Level III

## How to calculate Area Under the Curve for longitudinal data organized in columns (SPLIT)?

Dear JMP community,

I would like to derive the Area Under the Curve for the change in a varible through time. The data is organized in columns (time points) with patients in rows (see below)

 Pat_ID Time 0w Time 2w Time 4w Time 8w AAA 0 -0.3 -1.2 -1.5 BBB 0 0.1 -0.3 0.2 CCC 0 -1.5 -2.3 -2.8 DDD 0 -0.6 -0.4 -0.5

I could not find a preexisting function that would allow to do that so is there an elegant wasy to do this or should I bite the bullet and sum the areas of each parallelograms?

Thierry

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Staff

## Re: How to calculate Area Under the Curve for longitudinal data organized in columns (SPLIT)?

Here's a (now rather old) script, though you will have to organize your data differently. It was intended to be interactive:

but it would be easy to remove this aspect and make it work for multiple Y's.

3 REPLIES 3
Highlighted
Staff

## Re: How to calculate Area Under the Curve for longitudinal data organized in columns (SPLIT)?

Here's a (now rather old) script, though you will have to organize your data differently. It was intended to be interactive:

but it would be easy to remove this aspect and make it work for multiple Y's.

Highlighted
Level I

## Re: How to calculate Area Under the Curve for longitudinal data organized in columns (SPLIT)?

I'd like to run the script across multiple response variables (same time scale) then export the results in to a table. How could i do that wiht the existing script? Thanks!

Highlighted
Super User

## Re: How to calculate Area Under the Curve for longitudinal data organized in columns (SPLIT)?

I assume that you have no interest in the left and right edge lines, but actually want the total area under the curve?

Also, would you want to see all of the curves, or just an output table?

I assume you are not familiar with JSL(JMP Scripting Language).  But are you familiar with any similar languages?

Jim
Article Labels

There are no labels assigned to this post.