Study population – National Cohort

All Swedish residents aged 40 to 80 years on January 1, 2001 (n = 3,987,937) were eligible for this study. The age range was chosen to exclude younger individuals at low risk of CVD and the elderly at low odds of owning a dog. Participants were identified using the Register of the Total Population, which contains information on birth, migration, changes of citizenship, civil status and death on all Swedish citizens and residents18. By using the unique 10-digit personal identity number, records were linked to national registers for socioeconomic variables and health outcomes (see Supplementary Material).

Study population - Swedish Twin Register

To verify findings from the national cohort in a subgroup with more available information on additional potential confounders, we repeated our analysis in the “Screening Across the Lifespan Twin study” (SALT) sub-study of the Swedish Twin Register (STR). The STR, initiated in 1958, is a longitudinal study of the vast majority of twins born in Sweden after 188619 and SALT is a telephone-based interview conducted between March 1998 and March 2002 that collected information on twins born in 1958 or earlier. Of the 44,821 (74%) responders, 41,039 were aged 42–80 years in 2001 and hence eligible for this study20.

Exclusions

Individuals (n = 163,156) were excluded from the National Cohort if they had not resided continuously in Sweden since 1987 to ensure sufficient information on dog ownership registration and complete medical history. Those with re-used or unconfirmed personal identity numbers (n = 5,057) were also excluded.

All Swedish residents are covered by the public health care system, and all hospital visits are registered in the National Patient Register21. Individuals with inpatient visits (n = 387,571 in national cohort and n = 3,163 in twin cohort) between January 1, 1987 to December 31, 2000 for CVD (ICD-9 codes 390–459 or ICD-10 I00-I99; main or secondary diagnosis) and/or had a coronary artery bypass grafting or percutaneous coronary artery intervention (Nordic surgical procedure codes FNA, FNC and FNG) were excluded from the study The final data set included 3,432,153 participants in the national cohort and 34,202 in the twin cohort (Supplementary Figure 1).

Exposure

Since January 1, 2001, it has been a statutory requirement that every dog in Sweden has a unique identifier (ear tattoo or subcutaneous chip) registered at the Swedish Board of Agriculture. In addition, the Swedish Kennel Club has registered all dogs with a certified pedigree with complete information on owner’s personal identity number since 200122. In 2012, an estimated 83% (95% confidence interval, CI, 78–87%) dogs were registered in at least one of these two registers23.

Dog ownership was defined as periods registered or having a partner registered as a dog owner in either of the two dog registers (Supplementary Figure 2). The linkage to each respective partner (defined as a married couple or a cohabiting couple with common children) was possible through annual extracts from the Register of the Total Population. If information on dog death was missing, we assumed a maximum lifespan of ten years. If dates were discrepant between the two registers, we randomly selected one of the two. We also used the Swedish Kennel Club’s definition of breed groups to categorize the 339 breeds into ten groups (Supplementary Table 1). All non-purebred dogs and those of unknown breeds were grouped as mixed breed.

In the twin data, we did not have access to information on partners’ dog ownership and only each person’s own dog registrations were used.

Outcomes

We obtained death data from the Cause of Death Register24 and incident disease data from the National Patient Register from January 1, 2001 to December 31, 2012 in the national cohort, and up to December 31, 2014 in the twin cohort. In addition to all-cause mortality, the main diagnosis in inpatient and outpatient care and underlying cause of death were used to define four incident disease outcomes: (1) acute myocardial infarction (ICD-10 I21); (2) heart failure (ICD-10 I50); (3) ischemic stroke (ICD-10 I63) and (4) hemorrhagic stroke (ICD-10 I60-I62). Any occurrence of these diagnoses was additionally considered as a composite CVD outcome. CVD mortality was defined as death with the underlying cause being any of the CVD outcomes defined above. In the twin register only the composite CVD outcome and all-cause mortality were assessed.

Covariates

Theoretical structured ordering of factors was undertaken by use of directed acyclic graphs to identify potential confounders (Supplementary Figure 3). Socioeconomic variables were accessed from annual excerpts of the Register of the Total Population and the Longitudinal Integration Database for Health Insurance and Labor Market Studies. Variables assessed only at baseline included sex, year of birth, country of birth (Sweden, other Nordic countries and non-Nordic countries) and educational attainment (compulsory, ≤9 years; secondary, 10–11 years; or tertiary education, ≥12 years; not available for those aged >75 years). Time-updated covariates included marital status (single, married/cohabiting, divorced or widowed: definition in Supplementary Methods), presence of children in the home (yes/no), area of residence (Norrland, Götaland and Svealand), population density in municipality of residence (continuous variable), and annual household income (birth year-standardized quintiles). We further accounted for a north-south gradient by including the latitude of the municipality of residence. We further added a time-updated variable for two variants of the socioeconomic index, the international socio-economic index (ISEI)25 and the European Socioeconomic index (ESeC)26 in those with sufficient information (Supplementary Methods).

To avoid reverse effects of outcomes on covariates, we used covariate data from the preceding year to time-update information on January 1 in every year. A stratification variable for household was created with individuals assigned to ‘single-person household’ if the participant lived alone, or to ‘multiple-person household’ if they were married, living with a partner and/or a child. Non-married partners are only traceable in the registers if the couple has children together. A second stratification variable was created for age group in decades.

In the twin register, no register data on socioeconomic and demographic covariates were available. Instead, the following self-reported variables at baseline were used (Supplementary Table 2): body mass index (BMI), physical activity (less than average, average, more than average), employment status (employed, retired, long-term sick leave/early retirement, unemployed), type of accommodation (independent housing, assisted living, other), smoking status (never, former, current), any physical impairment, requirement of assistance for routine daily activities and socioeconomic index (unskilled employees, lower skilled non-manual employees, self-employed excluding independent occupations, intermediate non-manual workers and higher non-manual workers). Data from the National Patient Register from January 1 1996 to December 31 2000 were used to calculate Charlson’s Comorbidity Index27,28 (Supplementary Table 3).

Statistical Analysis

Cox proportional hazards regression with attained age as time-scale was used to calculate hazard ratios (HR) and 95% confidence intervals (CI) for each of the seven outcomes separately. The proportional hazards assumption was verified using log-log plots and Schoenfield residuals plots. Participants were censored at emigration (available in national cohort only), death or at the end of the study; whichever came first. For each outcome, we estimated one sex-adjusted model and one multivariable adjusted model.

National cohort

The multivariable-adjusted model included sex, country of birth, marital status, presence of children in the home, area of residence, population density, age-adjusted income and latitude. All analyses were implemented in the full study sample and stratified on household-type (single/multiple person), age group in decades and sex. In sensitivity analysis, we added adjustment for education in those <75 years at baseline and adjustment for ISEI and ESeC in those with sufficient information. Additionally, we tested for associations between different dog breed groups and outcomes.

Swedish Twin Register

The first multivariable model was similar to the national cohort model with socioeconomic index replacing age-adjusted income. All analyses were implemented in the full study sample and stratified on household type. In additional models, further adjustments for body mass index, smoking, Charlson Comorbidity Index, employment status and level of exercise was done. We repeated analyses after excluding those residing in assisted living accommodation, those with any physical impairments and those requiring assistance for routine daily activities. Standard errors were adjusted with the robust sandwich estimator for dependent observations.

Analyses were conducted in Stata/ MP 14.1 (StataCorp LP, TX, US). The study was approved by the Regional Ethical Review Board in Stockholm, Sweden (2012/1114-31/2 with amendments 2013-1687-32 and 2016/1392-31/1) and allowed the researchers to waive the requirement for obtaining informed consent in the national register part of the study. Participants in the SALT (Twin register) had given informed consent. The study was performed in accordance with relevant guidelines and regulations.

Data availability statement

The register data that support the findings of this study were made available by record-linkage with data from Statistics Sweden, the National Board of Health and Welfare, the Swedish Kennel Club, Swedish Board of Agriculture and the Swedish Twin Register. Restrictions apply to the availability of these data, which were used under license and ethical approval for the current study, and so are not publicly available. Data are however available from the authors upon reasonable request and with permission of the Regional Ethical Review Board in Stockholm, Sweden.