Package 'cohetsurr'

Title: Assessing Complex Heterogeneity in Surrogacy
Description: Provides functions to assess and test for complex heterogeneity in the utility of a surrogate marker with respect to multiple baseline covariates, using both a parametric model and a semiparametric two-step model. More details will be available in the future in: Knowlton, R., Tian, L., Parast, L. (2024) ``A General Framework to Assess Complex Heterogeneity in the Strength of a Surrogate Marker."
Authors: Rebecca Knowlton [aut, cre]
Maintainer: Rebecca Knowlton <[email protected]>
License: GPL
Version: 1.0
Built: 2024-11-25 14:51:41 UTC
Source: CRAN

Help Index


Estimates the proportion of treatment effect explained by the surrogate marker as a function of multiple baseline covariates.

Description

Assesses complex heterogeneity in the utility of a surrogate marker by estimating the proportion of treatment effect explained by the surrogate marker as a function of multiple baseline covariates. Optionally, tests for evidence of heterogeneity overall and flags regions where the proportion of treatment effect explained is above a given threshold.

Usage

complex.heterogeneity(y, s, a, W.mat, type = "model", variance = FALSE, 
test = FALSE, W.grid = NULL, grid.size = 4, threshold = NULL)

Arguments

y

y, the outcome

s

s, the surrogate marker

a

a, the treatment assignment with 1 indicating the treatment group and 0 indicating the control group

W.mat

matrix of baseline covariate observations, where the first column is W1, second columns is W2, and so on.

type

options are "model", "two step", or "both"; specifies the estimation method that should be used for the proportion of treatment effect explained

variance

TRUE or FALSE, if variance/standard error estimates are wanted

test

TRUE or FALSE, if test for heterogeneity is wanted

W.grid

grid for the baseline covariates W where estimation will be provided

grid.size

number of measures for each baseline covariate to include in the estimation grid, if one is not provided by the user directly

threshold

threshold to flag regions where the estimated proportion of the treatment effect explained is at least that high

Value

A list is returned:

return.grid

grid of estimates for the overall treatment effect, the residual treatment effect, and the proportion of treatment effect explained as a function of the baseline covariates, W. Includes variance estimates and regions flagged above the threshold, if specified by the user.

pval

p-value(s) from the F test and the two step omnibus test for heterogeneity, depending on type argument

Author(s)

Rebecca Knowlton

References

Knowlton, R., Tian, L., Parast, L. (2024). "A General Framework to Assess Complex Heterogeneity in the Utility of a Surrogate Marker." Under Review.

Examples

data(exampledata)
  names(exampledata)
  complex.heterogeneity(y = exampledata$y,
                        s = exampledata$s,
                        a = exampledata$a,
                        W.mat = matrix(cbind(exampledata$w1, exampledata$w2), ncol = 2),
                        type = "model",
                        W.grid = matrix(cbind(exampledata$w1.grid, exampledata$w2.grid),ncol=2))
  #computationally intensive
  
    complex.heterogeneity(y = exampledata$y,
                          s = exampledata$s,
                          a = exampledata$a,
                          W.mat = matrix(cbind(exampledata$w1, 
                          exampledata$w2), ncol = 2),
                          type = "both",
                          variance = TRUE,
                          test = TRUE,
                          W.grid = matrix(cbind(exampledata$w1.grid, 
                          exampledata$w2.grid), ncol = 2),
                          threshold = 0.75)

Example data

Description

Example data

Usage

data("exampledata")

Format

A list with 7 elements representing 1000 observations from a treatment group and 1000 observations from a control group, and a grid of baseline covariate values at which to calculate estimates:

y

the outcome

s

the surrogate marker

a

the treatment assignment, where 1 indicates treatment and 0 indicates control

w1

the first baseline covariate of interest

w2

the second baseline covariate of interest

w1.grid

the grid of first baseline covariate values to provide estimates for

w2.grid

the grid of second baseline covariate values to provide estimates for

Examples

data(exampledata)
names(exampledata)