Last data update: 2014.03.03

R: Variable Selection for Optimal Treatment Decision with...
uncensoredR Documentation

Variable Selection for Optimal Treatment Decision with Uncensored Continuous Response

Description

A penalized regression framework that can simultaneously estimate the optimal treatment strategy and identify important variables when the response is continuous and not censored. This method uses an inverse probability weighted least squares estimation with adaptive LASSO penalty for variable selection.

Usage

uncensored(x, y, a, propen, phi, intercept = TRUE)

Arguments

x

Matrix or data.frame of model covariates.

y

Vector of response. Note that this data is used to estimate the Kaplan-Meier Curve and should not be log(T).

a

Vector of treatment received. Treatments must be coded as integers or numerics that can be recast as integers without loss of information.

propen

Vector or matrix of propensity scores for each treatment. If a vector, the propensity is assumed to be the same for all samples. Column or element order must correspond to the sort order of the treatment variable, i.e., 0,1,2,3,... If the number of columns/elements in propen is one fewer than the total number of treatment options, it is assumed that the base or lowest valued treatment has not been provided.

phi

A character 'c' or 'l' indicating if the constant ('c') or linear ('l') baseline mean function is to be used.

intercept

TRUE/FALSE indicating if an intercept is to be included in phi model.

Value

A list object containing

beta

A vector of the estimated regression coefficients after variable selection.

optTx

The estimated optimal treatment for each sample.

Author(s)

Wenbin Lu, Hao Helen Zhang, Donglin Zeng, and Shannon Holloway

References

Lu, W., Zhang, H. H., and Zeng. D. (2013). Variable selection for optimal treatment decision. Statistical Methods in Medical Research, 22, 493–504. PMCID: PMC3303960.

Examples

  sigma <- diag(10)
  ct <- 0.5^{1L:9L}
  rst <- unlist(sapply(1L:9L,function(x){ct[1L:{10L-x}]}))
  sigma[lower.tri(sigma)] <- rst
  sigma[upper.tri(sigma)] <- t(sigma)[upper.tri(sigma)]

  M <- t(chol(sigma))
  Z <- matrix(rnorm(1000),10,100)
  X <- t(M %*% Z)

  gamma1 <- c(1, -1, rep(0,8))
  beta <- c(1,1,rep(0,7), -0.9, 0.8)

  A <- rbinom(100,1,0.5)

  Y <- 1.0 + X %*% gamma1 + 
       A*{cbind(1.0,X)%*%beta} + rnorm(100,0,.25)

  dat <- data.frame(X,A,Y)
  
  uncensored(x=X,  
             y = Y,  
             a = A,  
             propen = 0.5,  
             phi = "c",  
             intercept = TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(OTRselect)
Loading required package: lars
Loaded lars 1.2

Loading required package: survival

OTRselect was developed in support of IMPACT, a comprehensive research
program that aims to improve the health and longevity of people by
improving the clinical trial process. To learn more about our 
research and available software visit www.impact.unc.edu. 


> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/OTRselect/uncensored.Rd_%03d_medium.png", width=480, height=480)
> ### Name: uncensored
> ### Title: Variable Selection for Optimal Treatment Decision with
> ###   Uncensored Continuous Response
> ### Aliases: uncensored
> 
> ### ** Examples
> 
>   sigma <- diag(10)
>   ct <- 0.5^{1L:9L}
>   rst <- unlist(sapply(1L:9L,function(x){ct[1L:{10L-x}]}))
>   sigma[lower.tri(sigma)] <- rst
>   sigma[upper.tri(sigma)] <- t(sigma)[upper.tri(sigma)]
> 
>   M <- t(chol(sigma))
>   Z <- matrix(rnorm(1000),10,100)
>   X <- t(M %*% Z)
> 
>   gamma1 <- c(1, -1, rep(0,8))
>   beta <- c(1,1,rep(0,7), -0.9, 0.8)
> 
>   A <- rbinom(100,1,0.5)
> 
>   Y <- 1.0 + X %*% gamma1 + 
+        A*{cbind(1.0,X)%*%beta} + rnorm(100,0,.25)
> 
>   dat <- data.frame(X,A,Y)
>   
>   uncensored(x=X,  
+              y = Y,  
+              a = A,  
+              propen = 0.5,  
+              phi = "c",  
+              intercept = TRUE)
$beta
                  [,1]
(Intercept)  0.5910892
x1           1.1844593
x2          -0.2127485
x3           0.0000000
x4          -0.3036529
x5           0.0000000
x6           0.0000000
x7           0.0000000
x8           0.0000000
x9          -0.5351694
x10          0.5595587

$optTx
  [1] 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0
 [38] 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 1 1 1 0 1 0 1 1 1
 [75] 0 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0

> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>