R 패키지 메타데이터와 수집 신호를 모아 봅니다.
첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.
DESCRIPTION에서 감지한 backend 관련 package입니다.
기본 메타데이터를 작은 카드와 토큰으로 압축합니다.
| Package | Type | Spec |
|---|---|---|
| assertthat CRAN · 1.0.2 · 2026-05-30 | Imports | assertthat |
| Deriv CRAN · 1.0.2 · 2026-05-30 | Imports | Deriv |
| MASS CRAN · 1.0.2 · 2026-05-30 | Imports | MASS |
| Matrix CRAN · 1.0.2 · 2026-05-30 | Imports | Matrix |
| sandwich CRAN · 1.0.2 · 2026-05-30 | Imports | sandwich |
| survival CRAN · 1.0.2 · 2026-05-30 | Imports | survival |
| boot CRAN · 1.0.2 · 2026-05-30 | Suggests | boot |
| formattable CRAN · 1.0.2 · 2026-05-30 | Suggests | formattable |
| furrr CRAN · 1.0.2 · 2026-05-30 | Suggests | furrr |
| future CRAN · 1.0.2 · 2026-05-30 | Suggests | future |
| geepack CRAN · 1.0.2 · 2026-05-30 | Suggests | geepack |
| kableExtra CRAN · 1.0.2 · 2026-05-30 | Suggests | kableExtra |
| knitr CRAN · 1.0.2 · 2026-05-30 | Suggests | knitr |
| magic CRAN · 1.0.2 · 2026-05-30 | Suggests | magic |
| mice CRAN · 1.0.2 · 2026-05-30 | Suggests | mice |
| mitools CRAN · 1.0.2 · 2026-05-30 | Suggests | mitools |
| modelr CRAN · 1.0.2 · 2026-05-30 | Suggests | modelr |
| purrr CRAN · 1.0.2 · 2026-05-30 | Suggests | purrr |
| rlang CRAN · 1.0.2 · 2026-05-30 | Suggests | rlang |
| rmarkdown CRAN · 1.0.2 · 2026-05-30 | Suggests | rmarkdown |
| stringr CRAN · 1.0.2 · 2026-05-30 | Suggests | stringr |
| testthat CRAN · 1.0.2 · 2026-05-30 | Suggests | testthat |
| tidyverse CRAN · 1.0.2 · 2026-05-30 | Suggests | tidyverse |
| 검색 결과가 없습니다. | ||
| Package | Type | Spec |
|---|---|---|
| 표시할 dependency edge가 없습니다. | ||
| 검색 결과가 없습니다. | ||
NEWS code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} regmedint 1.0.1 MINOR UPDATE to transition maintainer to Yi Li ( @einsley1993 ). regmedint 1.0.0 MAJOR UPDATE to add effect modification product terms regmedint() now allows the inclusion of the product terms between covariates and the treatment or the mediator terms to include effect modification by covariates in the underlying regression models. Contribution by @einsley1993 doi:10.1097/EDE.0000000000001643 regmedint 0.2.1 BUGFIX for knitr update Add rmarkdown to Suggests to support new knitr regmedint 0.2.0 Improve missingness messaging/handling. The message points to the multiple imputation vignette. regmedint() now has na_omit option for complete case analysis ( @einsley1993 ). regmedint 0.1.0 This is the first CRAN release version. regmedint 0.1.0rc This is the first CRAN release candidate version. All models in Valeri and VanderWeele’s %mediation() SAS macro are supported. regmedint 0.0.0.9000 This is the pre-release developmental version.Help for package regmedint const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"}; function processMathHTML() { var l = document.getElementsByClassName('reqn'); for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); } return; } Package {regmedint} Contents regmedint-package beta_hat calc_myreg calc_myreg_mreg_linear_yreg_linear calc_myreg_mreg_linear_yreg_logistic calc_myreg_mreg_logistic_yreg_linear calc_myreg_mreg_logistic_yreg_logistic coef.regmedint coef.summary_regmedint confint.regmedint fit_mreg fit_yreg grad_prop_med_yreg_linear grad_prop_med_yreg_logistic new_regmedint print.regmedint print.summary_regmedint prop_med_yreg_linear prop_med_yreg_logistic regmedint report_missing summary.regmedint summary.regmedint_mod_poisson theta_hat validate_args validate_regmedint vcov.regmedint vcov.regmedint_mod_poisson vv2015 Title: Regression-Based Causal Mediation Analysis with Interaction and Effect Modification Terms Version: 1.0.2 Description: This is an extension of the regression-based causal mediation analysis first proposed by Valeri and VanderWeele (2013) < doi:10.1037/a0031034 > and Valeri and VanderWeele (2015) < doi:10.1097/EDE.0000000000000253 >). It supports including effect measure modification by covariates(treatment-covariate and mediator-covariate product terms in mediator and outcome regression models) as proposed by Li et al (2023) < doi:10.1097/EDE.0000000000001643 >. It also accommodates the original 'SAS' macro and 'PROC CAUSALMED' procedure in 'SAS' when there is no effect measure modification. Linear and logistic models are supported for the mediator model. Linear, logistic, loglinear, Poisson, negative binomial, Cox, and accelerated failure time (exponential and Weibull) models are supported for the outcome model. License: GPL-2 Encoding: UTF-8 LazyData: true Imports: Deriv, MASS, Matrix, assertthat, sandwich, survival Suggests: boot, furrr, future, geepack, knitr, mice, mitools, modelr, purrr, rlang, rmarkdown, stringr, testthat, tidyverse, magic, formattable, kableExtra RoxygenNote: 7.3.3 VignetteBuilder: knitr URL: https://kaz-yos.github.io/regmedint/ BugReports: https://github.com/kaz-yos/regmedint/issues Depends: R (≥ 2.10) NeedsCompilation: no Packaged: 2026-03-06 05:49:11 UTC; yili Author: Kazuki Yoshida [ctb, aut], Yi Li [cre, aut], Maya Mathur [ctb] Maintainer: Yi Li <yi.li10@mail.mcgill.ca> Repository: CRAN Date/Publication: 2026-03-06 08:00:02 UTC regmedint: A package for regression-based causal mediation analysis Description The package is an R implementation of regression-based closed-form causal mediation as originally described in Valeri & VanderWeele 2013 and Valeri & VanderWeele 2015 https://hsph.harvard.edu/research/vanderweele-group/tools-and-tutorials/ . The earlier version is a sister program of the SAS macro. The current extended version (version 1.0 and later) supports effect modification by covariates (treatment-covariate and mediator-covariate product terms) in mediator and outcome models. Fitting models Use the regmedint function to fit models and set up regression-based causal mediation analysis. Examining results Several methods are available to examine the regmedint object. print summary coef confint Author(s) Maintainer : Yi Li yi.li10@mail.mcgill.ca ( ORCID ) Authors: Kazuki Yoshida kazukiyoshida@mail.harvard.edu ( ORCID ) [contributor] Other contributors: Maya Mathur ( ORCID ) [contributor] See Also Useful links: https://kaz-yos.github.io/regmedint/ Report bugs at https://github.com/kaz-yos/regmedint/issues Create a vector of coefficients from the mediator model (mreg) Description This function extracts coef from mreg_fit and pads with zeros appropriately to create a named vector consistently having the following elements: (Intercept) , avar , cvar (this part is eliminated when cvar = NULL ), emm_ac_mreg (this part is eliminated when emm_ac_mreg = NULL ). Usage beta_hat(mreg, mreg_fit, avar, cvar, emm_ac_mreg = NULL) Arguments mreg A character vector of length 1. Mediator regression type: "linear" or "logistic" . mreg_fit Model fit object for mreg (mediator model). avar A character vector of length 1. Treatment variable name. cvar A character vector of length > 0. Covariate names. Use NULL if there is no covariate. However, this is a highly suspicious situation. Even if avar is randomized, mvar is not. Thus, there are usually some confounder(s) to account for the common cause structure (confounding) between mvar and yvar . emm_ac_mreg A character vector of length > 0. Effect modifiers names. The covariate vector in treatment-covariate product term in the mediator model. Value A named numeric vector of coefficients. Return mediation analysis functions given mediator and outcome models specifications. Description This function returns functions that can be used to calculate the causal effect measures, given the mediator model fit ( mreg_fit ) and the outcome model fit ( yreg_fit ). Usage calc_myreg( mreg, mreg_fit, yreg, yreg_fit, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, interaction ) Arguments mreg A character vector of length 1. Mediator regression type: "linear" or "logistic" . mreg_fit Model fit from fit_mreg yreg A character vector of length 1. Outcome regression type: "linear" , "logistic" , "loglinear" , "poisson" , "negbin" , "survCox" , "survAFT_exp" , or "survAFT_weibull" . yreg_fit Model fit from fit_yreg avar A character vector of length 1. Treatment variable name. mvar A character vector of length 1. Mediator variable name. cvar A character vector of length > 0. Covariate names. Use NULL if there is no covariate. However, this is a highly suspicious situation. Even if avar is randomized, mvar is not. Thus, there are usually some confounder(s) to account for the common cause structure (confounding) between mvar and yvar . emm_ac_mreg A character vector of length > 0. Effect modifiers names. The covariate vector in treatment-covariate product term in the mediator model. emm_ac_yreg A character vector of length > 0. Effect modifiers names. The covariate vector in treatment-covariate product term in the outcome model. emm_mc_yreg A character vector of length > 0. Effect modifiers names. The covariate vector in mediator-covariate product term in outcome model. interaction A logical vector of length 1. The presence of treatment-mediator interaction in the outcome model. Default to TRUE. Value A list containing two functions. The first is for calculating point estimates. The second is for calculating the correspoding Create calculators for effects and se (mreg linear / yreg linear) Description Construct functions for the conditional effect estimates and their standard errors in the mreg linear / yreg linear setting. Internally, this function deconstructs model objects and feeds parameter estiamtes to the internal worker functions calc_myreg_mreg_linear_yreg_linear_est and calc_myreg_mreg_linear_yreg_linear_se . Usage calc_myreg_mreg_linear_yreg_linear( mreg, mreg_fit, yreg, yreg_fit, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, interaction ) Arguments mreg A character vector of length 1. Mediator regression type: "linear" or "logistic" . mreg_fit Model fit from fit_mreg yreg A character vector of length 1. Outcome regression type: "linear" , "logistic" , "loglinear" , "poisson" , "negbin" , "survCox" , "survAFT_exp" , or "survAFT_weibull" . yreg_fit Model fit from fit_yreg avar A character vector of length 1. Treatment variable name. mvar A character vector of length 1. Mediator variable name. cvar A character vector of length > 0. Covariate names. Use NULL if there is no covariate. However, this is a highly suspicious situation. Even if avar is randomized, mvar is not. Thus, there are usually some confounder(s) to account for the common cause structure (confounding) between mvar and yvar . emm_ac_mreg A character vector of length > 0. Effect modifiers names. The covariate vector in treatment-covariate prodThis function extracts coef from mreg_fit and pads with zeros appropriately to create a named vector consistently having the following elements: (Intercept), avar, cvar (this part is eliminated when cvar = NULL), emm_ac_mreg (this part is eliminated when emm_ac_mreg = NULL).
beta_hat(mreg, mreg_fit, avar, cvar, emm_ac_mreg = NULL)This function returns functions that can be used to calculate the causal effect measures, given the mediator model fit (mreg_fit) and the outcome model fit (yreg_fit).
calc_myreg( mreg, mreg_fit, yreg, yreg_fit, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, interaction )Construct functions for the conditional effect estimates and their standard errors in the mreg linear / yreg linear setting. Internally, this function deconstructs model objects and feeds parameter estiamtes to the internal worker functions calc_myreg_mreg_linear_yreg_linear_est and calc_myreg_mreg_linear_yreg_linear_se.
calc_myreg_mreg_linear_yreg_linear( mreg, mreg_fit, yreg, yreg_fit, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, interaction )Construct functions for the conditional effect estimates and their standard errors in the mreg linear / yreg logistic setting. Internally, this function deconstructs model objects and feeds parameter estimates to the internal worker functions calc_myreg_mreg_linear_yreg_logistic_est and calc_myreg_mreg_linear_yreg_logistic_se.
calc_myreg_mreg_linear_yreg_logistic( mreg, mreg_fit, yreg, yreg_fit, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, interaction )Construct functions for the conditional effect estimates and their standard errors in the mreg logistic / yreg linear setting. Internally, this function deconstructs model objects and feeds parameter estimates to the internal worker functions calc_myreg_mreg_logistic_yreg_linear_est and calc_myreg_mreg_logistic_yreg_linear_se.
calc_myreg_mreg_logistic_yreg_linear( mreg, mreg_fit, yreg, yreg_fit, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, interaction )Construct functions for the conditional effect estimates and their standard errors in the mreg logistic / yreg logistic setting. Internally, this function deconstructs model objects and feeds parameter estimates to the internal worker functions calc_myreg_mreg_logistic_yreg_logistic_est and calc_myreg_mreg_logistic_yreg_logistic_se.
calc_myreg_mreg_logistic_yreg_logistic( mreg, mreg_fit, yreg, yreg_fit, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, interaction )Extract point estimates evaluated at a0, a1, m_cde, and c_cond.
coefregmedint(object, a0 = NULL, a1 = NULL, m_cde = NULL, c_cond = NULL, ...)library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) coef(regmedint_obj) ## Evaluate at different values coef(regmedint_obj, m_cde = 0, c_cond = 1)Extract the result matrix from a summary_regmedint object.
coefsummary_regmedint(object, ...)library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) coef(summary(regmedint_obj))Construct Wald approximate confidence intervals for the quantities of interest.
confintregmedint( object, parm = NULL, level = 0.95, a0 = NULL, a1 = NULL, m_cde = NULL, c_cond = NULL, ... )library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) confint(regmedint_obj) ## Evaluate at different values confint(regmedint_obj, m_cde = 0, c_cond = 1) ## Change confidence level confint(regmedint_obj, m_cde = 0, c_cond = 1, level = 0.99)lm is called if mreg = "linear". glm is called with family = binomial() if mreg = "logistic".
fit_mreg(mreg, data, avar, mvar, cvar, emm_ac_mreg = NULL)The outcome model type yreg can be one of the following "linear", "logistic", "loglinear" (implemented as modified Poisson), "poisson", "negbin", "survCox", "survAFT_exp", or "survAFT_weibull".
fit_yreg( yreg, data, yvar, avar, mvar, cvar, emm_ac_yreg = NULL, emm_mc_yreg = NULL, eventvar, interaction )Calculate the gradient of the proportion mediated for yreg linear case.
grad_prop_med_yreg_linear(pnde, tnie)Calculate the gradient of the proportion mediated for yreg logistic case.
grad_prop_med_yreg_logistic(pnde, tnie)This is not a user function and meant to be executed within the regmedint function after validatingthe arguments.
new_regmedint( data, yvar, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, eventvar, a0, a1, m_cde, c_cond, yreg, mreg, interaction, casecontrol )Print the mreg_fit, yreg_fit, and the mediation analysis effect estimates.
printregmedint( x, a0 = NULL, a1 = NULL, m_cde = NULL, c_cond = NULL, args_mreg_fit = list(), args_yreg_fit = list(), ... )library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) ## Implicit printing regmedint_obj ## Explicit printing print(regmedint_obj) ## Evaluate at different values print(regmedint_obj, m_cde = 0, c_cond = 1)Print results contained in a summary_regmedint object with additional explanation regarding the evaluation settings.
printsummary_regmedint(x, ...)library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) ## Implicit printing summary(regmedint_obj) ## Explicit printing print(summary(regmedint_obj))Calculate the proportion mediated on the mean difference scale.
prop_med_yreg_linear(pnde, tnie)Calculate the approximate proportion mediated on the risk difference scale.
prop_med_yreg_logistic(pnde, tnie)This is a user-interface for regression-based causal mediation analysis as described in Valeri & VanderWeele 2013 and Valeri & VanderWeele 2015.
regmedint( data, yvar, avar, mvar, cvar, emm_ac_mreg = NULL, emm_ac_yreg = NULL, emm_mc_yreg = NULL, eventvar = NULL, a0, a1, m_cde, c_cond, mreg, yreg, interaction = TRUE, casecontrol = FALSE, na_omit = FALSE )library(regmedint) data(vv2015) regmedint_obj1 <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 3, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) summary(regmedint_obj1) regmedint_obj2 <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), emm_ac_mreg = c("c"), emm_ac_yreg = c("c"), emm_mc_yreg = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 3, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) summary(regmedint_obj2)The package is an R implementation of regression-based closed-form causal mediation as originally described in Valeri & VanderWeele 2013 and Valeri & VanderWeele 2015 https://hsph.harvard.edu/research/vanderweele-group/tools-and-tutorials/. The earlier version is a sister program of the SAS macro. The current extended version (version 1.0 and later) supports effect modification by covariates (treatment-covariate and mediator-covariate product terms) in mediator and outcome models.
Report the number of missing observations for each variables of interest relevant for the analysis
report_missing(data, yvar, avar, mvar, cvar, eventvar)Summarize the mreg_fit, yreg_fit, and the mediation analysis effect estimates.
summaryregmedint( object, a0 = NULL, a1 = NULL, m_cde = NULL, c_cond = NULL, args_mreg_fit = list(), args_yreg_fit = list(), exponentiate = FALSE, level = 0.95, ... )library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) ## Detailed result with summary summary(regmedint_obj) ## Add exponentiate results for non-linear outcome models summary(regmedint_obj, exponentiate = TRUE) ## Evaluate at different values summary(regmedint_obj, m_cde = 0, c_cond = 1) ## Change confidence level summary(regmedint_obj, m_cde = 0, c_cond = 1, level = 0.99)This is a version of summary.glm modified to use the robust variance estimator [sandwich]sandwich.
summaryregmedint_mod_poisson(object, ...)This function extracts coef from yreg_fit and 3s with zeros appropriately to create a named vector consistently having the following elements: (Intercept) (a zero element is added for yreg = "survCox" for which no intercept is estimated (the baseline hazard is left unspecified)), avar, mvar, avar:mvar (a zero element is added when interaction = FALSE). cvar (this part is eliminated when cvar = NULL), emm_ac_yreg (this part is eliminated when emm_ac_yreg = NULL), emm_mc_yreg (this part is eliminated when emm_mc_yreg = NULL).
theta_hat( yreg, yreg_fit, avar, mvar, cvar, emm_ac_yreg = NULL, emm_mc_yreg = NULL, interaction )Internal functions (usually) do not validate arguments, thus, we need to make sure informative errors are raised when the arguments are not safe for subsequent computation.
validate_args( data, yvar, avar, mvar, cvar, emm_ac_mreg, emm_ac_yreg, emm_mc_yreg, eventvar, a0, a1, m_cde, c_cond, mreg, yreg, interaction, casecontrol )Check the structure of a proposed regmedint object for soundness.
validate_regmedint(x)Extract variance estimates evaluated at a0, a1, m_cde, and c_cond.
vcovregmedint(object, a0 = NULL, a1 = NULL, m_cde = NULL, c_cond = NULL, ...)library(regmedint) data(vv2015) regmedint_obj <- regmedint(data = vv2015, ## Variables yvar = "y", avar = "x", mvar = "m", cvar = c("c"), eventvar = "event", ## Values at which effects are evaluated a0 = 0, a1 = 1, m_cde = 1, c_cond = 0.5, ## Model types mreg = "logistic", yreg = "survAFT_weibull", ## Additional specification interaction = TRUE, casecontrol = FALSE) vcov(regmedint_obj) ## Evaluate at different values vcov(regmedint_obj, m_cde = 0, c_cond = 1)Provide robust sandwich variance-covariance estimate using [sandwich]sandwich.
vcovregmedint_mod_poisson(object, ...)An example dataset from Valeri and VanderWeele (2015) <doi:10.1097/EDE.0000000000000253>.
vv2015https://hsph.harvard.edu/research/vanderweele-group/tools-and-tutorials/| Repository | Version | Published | First seen | Last seen | Docs |
|---|---|---|---|---|---|
| CRAN | 1.0.2 | 2026-05-29 | 2026-05-30 |
표시할 OSV 데이터가 없습니다.
표시할 OpenAlex 데이터가 없습니다.