summarize_nmap_s5_self_report: Summarize NMAP Session 5 Self-Report Completion

View source: R/summarize_nmap_s5_self_report.R

summarize_nmap_s5_self_reportR Documentation

Summarize NMAP Session 5 Self-Report Completion

Description

This function fetches and processes self-report survey data from Qualtrics for NMAP Session 5. It calculates the number of completed, missing, and percentage completion for various self-report measures, as well as total completion metrics per participant.

Usage

summarize_nmap_s5_self_report(...)

Arguments

...

Additional arguments (currently unused).

Details

The function performs the following steps:

  • Checks if Qualtrics API credentials are set up in the environment.

  • Fetches survey data from Qualtrics using the specified survey ID.

  • Cleans and organizes the data by renaming columns, converting IDs to numeric, removing attention check and text response fields, and selecting relevant columns.

  • Calculates the number of completed items, missing items, and completion percentages for the following measures:

    • Inventory of Interpersonal Problems (90 item) (IIP-90)

    • Personality Inventory for the DSM-5 Brief Form (PID-5-BF)

    • Adult Self-Report (ASR)

    • Borderline Personality Questionnaire (BPQ)

    • Flourish Scale (FS)

    • Big Five Inventory-2 (BFI-2)

    • NIH EMOTB subscales (Emotional Support, Friend, Perceived Hostility, Perceived Rejection, Perceived Stress)

    • Personality Assessment Inventory-Borderline Scale (PAI-BOR)

    • Mini-Social Phobia Inventory (Mini-SPIN)

    • Patient-Reported Outcomes Measurement Information System (PROMIS) Alcohol Use Short Form and Severity of Substance Use Short Form (3 month)

  • Computes total completion statistics across all measures.

Value

A data frame containing summary statistics for each participant, including counts of completed items, missing items, and completion percentages for each measure and overall.

Note

The function requires a valid Qualtrics API key and base URL, which must be set using 'qualtrics_api_credentials()'. If these credentials are not configured, the function will issue a warning and return 'NULL'.

Author(s)

Rachel Velasquez

Examples

## Not run: 
# Ensure Qualtrics API credentials are set:
qualtrics_api_credentials(api_key = "your_api_key", base_url = "your_base_url")

# Fetch and summarize self-report data for NMAP Session 5
self_report_summary <- summarize_nmap_s5_self_report()
head(self_report_summary)

## End(Not run)

PennStateDEPENdLab/dependlab documentation built on Dec. 14, 2024, 7:12 a.m.