Pharmacoepidemiology is used extensively in osteoporosis research and involves the study of the use and effects of drugs in large numbers of people. Randomized controlled trials are considered the gold standard in assessing treatment efficacy and safety. However, their results can have limited external validity when applied to day‐to‐day patients. Pharmacoepidemiological studies aim to assess the effect/s of treatments in actual practice conditions, but they are limited by the quality, completeness, and inherent bias due to confounding. Sources of information include prospectively collected (primary) as well as readily available routinely collected (secondary) (eg, electronic medical records, administrative/claims databases) data. Although the former enable the collection of ad hoc measurements, the latter provide a unique opportunity for the study of large representative populations and for the assessment of rare events at relatively low cost. Observational cohort and case‐control studies, the most commonly implemented study designs in pharmacoepidemiology, each have their strengths and limitations. However, the choice of the study design depends on the research question that needs to be answered. Despite the many advantages of observational studies, they also have limitations. First, missing data is a common issue in routine data, frequently dealt with using multiple imputation. Second, confounding by indication arises because of the lack of randomization; multivariable regression and more specific techniques such as propensity scores (adjustment, matching, stratification, trimming, or weighting) are used to minimize such biases. In addition, immortal time bias (time period during which a subject is artefactually event‐free by study design) and time‐varying confounding (patient characteristics changing over time) are other types of biases usually accounted for using time‐dependent modeling. Finally, residual “uncontrolled” confounding is difficult to assess, and hence to account for it, sensitivity analyses and specific methods (eg, instrumental variables) should be considered. © 2018 The Authors JBMR Plus published by Wiley Periodicals, Inc. on behalf of American Society for Bone and Mineral Research.