From 01a6857946617236eacd8540337e27fcad1c5fb7 Mon Sep 17 00:00:00 2001 From: Kris Sankaran Date: Wed, 28 Aug 2024 18:09:32 -0500 Subject: [PATCH] update manual --- man/mediation_models.Rd | 1 + man/mindfulness.Rd | 3 +++ man/outcome_models.Rd | 1 + man/plot_sensitivity.Rd | 6 +++--- man/sensitivity.Rd | 5 +++-- man/sensitivity_pathwise.Rd | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/man/mediation_models.Rd b/man/mediation_models.Rd index f7490ff..f1126da 100644 --- a/man/mediation_models.Rd +++ b/man/mediation_models.Rd @@ -17,6 +17,7 @@ A list containing all the fitted mediation models. Accessor for Outcome Models } \examples{ +data(mindfulness) exper <- mediation_data( mindfulness, phyloseq::taxa_names(mindfulness), diff --git a/man/mindfulness.Rd b/man/mindfulness.Rd index 7db1531..357f475 100644 --- a/man/mindfulness.Rd +++ b/man/mindfulness.Rd @@ -18,4 +18,7 @@ stored as a phyloseq object. Measurements are from 50 subjects before and after a real and active control mindfulness intervention. We are interested in changes in subject-level metadata, stored in the sample_data slot } +\examples{ +data(mindfulness) +} \keyword{data} diff --git a/man/outcome_models.Rd b/man/outcome_models.Rd index b59dc6e..1877ac2 100644 --- a/man/outcome_models.Rd +++ b/man/outcome_models.Rd @@ -17,6 +17,7 @@ A list containing all the fitted outcome models. Accessor for Outcome Models } \examples{ +data(mindfulness) exper <- mediation_data( mindfulness, phyloseq::taxa_names(mindfulness), diff --git a/man/plot_sensitivity.Rd b/man/plot_sensitivity.Rd index 92a02cd..0b9c002 100644 --- a/man/plot_sensitivity.Rd +++ b/man/plot_sensitivity.Rd @@ -8,9 +8,9 @@ plot_sensitivity(sensitivity_curve, x_var = "rho", y_var = "indirect_effect") } \arguments{ \item{sensitivity_curve}{The output of a call to sensitivity or -sensitivity_perturb. A data.frame whose columns are: outcome, {x_var}, -{y_var}, and {y_var}_standard_error, where x_var and y_var are defined in -the two arguments below.} +sensitivity_perturb. A data.frame whose columns are: outcome, \{x_var\}, +\{y_var\}, and \{y_var\}_standard_error, where x_var and y_var are defined +in the two arguments below.} \item{x_var}{The type of perturbation variable to plot along the x-axis. Defaults to "rho", following the sensitivity approach implemented in diff --git a/man/sensitivity.Rd b/man/sensitivity.Rd index 82c605a..c512021 100644 --- a/man/sensitivity.Rd +++ b/man/sensitivity.Rd @@ -31,7 +31,7 @@ so enforcing independence between mediators and outcomes)} \item{rho_seq}{We will evaluate correlations Cor(e', e) between mediation and outcome model errors ranging along this grid. Defaults to NULL, which -internally sets the sequence to rho = \link{-0.9, -0.7 ..., 0.7, 0.9}.} +internally sets the sequence to rho = (-0.9, -0.7 ..., 0.7, 0.9).} \item{n_bootstrap}{The number of bootstrap resamples used to build confidence bands around the sensitivity curves. Defaults to 100.} @@ -63,5 +63,6 @@ model <- multimedia( ) |> estimate(exper) rho_seq <- c(-0.2, 0, 0.2) -sensitivity(model, exper, subset_indices, rho_seq, n_bootstrap = 2) +confound_ix <- expand.grid(mediator = 1, outcome = 1:2) +sensitivity(model, exper, confound_ix, rho_seq, n_bootstrap = 2) } diff --git a/man/sensitivity_pathwise.Rd b/man/sensitivity_pathwise.Rd index 5fafff0..af90d99 100644 --- a/man/sensitivity_pathwise.Rd +++ b/man/sensitivity_pathwise.Rd @@ -31,7 +31,7 @@ so enforcing independence between mediators and outcomes)} \item{rho_seq}{We will evaluate correlations Cor(e', e) between mediation and outcome model errors ranging along this grid. Defaults to NULL, which -internally sets the sequence to rho = \link{-0.9, -0.7 ..., 0.7, 0.9}.} +internally sets the sequence to rho = (-0.9, -0.7 ..., 0.7, 0.9).} \item{n_bootstrap}{The number of bootstrap resamples used to build confidence bands around the sensitivity curves. Defaults to 100.}