ObjectiveA simulation study was used to generate the multivariate normal distribution data with a residual effect based on series of N-of-1 trials. The statistical performance of paired t-test, mixed effect model and Bayesian mixed effect model were compared.MethodsThree-cycles N-of-1 trials were set, and the participants were randomly assigned to 2 different treatments in each cycle. The simulation study included the following procedures: producing six-dimensional normal distribution data, randomly allocating intervention methods and patients, adding residual effects, constructing and evaluating 3 models, and setting the parameters. The sample sizes were set as 3, 5, 8 and 10, and the correlation coefficients among different times were set as 0.0, 0.5 and 0.8. Different proportions of residual effects for the 2 groups were set. Type I error, power, mean error (ME), and mean square error (MSE) were used to compare the 3 models.ResultsWhen there was no residual effect in the 2 groups, type I errors of 3 models were approximately 0.05, and their MEs were approximately 0. Paired t-test had the highest power and the lowest MSE. When the residual effect existed in the 2 groups, the type I error of paired t-test increased, and its estimated value deviated from the true value (ME≠0). Type I errors of the mixed effect model and Bayesian mixed-effect model were approximately 0.05, and they had the same power. The estimated values of the two models were close to the true value (ME was approximately 0).ConclusionsWhen there is no residual effect (0% vs. 0%), paired t-test is suitable for data analysis of N-of-1 trials. When there is a residual effect, the mixed effect model and Bayesian mixed-effect model are suitable for data analysis of N-of-1 trials.