View source: R/adjust_coef_with_r2.R
adjust_coef_with_r2 | R Documentation |
This function wraps the sensemakr::adjusted_estimate()
and
sensemakr::adjusted_se()
functions.
adjust_coef_with_r2(
effect_observed,
se,
df,
confounder_exposure_r2,
confounder_outcome_r2,
verbose = getOption("tipr.verbose", TRUE),
alpha = 0.05,
...
)
effect_observed |
Numeric. Observed exposure - outcome effect from a regression model. This is the point estimate (beta coefficient) |
se |
Numeric. Standard error of the |
df |
Numeric positive value. Residual degrees of freedom for the model used to estimate the observed exposure - outcome effect. This is the total number of observations minus the number of parameters estimated in your model. Often for models estimated with an intercept this is N - k - 1 where k is the number of predictors in the model. |
confounder_exposure_r2 |
Numeric value between 0 and 1. The assumed partial R2 of the unobserved confounder with the exposure given the measured covariates. |
confounder_outcome_r2 |
Numeric value between 0 and 1. The assumed partial R2 of the unobserved confounder with the outcome given the exposure and the measured covariates. |
verbose |
Logical. Indicates whether to print informative message.
Default: |
alpha |
Significance level. Default = |
... |
Optional arguments passed to the |
A data frame.
Carlos Cinelli, Jeremy Ferwerda and Chad Hazlett (2021). sensemakr: Sensitivity Analysis Tools for Regression Models. R package version 0.1.4. https://CRAN.R-project.org/package=sensemakr
adjust_coef_with_r2(0.5, 0.1, 102, 0.05, 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.