Skip to contents

The HiTOP-SR instrument has 405 items and yields 76 scale scores. To demonstrate the ability of the package to calculate these scale scores, we can use real example data (n=143) that was collected at the University of Kansas (KU) by Girard & Gray in 2024. This data is stored in the package under the name ku_hitopsr.

First, we load the package into memory using the library() function. If this doesn’t work, make sure you installed the package properly (see the README on GitHub).

Next, we can load the example dataset from the package using the data() function. It is a large tibble that contains a participant column with a unique identifier for each participant, a biosex column indicating whether each participant is “female” or “male”, and then 405 columns numbered hitop001 to hitop405 containing each participant’s rating on each item of the HiTOP-SR (on a numerical scale from 1 to 4).

data("ku_hitopsr")
ku_hitopsr
#> # A tibble: 143 × 407
#>    participant biosex hitop001 hitop002 hitop003 hitop004 hitop005 hitop006
#>    <chr>       <fct>     <dbl>    <dbl>    <dbl>    <dbl>    <dbl>    <dbl>
#>  1 P001        male          1        1        2        1        1        1
#>  2 P002        female        1        1        1        1        1        1
#>  3 P003        female        4        2        4        1        3        1
#>  4 P004        female        1        1        1        1        1        1
#>  5 P005        female        1        2        3        1        1        1
#>  6 P006        male          1        1        1        1        1        1
#>  7 P007        female        1        1        1        1        1        1
#>  8 P008        female        1        1        1        1        1        1
#>  9 P009        female        1        1        1        1        1        1
#> 10 P010        female        1        1        1        1        1        1
#> # ℹ 133 more rows
#> # ℹ 399 more variables: hitop007 <dbl>, hitop008 <dbl>, hitop009 <dbl>,
#> #   hitop010 <dbl>, hitop011 <dbl>, hitop012 <dbl>, hitop013 <dbl>,
#> #   hitop014 <dbl>, hitop015 <dbl>, hitop016 <dbl>, hitop017 <dbl>,
#> #   hitop018 <dbl>, hitop019 <dbl>, hitop020 <dbl>, hitop021 <dbl>,
#> #   hitop022 <dbl>, hitop023 <dbl>, hitop024 <dbl>, hitop025 <dbl>,
#> #   hitop026 <dbl>, hitop027 <dbl>, hitop028 <dbl>, hitop029 <dbl>, …

Basic Scoring

To turn these item-level ratings into mean scores on the 76 scales, we can use the score_hitopsr() function. It needs to know what object contains the data and which columns contain the item-level data. There are several ways we can specify the items. First, we can provide the column numbers and use the : shortcut. In this tibble, the items are from column 3 to column 407 so we can use items = 3:407. I am going to also set append = FALSE so that you can quickly see the scale scores.

scores <- score_hitopsr(
  data = ku_hitopsr,
  items = 3:407,
  append = FALSE
)
scores
#> # A tibble: 143 × 76
#>    hsr_agoraphobia hsr_antisocialBehavior hsr_appetiteLoss hsr_bingeEating
#>              <dbl>                  <dbl>            <dbl>           <dbl>
#>  1             1.2                   1                1.33            2   
#>  2             1                     1                1.33            1.33
#>  3             2.8                   1                1.67            2.67
#>  4             1                     1                1.67            1   
#>  5             1.6                   1.12             1.33            1.67
#>  6             1                     1                1               1   
#>  7             1                     1                1.33            1.67
#>  8             1                     1                1.67            1   
#>  9             1                     1                3.67            1   
#> 10             1                     1                1               1.33
#> # ℹ 133 more rows
#> # ℹ 72 more variables: hsr_bodilyDistress <dbl>, hsr_bodyDissatisfaction <dbl>,
#> #   hsr_bodyFocus <dbl>, hsr_callousness <dbl>, hsr_checking <dbl>,
#> #   hsr_cleaning <dbl>, hsr_cognitiveProblems <dbl>,
#> #   hsr_conversionSymptoms <dbl>, hsr_counting <dbl>,
#> #   hsr_dietaryRestraint <dbl>, hsr_difficultiesReachingOrgasm <dbl>,
#> #   hsr_diseaseConviction <dbl>, hsr_dishonesty <dbl>, …

Appending

If I had instead set append = TRUE (or left it off, as that is the default), we would get back the ku_hitoppro tibble with the scale scores added to the end as extra columns. Notice below how we now have 483 columns instead of 407.

scores <- score_hitopsr(
  data = ku_hitopsr,
  items = 3:407
)
scores
#> # A tibble: 143 × 483
#>    participant biosex hitop001 hitop002 hitop003 hitop004 hitop005 hitop006
#>    <chr>       <fct>     <dbl>    <dbl>    <dbl>    <dbl>    <dbl>    <dbl>
#>  1 P001        male          1        1        2        1        1        1
#>  2 P002        female        1        1        1        1        1        1
#>  3 P003        female        4        2        4        1        3        1
#>  4 P004        female        1        1        1        1        1        1
#>  5 P005        female        1        2        3        1        1        1
#>  6 P006        male          1        1        1        1        1        1
#>  7 P007        female        1        1        1        1        1        1
#>  8 P008        female        1        1        1        1        1        1
#>  9 P009        female        1        1        1        1        1        1
#> 10 P010        female        1        1        1        1        1        1
#> # ℹ 133 more rows
#> # ℹ 475 more variables: hitop007 <dbl>, hitop008 <dbl>, hitop009 <dbl>,
#> #   hitop010 <dbl>, hitop011 <dbl>, hitop012 <dbl>, hitop013 <dbl>,
#> #   hitop014 <dbl>, hitop015 <dbl>, hitop016 <dbl>, hitop017 <dbl>,
#> #   hitop018 <dbl>, hitop019 <dbl>, hitop020 <dbl>, hitop021 <dbl>,
#> #   hitop022 <dbl>, hitop023 <dbl>, hitop024 <dbl>, hitop025 <dbl>,
#> #   hitop026 <dbl>, hitop027 <dbl>, hitop028 <dbl>, hitop029 <dbl>, …

Items as Strings

Alternatively, we could provide the item column names as a character string. Typing out all 405 item names would be a hassle, but luckily this dataset named them consistently so we can build the names automatically using sprintf(). If we use the “hitop%03d” format and apply that across the numbers 1 to 405, that will create the zero-padded column names we need. If there was no zero-padding, we could have just used “hitop%d”.

scores <- score_hitopsr(
  data = ku_hitopsr,
  items = sprintf("hitop%03d", 1:405),
  append = FALSE
)
scores
#> # A tibble: 143 × 76
#>    hsr_agoraphobia hsr_antisocialBehavior hsr_appetiteLoss hsr_bingeEating
#>              <dbl>                  <dbl>            <dbl>           <dbl>
#>  1             1.2                   1                1.33            2   
#>  2             1                     1                1.33            1.33
#>  3             2.8                   1                1.67            2.67
#>  4             1                     1                1.67            1   
#>  5             1.6                   1.12             1.33            1.67
#>  6             1                     1                1               1   
#>  7             1                     1                1.33            1.67
#>  8             1                     1                1.67            1   
#>  9             1                     1                3.67            1   
#> 10             1                     1                1               1.33
#> # ℹ 133 more rows
#> # ℹ 72 more variables: hsr_bodilyDistress <dbl>, hsr_bodyDissatisfaction <dbl>,
#> #   hsr_bodyFocus <dbl>, hsr_callousness <dbl>, hsr_checking <dbl>,
#> #   hsr_cleaning <dbl>, hsr_cognitiveProblems <dbl>,
#> #   hsr_conversionSymptoms <dbl>, hsr_counting <dbl>,
#> #   hsr_dietaryRestraint <dbl>, hsr_difficultiesReachingOrgasm <dbl>,
#> #   hsr_diseaseConviction <dbl>, hsr_dishonesty <dbl>, …

Scale Prefixes

Also note that each scale column has the prefix “hsr_” in its name. You can change the prefix (e.g., setting it to "hitop_") or even turn it off (e.g., setting it to "") using the prefix argument.

scores <- score_hitopsr(
  data = ku_hitopsr,
  items = sprintf("hitop%03d", 1:405),
  prefix = "hitop_",
  append = FALSE
)
scores
#> # A tibble: 143 × 76
#>    hitop_agoraphobia hitop_antisocialBeha…¹ hitop_appetiteLoss hitop_bingeEating
#>                <dbl>                  <dbl>              <dbl>             <dbl>
#>  1               1.2                   1                  1.33              2   
#>  2               1                     1                  1.33              1.33
#>  3               2.8                   1                  1.67              2.67
#>  4               1                     1                  1.67              1   
#>  5               1.6                   1.12               1.33              1.67
#>  6               1                     1                  1                 1   
#>  7               1                     1                  1.33              1.67
#>  8               1                     1                  1.67              1   
#>  9               1                     1                  3.67              1   
#> 10               1                     1                  1                 1.33
#> # ℹ 133 more rows
#> # ℹ abbreviated name: ¹​hitop_antisocialBehavior
#> # ℹ 72 more variables: hitop_bodilyDistress <dbl>,
#> #   hitop_bodyDissatisfaction <dbl>, hitop_bodyFocus <dbl>,
#> #   hitop_callousness <dbl>, hitop_checking <dbl>, hitop_cleaning <dbl>,
#> #   hitop_cognitiveProblems <dbl>, hitop_conversionSymptoms <dbl>,
#> #   hitop_counting <dbl>, hitop_dietaryRestraint <dbl>, …

Simple Standard Errors

In addition to calculating each scale score as the mean of its corresponding items, we can also calculate each scale score’s standard error as the SD of its corresponding items divided by the square root of its number of items. These standard errors are especially useful when plotting the scores as they can be converted into confidence intervals. We turn this on using calc_se.

scores <- score_hitopsr(
  data = ku_hitopsr,
  items = sprintf("hitop%03d", 1:405),
  calc_se = TRUE,
  append = FALSE
)
scores
#> # A tibble: 143 × 152
#>    hsr_agoraphobia hsr_antisocialBehavior hsr_appetiteLoss hsr_bingeEating
#>              <dbl>                  <dbl>            <dbl>           <dbl>
#>  1             1.2                   1                1.33            2   
#>  2             1                     1                1.33            1.33
#>  3             2.8                   1                1.67            2.67
#>  4             1                     1                1.67            1   
#>  5             1.6                   1.12             1.33            1.67
#>  6             1                     1                1               1   
#>  7             1                     1                1.33            1.67
#>  8             1                     1                1.67            1   
#>  9             1                     1                3.67            1   
#> 10             1                     1                1               1.33
#> # ℹ 133 more rows
#> # ℹ 148 more variables: hsr_bodilyDistress <dbl>,
#> #   hsr_bodyDissatisfaction <dbl>, hsr_bodyFocus <dbl>, hsr_callousness <dbl>,
#> #   hsr_checking <dbl>, hsr_cleaning <dbl>, hsr_cognitiveProblems <dbl>,
#> #   hsr_conversionSymptoms <dbl>, hsr_counting <dbl>,
#> #   hsr_dietaryRestraint <dbl>, hsr_difficultiesReachingOrgasm <dbl>,
#> #   hsr_diseaseConviction <dbl>, hsr_dishonesty <dbl>, …

Note how there are now 152 columns instead of 76. The extra columns aren’t shown in the preview above, but they are named with the _se suffix, e.g., hsr_agoraphobia_se.

Scale Reliability

As we compute scale scores, we can also estimate their inter-item reliability using Cronbach’s α (alpha) or McDonald’s ω (omega total). α is fast and widely used, but it assumes tau-equivalence (all items load equally on a single factor); violations can make α under- or over-estimate reliability. ω is based on a congeneric single-factor model, allowing items to have different loadings and error variances; it typically provides a more accurate reliability estimate for unit-weighted sums. Both assume the scale is essentially unidimensional; α and ω coincide when tau-equivalence holds.

We can just add one or more of the following arguments to score_hitopsr(): alpha and omega. For the latter, we will need the lavaan package installed. If requested, a table of reliability results will be printed as a side-effect of the function (alongside any warnings from lavaan about convergence of the factor analysis models that omega is based on).

scores <- score_hitopsr(
  data = ku_hitopsr,
  items = sprintf("hitop%03d", 1:405),
  alpha = TRUE,
  omega = TRUE
)
#>                           scale alpha omega
#> 1                   Agoraphobia 0.827 0.851
#> 2           Antisocial Behavior 0.307 0.974
#> 3                 Appetite Loss 0.814 0.839
#> 4                  Binge Eating 0.833 0.834
#> 5               Bodily Distress 0.771 0.776
#> 6          Body Dissatisfaction 0.868 0.871
#> 7                    Body Focus 0.777 0.783
#> 8                   Callousness 0.849 0.853
#> 9                      Checking 0.782 0.787
#> 10                     Cleaning 0.742 0.757
#> 11           Cognitive Problems 0.870 0.871
#> 12          Conversion Symptoms 0.368 0.423
#> 13                     Counting 0.760 0.769
#> 14            Dietary Restraint 0.834 0.830
#> 15 Difficulties Reaching Orgasm 0.748    NA
#> 16           Disease Conviction 0.518 0.508
#> 17                   Dishonesty 0.864 0.881
#> 18              Disorganization 0.819 0.822
#> 19                 Dissociation 0.755 0.757
#> 20           Distress Dysphoria 0.940 0.940
#> 21                  Domineering 0.847 0.849
#> 22                 Eccentricity 0.795 0.817
#> 23                 Emotionality 0.908 0.912
#> 24                  Entitlement 0.729 0.741
#> 25           Excessive Exercise 0.831 0.834
#> 26                  Excoriation 0.737 0.739
#> 27                Exhibitionism 0.817 0.832
#> 28            Fantasy Proneness 0.833 0.842
#> 29             Food Selectivity 0.850 0.848
#> 30                     Gambling 0.521    NA
#> 31                       Gaming 0.827 0.841
#> 32                  Grandiosity 0.723 0.729
#> 33               Health Anxiety 0.757 0.770
#> 34                     Hoarding 0.725 0.742
#> 35            Hyperdeliberation 0.853 0.856
#> 36               Hypervigilance 0.696 0.706
#> 37                     Insomnia 0.815 0.821
#> 38           Low Sexual Arousal 0.814 0.820
#> 39          Low Sexual Interest 0.710 0.730
#> 40                 Manic Energy 0.741 0.745
#> 41                     Mistrust 0.808 0.816
#> 42              Muscle Building 0.815 0.833
#> 43                   Nightmares 0.802 0.802
#> 44              Non Persistence 0.818 0.827
#> 45              Non Planfulness 0.823 0.829
#> 46                         Nssi 0.826 0.866
#> 47              Oppositionality 0.761 0.761
#> 48                        Panic 0.692 0.731
#> 49                  Paraphilias 0.548 0.605
#> 50                Perfectionism 0.855 0.861
#> 51             Premature Orgasm 0.738 0.749
#> 52         Problematic Shopping 0.815 0.841
#> 53                      Purging 0.595 0.652
#> 54           Reality Distortion 0.784 0.802
#> 55                 Restlessness 0.790 0.808
#> 56       Restricted Affectivity 0.848 0.853
#> 57            Restricted Eating 0.869 0.873
#> 58                     Rigidity 0.771 0.773
#> 59                Risk Aversion 0.771 0.773
#> 60                  Risk Taking 0.807 0.810
#> 61                    Risky Sex 0.751 0.779
#> 62         Romantic Disinterest 0.805 0.814
#> 63    Sex Related Substance Use 0.731 0.724
#> 64              Sexual Distress 0.868 0.869
#> 65                  Sexual Pain 0.836 0.837
#> 66            Social Aggression 0.760 0.787
#> 67             Social Aloofness 0.775 0.782
#> 68               Social Anxiety 0.798 0.799
#> 69        Somatic Preoccupation 0.714 0.735
#> 70        Specific Phobia Index 0.721 0.730
#> 71               Submissiveness 0.742 0.759
#> 72                  Suicidality 0.691 0.754
#> 73             Trauma Reactions 0.787 0.778
#> 74             Trichotillomania 0.389    NA
#> 75                   Well Being 0.833 0.833
#> 76                  Workaholism 0.805 0.808