To account for the different durations of observation time between individuals with a mental disorder (cases, observed from their first mental health hospitalization) and individuals without a mental disorder (controls, all observed from the start of the study period), we randomly assigned observation periods to controls to match observation durations among cases using hospital admission dates (month and year). Hospital admission dates were ascertained at the daily level, but cases and controls were matched based on the distributions of admission dates within each month. Matching was conducted within each birth cohort separately to account for cohort differences in the prevalence of mental health hospitalizations. Panels A and B show that the distributions of observation time among cases and their randomly-matched controls were similar. The percentages sum to 100% within cases and controls (within sex). In addition to random matching, we weighted the data based on time spent alive and in the country to account for any remaining differences between individuals in observation time owing to death or outmigration.