Type: Package
Title: Perform Inference on Summaries of Longitudinal Algorithm-Agnostic Variable Importance
Version: 1.0.0
Description: Calculate point estimates of and valid confidence intervals for longitudinal summaries of nonparametric, algorithm-agnostic variable importance measures. For more details, see Williamson et al. (2024) <doi:10.48550/arXiv.2311.01638>.
License: MIT + file LICENSE
Imports: vimp
Suggests: knitr, rmarkdown, testthat, SuperLearner
URL: https://bdwilliamson.github.io/lvimp/
BugReports: https://github.com/bdwilliamson/lvimp/issues
VignetteBuilder: knitr
RoxygenNote: 7.3.2
Encoding: UTF-8
NeedsCompilation: no
Packaged: 2025-12-01 17:05:16 UTC; L107067
Author: Brian D. Williamson ORCID iD [aut, cre]
Maintainer: Brian D. Williamson <brian.d.williamson@kp.org>
Repository: CRAN
Date/Publication: 2025-12-06 12:20:02 UTC

lvimp: Perform Inference on Summaries of Longidutinal Algorithm-Agnostic Variable Importance

Description

Calculate point estimates of and valid confidence intervals for longitudinal summaries of nonparametric, algorithm-agnostic variable importance measures. For more details, see Williamson et al. (2024) doi:10.48550/arXiv.2311.01638.

Authors

Maintainer: Brian Williamson https://bdwilliamson.github.io/

Methodology authors:

See Also

Manuscripts: (to appear)

Imports

The packages that we import either make internal code nice (dplyr, magrittr, tibble, rlang, data.table), or are used for estimating and performing inference on cross-sectional variable importance (vimp).

We suggest several other packages: ggplot2 and cowplot help with plotting variable importance estimates; testthat and covr help with unit tests; and knitr and rmarkdown help with the vignettes and examples.

Author(s)

Maintainer: Brian D. Williamson brian.d.williamson@kp.org (ORCID)

See Also

Useful links:


Format a lvim object

Description

Format a lvim object

Usage

## S3 method for class 'lvim'
format(x, digits = 3, ...)

Arguments

x

the lvim object of interest

digits

the number of digits to format to

...

other options, see the generic format function

Value

A formatted lvim object for printing.


Create a Longitudinal Variable Importance Object

Description

Create a longitudinal variable importance object from several constituent cross-sectional variable importance objects.

Usage

lvim(vim_list = list(), timepoints = numeric())

Arguments

vim_list

a list of individual, cross-sectional variable importance objects. Assumed to be in order over time.

timepoints

a numeric vector of timepoints of interest

Value

an object of class lvim


Area Under the Variable Importance Trajectory

Description

Compute a nonparametric estimate of (and efficient influence function for) the area under the longitudinal variable importance trajectory (AUTC) over a contiguous subset of the time series.

Usage

lvim_autc(
  lvim,
  indices = 1:length(lvim),
  interpolator = "linear",
  delta = 0,
  ...
)

Arguments

lvim

an object of class lvim containing the cross-sectional variable importance objects

indices

a numeric vector indicating the contiguous subset of the time series

interpolator

a string indicating the type of interpolator used to take the area under the trajectory

delta

null hypothesis value

...

other arguments to be passed to the interpolator function

Value

The lvim object, with point estimates, CIs, and p-values related to the area under the trend in variable importance filled in.


Average Longitudinal Variable Importance

Description

Compute a nonparametric estimate of (and efficient influence function for) the average longitudinal variable importance over a contiguous subset of the time series.

Usage

lvim_average(lvim, indices = 1:length(lvim), delta = 0)

Arguments

lvim

an object of class lvim containing the cross-sectional variable importance objects

indices

a numeric vector indicating the contiguous subset of the time series

delta

null hypothesis value

Value

The lvim object, with point estimates, CIs, and p-values related to the average variable importance filled in.


Linear Trend in the Longitudinal Variable Importance Trajectory

Description

Compute a nonparametric estimate of (and efficient influence function for) the linear trend in the longitudinal variable importance over a contiguous subset of the time series.

Usage

lvim_trend(lvim, indices = 1:length(lvim), delta = 0)

Arguments

lvim

an object of class lvim containing the cross-sectional variable importance objects

indices

a numeric vector indicating the contiguous subset of the time series

delta

null hypothesis value

Value

The lvim object, with point estimates, CIs, and p-values related to the linear trend in variable importance filled in.


Print a lvim object

Description

Print a lvim object

Usage

## S3 method for class 'lvim'
print(x, ...)

Arguments

x

the lvim object of interest

...

other options, see the generic print function

Value

No return value, called for side effects.