Computes the Targeted Minimum Loss-Based Estimate of a specified statistical target parameter, formally defined within models from causal inference. The variable importance measures currently supported are the Average Treatment Effect (ATE) and a Nonparametric Variable Importance Measure (NPVI, formally defined by Chambaz, Neuvial, and van der Laan <doi:10.1214/12-EJS703>).
methyvim(data_grs, var_int, vim = c("ate", "rr", "npvi"), type = c("Beta", "Mval"), filter = c("limma"), filter_cutoff = 0.05, window_bp = 1000, corr_max = 0.75, obs_per_covar = 20, sites_comp = NULL, parallel = TRUE, future_param = NULL, bppar_type = NULL, return_ic = FALSE, shrink_ic = FALSE, tmle_type = c("glm", "sl"), tmle_args = list(family = "binomial", g_lib = c("SL.mean", "SL.glm", "SL.bayesglm", "SL.gam"), Q_lib = c("SL.mean", "SL.glm", "SL.gam", "SL.earth"), npvi_cutoff = 0.25, npvi_descr = NULL), tmle_backend = c("tmle", "drtmle", "tmle.npvi"))
data_grs | An object of class |
---|---|
var_int | A |
vim | Character indicating the variable importance measure to be used in the estimation procedure. Currently supported options are the ATE for discretized exposures and NPVI for continuous exposures. ATE and RR are the appropriate choices when the underlying scientific question is of the effect of an exposure on methylation, while NPVI (and other continuous treatment parameters) ought to be used when the effect of methylation on an outcome is sought. |
type | Character indicating the particular measure of DNA methylation to
be used as the observed data in the estimation procedure, either Beta values
or M-values. The data are accessed via |
filter | Character indicating the model to be implemented when screening
the |
filter_cutoff | Numeric indicating the p-value cutoff that defines which
sites pass through the |
window_bp | Numeric indicating the maximum genomic distance (in base pairs) between two sites for them to be considered neighboring sites. |
corr_max | Numeric indicating the maximum correlation that a neighboring site can have with the target site. |
obs_per_covar | Numeric indicating the number of observations needed for for covariate included in W for downstream analysis. This ensures the data is sufficient to control for the covariates. |
sites_comp | A |
parallel | Logical indicating whether parallelization ought to be used.
See the documentation of |
future_param | Character indicating the type of parallelization to be
used from the list available via the |
bppar_type | Character specifying the type of backend to be used for
parallelization via |
return_ic | Logical indicating whether an influence curve estimate should be returned for each site that passed through the filter. |
shrink_ic | Logical indicating whether limma should be applied to reduce
the variance in the ic based estimates in |
tmle_type | Character indicating the general class of regression models
to be used in fitting the propensity score and outcome regressions. This is
generally a shorthand and is overridden by |
tmle_args | List giving several key arguments to be passed to one of
|
tmle_backend | A |
An object of class methytmle
, with all unique slots filled in,
in particular, including indices of CpG sites that pass screening, cluster
of neighboring CpG sites, and a matrix of the results of the estimation
procedure performed for the given variable importance measure. Optionally,
estimates of the propensity score and outcome regressions, as well as the
original data rotated into influence curve space may be returned, if so
requested.
library(methyvimData) suppressMessages(library(SummarizedExperiment)) data(grsExample) var_int <- colData(grsExample)[, 1]#> Error in (function (classes, fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, mtable) if (length(methods) == 1L) return(methods[[1L]]) else if (length(methods) == 0L) { cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ") stop(gettextf("unable to find an inherited method for function %s for signature %s", sQuote(fdef@generic), sQuote(cnames)), domain = NA) } else stop("Internal error in finding inherited methods; didn't return a unique method", domain = NA)})(list(structure("DataFrame", package = "S4Vectors")), structure(function (x, use.names = FALSE, ...) standardGeneric("mcols"), generic = structure("mcols", package = "S4Vectors"), package = "S4Vectors", group = list(), valueClass = character(0), signature = c("x", "use.names"), default = `\001NULL\001`, skeleton = (function (x, use.names = FALSE, ...) stop("invalid call in method dispatch to 'mcols' (no default method)", domain = NA))(x, use.names, ...), class = structure("standardGeneric", package = "methods")), <environment>): unable to find an inherited method for function ‘mcols’ for signature ‘"DataFrame"’methyvim_out_ate <- suppressWarnings( methyvim(data_grs = grsExample, sites_comp = 1, var_int = var_int, vim = "ate", type = "Mval", filter = "limma", filter_cutoff = 0.05, parallel = FALSE, tmle_type = "sl" ) )#> Error in methyvim(data_grs = grsExample, sites_comp = 1, var_int = var_int, vim = "ate", type = "Mval", filter = "limma", filter_cutoff = 0.05, parallel = FALSE, tmle_type = "sl"): object 'var_int' not found