Hello, I'm running the H2cal function in the context of phenotype treatment for a GWAS analysis as follows:
cat_h2cal <- H2cal(data = InputDataFrame
, trait = "C_001"
, gen.name = "ID"
, rep.n = 2
, fixed.model = "(1|Habitus) + ID"
, random.model = "(1|Habitus) + (1|ID)"
, emmeans = FALSE
, plot_diag = TRUE
, outliers.rm = TRUE )
The traits of interest are metabolites, varying greatly in concentration. The function works correctly, generates plots and individuates outliers with some traits, but not with others. In particular, I get this kind of errors for the traits the function can't process:
Errore in lme4::lFormula(formula = C_001 ~ (1 | Habitus) + (1 | ID), :
0 (non-NA) cases
In aggiunta: Messaggi di avvertimento:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 26.0806 (tol = 0.002, component 1)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model is nearly unidentifiable: very large eigenvalue
I've noticed that if I change the random.model formula term 1|ID with ID, plots are generated. But I'd like to always apply the same model to all my metabolites. If I look at the concentrations of the traits H2Cal is unable to process, I've noticed that troublesome ones have very low concentrations and often many values (with one single exception, >80%), are 0. However, some metabolites with a pretty high 0 frequency (50-60%) are processed correctly.
Also, some of my samples have one replicate, others two.
Can you help me here? How can I handle my dataset in this case? Maybe with a different formula for the random model?
I've found some tips online, about re-scaling variables (for a similar function, called lme4), but I was wondering what the exact cause of my problems could be.
I'm attaching a part of my dataset
SampleToAttach_H2Cal.txt
Here, the troublesome metabolites are C_001, C_002, C_003, C_004, C_009 and C_013.
Thank you in advance