| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: predict after glm
What version of Stata are you using? I cannot reproduce your problem (Im using Stata 9.1,
Born 20 Jan 2006)
Ronnie
Thomas Gschwend wrote:
I tried to replicate the glm postestimation example using the
beetle.dta closely following the code presented in the Stata9
Reference manual A-J on page 424. I have two puzzeling observations.
1) the glm model (without the -quitely- option) prompts a warning
message: "convergence not achieved" which does not occur when in
addition -, irls- is specified.
2)-predict- and -mfx- yield the following error message: "Unknown function /()"
Anybody any ideas?
Thomas
...and the log is:
. use http://www.stata-press.com/data/r9/beetle
. glm r ldose, f(binomial n) l(logit)
initial: log likelihood = -250.49593
rescale: log likelihood = -250.49593
Iteration 0: log likelihood = -250.49593
Iteration 1: log likelihood = -221.91214
Iteration 2: log likelihood = -221.87694
Iteration 3: log likelihood = -221.87694
Generalized linear models No. of obs = 24
Optimization : ML Residual df = 22
Scale parameter = 1
Deviance = 363.6276384 (1/df) Deviance = 16.52853
Pearson = 372.2527216 (1/df) Pearson = 16.92058
Variance function: V(u) = u*(1-u/n) [Binomial]
Link function : g(u) = ln(u/(n-u)) [Logit]
AIC = 18.65641
Log likelihood = -221.8769365 BIC = 203.7421
------------------------------------------------------------------------------
| OIM
r | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ldose | 22.0699 1.203182 18.34 0.000 19.71171 24.42809
_cons | -39.7564 2.167708 -18.34 0.000 -44.00503 -35.50777
------------------------------------------------------------------------------
Warning: convergence not achieved
. predict mu_logit
Unknown function /()
r(133);
end of do-file
r(133);
*
* 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/
*
* 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/