Addendum: I tried a gamma fit in glmmPQL and got the same errors.
*Ben Caldwell*
PhD Candidate
University of California, Berkeley
On Tue, May 17, 2011 at 3:51 PM, Benjamin Caldwell
<btcaldwell@berkeley.edu>wrote:
> Hello
> After seeing this (
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2011q1/005213.html) email
> I thought I would check the issue with a gamma family in lme4 hadn't
been
> fixed; can I fit a hierarchical gamma model in lme4 at this time? There
> doesn't seem to be another package capable of it at this time.
>
> My thought process:
> 1. took a look at the response variable and some subsets to see what it
> looked like, ("bppfcl" and "transformed response var"),
attached
> 2. took a look at a gamma and gaussian fit to the response variable.
> 3. ran hierarchical gaussian model in nlme to look at residuals
> (more familiar with graphs from that package) ("qqnorm" and
"residuals")
>
> Given the residual output for the gaussian model it looks like I could
> remove the values at the end of the distribution and get a decent fit.
I'd
> still like to try a gamma model though, if that's possible. Is it
possible
> in lme4 or another package I don't know about?
>
> ---This is the code I'm running---
>
> rws30.BL$site <- factor(rws30.BL$site)
> rws30.BL$transect <- interaction(rws30.BL$site, rws30.BL$transect, drop
> TRUE)
> rws30.BL$plot <- interaction(rws30.BL$site, rws30.BL$transect,
> rws30.BL$plot, drop = TRUE)
> hist(rws30.BL$post.f.crwn.length)
> rws30.BL$gpost.f.crwn.length
>
> library("nlme")
> burnedmodel1.3<-lme(post.f.crwn.length~lg.shigo.av+dbh+leaf.area+
> bark.thick.bh+ht.any+ht.alive,
> random=(~1|site/transect/plot),na.action=na.omit, data=rws30.BL)
> Error: no valid set of coefficients has been found: please supply starting
> values
> In addition: Warning message:
> In log(ifelse(y == 0, 1, y/mu)) : NaNs produced
>
> --- I thought the problem might be a convergence error, and so tried a
> reduced model ----
> glmer(gpost.f.crwn.length~dbh+leaf.area+(1|site/transect/plot),
> family=Gamma, na.action=na.omit, data=rws30.BL)
> Error in mer_finalize(ans) :
> mu[i] must be positive: mu = -0.00780625, i = 3
>
> Any clarity I could get would be much appreciated.
>
> Best
>
> *Ben Caldwell*
>
> PhD Candidate
> University of California, Berkeley
>
>
>
[[alternative HTML version deleted]]