Skip to content
Prev 8331 / 20628 Next

HPD intervals for fixed parameters in model

Hi Ben

Thanks very much for the response. I've tried both MCMCglmm and glmmADMB and am happy with the parameter estimates and the HPD intervals they produce. The only issue was specifying the random age slope in glmmADMB (as per M1admb below). It seems to only accept random factors- is it possible to specify a random slope? 

M1admb<-glmmadmb(log(Increment)~log(Age)+temp+(log(Age)|FishID)+(1|fYear),data,family='gaussian')

Warning message:
In Ops.factor(log(Age), FishID) : | not meaningful for factors
Error in model.matrix(as.formula(paste("~", lbit)), mdata) : 
  error in evaluating the argument 'object' in selecting a method for function 'model.matrix': Error in parse(text = x) : <text>:2:0: unexpected end of input
1: ~ 
  ^

Cheers

John


Message: 4
Date: Fri, 1 Jun 2012 16:44:51 +0000 (UTC)
From: Ben Bolker <bbolker at gmail.com>
To: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] HPD intervals for fixed parameters in model
	with	crossed and correlated random effects
Message-ID: <loom.20120601T183904-68 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

 <John.Morrongiello at ...> writes:
I think if you want to compute HPD intervals you are more or less
stuck with MCMCglmm or glmmADMB ....
I don't think so, I think you'll need MCMCglmm or glmmADMB.

In principle glmmADMB should work with your model more or less as-is
(although I don't remember whether it can do REML-y stuff or not),
and you can use mcmc=TRUE to get it to run an MCMC chain on the
parameters for you.  However, based on my limited experience, if
you do want to get MCMC working it will be easier using MCMCglmm
(which is intrinsically based on MCMC, and does a bunch of clever
stuff to make the chains mix well).

  good luck,
    Ben Bolker