get_scid_dx | R Documentation |
This function fetches survey data from the SCID (Structured Clinical Interview for DSM-5) using the Qualtrics API, processes it for analysis by selecting relevant columns, renaming them for clarity, binding old and new survey data, and recoding the responses. It also allows the option to save the processed dataset to a specified path.
get_scid_dx(scid_path = NULL, ...)
scid_path |
Optional; a character string specifying the path to save the processed SCID data frame. If 'NULL', the data frame is not saved. Defaults to 'NULL'. |
... |
Additional arguments passed to 'qualtRics::fetch_survey'. |
The function first fetches SCID-5 survey data from two survey IDs, representing current and old data. It then processes this data by: - Selecting relevant columns for analysis. - Renaming columns to more descriptive names based on the survey questions they represent. - Combining the old and new datasets. - Removing entries without a subject ID. - Recoding response values for clarity in analysis. The final dataset includes a wide range of diagnoses according to the DSM-5 criteria, such as schizophrenia spectrum disorders, bipolar and related disorders, depressive disorders, substance use disorders, and other disorders assessed by the SCID.
A data frame containing the processed SCID survey responses, with subjects' diagnoses coded for analysis. If 'scid_path' is provided, the data frame is also saved to the specified file path.
Rachel Velasquez
# Assuming you have set up Qualtrics API credentials
## Not run:
scid_data <- get_scid_dx()
## End(Not run)
# To save the processed data to a specific path
## Not run:
scid_data <- get_scid_dx(scid_path = "path/to/save/scid_data.RData")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.