sens.cvrs2 | R Documentation |
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.
sens.cvrs2(patients, covar, response, response2, seed, nclust)
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 |
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)
Svetlana Cherlin, James Wason
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.