Scoring functions for common loneliness scales, with the response keys and reverse-scoring taken from each scale's original manual. The point is to stop reverse-coding and reporter errors. Every key is verified against source's manual, out-of-range responses raise a warning, and missing-data rules follow each scale's manual.
| Key | Scale | Source |
|---|---|---|
ucla20 |
UCLA Loneliness Scale Version 3 (20-item) | Russell (1996) |
ucla3 / tils |
Three-Item Loneliness Scale | Hughes et al. (2004) |
djg11 |
De Jong Gierveld Loneliness Scale (11-item) | de Jong Gierveld & Van Tilburg (1999) |
djg6 |
De Jong Gierveld Loneliness Scale (6-item) | de Jong Gierveld & Van Tilburg (2006) |
lsdq |
Children's Loneliness and Social Dissatisfaction Scale | Asher, Hymel, & Renshaw (1984) |
selsa_s |
Social and Emotional Loneliness Scale for Adults, Short | DiTommaso, Brannen, & Best (2004) |
# install.packages("remotes")
remotes::install_github("nsbyrd/lonelyr")
library(lonelyr)Pass the item columns in scale order. The dispatcher reads the key from the registry and returns a data frame of scores.
library(lonelyr)
# UCLA-20: reverse items handled internally
score_loneliness(df, ucla_items, "ucla20")
# de Jong scales need the "more or less" code: 2 on a 3-point coding,
# 3 on a 5-point coding
score_loneliness(df, djg_items, "djg11", neutral = 2, bands = TRUE)
# SELSA-S returns social, family, romantic, and combined emotional means
score_loneliness(df, selsa_items, "selsa_s")Each engine is also callable directly (score_likert, score_djg,
score_lsdq, score_selsa_s) if you want to override.
- UCLA-20 reverses items 1, 5, 6, 9, 10, 15, 16, 19, 20 on a 1-4 metric; total range 20-80.
- De Jong scales dichotomize: "more or less" always counts toward
loneliness. One missing item scores 0, two or more return NA.
bands = TRUEadds the manual's tentative 11-item severity categories. - LSDQ drops the eight filler items (2, 5, 7, 11, 13, 15, 19, 23) and reverse-keys the six competence items (1, 4, 8, 10, 16, 22) so higher means more lonely.
- SELSA-S reverses items 4, 5, 8, 9, 10, 14, 15 (8 minus score) and returns subscale means on the 1-7 metric.