[R-sig-ME] Fixing non-symetrix sigma matrix
Simon Harmel
@|m@h@rme| @end|ng |rom gm@||@com
Mon Oct 21 20:34:56 CEST 2024
Hello Mixed-Models experts,
I'm trying to fit the following reproducible mediation model called
final. But I get an error saying: ...sigma must be a symmetric
matrix...
Could you please advise how I can possibly fix this error?
Many thanks,
Simon
Reproducible R code:
df <- read.csv("https://raw.githubusercontent.com/fpqq/w/refs/heads/main/t.csv")
library(glmmTMB)
library(mediation)
mediator <- glmmTMB(pic_percent ~ con +
(0+con | ID) +
(0+con | TRIAL_INDEX),
data=df,
family = beta_family(),
ziformula = ~1)
outcome <- glmmTMB(acc ~ con + pic_percent +
(0+con+pic_percent | Q),
data = df,
family = binomial())
final <- mediate(mediator, outcome, sims=50,
treat="con", mediator="pic_percent")
More information about the R-sig-mixed-models
mailing list