Statalist


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

st: glm error message after binomial log or identity link models withmissing data


From   Jane Schroeder <[email protected]>
To   [email protected]
Subject   st: glm error message after binomial log or identity link models withmissing data
Date   Mon, 18 Feb 2008 15:45:23 -0500

When I run binomial -glm- models with a log or identity link function I get the following error message whenever there are observations with missing data for a model covariate, even though all predicted risks are well within the permissible (0,1) range:

Warning: parameter estimates produce inadmissible mean estimates in one or more observations.

For example, when I fit a linear risk model to the following (no missing data), I don't get the error message:

20-36 vs. | child's gender
37+ weeks | female male | Total
-----------+----------------------+----------
term | 29,059 30,116 | 59,175
preterm | 3,591 4,218 | 7,809
-----------+----------------------+----------
Total | 32,650 34,334 | 66,984

. glm preterm sex, fam(bin) link(ident)

------------------------------------------------------------------------------
| OIM
preterm | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
sex | .0128673 .0024772 5.19 0.000 .008012 .0177226
_cons | .1099847 .0017315 63.52 0.000 .106591 .1133784
------------------------------------------------------------------------------
Coefficients are the risk differences

However, if I recode one observation to missing for 'sex' and rerun the model I get the error message, e.g.:

replace sex=. in 1
(1 real change made, 1 to missing)

. glm preterm sex, fam(bin) link(ident)

------------------------------------------------------------------------------
| OIM
preterm | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
sex | .0128709 .0024773 5.20 0.000 .0080155 .0177262
_cons | .1099847 .0017315 63.52 0.000 .106591 .1133784
------------------------------------------------------------------------------
Coefficients are the risk differences
Warning: parameter estimates produce inadmissible mean estimates in one or more observations.

Note that the predicted risk for a female (.1099847) is unchanged from the previous model, and the predicted risk for a male (with one preterm observation missing) is essentially unchanged (.1228556 vs. .122852).

It's not that much trouble to generate and review the predicted risks after every model, but I hate to get into the habit of ignoring error messages. Any suggestions? Thanks-

Jane Schroeder


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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