The treatment of drug use and HIV often requires sequential, individualized decision-making concerning the type or delivery of treatment. An adaptive intervention is a treatment design that uses ongoing information from the patient to guide whether, and how to modify the treatment over time. By providing the appropriate treatment to those who need it, when they need it, adaptive interventions hold the promise of improving long-term outcomes for greater numbers of people, thereby increasing the reach and impact of drug use and HIV treatments in real-world settings. The sequential multiple assignment randomized trial (SMART), a major step forward in the science of adaptive interventions, is an experimental design explicitly for identifying and constructing efficacious adaptive interventions. However, in order to make the SMART maximally useful to drug use and HIV intervention scientists, methodological work is needed to expand the options for analyzing data that arise from a SMART, which are limited in important ways. In particular, modern longitudinal data analysis methods that are used by the great majority of studies in today?s drug use and HIV research do not accommodate and cannot be used to take advantage of the unique features of a SMART, hence their application can lead to greatly reduced statistical power or even incorrect conclusions. This makes it impossible for investigators using SMARTs to scientifically benefit from the power, elegance, and nuance afforded by longitudinal data. Our objective is to bridge this critical gap by developing and evaluating new multilevel methods for analyzing longitudinal continuous, binary, and zero-inflated drug-use and HIV outcome measures arising from a SMART; developing new sample size calculators for planning SMART studies with longitudinal continuous, binary or zero-inflated outcome measures; applying and illustrating these methods using data from three SMART studies in drug abuse and HIV; and developing free, user-friendly resources to implement these methods. The methods developed in this project will improve clinical and public health outcomes by enabling drug use and HIV scientists to develop more potent adaptive interventions to guide the individualization of drug use and HIV treatments.