Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Need help to comeup with predicted mean after xtgee


From   [email protected]
To   [email protected]
Subject   st: Need help to comeup with predicted mean after xtgee
Date   20 Jun 2010 20:12:19 -0500

I am running an xtgee regression on a large time series data. The dependent variable is a log transformed person-month medical costs. The model is:

. xi: xtgee ln_medicaidMC i.state i.servgroup2 f_diabetes f_hypertension f_heart f_arthritis f_depression f_pulmonary f_stroke f_cancer
f_ischemic elderly i.p_sex white urban  dual, family(gamma) link(log)

i.state           _Istate_1-7         (_Istate_1 for state==AR omitted)
i.servgroup2 _Iservgroup_0-4 (naturally coded; _Iservgroup_0 omitted)
i.p_sex           _Ip_sex_1-2         (_Ip_sex_1 for p_sex==F omitted)


GEE population-averaged model Number of obs = 5951527
Group variable: umn_id Number of groups = 663538
Link: log Obs per group: min = 1
Family: gamma avg = 9.0
Correlation: exchangeable max = 12
                                               Wald chi2(24) = 496409.69
Scale parameter: 2.839478 Prob > chi2 = 0.0000

------------------------------------------------------------------------------
ln_medicai~C | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
  _Istate_2 | -.582194 .0071732 -81.16 0.000 -.5962532 -.5681349
  _Istate_3 | -.5695606 .008168 -69.73 0.000 -.5855696 -.5535517
  _Istate_4 | .1013641 .0113639 8.92 0.000 .0790913 .123637
  _Istate_5 | -1.601673 .0070455 -227.33 0.000 -1.615482 -1.587864
  _Istate_6 | -.2598664 .0149638 -17.37 0.000 -.2891949 -.2305379
  _Istate_7 | -.7590618 .0080894 -93.83 0.000 -.7749168 -.7432067
_Iservgrou~1 | .4137718 .0055391 74.70 0.000 .4029153 .4246282
_Iservgrou~2 | .7908761 .003575 221.22 0.000 .7838691 .797883
_Iservgrou~3 | -.5611078 .0024984 -224.59 0.000 -.5660046 -.556211
_Iservgrou~4 | -.0790117 .0050621 -15.61 0.000 -.0889332 -.0690902
 f_diabetes | -.0234561 .0033514 -7.00 0.000 -.0300248 -.0168874
f_hyperten~n | -.134499 .0037035 -36.32 0.000 -.1417577 -.1272402
    f_heart | .1819628 .0037701 48.27 0.000 .1745736 .189352
f_arthritis | -.1254897 .0034119 -36.78 0.000 -.132177 -.1188025
f_depression | .1133429 .0034978 32.40 0.000 .1064874 .1201984
f_pulmonary | .0464541 .0038468 12.08 0.000 .0389146 .0539936
   f_stroke | .1606859 .0045575 35.26 0.000 .1517533 .1696184
   f_cancer | .1483028 .0062354 23.78 0.000 .1360816 .1605239
 f_ischemic | -.0228717 .0037786 -6.05 0.000 -.0302775 -.0154658
    elderly | -.3662116 .0037613 -97.36 0.000 -.3735837 -.3588395
  _Ip_sex_2 | .0005814 .0032057 0.18 0.856 -.0057016 .0068645
      white | .0988918 .0032075 30.83 0.000 .0926052 .1051783
      urban | .0505858 .0033302 15.19 0.000 .0440586 .0571129
       dual | -1.117877 .0044487 -251.28 0.000 -1.126596 -1.109158
      _cons | 2.664633 .0082239 324.01 0.000 2.648515 2.680752
------------------------------------------------------------------------------


. predict mean_sample if e(sample)
(option mu assumed; exp(xb))
(955054 missing values generated)

. gen expmean_sample=exp( mean_sample)
(955054 missing values generated)

. sum  pmt_mc mean_sample expmean_sample

   Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     pmt_mc |   5951527    529.6605    2398.668          0     529427
mean_sample |   5951527    3.017418    3.366835   .2756696   48.65073
expmean_sa~e |   5951527    2.35e+14    5.51e+17   1.317412   1.35e+21


The pmt_mc is the raw person-month medical cost without transformation. The mean_sample is the predicted mean (see command above) and the expmean_sa~e is the exp( mean_sample). Since the predicted mean (mean_sample) is exp(xb), I suppose it is in dollar amount, not the log transformed dollar amount. But, mean of the mean_sample is too slow compare with the pmt_mc (raw medical costs), 3.017 vs 529.66. But the the expmean_sa~e is loo large compared with the raw medicaid coss.

Any suggestion on correct way to comeup with postestimation predicted mean after xtgee? I also appreciate any help to understand any error in my analytical approach and the interpretation of results.

Thanks a lot.
Terry


--
Terry Lum, Ph.D.
Associate Professor
School of Social Work
University of Minnesota
612.624.4722

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index