Elizabeth,
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,
Eva
2008/9/16 Elizabeth Mumford <[email protected]>:
> 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:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/