Skip to contents

This function classifies individuals into cognitive function groups based on their total cognition score, which is calculated from immediate word recall, delayed word recall, serial subtraction, and backwards counting scores. The classification creates three categories of cognitive function.

Usage

classify(data)

Arguments

data

A dataframe containing cognitive test scores, including total immediate word recall, delayed word recall, serial subtraction, and backwards counting scores.

Value

A dataframe with:

  • Total_cog_score: Total cognitive score (sum of all individual task scores).

  • Class: Cognitive function classification (1 = Normal, 2 = Cognitive impairment no dementia, 3 = Demented).

  • Renamed columns with updated labels for 2022 data: imrc_imp2022, dlrc_imp2022, ser7_imp2022, bwc20_imp2022, cogtot27_imp2022, and cogfunction2022.

Details

The function creates a total cognitive score by summing the scores for immediate word recall, delayed word recall, serial subtraction, and backwards counting. It then classifies the cognitive function into three levels:

  • Class 1: Normal (total score >= 12).

  • Class 2: Cognitive impairment no dementia (total score between 7 and 11).

  • Class 3: Demented (total score <= 6).

Examples

# Assuming `cog_data` is a dataframe with the relevant columns
classified_data <- classify(cog_data_score)