Description Usage Arguments Details Value Author(s) References Examples
Select variables that are qualitatively interacted with the treatment based on a modified S-score method and a BIC-type criterion. This function can be applied to two-stage studies where treatments are sequentially assigned at two different time points.
1 2 3 4 |
formula |
A symbolic description of the model to be fitted(of type y ~ x1 | a1 or y ~ x1 | a1 | x2 | a2. Details are given 'Details'). |
data |
An optional list or environment containing variables in |
subset, na.action |
Arguments controlling formula processing via |
step |
SAS uses a forward selection procedure. The maximum size of the model is specified by |
model |
A logical value indicating whether model frame should be included as a component of the return value. |
y, a1, x1, a2, x2 |
For For |
... |
Currently not used |
.
For single-stage study, the formula should specified as y ~ x1 | a1 where y is the reponse vector (y should be specified in such a way that a larger value of y indicates better clinical outcomes), x1 is patient's baseline covariates and a1 is the treatment that patient receives.
For two-stage study, the formula should be specified as y ~ x1 | a1 | x2 | a2 where y is the response vector, a1 and a2 the vectors of patients' first and second treatments, x1 and x2 are the design matrices consisting of patients' baseline covariates and intermediate covariates.
The function returns linear dynamic treatment regimes. For single-stage study, the estimated treamtent regime
for future patients is given by I(\code{x1}^T \code{beta1.est}>0). For two-stage study, the estimated regime
is given by \code{a1}=I(x1^T \code{beta1.est}>0) and \code{a2}=I(\code{x}^T \code{beta2.est}>0)
where x=c(x1, a1, x2)
.
beta2.est |
Estimated coefficients in the second decision rule. |
beta1.est |
Estimated coefficients in the first decision rule. |
model |
The full model frame (if |
y |
Response vector (if |
x1 |
Baseline covariates (if |
a1 |
A vector of first treatment (if |
x2 |
Intermediate covariates (if |
a2 |
A vector of second treatment (if |
Ailin Fan and Chengchun Shi
Fan, A. and Lu, W. and Song, R. (2016) Sequential Advantage Selection for Optimal Treatment Regime. Annals of Applied Statistics, 10: 32-53.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ## single-stage study
set.seed(12345)
n <- 200
p <- 200
X <- matrix(rnorm(n*p), nrow=n, ncol=p)
A <- rbinom(n, 1, 0.5)
CX <- (X[,1] + X[,2])
h <- 1 + X[,1] * X[,3]
Y <- h + A*CX + 0.5*rnorm(n)
result <- SAS(Y~X|A)
## two-stage study
set.seed(12345*2)
n <- 200
p <- 200
X1 <- matrix(rnorm(n*p), nrow=n, ncol=p)
A1 <- rbinom(n, 1, 0.5)
X2 <- X1[,1] + A1 + 0.5*rnorm(n)
A2 <- rbinom(n, 1, 0.5)
Y <- A2*(A1 + X2) + A1*X1[,1] + 0.5*rnorm(n)
result <- SAS(Y~X1|A1|X2|A2)
## single-stage study
set.seed(12345)
n <- 50
p <- 20
X <- matrix(rnorm(n*p), nrow=n, ncol=p)
A <- rbinom(n, 1, 0.5)
CX <- (X[,1] + X[,2])
h <- 1 + X[,1] * X[,3]
Y <- h + A*CX + 0.5*rnorm(n)
result <- SAS(Y~X|A)
## two-stage study
set.seed(12345*2)
n <- 50
p <- 20
X1 <- matrix(rnorm(n*p), nrow=n, ncol=p)
A1 <- rbinom(n, 1, 0.5)
X2 <- X1[,1] + A1 + 0.5*rnorm(n)
A2 <- rbinom(n, 1, 0.5)
Y <- A2*(A1 + X2) + A1*X1[,1] + 0.5*rnorm(n)
result <- SAS(Y~X1|A1|X2|A2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.