Skip to main content

Table 1 Sample Stata (v13.0) syntax of the structural mean models described in ‘Methods section’ and fitted in ‘Results section’

From: The use of randomisation-based efficacy estimators in non-inferiority trials

The Colitis Once Daily Asacol (CODA) trial
ivregress 2sls < <Outcome> > (<<Adherence indicator> > = < <Trial arm indicator>>), vce(robust)
The Zoledronate versus Ibandronate Comparative Evaluation (ZICE) trial
ivregress 2sls < <Outcome> > <<Predictors of outcome> > <<Predictors of adherence> > (<<Adherence in experimental arm> > <<Adherence in standard treatment arm> > = < <Trial arm indicator> > <<Predictors of outcome> > <<Trial arm * Predictors of outcome interactions> > <<Predictors of adherence> > <<Trial arm * Predictors of adherence interaction>>), vce(robust)
lincom[<<Experimental treatment arm effect> > - < <Standard treatment arm effect>>]
For the CODA trial, the adherence indicator was one variable that was 1 if the participant was allocated to the OD arm (experimental intervention) and adhered, 0 if they were allocated to the OD arm and did not adhere, and also 0 if they were allocated to the TDS arm (standard care).
For the ZICE trial, as distinct causal parameters were identifiable, each arm had its own variable to denote adherence. This variable was 1 if the participant was allocated to the arm and adhered, 0 if they were allocated to the arm and did not adhere, and 0 if they were allocated to the other arm.
  1. OD once daily, TDS three times daily