Reputation: 151
I'm having some troubling running a mixed model in MCMCglmm. It works fine when I try to run it as a linear regression:
Model.Fit = MCMCglmm(Y~X1, random = ~Cluster, data = DataSet)
But I can't seem to get it to run a logistic or ordinal regression:
Model.Fit = MCMCglmm(Y~X1, random = ~Cluster, family = "ordinal" data = DataSet)
It gives me the following error message:
Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list? In addition: Warning message: Unknown or uninitialised column: 'family'.
Thanks in advance!
Upvotes: 5
Views: 984
Reputation: 226742
From a comment by the OP:
MCMCglmm expects the data frame to have class "data.frame". Mine also had classes "tbl" and "tbl_df". Setting class to only "data.frame" solved the problem.
In other words, MCMCglmm
may not play nicely with tidyverse tibble
s.
Upvotes: 0