Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
uzma03505621
Obsidian | Level 7

Hello everyone, 

 I am a new SAS user and I am using Medical Expenditure Panel Survey( MEPS) for my research. I have to use a Two-part model to study the impact of various independent variables on my dependent variable ( COST). Can someone please help me with the SAS SYNTAX for the two-part model.

8 REPLIES 8
mkeintz
PROC Star

I am unfamiliar with the term "two-part model".  Can you describe?

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
uzma03505621
Obsidian | Level 7
It's a statistical method used when the expenditure data is not normal I.e. it can be rightly skewed or with excess zero expenditures. So the first part involves a binary logit model to differentiate positive and zero expenditures and the second part of the model involves a glm model with gamma distribution and link function.
I'm attaching the link to the article I used as my reference :
https://scholarworks.gvsu.edu/fsdg/556/
StatDave
SAS Super FREQ

These are zero-inflation models which are in the class of finite mixture models as can be fit using PROC FMM. While there is some question of the appropriateness of doing this with a continuous distribution like gamma, the following code is an example with single predictor, G, and will provide a model fit and predicted values.

proc fmm data=a plots=density(nbins=9);
   class g;
   model y = g / dist=gamma;
   model   +  / dist=constant;
   probmodel g;
   output out=fmmpred pred;
   run;
uzma03505621
Obsidian | Level 7
Can you share any source for me to interpret the output of this code?
Rick_SAS
SAS Super FREQ

The Getting Started examples in the documentation often explain how to interpret the results.

Season
Barite | Level 11

I am also interested in building this kind of model. Could you please explain why there it might be inappropriate to build such models for continuous distributions in more detail? Thank you!

StatDave
SAS Super FREQ
...but perhaps a better, and more easily interpreted, model is the Tweedie model that can be fit in PROC GENMOD with the DIST=TWEEDIE option. The Tweedie distribution can model a nonnegative response with a mass at zero, so it is often used to model cost when there can be a set of zero values. The output is much like an ordinary gamma model since it isn't a "two part" model.
Ksharp
Super User

As @StatDave said it is a zero-inflation model generally suited to COUNT data ,not a continous data.

Check this brand-new session:

https://communities.sas.com/t5/SAS-Communities-Library/Making-Zero-Inflation-Count/ta-p/962019/jump-...

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 3314 views
  • 11 likes
  • 6 in conversation