Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Prediction after xtgee

Subject   st: Prediction after xtgee
Date   19 Jul 2010 01:54:58 -0500

I ran a xtgee regression, with a list of chronic illnesses as right hand side variables, together which a few demographic and health insurance variables. The dependent variable is health care cost. I want to see how each chronic illness affect the costs, after controlling for demographic and insurance variables.

I generated the predicted value of the cost variable and summarize the predict costs by chronic illness. It seems that this may not be the correct way to do so. It seems that they may not be the right way to do so. I should set all chronic illness variable to zero except the targeted one. I tried to use the following comment

predict newvar if chronic1==1 & chronic2==0 $ chronic3==0...... &e(sample)

But it seems that by using this comment, STATA only predicted the costs for those observation with chronic==1.

Please suggest the corrected way to generate predicted cost for each chronic illness.

Thanks a lot.

Terry Lum
University of Minnesota

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index