if (requireNamespace("rstan", quietly = TRUE)) {
# Note we recommend setting n.burn and n.iter to larger values
dat <- mvmr_format(
rsid = dodata$rsid,
xbeta = cbind(dodata$ldlcbeta,dodata$hdlcbeta,dodata$tgbeta),
ybeta = dodata$chdbeta,
xse = cbind(dodata$ldlcse,dodata$hdlcse,dodata$tgse),
yse = dodata$chdse
)
suppressWarnings(mvegger_fit <- mvmr_egger_stan(dat, n.burn = 500, n.iter = 1000, refresh = 0L))
print(mvegger_fit)
}
Run the code above in your browser using DataLab