Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Estimating glm w/log and gaussian, was RE: transforming predictions from loglinear models


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Estimating glm w/log and gaussian, was RE: transforming predictions from loglinear models
Date   Wed, 31 Aug 2005 22:25:41 +0100

The error message suggests to me that the issue
lies in how this is embedded in the surrounding 
code, not visible here. -glm- can throw you out
for all sorts of reasons, but not I think in 
this style. In any case, the code looks plausible
to me. -link(log) family(gaussian)- is a common 
combination. 

Incidentally, the logit link is the default for 
the binomial family. 

Nick 
n.j.cox@durham.ac.uk 

SamL
 
> I have tried to use the glm w/ log link to estimate a model 
> of earnings.
> I am using stata8.2.  I get an r(198) "invalid 'glm'" error.  My code
> follows:
> 
> > glm adj04p1
> >   bm wm bf wf yrsed age age2,
> >   link(log) family(gaussian)
> >   noconstant cluster(statefip) ;
> invalid 'glm'
> r(198);
> 
> Although I believe binomial is the canonical family for log link, I
> thought one could specify other families, including gaussian, instead.
> (FYI Age was centered and then age-squared was calculated, so those
> variables are not collinear).  But, it does not seem to work. 
>  As far as I
> can tell, my variables are fine, they work in other models without a
> problem (e.g., regress, estimated just before the glm).
> 

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