The gllamm procedure provides a framework in which to undertake many of the more difficult analyses required for trials and intervention studies. Treatment effect estimation in the presence of noncompliance can be undertaken using instrumental variable (IV) methods. I illustrate how gllamm can be used for IV estimation for the full range of types of treatment and outcome measures and describe how missing data may be tackled on an assumption of latent ignorability. I will describe other approaches to account for clustering and the analysis of cluster-randomized studies. Examples from studies of alcohol consumption of primary-care patients, cognitive behavior therapy of depression patients, and a school based smoking intervention are discussed.