This function first creates a summary table from the output of `lmtp::lmtp_contrast()` using `margot_tab_lmtp`, specifying the desired scale (RD or RR) and a new name for the row. It then calculates E-values for the estimates in the table to assess the potential impact of unmeasured confounding, appending these values to the summary table.
Usage
margot_lmtp_evalue(
lmtp_output,
scale = c("RD", "RR"),
new_name = "character_string",
delta = 1,
sd = 1
)Arguments
- lmtp_output
The output from `lmtp::lmtp_contrast()`, to be summarized and analyzed for E-values.
- scale
Character string specifying the E-value calculation. The legacy `"RD"` option applies the standardised-continuous-outcome approximation to an outcome-mean difference; `"RR"` treats the estimate as a risk ratio. Default is `"RD"`.
- new_name
Character string to name the row in the output summary table, representing the treatment contrast. This name will be applied to the first row of the summary table.
- delta
The exposure contrast represented by the outcome-mean difference, used only when `scale = "RD"`. Default is 1.
- sd
The outcome standard deviation used to standardise the outcome-mean difference, used only when `scale = "RD"`. Default is 1.
Value
A data frame with the original estimates and their E-values. The table includes columns for the estimate (either RD or RR), its E-Value, and the E-Value lower bound, excluding the 'standard_error' column.
See also
margot_tab_lmtp, lmtp_evalue_tab for the underlying functions used.
Examples
if (FALSE) { # \dontrun{
# assuming `contrast_output` is the result from `lmtp::lmtp_contrast()`
summary_evalues <- margot_lmtp_evalue(
lmtp_output = contrast_output,
scale = "RD",
new_name = "Treatment Effect"
)
print(summary_evalues)
} # }