| Title: | Information Assessment for Individual Modalities in Multimodal Regression Models |
|---|---|
| Description: | Provides methods for quantifying the information gain contributed by individual modalities in multimodal regression models. Information gain is measured using Expected Relative Entropy (ERE) or pseudo-R² metrics, with corresponding confidence intervals. Currently supports linear regression, logistic regression, and the Cox proportional hazards model. A robust Median-of-Means based estimator is also provided for heavy-tailed responses under the Gaussian and Negative-Binomial families, with basic bootstrap confidence intervals. |
| Authors: | Wanting Jin [aut, cre], Quefeng Li [aut] |
| Maintainer: | Wanting Jin <[email protected]> |
| License: | GPL-3 |
| Version: | 1.1 |
| Built: | 2026-09-14 10:02:59 UTC |
| Source: | https://github.com/cran/multiModTest |
A toy dataset to demonstrate running this package on multimodal Cox proportional hazards models. Survival times follow a Cox model with independent right censoring (about 27% of the observations are censored).
data_cox_modeldata_cox_model
A data object that contains
yA 200 2 matrix of survival outcomes, with columns
time (the observed follow-up time) and status (the event
indicator: 1 = event, 0 = censored). It may be passed directly to
mglm.test, or converted with Surv.
XA 200 800 matrix containing all training data.
mod.idxA list of modality indices: columns 1–400 form modality 1 and columns 401–800 form modality 2.
A toy dataset to demonstrate running this package on multimodal linear models.
data_linear_modeldata_linear_model
A data object that contains
yA vector of 200 observations of continuous outcomes.
XA 200 600 matrix containing all training data.
mod.idxA list of modality indices.
A toy dataset to demonstrate running this package on multimodal logistic models.
data_logistic_modeldata_logistic_model
A data object that contains
yA vector 200 observations of outcomes. (0 or 1)
XA 200 600 matrix containing all training data.
mod.idxA list of modality indices.
A toy dataset to demonstrate robust (Median-of-Means) estimation on multimodal Negative-Binomial models with heavy-tailed responses. The counts are strongly overdispersed (variance-to-mean ratio near 19, with roughly half of the observations equal to zero).
data_nb_modeldata_nb_model
A data object that contains
yA vector of 300 observations of non-negative counts.
XA 300 600 matrix containing all training data.
mod.idxA list of modality indices: columns 1–200, 201–400, and 401–600 form modalities 1, 2, and 3.
thetaThe true Negative-Binomial dispersion used to generate
the counts, . It may be supplied to mglm.test
through the theta argument; otherwise it is estimated from the data.
Provides statistical inference for modality-specific information gain in
multimodal GLMs. Estimates ERE and pseudo- with confidence intervals using
Sure Independence Screening for variable selection and penalized likelihood for inference.
mglm.test( X, y, mod.idx, family = c("gaussian", "binomial", "cox", "negative.binomial"), robust = c("none", "mom"), iter = TRUE, penalty = c("SCAD", "MCP", "lasso"), tune = c("bic", "ebic", "aic"), lambda = NULL, nlambda = 100, conf.level = 0.95, CI.type = c("two.sided", "one.sided"), CI = NULL, nboot = 200, nblock = 5, theta = NULL, trace = FALSE )mglm.test( X, y, mod.idx, family = c("gaussian", "binomial", "cox", "negative.binomial"), robust = c("none", "mom"), iter = TRUE, penalty = c("SCAD", "MCP", "lasso"), tune = c("bic", "ebic", "aic"), lambda = NULL, nlambda = 100, conf.level = 0.95, CI.type = c("two.sided", "one.sided"), CI = NULL, nboot = 200, nblock = 5, theta = NULL, trace = FALSE )
X |
The finite numeric |
y |
The response. For |
mod.idx |
A non-empty list of disjoint column-index vectors for all modalities in the
concatenated data matrix |
family |
A description of the error distribution and link function to be used in the model.
With |
robust |
Estimator for the modality information gain. |
iter |
Specifies whether to perform iterative SIS. For the Cox family this toggles between
a single BIC-driven screening pass ( |
penalty |
Specifies the type of penalty to be used in the variable selection and
inference procedure.
Options include |
tune |
Specifies the method for selecting the optimal tuning parameters in (I)SIS and
penalized likelihood procedure. Options include |
lambda |
A user-specified finite, positive, strictly decreasing sequence of at least two
lambda values for penalized likelihood
procedure. By default, a sequence of values of length |
nlambda |
The number of lambda values, an integer of at least 2. The default is 100. |
conf.level |
Confidence level, a finite number strictly between 0 and 1. The default is
|
CI.type |
A string specifying the type of the confidence interval. Options include
|
CI |
Logical; whether to compute confidence intervals. When |
nboot |
Number of bootstrap resamples (at least 2) used for the MoM basic bootstrap confidence interval
(used only when |
nblock |
Number of Median-of-Means blocks used by the MoM-GD estimator (used only when
|
theta |
Negative-Binomial dispersion parameter (used only when
|
trace |
Specifies whether to print out logs of iterations in SIS procedure. The default is
|
An object with S3 class "mglm.test" containing:
sel.idx |
List of indices of selected features by (I)SIS in each modality. |
num.nonzeros |
Number of selected features by (I)SIS in each modality. |
ERE |
Point estimation of ERE for each modality. |
ERE.CI.L |
Lower bound of the confidence interval of ERE for each modality |
ERE.CI.U |
Upper bound of the confidence interval of ERE for each modality |
R2 |
Point estimate of pseudo- |
R2.CI.L |
Lower bound of the confidence interval of pseudo- |
R2.CI.U |
Upper bound of the confidence interval of pseudo- |
conf.level |
Level of confidence intervals. |
## Example 1: Linear model data(data_linear_model) X <- data_linear_model$X y <- data_linear_model$y mod.idx <- data_linear_model$mod.idx test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "gaussian", iter = TRUE, penalty = "SCAD", tune = "bic", conf.level = 0.95, CI.type = "one.sided") summary(test) ## Example 2: Logistic regression data(data_logistic_model) X <- data_logistic_model$X y <- data_logistic_model$y mod.idx <- data_logistic_model$mod.idx test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "binomial", iter = TRUE, penalty = "SCAD", tune = "bic", conf.level = 0.95, CI.type = "two.sided") sum.test <- summary(test) ## Example 3: Cox proportional hazards model data(data_cox_model) X <- data_cox_model$X y <- data_cox_model$y # two-column matrix: (time, status) mod.idx <- data_cox_model$mod.idx test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "cox", iter = TRUE, penalty = "SCAD", tune = "ebic", conf.level = 0.95, CI.type = "two.sided") summary(test) ## Example 4: Robust (MoM) estimation under heavy-tailed responses data(data_nb_model) X <- data_nb_model$X y <- data_nb_model$y mod.idx <- data_nb_model$mod.idx ## Point estimates only (CI = FALSE is the default when robust = "mom"): test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "negative.binomial", robust = "mom", iter = FALSE, penalty = "SCAD", tune = "bic", nblock = 5, theta = data_nb_model$theta) summary(test)## Example 1: Linear model data(data_linear_model) X <- data_linear_model$X y <- data_linear_model$y mod.idx <- data_linear_model$mod.idx test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "gaussian", iter = TRUE, penalty = "SCAD", tune = "bic", conf.level = 0.95, CI.type = "one.sided") summary(test) ## Example 2: Logistic regression data(data_logistic_model) X <- data_logistic_model$X y <- data_logistic_model$y mod.idx <- data_logistic_model$mod.idx test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "binomial", iter = TRUE, penalty = "SCAD", tune = "bic", conf.level = 0.95, CI.type = "two.sided") sum.test <- summary(test) ## Example 3: Cox proportional hazards model data(data_cox_model) X <- data_cox_model$X y <- data_cox_model$y # two-column matrix: (time, status) mod.idx <- data_cox_model$mod.idx test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "cox", iter = TRUE, penalty = "SCAD", tune = "ebic", conf.level = 0.95, CI.type = "two.sided") summary(test) ## Example 4: Robust (MoM) estimation under heavy-tailed responses data(data_nb_model) X <- data_nb_model$X y <- data_nb_model$y mod.idx <- data_nb_model$mod.idx ## Point estimates only (CI = FALSE is the default when robust = "mom"): test <- mglm.test(X = X, y = y, mod.idx = mod.idx, family = "negative.binomial", robust = "mom", iter = FALSE, penalty = "SCAD", tune = "bic", nblock = 5, theta = data_nb_model$theta) summary(test)
Summary method for objects of class "mglm.test"
## S3 method for class 'mglm.test' summary(object, ...) ## S3 method for class 'summary.mglm.test' print(x, ...)## S3 method for class 'mglm.test' summary(object, ...) ## S3 method for class 'summary.mglm.test' print(x, ...)
object |
An |
... |
Additional arguments that could be passed to |
x |
A |
An object with S3 class summary.mglm.test. The class has its own print
method and contains the following list of elements.
sum.ERE |
The summary table of point estimate and confidence interval of ERE for each modality. |
sum.R2 |
The summary table of point estimate and confidence interval
of pseudo- |
conf.level |
Level of confidence intervals. |
sel.mod |
Index of the most informative modality. |