[R-sig-ME] MCMCglmm error

Walid Crampton-Mawass w@||dm@w@@@10 @end|ng |rom gm@||@com
Wed Mar 20 20:01:01 CET 2019


Hello everyone,

I started getting this error when I run an animal model with a maternal
random effect using MCMCglmm. here is my code:

*prior1 <- list(R=list(V=1, nu=0.002), G=list(G1=list(V=1,
nu=0.002),G2=list(V=1, nu=0.002)))*

*model_afr_3_1 <- MCMCglmm(AFR~
1+OffMortality+COEFPAR+I(COEFPAR*COEFPAR)+TWIN+BIRTHYW+mortrate1 , random =
~animal + MOTHERW, rcov = ~units, data = IAC, pedigree = prunedPed, family
= "gaussian" , nitt = 3500000, burnin = 500000, thin = 3000, prior =
prior1, verbose = FALSE, pr=TRUE)*
*Error in t(ZZ[[k]]) : invalid object passed to as_cholmod_sparse*
*Calls: MCMCglmm -> buildZ -> t -> t*

I was able to find out that the variable causing the error is the second
random term "MOTHERW" which represents the id of each individual's mother
as to model maternal variation. However I started getting this error
recently even though it used to work beforehand without any errors. The
variable is set as a multi-level factor just as is done to the "animal"
variable. But there are a few missing values for some individuals (20 out
of 572)

*str(dat$MOTHERW)*
* Factor w/ 297 levels "100007","100032",..: 114 142 207 12 258 168 261 230
179 107 ...*

I tried another variable, FATHERW, which is the id of the father of the
individual. I get the same error again : *Error in t(ZZ[[k]]) : invalid
object passed to as_cholmod_sparse*

However, when using another variable in my data as a random variable
instead, BIRTHYW (birth year of individual; set as a factor), the model
runs without any errors. The only difference is that there are no missing
values in this variable compared MOTHERW  and FATHERW.

is it probably the case that we can't use a variable with a few missing
values as a random variable in MCMCglmm anymore?

Thanks for any help!
-- 
Walid Mawass
Ph.D. candidate in Cellular and Molecular Biology
Population Genetics Laboratory
University of Québec at Trois-Rivières
3351, boul. des Forges, C.P. 500
Trois-Rivières (Québec) G9A 5H7
Telephone: 819-376-5011 poste 3384

	[[alternative HTML version deleted]]



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