# NOT RUN {
R_t = encouraged_clusters$aggregated_outcome
R_c = control_clusters$aggregated_outcome
d_t = encouraged_clusters$aggregated_treatment
d_c = control_clusters$aggregated_treatment
Z_t = encouraged_clusters$IV
Z_c = control_clusters$IV
# Test beta = 0 in the proportional treatment effect
# model with the help of the double rank test using
# default psi(d_k, q_k) = d_k * q_k:
res = double_rank(0, R_t, R_c, d_t, d_c, Z_t, Z_c)
# Define a new psi function: psi(d_k, q_k) = q_k
psi_2 <- function(x, y) y
# Using psi_2 and the double rank test is reduced to the
#Wilcoxon signed rank test.
res_2 = double_rank(0, R_t, R_c, d_t, d_c,
Z_t, Z_c, psi = psi_2)
# }
Run the code above in your browser using DataLab