
README
======

Dataset title:
Paediatric Suicide Data - version 2

Creators:
Sebastian Hökby, Emma Eliasson, & Anna Lundh

Responsible organization:
Karolinska Institutet

See the Researchdata.se catalogue entry for this dataset for complete metadata, including the dataset description, recommended citation, contact information, and information about how to obtain the dataset. 

Description: 
A comprehensible time series dataset (years 1980–2023) containing Swedish cause of death data and population data for children aged 10–17 years. Data for the age group 10–14 are shown separately. The variable columns contain information on year, age, sex, annual suicide count, and the corresponding mid year population count. Additionally, the dataset includes a variable of annual suicide counts in which zeros have been replaced with the value 0.5 (suffix: “_IMP”), which is used as the numerator to pre calculate crude rates per 100,000 capita (suffix: “_IMP”). 
     The data are stratified by age and sex categories in a long format structure and comprise 264 rows of data (44 years × 6 subgroups). Version 2 of the dataset has been created to enable analysis of both sexes jointly and/or separately. Version 1 only allowed sex separated analyses. Version 2 is therefore very similar to Version 1 and represents a configuration that can be derived from Version 1. The derivation is performed by adding column values referring to age and sex, after which the new column values are stacked in a long format structure. No deaths with undetermined intent are included in Version 2.

License: 
PDM 1.0



Essential information for dataset reuse.
----------------------------------------

# Summary of differences between version 1 and 2: 
Version 2 of the dataset has been created to enable expanded analyses. Version 1 did not allow a complete analysis of both sexes combined, whereas version 2 does. Version 2 is therefore very similar to version 1 and can be derived from it by combining Age and Sex categories into a long data format. Version 2 contains 264 data rows (version 1 contains 88 rows). Two categorical variables — Sex and Age — must be defined before analysis. Poisson regression settings enables all six groups to be analysed at once. Additionally, it should be noted that version 2 excludes all cases of deaths with undetermined intent, unlike version 1. If analyses should exclude the modelling of both sexes jointly, dataset version 1 might be preferrable.

# Important for replication: 
Dataset version 2 is optimised for direct replication using Joinpoint software analysis and is constructed such that all six cohorts will be analysed in a single run, yielding six cohort outputs at once. This requires specification of a Poisson model of Suicide Counts with Age and Sex as by-variables. If modelling crude rates, specify that joinpoint software should analyse the precalculated rates (contained within dataset) and select the homoscedastic error option.

# Data structure:
The dataset uses a long rather than wide data format. It is longer and narrower than the first version of the dataset. The row numbers in column A ("CaseRow")correspond to a specific Age-and-Sex grouping, which can be interpreted using the text in column I, a string variable. There are a total of 264 rows because there are 6 groups with 44 annual data points each (1980–2023). The data rows refer, in descending order, to the age group 10–17 followed by 10–14, which is coded in column G (1 = “10-to-17”; 2 = “10-to-14”). Within each age group, three sex categories appear in a specific order coded in column H (1 = “BSXS”; 2 = “Male”; 3 = “Female”). The abbreviation “BSXS” means “Both Sexes”. Columns G and H are therefore categorical variables that must be defined before running the analysis due to the long data format (the remaining variables are numerical/continuous).

# The rows are interpreted as follows:
Rows 1–44 = “BSXS_10to17”; 
Rows 45–88 = “Male_10to17”; 
Rows 89–132 = “Female_10to17”;
Rows 133–176 = “BSXS_10to14”; 
Rows 177–220 = “Male_10to14”; 
Rows 221–264 = “Female_10to14”.
Make sure cases are properly sorted from 1 through 264, or analysis might not run properly (depending on software and settings).

# Variable list:
A) CaseRow: 			This dataset has a long data format, and each annual count is indicated by a row (1-164; Version 1 has only 88 data rows)
B) Year				Independent variable. All data is annually aggregated.
C) SuicideCount: 		Numerator. The number of suicides noted at any year (deaths with undetermined intent are excluded from dataset version 2).
D) MidPopCount: 		Denominator. Population Count at any year (counts on December 31st: Year1 + Year2 / 2 = "Middle-Year").
E) SuicideCount_IMP: 		Numerator. Same as varible "SuicideCount" except Value=0 except any alue=0 is replaced with Value=0.5 (avoids dividing by zero).
F) CrudeRate_IMP: 		Pre-calulated crude rates, equivalent to = "SuicideCount_IMP" / "MidPopCount" * 100 000 (avoids dividing by zero).
G) AgeByVariable_Dichotomy: 	This by variable has two levels: 1 = AgeGroup10to17; 2 = AgeGroup10to14 (specify this as the first joinpoint by-variable).
H) SexByVariable_Trichotomy:	This by variable has three levels: 1 = Both sexes jointly; 2 = Males; 3 = Females (specify this as the second joinpoint by-variable).
I) ByVariable_Label: 		Labels for each group (1="BSXS_10to17; 2="Male_10to17"; 3="Female_10to17"; 4="BSXS_10to14"; 5="Male_10to14"; 6=Female_10to14).

# Analysis and modification of the data:
The data are preferably analysed using Joinpoint Regression Program version 5.4.0.0. Direct replications should define Age as the first by-variable, and Sex as the second by-variable. If the data are to be analysed using other software, or if a group or certain years are to be excluded, it might be more appropriate to remove these rows manually from the CSV file before importing it into the statistical software. For example, if the analysis is intended to exclude the category of both sexes combined, you may delete Rows 1–44 and 133–176. Alternatively, use dataset version 1 instead.

# Joinpoint software v 5.4.0.0 installation file for Windows OS is found in version 1: https://doi.org/10.48723/1546-qm94
- Reference: Surveillance Research Program, National Cancer Institute (2025). Joinpoint Regression Software, Version 5.4.0 - April 2025.
  https://surveillance.cancer.gov/joinpoint/

# Handling of imputed values:
Note that columns C and E are almost identical. The difference is that column C contains cells where the value is zero (SuicideCount = 0). In column E, these zeros have been replaced with the value 0,5 (SuicideCount_IMP = 0,5). This enables the calculation of suicides per 100,000 population for all cells (it is mathematically invalid to divide by zero). If the Joinpoint Regression Program v.5.4.0.0 is used to analyse the data in a Poisson model with log transformation (which is generally appropriate for these data), column C should be used because the software will automatically replace values of 0 with 0.5. When analysing suicides per 100 000 population, this automatic replacement does not work. In that case, you should instead model the already calculated suicide rates in column F (“Crude Rates per 100 000”), assuming homoscedasticity (an assumption that is generally suitable for these data).

- Counts of zero are usually found in earlier years. For example, zeros are found in the group “BSXS_10to14” on year 1982 and 1983. Consider manually removing these years from the dataset if the software only identifies joinpoints in proximity to cells with counts of zero.

- Whenever possible and feasible, let joinpoint do the imputation through its own imputation function. Only use variables "SuicideCount_IMP" and "CrudeRate_IMP" as a last resort (or to generate preliminary results fast). A suicide count = 0,5 is obviously false, since a person cannot be "half-dead". Crude rates relying on 0,5 as the numerator, are equally biased and must be interpreted with caution. “Female_10to14”.

# Data structure:  
The dataset uses a long format, meaning that each age‑sex grouping receives one row per year. Column A corresponds to grouping labels defined in Column I. There are 264 rows in total, representing 6 groups × 44 years (1980–2023). 

Age group coding (column G):
- 1 = "10‑to‑17"
- 2 = "10‑to‑14"

Sex coding (column H):
- 1 = "BSXS" (Both Sexes)
- 2 = "Male"
- 3 = "Female"

---
# Markdown

## README — Paediatric Suicide Data version 2

### Summary
Version 2 has been created to support more comprehensive analyses compared to Version 1. The dataset now allows full analysis of both sexes combined and is formatted in a long structure.

### Data Structure
- Long format dataset
- 6 groups × 44 years = **264 rows**

### Analysis
Optimised for **Joinpoint Regression Program v.5.4.0.0**.

### Imputed Values
Column C contains original counts. Column E replaces zero values with 0.5 to enable computation of rates.

### Suggested analysis 
Good model fit is acheived by modelling suicide counts with a Poisson model that ignores the population counts. 
Poisson setting is even necessary whenever age group 10-14 is included in the analysis (if using joinpoint software).
Consider excluding the first 4 years from the dataset to avoid joinpoint identification in proximity to zeros.


######################################################
See version 1, DOI: https://doi.org/10.48723/1546-qm94

Version 1 contains: 
1) README
2) Dataset version 1; CSV format
3) Joinpoint software v 5.4.0.0 installation file for Windows OS.
4) Documentation of joinpoint default settings, additional documentation, and meta-data.
---------------------------------------

Previously published information (version 1) that still apply:

# Data extractions:
The dataset contains aggregated data extracted from the official Swedish cause of death registry, informed by individual cause-of-death certificates, as well as official population data extracted from Statistics Sweden (SCB). Both sources provide reliable and high-quality data. Combined, they allow suicide rates to be calculated. See sections ‘Data Sources’ and ‘Data quality’ below for further details, including ethical considerations and permissions. 

# Intended analysis:
The dataset was created with the intention of analysing annual time trends in suicides during the 44-year period: 1980–2023. It only focuses on Swedish children below the age of 18. The national suicide/death count was aggregated by year, but stratified by sex (male vs. female), for two specific age groups (ages 10-14 vs. ages 10-17). All numbers are presented at the national level – never on a local level. Cases were only excluded if they had missing data regarding sex, age, or year of death (missing exact day of death was acceptable). The dataset is comprised only of dead human subjects and is not linked to any specific register. Suicide for ages 0-9 was examined but dropped from the dataset as the number of deaths was too small to be informative to longitudinal statistical analysis. (the annual suicide count was often zero and therefore not informative to the planned analyses).

# Statistical software:
The aggregated dataset is provided in common CSV-format. No special software or code is required to read the file. The data can be imported and analysed with most common statistical software, such as R, Stata, and SPSS. However, the dataset was created and structured with the intention of analysing it a specific software – the Joinpoint Software, provided by the National Cancer Institute (2025). Although the study has not been completed yet, for the sake of Joinpoint replication, one may already assume that the same software version (v.5.4.0.0; setup file: "JP_Setup_540.exe") should be used to reproduce the findings, as future versions might work differently. Software download is free of charge but requires email registration. 

# Settings:
The default settings for the current version (v.5.4.0.0) are described in the document: “V 5.0 - Default Settings Changes — Joinpoint Help System.pdf” (National Cancer Institute, 2025). The methodological aspects of Joinpoint Regression have been described in two regularly cited papers by Kim and colleagues (Kim et al., 2000; Kim et al., 2020). Additional considerations have been discussed by Ingram and colleagues (Ingram et al., 2018). Information about the Joinpoint software, including extensive documentations about the working algorithms, equations, assumptions, and frequently asked questions, can be found at the developer’s website (https://surveillance.cancer.gov/joinpoint/).

# Methodological References:
1.	Brooke HL, Talbäck M, Hörnblad J, Johansson LA, Ludvigsson JF, Druid H, Feychting M, Ljung R. The Swedish cause of death register. Eur J Epidemiol. 2017 Sep;32(9):765-773. doi: 10.1007/s10654-017-0316-1. Epub 2017 Oct 5. PMID: 28983736; PMCID: PMC5662659.
2.	SCB, Statistics Sweden. (2025). Database. ”Population size according to region, civil status, age and sex. Years 1968 – 2024”. Internet. Accessed [2025-July-08] from: https://www.statistikdatabasen.scb.se/pxweb/sv/ssd/START__BE__BE0101__BE0101A/BefolkningN
3.	De Munter (2022). Statistical register's production and quality -National Cause of Death Register. Department of Registers and Statistics, National Board of Social Affairs and Health, item no.: 2022-5-7909. Published 2022-February, Sweden. Accessed 2025-10-07, from URL: https://www.socialstyrelsen.se/globalassets/sharepoint-dokument/dokument-webb/ovrigt/production-and-quality-dors.pdf#page=8.47 
4.	Surveillance Research Program, National Cancer Institute (2025). Joinpoint Regression Software, Version 5.4.0 - April 2025. (https://surveillance.cancer.gov/joinpoint/).
5.	Ingram DD, Malec DJ, Makuc DM, Kruszon-Moran D, Gindi RM, Albert M, Beresovsky V, Hamilton BE, Holmes J, Schiller J, Sengupta M. National Center for Health Statistics Guidelines for Analysis of Trends. Vital Health Stat 2. 2018 Apr;(179):1-71. PMID: 29775435.
6.	Kim HJ, Chen HS, Byrne J, Wheeler B, Feuer EJ. Twenty years since Joinpoint 1.0: Two major enhancements, their justification, and impact. Stat Med. 2022 Jul 20;41(16):3102-3130. doi: 10.1002/sim.9407. Epub 2022 May 6. PMID: 35522060. https://pubmed.ncbi.nlm.nih.gov/35522060/  
7.	Kim HJ, Fay MP, Feuer EJ, Midthune DN. Permutation tests for joinpoint regression with applications to cancer rates. Stat Med. 2000 Feb 15;19(3):335-51. doi: 10.1002/(sici)1097-0258(20000215)19:3<335::aid-sim336>3.0.co;2-z. Erratum in: Stat Med 2001 Feb 28;20(4):655. PMID: 10649300. https://pubmed.ncbi.nlm.nih.gov/10649300/ 



