Last data update: 2014.03.03

R: Mean Response or Restricted Mean Response Given a Treatment...
QhatR Documentation

Mean Response or Restricted Mean Response Given a Treatment Regime

Description

Estimates the mean response given a treatment regime if data is uncensored. If data is censored, estimates the restricted mean response given a treatment regime.

Usage

Qhat(y, a, g, wgt = NULL)

Arguments

y

vector of responses. Note if logY = TRUE in censored, this value should also be the logarithm.

a

vector of treatments received.

g

vector of the given treatment regime.

wgt

weights to be used if response is censored.

Value

Returns the estimated mean response or restricted mean response.

Author(s)

Wenbin Lu, Hao Helen Zhang, Donglin Zeng, Yuan Geng, 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.

Geng, Y., Lu, W., and Zhang, H. H. (2015). On optimal treatment regimes selection for mean survival time. Statistics in Medicine, 34, 1169–1184. PMCID: PMC4355217.

Examples


  y <- rnorm(100)
  a <- rbinom(100,1,0.5)
  g <- integer(100)

  Qhat(y = y, a = a, g = g)

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/Qhat.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Qhat
> ### Title: Mean Response or Restricted Mean Response Given a Treatment
> ###   Regime
> ### Aliases: Qhat
> 
> ### ** Examples
> 
> 
>   y <- rnorm(100)
>   a <- rbinom(100,1,0.5)
>   g <- integer(100)
> 
>   Qhat(y = y, a = a, g = g)
[1] 0.1914156
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>