Description Usage Arguments Value Examples
IV_PILE
estimates an IV-optimal individualized treatment
rule given a dataset with estimated partial identification intervals
for each instance.
1 |
dt |
A dataframe whose first column is a binary IV 'Z', followed by q columns of observed covariates, a binary treatment indicator 'A', a binary outcome 'Y', lower endpoint of the partial identification interval 'L', and upper endpoint of the partial identification interval 'U'. The dataset has q+5 columns in total. |
kernel |
The kernel used in the weighted SVM algorithm. The user may choose between 'linear' (linear kernel) and 'radial' (Gaussian RBF kernel). |
C |
Cost of violating the constraint. This is the parameter C in the Lagrange formulation. |
sig |
Sigma in the Gaussian RBF kernel. Default is set to 1/dimension of covariates, i.e., 1/q. This parameter is not relevant for linear kernel. |
An object of the type wsvm
, inheriting from svm
.
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 | ## Not run:
# It is necessary to install the package locClass in order
# to run the following code.
attach(dt_Rouse)
# Construct an IV out of differential distance to two-year versus
# four-year college. Z = 1 if the subject lives not farther from
# a 4-year college compared to a 2-year college.
Z = (dist4yr <= dist2yr) + 0
# Treatment A = 1 if the subject attends a 4-year college and 0
# otherwise.
A = 1 - twoyr
# Outcome Y = 1 if the subject obtained a bachelor's degree
Y = (educ86 >= 16) + 0
# Prepare the dataset
dt = data.frame(Z, female, black, hispanic, bytest, dadsome,
dadcoll, momsome, momcoll, fincome, fincmiss, A, Y)
# Estimate the Balke-Pearl bound by estimating each constituent
# conditional probability p(Y = y, A = a | Z, X) with a multinomial
# regression.
dt_with_BP_bound_multinom = estimate_BP_bound(dt, method = 'multinom')
# Estimate the IV-optimal individualized treatment rule using a
# linear kernel, under the putative IV and the Balke-Pearl bound.
iv_itr_BP_linear = IV_PILE(dt_with_BP_bound_multinom, kernel = 'linear')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.