Measurement error and precision medicine: error-prone tailoring covariates in dynamic treatment regimes
Dylan Spicker Michael Wallace
stat.ME


Gravitational Baryogenesis in Non-Minimal Coupled f(R,T) Gravity
    
P.K. Sahoo[ Department of Mathematics, Birla Institute of
Technology and Science-Pilani, Hyderabad Campus, Hyderabad-500078,
India,  Email:  pksahoo@hyderabad.bits-pilani.ac.in],  
Snehasish Bhattacharjee[Department of Astronomy, Osmania University, Hyderabad-500007,
India,  Email: snehasish.bhattacharjee.666@gmail.com]

    December 30, 2023
=======================================================================================================================================================================================================================================================================================================================================




Precision medicine incorporates patient-level covariates to tailor treatment decisions, seeking to improve outcomes. In longitudinal studies with time-varying covariates and sequential treatment decisions, precision medicine can be formalized with dynamic treatment regimes (DTRs): sequences of covariate-dependent treatment rules. To date, the precision medicine literature has not addressed a ubiquitous concern in health research - measurement error - where observed data deviate from the truth. We discuss the consequences of ignoring measurement error in the context of DTRs, focusing on challenges unique to precision medicine. We show - through simulation and theoretical results - that relatively simple measurement error correction techniques can lead to substantial improvements over uncorrected analyses, and apply these findings to the Sequenced Treatment Alternatives to Relieve Depression (STAR*D) study.




§ INTRODUCTION

Precision medicine is a framework in which medical treatment decisions are based on patient-level data. At its core, precision medicine aims to `treat patients, not diseases', reflecting the principle that the best treatment decision is informed by all relevant, available data on the patient, not solely their diagnosis. This can manifest in the simple case of a single treatment decision (the one-stage setting), but can be readily generalized to longitudinal treatment regimes where all available patient-level data (both present and past) can inform treatment decisions. One way of codifying such a process in the precision medicine framework is through the use of Dynamic Treatment Regimes (DTRs): sequences of decision rules tailored to patient-level covariates. Precision medicine in general, and DTRs in particular, have received a great deal of research attention in recent years.<cit.>

A key focus of the DTR framework is estimating the optimal sequence of treatment decisions that maximize an expected outcome, conditional on available patient-level data at each decision point. This may be a simple rule based on a single covariate (such as “prescribe treatment if the patient consumes fewer than 1300 calories a day”), or may be a highly complex set of treatment decisions which depend on many factors. Finding optimal treatment rules can be especially challenging in the observational data setting, wherein observed treatments may themselves be informed by patient-level information. Estimation of such rules has received considerable attention in the biostatistical literature, with the development of numerous estimation procedures.<cit.>

Measurement error refers to any process through which observable data do not equal the true underlying values of interest.<cit.> Common examples include blood pressure (typically elevated in clinical settings) <cit.> or self-reported caloric intake.<cit.> While measurement error may arise through a variety of mathematical mechanisms, the underlying concern is that analyses which do not account for such error may produce unpredictable and unreliable conclusions. These so-called naive analyses, along with many relevant correction methods, have been widely studied in both linear <cit.> and non-linear <cit.> models.

Despite the abundance of literature surrounding both DTRs and measurement error, there has yet to be a substantial attempt to assess the estimation of the former in the presence of the latter. Precision medicine encompasses both estimation and inference (in studying treatment effects) but also prediction (in applying decision rules to future patients). While estimation and inference have received considerable attention in the measurement error literature (outside of the context of precision medicine), prediction has not. Some argue for the use of error-prone variables to predict an outcome of interest directly. This argument advocates exploiting the dependence between our error-prone variable and the outcome, ignoring the underlying causal relationship between the true variable and the outcome. Then, if there is a sufficiently strong relationship between the outcome and observed measure, prediction may remain valid. This argument is correct for some models,<cit.> however, it is not always clear when it is valid. It has been shown that even in a standard regression setting, it may be necessary to correct for error to ensure valid prediction.<cit.>

Whether the goal is to assess the efficacy of a treatment regime, or to aid in future treatment decisions, the literature in standard modeling contexts gives us reason to believe that many of the same concerns will exist in precision medicine, and DTRs specifically. We will investigate these issues, establish when and how precision medicine analyses may be affected, and investigate - through simulation and theoretical results - straightforward measurement error correction techniques within the DTR framework. We further apply our methods to analyze the Sequenced Treatment Alternatives to Relieve Depression (STAR*D) study.<cit.>



§ METHODOLOGY

A wide variety of methods are available both for DTR estimation and measurement error correction. Common techniques for the former include Q-learning <cit.> and inverse probability weighting,<cit.> along with the more complex and robust G-estimation <cit.> and augmented inverse probability weighting techniques.<cit.> Dynamic weighted ordinary least squares (dWOLS) offers a compromise between these broad classes of approach, offering robustness to model misspecification while maintaining straightforward implementation.<cit.> Classification-type approaches, such as outcome weighted learning, have also recently grown in popularity.<cit.>

The measurement error literature boasts a similar range of options with a familiar trade-off between simplicity of theory and theoretical properties. For example, regression calibration <cit.> and simulation extrapolation (SIMEX) <cit.> are both general methods, which make few assumptions regarding the underlying data. This results in comparatively simple estimators which are consistent in linear models, but which can make no general consistency guarantees in non-linear models.<cit.> In contrast, methods such as the conditional score<cit.>, under correct distributional assumptions, and the corrected score<cit.> offer consistent estimators for a larger class of models, at the cost of more complex implementation.

As the first substantive work on the interface between DTRs and measurement error, we will limit our focus to methodologies that afford straightforward implementation. DTR estimation will be carried out via dWOLS,<cit.> whose regression-based implementation is complemented by the measurement error correction method of regression calibration.<cit.>

To establish notation, and the modeling framework upon which our methodology relies, in this section we will introduce the specifics of a one-stage, error-free DTR, and discuss the estimation procedure using dWOLS. We will then extend to the multistage case. Finally, we will discuss regression calibration generally, clarifying the specific corrections that we will use.



 §.§ DTRs and dWOLS

In a one-stage DTR we make a single binary treatment decision (A) per patient. We take A = a ∈{0,1} to denote some binary treatment option, such as standard treatment (a=0) compared to an intervention (a=1). We are concerned with an outcome variable Y, chosen such that larger values are preferred. Patient information available immediately prior to the decision being made is denoted 𝐗. The optimal DTR will then take 𝐗=𝐱 as input for a patient and return A=a^opt, such that Y is maximized in expectation. Formally, a^opt = _a E[Y|A=a, 𝐗=𝐱; β, ψ], where the mean is modeled as

    E[Y|A=a, 𝐗=𝐱; β, ψ]= f(𝐱_β; β) + γ(𝐱_ψ, a; ψ)

with 𝐱_β and 𝐱_ψ representing two (possibly identical) subsets of the covariates 𝐱, and β and ψ are model parameters. We often take 𝐱 = (1, 𝐱) to allow for a baseline effect (or intercept) to be captured in f. 

This mean decomposition includes a component f(𝐱_β;β) which does not depend on the treatment, and a component γ(𝐱_ψ, a; ψ) which captures the effect of treatment. These are the so-called treatment-free and blip components, respectively. The combination of the treatment-free and blip models (as outlined in Equation (<ref>)) is referred to as the outcome model. The treatment decision impacts the outcome only through the blip. As such, estimation of the optimal DTR is equivalent to finding the decision rule which maximizes γ(𝐱_ψ, a; ψ). We therefore only need to estimate the ψ terms correctly to determine the optimal DTR.

Often, we take γ(𝐱_ψ, a; ψ) = aψ'𝐱_ψ to be a linear function of the covariates multiplied by the treatment indicator, meaning a^opt = 1 if ψ'𝐱_ψ > 0 and a^opt = 0 otherwise. If we correctly specify the full outcome model then standard regression procedures may be applied. However, as our treatment decision does not depend on the treatment-free component directly, we may wish to seek methodology that does not depend on its correct specification in full. For example, even with the treatment-free model misspecified, we could nevertheless proceed with correct specification of the blip if a and 𝐱 were independent, but this is seldom a reasonable assumption in our observational setting (where treatment decisions may be made based on patient-level data).

dWOLS, along with some other methods such as the aforementioned G-estimation <cit.> and augmented inverse probability of treatment weighting,<cit.> account for this by requiring the specification of a treatment model, modeling the probability of receiving the intervention given the individual's covariates. In dWOLS, this allows the calculation of patient-level weights, which we denote (a, 𝐱) for a patient with covariates 𝐱 receiving treatment a. These weights are designed to `balance' the covariates. Any weights which satisfy

    π(𝐱)v(1, 𝐱) = (1 - π(𝐱))v(0, 𝐱),

where π(𝐱) = P(A=1|𝐗=𝐱), will suffice for balance. The use of (a, 𝐱) = |a - π(𝐱)| is recommended.<cit.>

In the one-stage setting, dWOLS is simply a weighted ordinary least squares regression with weights satisfying Equation (<ref>) and an outcome model structure as indicated by Equation (<ref>). The resulting estimators for ψ are then doubly robust: as long as the blip model is correctly specified, and at least one of the treatment or treatment-free models is correctly specified, the estimators for ψ will be consistent.



These methods easily extend to multistage processes. A K-stage DTR will have K total treatment decisions made, which we index by j. We wish to estimate the optimal decision for stage j, given all information available immediately prior to the decision. We now subscript the covariate vector and the treatment decision, 𝐱_j and a_j, to denote the measurements taken and the observed decision at stage j, respectively. We use over- and under-line notation to refer to the past and future respectively, so that (for example) 𝐱_j = (𝐱_1, , 𝐱_j) and 𝐚_j+1 = (a_j + 1, , a_K). Finally, for notational convenience, we define a variable to represent the patient's history prior to the stage j treatment decision: 𝐡_j = (𝐱_j, 𝐚_j-1). We now expand Equation (<ref>), given the above notation, to

    E[Y|𝐇=𝐡; β, ψ] = ∑_j=1^K {f_j(𝐡_j^β; β_j) + γ_j(𝐡_j^ψ, a_j; ψ_j)}

where 𝐡_j^β and 𝐡_j^ψ, are (possibly identical) subsets of the history vector 𝐡_j. We take f_j to be the treatment-free model for stage j, specifying the impact of 𝐡_j^β on the outcome. This impact is not mediated by treatment. Conversely, γ_j is the blip model for stage j, which indicates the impact of 𝐡_j^ψ on the outcome. This effect is mediated by treatment (a_j).

The stage j blip function in this multistage setting is defined as the marginal impact of a patient receiving treatment a_j, compared to a patient who received standard treatment at stage j (a_j = 0), with an identical history and who goes on to receive optimal, though not necessarily identical, treatment in the future. That is, γ_j(𝐡_j, a_j; ψ_j) = E[Y^𝐚_j, 𝐚_j+1^opt - Y^𝐚_j-1, 0,𝐚_j+1^opt| 𝐇_j = 𝐡_j], where Y^a^† refers to the counterfactual outcome Y, which is potentially unobserved, under a treatment regime specified by a^†. 

There is an alternative formulation for the outcome model, which provides a more intuitive characterization for interpreting dWOLS. The mean outcome can be defined such that 
    E[Y|𝐇=𝐡] = E[Y^opt|𝐇=𝐡] - ∑_j=1^K μ_j(𝐡_j, a_j; ψ_j) ,
 where Y^opt gives the theoretically optimal outcome (under the optimal DTR) and the μ_j constitute penalty terms for non-optimal treatment. Here μ_j are referred to as regrets, and are the contrast in outcomes between a patient who receives optimal treatment at stage j, and the same patient receiving treatment a_j at stage j, assuming the patient is treated optimally thereafter. Formed this way, the observed outcome is equal to the optimal outcome less all negative effects deriving from suboptimal treatment. The regrets may be expressed in terms of the blips, namely μ_j(𝐡_j, a_j) = γ_j(𝐡_j, a_j^opt) - γ_j(𝐡_j, a_j). 

There is a recursive nature to the multistage DTR analysis as the treatment decision at stage j impacts all future decisions. In dWOLS we begin by analyzing the final stage of treatment, then work backwards, at each stage generating a pseudo-outcome which removes the effects of future treatment from the outcome. Letting ỹ_K = Y, we define the j-th pseudo-outcome as ỹ_j = ỹ_j+1 + (γ_j(𝐡_j, a_j^opt) - γ_j(𝐡_j, a_j)) = ỹ_j+1 + μ_j(𝐡_j). That is, we `add back' the stage j regret, effectively removing it from the outcome. This allows the pseudo-outcome at stage j to be interpreted as the outcome for a patient who receives their particular regime up to stage j, and then is optimally treated afterwards. We could continue to use the blip formulation of the outcome model. In this case we once again take ỹ_K' = Y, and then define ỹ_j' = ỹ_j+1' - γ_j(𝐡_j, a_j). In practice, the regret setup is more commonly implemented, and we will continue to use it (unless otherwise stated).

Estimation using dWOLS in the multistage setting then follows a three step procedure. First, define weights for each stage _j, which satisfy Equation (<ref>), using 𝐱_j as the covariate. Second, starting at stage K, and working iteratively backwards, solve the weighted regression of ỹ_j on the patient history 𝐡_j. Third, define ỹ_j-1, and repeat. If the blip and at least one of the treatment or treatment-free models are correctly specified at each stage j, this process will lead to consistent estimators for all ψ_j.

In order to estimate a DTR we further require two assumptions on our data, whether they are randomized or observational. First, we make the stable unit treatment value assumption (SUTVA).<cit.> SUTVA requires that a patient's outcome is not influenced by another patient's treatment assignment. This is typically reasonable, though may be violated, for instance, when the intervention is a vaccine and the effects of herd immunity influence all observed outcomes. Second, we make the no unmeasured confounders, or sequential ignorability, assumption.<cit.> No unmeasured confounders requires that all common causes of treatment (at each stage j) and future potential covariates or outcomes must be measured in the history. That is, conditional on the available history, treatment must be independent of future potential covariates and outcome. While this assumption will typically hold in randomized studies, it is untestable in the observational framework, and so must be carefully validated based on the applicable subject matter. We will make these assumptions for the remainder of our discussion.



 §.§ Measurement Error and Regression Calibration

In order to correct for measurement error we need to make assumptions regarding the structure of the error. If we take X to be the true covariate and  to be an error-prone observation of X, then we assume some form for = g(X,U). Here U is the random noise which induces the error. While any specific application may suggest a particular form for the error model (g), two commonly used models are the classical additive, and the multiplicative error models. In the classical additive model we take g(X,U) = X + U, and assume that E[U] = 0, and that U has constant covariance, not depending on X, given by (U) = Σ_U. Moreover, we assume that U is independent of (or sometimes uncorrelated with) both X, and any other covariates we observe (without error) Z. In the multiplicative model we take g(X,U) = XU, and assume that E[U] = 1, and again, (U) = Σ_U. We make the same independence assumptions. Note, that while the notation above tends to imply that X (and as such U) is a scalar, the same models can be extended to vector-valued covariates; we make no distinction, and have selected notation for simplicity of exposition. Both the additive and multiplicative models provide unbiased measurements of X, in the sense that E[|X,Z] = X. When we have an outcome of interest, Y, we also tend to classify error as either differential or non-differential. Non-differential error refers to the case where, given {X,Z}, our outcome Y is conditionally independent of . Errors may be differential if, for instance, measurements are taken subsequent to the outcome being observed (such as a cancer diagnosis affecting how a patient responds to questions about their historical smoking habits). This is seldom the case in our framework.

Error correction techniques (such as our choice of regression calibration) typically require additional data beyond what is used in standard inferential procedures to learn about the size (and structure) of the error. These may come in the form of validation, replicate, or instrumental data. Validation data consist of a subsample of the observations where both the true and error-prone observations are available. Replicate data consist of repeated measurements of the error-prone covariates for some subset of the individuals. Instrumental data, also known as instrumental variables (IV), refer to additional covariates that are related to the true values, but which are (typically) uncorrelated with both the error observed in the covariate, and the variability in the model after accounting for the true covariates.<cit.> An IV, T is called unbiased for X, if E[T|X,Z]=X. Replicate measurements can be viewed as a specific type of unbiased instrumental variables. While validation data are typically considered ideal, they are often unavailable in practice. Instead, we focus on the use of unbiased IVs, referred to as error-prone proxies, including replicate measurements.


The premise of regression calibration is to replace the unobserved X in our models with an estimated X = E[X|Z,]. We then proceed with standard analysis on the predicted values, adjusting the standard errors as needed. Consider a single patient, with k unbiased proxies of the true covariate, denoted _1, , _k. A common procedure for determining X = E[X|Z,] is taking the so-called best linear unbiased prediction (BLUP) approach, which involves approximating the conditional mean as a linear equation.<cit.> We use a plug-in estimator for the theoretical BLUP, given by 
    X = μ_X + [ Σ_XX^*   Σ_XZ ][ Σ_X^*X^*   Σ_X^*Z;   Σ_ZX^*     Σ_ZZ ]^-1[ X^* - μ_X;   Z - μ_Z ].
 Regression calibration was originally proposed for a fairly general class of additive error models, with independent and identically distributed replicate measurements. <cit.> When we have identically distributed replicate measures, it is sensible to take the mean of _1,,_k for use as  in this equation. When the error models differ between proxies, it seems unlikely that the most effective way to combine the proxies is a simple mean. Intuitively, the observations which are less disturbed by error ought to contribute more to . Our estimators are a generalization of those typically used when replicates are available, <cit.> where we take = ∑_j=1^k δ_j_j, for a set of weights δ_j, choosen either for the interpretation of the estimator or to reduce variability. The specific details of the implementation of our estimators are contained in Appendix <ref>. 

Applying this correction, when errors are additive, results in consistent estimators in linear models. In non-linear models, some authors have described the estimators as “nearly consistent”.<cit.> By this they mean that, while we cannot guarantee consistency of all parameters in the models, we can often make claims about reduced bias or consistency of some parameters. For instance, in log-linear models, regression calibration estimators will consistently estimate the slope parameters while inconsistently estimating the intercept.<cit.> Of greatest concern for our work, outside of linear models, is the utility of regression calibration for logistic regression models. Here, the phrasing “nearly consistent” is taken to mean that the correction, in many situations, provides a great reduction in the bias of the parameter estimates. Further, when the main concern with the fitted logistic regression is the probability estimates, regression calibration provides a reasonable approximation to the truth, when neither the slope parameters, nor the conditional variance of X given {,Z} are too large. Specifically, 
    P(A=1| Z, ) ≈ H[α_0 + α_X'X + α_Z'Z/(1 + α_X'Σ_X|Z,α_X/1.7^2)^1/2],
 where H(x) = (1 + exp(-x))^-1 is the inverse-logit (expit) function, α are the parameters of the logistic regression, and Σ_X|Z, gives the conditional covariance of X given {Z,}.<cit.> In general, the denominator will attenuate the estimates for the model parameters. When the denominator of this approximation is close to 1, however, this attenuation will be small, and the estimator using regression calibration takes an approximately correct form.

While the corrections we consider are motivated by non-differential classical additive error models, a wider class of error models can be accommodated by the methods we introduce. Any non-differential error model, with (1) more than one unbiased proxy available for X, (2) uncorrelated errors between proxies (that is, the covariance between any two unbiased measurements equals the covariance of X, Σ_X), and (3) the covariance of all of the unbiased proxies given as Σ_X + M for suitable constant M, can be interchanged if necessary. This would include the multiplicative error model introduced above. However, when errors are multiplicative, it is generally advisable that transformations are applied to the measured values, to use a scale on which the errors are additive. <cit.> While the existing asymptotic theory, and most implementations of regression calibration correction, rely on the additive structure, the modified estimators we present are computable under this wider class of models. In our simulation studies (Section <ref>) we demonstrate that the corrections perform adequately under slight deviations from additivity. Still, if there is good reason to believe that all proxies are subject to non-additive error, which is transformable to an additive model, we would advise that analysts make these transformations, as asymptotic justifications for the presented methods on those models are lacking.



§ MEASUREMENT ERROR IN DYNAMIC TREATMENT REGIMES




With little work to date concerning measurement error in DTRs and precision medicine, we shall limit attention to the case of errors in patient-level covariates, assuming treatments and outcomes are measured correctly. In this section we will illustrate that, in addition to concerns arising from measurement error that are common to traditional modeling settings, there are considerations which are unique to the structure of DTRs. We discuss these considerations alongside various theoretical observations. 

First, we motivate the construction of valid estimators in the one-stage setting, providing a theoretical guarantee of sample covariate balance in the presence of measurement error. Next, we illustrate how these estimators can be extended to the multistage setting, paying specific attention to the estimation of pseudo-outcomes. We then discuss how confidence intervals may be constructed using a modified bootstrap procedure. Finally, we focus on the process of determining optimal treatments in the future, reframing the estimation as a prediction problem, and discuss the merits of error correction in this context.





 §.§ Blip Parameter Estimation

To estimate a DTR with dWOLS, we must specify the outcome and treatment models. We assume that a biological process (or similar) relates the true covariate values X to the outcome Y, whereas treatment decisions can only be made based on the error-prone observed values . This structure is shown graphically in Figure <ref>. The treatment decision may be based on a single observed proxy, for instance _1, or on some combination of these proxies, for instance = 1/k∑_i=1^k _i.



Recall that dWOLS produces doubly robust estimators through the principle of covariate balance. If our treatment-free model is misspecified, then correct specification of the treatment model will induce covariate balance in X, (that is E[X|A=1] = E[X|A=0] in the weighted data set), leading to consistent estimation of the blip parameters.<cit.> In the error-prone setting, if we employ regression calibration using X in our outcome models, we wish to induce covariate balance not between X and A, but between X and A. Following the proof by Wallace and Moodie which justifies the choice of weights,<cit.> we might intuitively speculate that any weights which satisfy π(X)(1,X) = (1-π(X))(0,X) will induce covariate balance in X. In the error-free setting weights of the form (a,x) = |a - E[A|X = x]| are recommended, suggesting the use of weights of the form (a, ) = |a - E[A|X = ]| may prove suitable. We observe the following Result.


	Let = (_1,,_k) be observed as a set of unbiased proxies for X, and denote the regression calibration estimates of X, based on , by X. Take P(A=1|L) = H(α'L), where L is any tailoring covariate (vector), which may (but does not necessarily) contain X. Using the weights (A, X) = |A - P̂(A=1|X)|, where P̂(A=1|X) is estimated through a simple logistic regression, the weighted sample means, conditional on A, will be equivalent. Given the above setup,
    
    ∑_i=1^n (1,_ri)A_i_ri/∑_i=1^n (1,_ri)A_i = ∑_i=1^n (0,_ri)(1 - A_i)_ri/∑_i=1^n (0,_ri)(1 - A_i).

Proof of Result 1: See appendix.


Result <ref> states that the estimation procedure alone ensures that, within the sample, the weighted means are equivalent between observations with A=1 and with A=0, regardless of the true underlying treatment model. The idea of using sample balance as a small-sample proxy for true balance has been explored in a traditional balancing score setting.<cit.> We will show through simulations that, in many situations, this sample balance suffices to maintain the double robustness of dWOLS. 

When introducing regression calibration we discussed that, in general, the parameters are not consistently estimated in a logistic regression. This discussion is less directly relevant to our present scenario. The reason is that, under our assumed model, the “true” covariates used to inform treatment are the observed covariates, which by assumption are X^*. While X^* is error-prone with respect to the underlying value of interest, X, and as such the outcome model, it is not error-prone with respect to the treatment model, where decisions are informed using X^*. As a result, when applying regression calibration to the treatment model, we are using X in place of X^*, not in place of X. This remains an approximation – one which is shown in simulations to adequately induce balance – but not the standard approximation discussed in the literature.



 §.§ Multistage DTRs with Error

Having established an approach for blip parameter estimation in the single-stage problem, we now consider the multistage case, which further requires the estimation of the pseudo-outcomes, ỹ_i. If using the regret formulation, then to estimate the pseudo-outcome we must estimate â_j^opt, as well as the blip function itself. Consider, for notational ease, a two-stage DTR, which has a linear specification for γ_2(x_2, a_2) = a_2(ψ_20 + ψ_21'x_2). Then a_2^opt = I(ψ_20 + ψ_21'x_2 > 0). In the error-free case, we have â_j^opt = I(ψ_20 + ψ_21'x_2 > 0) rendering ỹ_1 = Y - μ_1 - μ_2 + (â_2^opt - a_2)(ψ_20 + ψ_21'x_2). Under the condition that ψ_20 = ψ_20 and ψ_21 = ψ_21, then â_2^opt = a_2^opt and μ_2 = (â_2^opt - a_2)(ψ_20 + ψ_21'x_2), simplifying the estimated pseudo-outcome to ỹ_1 = Y - μ_1, which is the same as the theoretical quantity ỹ_1. 

This simplification will not (necessarily) occur in the error-prone case for two reasons. First, even if the ψ are correctly estimated, the use of X_2 in place of X_2 will result in a residual term between the blip functions. Second, the estimated optimal treatment â_2^opt may differ from the true optimal treatment. Assuming that we have ψ_20 = ψ_20 and ψ_21 = ψ_21, then we have 
    μ̂_2 - μ_2 = (Â_2^opt - A_2^opt)(ψ_20 + ψ_21X_2) + (A_2^opt - A_2)ψ_21'(X_2 - X_2).
 If instead of the regret formulation, we compute the pseudo-outcome as described in the blip formulation (and as such do not need to estimate the optimal treatment), we will be left with the residual term γ_2 - γ_2 = A_2ψ_21'(X_2 - X_2). While it is not possible, without access to X_2 directly, to guarantee that these two sources of error are completely eliminated, we are afforded some flexibility in how they are computed. In particular, if we estimate the blip parameters using the regression calibration correction, and assume that they have been correctly estimated, we could separately choose a covariate, _2, to use for estimating ỹ. 

In the blip characterization _2 should be chosen in such a way as to minimize X_2 - _2. Noting that X_2 is chosen to be the (linear) estimator of X_2 which minimizes the mean squared error (MSE), this gives reasonable justification for selecting X_2. It is also worth noting that if A_2 = 0 the blip pseudo-outcome is exactly correct. As such, practitioners applying this method with this characterization may wish to consider a regression calibration conditional on A_2 = 1 (that is, estimate the BLUP only for those who received second stage treatment), which would minimize the MSE among linear estimators for only those patients who contribute to the biased pseudo-outcomes. 

The regret characterization warrants slightly more involved consideration. The second term in Equation (<ref>) has an impact dictated by X_2 - _2, as in the blip formulation. The first term, however, relies on a difference of indicator functions. If γ_2 >> 0 or γ_2 << 0, such that there is an unambiguous optimal treatment for the individual, then controlling |γ_2 - γ_2| leads to A_2^opt = A_2^opt. In this situation, γ_2 near γ_2 simplifies to the condition that _2 is near X_2, and so we can once again rely on the justification that X_2 minimizes the MSE to motivate the selection of the regression calibration correction. If we have that |γ_2| ≤ϵ for a sufficiently small ϵ, such that the optimal treatment is ambiguous, then it no longer suffices to have γ_2 near γ_2 (as even small perturbations between these quantities may lead to A_2^opt≠ A_2^opt). However, if we do have γ_2 near γ_2, then we can also make the claim that |γ_2| is small, relatively speaking. The magnitude of the first term in Equation (<ref>) is given by |γ_2|, therefore, selecting an estimator to be near γ_2 will ensure that either (1) A_2^opt is likely to be optimal in the event that there is a large treatment effect, or (2) that the magnitude of the error produced will be small when A_2^opt is not optimal. This provides a heuristic rationale to use the regression calibration correction in order to estimate the pseudo-outcomes. In order to improve the MSE by conditioning, as was possible in the blip characterization, we would want to limit focus to patients for whom A_2^opt≠ A_2. However, A_2^opt is not observable, and as such this is not a possible strategy.

There are obvious limitations to this justification. The first is that, in certain settings, it may be possible to derive an estimator which minimizes a loss function on the classification of optimal treatments. Further, restricting consideration to linear estimators of X_2 may be ill-advised. Finally, a metric other than MSE may be preferable to measure the distances in this setting. The first issue is a problem that is linked to optimal treatment recommendation (which we investigate briefly in Section <ref>). The second concern extends beyond the estimation of pseudo-outcomes, and in such situations where linear estimators perform poorly, alternative corrections should be considered. There are extensions to regression calibration which provide higher order corrections which may be suitable.<cit.> Finally, where MSE is an inappropriate metric, practitioners of the methodology may be able to solve for an estimator which optimizes the desired metric instead. MSE is a generally applicable metric, which ought to serve well in a wide variety of scenarios. 

In order to perform dWOLS in an error-prone setting, we ultimately recommend computing the regression calibration estimates for all error-prone covariates, and then using these values in the treatment, treatment-free, and blip models, in addition to the estimation of the pseudo-outcomes. This procedure promises consistent parameter estimates under correct model specification, sample covariate balance using the weights, and a heuristic justification for acceptability of pseudo-outcomes. We caution any practitioner applying these methods to be mindful to their particular scenario, ensuring that the structures we have assumed are reasonable, and that our discussions remain valid for their use case.



 §.§ Confidence Intervals and Standard Errors

Regression calibration does not, in general, lend itself to the computation of closed-form variance estimators for the parameters of interest. There do exist derivations for asymptotic standard errors in generalized linear models, however bootstrapped confidence intervals tend to be the preferred solution.<cit.> In the case of dWOLS, there has been little theoretical development on closed-form variance estimators. They have been derived for the single-stage setting, where the authors caution that “such variance estimates require careful calculation and coding, and so will likely not be practical for the typical analyst.” indicating that bootstrap procedures seem to perform satisfactorily in their exploratory analyses.<cit.> A modified bootstrap procedure, the m-out-of-n bootstrap, was proposed for use in Q-learning to handle non-regularity concerns in the estimation of DTRs.<cit.> The proposed adaptive procedure for selecting m in Q-learning has been applied, with some success, to dWOLS.<cit.> It seems that, where measurement error is a concern, a bootstrap procedure would presently be most suited for estimating confidence intervals for DTR parameters. 

We consider the m-out-of-n procedure, with an adaptive choice of m to construct our intervals. We outline the fundamentals of the algorithm here, and advise the interested reader to consider the existing literature for a deeper exploration.<cit.> The method performs a standard non-parametric bootstrap, where samples of size m < n are drawn (with replacement), in place of the more conventional n. The theory dictates only that m = o(n), and so in the finite sample case, we require a procedure for estimating m from the data. We take 
    m = n^1+ζ(1-p)/1+ζ,
 where both p and ζ are hyperparameters, selected from the data. The parameter p is a measure of the non-regularity for the model in question, taking values in [0,1]. Of note, when p = 0, (where we have no regularity concerns), m = n and this method is equivalent to the standard bootstrap. For a fixed value of n, m ∈ [n^1/(1+ζ), n], and so ζ can be viewed as a parameter which controls the smallest acceptable re-sample size. 

We use an adaptive approach which estimates both p and ζ from our data. Consider, for notational simplicity, a two-stage setting. Non-regularity concerns stem from patients for whom small perturbations in covariates lead to different optimal treatment decisions. As such, we take p̂ = P(γ_2 = 0), which we estimate by considering the proportion of individuals who do not admit a unique optimal treatment decision at the second stage. That is, we construct confidence sets for the second stage blip, and count the proportion of individuals for whom this set contains 0. To select ζ̂, we use a double-bootstrap procedure. 

We start by setting ζ to be a small value, and then draw B_1 samples of size n from the initial data. Within each of these samples, we estimate p̂^(b_1) and the parameters of interest, ψ^(b_1). We then conduct an m-out-of-n bootstrap procedure with B_2 iterations, using the current value of ζ and p̂^(b_1) to compute m^(b_1). We use these B_2 resamples to form a confidence interval around the parameters of interest. This is repeated for each of the B_1 samples. We then check the nominal coverage probability, counting the proportion of the B_1 intervals which contain the initial estimate, and if this is at the desired level, we select the present value of ζ for ζ̂. Otherwise, we increment ζ and run the procedure again. The search space for ζ can be selected as necessary for the application, for instance, restricting the maximum considered value based on the smallest allowable re-sample size. Once ζ̂ and p̂ are selected the bootstrap is performed with the estimated m.



 §.§ Future Treatments
 
While we have focused on the identification of the optimal DTR, an important extension is to consider the implications that measurement error has on future treatment decisions. One consideration is to frame future treatment decisions as a prediction (or classification) problem. In such a framing, our goal is not to correctly estimate the causal parameters, but rather to correctly classify patients into their optimal treatment categories. As previously discussed, it is sometimes argued that measurement error corrections are unnecessary in a prediction setting, though this is not universally applicable.<cit.> The complexity of DTRs suggest that it is worth considering the utility of error correction for predictions, and studying the effects of error being ignored.

In order to implement error correction for the assignment of future treatments we must consider what information is available when making those decisions. If we have measurements available for the entire population we wish to treat prior to making any treatment decision, we can apply regression calibration directly, and treat based on the imputed values. This setting is distinct from the situation where we are making treatment decisions one at a time, and consequently cannot pool the patients' information in order to apply regression calibration directly. In this setting we instead propose a pseudo-correction, where the parameters required to adjust the covariates are made available, from the fitting stage, for use in the prediction stage. It is also conceivable, for instance due to cost constraints, that during the study we have error-prone covariates, while future decisions may be informed by the true covariates. Here, the prediction problem becomes one of predicting across domains.



§ SIMULATION STUDIES

We now demonstrate, via simulation, the potential impact of measurement error in the context of DTRs. We emphasize the issues that are present when conducting a naive analysis, and show the feasibility of regression calibration to largely correct for the errors in the analysis, as per our preceding discussions.



 §.§ Parameter Estimation

We begin by demonstrating the bias present in blip parameter estimates resulting from a naive analysis, and the robustness of our proposed estimation procedures. First, we consider a simple one-stage setup, with X∼ N(0,1), and assume that we observe two proxy measurements, given by _1 ∼ X + N(0, 0.25), and _2 ∼ X + t_8. We assume that the treatment model is given by P(A=1|_1=w) = H(1 - 0.5w + 1.5exp(w - 1)), and the outcome model is specified as Y = X + exp(X) + A(1+X) + ϵ where ϵ∼ N(0,1), independent of all other variables. We are interested in estimating blip parameters ψ_0 = 1 and ψ_1 = 1.

In this setting, we consider four analyses, repeated with and without regression calibration, altering which components of our models are correctly specified. We fit models with (1) neither the treatment nor treatment-free models correctly specified, (2) only the treatment model correctly specified (where the treatment-free is taken to be linear), (3) only the treatment-free model correctly specified (where the treatment model is taken to be linear in the logistic scale), and (4) where both are correctly specified. In all scenarios we simulated 10000 datasets of size n=1000. The results are summarized in Figure <ref>. 



When at least one model is correctly specified (analyses (2)-(4)), the naive estimators of ψ_0 perform well. In all four scenarios the naive results are biased for ψ_1. Regression calibration results in a clear improvement over the naive estimators in the results for ψ_1 across analyses (2)-(4), where the bias is largely removed. There is a clear, though dramatically reduced, bias in analysis (2), where the estimates rely on the correct specification of the treatment model alone. 

We further consider extending these analyses to a variety of two-stage DTR settings, adapted from the original dWOLS paper.<cit.> In addition, we consider a scenario in which various error model combinations were used. We compare the estimation of the relevant parameters using the proposed correction to the parameter estimates obtained under an analysis using a weighted average of the available proxies. For all situations we consider basing treatment on only the first naive proxy, or on the mean of the available proxies. These results are summarized in the appendix, in Tables <ref>-<ref>. 

In general, we see that whether actual treatment decisions are based on a single error-prone covariate, or on the mean of multiple proxies, the correction methods are generally applicable. Across the majority of scenarios, the proposed corrections tend to greatly improve estimates compared to the naive analysis, and yield results which appear broadly consistent. The corrections work well across a variety of error mechanisms, where performance is only materially impacted when using a multiplicative gamma distribution to induce the error. These results confirm our comments regarding the importance of additive error models: the methods are somewhat resilient to these assumptions, but analysts should be careful when there is good reason to suspect a multiplicative model. When the treatment model is badly misspecified, we see notable degradation in the quality of the correction. These simulations suggest that careful consideration must be given to fitting the treatment model. 



 §.§ Coverage Probabilities

Next, we consider three scenarios to test the applicability of the proposed bootstrap procedure. Due to the computational demands of the adaptive procedure, it is not feasible to conduct a full simulation study, adaptively selecting ζ for each experiment. Instead, we perform the double-bootstrap procedure once under each of the scenarios, and then consider the m-out-of-n bootstrap for values of ζ surrounding the selected one. In all three scenarios we take X_1, X_2 ∼ N(0,1), and observe two error prone proxies. Scenario 1 takes _11, _12∼ X_1 + N(0,1), and _21, _22∼ X_2 + N(0,1). Scenario 2 takes _11∼ X_1 + N(0,1), _12∼ X_1 + Unif(-1,1), _21∼ X_2 + N(0,1), and _22∼ X_2·Gamma(1, 1). Finally, scenario 3 takes _11∼ X_1 + Unif(-1, 1), _12∼ X_1·Gamma(1, 1), _21∼ X_2 + N(0, 0.25), and _22∼ X_2 + Unif(-1, 1). For all three scenarios, we take P(A_j = 1|_j1=w) = H(w). The outcome for scenarios 1 and 2 is given by Y = X_1 + X_2 + A_1(1 + X_1) + A_2(1 + X_2) + ϵ where ϵ∼ N(0,1) independent of everything else. For scenario 3, we introduce an additional binary covariate, Z_2, with P(Z_2 = 1) = 0.5. We then take Y = X_1 + X_2 + A_1(1 + X_1) + A_2(1 + X_2 - Z_2 - Z_2X_2) + ϵ where, again, ϵ∼ N(0,1). Note that, if Z_2 = 1 then γ_2 = 0, meaning that the optimal treatment is not well-defined. 

In the first two scenarios we estimate ζ̂ = 0.05, while in the third scenario ζ̂ = 0.075. For all scenarios we consider forming bootstrap confidence intervals using (1) a traditional n-out-of-n bootstrap, (2) an m-out-of-n bootstrap where ζ=0.05 is used in the adaptive procedure, and (3) an m-out-of-n bootstrap where ζ = 0.10 is used in the adaptive procedure. For the third scenario, we also include an m-out-of-n bootstrap where ζ=0.075 is used. The coverage probabilities are contained in Table <ref>. We see that the standard bootstrap procedure attained the nominal coverage in all settings. Taking the selected ζ met the nominal coverage levels in the second scenario, and was slightly conservative for the first and third scenarios, where taking ζ = 0.10, we obtained mostly conservative intervals. In the third scenario, all procedures tended to produce conservative results.



 §.§ Future Treatment Predictions

To investigate future treatment assignment, we consider a two-stage DTR where X_1 ∼ N(0,1) and X_2 ∼ N(A_1, 1) are the true covariates, with replicate observations _11∼ X_1 + t_10, _12∼ X_1 + N(0,1) and _21, _22∼ X_2 + N(0, 0.25). The outcome is given by Y = X_1 - (A_1^opt - A_1)(1 - X_1) - (A_2^opt - A_2)(3 - 2X_2) + ϵ, with ϵ∼ N(0,2) independent of all other parameters. The treatment models take the form P(A_i = 1|_i1 = w) = H(1 - w). 

We partition these analyses into three settings based on the information available at the time treatment decisions (or predictions) are made. Namely, where we have access to (1) error-prone measurements for only one patient at a time, (2) error-prone measurements for all patients at once, and (3) the true covariate values for prediction. For these scenarios we consider the performance of the naive model compared to the corrected model. For the first setting, direct regression calibration is not possible. Instead, we conduct the pseudo-correction described in Section <ref>, to produce a corrected estimate. We provide the results for this correction applied when we measure both proxies and when we only measure a single proxy. In the second setting, we do not fit the naive model (as it is equivalent to scenario (1)). Each analysis above is run with n=1000 individuals during the fitting stage, and the treatment assignment is run for 5000 individuals. We repeat the set of simulations 10000 times. 



The complete results are provided in Figure <ref>, where, on average, the corrected methods perform better than the naive methods in terms of accuracy. The results suggest that, in the worst case scenario, framed as a problem of prediction, the naive and corrected methods perform comparably. However, there are dramatic gains in terms of optimality of treatment in the event that additional information is available when assigning future treatments. At stage one, the pseudo-correction performs favorably using only the second proxy, as compared to only the first proxy, as a result of its lower variance and higher weight while fitting the estimator. This suggests that if the pseudo-correction is to be used, and only one proxy will be made available, the proxy with the lowest variance is preferred.



§ STAR*D STUDY

We now illustrate the proposed correction methods through application to data from the Sequenced Treatment Alternatives to Relieve Depression (STAR*D) study. The STAR*D study was a multistage randomized controlled trial, comparing different treatment regimes for patients with major depressive disorder.<cit.> The study was split into four phases (with phase two further subdivided into two sub-phases) where, at each phase, different treatment options were available to patients based on preference and progression through the study. The severity of depression was measured through the Quick Inventory of Depressive Symptomatology (QIDS) score, where assessment was conducted during each phase both by the patient (denoted QIDS-S) and by a clinician (denoted QIDS-C). At the end of each study phase, patients who had a clinician assessed QIDS score less than or equal to 5 were considered to have entered remission, and were subsequently removed from the study. At phase 1, all patients were prescribed citalopram. At the end of phase 1, those who did not enter remission entered the second stage where seven treatment options were available: this phase was characterized by `switching' from citalopram to one of four other treatments options, or `augmenting' treatment by receiving citalopram alongside one of three new treatments. Those who had still not entered remission entered a third (and possibly fourth) phase, where treatment was again switched our augmented with a variety of possible options. Full details of the study, and of the treatment options, are described elsewhere.<cit.> 

The first and fourth phases of the trial are typically ignored in DTR analysis of these data. We focus on phases two (merging both sub-phases) and three, which we refer to as stage one and stage two, respectively. Previous analyses <cit.> specified QIDS-C as an outcome, and dichotomized treatments differentiating those which contain a selective serotonin reuptake inhibitor (SSRI) and those which do not. These analyses model QIDS-C as a continuous covariate and consider three tailoring variables: QIDS-C measured at the start of each level (given by Q_j for stage j), the change in QIDS-C divided by the elapsed time over the previous level (referred to as QIDS slope, denoted S_j for stage j), and patient preference (denoted P_j for stage j), a binary indicator specifying whether the patient desired to switch treatment regimes (P_j = 1) or augment (P_j = 0). Treatment is coded as A_j = 1 if the stage j treatment includes an SSRI, and a 0 otherwise. Our analysis considers 283 patients, who had all stage one and two covariates measured. The outcome was taken to be Y = -1/2(QIDS-C_1 + QIDS-C_2), where QIDS-C_j is the clinician rated QIDS score at the end of stage j. 

Existing analyses of these data make the implicit assumption that clinician scores are error-free measurements. However, the inclusion of self-assessed measures (QIDS-S), offers a feasible mechanism for exploring measurement error in this study. If we postulate that there exists a true underlying symptom score for every patient, then we might propose that both the self-assessed and the clinician scores are surrogate measures for this truth, permitting regression calibration. We note that our analysis continues to use QIDS-C as the outcome variable, to remain comparable with previous literature. 



 §.§ Model Fitting and Comparison

We consider fitting the model using only the clinician ratings, only the self-reports, or using the correction where they are considered to be error-prone proxies. Following previous analyses of the data, we pose a first stage treatment model using only first stage preference (P_1) and a second stage treatment model using only second stage preference (P_2). For the first stage, the treatment-free and blip models are linear in preference (P_1), slope (S_1), and initial QIDS score (Q_1). At the second stage, the treatment-free model is linear in preference (P_2), slope (S_2), starting value (Q_2), as well as stage one treatment (A_1). The blip model used only slope (S_2) and starting value (Q_2). For each of the settings we conducted an m-out-of-n bootstrap, choosing m using the outlined adaptive procedure. Table <ref> contains the results for parameters estimates and 95% confidence intervals.

Previous analyses have found that the only significant treatment effect was the interaction between stage one treatment and preference (A_1P_1), <cit.> a result that is replicated on our subset of the data when using only clinician scores. If instead we assume that the self-reported scores represent the true values, we find a significant treatment effect at stage two, with the interaction between treatment and slope (A_2S_2). However, if we perform our correction, neither of these effects remains significant, and we lack evidence for any significant treatment effects. This may be due to increased uncertainty from the error, but it nevertheless suggests further consideration is required.



§ DISCUSSION

Dynamic treatment regimes provide a powerful framework for characterizing treatment pathways. The theory surrounding optimal DTR estimation is well-developed, with numerous methods available. Measurement error is a pervasive issue in many scenarios and has consequently received extensive attention. However, there has been no substantive work which investigates DTRs in an error-prone setting. The errors arising due to measurement error in the DTR framework are somewhat unique, as the treatment-free, treatment, and blip models are all affected by measurement error separately. The treatment model no longer depends on the true covariate values, as these are unobserved, adding extra complexity to the modeling procedure. Additionally, fitting a DTR often requires patient weights designed to induce covariate balance between a patient's treatment and their covariates. This balance may not be guaranteed in the presence of measurement error. 

Despite these additional considerations, since DTRs can be effectively estimated through regression methods, and since measurement error has been well-studied in regression frameworks, extant error correction methods offer a feasible solution. We investigated the use of regression calibration to correct for covariate measurement error, in the tailoring covariates, in DTRs with a continuous outcome. We have demonstrated that the application of regression calibration within the dWOLS analysis framework is an effective technique for substantially reducing the bias present in an analysis that does not attempt to account for measurement error. Further, the estimates tended to exhibit desirable behavior across a wide variety of settings, largely preserving the doubly robust property of dWOLS.

The multistage setting poses additional considerations due to the need to estimate the sequence of pseudo-outcomes. Even when the blip parameters are correctly estimated there is residual bias when constructing the pseudo-outcome from any error-prone proxy. We argue that using the regression calibration correction to form the pseudo-outcomes can be justified, using MSE as a metric across the class of linear estimators for the true covariates. While this argument is largely heuristic, the simulations which were conducted tend to confirm that this procedure often suffices to correct the parameter estimates. There is opportunity for further theoretical development of these concepts, such as considering what metrics are best-suited for the assessment of pseduo-outcome estimates, both when covariates are subject to error and when they are not.

The m-out-of-n bootstrap with an adaptive choice for m, as proposed to handle non-regularity in the case of error-free DTRs, seems promising as a mechanism for producing nominal, or at worst conservative, confidence intervals while using the proposed correction. This is in line with the related theory in both the measurement error and DTR literature, where the m-out-of-n bootstrap has shown to be effective for dWOLS, and bootstrap methods are broadly useful with regression calibration. While there is substantial room for the development of rigorous confidence intervals using dWOLS, both in the error-prone and error-free settings, the recommended m-out-of-n procedure seems to be well-suited for the task.

While it may seem plausible to view the process of estimating a DTR to form a treatment rule for future patients as a question of prediction, removing the need for error correction methods, we have demonstrated that the naive estimates are more highly variable and tend to provide lower rates of optimal treatment as compared to a corrected analysis. Further, when there is the possibility of observing error-free patient information when making future treatment decisions, the gain from using regression calibration in the study is substantial, in terms of the proportion of optimally treated individuals. 

Finally, we demonstrated our methods through analysis of the STAR*D study data, where additional error-prone proxies were available due to the self-reported QIDS scores, which have typically been ignored in prior analyses of this dataset. Accounting for errors alters the estimated optimal treatment rules, which may be attributable to the increased uncertainty that measurement error induces, though it suggests that the true optimal decision rules likely require further investigation to be correctly identified.

The resolution of measurement error for DTRs is a complex challenge. The approaches proposed in this work rely on a number of assumptions that may not hold in practice, such as the availability of unbiased instrumental data or the applicability of the error models explored. Nevertheless, we have demonstrated both the potential impact of measurement error on so-called naive analyses, and the ease with which considerable gains can be made through the application of comparatively straightforward analytical techniques. More complex methods (both from the DTR and measurement error literatures) may elicit further improvements, and we anticipate pursuing these in future work. Beyond this, errors in the treatment and outcome variables must also be considered, both of which may be investigated as natural extensions to the results presented here.



§ ACKNOWLEDGMENTS

This work was funded by a Natural Sciences and Engineering Research Council (NSERC) Discovery Grant. The data for the STAR*D study are available from the National Institute of Mental Health (NIMH). Restrictions apply to the availability of these data, which were used under license for this study. Data are available through the NIMH Data Archive (NIMH NDA ID: 2148). We are grateful for the feedback from the reviewers and editors on an early draft of this manuscript. The provided comments contributed important developments to the methodologies presented.



§ DATA AVAILABILITY STATEMENT

All of the R code used to run the simulation studies and sensitivity analyses is freely available online at: https://github.com/DylanSpicker/measurement-error-DTRs. The data for the STAR*D study are available from the National Institute of Mental Health (NIMH). Restrictions apply to the availability of these data, which were used under license for this study. Data are available through the NIMH Data Archive (NIMH NDA ID: 2148).








unsrt












§ REGRESSION CALIBRATION: DETAILS
 
We first consider defining the optimal weights δ_j. In our investigation, we have paid most attention to three separate sets of weights: (1) using δ_j = 1/k for all k proxy measurements, (2) viewing  as an estimator for X, and minimizing the variance of that estimator, which gives δ_j = (M_j)^-1[∑_l=1^k (M_l)^-1]^-1, or (3) treating δ_j as parameters in the BLUP and solving, which gives the form δ_j = (β'β M_j)^-1[∑_l=1^k (β'β M_l)^-1]^-1, which we can solve numerically. Here M_j refers to the j-th matrix in the covariance term. Solving for the BLUP gives us Equation (<ref>). To implement each of these, we advocate for simple plug-in estimators for each of the corresponding quantities, most of which can be readily derived through ANOVA-style calculations. Unless otherwise stated, we use 

    X^*_· j   ≡1/n∑_i=1^n X^*_ij
    X_i^*(j)   ≡1/k-1∑_l=1 
     l≠ j^k X^*_il
    Σ_X_j^*   = 1/n-1∑_i=1^n (X^*_ij - X^*_· j)(X^*_ij - X^*_· j) 
    M   = k-1/kn∑_i=1^n∑_j=1^k (X^*_ij - X^*(j)_i)(X^*_ij - X^*(j)_i)' 
    Σ_XX^(1)   = 1/k{∑_j=1^k Σ_X_j^* - M}
    M_j    = Σ_X_j^* - Σ_XX^(1)
    μ_X = μ_X^*   = 1/n∑_i=1^n X_i^* = 1/n∑_i=1^n∑_j=1^k δ_jX^*_ij
    μ_Z    = 1/n∑_i=1^n Z_i 
    Σ_ZZ   = 1/n-1∑_i=1^n (Z_i - Z)(Z_i - Z)' 
    Σ_XZ = Σ_X^*Z   = 1/n-1∑_i=1^n(X^*_i - X^*)(Z_i - Z)' 
    Σ_X^*   = 1/n-1∑_i=1^n (X^*_i - X^*)(X^*_i - X^*)' 
    Σ_XX^(2)   = Σ_X^* - ∑_j=1^kδ_j^2M_j.




§ PROOFS OF RESULT 1



    Consider an arbitrary logistic regression, explaining A with respect so some covariate T. We will assume, WLOG, that T is univariate to suppress vector notation, though the same argument holds for vector-valued covariates. Assume that the model is fit with a sample of (A_1, t_1), , (A_n, t_n). Computing a maximum likelihood estimate for P(A=1|T) results in solving 
    
    ∂ℓ/∂α_0 = ∑_i=1^n A_i - (1 - A_i)exp(α_0 + α_1t_i)/1 + exp(α_0 + α_1t_i)
 
    and
    
    ∂ℓ/∂α_1 = ∑_i=1^n t_iA_i - (1 - A_i)exp(α_0 + α_1t_i)/1 + exp(α_0 + α_1t_i)
 
    equal to 0. Solving these simultaneously results in 
    
    ∑_i=1^n A_i/1 + exp(α_0 + α_1t_i) = ∑_i=1^n  (1 - A_i)exp(α_0 + α_1t_i)/1 + exp(α_0 + α_1t_i)
 
     and
     
    ∑_i=1^n t_iA_i/1 + exp(α_0 + α_1t_i) = ∑_i=1^n t_i(1 - A_i)exp(α_0 + α_1t_i)/1 + exp(α_0 + α_1t_i).

    
    The above expressions simplify to:
    
    ∑_i=1^n A_i(1-P(A=1|T=t_i))    = ∑_i=1^n (1-A_i)P(A=1|T=t_i) 
    ∑_i=1^n t_iA_i(1-P(A=1|T=t_i))    = ∑_i=1^n t_i(1-A_i)P(A=1|T=t_i)


    This of course still holds for T=X, since the exact form of T did not factor into the expression. Then, if the weights are defined to be |A - P(A=1|X)|, we can see that the ratio of the above two expressions gives us the required form for sample covariate balance. 




§ MULTISTAGE SIMULATION RESULTS

To investigate the procedure in the multistage scenario, we consider a variety of related settings formed by varying different aspects of the model. We take X_1 ∼ N(0,1), with _11∼ g_1(X_1) and _12∼ g_2(X_1), for error models g_1, g_2. We assume that P(A_1 = 1|_1=_1) = h_1(_1; α_10, α_11), with a treatment model h_1 and parameters α_10, α_11. We also take X_2 ∼ N(A_1, 1), with _21 = g_1(X_2) and _22 = g_2(X_2), and P(A_2 = 1|_2=_2) = h_2(_2; α_20, α_21). The outcome is given by Y = f(X_1) + (A_1^opt - A_1)(1 + ψ_11X_1) + (A_2^opt - A_2)(1 + ψ_21X_2) + ϵ, with ϵ∼ N(0,1), where f(X_1) is the treatment-free model. We consider five scenarios by altering the above parameters. 
    
  * Considers 10 combinations of (α_10, α_20), values taken from {-2, -1, 0, 1, 2}, holding the treatment-free model as linear, both treatment models as linear, the error models as classical additive with N(0, 0.25) distribution, ψ_11 = ψ_21 = 1.
    
  * Considers 10 combinations of (ψ_11, ψ_21), values taken from {-1, -0.1, 0, 0.1, 1}, holding α_10 = α_20 = 0, the treatment-free model as linear, both treatment models as linear, the error models as classical additive with N(0, 0.25) distribution. 
    
  * Considers 5 scenarios for various forms of the treatment-free model, taking f(X_1) = X_1 (linear), f(X_1) = X_1 + X_1^2 (quadratic), f(X_1) = X_1 + X_2^2 - X_1^3 (cubic), f(X_1) = exp(X_1) - X_1^3 (exponential), or exp(X_1)I(X_1 >= -0.5) (complex). We hold both treatment models to be linear, α_10 = α_20 = 0, ψ_11 = ψ_21 = 1, and the error the error models as classical additive with N(0, 0.25) distribution. 
    
  * Considers 10 scenarios where the treatment models are taken to be one of h_j(_j) = α_j0 + α_j1_j (linear), h_j(_j) = α_j0 + α_j1_j + (_j)^2 (quadratic), h_j(_j) = α_j0 + α_j1_j + exp(_j) (exponential), and h_j(_j) = α_j0 + α_j1_j + (_j)^2 + exp(_j) (mixed). We hold the treatment-free model to be linear, α_10 = α_20 = 0, ψ_11 = ψ_21 = 1, and the error the error models as classical additive with N(0, 0.25) distribution.
    
  * Considers 10 scenarios for various error models, taking g_j(X_l) = X_l + N(0, 0.25) (normal), g_j(X_l) = X_l + t_10 (approximately normal), g_j(X_l) = X_l·Gamma(1, 1) (gamma), or g_j(X_l) = X_l·Unif(0.5, 1.5) (uniform). We hold the treatment-free model to be linear, both treatment models to be linear, α_10 = α_20 = 0, and ψ_11 = ψ_21 = 1.


All analyses are conducted where (_1, _2) is taken to be (_11, _21), (_1, _2), (_11, _2), (_1, _21) (that is treatment either depends on the first naive proxy, or on the mean of the two proxies). We take n=10000 and repeat each scenario 1000 times. The results for a corrected analysis and a naive analysis are included in Tables <ref>-<ref>.











