diff --git a/R/estimate_cerf_gp.R b/R/estimate_cerf_gp.R index 82864c8..e665955 100644 --- a/R/estimate_cerf_gp.R +++ b/R/estimate_cerf_gp.R @@ -7,7 +7,8 @@ #' for the provided set of hyperparameters. #' #' @param data A data.frame of observation data. -#' @param w A vector of exposure level to compute CERF. +#' @param w A vector of exposure level to compute CERF (please also see the +#' notes). #' @param gps_m An S3 gps object including: #' gps: A data.frame of GPS vectors. #' - Column 1: GPS @@ -31,6 +32,18 @@ #' used by internal packages. #' @param kernel_fn A kernel function. A default value is a Gaussian Kernel. #' +#' @note +#' Please note that `w` is a vector representing a grid of exposure levels at +#' which the CERF is to be estimated. This grid can include both observed and +#' hypothetical values of the exposure variable. The purpose of defining this +#' grid is to provide a structured set of points across the exposure spectrum +#' for estimating the CERF. This approach is essential in nonparametric models +#' like Gaussian Processes (GPs), where the CERF is evaluated at specific points +#' to understand the relationship between the exposure and outcome variables +#' across a continuum. It facilitates a comprehensive analysis by allowing +#' practitioners to examine the effect of varying exposure levels, including +#' those not directly observed in the dataset. +#' #' @return #' A cerf_gp object that includes the following values: #' - w, the vector of exposure levels. diff --git a/R/estimate_cerf_nngp.R b/R/estimate_cerf_nngp.R index 36e84ff..ae81f7b 100644 --- a/R/estimate_cerf_nngp.R +++ b/R/estimate_cerf_nngp.R @@ -8,7 +8,8 @@ #' match (the lowest covariate balance) for the provided set of hyperparameters. #' #' @param data A data.frame of observation data. -#' @param w A vector of exposure level to compute CERF. +#' @param w A vector of exposure level to compute CERF (please also see the +#' notes). #' @param gps_m An S3 gps object including: #' gps: A data.frame of GPS vectors. #' - Column 1: GPS @@ -36,6 +37,18 @@ #' @param nthread An integer value that represents the number of threads to be #' used by internal packages. #' +#' @note +#' Please note that `w` is a vector representing a grid of exposure levels at +#' which the CERF is to be estimated. This grid can include both observed and +#' hypothetical values of the exposure variable. The purpose of defining this +#' grid is to provide a structured set of points across the exposure spectrum +#' for estimating the CERF. This approach is essential in nonparametric models +#' like Gaussian Processes (GPs), where the CERF is evaluated at specific points +#' to understand the relationship between the exposure and outcome variables +#' across a continuum. It facilitates a comprehensive analysis by allowing +#' practitioners to examine the effect of varying exposure levels, including +#' those not directly observed in the dataset. +#' #' @return #' A cerf_nngp object that includes the following values: #' - w, the vector of exposure levels. diff --git a/man/estimate_cerf_gp.Rd b/man/estimate_cerf_gp.Rd index c19d3f9..c9caf6b 100644 --- a/man/estimate_cerf_gp.Rd +++ b/man/estimate_cerf_gp.Rd @@ -19,7 +19,8 @@ estimate_cerf_gp( \arguments{ \item{data}{A data.frame of observation data.} -\item{w}{A vector of exposure level to compute CERF.} +\item{w}{A vector of exposure level to compute CERF (please also see the +notes).} \item{gps_m}{An S3 gps object including: gps: A data.frame of GPS vectors. @@ -67,6 +68,18 @@ Estimates the conditional exposure response function (cerf) using Gaussian Process (gp). The function tune the best match (the lowest covariate balance) for the provided set of hyperparameters. } +\note{ +Please note that \code{w} is a vector representing a grid of exposure levels at +which the CERF is to be estimated. This grid can include both observed and +hypothetical values of the exposure variable. The purpose of defining this +grid is to provide a structured set of points across the exposure spectrum +for estimating the CERF. This approach is essential in nonparametric models +like Gaussian Processes (GPs), where the CERF is evaluated at specific points +to understand the relationship between the exposure and outcome variables +across a continuum. It facilitates a comprehensive analysis by allowing +practitioners to examine the effect of varying exposure levels, including +those not directly observed in the dataset. +} \examples{ \donttest{ set.seed(129) diff --git a/man/estimate_cerf_nngp.Rd b/man/estimate_cerf_nngp.Rd index 33d5ef5..2e2560f 100644 --- a/man/estimate_cerf_nngp.Rd +++ b/man/estimate_cerf_nngp.Rd @@ -20,7 +20,8 @@ estimate_cerf_nngp( \arguments{ \item{data}{A data.frame of observation data.} -\item{w}{A vector of exposure level to compute CERF.} +\item{w}{A vector of exposure level to compute CERF (please also see the +notes).} \item{gps_m}{An S3 gps object including: gps: A data.frame of GPS vectors. @@ -72,6 +73,18 @@ Estimates the conditional exposure response function (cerf) using the nearest neighbor (nn) Gaussian Process (gp). The function tune the best match (the lowest covariate balance) for the provided set of hyperparameters. } +\note{ +Please note that \code{w} is a vector representing a grid of exposure levels at +which the CERF is to be estimated. This grid can include both observed and +hypothetical values of the exposure variable. The purpose of defining this +grid is to provide a structured set of points across the exposure spectrum +for estimating the CERF. This approach is essential in nonparametric models +like Gaussian Processes (GPs), where the CERF is evaluated at specific points +to understand the relationship between the exposure and outcome variables +across a continuum. It facilitates a comprehensive analysis by allowing +practitioners to examine the effect of varying exposure levels, including +those not directly observed in the dataset. +} \examples{ \donttest{