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
- /
- SAS Programming
- /
- ODS and Base Reporting
- /
- tabulate

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

10-05-2006 09:07 AM

Is there a way to compute a mean from a statistic other than the 'Total' N for a particular cross-tab group.

Ex. I'm looking at DRG by year and getting a sum for Total discharges, total days, income, margin, etc.

I'd like to get income and margin by day as well as by discharge. Thanks.

Ex. I'm looking at DRG by year and getting a sum for Total discharges, total days, income, margin, etc.

I'd like to get income and margin by day as well as by discharge. Thanks.

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

Posted in reply to uabcms

10-05-2006 03:11 PM

Could you show us your current TABULATE CLASS, VAR, and TABLE statements to give us a better idea of what you're currently doing?

-- David Kelley, SAS

-- David Kelley, SAS

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

Posted in reply to David_SAS

10-06-2006 04:40 PM

proc tabulate missing data=final;

where fclass in ('BC','Medicare','Medicaid','Comm');

class fyr drgn drgdesc fclass;

var pats margin los nrev netinc tcost;

table drgn='DRG'*drgdesc=' ' all='Total',fclass*fyr*(pats='D/C'*sum=' '*f=5. los='Days'*sum=' '*f=6.

los='Avg LOS'*mean=' '*F=3.1

**margin='Contrib Margin'*(sum=' ' mean=' '**)*f=10. nrev='Net Rev'*sum=' '*f=10.

netinc='Net Inc'*sum=' '*f=10. tcost='Total Cost'*sum=' '*f=10.);

code for Margin - in bold- gives me total margin and margin by discharge(D/C) but I'd also like to get margin by Days.

Thanks.

where fclass in ('BC','Medicare','Medicaid','Comm');

class fyr drgn drgdesc fclass;

var pats margin los nrev netinc tcost;

table drgn='DRG'*drgdesc=' ' all='Total',fclass*fyr*(pats='D/C'*sum=' '*f=5. los='Days'*sum=' '*f=6.

los='Avg LOS'*mean=' '*F=3.1

netinc='Net Inc'*sum=' '*f=10. tcost='Total Cost'*sum=' '*f=10.);

code for Margin - in bold- gives me total margin and margin by discharge(D/C) but I'd also like to get margin by Days.

Thanks.

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

Posted in reply to uabcms

10-09-2006 11:04 AM

If you want margin and income (only) by days (only), you'll need another TABLE statement. If it's meaningful to cross everything in your TABLE statement column dimension with days, you can simply add days to your row dimension, e.g.:

drg*drgdesc days all,

Note that it's inexpensive to code multiple TABLE statements in a single TABULATE step, because TABULATE does the input data processing only once.

-- David Kelley, SAS

drg*drgdesc days all,

Note that it's inexpensive to code multiple TABLE statements in a single TABULATE step, because TABULATE does the input data processing only once.

-- David Kelley, SAS

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

Posted in reply to David_SAS

10-09-2006 12:56 PM

My goal is to get a 'By day' AND a 'By discharge' value in the same table.

So for each row, I want Discharges , days, ALOS, margin, margin per day and margin per discharge.

So for each row, I want Discharges , days, ALOS, margin, margin per day and margin per discharge.