[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: negative predicted values after -xtlogit-

From   "Eva Poen" <>
Subject   Re: st: negative predicted values after -xtlogit-
Date   Tue, 16 Sep 2008 17:58:37 +0100


which other prediction options have you explored? The option xb gives
you the linear prediction, which can of course be negative. It is also
the default for -predict- after -xtlogit, re-.

If you use -predict- with the option pu0, you will get the predicted
probabilities of a positive outcome under the assumption that the
random effect is zero. See -help xtlogit postestimation-. If you still
get negative values, please post the exact commands that you used,
along with some details of your data.

Hope this helps,

2008/9/16 Elizabeth Mumford <>:
> Dear Statalist,
> I am analyzing individuals in peer groups for a dichotomous outcome.  Initially I was repeating an analysis that a colleague had completed in SAS (a generalized linear mixed model - PROC GLMMIX in SAS - with "peer group" included as a random variable), and I confirmed my approach against his work using the following syntax:
> -xtlogit depvar indicator1 indicator2 indicator3, re i(peergroup)-
> However, when I try to generate predicted values from my model, the mean predicted values are *negative*.
> -predict estp if e(sample), xb nooffset-
> The trends are as I would expect (that the predicted value is more negative, or smaller, for my intervention group than for my control group; also confirmed graphically), but despite having explored other prediction options, I haven't been able to produce positive predicted values.  A Statalist archives posting discusses a similar problem of trying to fit a linear model to nonlinear data, but I am not working with a linear outcome or covariate.
> Thank you for your consideration,
> Elizabeth Mumford
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index