target: Targets individuals into groups of positive, negative or...

View source: R/target.R

targetR Documentation

Targets individuals into groups of positive, negative or neutral effect of treatment on an outcome.

Description

Targets individuals into groups of positive, negative or neutral effect of treatment on an outcome.

Usage

target(
  x,
  pteffObject,
  effect = "positive",
  featuresinf = NULL,
  plot = TRUE,
  lb = NULL,
  model = "gaussian",
  match = 0.8,
  nmcov = NULL,
  cores = 1,
  ...
)

Arguments

x

a list with a fields teffdata and features. teffdata the data for treatment, outcome on which the effect is measured and covariates across subjects. features data is the data on which the profiling is done. Adjusted features for the variables on the teffdata are used to fit the forest and extract the profiles of individuals with significant treatments.

pteffObject

object of class pteff

effect

character with one of the values: "positive", "negative", "positiveandnegative", indicating which subpopulations to be targeted: subpopulation with positive treatment effects only, negative treatment effects only or both, respectively (Default: positive).

featuresinf

a vector of characters with the names of the features to be used; a matrix of characters whose columns are names of features whose values will be averaged (Default:NULL).

plot

logical indicating a whether a plot of the targeting will be produced

lb

character indicating labels for features plot.

model

character with one of the values corresponding to the family argument of a general linear model for the outcome (glm), such as: "gaussian", "binomial", etc. It also allows "beta" for beta regression, "hazard" for proportional hazards model coxph, and "log2" for log2 transformation of the effects (Default: "gaussian").

match

numeric value between 0 and 1 indicating the level of the match for the targeing across all the binarized features in the profile (positive or negative). A value of 1 means that all the binarized features must take identical values in the profile (i,e "positive") for an individual to be clsssified in its subpopulation (of positive treatment effects).

nmcov

vector of character with the names of the covariates to be included in the models.

cores

an integer with the number of cores for parallel computation (Default:1).

...

additional parameters for the image function

Details

This function uses feature data of individuals to classify them into subpopulations associated with the positive and negative effect of treating them according to a given outcome. The classification is performed by targeting the feature data (adjusted by covariates and binarized) to the profiles computed in predicteff.

The function tests whether the classification of the subjects into groups of positive and negative treatment effects modulates the association of the treatment with the outcome, fitting a model for the outcome as function of the interaction between the classification and the treatment.

Models on the outcome to test the interaction include general lineal models, beta regression and proportional hazards models.

The function can be used to target new individuals not used in the profiling and/or on the effects of other types of outcomes also expected from the treatment.

Value

a list of class tarteff with fields:

classification:

classification of individuals into subpopulations of expected positive and/or negative treatment effects

summary.model:

a summary of the model used to test the association of the outcome with the interaction of between the profile ("positiveandnegative": positive=1, neutral=0, negative=-1; "positive": positive=1, neutral=0, "negative": negative=1, neutral=0) with the effect.

Examples

data(tcell)
homologous<- matrix(c("DDX3Y","DDX3X","KDM5D","KDM5C","PRKY","PRKX",
"RPS4Y1","RPS4X","TXLNGY", "TXLNG",
"USP9Y", "USP9X", "XIST", "XIST", "TSIX", "TSIX"), nrow=2)
pf <- predicteff(tcell, featuresinf=homologous, profile=TRUE)
res <- target(tcell, pf, effect="positiveandnegative",
featuresinf=homologous, nmcov="age", model="log2")
res


teff-package/teff documentation built on March 20, 2022, 8:25 p.m.