Last chance! 50% off unlimited learning
Sale ends in
IPWE_MADopt
seeks to estimated the treatment regime which minimizes
the Gini's Mean difference defined below.
Besides mean and quantile criterion, in some applications
people seek minimization of dispersion in the outcome, which, for example, can
be described by Gini's mean difference. Formally, it is defined as the absolute
differences of two random variables
Given a treatment regime d
as
IPWE_MADopt(data, regimeClass, moPropen = "BinaryRandom", s.tol, it.num = 8,
hard_limit = FALSE, cl.setup = 1, p_level = 1, pop.size = 3000)
a data frame, containing variables in the moPropen
and RegimeClass
and
a component y
as the response.
a formula specifying the class of treatment regimes to search,
e.g. if regimeClass = a~x1+x2
, and then this function will search the class of treatment regimes
of the form
The propensity score model for the probability of receiving
treatment level 1.
When moPropen
equals the string "BinaryRandom", the proportion of observations
receiving treatment level 1 in the sample will be employed
as a good estimate of the probability for each observation.
Otherwise, this argument should be a formula/string, based on which this function
will fit a logistic regression on the treatment level. e.g. a1~x1
.
This is the tolerance level used by genoud
.
Default is it.num
.
integer > 1. This argument will be used in rgeound::geound
function.
If there is no improvement in the objective function in this number of generations,
rgenoud::genoud
will think that it has found the optimum.
logical. When it is true the maximum number of generations
in rgeound::geound
cannot exceed 100. Otherwise, in this function, only
it.num
softly controls when genoud
stops. Default is FALSE
.
the number of nodes. >1 indicates choosing parallel computing option in
rgenoud::genoud
. Default is 1.
choose between 0,1,2,3 to indicate different levels of output from the genetic function. Specifically, 0 (minimal printing), 1 (normal), 2 (detailed), and 3 (debug.)
an integer with the default set to be 3000. This is the population number for the first generation
in the genetic algorithm (rgenoud::genoud
).
This function returns an object with 6 objects. Both coefficients
and coef.orgn.scale
were normalized to have unit euclidean norm.
coefficients
the parameters indexing the estimated MAD-optimal treatment regime for standardized covariates.
coef.orgn.scale
the parameter indexing the estimated MAD-optimal treatment regime for the original input covariates.
hat_MAD
the estimated MAD when a treatment regime indexed by
coef.orgn.scale
is applied on everyone. See the 'details' for
connection between coef.orgn.scale
and
coefficient
.
call
the user's call.
moPropen
the user specified propensity score model
regimeClass
the user specified class of treatment regimes
Note that all estimation functions in this package use the same type of standardization on covariates. Doing so would allow us to provide a bounded domain of parameters for searching in the genetic algorithm.
This estimated parameters indexing the MAD-optimal treatment regime are returned in two scales:
The returned coefficients
is the set of parameters after covariates coefficients
, based on the standardized data.
For the identifiability issue, we force the Euclidean norm of coefficients
to be 1.
In contrast, coef.orgn.scale
corresponds to the original covariates,
so the associated decision rule can be applied directly to novel observations.
In other words, let coef.orgn.scale
.
The same as coefficients
, we force the Euclidean norm of coef.orgn.scale
to be 1.
If, for every input covariate, the smallest observed value is exactly 0 and the range
(i.e. the largest number minus the smallest number) is exactly 1, then the estimated
coefficients
and coef.orgn.scale
will render identical.
wang2017quantilequantoptr
# NOT RUN {
GenerateData.MAD <- function(n)
{
x1 <- runif(n)
x2 <- runif(n)
tp <- exp(-1+1*(x1+x2))/(1+exp(-1+1*(x1+x2)))
a<-rbinom(n = n, size = 1, prob=tp)
error <- rnorm(length(x1))
y <- (1 + a*0.6*(-1+x1+x2<0) + a*-0.6*(-1+x1+x2>0)) * error
return(data.frame(x1=x1,x2=x2,a=a,y=y))
}
# The true MAD optimal treatment regime for this generative model
# can be deduced trivially, and it is: c( -0.5773503, 0.5773503, 0.5773503).
# }
# NOT RUN {
# With correctly specified propensity model ####
# }
# NOT RUN {
n <- 400
testData <- GenerateData.MAD(n)
fit1 <- IPWE_MADopt(data = testData, regimeClass = a~x1+x2,
moPropen=a~x1+x2, cl.setup=2)
fit1
# }
# NOT RUN {
# With incorrectly specified propensity model ####
# }
# NOT RUN {
fit2 <- IPWE_MADopt(data = testData, regimeClass = a~x1+x2,
moPropen="BinaryRandom", cl.setup=2)
fit2
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab