turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- BI
- /
- Enterprise Guide
- /
- Repeated Measures -- trapezoid rule

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
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-27-2009 04:07 PM

Hi,

I'm stumped. I am looking for a point-and-click (EGuide) way to compute the area under a curve, where each point on the curve is on a separate record. Each record has ID, Time, Assay and I want to use the trapezoid rule to compute the area under the curve that you draw if you connect the time-assay dots within each ID [ 1/2(Assay(Time k)-Assay(Time k-1))*( (time k) - (time k-1) ) ]. This is relatively straightforward to do in a DATA step with the data sorted on ID and Time (using the LAG and RETAIN functionality of the DATA step). Anyone know how I can do it using the tasks available in EGuide?

[I have a researcher who wanted to summarize her data this way; she only knows the point-n-click interface of EGuide. I'd rather show how to do this building on the tools she already knows than having the pain of learning to code.]

Thanks,

Doc Muhlbaier

Duke

I'm stumped. I am looking for a point-and-click (EGuide) way to compute the area under a curve, where each point on the curve is on a separate record. Each record has ID, Time, Assay and I want to use the trapezoid rule to compute the area under the curve that you draw if you connect the time-assay dots within each ID [ 1/2(Assay(Time k)-Assay(Time k-1))*( (time k) - (time k-1) ) ]. This is relatively straightforward to do in a DATA step with the data sorted on ID and Time (using the LAG and RETAIN functionality of the DATA step). Anyone know how I can do it using the tasks available in EGuide?

[I have a researcher who wanted to summarize her data this way; she only knows the point-n-click interface of EGuide. I'd rather show how to do this building on the tools she already knows than having the pain of learning to code.]

Thanks,

Doc Muhlbaier

Duke

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-03-2009 09:51 AM

Hi Doc,

I can't think of an easy way to do this in EG. You could do two separate transposes to get your time varaibles in a row and your assay variables in a row then join them... but then you'd have to compute each area difference with a separate variable, yuck.

I was trying some stuff with a self-join of the initial table to itself, but the best I could do was all possible rows in which time_j > time_k. You'd really rather time_j = time_j+1.

So... my best suggestion now would be to write some code for her, add some appropriate parameters, and show her how to run the project to get what she needs. The reason it's so hard to take the point and click approach is that EG Filter and Query is PROC SQL behind the scenes, and PROC SQL is not designed to give you the row-level control you're describing here.

Sorry I don't have a better answer!

I can't think of an easy way to do this in EG. You could do two separate transposes to get your time varaibles in a row and your assay variables in a row then join them... but then you'd have to compute each area difference with a separate variable, yuck.

I was trying some stuff with a self-join of the initial table to itself, but the best I could do was all possible rows in which time_j > time_k. You'd really rather time_j = time_j+1.

So... my best suggestion now would be to write some code for her, add some appropriate parameters, and show her how to run the project to get what she needs. The reason it's so hard to take the point and click approach is that EG Filter and Query is PROC SQL behind the scenes, and PROC SQL is not designed to give you the row-level control you're describing here.

Sorry I don't have a better answer!