sens.cvrs2: Get subgroup of sensitive patiens according to the "cvrs"...

View source: R/internal.R

sens.cvrs2R Documentation

Get subgroup of sensitive patiens according to the "cvrs" method for 2 outcomes.

Description

For two vectors of binary responsess, get sensitive patients by risk scores and k-means. In the testing subsets, the risk scores are computed based on the treatment-covariate interaction effects from the training subsets. The two sets of the risk scores are divided into 4 clusters by a k-means clustering. cluster 1 corresponsds to low values of both response and response2, cluster 2 corresponss to low values of response and high values of response2, cluster 3 corresponds to high values of response and low values of response2, cluster 4 corresponds to high values of both response and response2.

Usage

sens.cvrs2(patients, covar, response, response2, seed, nclust)

Arguments

patients

- a data frame with patients inormation covar - a data frame with covariates response - a first vector of responses response2 - a second vector of binary response seed - a seed for random number generator

Value

A list of 4 : psens - sensitivity of identifying the sensitive group (w.r.t. every cluster), a vector of the length nclust per simulation run pspec - specificity of identifying the sensitive group(w.r.t. every cluster), a vector of the length nclust per simulation run sens.pred - predicted sensitivity status (rows = patienst, columns = simulations) cvrs - a matrix of the risk scores (rows = patients, columns = simulations). cvrs2 - a matrix of the risk scores for response2 (row = patients, colmns = simulations)

Author(s)

Svetlana Cherlin, James Wason


svetlanache/rapids documentation built on Sept. 15, 2023, 7 a.m.