[R-sig-ME] Error using MCMCglmm
Jarrod Hadfield
j@h@d||e|d @end|ng |rom ed@@c@uk
Mon Dec 27 19:49:13 CET 2021
Hi,
Is your data frame a tibble? If so, make it a standard data frame and retry.
Cheers,
Jarrod
On 27/12/2021 18:46, Kamal Atmeh wrote:
> This email was sent to you by someone outside the University.
> You should only click on links or attachments if you are certain that
> the email is genuine and the content is safe.
>
> Dear list,
>
> I am trying to run bayesian phylogenetic mixed models using MCMCglmm but
> I keep getting the following error:
>
> " Error in MCMCglmm(ltau ~ x * x2 + lbmM + age + lmean_ndvi + :
> no slot of name "i" for this object of class "ddiMatrix" "
>
> This is not the first time I use MCMCglmm and it usually works
> flawlessly. I thought that there may be a conflict with the "tidyverse"
> package since some functions of "Matrix" are masked, but I tried to run
> the model without loading the "tidyverse" package and still received the
> same error. I was not able to find answers online and am thus turning to
> this list for answers if you can help please.
>
> I am running the following model:
>
> >>> prior1 <-list (G = list(G1 = list(V = 1, nu = 0.02)
> ,G2 = list(V = 1, nu = 0.02)
> ,G3 = list(V = 1, nu = 0.02)
> ,G4 = list(V = 1, nu = 0.02)),
> R = list(V = 1, nu = 0.02)
> )
>
> >>> mod_tau_mc <- MCMCglmm(ltau ~ x * x2+ # x and x2 are categorical
> variables
> lbmM + # continuous variable
> age + # categorical
> lmean_ndvi + # continuous
> lrange_ndvi + # continuous
> lnb.loc + # continuous
> lduration # continuous
> , random =
> ~sp_phylo+species2+phylo_pop+phylo_pop_id
> , ginverse = list(sp_phylo = inv.phylo$Ainv)
> # include a custom matrix for argument sp_phylo
> , family = "gaussian"
> , prior = prior1
> , data = dt
> , nitt = 22e+03 # number of iteration
> after burnin
> , burnin = 2000 # number of iteration
> before beginning sample
> , thin = 100 # nb of iteration between
> sample
> , pr = TRUE) #save random posterior
> distribution
>
> I would greatly appreciate your help and happy to provide further
> information if needed!
>
> Thank you in advance!
>
> Kamal
>
> _______________________________________________
> R-sig-mixed-models using 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. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.
More information about the R-sig-mixed-models
mailing list