N-of-1 trials are single-patient multiple crossover experiments in which patients switch between two or more treatments. Although N-of-1 trials are designed to estimate treatment efficacy in single patients, N-of-1 trials assessing the same scientific questions may be combined together and analyzed with a multilevel model. When the treatments compared differ between trials, it may be possible to construct a network of treatments and use network meta-analysis methods to make comparisons among the treatments both at the individual and population levels. We develop Bayesian models for combining N-of-1 trials with continuous and ordinal outcomes and compare results with those from analyses of individual data alone. We use data from a series of N-of-1 trials assessing different treatments for chronic pain to demonstrate the application of hierarchical models for N-of-1 data.