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, statalist.org is already up and running.


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

st: Diff between predict, xb and predict fixedonly after xtmelogit


From   Guy Grossman <guygrossman1@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Diff between predict, xb and predict fixedonly after xtmelogit
Date   Thu, 3 Jun 2010 13:28:54 -0400

Dear Statslist -

I am using Stata 10.1 on Mac to fit a multilevel model. Data was
collected via original survey. My dependent variable (pmbulk) is
dichotomous, and the observations (individuals) are clustered by
groups (dccode). The key independent variables x3 and x5 are
standardized (mean=0, sd=1), and x7 is their interaction. The model
includes fixed effects for regions (strata)

xtmelogit pmbulk x3 x5 x7 `control1' `control2' `strata' || dccode:, mle
      pmbulk |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x3 |    .215163   .1866488     1.15   0.249    -.1506619     .580988
x5 |   .6609503   .2235678     2.96   0.003     .2227654    1.099135
  x7 |  -.1349155   .1776386    -0.76   0.448    -.4830808    .2132498
      female |   .2019396   .1394233     1.45   0.148    -.0713251    .4752043
       age10 |   .1420844   .0446528     3.18   0.001     .0545666    .2296022
      lyield |   .1952967   .0599925     3.26   0.001     .0777137    .3128798
       tjoin |   .1193645   .0397696     3.00   0.003     .0414175    .1973115
  nmembers50 |   .1002818    .090609     1.11   0.268    -.0773085    .2778721
mean_yie~100 |   .2197333   .1150801     1.91   0.056    -.0058196    .4452861
     strata2 |  -.6230006   .5625882    -1.11   0.268    -1.725653     .479652
     strata3 |  -.4647078   .6584224    -0.71   0.480    -1.755192    .8257764
     strata4 |  -.4446621   .6252368    -0.71   0.477    -1.670104    .7807796
     strata5 |  -1.517357   .4425919    -3.43   0.001    -2.384821   -.6498927
       _cons |  -2.278732   .6169215    -3.69   0.000    -3.487876   -1.069588
------------------------------------------------------------------------------
------------------------------------------------------------------------------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
-----------------------------+------------------------------------------------
dccode: Identity             |
                     sd(_cons) |   .8076734   .1259551      .5949665    1.096425
------------------------------------------------------------------------------
LR test vs. logistic regression: chibar2(01) =    78.85 Prob>=chibar2 = 0.0000

postestimation, I wish to calculate predictive probabilities for
specific values of the independent variables, holding controls at
their means/medians, and ignoring the unobserved (random) effects of
the groups.

My question is:  what exactly is the difference between predict, xb
and predict fixedonly? Which of these commands do I need to use in
order to get predictive probabilities for an "average group"? I run
the postestimation with both commands and I receive very different
predicted probabilities.

according to the help file:
xb - "xb calculates the linear prediction for the fixed portion of the model".
fixedonly - "fixedonly modifies predictions to include only the fixed
portion of the model, equivalent to setting all random effects equal
to zero";

Thanks!
Guy


--

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index