[R-sig-ME] summary fn zero-inflated MCMC models.
Hodsoll, John
john.hodsoll at kcl.ac.uk
Tue Apr 1 13:43:15 CEST 2014
Great. Thanks for the work-around!!
Bw
John
-----Original Message-----
From: Jarrod Hadfield [mailto:j.hadfield at ed.ac.uk]
Sent: 31 March 2014 17:39
To: Hodsoll, John
Cc: 'r-sig-mixed-models at r-project.org'
Subject: Re: [R-sig-ME] summary fn zero-inflated MCMC models.
Hi,
That's annoying. The bug happens with print.summary, and will occur for all zero-inflated, hurdle and multinomial models with idh residual structure. I will upload a fix ASAP. For now,
cf.za.1$Residual$nrt<-2
should work when using summary(cf.za.1).
Cheers,
Jarrod
Quoting "Hodsoll, John" <john.hodsoll at kcl.ac.uk> on Mon, 31 Mar 2014
13:04:03 +0000:
> Dear all / Jarrod
>
> Have just updated to the latest version of MCMCglmm but am now unable
> to produce model info using the summary function for zero inflated
> models. It doesn't work on hurdle models fitted on the previous
> version either (but these do on an older version I have on my laptop).
>
> Error is
>
> Error in rep(rep(1:length(object$Residual$nrt), object$Residual$nrt), :
> invalid 'times' argument
>
> Unless something was wrong with my model specification previously and
> something in the update is now showing that?
>
> Best wishses
> John Hodsoll
>
> prior and model definitions..
>
> #### Define prior #####
> zal2.prior <- list(B= list (mu = matrix(c(rep(0,20)),20),V = diag(20)*(20)),
> R = list(V = diag(2), n = 0.002, fix = 2),
> G = list(G1 = list(V = diag(2), n = 0.002)))
>
>
> zal2.prior$B$mu[9] <- 1
> diag(zal2.prior$B$V)[9]<-1e-9
>
> zal2.prior$B$mu[10] <- 1
> diag(zal2.prior$B$V)[10]<-1e-9
>
> #Level 2 models with complementary log log link.
>
> system.time(
> cf.za.1 <- MCMCglmm(totflct ~ trait-1 + trait:(expcon.r*period.x +
> log.beds + nshift + cday),
> data = rswAll.df, family = "zapoisson",
> random = ~us(trait):wardn,
> rcov = ~idh(trait):units,
> prior = zal2.prior,
> # nitt = 300000, burnin = 50000, thin = 250,
> verbose = TRUE, pr = TRUE, pl = FALSE)
> )
>
> summary(cf.za.1)
> save(cf.za.1, file="cf.za.1.rda")
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list