From b76a9b60e9723f77c564971d7d0ded59ace68ade Mon Sep 17 00:00:00 2001 From: Kris Sankaran Date: Mon, 2 Sep 2024 19:09:16 -0500 Subject: [PATCH] create default and rebuild docs --- R/estimators.R | 2 +- man/bootstrap.Rd | 4 +++- man/glmnet_model.Rd | 5 ++++- man/indirect_pathwise.Rd | 4 +++- man/lm_model.Rd | 6 +++++- man/parallelize.Rd | 4 +++- man/rf_model.Rd | 5 ++++- 7 files changed, 23 insertions(+), 7 deletions(-) diff --git a/R/estimators.R b/R/estimators.R index ccfc9f3..13f68fc 100644 --- a/R/estimators.R +++ b/R/estimators.R @@ -327,7 +327,7 @@ glmnet_model_params <- function(...) { #' multimedia(exper, glmnet_model(lambda = 0.1)) |> #' estimate(exper) #' @export -glmnet_model <- function(progress, ...) { +glmnet_model <- function(progress = TRUE, ...) { check_if_installed( c("glmnet", "glmnetUtils"), "to use a glmnet regression model for multimedia estimation." diff --git a/man/bootstrap.Rd b/man/bootstrap.Rd index 02106d2..f8b6c8d 100644 --- a/man/bootstrap.Rd +++ b/man/bootstrap.Rd @@ -4,7 +4,7 @@ \alias{bootstrap} \title{Bootstrap Distribution for Estimators} \usage{ -bootstrap(model, exper, fs = NULL, B = 1000) +bootstrap(model, exper, fs = NULL, B = 1000, progress = TRUE) } \arguments{ \item{model}{An object of class multimedia with specified mediation and @@ -18,6 +18,8 @@ are assumed to be a vector of functions (for example, direct_effect or indirect_effect), and they will each be applied to each bootstrap resample.} \item{B}{The number of bootstrap samples. Defaults to 1000.} + +\item{progress}{A logical indicating whether to show a progress bar.} } \value{ stats A list of length B containing the results of the fs applied on diff --git a/man/glmnet_model.Rd b/man/glmnet_model.Rd index 7763b40..c458193 100644 --- a/man/glmnet_model.Rd +++ b/man/glmnet_model.Rd @@ -4,9 +4,12 @@ \alias{glmnet_model} \title{Regularized Glmnet Model across Responses} \usage{ -glmnet_model(...) +glmnet_model(progress = TRUE, ...) } \arguments{ +\item{progress}{A logical indicating whether to show a progress bar during +estimation.} + \item{...}{Keyword parameters passed to glmnet.} } \value{ diff --git a/man/indirect_pathwise.Rd b/man/indirect_pathwise.Rd index fb6de53..f2d7e5a 100644 --- a/man/indirect_pathwise.Rd +++ b/man/indirect_pathwise.Rd @@ -4,7 +4,7 @@ \alias{indirect_pathwise} \title{Indirect Effects via Single Mediation Paths} \usage{ -indirect_pathwise(model, exper = NULL, t1 = 1, t2 = 2) +indirect_pathwise(model, exper = NULL, t1 = 1, t2 = 2, progress = TRUE) } \arguments{ \item{model}{An object of class multimedia containing the estimated mediation @@ -19,6 +19,8 @@ outcome data from which the direct effects are to be estimated.} \item{t2}{The alternative level of the treatment to be used when computing the (pathwise) indirect effect.} + +\item{progress}{A logical indicating whether to show a progress bar.} } \value{ A data.frame summarizing the pathwise (per-mediator) indirect effects diff --git a/man/lm_model.Rd b/man/lm_model.Rd index 4b1eb9a..c7f09ae 100644 --- a/man/lm_model.Rd +++ b/man/lm_model.Rd @@ -4,7 +4,11 @@ \alias{lm_model} \title{Linear Model across Responses} \usage{ -lm_model() +lm_model(progress = TRUE) +} +\arguments{ +\item{progress}{A logical indicating whether to show a progress bar during +estimation.} } \value{ model An object of class \code{model} with estimator, predictor, and diff --git a/man/parallelize.Rd b/man/parallelize.Rd index ce93e30..08551c1 100644 --- a/man/parallelize.Rd +++ b/man/parallelize.Rd @@ -4,12 +4,14 @@ \alias{parallelize} \title{Parallelize Estimation across Responses} \usage{ -parallelize(f) +parallelize(f, progress = TRUE) } \arguments{ \item{f}{A function for estimating a single response model given a formula and input dataset. This is the model that we would like to parallelize across responses.} + +\item{progress}{A logical indicating whether to show a progress bar.} } \value{ f_multi A function that takes a formula and dataset and applies f to diff --git a/man/rf_model.Rd b/man/rf_model.Rd index 41c7778..e1cdc13 100644 --- a/man/rf_model.Rd +++ b/man/rf_model.Rd @@ -4,9 +4,12 @@ \alias{rf_model} \title{Random Forest Model} \usage{ -rf_model(...) +rf_model(progress = TRUE, ...) } \arguments{ +\item{progress}{A logical indicating whether to show a progress bar during +estimation.} + \item{...}{Keyword parameters passed to ranger.} } \value{