models <- list(
"Linear" = lm(outcome ~ week * food data = df ),
"Bayesian" = brm(outcome ~ s(week, k = 4, fx = TRUE, by = food) + food, data = df, family = "zero_one_inflated_beta")
)
The following code works when I run it
modelsummary(models,
estimate = "{estimate}[{conf.low}, {conf.high}]",
statistic = NULL)
The problem is that when I attempt to also get the p-value, t-value and standard error of the linear model with the following code, the error comes up as Error: std.error is not available. The estimate and statistic arguments must correspond to column names in the output of this command: get_estimates(model)
modelsummary(models,
estimate = "estimate[{conf.low}, {conf.high}]",
statistic = c("Std.Error" = "std.error",
"t-value" = "statistic",
"p-value" = "p.value"))
How can I enable modelsummary() to ignore the display of statistics when there is none like in the case of the brms
model instead of throwing an error?