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
- /
- Analytics
- /
- Stat Procs
- /
- Two part model for health care costs

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

08-26-2016 12:59 PM

Can anyone provide or direct me to SAS code for two part models in GLM. I am analyzing cost differences between patients who have experienced a poisoning and those who have not. There are lots of zeroes in the data and it is skewed. From what I've read, the first part of the model would be a logistic regression and the second would be a regression with a gamma distribution and log link. I am especially interested in how to combine the results of the two regressions to develop estimates of cost differences between the two groups.

Accepted Solutions

Solution

07-07-2017
08:22 AM

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

08-29-2016 09:49 AM

Try using PROC FMM:

Your SAS code should look something like this:

proc fmm data=rowdata;

model response = age income avgexp / dist=binary;

model response = age income avgexp / dist=gamma;

model response = / dist=constant;

run;

The last MODEL statement specifies a constant distribution with all mass at zero for the zero target group.

To understand PROC FMM and finite mixture models take a look at:

- SGF paper: https://support.sas.com/resources/papers/proceedings12/328-2012.pdf
- PROC FMM documentation: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_fmm_syntax09...

Funda

All Replies

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

08-26-2016 04:24 PM

To get you started see the papers at Lexjansen.com

http://lexjansen.com/search/searchresults.php?q=two%20stage%20model

FYI - This is a good place to start research on any SAS topic

Solution

07-07-2017
08:22 AM

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

08-29-2016 09:49 AM

Try using PROC FMM:

Your SAS code should look something like this:

proc fmm data=rowdata;

model response = age income avgexp / dist=binary;

model response = age income avgexp / dist=gamma;

model response = / dist=constant;

run;

The last MODEL statement specifies a constant distribution with all mass at zero for the zero target group.

To understand PROC FMM and finite mixture models take a look at:

- SGF paper: https://support.sas.com/resources/papers/proceedings12/328-2012.pdf
- PROC FMM documentation: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_fmm_syntax09...

Funda

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

07-06-2017 11:47 AM

nvcarroll54, were you able to find the code for this?

Thanks

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

07-06-2017 11:59 AM

Nothing simple enough for me to understand and use

##- Please type your reply above this line. Simple formatting, no

attachments. -##

##- Please type your reply above this line. Simple formatting, no

attachments. -##

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

07-06-2017 12:05 PM

I know what you mean... i've been trying to figure this out for over a month now.

Turns out, it's way easier to do it in Stata, but my dataset is way to large for Stata to handle, so I've had to resort back to SAS.

If your dataset is not very large, try running this in Stata. You have to install command twopm, and it's literally just few lines of code.

Goodluck,