Skip to contents

This function calculates various cognitive test scores from a dataset, including word recall, serial subtraction, and backwards counting. It computes total scores for immediate and delayed word recall, scores for serial subtraction tasks, and a total score for backwards counting.

Usage

score(data)

Arguments

data

A dataframe containing the cognitive test data, including columns for word recall, serial subtraction, and backwards counting tasks.

Value

A dataframe with the following computed scores:

  • Total_I: Total score for immediate word recall.

  • Total_D: Total score for delayed word recall.

  • Total_Sub: Total score for serial subtraction.

  • Total_Count: Total score for backwards counting.

Details

The function applies scoring functions to the cognitive test data:

  • Word recall: Scores immediate and delayed recall using the score_recall function, and computes total scores.

  • Serial subtraction: Applies the score_subtraction function to calculate scores for each subtraction step, and computes the total score.

  • Backwards counting: Assigns 2 points for correct counting on the first try, 1 point for correct counting on the second try, and 0 for incorrect counting.

Examples

# Assuming `cog_data` is a dataframe with the relevant columns
scored_data <- score(cog_data)