[R-sig-ME] Predicting values from MCMCglmm model with statistical weight in mev argument

Jarrod Hadfield j@h@d||e|d @end|ng |rom ed@@c@uk
Tue Feb 18 12:05:17 CET 2020


Hi Kamal,

Can you post your sessionInfo()?

As a work around, use this model

model <- MCMCglmm(lD ~ tactic*period*seasonality+complique_KF+lbody+lintdur+lnb.loc+lduration
                                     , random = ~sp_phylo+species2+phylo_pop+phylo_popY+phylo_pop_id + idh(SE):units,
                                     , family = "gaussian"
                                     , ginverse = list(sp_phylo = inv.phylo$Ainv) # include a custom matrix for argument phylo
                                     , prior = prior1
                                     , data = Data
                                     , nitt = 22e+04
                                     , burnin = 20000
                                     , thin = 100
                                     , pr=TRUE)

BUT make sure to fix the prior variance associated with the final random effect term (idh(SE):units) to one. Its identical to the model you've fitted, but the predict function should work.

Cheers,

Jarrod

On 15/02/2020 22:57, Kamal Atmeh wrote:
model <- MCMCglmm(lD ~ tactic*period*seasonality+complique_KF+lbody+lintdur+lnb.loc+lduration
                                     , random = ~sp_phylo+species2+phylo_pop+phylo_popY+phylo_pop_id
                                     , family = "gaussian"
                                     , mev = SE^2 # error variance associated to each data point
                                     , ginverse = list(sp_phylo = inv.phylo$Ainv) # include a custom matrix for argument phylo
                                     , prior = prior1
                                     , data = Data
                                     , nitt = 22e+04
                                     , burnin = 20000
                                     , thin = 100
                                     , pr=TRUE)
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list