# Unbiased estimator of distribution function in two-stage randomization design

Apologies for a long post. I believe the answer of my questions involve basic statistics though I am reading it in the context of two-stage randomization design. The questions appear in the unbiasedness section. The other two sections (model framwork and estimator) only describe the relevant things in two-stage randomization design.

Definition: In a two-stage randomization design, patients are initially randomized to an initial treatment and then depending upon their response and consent, are further randomized to a maintenance treatment.

Model Framework in two-stage randomization design: Let treatment $A$, at levels $A_1$ and $A_2$, and treatment $B$, at levels $B_1$ and $B_2$, be the initial and maintenance treatments, respectively. In the two-stage trial, patients are randomized initially to one of the $A$ treatment levels. If a patient achieves remission and consent to further participation, he is then randomized to a level of $B$.

An objective of the study is to estimate the treatment policy $A_jB_k$ $j,k=1,2$, which we define as "treat with $A_j$ followed by $B_k$ if remission and consent".

Assume that each subject $i$ has an associated set of random variables $(R_{1i},R_{2i},T_{11i},T_{12i},T_{21i},T_{22i}),$ where $R_{1i}$ is the remission/consent status that $i$ would achieve were $i$ assigned to one of the policies $A_1B_k,$ $k=1,2,$ and similarly for $R_{2i}$. Implicit is the assumption that potential remission/consent status is a function only of the $A$ treatment level for a given policy and not on the subsequent $B$ treatment that the policy would dictate. The $T_{jki},$ $j,k=1,2$, represent the potential survival times $i$ would achieve if assigned to policy $A_jB_k$.

Suppose $X_i$ is the $A$ treatment assignment indicator, $X_i=j-1$ if $i$ is randomized to $A_j$, so that

$$X_i= \begin{cases} 0, & \text{if i randomized to A_1} \\ 1, & \text{if i randomized to A_2} \end{cases}.$$

The observed remission/consent status $R_i=R_{1i}(1-X_i)+R_{2i}X_{i}.$

$$R_i= \begin{cases} 0, & \text{if no remission or consent} \\ 1, & \text{if no remission and consent} \end{cases}.$$

Let $Z_i$ be the $B$ assignment indicator and defined only if $R_i=1$,

$$Z_i= \begin{cases} 0, & \text{if ith patient get remission/consent and randomized to B_1} \\ 1, & \text{if ith patient get remission/consent and randomized to B_2} \end{cases}.$$

Let $C_i$ be the time to censoring. $C_i$ is conditionally independent of $(R_i,R_iZ_i,T_{j1i},T_{j2i})$ given $X_i=j-1, j=1,2$.

$\Delta_i=I(T_i\le C_i)$ and $V_i=\min (T_i,C_i)$. Let the $B$ randomization probability is $\pi_{Z_j}$.

Consider $A_1B_1$. Ideally, if all subjects were assigned to $A_1B_1$ and there were no censoring, then $V_i = T_i = T_{lli}$, and the natural estimator for $F_{1l}(t)$ is $n^{-1}\sum_{i=1}^{n}I(V_i\le t)$. With censoring and randomization to $B$ contingent on remission/consent status, only a subset of the n patients have an observed (uncensored) survival time and have actual treatment consistent with the policy $A_1B_1$.

Let $Q_{1i}=1-R_i+(1-\pi_Z)^{-1}R_i(1-Z_i)$. In the cases where $i$'s treatment is consistent with $A_1B_1$, $Q_{1i}$ acts as a weight. Nonremitters consistent with $A_1B_1$ represent themselves and hence receive a weight of one, while if i achieves remission and consents, then $i$ represents $(1-\pi_Z)^{-1}$ remitting/consenting subjects who could have potentially been assigned to $B_1$. With $Q_{2i}=1-R_i+\pi_Z^{-1}R_i Z_i$, an analogous argument may be made for policy $A_1B_2$.

Estimator: These considerations motivate the estimator

$$\hat F_{1k}(t)=n^{-1}\sum_{i=1}^{n}\frac{\Delta_i Q_{ki}}{\hat K(V_i)}I(V_i\le t),\ldots (1)$$ for $k=1,2,$ where $\hat K(t)=\prod_{u\le t}\frac{Y(u)-dN^c(u)}{Y(u)}$ is the Kaplan-Meier estimate of the censoring survivor curve, with $N^c(u)=\sum_{i=1}^{n}I(V_i\le u, \Delta_i=0)$ and $Y(u)=\sum_{i=1}^{n}I(V_i\ge u)$.

Unbiasedness: To show $\hat F_{1k}(t)$ is unbiased estimator of $F_{1k}(t)$, the authors 1 then proceed as follows:

$\mathbb E[\frac{\Delta_i Q_{1i}}{K(V_i)}I(V_i\le t)]$

$\color{blue}{\text{[over which random variable this expectation is? Is it$\mathbb E_V(.)$or}}$ $\color{blue}{\text{$\mathbb E_R(.)$or$\mathbb E_Z(.)$or anything else?]}}$

$=\mathbb E[\frac{I(T_{11i}<C_i) Q_{1i}}{K(T_{11i})}I(T_{11i}\le t)]$

$=\mathbb E[\frac{I(T_{11i}\le t) Q_{1i}}{K(T_{11i})} \mathbb E\{ I(T_{11i}<C_i)|R_i,Z_i,T_{11i}\}]$
$\color{blue}{\text{[over which random variables the 1st and 2nd expectations are?]}}$

$=\mathbb E[\frac{I(T_{11i}\le t) Q_{1i}}{K(T_{11i})} K(T_{11i})]$ $\color{blue}{\text{[How$\mathbb E\{ I(T_{11i}<C_i)|R_i,Z_i,T_{11i}\}=K(T_{11i})$?]}}$

$=\mathbb E[I(T_{11i}\le t) Q_{1i}]\color{blue}{\text{[over which random variable this single expectation is?]}}$

$=\mathbb E[\mathbb E\{I(T_{11i}\le t) Q_{1i}|R_i,T_{11i}\}]$ $\color{blue}{\text{[over which random variables the 1st and 2nd expectations are?]}}$

$=\mathbb E\{I(T_{11i}\le t)\mathbb E(Q_{1i}|R_i,T_{11i})\}$

$=F_{11(t)},$

which follows by noting that $\mathbb E(Q_{1i}|R_i,T_{11i})\}=1-R_i+(1-\pi_Z)^{-1}\mathbb E\{R_i(1-Z_i)|R_i,T_{11i}\}=1$ from considering the cases $R_i=0$ and $R_i=1$ in turn.

Another question: does $\mathbb E[\frac{\Delta_i Q_{1i}}{K(V_i)}I(V_i\le t)]=F_{1k}(t)$ imply $\mathbb E[\hat F_{1k}(t)]=\mathbb E[n^{-1}\sum_{i=1}^{n}\frac{\Delta_i Q_{ki}}{\hat K(V_i)}I(V_i\le t)]=F_{1k}(t)$?

### $\color{purple}{\text{Thanks a lot for your attention.}}$

This question contains a lot of background material, but most of it is not relevant for answering the questions you pose.

This is a two stage trial. The initial treatment $A$ has two levels $A_1$ and $A_2$. However, as explained in the paper, patients randomized to $A_1$ and $A_2$ form two independent samples, so I'm going to restrict (as in the paper) to patients randomized to $A_1$. How are the data for such a patient modelled? Well, in the paper the data for such a patient are generated from an IID realisation of the set of variables $(R,Z,T_1,T_2,C)$, where $R$ is an indicator for successful continuation to the second stage, $Z$ is an indicator for which second stage treatment is applied, $T_1,T_2$ are the potential survival times under the two potential second stage treatments, and $C$ is a censoring time which is independent of the other variables. All the quantities in your equations are functions of the set of variables $(R,Z,T_1,T_2,C)$ (NB I'm omitting the $i$ subscripts here which link variables to specific patients.).

In $\mathbb E[\frac{\Delta_i Q_{1i}}{K(V_i)}I(V_i\le t)]$ no variable is singled out as one over which the expectation is being taken. This usually means that the expectation is over the joint distribution of the variables $(R,Z,T_1,T_2,C)$. See this answer for a good explanation of the precise meaning of this. The same applies to your other questions about expectations - they're all expectations over the joint distribution of all variables involved.

There are also some conditional expectations e.g. $\mathbb E\{ I(T_{11i}<C_i)|R_i,Z_i,T_{11i}\}=K(T_{11i})$. How does this work? Intuitively, we think of any variable we condition on as being constant. In this case $T_{11i}$ is regarded as constant, but $C_i$ is independent of the variables on which we are conditioning (so is unaffected by the conditioning), so the conditional expectation evaluates to $\mathbb E(I(t_{11i}<C_i))=\mathbb P(C_i>t_{11i})=K(t_{11i})$ where $t_{11i}$ is the value of $T_{11i}$ which we're thinking of as constant. (More rigorously: see this answer.)

Here's a simple example of what's going on with the conditional expectation. Suppose $X$ and $Y$ are continuous IID random variables with cdf $F$. By symmetry we know that $P(X>Y)=\frac{1}{2}$. However this can also be calculated by conditioning. In fact $P(X>Y)=\mathbb E(I(X>Y))=\mathbb E(\mathbb E(I(X>Y)|Y))$. In the conditional expectation we think of $Y$ as constant so we just integrate over $X$ to get $1-F(Y)$. Hence $\mathbb E(\mathbb E(I(X>Y)|Y))$ reduces to $\mathbb E(1-F(Y))$. Since $F(Y)$ is uniform on $[0,1]$ this evaluates to $\frac{1}{2}$.

As for the last question, linearity of expectation implies that $\mathbb E[n^{-1}\sum_{i=1}^{n}\frac{\Delta_i Q_{ki}}{ K(V_i)}I(V_i\le t)]=F_{1k}(t)$. However, I don't think you can easily replace $K$ by its estimator $\hat K$ in this - which is why they don't try to do this in the paper. Still, what they've shown suggests that $\hat F_{1k}(t)$ is a useful estimator.

• If $R_i,Z_i,T_{11i}$ are condition on, they become constant. Then how in $\mathbb E[\frac{I(T_{11i}\le t) Q_{1i}}{K(T_{11i})} \mathbb E\{ I(T_{11i}<C_i)|R_i,Z_i,T_{11i}\}]$ , expectation is on over the joint $(R,Z,T_1,T_2,C)$? Nov 25, 2017 at 4:32
• Sorry, my wording could have been better. We regard $R_i,Z_i,T_{11i}$ as constant but only for the purposes of calculating the conditional expectation. What's happening here is that in $\mathbb E\{ I(T_{11i}<C_i)|R_i,Z_i,T_{11i}\}$ we are integrating over $C_i$, then in $\mathbb E[\frac{I(T_{11i}\le t) Q_{1i}}{K(T_{11i})} \mathbb E\{ I(T_{11i}<C_i)|R_i,Z_i,T_{11i}\}]$ we integrate over the remaining variables. Nov 25, 2017 at 9:28
• I've added another example of this kind of use of conditional expectations - see edited answer. Nov 25, 2017 at 9:55
• Thank you for adding the explanation. And a big thanks for finding out the questions from huge background. Nov 25, 2017 at 10:42