Statalist


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

st: RE: GLLAMM error: log-likelihood cannot be computed


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: GLLAMM error: log-likelihood cannot be computed
Date   Mon, 8 Oct 2007 20:05:35 +0100

-gllamm- I leave to experts on it. 

-glm- produces predictions on the scale of the response, 
whatever the link. It can also be quite sensible to use a 
log scale for subsequent graphing. Indeed I've found 
log link and log scale for graphs invaluable in some cases. 
The results are not equivalent to transforming the response 
because the log of the mean is not in general the mean 
of the logs (and similarly for any nonlinear transformation). 

However, you can't show zeros on a log scale. If you 
try this, Stata just gives you a dopey graph. That's 
its way of saying "Isn't that rather a silly thing
to ask for?" 

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

Leny Mathew

>         I'm trying to model the change of hormones over time on a
> group of 80 people. I have measurements at 3 points in time. The
> hormones have high variability at all the time points. Quite a few of
> them have undetectable values (set to 0) at all the time points. At
> time 1, almost 10% are undetectable, and this increases to almost 25%
> at the third time point.
> 
> I used a GLM with gamma family and log link with a robust calculation
> of standard error to model the data. The model is significant for the
> time variable. Due to the high variability in the hormones, when I try
> to plot the fitted line (exponentiated) on to the scatter plot of the
> data, it is hardly visible. Is it correct to plot the
> "un-exponentiated" fitted line on a scatter plot with a log
> transformed Y-axis? Since I have used the GLM and not explicitly
> transformed the dependent variable, I'm not sure whether this is a
> correct way to go about it.
> 
> Secondly, I tried to use create a random effects model as a better
> model for the above data. I used a random intercept and a random slope
> for the time variable.
> 
> gen cons=1
> eq inter: cons
> eq slope: time
> 
> gllamm H_1  time, i(ID) nrf(2) nip(20) eqs(inter slope) family(gamma)
> link(log) adapt
> 
> stata gave me an error that the log-likelihood cannot be computed.
> For this hormone I have another variable in which the undetectable
> values are set to a lower limit of detection. I tried running the
> above GLAMM model with that variable and stata was able to calculate
> the model.      Why would this be the case?

*
*   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